:root,
html[data-theme=crimson] {
  --accent: #cf2e2e;
  --accent-2: #ff6b6b;
  --accent-rgb: 207, 46, 46
}

:root,
html[data-theme=night] {
  --border: rgba(255, 255, 255, 0.12)
}

body::before,
html[data-theme=anime] body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-size: cover;
  background-position: center;
  mix-blend-mode: screen;
  content: ""
}

.app-shell,
body {
  min-height: 100vh;
  position: relative
}

.header-inner,
.topbar {
  display: grid;
  overflow: visible
}

.app-header,
.header-inner,
.topbar {
  overflow: visible
}

.brand-text h1,
body {
  margin: 0
}

.custom-select.open .custom-select-trigger,
.discord-btn:hover,
.header-toggle:hover {
  transform: translateY(-1px)
}

.btn:hover,
.discord-bot-btn:hover {
  filter: brightness(1.05)
}

.brand-text h1,
.seo-copy h1 {
  letter-spacing: -.02em;
  font-weight: 800
}

.seo-copy h1,
.seo-copy nav strong {
  color: var(--text, #fff)
}

.ad-art,
body::before {
  mix-blend-mode: screen
}

.ad-card,
.card {
  isolation: isolate
}

.admin-panel-wide,
.full-span,
.in-feed-ad,
.seo-intro {
  grid-column: 1/-1
}

#overlay-close,
.auth-tab,
.btn,
.custom-select-option,
.custom-select-trigger,
.header-toggle,
.modal-close,
.nav-btn,
.rail-btn,
.sug,
.tag,
.tag-chip,
.tags-dropdown summary,
.theme-btn,
.topic-chip {
  cursor: pointer
}

.action-btn,
.ad-eyebrow,
.admin-kicker,
.rail-title {
  text-transform: uppercase
}

*,
.input,
.textarea {
  box-sizing: border-box
}

#loader,
.empty-state,
.icon {
  text-align: center
}

:root {
  color-scheme: dark;
  --bg: #0b0f14;
  --bg-soft: #101722;
  --surface: rgba(255, 255, 255, 0.06);
  --text: #f5f7fb;
  --muted: rgba(245, 247, 251, 0.66);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.2);
  --ring: 0 0 0 4px rgba(255, 255, 255, 0.06);
  --header-bg: linear-gradient(to bottom, rgba(8, 12, 18, 0.92), rgba(8, 12, 18, 0.74));
  --hero-glow: radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.22), transparent 28%);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --max-width: 1280px;
  --trans-fast: 160ms ease;
  --trans-med: 220ms ease;
  --discord: #5865f2;
  --discord-rgb: 88, 101, 242
}

html[data-theme=crimson] {
  --header-bg: linear-gradient(to bottom, rgba(9, 11, 16, 0.92), rgba(9, 11, 16, 0.74));
  --theme-glow-1: rgba(207, 46, 46, 0.24);
  --theme-glow-2: rgba(255, 107, 107, 0.12)
}

html[data-theme=ocean] {
  --bg: #08111a;
  --bg-soft: #0d1a26;
  --accent: #1994d1;
  --accent-2: #64d8ff;
  --accent-rgb: 25, 148, 209;
  --header-bg: linear-gradient(to bottom, rgba(6, 15, 22, 0.92), rgba(6, 15, 22, 0.74));
  --theme-glow-1: rgba(25, 148, 209, 0.24);
  --theme-glow-2: rgba(100, 216, 255, 0.12)
}

html[data-theme=forest] {
  --bg: #0b120d;
  --bg-soft: #111c15;
  --accent: #2b9a56;
  --accent-2: #8ef0b1;
  --accent-rgb: 43, 154, 86;
  --header-bg: linear-gradient(to bottom, rgba(8, 14, 10, 0.92), rgba(8, 14, 10, 0.74));
  --theme-glow-1: rgba(43, 154, 86, 0.24);
  --theme-glow-2: rgba(142, 240, 177, 0.12)
}

html[data-theme=anime] {
  --bg: #12122c;
  --bg-soft: #1b173f;
  --accent: #ff7bb8;
  --accent-2: #66d9ff;
  --accent-rgb: 255, 123, 184;
  --header-bg: linear-gradient(to bottom, rgba(13, 12, 30, 0.92), rgba(17, 15, 46, 0.86));
  --theme-glow-1: rgba(255, 123, 184, 0.22);
  --theme-glow-2: rgba(102, 217, 255, 0.14)
}

html[data-theme=night] {
  --bg: #070912;
  --bg-soft: #111827;
  --surface: rgba(255, 255, 255, 0.05);
  --text: #f8fbff;
  --muted: rgba(255, 255, 255, 0.7);
  --accent: #8ca1ff;
  --accent-2: #5d74ff;
  --accent-rgb: 140, 161, 255;
  --header-bg: linear-gradient(to bottom, rgba(4, 6, 13, 0.96), rgba(7, 11, 22, 0.86));
  --theme-glow-1: rgba(140, 161, 255, 0.25);
  --theme-glow-2: rgba(93, 116, 255, 0.14)
}

html {
  scroll-behavior: smooth
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  overflow-x: hidden;
  background: radial-gradient(circle at 20% -10%, rgba(255, 255, 255, .07), transparent 38%), radial-gradient(circle at 80% 5%, rgba(106, 210, 255, .1), transparent 30%), linear-gradient(180deg, var(--bg), var(--bg-soft))
}

body::before {
  opacity: .8;
  background-image: radial-gradient(circle at 10% 5%, rgba(255, 255, 255, .16), transparent 34%), radial-gradient(circle at 70% 20%, rgba(var(--accent-rgb), .14), transparent 35%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='500' height='500' viewBox='0 0 500 500'%3E%3Cdefs%3E%3ClinearGradient id='a' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%23ffffff' stop-opacity='0.05'/%3E%3Cstop offset='100%25' stop-color='%23ffffff' stop-opacity='0'/%3E%3C/linearGradient%3E%3Cpattern id='p' width='120' height='120' patternUnits='userSpaceOnUse' patternTransform='rotate(15)'%3E%3Crect x='0' y='0' width='120' height='120' fill='rgba(255,255,255,.02)'/%3E%3Cpath d='M0 30 L120 30 M0 60 L120 60 M0 90 L120 90 M30 0 L30 120 M60 0 L60 120 M90 0 L90 120' stroke='rgba(255,255,255,.06)' stroke-width='1'/ %3E%3C/pattern%3E%3C/defs%3E%3Crect width='500' height='500' fill='url(%23p)'/%3E%3Crect width='500' height='500' fill='url(%23a)'/%3E%3C/svg%3E");
  background-repeat: no-repeat
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(60deg, rgba(40, 54, 103, .2), rgba(33, 31, 58, .16)), radial-gradient(circle at 30% 15%, rgba(255, 255, 255, .1), transparent 18%), radial-gradient(circle at 80% 70%, rgba(186, 114, 255, .12), transparent 28%)
}

html[data-theme=anime] body::before {
  background-image: radial-gradient(circle at 20% 15%, rgba(255, 255, 255, .12), transparent 40%), radial-gradient(circle at 70% 10%, rgba(102, 217, 255, .18), transparent 36%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600' viewBox='0 0 600 600'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23fff' stop-opacity='0.12'/%3E%3Cstop offset='1' stop-color='%23fff' stop-opacity='0'/%3E%3C/linearGradient%3E%3Cpattern id='p' width='200' height='200' patternUnits='userSpaceOnUse' patternTransform='rotate(15)'%3E%3Crect width='200' height='200' fill='rgba(255,255,255,0)'/%3E%3Cpath d='M0 100 H200 M100 0 V200' stroke='rgba(255,255,255,0.06)' stroke-width='1'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='600' height='600' fill='url(%23p)'/%3E%3Crect width='600' height='600' fill='url(%23g)'/%3E%3C/svg%3E");
  opacity: .7
}

html[data-theme=anime] body::after {
  background: linear-gradient(120deg, rgba(255, 123, 184, .14), rgba(102, 217, 255, .1)), radial-gradient(circle at 12% 92%, rgba(255, 255, 255, .1), transparent 30%), radial-gradient(circle at 88% 80%, rgba(100, 64, 255, .13), transparent 35%)
}

html[data-theme=night] body {
  background: radial-gradient(circle at 20% -10%, rgba(255, 255, 255, .05), transparent 34%), radial-gradient(circle at 80% 7%, rgba(120, 150, 255, .08), transparent 30%), linear-gradient(180deg, #080d1e, #101d34)
}

html[data-theme=night] body::before {
  background-image: radial-gradient(circle at 15% 15%, rgba(255, 255, 255, .2), transparent 40%), radial-gradient(circle at 87% 20%, rgba(120, 180, 255, .15), transparent 42%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 500 500'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.06' stroke-width='1'%3E%3Cpath d='M50 50 L450 450'/ %3E%3Cpath d='M450 50 L50 450'/ %3E%3Cpath d='M250 0 L250 500'/ %3E%3Cpath d='M0 250 L500 250'/ %3E%3C/g%3E%3C/svg%3E");
  mix-blend-mode: normal;
  opacity: .65
}

html[data-theme=night] body::after {
  background: linear-gradient(120deg, rgba(151, 170, 255, .12), rgba(80, 95, 189, .1)), radial-gradient(circle at 20% 70%, rgba(255, 255, 255, .08), transparent 35%), radial-gradient(circle at 85% 15%, rgba(75, 124, 255, .08), transparent 30%)
}

body.nsfw-locked {
  overflow: hidden
}

img,
video {
  display: block;
  max-width: 100%
}

button,
input,
select {
  font: inherit
}

.app-shell {
  z-index: 1
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 3000;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border)
}

.brand-mark,
.theme-btn.active,
.theme-btn:hover {
  background: linear-gradient(180deg, rgb(255 255 255 / .08), rgb(255 255 255 / .04))
}

.header-inner,
main {
  width: min(var(--max-width), calc(100% - 28px));
  margin: 0 auto
}

.header-inner {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  transition: padding 180ms, gap 180ms
}

.app-header.is-condensed .header-inner {
  padding: 8px 0;
  gap: 8px
}

.topbar {
  position: relative;
  grid-template-columns: minmax(220px, auto) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  width: 100%
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  flex: 0 0 auto
}

.field,
.toolbar,
.topbar-right {
  overflow: visible
}

.brand-logo,
.card-media,
.media-wrap img,
.media-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block
}

.logo-orb {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 8px rgb(255 255 255 / .05), 0 0 36px rgba(var(--accent-rgb), .45);
  flex: 0 0 auto
}

.discord-btn,
.theme-switcher {
  box-shadow: var(--shadow-soft)
}

.brand-mark .logo-orb {
  width: 20px;
  height: 20px;
  box-shadow: 0 0 0 10px rgb(255 255 255 / .04), 0 0 30px rgba(var(--accent-rgb), .4)
}

.subinfo {
  margin-top: 3px;
  color: var(--muted)
}

.topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%
}

.theme-switcher {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  flex-wrap: wrap
}

.theme-btn {
  border: 1px solid #fff0;
  background: #fff0;
  color: var(--muted);
  border-radius: 999px;
  padding: 10px 14px;
  transition: var(--trans-fast)
}

.admin-action-btn,
.auth-btn,
.auth-pill,
.discord-btn {
  padding: 0 14px;
  border-radius: 999px;
  transition: var(--trans-fast);
  text-decoration: none
}

.theme-btn.active,
.theme-btn:hover {
  color: var(--text);
  border-color: rgba(var(--accent-rgb), .4)
}

.discord-links,
.quick-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap
}

.discord-btn {
  border: 1px solid;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  white-space: nowrap
}

.auth-area,
.auth-user {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%
}

.discord-server-btn {
  background: rgba(var(--discord-rgb), .16);
  border-color: rgba(var(--discord-rgb), .34)
}

.discord-server-btn:hover {
  background: rgba(var(--discord-rgb), .24);
  border-color: rgba(var(--discord-rgb), .5)
}

.discord-bot-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-color: #fff0;
  box-shadow: 0 16px 30px rgba(var(--accent-rgb), .22), 0 10px 22px rgb(0 0 0 / .25)
}

.auth-area {
  flex-wrap: wrap;
  justify-content: flex-end
}

.auth-user {
  justify-content: flex-end;
  flex-wrap: wrap;
  min-width: 0
}

.admin-action-btn,
.auth-btn,
.auth-pill {
  border: 1px solid;
  background: rgb(255 255 255 / .06);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer
}

.admin-action-btn:hover,
.auth-btn:hover,
.auth-pill:hover,
.nsfw-leave-btn:hover {
  background: rgb(255 255 255 / .12);
  border-color: rgba(var(--accent-rgb), .45)
}

.auth-role-badge {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff
}

.auth-state,
.icon {
  color: var(--muted)
}

.auth-state {
  font-size: .84rem
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  width: 100%;
  max-width: 100%;
  max-height: 520px;
  transition: max-height 220ms, opacity 180ms, margin 180ms
}

.header-toggle {
  position: fixed;
  right: 1vw;
  top: 1vh;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 1px solid;
  background: linear-gradient(180deg, rgb(255 255 255 / .12), rgb(255 255 255 / .06));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  box-shadow: 0 14px 34px rgb(0 0 0 / .34);
  transition: transform 180ms, background 180ms, border-color 180ms, box-shadow 180ms
}

.header-toggle:hover {
  background: linear-gradient(180deg, rgb(255 255 255 / .16), rgb(255 255 255 / .08));
  border-color: rgba(var(--accent-rgb), .34);
  box-shadow: 0 18px 38px rgb(0 0 0 / .38)
}

.header-toggle:focus-visible {
  outline: 0;
  border-color: rgba(var(--accent-rgb), .46);
  box-shadow: var(--ring), 0 18px 38px rgb(0 0 0 / .38)
}

.header-toggle-icon {
  position: relative;
  width: 14px;
  height: 14px;
  display: inline-block;
  transition: transform 180ms
}

.header-toggle-icon::after,
.header-toggle-icon::before {
  content: "";
  position: absolute;
  top: 5px;
  width: 9px;
  height: 2px;
  border-radius: 999px;
  background: currentColor
}

#tagInput,
.btn,
.field,
.search-field,
.searchbar,
.searchbar .custom-select {
  width: 100%
}

.pagination a:hover,
.sug:hover {
  background: rgb(255 255 255 / .08)
}

.header-toggle-icon::before {
  left: 0;
  transform: rotate(45deg);
  transform-origin: left center
}

.header-toggle-icon::after {
  right: 0;
  transform: rotate(-45deg);
  transform-origin: right center
}

.app-header.collapsed .header-toggle-icon,
.card-drawer[open] .chev,
.tags-dropdown[open] .chev {
  transform: rotate(180deg)
}

.searchbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 150px 140px;
  gap: 10px;
  align-items: stretch
}

.field,
.search-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  transition: border-color var(--trans-fast), box-shadow var(--trans-fast), transform var(--trans-fast)
}

.search-field {
  padding: 0 12px;
  min-height: 48px
}

.field {
  padding: 0;
  min-height: 48px
}

.admin-action-btn,
.app-header.is-condensed .btn,
.app-header.is-condensed .field,
.app-header.is-condensed .search-field,
.auth-btn,
.auth-pill,
.discord-btn,
.theme-switcher {
  min-height: 42px
}

#overlay-close:focus-visible,
.auth-btn:focus-visible,
.auth-input:focus-visible,
.auth-tab:focus-visible,
.btn:focus-visible,
.custom-select-trigger:focus-visible,
.discord-btn:focus-visible,
.field:focus-within,
.modal-close:focus-visible,
.search-field:focus-within,
.tag-chip:focus-visible,
.tag:focus-visible,
.theme-btn:focus-visible {
  outline: 0;
  border-color: rgba(var(--accent-rgb), .68);
  box-shadow: var(--ring), var(--shadow-soft)
}

#tagInput {
  height: 100%;
  border: 0;
  outline: 0;
  background: #fff0;
  color: var(--text)
}

#tagInput::placeholder {
  color: rgb(255 255 255 / .4)
}

.icon {
  font-size: .92rem;
  user-select: none;
  flex: 0 0 auto;
  width: 16px
}

.btn {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 16px 30px rgba(var(--accent-rgb), .22), 0 10px 22px rgb(0 0 0 / .25);
  transition: transform var(--trans-fast), filter var(--trans-fast), box-shadow var(--trans-fast)
}

.btn:hover {
  opacity: .96
}

.btn:active {
  transform: translateY(0)
}

.suggest-box {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  display: none;
  overflow: auto;
  max-height: 320px;
  z-index: 30;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgb(10 14 20 / .96);
  box-shadow: var(--shadow);
  padding: 8px
}

.sug {
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--text);
  transition: var(--trans-fast)
}

.top-ad {
  display: grid
}

.in-feed-ad,
.top-ad {
  min-height: 280px
}

.auth-area {
  min-width: 180px;
  min-height: 40px
}

.seo-intro {
  display: flex;
  justify-content: center
}

.seo-copy {
  background: var(--panel, rgb(255 255 255 / .04));
  border: 1px solid var(--border, rgb(255 255 255 / .08));
  box-shadow: 0 10px 30px rgb(0 0 0 / .12)
}

.seo-copy p {
  color: var(--muted, rgb(255 255 255 / .72))
}

.card-footer a:hover,
.card-footer h2 a:hover,
.footer-nav a:hover,
.post-link:hover,
.seo-copy a {
  color: var(--link, #9ecbff)
}

.seo-copy nav {
  line-height: 1.7
}

.seo-copy a {
  text-decoration: none
}

.seo-copy a:hover {
  text-decoration: underline
}

.card-footer h2 a {
  color: var(--text, #fff);
  text-decoration: none
}

.card-meta-row {
  display: flex;
  flex-wrap: wrap;
  padding: 10px 14px 0
}

.media-type-badge,
.pagination {
  align-items: center
}

.card-meta-row .booru-pill,
.card-meta-row .meta-chip {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .08)
}

.media-type-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 5;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(8, 12, 20, .78);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex
}

.ad-art,
.ad-card::after {
  z-index: 0;
  pointer-events: none;
  inset: 0
}

.empty-state,
.pagination a {
  background: var(--panel, rgb(255 255 255 / .04))
}

.card-footer a,
.footer-nav a,
.media-link,
.post-link,
.quick-tags a,
.tag-chip,
.topic-chip {
  transition: color .18s, background-color .18s, border-color .18s, opacity .18s
}

.auth-area>*,
.auth-user>*,
.card,
.searchbar>*,
.topbar-right>* {
  min-width: 0
}

.post-card-inner {
  display: flex;
  flex-direction: column
}

.card-footer {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto
}

.discover-links,
.media-stats,
.pagination,
.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px
}

.rail-card h2 {
  font-size: 1.1rem;
  margin: 0 0 10px;
  color: var(--text, #fff)
}

.rail-card p {
  color: var(--muted, rgb(255 255 255 / .72));
  line-height: 1.6
}

.pagination a,
.quick-tags .tag,
.tag-chip {
  display: inline-flex;
  align-items: center;
  color: var(--text, #fff);
  text-decoration: none
}

.pagination a {
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border, rgb(255 255 255 / .1));
  font-weight: 600
}

.pagination a:hover {
  border-color: rgb(255 255 255 / .18)
}

.quick-tags .tag,
.tag-chip {
  gap: 6px;
  border: 1px solid var(--border, rgb(255 255 255 / .1));
  font-size: .9rem
}

.quick-tags .tag:hover,
.tag-chip:hover {
  border-color: rgb(255 255 255 / .18);
  color: var(--link, #9ecbff)
}

.empty-state {
  width: 100%;
  border: 1px solid var(--border, rgb(255 255 255 / .08));
  color: var(--muted, rgb(255 255 255 / .72))
}

@media (max-width:900px) {
  .seo-copy {
    padding: 16px
  }

  .card-footer {
    padding: 12px
  }

  .pagination {
    gap: 8px
  }

  .pagination a {
    width: 100%
  }

  body.layout-page {
    flex-direction: column
  }

  .sidebar {
    width: 100%;
    min-height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--border)
  }

  .sidebar-inner {
    height: auto
  }

  .sidebar-footer {
    display: none
  }

  .page-shell {
    padding: 22px 14px 40px
  }

  .hero-card {
    padding: 20px 16px;
    border-radius: 22px
  }
}

.ad-card {
  position: relative;
  overflow: hidden;
  margin: .5vw;
  border-radius: 20px;
  border: 1px solid;
  background: linear-gradient(180deg, rgb(255 255 255 / .04), rgb(255 255 255 / .025));
  box-shadow: 0 8px 22px rgb(0 0 0 / .18);
  min-height: 104px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat
}

.ad-art {
  position: absolute;
  opacity: .82;
  background-image: var(--ad-art-image);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center
}

.ad-card::after {
  content: "";
  position: absolute;
  background: linear-gradient(90deg, rgb(8 12 18 / .84) 0, rgb(8 12 18 / .72) 38%, rgb(8 12 18 / .46) 72%, rgb(8 12 18 / .18) 100%)
}

.ad-card::before {
  content: "Anzeige";
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: rgb(245 247 251 / .56);
  border: 1px solid;
  background: rgb(255 255 255 / .04);
  border-radius: 999px;
  padding: 5px 8px;
  z-index: 2
}

.ad-cta:hover,
.tag-chip:hover,
.tag:hover {
  background: rgb(255 255 255 / .12);
  transform: translateY(-1px)
}

.ad-card[data-size=banner] {
  min-height: 128px
}

.ad-inner {
  position: relative;
  z-index: 1;
  display: grid;
  align-items: center;
  min-height: inherit
}

.ad-card[data-size=banner] .ad-inner {
  gap: 12px;
  grid-template-columns: 1.2fr auto;
  padding: 20px 22px
}

.ad-card[data-size=feed] .ad-inner {
  gap: 12px;
  grid-template-columns: 1.1fr auto;
  padding: 16px 18px
}

.adsense-shell {
  overflow: hidden;
  min-height: 110px
}

.adsense-shell .ad-inner {
  display: block;
  padding: 14px
}

.adsense-top-slot {
  width: 100%;
  min-height: 100px
}

.adsense-feed-slot {
  width: 100%;
  min-height: 160px
}

.adsense-shell ins.adsbygoogle {
  border-radius: 14px;
  overflow: hidden
}

.media-bottombar,
ins.adsbygoogle[data-ad-status=unfilled] {
  display: none !important
}

.ad-copy {
  display: grid;
  gap: 6px;
  max-width: 760px
}

.ad-cta,
.topic-chip {
  display: inline-flex;
  transition: var(--trans-fast);
  white-space: nowrap
}

.ad-eyebrow {
  color: rgb(245 247 251 / .64);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em
}

.ad-title {
  font-size: clamp(.98rem, .94rem + .32vw, 1.18rem);
  font-weight: 750;
  line-height: 1.15;
  color: var(--text)
}

.action-btn,
.ad-cta,
.rail-title {
  font-weight: 700
}

.ad-text {
  color: rgb(245 247 251 / .62);
  font-size: .88rem;
  line-height: 1.4;
  max-width: 52ch
}

.ad-cta {
  justify-self: end;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  text-decoration: none;
  font-size: .9rem;
  color: #fff;
  background: rgb(255 255 255 / .08);
  border: 1px solid
}

.rail-btn,
.rail-card,
.topic-chip {
  border: 1px solid
}

.ad-cta:hover {
  border-color: rgb(255 255 255 / .16)
}

.rail-btn.active,
.rail-btn:hover,
.topic-chip.active,
.topic-chip:hover {
  border-color: rgba(var(--accent-rgb), .34)
}

.feed-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 22px;
  align-items: start
}

.feed-main {
  display: flex;
  flex-direction: column;
  align-items: center
}

.feed-rail {
  position: sticky;
  display: grid;
  gap: 14px;
  align-self: start
}

.rail-card {
  box-shadow: var(--shadow-soft)
}

.rail-title {
  letter-spacing: .06em;
  color: var(--muted)
}

.rail-actions {
  display: grid;
  gap: 8px
}

.rail-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  transition: var(--trans-fast);
  text-decoration: none
}

.rail-btn.active,
.rail-btn:hover {
  transform: translateY(-1px)
}

.feed-head {
  display: grid;
  gap: 16px
}

.feed-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap
}

.admin-user small,
.feed-title {
  color: var(--muted)
}

.admin-user-actions,
.meta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap
}

.chip-row {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none
}

.chip-row::-webkit-scrollbar {
  display: none
}

.topic-chip {
  flex: 0 0 auto;
  color: var(--text);
  align-items: center;
  justify-content: center;
  gap: 8px
}

.quick-tags-label,
.tag {
  align-items: center;
  gap: 8px;
  display: inline-flex
}

.quick-tags-label {
  color: var(--muted);
  font-size: .92rem
}

.booru-pill,
.meta-chip,
.tag,
.tag-chip {
  border: 1px solid var(--border);
  background: rgb(255 255 255 / .06);
  color: var(--text);
  border-radius: 999px
}

.tag {
  padding: 9px 13px;
  transition: var(--trans-fast)
}

.custom-select-compact {
  min-width: 160px
}

.tag-chip:hover,
.tag:hover {
  border-color: rgba(var(--accent-rgb), .5)
}

.meta-chip i,
.overlay-caption-icon,
.quick-tags-label i,
.rail-btn i,
.tag i,
.tags-dropdown summary i,
.topic-chip i {
  font-size: .86rem;
  opacity: .92
}

.booru-pill,
.meta-chip {
  white-space: nowrap;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: inline-flex;
  align-items: center;
  gap: 6px
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 16px 30px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .02)
}

.media-bottombar,
.media-topbar {
  position: absolute;
  left: 12px;
  right: 12px
}

.card:hover {
  border-color: rgba(var(--accent-rgb), .55);
  box-shadow: 0 22px 42px rgba(0, 0, 0, .52)
}

.media-wrap {
  background: rgba(7, 10, 18, .85);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .02)
}

.media-topbar {
  position: absolute;
  display: flex;
  gap: 6px;
  align-items: center;
  pointer-events: none;
  z-index: 6
}

.media-actions {
  display: flex;
  flex-wrap: wrap;
  pointer-events: auto
}

.action-btn,
.booru-pill {
  display: inline-flex;
  align-items: center;
  letter-spacing: .02em
}

.action-btn {
  gap: 6px;
  color: #fff;
  transition: transform .12s, background .12s;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .22)
}

.action-btn:hover {
  transform: translateY(-1px);
  background: rgba(20, 28, 42, .95)
}

.action-btn i {
  font-size: .8rem
}

.action-btn-report {
  border-color: rgba(255, 255, 255, .3)
}

.action-btn-view {
  border-color: rgba(255, 255, 255, .25)
}

.action-btn-admin {
  background: rgba(170, 45, 65, .95);
  border-color: rgba(255, 200, 200, .3)
}

.media-bottombar {
  background: rgba(5, 9, 17, .86);
  backdrop-filter: blur(8px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .22)
}

.card-footer h2,
.post-card-title a:hover {
  color: #fff
}

.card-footer p {
  color: rgba(255, 255, 255, .72)
}

.booru-pill {
  pointer-events: auto;
  padding: 0 12px;
  backdrop-filter: blur(12px);
  color: #eef4ff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgb(0 0 0 / .2)
}

.media-corner-badge,
.meta-chip {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 700
}

.media-corner-badge {
  position: absolute;
  gap: 6px;
  padding: 0 10px;
  backdrop-filter: blur(12px);
  color: #f4f7fb
}

.media-corner-badge-duration {
  right: 14px
}

.media-corner-badge-rating {
  left: 14px;
  color: #ffd6d6
}

.media-bottombar {
  position: absolute;
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgb(0 0 0 / .22), inset 0 1px 0 rgb(255 255 255 / .04)
}

.meta-chip {
  gap: 7px;
  padding: 0 12px;
  color: #f3f7fd
}

.meta-chip i {
  opacity: .9
}

.media-wrap:hover {
  transform: translateY(-2px);
  transition: transform .18s, box-shadow .18s;
  box-shadow: 0 24px 48px rgb(0 0 0 / .38), inset 0 1px 0 rgb(255 255 255 / .05)
}

@media (max-width:480px) {
  .media-topbar {
    top: 10px;
    left: 10px;
    right: 10px
  }

  .media-bottombar {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 10px 12px
  }

  .action-btn {
    height: 34px;
    padding: 0 12px;
    font-size: 13px
  }

  .booru-pill,
  .media-corner-badge,
  .meta-chip {
    font-size: 12px
  }

  .media-corner-badge-duration,
  .media-corner-badge-rating {
    bottom: 66px
  }
}

.admin-list,
.tags-dropdown {
  display: grid;
  gap: 10px
}

.tags-dropdown summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgb(255 255 255 / .92);
  font-weight: 600;
  transition: var(--trans-fast)
}

#loader,
.chev,
.modal-head p,
.nsfw-card p {
  color: var(--muted)
}

.tags-dropdown summary:hover {
  border-color: rgba(var(--accent-rgb), .35)
}

.tags-dropdown[open] summary {
  border-color: rgba(var(--accent-rgb), .45);
  background: linear-gradient(180deg, rgb(255 255 255 / .08), rgb(255 255 255 / .04));
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px
}

.tags-dropdown summary::-webkit-details-marker {
  display: none
}

.chev {
  transition: transform var(--trans-fast)
}

.auth-tab,
.nsfw-leave-btn,
.tag-chip {
  transition: var(--trans-fast)
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  margin-top: -2px;
  padding: 2px 2px 0;
  animation: 180ms fadeSlideIn
}

.empty-state,
.status-card {
  grid-column: 1/-1;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: rgb(255 255 255 / .04);
  color: var(--muted);
  text-align: center;
  padding: 42px 18px
}

#loader {
  margin-top: 20px;
  padding: 12px
}

#overlay,
.app-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgb(4 6 10 / .92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px)
}

#overlay-content {
  position: relative;
  width: min(1180px, 100%);
  max-height: 100%;
  display: grid;
  gap: 14px
}

#overlay-close,
.modal-close,
.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid;
  color: #fff;
  background: rgb(0 0 0 / .46);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: var(--trans-fast)
}

#overlay-close,
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px
}

#overlay-close {
  z-index: 3;
  width: 48px;
  height: 48px;
  font-size: 1.3rem
}

.modal-close {
  width: 42px;
  height: 42px;
  font-size: 1rem
}

.modal-card,
.overlay-stage {
  position: relative;
  overflow: hidden
}

#overlay-close:hover,
.modal-close:hover,
.nav-btn:hover {
  background: rgb(255 255 255 / .14);
  border-color: rgba(var(--accent-rgb), .5)
}

.overlay-stage {
  background: rgb(255 255 255 / .03);
  border: 1px solid;
  box-shadow: var(--shadow);
  padding: 18px;
  min-height: 280px
}

#overlay-media img,
#overlay-media video {
  max-width: 100%;
  max-height: 76vh;
  width: 100%;
  object-fit: contain;
  border-radius: 18px;
  margin: 0 auto;
  background: rgb(255 255 255 / .02)
}

.overlay-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 0 4px
}

#overlay-caption {
  color: rgb(255 255 255 / .92);
  font-size: .96rem
}

.overlay-nav {
  display: flex;
  gap: 10px
}

.nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 1rem
}

.modal-card {
  box-shadow: 0 24px 60px rgb(0 0 0 / .42)
}

.modal-head h2 {
  margin: 0 0 6px;
  font-size: 1.18rem
}

.modal-head p {
  margin: 0 0 18px;
  font-size: .92rem
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px
}

.auth-tab {
  flex: 1;
  min-height: 42px;
  border-radius: 14px;
  border: 1px solid;
  background: rgb(255 255 255 / .05);
  color: var(--text)
}

.auth-tab.active,
.auth-tab:hover {
  background: rgb(255 255 255 / .1);
  border-color: rgba(var(--accent-rgb), .45)
}

.auth-form {
  display: grid;
  gap: 12px
}

.admin-user,
.nsfw-notice.show {
  display: flex
}

.auth-input {
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid;
  background: rgb(255 255 255 / .06);
  color: var(--text);
  padding: 0 14px;
  outline: 0
}

.auth-input::placeholder {
  color: rgb(255 255 255 / .42)
}

.auth-message {
  min-height: 22px;
  font-size: .9rem;
  color: #ffb6b6;
  margin-bottom: 8px
}

.auth-message.success {
  color: #9af1b7
}

.admin-user {
  border: 1px solid;
  border-radius: 16px;
  background: rgb(255 255 255 / .05);
  padding: 12px;
  justify-content: space-between;
  gap: 12px;
  align-items: center
}

.nsfw-notice {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgb(4 6 10 / .88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px)
}

.nsfw-card {
  width: min(560px, 100%);
  border-radius: 28px;
  border: 1px solid;
  background: linear-gradient(180deg, rgb(20 24 32 / .98), rgb(13 16 22 / .98));
  box-shadow: 0 28px 70px rgb(0 0 0 / .5);
  padding: 26px
}

.nsfw-badge,
.nsfw-leave-btn {
  background: rgb(255 255 255 / .06);
  color: var(--text)
}

.nsfw-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid;
  margin-bottom: 16px
}

.nsfw-card h2 {
  margin: 0 0 12px;
  font-size: 1.5rem
}

.nsfw-card p {
  margin: 0 0 12px;
  line-height: 1.65
}

.nsfw-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px
}

.nsfw-check,
.nsfw-leave-btn {
  display: inline-flex;
  align-items: center
}

.nsfw-leave-btn {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid;
  justify-content: center;
  text-decoration: none
}

.footer-brand,
.nsfw-check {
  color: var(--muted);
  font-size: .92rem
}

.nsfw-check {
  margin-top: 16px;
  gap: 10px
}

.nsfw-check input {
  accent-color: var(--accent)
}

.site-footer {
  position: sticky;
  bottom: 0;
  z-index: 1
}

.footer-inner {
  width: min(var(--max-width), calc(100% - 28px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px
}

.footer-brand strong {
  color: var(--text);
  font-size: .98rem
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap
}

.footer-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: .92rem;
  transition: color var(--trans-fast), opacity var(--trans-fast)
}

.footer-nav a:hover {
  color: var(--text)
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0
}

.custom-select {
  position: relative;
  min-width: 0;
  user-select: none
}

.topbar-right .custom-select {
  width: auto;
  min-width: 160px;
  flex: 0 0 auto
}

.field.custom-select,
.home-blog-card-image-link {
  display: block
}

.custom-select-native {
  display: none
}

.custom-select-trigger {
  position: relative;
  width: 100%;
  min-height: 48px;
  padding: 0 46px 0 16px;
  border: 0;
  background: #fff0;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: none;
  transition: background var(--trans-fast), transform var(--trans-fast);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px)
}

.custom-select-trigger:hover {
  background: linear-gradient(180deg, rgb(255 255 255 / .04), rgb(255 255 255 / .02))
}

.custom-select-value {
  min-width: 0;
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: .96rem;
  font-weight: 500;
  color: var(--text)
}

.custom-select-placeholder {
  color: rgb(245 247 251 / .52)
}

.custom-select-arrow {
  position: absolute;
  right: 15px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted);
  transition: transform var(--trans-fast), color var(--trans-fast)
}

.custom-select-arrow::after,
.custom-select-arrow::before {
  content: "";
  position: absolute;
  top: 8px;
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: currentColor
}

.custom-select-arrow::before {
  left: 2px;
  transform: rotate(45deg);
  transform-origin: left center
}

.custom-select-arrow::after {
  right: 2px;
  transform: rotate(-45deg);
  transform-origin: right center
}

.custom-select.open .custom-select-arrow {
  transform: translateY(-50%) rotate(180deg);
  color: var(--text)
}

.custom-select-menu {
  position: fixed;
  z-index: 10000;
  display: grid;
  gap: 6px;
  padding: 8px;
  max-height: min(320px, calc(100vh - 24px));
  overflow: auto;
  border: 1px solid;
  background: linear-gradient(180deg, rgb(18 24 34 / .98), rgb(10 14 20 / .98));
  box-shadow: 0 24px 60px rgb(0 0 0 / .42), 0 0 0 1px rgb(255 255 255 / .02) inset;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px) scale(.985);
  transform-origin: top center;
  transition: opacity 160ms, transform 180ms, visibility 180ms
}

.custom-select.open .custom-select-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1)
}

.custom-select-menu::-webkit-scrollbar {
  width: 10px
}

.custom-select-menu::-webkit-scrollbar-track {
  background: #fff0
}

.custom-select-menu::-webkit-scrollbar-thumb {
  background: rgb(255 255 255 / .12);
  border-radius: 999px;
  border: 2px solid #fff0;
  background-clip: padding-box
}

.custom-select-menu::-webkit-scrollbar-thumb:hover {
  background: rgb(255 255 255 / .2);
  border: 2px solid #fff0;
  background-clip: padding-box
}

.custom-select-option {
  padding: 0 14px;
  border: 1px solid #fff0;
  background: #fff0;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background var(--trans-fast), border-color var(--trans-fast), transform var(--trans-fast), color var(--trans-fast);
  font-size: .95rem;
  line-height: 1.2
}

.custom-select-option:hover {
  background: rgb(255 255 255 / .07);
  border-color: rgba(var(--accent-rgb), .22);
  transform: translateY(-1px)
}

.custom-select-option.is-focused {
  background: rgb(255 255 255 / .08);
  border-color: rgba(var(--accent-rgb), .3)
}

.custom-select-option.is-selected {
  background: linear-gradient(180deg, rgba(var(--accent-rgb), .22), rgba(var(--accent-rgb), .12));
  border-color: rgba(var(--accent-rgb), .5);
  color: #fff
}

.custom-select-option.is-selected::after {
  content: "✓";
  margin-left: auto;
  font-size: .9rem;
  font-weight: 800;
  color: rgb(255 255 255 / .96)
}

.custom-select.open .custom-select-menu::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgb(255 255 255 / .03) inset, 0 0 40px rgba(var(--accent-rgb), .08)
}

.post-card-inner {
  display: flex;
  flex-direction: column;
  gap: 12px
}

@media (max-width:1120px) {
  .feed-shell {
    grid-template-columns: 1fr
  }

  .feed-rail {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
}

@media (max-width:820px) {

  .ad-card[data-size=banner] .ad-inner,
  .ad-card[data-size=feed] .ad-inner,
  .ad-inner {
    grid-template-columns: 1fr;
    align-items: start
  }

  .ad-cta {
    justify-self: start
  }
}

@media (max-width:760px) {
  .feed-rail {
    grid-template-columns: 1fr
  }
}

.admin-layout,
.form-grid,
.user-edit-form {
  grid-template-columns: repeat(2, minmax(0, 1fr))
}

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / .75);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px)
}

.modal-card {
  width: min(520px, 92vw);
  background: #171a21;
  border: 1px solid #2b3140;
  padding: 20px;
  color: #fff;
  box-shadow: 0 20px 60px rgb(0 0 0 / .6)
}

.modal-title {
  margin: 0 0 14px;
  font-size: 20px
}

.form-group {
  margin-bottom: 14px
}

.form-group label {
  font-size: 14px;
  opacity: .9
}

.form-input {
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #2b3140;
  background: #0f1218;
  color: #fff;
  font-size: 14px
}

.btn-primary,
.btn-secondary {
  padding: 10px 16px;
  cursor: pointer
}

textarea.form-input {
  min-height: 110px;
  resize: vertical
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px
}

.btn-primary {
  background: #3b82f6;
  border: none;
  border-radius: 8px
}

.btn-primary:hover {
  background: #2563eb
}

.btn-secondary {
  border-radius: 8px
}

.btn-secondary:hover {
  background: #3a4050
}

.admin-body {
  background: radial-gradient(circle at top left, rgb(88 101 242 / .18), transparent 30%), linear-gradient(180deg, #0b1020 0, #0f1117 100%);
  color: #e8ecf1;
  min-height: 100vh
}

.admin-shell {
  max-width: 1480px;
  margin: 0 auto;
  padding: 32px 20px 48px
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 28px;
  padding: 24px;
  border: 1px solid;
  background: rgb(17 20 28 / .85);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgb(0 0 0 / .25);
  backdrop-filter: blur(8px)
}

.admin-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: .14em;
  color: #8f9bb3
}

.admin-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1
}

.admin-subtitle {
  margin: 10px 0 0;
  color: #b7c0d1
}

.admin-topbar-actions,
.panel-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap
}

.admin-layout {
  display: grid;
  gap: 20px
}

.admin-list,
.item-head,
.panel-header {
  gap: 14px;
  display: flex
}

.admin-panel {
  background: rgb(17 20 28 / .88);
  border: 1px solid;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 12px 35px rgb(0 0 0 / .22)
}

.panel-header {
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px
}

.panel-header h2 {
  margin: 0;
  font-size: 22px
}

.panel-header p {
  margin: 6px 0 0;
  color: #97a1b3;
  font-size: 14px
}

.admin-list {
  flex-direction: column;
  max-height: 620px;
  overflow: auto;
  padding-right: 4px
}

.admin-card-item {
  border: 1px solid;
  background: linear-gradient(180deg, rgb(255 255 255 / .03), rgb(255 255 255 / .015));
  border-radius: 16px;
  padding: 16px
}

.item-head {
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px
}

.item-head h3 {
  margin: 0;
  font-size: 18px
}

.item-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #9aa4b6;
  font-size: 13px
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px
}

.badge,
.post-meta {
  align-items: center
}

.badge {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgb(255 255 255 / .08);
  color: #dce3ef;
  font-size: 12px;
  border: 1px solid
}

.badge-accent {
  background: rgb(88 101 242 / .22);
  border-color: rgb(88 101 242 / .4);
  color: #d8ddff
}

.badge-warn {
  background: rgb(255 193 7 / .18);
  border-color: rgb(255 193 7 / .3);
  color: #ffe7a3
}

.form-grid,
.user-edit-form {
  display: grid;
  gap: 12px
}

.stack-form label,
.user-edit-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #b7c0d1
}

.input,
.textarea {
  width: 100%;
  border: 1px solid;
  background: #0c1018;
  color: #eef2f8;
  border-radius: 12px;
  padding: 11px 12px;
  outline: 0
}

.input:focus,
.textarea:focus {
  border-color: rgb(88 101 242 / .8);
  box-shadow: 0 0 0 3px rgb(88 101 242 / .15)
}

.textarea {
  resize: vertical;
  min-height: 90px
}

.form-actions,
.item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px
}

.btn {
  border: 0;
  padding: 10px 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s, opacity .15s, background .15s
}

.btn-primary {
  background: linear-gradient(180deg, #6675ff 0, #5563e6 100%);
  color: #fff
}

.btn-secondary {
  background: #1a2232;
  color: #e7edf8;
  border: 1px solid
}

.btn-danger {
  background: linear-gradient(180deg, #d9534f 0, #b43f3a 100%);
  color: #fff
}

.item-note {
  margin-top: 10px;
  color: #c4cada;
  line-height: 1.5;
  white-space: pre-wrap
}

.preview-thumb {
  display: block;
  width: 100%;
  max-width: 180px;
  max-height: 180px;
  object-fit: cover;
  border-radius: 14px;
  margin-top: 12px;
  border: 1px solid
}

.empty-state {
  border: 1px dashed;
  border-radius: 14px;
  padding: 18px;
  color: #8f98aa
}

.card-footer p,
.rail-title,
.subinfo {
  color: var(--text-faint)
}

@media (max-width:1100px) {

  .admin-layout,
  .topbar {
    grid-template-columns: 1fr
  }

  .topbar-right {
    justify-content: flex-start
  }

  .searchbar {
    grid-template-columns: minmax(0, 1fr) 1fr 1fr
  }

  .searchbar .btn {
    grid-column: 1/-1
  }

  .admin-panel-wide {
    grid-column: auto
  }
}

@media (max-width:720px) {

  .admin-topbar,
  .item-head,
  .panel-header {
    flex-direction: column
  }

  .form-grid,
  .user-edit-form {
    grid-template-columns: 1fr
  }

  .admin-shell {
    padding: 20px 14px 36px
  }
}

:root {
  --surface-1: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.065);
  --surface-3: rgba(255, 255, 255, 0.085);
  --border-soft: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text-soft: rgba(245, 247, 251, 0.78);
  --text-faint: rgba(245, 247, 251, 0.56);
  --radius-2xl: 28px;
  --radius-xl: 22px;
  --radius-lg: 16px;
  --max-width: 1840px;
  --rail-w: 320px;
  --grid-min: 320px;
  --header-h: 88px;
  --panel-bg: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .028));
  --panel-stroke: rgba(255, 255, 255, .09);
  --card-bg: linear-gradient(180deg, rgba(11, 15, 24, .96), rgba(8, 11, 19, .94));
  --card-hover: rgba(var(--accent-rgb), .16);
  --chip-bg: rgba(255, 255, 255, .05);
  --chip-hover: rgba(255, 255, 255, .1)
}

main {
  padding: 24px 0 56px
}

.feed-shell {
  gap: 26px
}

.app-header {
  background: linear-gradient(to bottom, rgba(8, 12, 18, .9), rgba(8, 12, 18, .72));
  border-bottom: 1px solid var(--border-soft);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .18)
}

.admin-action-btn,
.auth-btn,
.auth-pill,
.booru-pill,
.brand-mark,
.custom-select-trigger,
.field,
.meta-chip,
.rail-btn,
.search-field,
.tag,
.tag-chip,
.topic-chip {
  border-color: var(--border-soft)
}

.brand-text h1 {
  letter-spacing: -.03em
}

.custom-select-trigger:focus-visible,
.field:focus-within,
.search-field:focus-within {
  border-color: rgba(var(--accent-rgb), .55);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .1), var(--shadow-soft)
}

.btn,
.discord-bot-btn {
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(var(--accent-rgb), .2), 0 8px 18px rgba(0, 0, 0, .22)
}

.rail-card,
.seo-copy {
  border: 1px solid var(--border-soft)
}

.btn:hover,
.discord-bot-btn:hover {
  transform: translateY(-2px)
}

.rail-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .028));
  box-shadow: 0 10px 28px rgba(0, 0, 0, .2)
}

.rail-title {
  letter-spacing: .08em
}

.rail-btn.active,
.rail-btn:hover {
  background: rgba(255, 255, 255, .085);
  border-color: rgba(var(--accent-rgb), .26)
}

.seo-intro {
  grid-column: 1/-1;
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 0
}

.seo-copy {
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .03));
  box-shadow: 0 18px 40px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px)
}

.seo-copy h1 {
  letter-spacing: -.04em
}

.seo-copy p {
  color: var(--text-soft)
}

.seo-copy nav {
  margin-top: 14px;
  color: var(--text-faint)
}

.card-title a:hover,
.home-blog-card-title a:hover,
.seo-copy nav a {
  color: #b7d6ff
}

.seo-copy nav a:hover {
  color: #d6e8ff;
  text-decoration: none
}

.feed-title {
  color: var(--text-faint);
  font-size: .96rem
}

.meta-row,
.rail-actions {
  gap: 10px
}

.meta-chip {
  font-weight: 650
}

.pagination-link,
.read-more {
  font-weight: 700;
  text-decoration: none
}

.topic-chip {
  border-radius: 999px;
  background: rgba(255, 255, 255, .045)
}

.topic-chip.active,
.topic-chip:hover {
  background: rgba(255, 255, 255, .095);
  border-color: rgba(var(--accent-rgb), .28)
}

.card {
  background: linear-gradient(180deg, rgba(10, 14, 22, .95), rgba(8, 11, 20, .92));
  box-shadow: 0 18px 40px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .03)
}

.card:hover {
  border-color: rgba(var(--accent-rgb), .35);
  box-shadow: 0 26px 50px rgba(0, 0, 0, .38), 0 0 32px rgba(var(--accent-rgb), .12)
}

.media-wrap {
  box-shadow: 0 14px 30px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .04)
}

.card-media {
  aspect-ratio: 16/11
}

.action-btn,
.booru-pill,
.media-corner-badge,
.meta-chip {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px)
}

.card-footer h2 {
  letter-spacing: -.015em
}

.tags-dropdown summary:hover {
  background: rgba(255, 255, 255, .07)
}

.quick-tags .tag,
.tag-chip {
  min-height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .045)
}

.quick-tags .tag:hover,
.tag-chip:hover {
  background: rgba(255, 255, 255, .085);
  border-color: rgba(var(--accent-rgb), .18);
  transform: translateY(-1px)
}

#overlay-content,
.modal-card,
.overlay-stage {
  border-radius: 24px
}

.modal-card {
  border-color: rgba(255, 255, 255, .1)
}

#overlay {
  background: rgba(4, 6, 10, .9)
}

@media (max-width:1120px) {
  .feed-shell {
    gap: 20px
  }

  .seo-copy {
    width: 100%
  }
}

@media (max-width:680px) {
  .header-toggle {
    right: 14px;
    bottom: 14px;
    width: 48px;
    height: 48px
  }

  .footer-inner,
  .header-inner,
  main {
    width: min(var(--max-width), calc(100% - 18px))
  }

  .grid,
  .searchbar {
    grid-template-columns: 1fr
  }

  #overlay,
  .app-modal,
  .overlay-stage {
    padding: 12px
  }

  .overlay-bottom {
    align-items: stretch
  }

  .topbar-right {
    justify-content: flex-start
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column
  }

  .footer-nav {
    gap: 10px 14px
  }

  .searchbar .btn {
    grid-column: auto
  }

  .custom-select-trigger {
    min-height: 46px;
    border-radius: 16px
  }

  .custom-select-menu {
    border-radius: 18px;
    max-height: 280px
  }

  .custom-select-option {
    min-height: 42px
  }

  .seo-copy {
    padding: 18px 16px;
    border-radius: 20px
  }

  .seo-copy h1 {
    font-size: 1.7rem
  }

  .card {
    border-radius: 22px
  }

  .media-wrap {
    border-radius: 20px
  }

  .rail-card {
    border-radius: 18px
  }
}

.hero-card h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -.03em
}

.hero-card p:last-child {
  margin: 0;
  color: var(--soft);
  font-size: 1.05rem;
  line-height: 1.75
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px
}

.post-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .04));
  box-shadow: var(--shadow);
  transition: transform 180ms, border-color 180ms
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, .2)
}

.post-image-link {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #11182c
}

.post-image {
  width: 100%;
  height: 100%;
  object-fit: cover
}

.post-card-content {
  padding: 18px
}

.post-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: .92rem
}

.meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .35)
}

.post-card-title {
  margin: 0 0 10px;
  font-size: 1.3rem;
  line-height: 1.2;
  letter-spacing: -.02em
}

.post-card-title a {
  text-decoration: none
}

.post-card-excerpt {
  margin: 0;
  color: var(--soft);
  line-height: 1.7
}

.post-card-actions {
  margin-top: 16px
}

.read-more {
  display: inline-flex;
  align-items: center;
  color: #cdb8ff
}

.read-more:hover {
  color: #e5dbff
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px
}

.pagination-link {
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--muted);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .04);
  transition: 160ms
}

.pagination-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, .08)
}

.pagination-link.active {
  color: #fff;
  background: rgba(139, 92, 246, .2);
  border-color: rgba(139, 92, 246, .4)
}

.card-drawer {
  margin-top: 0;
  border-top: 1px solid rgba(255, 255, 255, .06);
  background: linear-gradient(180deg, rgba(8, 11, 18, .72), rgba(7, 10, 17, .92))
}

@media (max-width:420px) {
  .action-btn {
    padding: 0 8px;
    font-size: 11px
  }

  .action-btn span {
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis
  }
}

.media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%
}

.action-btn {
  font-size: 12px;
  gap: 5px
}

.action-btn span {
  white-space: nowrap
}

.post-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%
}

.media-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/11
}

.card-drawer summary {
  list-style: none
}

.card-drawer summary::-webkit-details-marker {
  display: none
}

.card-drawer-summary {
  min-height: 52px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  color: rgba(255, 255, 255, .92);
  user-select: none;
  transition: background .18s
}

.card-drawer-summary:hover {
  background: rgba(255, 255, 255, .04)
}

.card-drawer-label,
.card-drawer-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px
}

.card-drawer-meta {
  color: var(--muted);
  font-size: .88rem
}

.card-drawer .chev {
  transition: transform .18s
}

.card-drawer-body {
  padding: 0 14px 14px;
  display: grid;
  gap: 12px;
  animation: 180ms fadeSlideIn
}

.card-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px
}

.card-footer {
  background: 0 0;
  display: grid;
  gap: 10px
}

.card-title {
  margin: 0;
  font-size: .98rem;
  line-height: 1.38
}

.card-title a,
.home-blog-card-title a {
  color: var(--text);
  text-decoration: none
}

.card-description {
  margin: 0;
  color: rgba(255, 255, 255, .68);
  font-size: .9rem;
  line-height: 1.55
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px
}

.card:hover .media-wrap img,
.card:hover .media-wrap video {
  transform: scale(1.03)
}

@media (max-width:640px) {
  .sidebar-nav {
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px
  }

  .nav-item {
    white-space: nowrap
  }

  .post-grid {
    grid-template-columns: 1fr
  }
}

.home-blog-preview {
  margin: 0 0 26px;
  display: grid;
  gap: 14px
}

.home-blog-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap
}

.home-blog-preview-head h2 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -.02em
}

.home-blog-preview-link {
  color: var(--text);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .04);
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  transition: var(--trans-fast)
}

.home-blog-preview-link:hover {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(var(--accent-rgb), .3)
}

.home-blog-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px
}

.home-blog-card {
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(11, 15, 24, .96), rgba(8, 11, 19, .94));
  box-shadow: 0 16px 34px rgba(0, 0, 0, .24)
}

.home-blog-card-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block
}

.home-blog-card-body {
  padding: 14px;
  display: grid;
  gap: 10px
}

.home-blog-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: .85rem
}

.home-blog-card-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4
}

.home-blog-card-excerpt {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: .92rem
}

@media (max-width:980px) {
  .home-blog-preview-grid {
    grid-template-columns: 1fr
  }
}

@media (max-width:768px) {
  .app-header .toolbar {
    max-height: 0;
    opacity: 0;
    margin-top: -8px;
    pointer-events: none;
    overflow: hidden
  }

  .app-header.mobile-open .toolbar {
    max-height: 520px;
    opacity: 1;
    margin-top: 0;
    pointer-events: auto;
    overflow: visible
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center
  }

  .topbar-right {
    display: none
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .06);
    color: var(--text);
    cursor: pointer;
    box-shadow: var(--shadow-soft)
  }

  .menu-toggle:hover {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(var(--accent-rgb), .34)
  }
}

.app-header.collapsed .toolbar {
  max-height: 0;
  opacity: 0;
  margin-top: -8px;
  pointer-events: none;
  overflow: hidden
}

@media (min-width:769px) {
  .menu-toggle {
    display: none
  }

  .topbar-right {
    display: flex
  }
}

.footer-inner,
.header-inner,
main {
  width: min(var(--max-width), calc(100% - 32px))
}

.app-header {
  border-bottom: 1px solid var(--panel-stroke);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .2)
}

.header-inner {
  padding: 12px 0 10px
}

.topbar {
  grid-template-columns: minmax(240px, auto) minmax(0, 1fr);
  gap: 18px;
  align-items: center
}

.brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 18px
}

.btn,
.custom-select-trigger,
.field,
.search-field {
  border-radius: 16px
}

.brand-text h1 {
  font-size: clamp(1.12rem, 1rem + .55vw, 1.42rem)
}

.subinfo {
  font-size: .88rem;
  opacity: .9
}

.topbar-right {
  gap: 12px
}

.toolbar {
  gap: 14px
}

.searchbar {
  grid-template-columns: minmax(0, 1fr) 160px 160px 140px;
  gap: 12px
}

.field,
.search-field {
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .035));
  border-color: var(--panel-stroke)
}

.btn {
  min-height: 48px
}

.feed-shell {
  grid-template-columns: minmax(0, 1fr) var(--rail-w);
  gap: 28px;
  align-items: start
}

.feed-main {
  align-items: stretch
}

.feed-head {
  gap: 18px;
  margin-bottom: 24px
}

.feed-topline {
  align-items: flex-end
}

.seo-intro {
  margin: 2px 0 24px
}

.seo-copy {
  width: min(100%, 1040px);
  padding: 26px 26px 22px;
  border-radius: 26px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-stroke);
  box-shadow: 0 20px 44px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .03)
}

.seo-copy h1 {
  font-size: clamp(1.9rem, 2.3vw, 2.7rem);
  line-height: 1.02;
  margin: 0 0 12px
}

.seo-copy p {
  max-width: 76ch;
  font-size: .98rem;
  line-height: 1.72
}

.chip-row {
  gap: 10px;
  padding-bottom: 4px
}

.booru-pill,
.meta-chip,
.quick-tags .tag,
.tag-chip,
.topic-chip {
  background: var(--chip-bg)
}

.topic-chip {
  min-height: 42px;
  padding: 0 16px
}

.quick-tags .tag:hover,
.tag-chip:hover,
.topic-chip.active,
.topic-chip:hover {
  background: var(--chip-hover)
}

.feed-rail {
  top: 104px;
  gap: 16px
}

.rail-card {
  padding: 18px;
  border-radius: 24px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-stroke);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .18)
}

.rail-title {
  font-size: .76rem;
  letter-spacing: .1em;
  margin-bottom: 12px
}

.rail-btn {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .045)
}

.grid {
  grid-template-columns: repeat(auto-fill, minmax(var(--grid-min), 1fr));
  gap: 22px
}

.card {
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: var(--card-bg);
  box-shadow: 0 18px 38px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .03);
  transition: transform .2s, border-color .2s, box-shadow .2s, background .2s
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(var(--accent-rgb), .32);
  box-shadow: 0 28px 54px rgba(0, 0, 0, .4), 0 0 0 1px rgba(var(--accent-rgb), .08), 0 0 34px var(--card-hover)
}

.post-card-inner {
  gap: 0
}

.media-wrap {
  border-radius: 22px 22px 18px 18px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(16, 22, 34, .92), rgba(9, 12, 21, .96));
  box-shadow: 0 16px 34px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .04)
}

.media-wrap img,
.media-wrap video {
  transition: transform .28s, filter .28s
}

.media-topbar {
  top: 12px;
  justify-content: space-between
}

.media-actions {
  gap: 8px
}

.action-btn {
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(8, 12, 20, .74);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .2)
}

.action-btn-view {
  background: rgba(15, 25, 40, .86)
}

.action-btn-report {
  background: linear-gradient(135deg, #f06292, #ff8ba7)
}

.action-btn:hover {
  transform: translateY(-1px) scale(1.01)
}

.booru-pill,
.media-corner-badge,
.meta-chip {
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(10, 16, 26, .7)
}

.media-bottombar {
  bottom: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(22, 31, 49, .8), rgba(13, 19, 31, .9));
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 14px 28px rgba(0, 0, 0, .24)
}

.card-footer,
.site-footer,
.tags-dropdown {
  border-top: 1px solid rgba(255, 255, 255, .06)
}

.media-corner-badge-duration,
.media-corner-badge-rating {
  bottom: 70px
}

.card-footer {
  padding: 15px 15px 17px;
  background: linear-gradient(180deg, rgba(9, 13, 21, .76), rgba(7, 10, 17, .92));
  gap: 12px
}

.card-footer h2 {
  font-size: 1rem;
  line-height: 1.35;
  margin: 0
}

.card-footer p {
  margin: 0;
  color: var(--text-faint);
  font-size: .92rem;
  line-height: 1.58;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden
}

.tags-dropdown {
  margin-top: 2px;
  padding-top: 12px
}

.tags-dropdown summary {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .07)
}

.tags-dropdown[open] .tags-list {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .025);
  border: 1px solid rgba(255, 255, 255, .06)
}

.tag-chip {
  min-height: 34px;
  padding: 0 12px;
  font-size: .8rem
}

.pagination {
  padding: 24px 0 8px
}

.pagination a {
  min-height: 42px;
  padding: 0 16px;
  background: rgba(255, 255, 255, .04)
}

.site-footer {
  margin-top: 64px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(255, 255, 255, .01))
}

.footer-inner {
  min-height: 84px;
  padding: 20px 0
}

.custom-select-menu {
  border-radius: 18px
}

.custom-select-option {
  min-height: 42px;
  border-radius: 12px
}

@media (max-width:1180px) {
  :root {
    --rail-w: 290px;
    --grid-min: 300px
  }

  .feed-shell {
    grid-template-columns: minmax(0, 1fr) 290px
  }
}

@media (max-width:1080px) {
  .feed-shell {
    grid-template-columns: 1fr
  }

  .feed-rail {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }

  .seo-copy {
    width: 100%
  }
}

@media (max-width:860px) {
  .topbar {
    grid-template-columns: 1fr;
    align-items: start
  }

  .topbar-right {
    justify-content: flex-start
  }

  .searchbar {
    grid-template-columns: 1fr 1fr
  }

  .searchbar .btn,
  .searchbar .search-field {
    grid-column: 1/-1
  }

  .feed-rail {
    grid-template-columns: 1fr
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr))
  }
}

@media (max-width:680px) {

  .footer-inner,
  .header-inner,
  main {
    width: min(var(--max-width), calc(100% - 18px))
  }

  .header-inner {
    padding: 10px 0
  }

  .brand-mark {
    width: 50px;
    height: 50px;
    border-radius: 16px
  }

  .brand-text h1 {
    font-size: 1.05rem
  }

  .grid,
  .searchbar {
    grid-template-columns: 1fr
  }

  .card {
    border-radius: 20px
  }

  .media-wrap {
    border-radius: 18px 18px 16px 16px
  }

  .card-footer {
    padding: 14px 13px 16px
  }

  .seo-copy {
    padding: 18px 16px;
    border-radius: 20px
  }

  .seo-copy h1 {
    font-size: 1.65rem
  }

  .feed-head {
    margin-bottom: 18px
  }

  .media-corner-badge-duration,
  .media-corner-badge-rating {
    bottom: 66px
  }
}