:root {
  color-scheme: dark;
  --sidebar-width: 248px;
  --page-pad-x: clamp(16px, 2vw, 28px);
  --topbar-height: clamp(64px, 5.4vw, 74px);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --wrapped-card-width: 1800px;
  --wrapped-card-height: 1125px;
  --bg-deep: #050916;
  --bg-mid: #071025;
  --bg-end: #030813;
  --surface-rgb: 8 14 31;
  --surface-2-rgb: 16 24 50;
  --surface-3-rgb: 12 18 38;
  --surface-solid-rgb: 16 23 34;
  --surface-deep-rgb: 5 8 19;
  --surface-code-rgb: 32 36 44;
  --bg: #050b1a;
  --panel: rgb(var(--surface-3-rgb) / 0.76);
  --panel-2: rgb(var(--surface-2-rgb) / 0.82);
  --panel-3: rgb(var(--surface-2-rgb) / 0.9);
  --text: #f7f8ff;
  --muted: #9ba8c7;
  --soft: #d7dcef;
  --line: rgb(var(--accent-soft-rgb) / 0.18);
  --accent: #ff3f8d;
  --accent-2: #a855f7;
  --hot: #ff5aa5;
  --accent-rgb: 255 63 141;
  --accent-soft-rgb: 255 105 180;
  --accent-strong-rgb: 255 193 223;
  --accent-2-rgb: 168 85 247;
  --status-watching-rgb: 56 189 248;
  --status-watching-soft-rgb: 125 211 252;
  --status-completed-rgb: 34 197 94;
  --status-completed-soft-rgb: 134 239 172;
  --status-planning-rgb: 234 179 8;
  --status-planning-soft-rgb: 251 191 36;
  --status-dropped-rgb: 239 68 68;
  --status-dropped-soft-rgb: 251 113 133;
  --status-paused-rgb: 148 163 184;
  --status-paused-soft-rgb: 203 213 225;
  --gold: #fbbf24;
  --ok: #86efac;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
  --glow: 0 0 26px rgb(var(--accent-rgb) / 0.34);
  --glass: rgb(var(--surface-rgb) / 0.72);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
  min-height: 100%;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 22% 0%, rgb(var(--accent-rgb) / 0.18), transparent 32%),
    radial-gradient(circle at 88% 8%, rgb(var(--accent-2-rgb) / 0.13), transparent 34%),
    linear-gradient(135deg, var(--bg-deep) 0%, var(--bg-mid) 48%, var(--bg-end) 100%),
    var(--bg-deep);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html.standalone-app,
html.ios-device {
  overscroll-behavior: none;
  background:
    radial-gradient(circle at 22% 0%, rgb(var(--accent-rgb) / 0.18), transparent 32%),
    radial-gradient(circle at 88% 8%, rgb(var(--accent-2-rgb) / 0.13), transparent 34%),
    linear-gradient(135deg, var(--bg-deep) 0%, var(--bg-mid) 48%, var(--bg-end) 100%),
    var(--bg-deep);
}

html.ios-device body {
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

html.touch-device button,
html.touch-device a,
html.touch-device input,
html.touch-device select,
html.touch-device textarea,
html.touch-device [role="button"] {
  -webkit-tap-highlight-color: transparent;
}

html.touch-device input,
html.touch-device select,
html.touch-device textarea {
  font-size: max(16px, 1rem);
}

[hidden] {
  display: none !important;
}

:root[data-theme="blue"],
body[data-theme="blue"] {
  --bg-deep: #031020;
  --bg-mid: #062341;
  --bg-end: #020817;
  --surface-rgb: 4 18 38;
  --surface-2-rgb: 9 34 68;
  --surface-3-rgb: 7 26 54;
  --surface-solid-rgb: 8 25 49;
  --surface-deep-rgb: 3 10 24;
  --surface-code-rgb: 13 35 58;
  --accent: #38bdf8;
  --accent-2: #6366f1;
  --hot: #67e8f9;
  --accent-rgb: 56 189 248;
  --accent-soft-rgb: 125 211 252;
  --accent-strong-rgb: 186 230 253;
  --accent-2-rgb: 99 102 241;
  --glow: 0 0 26px rgb(var(--accent-rgb) / 0.34);
}

:root[data-theme="green"],
body[data-theme="green"] {
  --bg-deep: #031412;
  --bg-mid: #062820;
  --bg-end: #020b0a;
  --surface-rgb: 4 22 20;
  --surface-2-rgb: 8 42 34;
  --surface-3-rgb: 7 31 28;
  --surface-solid-rgb: 8 31 28;
  --surface-deep-rgb: 3 12 11;
  --surface-code-rgb: 13 42 35;
  --accent: #34d399;
  --accent-2: #22c55e;
  --hot: #86efac;
  --accent-rgb: 52 211 153;
  --accent-soft-rgb: 134 239 172;
  --accent-strong-rgb: 187 247 208;
  --accent-2-rgb: 34 197 94;
  --glow: 0 0 26px rgb(var(--accent-rgb) / 0.3);
}

:root[data-theme="gold"],
body[data-theme="gold"] {
  --bg-deep: #170e04;
  --bg-mid: #2a1906;
  --bg-end: #0e0802;
  --surface-rgb: 28 18 7;
  --surface-2-rgb: 50 31 10;
  --surface-3-rgb: 40 26 10;
  --surface-solid-rgb: 35 24 11;
  --surface-deep-rgb: 15 9 3;
  --surface-code-rgb: 55 38 18;
  --accent: #f59e0b;
  --accent-2: #f97316;
  --hot: #fbbf24;
  --accent-rgb: 245 158 11;
  --accent-soft-rgb: 251 191 36;
  --accent-strong-rgb: 253 230 138;
  --accent-2-rgb: 249 115 22;
  --glow: 0 0 26px rgb(var(--accent-rgb) / 0.32);
}

:root[data-theme="red"],
body[data-theme="red"] {
  --bg-deep: #170509;
  --bg-mid: #2a0710;
  --bg-end: #0c0306;
  --surface-rgb: 30 8 14;
  --surface-2-rgb: 57 13 23;
  --surface-3-rgb: 45 12 20;
  --surface-solid-rgb: 38 12 18;
  --surface-deep-rgb: 15 3 7;
  --surface-code-rgb: 54 20 26;
  --accent: #ef4444;
  --accent-2: #fb7185;
  --hot: #f87171;
  --accent-rgb: 239 68 68;
  --accent-soft-rgb: 248 113 113;
  --accent-strong-rgb: 254 202 202;
  --accent-2-rgb: 251 113 133;
  --glow: 0 0 26px rgb(var(--accent-rgb) / 0.32);
}

:root[data-theme="mono"],
body[data-theme="mono"] {
  --bg-deep: #060a12;
  --bg-mid: #111827;
  --bg-end: #020617;
  --surface-rgb: 15 23 42;
  --surface-2-rgb: 30 41 59;
  --surface-3-rgb: 24 34 50;
  --surface-solid-rgb: 20 30 44;
  --surface-deep-rgb: 3 7 18;
  --surface-code-rgb: 34 42 55;
  --accent: #cbd5e1;
  --accent-2: #64748b;
  --hot: #e2e8f0;
  --accent-rgb: 203 213 225;
  --accent-soft-rgb: 226 232 240;
  --accent-strong-rgb: 241 245 249;
  --accent-2-rgb: 100 116 139;
  --glow: 0 0 24px rgb(var(--accent-rgb) / 0.22);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  min-height: 100dvh;
  overflow-x: hidden;
  background-color: var(--bg-deep);
  background:
    radial-gradient(circle at 22% 0%, rgb(var(--accent-rgb) / 0.18), transparent 32%),
    radial-gradient(circle at 88% 8%, rgb(var(--accent-2-rgb) / 0.13), transparent 34%),
    linear-gradient(135deg, var(--bg-deep) 0%, var(--bg-mid) 48%, var(--bg-end) 100%),
    var(--bg-deep);
  color: var(--text);
}

html {
  overscroll-behavior-y: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 14px;
}

body {
  overflow-x: hidden;
  background-attachment: fixed;
  overscroll-behavior: none;
  touch-action: pan-y;
  isolation: isolate;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 0%, rgb(var(--accent-rgb) / 0.18), transparent 32%),
    radial-gradient(circle at 88% 8%, rgb(var(--accent-2-rgb) / 0.13), transparent 34%),
    linear-gradient(135deg, var(--bg-deep) 0%, var(--bg-mid) 48%, var(--bg-end) 100%),
    var(--bg-deep);
}

#app {
  width: 100%;
  max-width: 100%;
  min-height: 100dvh;
  overflow-x: clip;
  background:
    radial-gradient(circle at 22% 0%, rgb(var(--accent-rgb) / 0.14), transparent 32%),
    radial-gradient(circle at 88% 8%, rgb(var(--accent-2-rgb) / 0.1), transparent 34%),
    linear-gradient(135deg, var(--bg-deep) 0%, var(--bg-mid) 48%, var(--bg-end) 100%),
    var(--bg-deep);
}

html.standalone-app body {
  background-attachment: scroll;
}

body.modal-open {
  overflow: hidden;
}

@media (hover: none) and (pointer: coarse) {
  html,
  body,
  #app,
  .app-shell,
  .main,
  .content {
    touch-action: pan-y;
  }

  .continue-rail,
  .discover-rail,
  .home-trending-panel,
  [data-horizontal-drag],
  [data-discover-rail] {
    touch-action: pan-x pan-y;
  }

  body:not(.modal-open):not(.mobile-nav-open):not(.chat-popup-open) {
    overflow-y: auto;
  }
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.boot,
.setup-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(180deg, rgb(var(--accent-rgb) / 0.14), transparent 36%),
    var(--bg);
}

.boot {
  gap: 12px;
  align-content: center;
  color: var(--muted);
  text-align: center;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #071018;
  font-weight: 900;
  box-shadow: var(--shadow);
}

.brand-logo {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.boot-logo {
  width: 124px;
  height: 124px;
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.38));
  animation: logo-pulse 1.7s ease-in-out infinite;
}

.loading-logo {
  width: 104px;
  height: 104px;
  margin-bottom: 12px;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.34));
  animation: logo-pulse 1.7s ease-in-out infinite;
}

@keyframes logo-pulse {
  0%,
  100% {
    opacity: 0.74;
    transform: scale(0.98);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.setup-logo {
  width: 128px;
  height: 128px;
  margin: 0 auto 8px;
}

.sidebar-logo {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
}

.setup-card {
  width: min(460px, 100%);
  background: rgba(19, 26, 36, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.setup-card h1 {
  margin: 12px 0 8px;
  font-size: 2rem;
}

.setup-card p {
  margin: 0 0 22px;
  color: var(--muted);
}

.app-shell {
  min-height: 100dvh;
  width: 100%;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0;
  transition: grid-template-columns 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.app-shell.streaming-shell {
  grid-template-columns: minmax(0, 1fr);
}

.app-shell.streaming-shell .sidebar,
.app-shell.streaming-shell .mobile-nav-layer {
  display: none !important;
}

.streaming-shell .topbar {
  width: min(1240px, calc(100% - 40px));
  margin: 14px auto 0;
}

.streaming-shell .content {
  max-width: 1320px;
  margin: 0 auto;
}

.sidebar {
  position: fixed;
  top: 10px;
  bottom: 10px;
  left: 10px;
  z-index: 90;
  width: calc(var(--sidebar-width) - 20px);
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  overflow: visible;
  transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

body.sidebar-status-open .sidebar {
  z-index: 251;
}

.sidebar-menu-panel {
  position: relative;
  --sidebar-art-top: 356px;
  min-height: 0;
  padding: 12px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.55);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgb(var(--accent-rgb) / 0.14), rgba(9, 13, 30, 0.9)),
    var(--glass);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 0 34px rgb(var(--accent-rgb) / 0.24), var(--shadow);
  overflow: visible;
}

.sidebar-menu-panel .nav {
  min-height: 0;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
  padding: 0 2px 78px 0;
  scroll-padding-bottom: 78px;
}

.sidebar-menu-panel > .sidebar-collapse-toggle {
  position: absolute;
  right: -13px;
  bottom: 18px;
  z-index: 7;
  width: 30px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.5);
  border-radius: 50%;
  background: rgb(var(--surface-solid-rgb) / 0.94);
  color: var(--soft);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.38), 0 0 18px rgb(var(--accent-rgb) / 0.18);
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, transform 0.24s ease, box-shadow 0.18s ease;
}

.sidebar-brand-card,
.sidebar-brand-link,
.sidebar-menu-panel,
.sidebar-menu-panel .nav button,
.sidebar-discord-widget-wrap,
.sidebar-discord-link {
  transition:
    width 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    gap 0.24s ease,
    transform 0.24s ease;
}

.sidebar-brand-copy,
.brand-status-label,
.brand-status-chevron,
.sidebar-discord-link > span:last-child,
.nav-label {
  max-width: 190px;
  opacity: 1;
  overflow: hidden;
  transform: translateX(0);
  white-space: nowrap;
  transition:
    max-width 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.16s ease,
    transform 0.22s ease,
    visibility 0s linear 0s;
}

.sidebar-menu-panel > .sidebar-collapse-toggle:hover {
  border-color: rgb(var(--accent-soft-rgb) / 0.85);
  color: var(--text);
  transform: scale(1.06);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42), var(--glow);
}

.sidebar-collapse-icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-collapse-icon-open {
  display: none;
}

@media (min-width: 921px) {
  body:is(.sidebar-collapsed, .sidebar-auto-collapsed) {
    --sidebar-width: 88px;
  }

  body:is(.sidebar-collapsed, .sidebar-auto-collapsed) .sidebar-brand-card {
    min-height: 66px;
    padding: 8px;
  }

  body:is(.sidebar-collapsed, .sidebar-auto-collapsed) .sidebar-brand-link {
    justify-content: center;
    gap: 0;
  }

  body:is(.sidebar-collapsed, .sidebar-auto-collapsed) .sidebar-logo {
    width: 40px;
    height: 40px;
  }

  body:is(.sidebar-collapsed, .sidebar-auto-collapsed) .sidebar-brand-copy,
  body:is(.sidebar-collapsed, .sidebar-auto-collapsed) .brand-status-label,
  body:is(.sidebar-collapsed, .sidebar-auto-collapsed) .brand-status-chevron,
  body:is(.sidebar-collapsed, .sidebar-auto-collapsed) .sidebar-discord-link > span:last-child,
  body:is(.sidebar-collapsed, .sidebar-auto-collapsed) .nav-label {
    max-width: 0;
    opacity: 0;
    transform: translateX(-8px);
    visibility: hidden;
    transition-delay: 0s, 0s, 0s, 0.22s;
  }

  body:is(.sidebar-collapsed, .sidebar-auto-collapsed) .brand-status-wrap {
    top: 4px;
    right: 4px;
    transform: none;
  }

  body:is(.sidebar-collapsed, .sidebar-auto-collapsed) .brand-status-trigger {
    width: 17px;
    min-width: 17px;
    min-height: 17px;
    padding: 0;
    justify-content: center;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  body:is(.sidebar-collapsed, .sidebar-auto-collapsed) .system-status-dot {
    width: 6px;
    height: 6px;
    flex-basis: 6px;
  }

  body:is(.sidebar-collapsed, .sidebar-auto-collapsed) .sidebar-menu-panel {
    padding-inline: 10px;
  }

  body:is(.sidebar-collapsed, .sidebar-auto-collapsed) .sidebar-menu-panel::before {
    display: none;
  }

  body:is(.sidebar-collapsed, .sidebar-auto-collapsed) .nav > button,
  body:is(.sidebar-collapsed, .sidebar-auto-collapsed) .nav > .plain-link,
  body:is(.sidebar-collapsed, .sidebar-auto-collapsed) .mod-nav-wrap > button {
    width: 100%;
    padding-inline: 0;
    justify-content: center;
    gap: 0;
  }

  body:is(.sidebar-collapsed, .sidebar-auto-collapsed) .nav-kicker {
    right: 2px;
  }

  body:is(.sidebar-collapsed, .sidebar-auto-collapsed) .sidebar-discord-widget-wrap {
    left: 10px;
    right: 10px;
  }

  body:is(.sidebar-collapsed, .sidebar-auto-collapsed) .sidebar-discord-link {
    min-height: 48px;
    padding: 6px;
    justify-content: center;
    gap: 0;
  }

  body:is(.sidebar-collapsed, .sidebar-auto-collapsed) .sidebar-menu-panel > .sidebar-collapse-toggle {
    bottom: 3px;
  }

  body:is(.sidebar-collapsed, .sidebar-auto-collapsed) .discord-invite-icon {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  body:is(.sidebar-collapsed, .sidebar-auto-collapsed) .sidebar-collapse-icon-close {
    display: none;
  }

  body:is(.sidebar-collapsed, .sidebar-auto-collapsed) .sidebar-collapse-icon-open {
    display: block;
  }

  body:is(.sidebar-collapsed, .sidebar-auto-collapsed) .mod-nav-popover {
    width: min(292px, calc(100vw - 24px));
  }

  body:is(.sidebar-collapsed, .sidebar-auto-collapsed) .mod-nav-popover .mod-popover-item {
    width: 100% !important;
    min-height: 58px !important;
    justify-content: stretch !important;
    justify-items: start !important;
    padding: 10px 12px !important;
    gap: 3px !important;
    text-align: left !important;
  }
}

@media (max-width: 920px) {
  .sidebar-collapse-toggle {
    display: none;
  }
}

.sidebar-menu-panel::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: var(--sidebar-art-top, 356px) -66px -12px -28px;
  background: url("/static/asuna-sidebar.png?v=20260508-clean-hair") center bottom / auto 100% no-repeat;
  opacity: 0.92;
  filter:
    saturate(1.02)
    contrast(1.02)
    drop-shadow(0 22px 24px rgba(0, 0, 0, 0.46))
    drop-shadow(0 0 16px rgba(130, 156, 210, 0.16));
  transform: translateX(22px) scale(1.04);
  transform-origin: bottom center;
  pointer-events: none;
}

.sidebar-menu-panel.has-mod::before {
  top: var(--sidebar-art-top, 408px);
}

.sidebar-menu-panel.sidebar-art-hidden::before {
  display: none;
}

.sidebar-menu-panel > * {
  position: relative;
  z-index: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-with-logo {
  align-items: center;
}

.sidebar-brand-card {
  position: relative;
  min-height: 72px;
  padding: 10px 54px 10px 10px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.55);
  border-radius: 20px;
  background:
    radial-gradient(circle at 18% 18%, rgb(var(--accent-soft-rgb) / 0.22), transparent 42%),
    linear-gradient(180deg, rgb(var(--accent-rgb) / 0.16), rgba(9, 13, 30, 0.9));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 16px 34px rgb(var(--accent-rgb) / 0.2), var(--shadow);
}

.sidebar-brand-link {
  min-width: 0;
  padding: 0;
  border: 0;
  color: inherit;
  text-decoration: none;
}

.sidebar-brand-copy {
  min-width: 0;
}

.brand-status-wrap {
  position: absolute;
  top: 50%;
  right: 8px;
  z-index: 8;
  transform: translateY(-50%);
}

.brand-status-trigger {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0 4px;
  border: 1px solid rgb(134 239 172 / 0.28);
  border-radius: 999px;
  background: rgb(6 16 28 / 0.76);
  color: var(--soft);
  font: inherit;
  font-size: 0.58rem;
  font-weight: 850;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.04), 0 5px 18px rgb(0 0 0 / 0.24);
}

.brand-status-trigger:hover,
.brand-status-trigger[aria-expanded="true"] {
  border-color: rgb(134 239 172 / 0.55);
  box-shadow: 0 0 18px rgb(74 222 128 / 0.18);
}

.brand-status-trigger.status-degraded {
  border-color: rgb(251 191 36 / 0.45);
}

.brand-status-trigger.status-outage {
  border-color: rgb(251 113 133 / 0.5);
}

.brand-status-chevron {
  display: none;
}

.system-status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  display: inline-block;
  border-radius: 50%;
  background: #94a3b8;
  box-shadow: 0 0 10px rgb(148 163 184 / 0.55);
}

.system-status-dot.status-operational {
  background: #86efac;
  box-shadow: 0 0 10px rgb(74 222 128 / 0.82);
}

.system-status-dot.status-degraded {
  background: #fbbf24;
  box-shadow: 0 0 10px rgb(251 191 36 / 0.74);
}

.system-status-dot.status-outage {
  background: #fb7185;
  box-shadow: 0 0 10px rgb(251 113 133 / 0.75);
}

.brand-status-popover {
  position: fixed;
  top: 48px;
  left: 12px;
  z-index: 250;
  width: min(286px, calc(100vw - 24px));
  max-height: calc(100dvh - 60px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 10px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.34);
  border-radius: 14px;
  background: rgb(var(--surface-solid-rgb) / 0.96);
  backdrop-filter: blur(24px) saturate(1.14);
  box-shadow: 0 24px 58px rgb(0 0 0 / 0.52), 0 0 24px rgb(var(--accent-rgb) / 0.14);
}

.brand-status-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 8px 10px;
  border-bottom: 1px solid var(--line);
}

.brand-status-head .system-status-dot {
  width: 10px;
  height: 10px;
  flex-basis: 10px;
}

.brand-status-head div {
  display: grid;
  gap: 2px;
}

.brand-status-head strong {
  font-size: 0.82rem;
}

.brand-status-head small,
.brand-status-row small {
  color: var(--muted);
  font-size: 0.65rem;
}

.brand-status-components {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  align-content: start;
  gap: 1px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-block: 6px;
}

.brand-status-row {
  min-height: 31px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 8px;
  border-radius: 8px;
}

.brand-status-row:hover {
  background: rgb(var(--accent-rgb) / 0.08);
}

.brand-status-row > span {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.brand-status-row strong {
  overflow: hidden;
  font-size: 0.73rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-status-state-icon {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
  font-size: 0.52rem;
}

.brand-status-loading {
  padding: 14px 8px;
  color: var(--muted);
  font-size: 0.75rem;
}

.brand-status-page-link {
  flex: 0 0 auto;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-top: 1px solid var(--line);
  color: var(--accent-strong, var(--soft));
  font-size: 0.72rem;
  font-weight: 850;
  text-decoration: none;
}

.brand-logo-frame {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgb(var(--accent-rgb) / 0.26), rgb(var(--accent-2-rgb) / 0.18));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 10px 26px rgb(var(--accent-rgb) / 0.22);
}

.brand-name {
  font-weight: 900;
  letter-spacing: 0;
  font-size: 1rem;
}

.brand-sub {
  color: var(--hot);
  font-size: 0.68rem;
  font-weight: 800;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav button,
.plain-link {
  position: relative;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0 12px;
  background: transparent;
  color: var(--soft);
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
  overflow: hidden;
}

.nav button:hover,
.nav button.active,
.plain-link:hover {
  border-color: rgb(var(--accent-soft-rgb) / 0.55);
  background: linear-gradient(90deg, rgb(var(--accent-rgb) / 0.28), rgb(var(--accent-2-rgb) / 0.1));
  color: var(--text);
  box-shadow: var(--glow);
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-kicker {
  position: absolute;
  right: 16px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.92), 0 0 22px rgb(var(--accent-rgb) / 0.8);
  opacity: 0;
}

.nav button.active .nav-kicker {
  opacity: 1;
}

.discord-invite-link {
  color: var(--text);
  text-decoration: none;
}

.discord-invite-link strong,
.discord-invite-link small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discord-invite-link strong {
  font-size: 0.88rem;
  font-weight: 900;
}

.discord-invite-link small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.discord-invite-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #5865f2, rgb(var(--accent-rgb) / 0.72));
  box-shadow: 0 0 18px rgba(88, 101, 242, 0.28);
}

.discord-invite-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-discord-link {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  min-height: 54px;
  padding: 9px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.38);
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background:
    radial-gradient(circle at 0% 0%, rgba(88, 101, 242, 0.24), transparent 42%),
    linear-gradient(135deg, rgb(var(--accent-rgb) / 0.15), rgba(8, 14, 31, 0.82));
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
}

.sidebar-discord-widget-wrap {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 4;
}

.sidebar-discord-widget-wrap::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 100%;
  width: 100%;
  height: 14px;
}

.sidebar-discord-widget-wrap .sidebar-discord-link {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  width: 100%;
}

.discord-widget-popover {
  position: absolute;
  left: 0;
  bottom: calc(100% + 12px);
  width: 350px;
  max-width: min(350px, calc(100vw - 28px));
  padding: 10px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.34);
  border-radius: 20px;
  background:
    radial-gradient(circle at 12% 0%, rgb(var(--accent-rgb) / 0.22), transparent 42%),
    linear-gradient(180deg, rgb(var(--surface-2-rgb) / 0.72), rgb(var(--surface-rgb) / 0.58));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 26px 70px rgba(0, 0, 0, 0.42),
    0 0 34px rgb(var(--accent-rgb) / 0.2);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.sidebar-discord-link:hover + .discord-widget-popover,
.sidebar-discord-widget-wrap:focus-within .discord-widget-popover,
.sidebar-discord-widget-wrap.open .discord-widget-popover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.discord-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 4px 10px;
}

.discord-widget-head strong {
  font-size: 0.86rem;
  font-weight: 950;
}

.discord-widget-head small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.discord-widget-popover iframe,
.discord-widget-frame {
  width: 100%;
  height: min(500px, calc(100vh - 160px));
  min-height: 360px;
  display: block;
  border: 0;
  border-radius: 16px;
  background: transparent;
  opacity: 0.72;
  mix-blend-mode: screen;
  filter: brightness(0.92) contrast(1.34) saturate(1.08);
  box-shadow: inset 0 0 0 1px rgb(var(--accent-soft-rgb) / 0.14);
}

.sidebar-discord-link:hover {
  border-color: rgba(88, 101, 242, 0.78);
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.36), 0 0 26px rgba(88, 101, 242, 0.26);
}

.mobile-nav-discord {
  min-height: 54px;
  margin-top: 4px;
  padding: 9px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.32);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background:
    radial-gradient(circle at 0% 0%, rgba(88, 101, 242, 0.2), transparent 46%),
    rgb(var(--accent-rgb) / 0.08);
}

.mod-nav-wrap {
  position: relative;
  z-index: 130;
  min-width: 0;
}

.mod-nav-trigger {
  width: 100%;
}

.mod-nav-popover {
  position: fixed;
  z-index: 140;
  left: 12px;
  top: 12px;
  width: min(292px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  display: grid;
  gap: 5px;
  padding: 9px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.26);
  border-radius: 18px;
  background: rgba(8, 14, 31, 0.96);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.mod-nav-popover[hidden] {
  display: none !important;
}

.mod-popover-item {
  min-height: auto !important;
  display: grid !important;
  gap: 2px !important;
  align-items: start !important;
  padding: 8px 9px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
}

.mod-popover-item:hover,
.mod-popover-item.active {
  border-color: rgb(var(--accent-rgb) / 0.36) !important;
  background: rgb(var(--accent-rgb) / 0.1) !important;
}

.mod-popover-item strong {
  color: var(--text);
}

.mod-popover-item span {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.25;
}

.mobile-nav-layer,
.mobile-nav-fab,
.mobile-nav-popover,
.mobile-nav-backdrop {
  display: none;
}

.mobile-nav-popover[hidden],
.mobile-nav-backdrop[hidden] {
  display: none !important;
}

.mobile-nav-title {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.mobile-nav-item {
  min-height: 42px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 12px;
  background: transparent;
  color: var(--soft);
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  font-weight: 800;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
  border-color: rgb(var(--accent-rgb) / 0.32);
  background: rgb(var(--accent-rgb) / 0.12);
  color: var(--text);
}

.mobile-nav-item.active .nav-kicker {
  opacity: 1;
}

.mobile-nav-bars {
  display: grid;
  gap: 4px;
}

.mobile-nav-bars span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.16s ease, opacity 0.16s ease;
}

.mobile-nav-fab.active .mobile-nav-bars span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.mobile-nav-fab.active .mobile-nav-bars span:nth-child(2) {
  opacity: 0;
}

.mobile-nav-fab.active .mobile-nav-bars span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.account-box {
  margin-top: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.account-panel-user {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.account-name {
  font-weight: 800;
  overflow-wrap: anywhere;
}

.account-role {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.role-pill {
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.role-vip {
  color: #ffe7a3;
  border-color: rgba(245, 158, 11, 0.5);
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.2), transparent 26%),
    linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(236, 72, 153, 0.18));
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.16);
}

.sponsor-role-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  white-space: nowrap;
  vertical-align: middle;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  color: #f5b85b;
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1;
}

.sponsor-role-badge svg {
  width: 18px;
  height: 18px;
  filter: drop-shadow(0 1px 2px rgb(132 78 15 / 0.25));
}

.auth-grid {
  display: grid;
  gap: 8px;
}

.oauth-login-grid {
  display: grid;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.oauth-button {
  justify-content: center;
}

.connected-accounts-panel {
  gap: 12px;
}

.connected-account-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(11, 18, 36, 0.66);
}

.connected-account-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(88, 101, 242, 0.42);
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.18), transparent 36%),
    linear-gradient(135deg, rgba(88, 101, 242, 0.72), rgba(35, 39, 42, 0.92));
  color: #fff;
  font-weight: 900;
  overflow: hidden;
}

.connected-account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.connected-account-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.connected-account-copy strong,
.connected-account-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connected-account-copy span {
  color: var(--muted);
  font-size: 0.86rem;
}

.connected-account-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.small-button {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 0.78rem;
}

.mal-sync-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mal-sync-actions .button.primary {
  grid-column: 1 / -1;
}

@media (max-width: 560px) {
  .mal-sync-actions {
    grid-template-columns: 1fr;
  }

  .mal-sync-actions .button.primary {
    grid-column: auto;
  }
}

.main {
  min-width: 0;
  width: 100%;
  position: relative;
  grid-column: 2;
  grid-row: 1;
}

.streaming-shell .main,
.staff-shell.staff-guest-shell .main {
  grid-column: 1;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 20;
  height: var(--topbar-height);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin: 12px var(--page-pad-x) 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(8, 14, 31, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
  overflow: visible;
}

html.standalone-app .topbar {
  top: max(10px, var(--safe-top));
}

html.standalone-app .sidebar {
  top: calc(10px + var(--safe-top));
  bottom: calc(10px + var(--safe-bottom));
  height: auto;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 10px;
  min-width: 0;
  height: 100%;
  flex: 0 1 auto;
}

.site-presence {
  position: relative;
  height: 42px;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.26);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgb(var(--accent-rgb) / 0.12), rgba(255, 255, 255, 0.025)),
    rgba(8, 14, 31, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  color: var(--text);
  white-space: nowrap;
  cursor: default;
  outline: none;
}

.site-presence:focus-visible {
  border-color: rgb(var(--accent-rgb) / 0.7);
  box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.site-presence::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 100%;
  left: 0;
  width: min(320px, calc(100vw - 24px));
  height: 12px;
}

.presence-popover {
  position: absolute;
  z-index: 1800;
  top: calc(100% + 10px);
  left: 0;
  width: min(320px, calc(100vw - 24px));
  max-height: min(430px, calc(100dvh - 96px));
  padding: 10px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.38);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgb(var(--accent-rgb) / 0.12), transparent 42%),
    rgba(7, 13, 29, 0.94);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(22px) saturate(1.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px) scale(0.985);
  transform-origin: top left;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}

.site-presence:hover .presence-popover,
.site-presence:focus .presence-popover,
.site-presence:focus-within .presence-popover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.presence-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 5px 10px;
  border-bottom: 1px solid rgba(148, 163, 224, 0.16);
}

.presence-popover-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.presence-popover-head strong {
  font-size: 0.94rem;
}

.presence-popover-head small,
.presence-user-copy small,
.presence-popover-foot,
.presence-empty {
  color: var(--soft);
  font-size: 0.74rem;
}

.presence-popover-head > span {
  min-width: 30px;
  height: 30px;
  padding-inline: 8px;
  display: grid;
  place-items: center;
  border: 1px solid rgb(var(--accent-rgb) / 0.3);
  border-radius: 999px;
  background: rgb(var(--accent-rgb) / 0.12);
  color: var(--text);
  font-weight: 900;
}

.presence-user-list {
  display: grid;
  gap: 4px;
  max-height: 318px;
  padding: 7px 0 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.presence-user {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
}

.presence-user:hover,
.presence-user:focus-visible {
  border-color: rgb(var(--accent-soft-rgb) / 0.3);
  background: rgb(var(--accent-rgb) / 0.11);
  outline: none;
}

.presence-user-avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  object-fit: cover;
  object-position: var(--avatar-focus-x, 50%) var(--avatar-focus-y, 50%);
}

.presence-user-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.presence-user-copy strong,
.presence-user-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.presence-user-role {
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(148, 163, 224, 0.1);
  color: var(--soft);
  font-size: 0.65rem;
  font-weight: 850;
  text-transform: uppercase;
}

.presence-user-role.role-admin,
.presence-user-role.role-mod,
.presence-user-role.role-vip {
  background: rgb(var(--accent-rgb) / 0.14);
  color: rgb(var(--accent-soft-rgb));
}

.presence-empty {
  padding: 18px 8px;
  text-align: center;
  white-space: normal;
}

.presence-popover-foot {
  margin-top: 6px;
  padding: 9px 6px 2px;
  border-top: 1px solid rgba(148, 163, 224, 0.14);
  text-align: center;
}

.presence-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 999px;
  background: rgb(var(--accent-rgb));
  box-shadow: 0 0 14px rgb(var(--accent-rgb) / 0.82);
}

.presence-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
}

.presence-pill b {
  font-size: 0.92rem;
  font-weight: 950;
}

.presence-pill small {
  color: var(--soft);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.presence-divider {
  width: 1px;
  height: 18px;
  background: rgba(148, 163, 224, 0.22);
}

.top-utility-button {
  position: relative;
  width: 42px;
  height: 42px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--soft);
  display: grid;
  place-items: center;
}

.top-utility-button:hover {
  border-color: rgb(var(--accent-soft-rgb) / 0.36);
  background: rgb(var(--accent-rgb) / 0.12);
  color: var(--text);
}

.ambient-toggle {
  overflow: hidden;
}

.ambient-toggle::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(var(--accent-rgb) / 0.26), transparent 64%);
  opacity: 0;
  transform: scale(0.72);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.ambient-toggle.active,
.ambient-toggle.preferred {
  border-color: rgb(var(--accent-soft-rgb) / 0.46);
  background: linear-gradient(135deg, rgb(var(--accent-rgb) / 0.18), rgb(var(--accent-2-rgb) / 0.1));
  color: var(--text);
}

.ambient-toggle.active::before {
  opacity: 1;
  transform: scale(1);
  animation: ambientPulse 2.4s ease-in-out infinite;
}

.ambient-toggle svg {
  position: relative;
  z-index: 1;
}

@keyframes ambientPulse {
  0%,
  100% {
    transform: scale(0.88);
    opacity: 0.38;
  }
  50% {
    transform: scale(1.18);
    opacity: 0.78;
  }
}

.ambient-wrap,
.notification-wrap {
  position: relative;
  display: grid;
  place-items: center;
}

.messages-wrap {
  position: relative;
  display: grid;
  place-items: center;
}

.top-utility-button.has-count::after {
  content: attr(data-count);
  position: absolute;
  top: 2px;
  right: 1px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 950;
  box-shadow: 0 0 16px rgb(var(--accent-rgb) / 0.7);
}

.notification-popover {
  position: absolute;
  z-index: 75;
  top: calc(100% + 12px);
  right: 0;
  width: min(360px, calc(100vw - 32px));
  max-height: min(520px, calc(100dvh - 120px));
  overflow: auto;
  padding: 12px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.28);
  border-radius: 18px;
  background: rgba(8, 14, 31, 0.96);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.notification-popover[hidden] {
  display: none !important;
}

.ambient-popover {
  position: absolute;
  z-index: 76;
  top: calc(100% + 12px);
  right: 0;
  width: min(340px, calc(100vw - 32px));
  padding: 12px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.3);
  border-radius: 20px;
  background:
    radial-gradient(circle at 18% 0%, rgb(var(--accent-rgb) / 0.18), transparent 36%),
    rgba(8, 14, 31, 0.97);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.ambient-popover[hidden] {
  display: none !important;
}

.ambient-player-card {
  display: grid;
  gap: 12px;
}

.ambient-player-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ambient-player-head strong,
.ambient-player-head small {
  display: block;
}

.ambient-player-head strong {
  font-size: 0.98rem;
  font-weight: 950;
}

.ambient-player-head small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.ambient-player-visual {
  height: 82px;
  padding: 14px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.2);
  border-radius: 18px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 9px;
  background:
    radial-gradient(circle at 50% 0%, rgb(var(--accent-rgb) / 0.22), transparent 58%),
    rgba(255, 255, 255, 0.035);
  overflow: hidden;
}

.ambient-player-visual span {
  width: 9px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  opacity: 0.62;
  transform-origin: bottom center;
}

.ambient-player-visual.playing span {
  animation: ambientBar 1.2s ease-in-out infinite;
}

.ambient-player-visual span:nth-child(2) {
  height: 42px;
  animation-delay: -0.32s;
}

.ambient-player-visual span:nth-child(3) {
  height: 62px;
  animation-delay: -0.62s;
}

.ambient-player-visual span:nth-child(4) {
  height: 36px;
  animation-delay: -0.18s;
}

.ambient-player-visual span:nth-child(5) {
  height: 52px;
  animation-delay: -0.48s;
}

@keyframes ambientBar {
  0%,
  100% {
    transform: scaleY(0.58);
    opacity: 0.48;
  }
  50% {
    transform: scaleY(1.05);
    opacity: 0.95;
  }
}

.ambient-player-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ambient-player-volume {
  display: grid;
  gap: 8px;
}

.ambient-player-volume span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--soft);
  font-size: 0.82rem;
  font-weight: 850;
}

.ambient-player-volume b {
  color: var(--text);
}

.ambient-player-message {
  min-height: 16px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.messages-popover {
  position: absolute;
  z-index: 75;
  top: calc(100% + 12px);
  right: 0;
  width: min(680px, calc(100vw - 32px));
  height: min(620px, calc(100dvh - 120px));
  max-height: min(620px, calc(100dvh - 120px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 12px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.28);
  border-radius: 20px;
  background:
    radial-gradient(circle at 18% 0%, rgb(var(--accent-rgb) / 0.14), transparent 34%),
    rgba(8, 14, 31, 0.97);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.messages-popover[hidden] {
  display: none !important;
}

.notification-head {
  position: sticky;
  top: -12px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -12px -12px 0;
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 8% 0%, rgb(var(--accent-rgb) / 0.12), transparent 36%),
    rgba(8, 14, 31, 0.96);
  backdrop-filter: blur(18px);
}

.messages-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.messages-head strong,
.messages-head small {
  display: block;
}

.messages-head small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.messages-search {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin: 12px 0 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.messages-search span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.messages-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.messages-user-results {
  flex: 0 0 auto;
  display: grid;
  gap: 6px;
  max-height: 146px;
  overflow-y: auto;
  margin-bottom: 10px;
}

.message-user-result,
.message-thread-button {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--soft);
  text-align: left;
}

.message-thread-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 6px;
  align-items: stretch;
}

.message-thread-row.active .message-thread-remove,
.message-thread-row:hover .message-thread-remove {
  opacity: 1;
}

.message-thread-remove {
  width: 30px;
  min-width: 30px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-weight: 900;
  opacity: 0.7;
}

.message-thread-remove:hover {
  border-color: rgba(248, 113, 113, 0.42);
  background: rgba(239, 68, 68, 0.14);
  color: #fecaca;
}

.message-user-result {
  grid-template-columns: 34px minmax(0, 1fr);
}

.message-user-result:hover,
.message-thread-button:hover,
.message-thread-button.active {
  border-color: rgb(var(--accent-soft-rgb) / 0.4);
  background: rgb(var(--accent-rgb) / 0.1);
  color: var(--text);
}

.message-user-result strong,
.message-user-result small,
.message-thread-button strong,
.message-thread-button small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-user-result small,
.message-thread-button small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
}

.message-thread-button em {
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 950;
}

.messages-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 10px;
}

.messages-thread-list,
.messages-thread-panel {
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(8, 14, 31, 0.62);
}

.messages-thread-list {
  display: grid;
  align-content: start;
  gap: 6px;
  overflow-y: auto;
  padding: 8px;
}

.messages-thread-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.messages-thread-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.messages-thread-head > div {
  min-width: 0;
  flex: 1;
}

.message-thread-head-remove {
  margin-left: auto;
  white-space: nowrap;
}

.messages-thread-head strong,
.messages-thread-head small {
  display: block;
}

.messages-thread-head small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.messages-body {
  min-height: 0;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.direct-message {
  display: flex;
  justify-content: flex-start;
}

.direct-message.mine {
  justify-content: flex-end;
}

.direct-message-bubble {
  max-width: min(82%, 360px);
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 16px 16px 16px 6px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--soft);
}

.direct-message.mine .direct-message-bubble {
  border-color: rgb(var(--accent-soft-rgb) / 0.36);
  border-radius: 16px 16px 6px 16px;
  background: linear-gradient(135deg, rgb(var(--accent-rgb) / 0.22), rgb(var(--accent-2-rgb) / 0.12));
  color: var(--text);
}

.direct-message.deleted .direct-message-bubble {
  opacity: 0.72;
}

.direct-message-bubble p {
  margin: 0;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.direct-message-bubble p em {
  color: var(--muted);
  font-style: italic;
}

.direct-message-bubble small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  text-align: right;
}

.direct-message-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 6px;
}

.direct-message-actions .asuna-action {
  font-size: 0.68rem;
}

.direct-message-form {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.direct-message-form #direct-message-status {
  grid-column: 1 / -1;
}

.notification-list {
  display: grid;
  gap: 8px;
  padding-top: 10px;
}

.notification-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--soft);
  text-align: left;
}

.notification-item.unread {
  border-color: rgb(var(--accent-soft-rgb) / 0.32);
  background: rgb(var(--accent-rgb) / 0.1);
}

.notification-item strong,
.notification-item small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.notification-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}

.notification-item .notification-time {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.notification-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.notification-icon-dot {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--glow);
}

@media (max-width: 760px) {
  .notification-popover {
    position: fixed;
    top: var(--notification-popover-top, calc(var(--topbar-height) + 12px));
    right: 10px;
    left: 10px;
    bottom: auto;
    width: auto;
    max-height: min(430px, var(--notification-popover-max-height, calc(100dvh - var(--topbar-height) - 24px)));
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    border-radius: 18px;
  }

  .notification-popover[hidden] {
    display: none !important;
  }

  .notification-list {
    min-height: 0;
    overflow-y: auto;
    padding-right: 2px;
    padding-bottom: 12px;
    scroll-padding-bottom: 14px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
}

.top-utility-button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.top-actions .meta-line {
  min-width: 0;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-empty {
  min-height: 92px;
  padding: 12px;
  border-radius: 14px;
}

.ad-slot {
  min-height: 96px;
  margin: 18px 0;
  padding: 10px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.16);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)),
    rgba(8, 14, 31, 0.42);
  display: grid;
  gap: 6px;
  align-items: center;
  overflow: hidden;
}

.ad-slot-loading {
  border-color: transparent;
  background: transparent;
  opacity: 0;
  pointer-events: none;
}

.ad-slot:not(.ad-slot-ready) span {
  display: none;
}

.ad-slot span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ad-slot .adsbygoogle {
  min-height: 72px;
  width: 100%;
}

.ad-slot-empty {
  display: none !important;
  min-height: 0;
  height: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.cookie-consent {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  width: min(520px, calc(100vw - 28px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.34);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    rgba(8, 14, 31, 0.96);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.44);
  backdrop-filter: blur(18px);
}

.cookie-consent-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.cookie-consent-copy strong {
  color: var(--text);
  font-size: 0.98rem;
}

.cookie-consent-copy p {
  margin: 0;
  color: var(--soft);
  font-size: 0.88rem;
  line-height: 1.45;
}

.cookie-consent-copy a {
  color: rgb(var(--accent-rgb));
  font-size: 0.82rem;
  font-weight: 800;
}

.cookie-consent-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

body.wrapped-page-active .cookie-consent {
  display: none;
}

.top-profile-button {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(18, 27, 55, 0.88);
  color: var(--soft);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.top-profile-chip {
  width: auto;
  min-width: 0;
  height: 46px;
  display: inline-flex;
  place-items: initial;
  align-items: center;
  gap: 8px;
  border-radius: 18px;
  padding: 4px 13px 4px 5px;
  background: rgba(14, 22, 46, 0.96);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.top-profile-label {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text);
}

.top-profile-button:hover,
.top-profile-button.active {
  background: rgb(var(--accent-rgb) / 0.13);
  border-color: rgb(var(--accent-soft-rgb) / 0.48);
}

.top-profile-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.top-auth-wrap {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  height: 100%;
}

.top-auth-trigger {
  cursor: pointer;
}

.top-auth-trigger.top-profile-chip {
  border-radius: 999px;
}

.top-auth-trigger span {
  display: inline-block;
}

.top-auth-popover {
  position: absolute;
  z-index: 72;
  top: calc(100% + 10px);
  right: 0;
  width: min(320px, calc(100vw - 32px));
  padding: 12px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.28);
  border-radius: 16px;
  background: rgba(10, 16, 34, 0.98);
  box-shadow: var(--shadow);
}

.top-auth-popover[hidden] {
  display: none !important;
}

.top-profile-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgb(var(--accent-soft-rgb) / 0.66);
  box-shadow: 0 0 16px rgb(var(--accent-rgb) / 0.32);
}

.global-search {
  position: relative;
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}

.global-search .select,
.global-search .input {
  min-height: 48px;
  border-radius: 16px;
  border-color: rgba(148, 163, 224, 0.2);
  background: rgba(6, 11, 27, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.global-search .select:focus,
.global-search .input:focus {
  border-color: rgb(var(--accent-soft-rgb) / 0.56);
  box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.13);
}

.live-search-dropdown {
  position: absolute;
  z-index: 50;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: grid;
  gap: 6px;
  max-height: min(430px, calc(100vh - 110px));
  overflow: auto;
  padding: 8px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.28);
  border-radius: 16px;
  background: rgba(8, 14, 31, 0.98);
  box-shadow: var(--shadow);
}

.live-search-dropdown[hidden] {
  display: none;
}

.live-search-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
}

.live-search-item:hover,
.live-search-item.active {
  border-color: rgb(var(--accent-soft-rgb) / 0.52);
  background: rgb(var(--accent-rgb) / 0.13);
}

.search-suggest-thumb {
  width: 46px;
  height: 62px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--panel-3);
  font-size: 1.1rem;
}

.live-search-item[href^="/u/"] .search-suggest-thumb,
.search-suggest-thumb.avatar-placeholder {
  height: 46px;
  border-radius: 50%;
}

.live-search-title {
  font-weight: 850;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.live-search-empty {
  padding: 12px;
  color: var(--muted);
  text-align: center;
}

.content {
  padding: 24px var(--page-pad-x) 28px;
  width: 100%;
}

.app-shell:not(.status-shell) .main {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.app-shell:not(.status-shell) .content {
  flex: 1 0 auto;
}

.site-footer {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: end;
  position: relative;
  z-index: 6;
  width: 100%;
  margin-top: 30px;
  border-top: 1px solid rgb(var(--accent-soft-rgb) / 0.22);
  background:
    linear-gradient(90deg, transparent, rgb(var(--accent-rgb) / 0.08), transparent),
    rgba(4, 9, 21, 0.72);
  backdrop-filter: blur(16px) saturate(1.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
  box-shadow: 0 -18px 44px rgba(0, 0, 0, 0.18);
}

.site-footer-inner {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 20px max(24px, var(--page-pad-x)) calc(22px + env(safe-area-inset-bottom, 0px));
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.site-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px 18px;
}

.site-footer-links a {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 760;
  text-decoration: none;
  transition: color 0.18s ease, text-shadow 0.18s ease;
}

.site-footer-links a:hover,
.site-footer-links a:focus-visible {
  color: rgb(var(--accent-soft-rgb));
  text-shadow: 0 0 18px rgb(var(--accent-rgb) / 0.56);
}

.site-footer-copy {
  width: 100%;
  color: rgb(var(--accent-soft-rgb) / 0.7);
  font-size: 0.78rem;
  font-weight: 760;
  line-height: 1.4;
  letter-spacing: 0;
  text-align: center;
}

.activity-show-more.activity-auto-loader:not(.activity-load-error) {
  min-height: 32px;
  margin: 12px auto 0;
  padding: 6px 12px;
  border-color: transparent;
  color: var(--muted);
  background: transparent;
  box-shadow: none;
}

.activity-show-more.activity-auto-loader[data-loading="true"]:not(.activity-load-error)::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  display: inline-block;
  background: rgb(var(--accent-soft-rgb));
  box-shadow: 0 0 12px rgb(var(--accent-rgb) / 0.72);
  animation: activity-loader-pulse 1s ease-in-out infinite alternate;
}

.activity-show-more.activity-load-error {
  margin: 12px auto 0;
}

@keyframes activity-loader-pulse {
  from { opacity: 0.38; transform: scale(0.82); }
  to { opacity: 1; transform: scale(1.08); }
}

@media (max-width: 760px) {
  .site-footer-inner {
    padding: 17px 18px calc(20px + env(safe-area-inset-bottom, 0px));
    gap: 10px;
  }

  .site-footer-links {
    gap: 7px 14px;
  }

  .site-footer-links a,
  .site-footer-copy {
    font-size: 0.74rem;
  }
}

.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.page-title {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  line-height: 1.02;
}

.page-copy {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.section {
  margin: 30px 0;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title h2 {
  margin: 0;
  font-size: 1.05rem;
}

.section-title small {
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(154px, 1fr));
  gap: 16px;
}

.wide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16, 24, 50, 0.86), rgba(9, 14, 31, 0.9));
  border-radius: 14px;
  overflow: hidden;
  min-width: 0;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgb(var(--accent-soft-rgb) / 0.46);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28), 0 0 24px rgb(var(--accent-rgb) / 0.16);
}

.media-card {
  display: grid;
  grid-template-rows: auto 1fr;
  width: 100%;
}

.grid:has(> .media-card) {
  grid-template-columns: repeat(auto-fill, minmax(164px, 210px));
  justify-content: start;
  align-items: stretch;
}

.media-card > .poster,
.media-card > .poster-placeholder {
  width: 100%;
  aspect-ratio: 2 / 3;
  min-height: 0;
  object-fit: cover;
  object-position: center;
  border-bottom: 1px solid rgb(var(--accent-soft-rgb) / 0.14);
}

.media-card.in-list {
  border-color: rgb(var(--accent-rgb) / 0.42);
  box-shadow: 0 0 0 1px rgb(var(--accent-rgb) / 0.18), 0 10px 28px rgba(0, 0, 0, 0.16);
}

.media-card.status-watching {
  border-color: rgb(var(--accent-rgb) / 0.62);
  background: linear-gradient(180deg, rgb(var(--accent-rgb) / 0.14), rgba(19, 26, 36, 0.96));
}

.media-card.status-completed {
  border-color: rgba(134, 239, 172, 0.62);
  background: linear-gradient(180deg, rgba(134, 239, 172, 0.14), rgba(19, 26, 36, 0.96));
}

.media-card.status-planning {
  border-color: rgba(251, 191, 36, 0.66);
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.14), rgba(19, 26, 36, 0.96));
}

.media-card.status-dropped {
  border-color: rgba(251, 113, 133, 0.66);
  background: linear-gradient(180deg, rgba(251, 113, 133, 0.14), rgba(19, 26, 36, 0.96));
}

.media-card.status-paused {
  border-color: rgba(148, 163, 184, 0.58);
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.12), rgba(19, 26, 36, 0.96));
}

.user-card {
  display: grid;
  grid-template-rows: auto 1fr;
}

.user-card-avatar {
  width: min(136px, 56%);
  aspect-ratio: 1;
  margin: 16px auto 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel-3);
  object-fit: cover;
  font-size: 2.6rem;
}

.similar-users-section {
  max-width: 1060px;
  margin: 22px auto 28px;
}

.centered-section-title {
  justify-content: center;
  text-align: center;
}

.similar-users-grid {
  width: min(100%, 980px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.accent-pill {
  border-color: rgb(var(--accent-rgb) / 0.48);
  color: var(--accent);
  background: rgb(var(--accent-rgb) / 0.12);
}

.wrapped-page-head {
  align-items: end;
  margin-top: 8px;
}

.wrapped-controls {
  display: flex;
  align-items: end;
  gap: 10px;
  padding: 12px;
}

.wrapped-controls label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.wrapped-share {
  position: relative;
  z-index: 320;
}

.wrapped-share-actions {
  display: flex;
  gap: 7px;
}

.wrapped-share-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 360;
  display: grid;
  gap: 12px;
  width: min(420px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid rgb(var(--accent-rgb) / 0.36);
  border-radius: 16px;
  background: rgba(7, 13, 28, 0.97);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.38);
}

.wrapped-share-menu[hidden] {
  display: none;
}

.wrapped-share-menu label {
  gap: 7px;
  text-transform: none;
}

.wrapped-share-menu label > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.wrapped-share-menu .input {
  min-width: 0;
  height: 40px;
  font-size: 0.78rem;
}

.wrapped-stage {
  display: grid;
  place-items: center;
  padding: 6px 0 18px;
}

.wrapped-stage.is-fit-view {
  --wrapped-fit-scale: 1;
  --wrapped-fit-height: auto;
  --wrapped-fit-width: var(--wrapped-card-width);
  display: block;
  height: var(--wrapped-fit-height);
  min-height: var(--wrapped-fit-height);
  padding-bottom: 10px;
}

.wrapped-card-fit {
  width: var(--wrapped-fit-width);
  height: var(--wrapped-fit-height);
  margin: 0 auto;
  overflow: visible;
}

.wrapped-card {
  position: relative;
  width: min(var(--wrapped-card-width), 100%);
  height: var(--wrapped-card-height);
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgb(var(--accent-rgb) / 0.28);
  border-radius: 10px;
  padding: 34px;
  color: #fff;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background:
    linear-gradient(90deg, rgba(13, 10, 20, 0.98) 0%, rgba(13, 10, 20, 0.8) 45%, rgba(13, 10, 20, 0.96) 100%),
    linear-gradient(180deg, rgba(13, 10, 20, 0.38), rgba(13, 10, 20, 0.98) 42%),
    var(--wrapped-bg) center top / cover,
    #151019;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.wrapped-stage.is-fit-view .wrapped-card {
  width: var(--wrapped-card-width);
  height: var(--wrapped-card-height);
  max-width: none;
  transform: scale(var(--wrapped-fit-scale));
  transform-origin: top left;
}

body.wrapped-snapshot-active {
  width: var(--wrapped-card-width);
  height: var(--wrapped-card-height);
  min-width: var(--wrapped-card-width);
  min-height: var(--wrapped-card-height);
  overflow: hidden;
  background: #071326;
}

body.wrapped-snapshot-active #app,
body.wrapped-snapshot-active .app-shell,
body.wrapped-snapshot-active .main,
body.wrapped-snapshot-active .content,
body.wrapped-snapshot-active #view,
body.wrapped-snapshot-active .wrapped-snapshot-root {
  width: var(--wrapped-card-width);
  height: var(--wrapped-card-height);
  min-width: var(--wrapped-card-width);
  min-height: var(--wrapped-card-height);
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body.wrapped-snapshot-active .app-shell,
body.wrapped-snapshot-active .main,
body.wrapped-snapshot-active .content,
body.wrapped-snapshot-active #view,
body.wrapped-snapshot-active .wrapped-snapshot-root {
  display: block;
}

body.wrapped-snapshot-active .sidebar,
body.wrapped-snapshot-active .topbar,
body.wrapped-snapshot-active .mobile-nav-layer,
body.wrapped-snapshot-active .mobile-menu-fab,
body.wrapped-snapshot-active .live-chat-fab,
body.wrapped-snapshot-active .cookie-consent {
  display: none !important;
}

body.wrapped-snapshot-active .wrapped-card {
  width: var(--wrapped-card-width);
  height: var(--wrapped-card-height);
  max-width: none;
  border-radius: 0;
}

.wrapped-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgb(var(--accent-rgb) / 0.2), transparent 32%);
  pointer-events: none;
}

.wrapped-card > * {
  position: relative;
  z-index: 1;
}

.wrapped-hero-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 14px;
  min-height: 86px;
}

.wrapped-user {
  display: flex;
  align-items: center;
  gap: 18px;
}

.wrapped-avatar {
  width: 86px;
  height: 86px;
  border-radius: 24px;
  border: 1px solid rgb(var(--accent-rgb) / 0.35);
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.wrapped-user h2 {
  margin: 0;
  color: rgb(var(--accent-strong-rgb));
  font-size: 2.08rem;
}

.wrapped-user p,
.wrapped-brand span {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.66);
  font-weight: 800;
}

.wrapped-brand {
  text-align: right;
  font-size: 1.18rem;
}

.wrapped-brand strong {
  display: block;
  font-size: 1.4rem;
}

.wrapped-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 24px;
  min-height: 0;
}

.wrapped-side {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
}

.wrapped-percentile-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.wrapped-fan-card {
  min-height: 62px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 16px;
  color: #fff;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(var(--accent-rgb), 0.08)),
    rgba(8, 13, 25, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 28px rgba(0, 0, 0, 0.22);
}

.wrapped-fan-card img,
.wrapped-fan-card .avatar-placeholder {
  grid-row: span 3;
}

.wrapped-fan-card span,
.wrapped-fan-card small {
  color: rgba(255, 255, 255, 0.66);
  font-weight: 900;
}

.wrapped-fan-card strong {
  min-width: 0;
  overflow: hidden;
  color: rgb(var(--accent-strong-rgb));
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wrapped-percentile {
  min-height: 64px;
  display: grid;
  place-items: center;
  padding: 10px 8px;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(var(--accent-rgb), 0.08)),
    rgba(8, 13, 25, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 24px rgba(0, 0, 0, 0.18);
  text-align: center;
}

.wrapped-percentile span,
.wrapped-percentile small {
  color: rgba(255, 255, 255, 0.58);
  font-weight: 900;
}

.wrapped-percentile strong {
  color: rgb(var(--accent-strong-rgb));
  font-size: 1.55rem;
  line-height: 0.95;
}

.wrapped-stat,
.wrapped-panel {
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  background:
    radial-gradient(circle at 18% 12%, rgba(var(--accent-rgb), 0.16), transparent 44%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    rgba(8, 13, 25, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 32px rgba(0, 0, 0, 0.22);
}

.wrapped-stat::before,
.wrapped-panel::before,
.wrapped-percentile::before,
.wrapped-fan-card::before,
.wrapped-tiny-card::before,
.wrapped-hottest::before,
.wrapped-hottest-empty::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.11), transparent 34%, rgba(var(--accent-rgb), 0.08));
  opacity: 0.7;
  pointer-events: none;
}

.wrapped-stat > *,
.wrapped-panel > *,
.wrapped-percentile > *,
.wrapped-fan-card > *,
.wrapped-tiny-card > *,
.wrapped-hottest > *,
.wrapped-hottest-empty > * {
  position: relative;
  z-index: 1;
}

.wrapped-stat {
  min-height: 58px;
  padding: 10px 14px;
  display: grid;
  align-content: center;
}

.wrapped-stat strong {
  color: rgb(var(--accent-strong-rgb));
  font-size: 1.35rem;
  line-height: 1;
}

.wrapped-stat span,
.wrapped-stat small {
  color: rgba(255, 255, 255, 0.66);
  font-weight: 900;
}

.wrapped-stat small {
  color: #34d399;
}

.wrapped-main {
  display: grid;
  grid-template-columns: repeat(16, minmax(0, 1fr));
  grid-template-rows: 206px 178px 154px 154px 210px;
  grid-template-areas:
    "topAnime topAnime topAnime topAnime topAnime animeStats animeStats animeStats animeStats topTags topTags topTags topTags topTags topTags topTags"
    "mangaStats mangaStats mangaStats topManga topManga topManga topManga topManga topManga topManga topRewatched topRewatched topRewatched topRewatched topRewatched topRewatched"
    "genre genre genre genre genre genre theme theme theme theme demo demo demo firstLast firstLast firstLast"
    "genre genre genre genre genre genre theme theme theme theme demo demo demo firstLast firstLast firstLast"
    "hottest hottest hottest hottest hottest hottest monthly monthly monthly monthly monthly monthly monthly monthly monthly monthly";
  gap: 10px;
  min-height: 0;
}

.wrapped-panel {
  min-height: 0;
  min-width: 0;
  padding: 14px;
  overflow: hidden;
}

.wrapped-panel h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: rgb(var(--accent-strong-rgb));
  text-shadow: 0 0 18px rgba(var(--accent-rgb), 0.22);
}

.wrapped-wide {
  grid-column: auto;
}

.wrapped-top-anime { grid-area: topAnime; }
.wrapped-anime-stats-panel { grid-area: animeStats; }
.wrapped-manga-stats-panel { grid-area: mangaStats; }
.wrapped-top-manga { grid-area: topManga; }
.wrapped-top-rewatched { grid-area: topRewatched; }
.wrapped-top-tags-panel { grid-area: topTags; }
.wrapped-theme-panel { grid-area: theme; }
.wrapped-demo-panel { grid-area: demo; }
.wrapped-genre-panel { grid-area: genre; }
.wrapped-first-last-panel { grid-area: firstLast; }
.wrapped-hottest-panel { grid-area: hottest; }
.wrapped-monthly-panel { grid-area: monthly; }

.wrapped-monthly-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.wrapped-top-anime,
.wrapped-top-manga,
.wrapped-top-rewatched,
.wrapped-hottest-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.wrapped-anime-stats-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background:
    radial-gradient(circle at 18% 18%, rgba(var(--accent-rgb), 0.24), transparent 48%),
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.12), rgba(12, 18, 35, 0.58));
  border-color: rgba(var(--accent-rgb), 0.3);
}

.wrapped-anime-stats-panel .wrapped-stat-grid {
  height: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 9px;
}

.wrapped-anime-stats-panel .wrapped-stat {
  min-height: 0;
  padding: 10px 12px;
  border-color: rgba(var(--accent-rgb), 0.26);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(var(--accent-rgb), 0.09)),
    rgba(8, 13, 25, 0.52);
}

.wrapped-anime-stats-panel .wrapped-stat:first-child {
  grid-column: 1 / -1;
}

.wrapped-anime-stats-panel .wrapped-stat:first-child strong {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
}

.wrapped-anime-stats-panel .wrapped-stat strong {
  color: rgb(var(--accent-strong-rgb));
  text-shadow: 0 0 18px rgba(var(--accent-rgb), 0.3);
}

.wrapped-first-last-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.08), rgba(12, 18, 35, 0.58)),
    rgba(8, 13, 25, 0.52);
}

.wrapped-manga-stats-panel,
.wrapped-top-manga,
.wrapped-top-rewatched,
.wrapped-top-tags-panel,
.wrapped-theme-panel,
.wrapped-demo-panel,
.wrapped-genre-panel,
.wrapped-hottest-panel,
.wrapped-monthly-panel,
.wrapped-top-anime {
  background:
    radial-gradient(circle at 86% 0%, rgba(var(--accent-rgb), 0.16), transparent 46%),
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.075), rgba(12, 18, 35, 0.58)),
    rgba(8, 13, 25, 0.55);
}

.wrapped-poster-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
  justify-items: stretch;
  height: 100%;
  min-height: 0;
}

.wrapped-poster-count-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.wrapped-poster-count-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wrapped-poster-count-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wrapped-poster-count-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.wrapped-poster-rank {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
  min-height: 0;
  width: auto;
  height: 100%;
  max-width: 100%;
  aspect-ratio: 2 / 3;
  justify-self: center;
  color: rgb(var(--accent-strong-rgb));
  text-decoration: none;
  font-weight: 950;
  text-align: center;
  padding: 4px;
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(var(--accent-rgb), 0.045)),
    rgba(4, 8, 18, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.wrapped-poster-rank > span {
  position: absolute;
  left: 6px;
  top: 6px;
  z-index: 2;
  min-width: 26px;
  min-height: 20px;
  padding: 2px 7px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(var(--accent-rgb), 0.32);
  border-radius: 999px;
  color: #fff;
  background: rgba(5, 9, 22, 0.78);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3), 0 0 18px rgba(var(--accent-rgb), 0.14);
  font-size: 0.66rem;
  line-height: 1;
  backdrop-filter: blur(10px);
}

.wrapped-poster-rank:first-child .wrapped-poster {
  min-height: 0;
}

.wrapped-poster {
  width: 100%;
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  min-height: 0;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  object-position: center top;
  border-radius: 12px;
  background: rgba(4, 8, 18, 0.6);
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(var(--accent-rgb), 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.wrapped-top-manga {
  border-color: rgba(var(--accent-rgb), 0.28);
  background:
    radial-gradient(circle at 12% 8%, rgba(var(--accent-rgb), 0.2), transparent 42%),
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.095), rgba(12, 18, 35, 0.58)),
    rgba(8, 13, 25, 0.58);
}

.wrapped-top-manga .wrapped-poster-list {
  gap: 10px;
}

.wrapped-top-manga .wrapped-poster {
  border-radius: 13px;
}

.wrapped-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.wrapped-tags div {
  min-height: 0;
  height: calc(100% - 28px);
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  align-items: center;
  gap: 8px 10px;
  overflow: hidden;
}

.wrapped-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 1.5em;
  padding: 0.28em 0.52em;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 999px;
  color: rgb(var(--accent-strong-rgb));
  font-size: var(--tag-size);
  font-weight: 950;
  line-height: 1.05;
  background: rgba(var(--accent-rgb), 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.wrapped-first-last {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  height: 100%;
  min-height: 0;
}

.wrapped-first-last-cover {
  min-height: 0;
  min-width: 0;
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.68);
  text-decoration: none;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  background: rgba(255, 255, 255, 0.05);
}

.wrapped-first-last-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 58%;
  background: linear-gradient(0deg, rgba(4, 7, 15, 0.92), transparent);
  pointer-events: none;
}

.wrapped-first-last-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
}

.wrapped-first-last-label {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(4, 7, 15, 0.72);
  color: rgb(var(--accent-strong-rgb));
  border: 1px solid rgba(var(--accent-rgb), 0.34);
  font-size: 0.64rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.wrapped-first-last-cover strong {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 9px;
  z-index: 1;
  color: #fff;
  font-size: 0.78rem;
  line-height: 1.1;
  font-weight: 950;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wrapped-first-last-empty {
  display: grid;
  place-items: center;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  background: rgba(4, 8, 18, 0.36);
  font-size: 0.72rem;
  font-weight: 900;
}

.wrapped-first-last-empty span {
  position: relative;
  z-index: 1;
}

.wrapped-tiny-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 6px 10px;
  align-items: center;
  padding: 9px;
  border-radius: 14px;
  color: #fff;
  text-decoration: none;
  text-align: left;
  position: relative;
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(var(--accent-rgb), 0.06)),
    rgba(4, 8, 18, 0.5);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.wrapped-tiny-card strong {
  align-self: end;
  color: rgb(var(--accent-strong-rgb));
  font-size: 0.82rem;
}

.wrapped-tiny-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.2;
}

.wrapped-tiny-poster {
  width: 68px;
  height: 68px;
  max-width: 100%;
  min-height: 0;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
}

.wrapped-first-last .wrapped-tiny-poster {
  grid-row: 1 / 3;
  width: 112px;
  height: 76px;
  max-width: none;
  min-height: 0;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center 28%;
  border-radius: 10px;
}

.wrapped-tiny-banner {
  object-position: center;
}

.wrapped-hottest,
.wrapped-hottest-empty {
  min-height: 0;
  height: 100%;
  display: grid;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  padding: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 20%, rgba(var(--accent-rgb), 0.18), transparent 46%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.085), rgba(var(--accent-rgb), 0.075)),
    rgba(4, 8, 18, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 16px 34px rgba(0, 0, 0, 0.16);
}

.wrapped-hottest {
  grid-template-columns: 78px minmax(0, 1fr) 58px;
}

.wrapped-hottest-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
  align-content: center;
}

.wrapped-hottest strong,
.wrapped-hottest span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.wrapped-hottest small {
  color: rgb(var(--accent-strong-rgb));
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.wrapped-hottest strong {
  font-size: 1.04rem;
  line-height: 1.08;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.wrapped-hottest span,
.wrapped-hottest-empty span {
  color: rgba(255, 255, 255, 0.64);
  font-weight: 850;
}

.wrapped-hottest span {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  white-space: normal;
  font-size: 0.78rem;
}

.wrapped-hottest span em {
  color: rgb(var(--accent-strong-rgb));
  font-style: normal;
  font-weight: 950;
}

.wrapped-hottest span i {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
}

.wrapped-hottest .wrapped-tiny-poster {
  width: 78px;
  height: 116px;
  border-radius: 14px;
  object-fit: cover;
  object-position: center top;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(var(--accent-rgb), 0.2);
}

.wrapped-hottest b {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: rgb(var(--accent-strong-rgb));
  border: 1px solid rgba(var(--accent-rgb), 0.26);
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.22), transparent 38%),
    rgba(8, 13, 25, 0.72);
  font-size: 1.26rem;
  line-height: 1;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.wrapped-hottest b.is-positive {
  color: #86efac;
  border-color: rgba(134, 239, 172, 0.26);
  background: rgba(34, 197, 94, 0.12);
}

.wrapped-hottest b.is-negative {
  color: #fb7185;
  border-color: rgba(251, 113, 133, 0.28);
  background: rgba(244, 63, 94, 0.12);
}

.wrapped-genre-bars {
  display: grid;
  gap: 7px;
  max-height: calc(100% - 28px);
  overflow: hidden;
}

.wrapped-genre-bars div {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.7rem;
  font-weight: 900;
  padding: 5px 6px;
  border: 1px solid rgba(var(--accent-rgb), 0.11);
  border-radius: 10px;
  background: rgba(4, 8, 18, 0.34);
}

.wrapped-genre-bars span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wrapped-genre-bars b {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgb(var(--accent-rgb)), rgb(var(--accent-strong-rgb)));
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.22);
}

.wrapped-chart {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  height: 100%;
  min-height: 0;
}

.wrapped-chart-legend {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 900;
}

.wrapped-chart-legend em {
  color: rgba(255, 255, 255, 0.76);
  font-style: normal;
  font-size: 0.72rem;
}

.wrapped-chart-legend strong {
  color: rgb(var(--accent-strong-rgb));
  font-size: 0.78rem;
  padding: 5px 9px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.1);
}

.wrapped-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.wrapped-chart-legend i {
  width: 24px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgb(var(--accent-rgb)), rgb(var(--accent-strong-rgb)));
}

.wrapped-chart-legend i.previous {
  background: rgba(255, 255, 255, 0.48);
}

.wrapped-chart-legend i.average {
  background: rgba(255, 255, 255, 0.3);
}

.wrapped-monthly-panel .wrapped-chart-legend {
  justify-content: flex-start;
}

.wrapped-monthly-panel .wrapped-chart-legend strong {
  margin-left: auto;
}

.wrapped-monthly-bars {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: stretch;
  gap: 8px;
  height: 100%;
  min-height: 0;
  padding: 18px 12px 10px;
  border-radius: 18px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 25%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px calc(100% / 12)),
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(var(--accent-rgb), 0.06)),
    rgba(4, 8, 18, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.wrapped-monthly-month {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 5px;
  min-width: 0;
}

.wrapped-monthly-value {
  position: absolute;
  left: 50%;
  top: -6px;
  z-index: 2;
  transform: translateX(-50%);
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 999px;
  color: #fff;
  background: rgba(4, 8, 18, 0.82);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.28), 0 0 18px rgba(var(--accent-rgb), 0.24);
  font-size: 0.66rem;
  font-weight: 950;
  line-height: 1;
}

.wrapped-monthly-track {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 3px;
  height: 100%;
  min-height: 82px;
  padding: 7px 4px 0;
  border-radius: 999px 999px 9px 9px;
  border: 1px solid rgba(255, 255, 255, 0.045);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    rgba(4, 8, 18, 0.34);
  overflow: hidden;
}

.wrapped-monthly-track b,
.wrapped-monthly-track span {
  display: block;
  width: 42%;
  min-height: 3px;
  border-radius: 999px 999px 4px 4px;
}

.wrapped-monthly-track b {
  background: linear-gradient(180deg, rgb(var(--accent-strong-rgb)), rgb(var(--accent-rgb)));
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.24);
}

.wrapped-monthly-track span {
  background: rgba(255, 255, 255, 0.34);
}

.wrapped-monthly-month.is-peak .wrapped-monthly-track {
  outline: 1px solid rgba(var(--accent-rgb), 0.46);
  box-shadow: 0 0 24px rgba(var(--accent-rgb), 0.2);
}

.wrapped-monthly-month small {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.62rem;
  font-weight: 900;
  text-align: center;
  text-overflow: clip;
  text-transform: uppercase;
}

.wrapped-line-chart {
  gap: 8px;
  grid-template-rows: auto auto;
}

.wrapped-monthly-line-wrap {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto;
  gap: 6px;
  padding: 10px 8px 12px;
  border-radius: 24px;
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  background:
    radial-gradient(circle at 78% 0%, rgba(var(--accent-rgb), 0.18), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(var(--accent-rgb), 0.055)),
    rgba(20, 18, 27, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.wrapped-chart svg.wrapped-monthly-line-chart {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 1040 / 112;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.wrapped-monthly-grid {
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1;
}

.wrapped-monthly-axis {
  fill: rgba(255, 255, 255, 0.46);
  font-size: 0.7rem;
  font-weight: 900;
}

.wrapped-monthly-axis.is-left {
  text-anchor: start;
}

.wrapped-monthly-axis.is-right {
  text-anchor: end;
}

.wrapped-monthly-path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wrapped-monthly-path.current {
  stroke: rgb(var(--accent-strong-rgb));
  stroke-width: 6;
  filter: drop-shadow(0 0 10px rgba(var(--accent-rgb), 0.28));
}

.wrapped-monthly-path.previous {
  stroke: rgba(255, 255, 255, 0.45);
  stroke-width: 5;
}

.wrapped-chart circle.wrapped-monthly-dot {
  stroke: rgba(20, 18, 27, 0.88);
  stroke-width: 3;
}

.wrapped-chart circle.wrapped-monthly-dot.current {
  fill: rgb(var(--accent-strong-rgb));
}

.wrapped-chart circle.wrapped-monthly-dot.previous {
  fill: rgba(255, 255, 255, 0.55);
}

.wrapped-chart circle.wrapped-monthly-dot.is-peak {
  filter: drop-shadow(0 0 12px rgba(var(--accent-rgb), 0.55));
}

.wrapped-month-strip {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 2px;
  padding: 8px 2px;
  border-radius: 999px;
  background: rgba(4, 8, 18, 0.42);
}

.wrapped-month-strip span {
  min-width: 0;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.68rem;
  font-weight: 950;
  text-align: center;
  text-transform: lowercase;
}

.wrapped-genre-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}

.wrapped-genre-radar {
  display: grid;
  min-height: 0;
}

.wrapped-genre-radar-box {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  padding: 12px;
  border-radius: 22px;
  border: 1px solid rgba(var(--accent-rgb), 0.26);
  background:
    radial-gradient(circle at 24% 32%, rgba(var(--accent-rgb), 0.22), transparent 42%),
    radial-gradient(circle at 86% 82%, rgba(var(--accent-strong-rgb), 0.1), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.078), rgba(var(--accent-rgb), 0.07)),
    rgba(4, 8, 18, 0.46);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 16px 38px rgba(0, 0, 0, 0.18);
}

.wrapped-genre-radar-main {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(156px, 0.92fr);
  gap: 12px;
  min-height: 0;
  align-items: stretch;
}

.wrapped-genre-radar-visual {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  gap: 4px;
  min-width: 0;
  min-height: 0;
  padding: 6px 6px 8px;
  border-radius: 18px;
  border: 1px solid rgba(var(--accent-rgb), 0.13);
  background:
    radial-gradient(circle at 50% 50%, rgba(var(--accent-rgb), 0.22), transparent 52%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.055), transparent 34%),
    rgba(2, 6, 16, 0.18);
  box-shadow: inset 0 0 24px rgba(var(--accent-rgb), 0.06);
  overflow: visible;
}

.wrapped-genre-radar svg {
  width: min(100%, 236px);
  height: 100%;
  min-height: 0;
  overflow: visible;
  transform: scale(1.04);
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.22));
}

.genre-radar-backplate {
  fill: rgba(var(--accent-rgb), 0.07);
  stroke: rgba(var(--accent-rgb), 0.2);
  stroke-width: 0.95;
  vector-effect: non-scaling-stroke;
}

.genre-radar-ring,
.genre-radar-spoke {
  fill: none;
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 0.7;
  vector-effect: non-scaling-stroke;
}

.genre-radar-ring {
  fill: rgba(255, 255, 255, 0.012);
}

.genre-radar-average {
  fill: none;
  stroke: rgba(255, 255, 255, 0.38);
  stroke-dasharray: 2.2 2.2;
  stroke-linejoin: round;
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
}

.genre-radar-previous {
  fill: rgba(255, 255, 255, 0.12);
  stroke: rgba(255, 255, 255, 0.62);
  stroke-linejoin: round;
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
}

.genre-radar-current {
  fill: rgb(var(--accent-rgb));
  fill-opacity: 0.74;
  stroke: rgb(var(--accent-strong-rgb));
  stroke-linejoin: round;
  stroke-width: 2.45;
  filter: drop-shadow(0 0 13px rgba(var(--accent-rgb), 0.43));
  vector-effect: non-scaling-stroke;
}

.wrapped-genre-radar text {
  fill: rgba(255, 255, 255, 0.94);
  font-size: 5.2px;
  font-weight: 950;
  text-anchor: middle;
  dominant-baseline: middle;
  paint-order: stroke;
  stroke: rgba(4, 8, 18, 0.86);
  stroke-width: 1.15px;
}

.wrapped-genre-rank-list {
  display: grid;
  align-content: center;
  gap: 9px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(var(--accent-rgb), 0.045)),
    rgba(2, 6, 16, 0.2);
}

.wrapped-genre-rank-list > small {
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.wrapped-genre-rank-row {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 8px;
  min-height: 42px;
  padding: 7px 9px 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.17);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.12), transparent 58%),
    rgba(255, 255, 255, 0.045);
  overflow: hidden;
}

.wrapped-genre-rank-row b {
  position: absolute;
  left: 0;
  bottom: 0;
  width: var(--genre-rank);
  height: 3px;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(90deg, rgb(var(--accent-rgb)), rgb(var(--accent-strong-rgb)));
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.3);
}

.wrapped-genre-rank-row span,
.wrapped-genre-rank-row em {
  color: rgb(var(--accent-strong-rgb));
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 950;
}

.wrapped-genre-rank-row strong {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.78rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wrapped-genre-rank-row small {
  grid-column: 2 / -1;
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.46);
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wrapped-genre-radar .wrapped-chart-legend {
  justify-content: center;
  gap: 9px;
  min-width: 0;
  font-size: 0.62rem;
  line-height: 1;
}

.wrapped-chart svg {
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(var(--accent-rgb), 0.055)),
    rgba(4, 8, 18, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.wrapped-chart polyline {
  fill: none;
  stroke: rgb(var(--accent-strong-rgb));
  stroke-width: 2.3;
}

.wrapped-chart polyline.previous {
  stroke: rgba(255, 255, 255, 0.48);
}

.wrapped-chart circle {
  fill: rgb(var(--accent-strong-rgb));
}

.wrapped-chart circle.previous {
  fill: rgba(255, 255, 255, 0.58);
}

@media (max-width: 980px) {
  .similar-users-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .wrapped-grid {
    grid-template-columns: 1fr;
  }

  .wrapped-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .similar-users-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 320px;
  }

  .wrapped-card {
    padding: 18px;
  }

  .wrapped-hero-row,
  .wrapped-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .wrapped-brand {
    text-align: left;
  }

  .wrapped-share,
  .wrapped-share-actions,
  .wrapped-share-actions > .button {
    width: 100%;
  }

  .wrapped-share-menu {
    left: 0;
    right: auto;
  }

  .wrapped-main,
  .wrapped-poster-list {
    grid-template-columns: 1fr;
  }

  .wrapped-wide {
    grid-column: auto;
  }

  .wrapped-genre-panel {
    grid-column: auto;
  }
}

.wrapped-stage.is-fit-view .wrapped-hero-row {
  align-items: center;
  flex-direction: row;
}

.wrapped-stage.is-fit-view .wrapped-card {
  padding: 34px;
}

.wrapped-stage.is-fit-view .wrapped-brand {
  text-align: right;
}

.wrapped-stage.is-fit-view .wrapped-grid {
  grid-template-columns: 340px minmax(0, 1fr);
}

.wrapped-stage.is-fit-view .wrapped-main {
  grid-template-columns: repeat(16, minmax(0, 1fr));
  grid-template-rows: 206px 178px 154px 154px 210px;
  grid-template-areas:
    "topAnime topAnime topAnime topAnime topAnime animeStats animeStats animeStats animeStats topTags topTags topTags topTags topTags topTags topTags"
    "mangaStats mangaStats mangaStats topManga topManga topManga topManga topManga topManga topManga topRewatched topRewatched topRewatched topRewatched topRewatched topRewatched"
    "genre genre genre genre genre genre theme theme theme theme demo demo demo firstLast firstLast firstLast"
    "genre genre genre genre genre genre theme theme theme theme demo demo demo firstLast firstLast firstLast"
    "hottest hottest hottest hottest hottest hottest monthly monthly monthly monthly monthly monthly monthly monthly monthly monthly";
  gap: 10px;
}

.wrapped-stage.is-fit-view .wrapped-poster-list {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.wrapped-stage.is-fit-view .wrapped-poster-count-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.wrapped-stage.is-fit-view .wrapped-poster-count-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wrapped-stage.is-fit-view .wrapped-poster-count-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wrapped-stage.is-fit-view .wrapped-poster-count-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.wrapped-stage.is-fit-view .wrapped-wide {
  grid-column: auto;
}

.wrapped-stage.is-fit-view .wrapped-controls {
  flex-direction: row;
}

.poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
  background: var(--panel-3);
}

.poster-placeholder {
  width: 100%;
  aspect-ratio: 2 / 3;
  display: grid;
  place-items: center;
  background: var(--panel-3);
  color: var(--muted);
  font-size: 2rem;
  font-weight: 900;
}

.streaming-page {
  display: grid;
  gap: 18px;
}

.streaming-page-head {
  align-items: end;
}

.streaming-hero {
  position: relative;
  min-height: 470px;
  padding: 26px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.28);
  border-radius: 26px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
  gap: 24px;
  align-items: stretch;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(5, 9, 22, 0.96), rgba(7, 12, 30, 0.74)),
    var(--glass);
  box-shadow: var(--shadow), 0 0 42px rgb(var(--accent-rgb) / 0.12);
}

.streaming-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--stream-bg);
  background-size: cover;
  background-position: center;
  opacity: 0.28;
  filter: blur(5px) saturate(1.12);
  transform: scale(1.05);
}

.streaming-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 20%, rgb(var(--accent-rgb) / 0.28), transparent 34%),
    linear-gradient(90deg, rgba(5, 8, 18, 0.98) 0%, rgba(5, 8, 18, 0.62) 48%, rgba(5, 8, 18, 0.9) 100%);
}

.streaming-hero > * {
  position: relative;
  z-index: 1;
}

.streaming-hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.streaming-hero-copy {
  order: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  max-width: 760px;
  padding-top: 18px;
  gap: 16px;
}

.streaming-eyebrow {
  width: fit-content;
  margin-bottom: 12px;
  padding: 7px 10px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.34);
  border-radius: 999px;
  color: var(--accent);
  background: rgb(var(--accent-rgb) / 0.12);
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.streaming-hero h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(2.15rem, 4.4vw, 4.65rem);
  line-height: 1;
  text-wrap: balance;
}

.streaming-hero p {
  max-width: 650px;
  color: var(--soft);
  font-size: 1rem;
  line-height: 1.7;
}

.streaming-title-card {
  display: grid;
  gap: 13px;
}

.streaming-title-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.streaming-title-meta span {
  padding: 7px 10px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.24);
  border-radius: 999px;
  color: var(--soft);
  background: rgb(var(--surface-solid-rgb) / 0.54);
  font-size: 0.84rem;
  font-weight: 850;
}

.streaming-synopsis-card {
  max-width: 690px;
  padding: 16px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.22);
  border-radius: 18px;
  background: linear-gradient(135deg, rgb(var(--surface-solid-rgb) / 0.7), rgb(var(--accent-rgb) / 0.07));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.streaming-synopsis-card strong {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.streaming-synopsis-card p {
  margin: 0;
}

.streaming-actions,
.streaming-service-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.streaming-legal-note {
  margin-top: 12px;
  color: var(--muted) !important;
  font-size: 0.82rem !important;
}

.streaming-side-stack {
  order: 1;
  min-width: 0;
  align-self: center;
  display: grid;
  gap: 14px;
}

.streaming-local-player-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.3);
  border-radius: 22px;
  display: grid;
  gap: 12px;
  background:
    radial-gradient(circle at 20% 0%, rgb(var(--accent-rgb) / 0.2), transparent 42%),
    rgba(8, 14, 31, 0.86);
  backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 20px 42px rgba(0, 0, 0, 0.3);
}

.streaming-local-screen {
  position: relative;
  min-height: 0;
  aspect-ratio: 16 / 9;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.2);
  border-radius: 18px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(4, 8, 18, 0.9);
  cursor: pointer;
}

.streaming-local-screen.missing-local-video {
  cursor: default;
}

.streaming-local-screen:fullscreen {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
  border-radius: 0;
  border: 0;
}

.streaming-local-screen:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
  border-radius: 0;
  border: 0;
}

.streaming-playback-error {
  position: absolute;
  z-index: 2;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: max-content;
  max-width: 85%;
  margin: 0;
  padding: .75rem 1rem;
  border-radius: .5rem;
  background: #171c26;
  color: #fff;
  text-align: center;
  pointer-events: auto;
}
.streaming-playback-error .button { margin: 8px auto 0; }
.streaming-local-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

.streaming-local-iframe {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #000;
}

.streaming-embed-wake-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  pointer-events: none;
  background: transparent;
}

.streaming-local-screen.has-embed-video.streaming-controls-hidden .streaming-embed-wake-layer {
  pointer-events: auto;
}

.streaming-local-video[hidden],
.streaming-local-iframe[hidden] {
  display: none;
}

.streaming-local-screen::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.5));
  opacity: 1;
  transition: opacity 0.2s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.streaming-local-screen.streaming-controls-hidden::after {
  opacity: 0;
}

.streaming-local-screen.has-embed-video::after {
  content: none;
}

.streaming-local-empty {
  padding: 18px;
  display: grid;
  gap: 7px;
  color: var(--soft);
  text-align: center;
}

.streaming-local-empty strong {
  color: var(--text);
}

.streaming-local-empty code {
  max-width: 100%;
  padding: 7px 9px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.28);
  border-radius: 10px;
  color: var(--text);
  background: rgb(var(--accent-rgb) / 0.12);
  overflow-wrap: anywhere;
}

.streaming-local-empty span,
.streaming-local-controls {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.streaming-local-controls {
  position: absolute;
  left: auto;
  right: 16px;
  bottom: 102px;
  z-index: 4;
  width: min(440px, calc(100% - 32px));
  max-height: min(380px, calc(100% - 130px));
  padding: 12px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.34);
  border-radius: 18px;
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  overflow: hidden;
  background:
    radial-gradient(circle at 24% 0%, rgb(var(--accent-rgb) / 0.22), transparent 46%),
    rgba(9, 15, 28, 0.84);
  backdrop-filter: blur(22px) saturate(1.25);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.38), 0 0 22px rgb(var(--accent-rgb) / 0.1);
}

.streaming-local-player-card .streaming-player-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.streaming-local-select {
  display: none;
}

.streaming-local-screen .streaming-episode-picker {
  width: min(272px, calc(100% - 24px));
  max-height: min(360px, calc(100% - 110px));
  gap: 0;
  padding: 0;
  border-color: var(--line);
  background: #121925;
}

.streaming-episode-picker[hidden],
.streaming-episode-season-block[hidden] {
  display: none;
}

.streaming-episode-picker-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 8px 2px 10px;
  border-bottom: 1px solid var(--line);
}

.streaming-episode-picker-head strong {
  margin-right: auto;
  color: var(--text);
  font-size: 1rem;
}

.streaming-episode-picker-head .select {
  min-width: 0;
  width: auto;
  max-width: 60%;
  min-height: 36px;
}

.streaming-episode-picker-head .streaming-round-button {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  font-size: 1.35rem;
}

.streaming-episode-picker-list {
  min-height: 0;
  padding: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.streaming-episode-season-block {
  display: grid;
  gap: 3px;
}

.streaming-episode-choice-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
}

.streaming-episode-choice-row.has-remove {
  grid-template-columns: minmax(0, 1fr) auto;
}

.streaming-episode-choice {
  width: 100%;
  min-width: 0;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 10px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  min-height: 44px;
  gap: 8px;
  align-items: center;
  color: var(--text);
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.streaming-episode-choice:hover,
.streaming-episode-choice:focus-visible {
  border-color: rgb(var(--accent-soft-rgb) / 0.75);
  background: rgb(var(--accent-rgb) / 0.14);
}

.streaming-episode-choice.is-active {
  border-color: rgb(var(--accent-soft-rgb) / 0.45);
  background: rgb(var(--accent-rgb) / 0.18);
}

.streaming-episode-choice-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgb(var(--accent-rgb) / 0.15);
}

.streaming-episode-choice-cover img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
}

.streaming-episode-choice-play {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: white;
  background: #10141dcc;
}

.streaming-episode-choice-cover:not(.is-empty) .streaming-episode-choice-play { opacity: 0; }
.streaming-episode-choice:is(:hover, :focus-visible) .streaming-episode-choice-play { opacity: 1; }
.streaming-episode-choice-play svg,
.streaming-episode-choice-current svg { width: 14px; height: 14px; fill: currentColor; }

.streaming-episode-choice-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.streaming-episode-choice-copy strong {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 0.87rem;
}

.streaming-episode-choice-copy small {
  color: var(--muted);
  font-size: 0.72rem;
}

.streaming-episode-choice-copy small:empty { display: none; }
.streaming-episode-choice-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 5px; }
.streaming-episode-choice-meta > span:empty,
.streaming-episode-choice-meta:not(:has(> span:not(:empty))) { display: none; }

.streaming-episode-choice-current {
  display: none;
  align-items: center;
  gap: 5px;
  color: var(--text);
  font-size: 0.7rem;
}

.streaming-row-episode-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 4px; }
.streaming-row-episode-meta > .streaming-row-audio { margin-top: 0; }
.streaming-episode-status-badge {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgb(var(--accent-rgb) / 0.15);
  color: var(--soft);
  font-size: 0.67rem;
  white-space: nowrap;
}

.streaming-source-remove-button {
  min-width: 74px;
  padding: 0 10px;
  border: 1px solid rgba(248, 113, 113, 0.42);
  border-radius: 14px;
  color: #fecaca;
  font-size: 0.68rem;
  font-weight: 950;
  background:
    radial-gradient(circle at 50% 0%, rgba(248, 113, 113, 0.2), transparent 56%),
    rgba(45, 12, 18, 0.76);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.streaming-source-remove-button:hover,
.streaming-source-remove-button:focus-visible {
  border-color: rgba(248, 113, 113, 0.78);
  background: rgba(83, 17, 27, 0.84);
  outline: 0;
  transform: translateY(-1px);
}

.streaming-episode-picker .streaming-source-remove-button {
  align-self: center;
  min-width: auto;
  min-height: 36px;
  padding-inline: 8px;
  border-color: transparent;
  color: var(--muted);
  background: transparent;
}

.streaming-episode-picker .streaming-source-remove-button:is(:hover, :focus-visible) {
  color: #fecaca;
  border-color: rgb(248 113 113 / 0.45);
  background: rgb(248 113 113 / 0.1);
  transform: none;
}

.streaming-source-remove-button:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.streaming-custom-controls {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  z-index: 3;
  padding: 5px 4px 3px;
  display: grid;
  gap: 9px;
  background: transparent;
  border: 0;
  border-radius: 0;
  backdrop-filter: none;
  box-shadow: none;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.2s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.2s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: opacity, transform;
}

.streaming-custom-controls.is-disabled {
  opacity: 0.52;
}

.streaming-custom-controls.is-embed-source {
  top: 12px;
  right: auto;
  bottom: auto;
  left: 12px;
  width: auto;
  padding: 0;
  gap: 0;
  z-index: 5;
}

.streaming-custom-controls.is-embed-source .streaming-progress-slider,
.streaming-custom-controls.is-embed-source [data-streaming-skip],
.streaming-custom-controls.is-embed-source [data-streaming-play],
.streaming-custom-controls.is-embed-source [data-streaming-replay],
.streaming-custom-controls.is-embed-source .streaming-volume-control {
  display: none;
}

.streaming-custom-controls.is-embed-source .streaming-round-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.streaming-custom-controls.is-embed-source .streaming-transport-controls {
  grid-column: auto;
  justify-content: flex-start;
}

.streaming-custom-controls.is-embed-source [data-streaming-menu] {
  width: auto;
  min-width: 0;
  height: 38px;
  padding: 0 13px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.22), transparent 34%),
    linear-gradient(145deg, rgb(var(--accent-rgb) / 0.28), rgba(255, 255, 255, 0.08)),
    rgba(8, 14, 26, 0.78);
  backdrop-filter: blur(18px) saturate(1.25);
}

.streaming-custom-controls.is-embed-source [data-streaming-menu]::after {
  content: "Episodes";
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0;
}

.streaming-custom-controls.is-embed-source .streaming-fullscreen-control {
  grid-column: auto;
  justify-self: auto;
}

.streaming-custom-controls.is-embed-source .streaming-fullscreen-control .streaming-round-button {
  width: 38px;
  height: 38px;
}

.streaming-local-screen:fullscreen .streaming-custom-controls.is-embed-source,
.streaming-local-screen:-webkit-full-screen .streaming-custom-controls.is-embed-source {
  top: max(14px, env(safe-area-inset-top));
  left: max(14px, env(safe-area-inset-left));
  z-index: 20;
}

.streaming-local-screen:fullscreen.has-embed-video .streaming-local-controls,
.streaming-local-screen:-webkit-full-screen.has-embed-video .streaming-local-controls {
  top: max(62px, calc(env(safe-area-inset-top) + 58px));
  left: max(14px, env(safe-area-inset-left));
  z-index: 21;
}

.streaming-custom-controls.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.985);
}

.streaming-custom-controls.is-embed-source.is-hidden {
  transform: translateY(-10px) scale(0.985);
}

.streaming-next-episode-button {
  position: absolute;
  right: 18px;
  bottom: 108px;
  z-index: 4;
  max-width: min(240px, calc(100% - 36px));
  padding: 10px 13px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.42);
  border-radius: 16px;
  display: grid;
  gap: 2px;
  color: var(--text);
  text-align: left;
  background:
    radial-gradient(circle at 20% 0%, rgb(var(--accent-rgb) / 0.26), transparent 48%),
    rgba(10, 16, 29, 0.72);
  backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3), 0 0 22px rgb(var(--accent-rgb) / 0.12);
  cursor: pointer;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.2s cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 0.2s cubic-bezier(0.22, 0.61, 0.36, 1),
    border-color 0.16s ease;
}

.streaming-next-episode-button:hover {
  border-color: rgb(var(--accent-soft-rgb) / 0.8);
  transform: translateY(-1px);
}

.streaming-next-episode-button span {
  color: rgb(var(--accent-soft-rgb));
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.streaming-next-episode-button strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.streaming-local-screen:fullscreen .streaming-next-episode-button,
.streaming-local-screen:-webkit-full-screen .streaming-next-episode-button {
  z-index: 20;
}

.streaming-local-screen.has-embed-video .streaming-next-episode-button {
  top: 14px;
  right: 14px;
  bottom: auto;
  z-index: 19;
  opacity: 0;
  pointer-events: none;
  transform: none;
}

.streaming-local-screen:fullscreen.has-embed-video .streaming-next-episode-button,
.streaming-local-screen:-webkit-full-screen.has-embed-video .streaming-next-episode-button {
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.streaming-local-screen.streaming-controls-hidden .streaming-next-episode-button {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.985);
}

.streaming-local-screen.streaming-controls-hidden.streaming-next-ready .streaming-next-episode-button {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.streaming-local-screen.streaming-picker-open .streaming-next-episode-button {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.985);
}

.streaming-local-screen.has-embed-video .streaming-local-controls {
  top: 58px;
  right: auto;
  bottom: auto;
  left: 12px;
  width: min(420px, calc(100% - 24px));
  max-height: min(360px, calc(100% - 74px));
}

.streaming-progress-slider {
  --stream-progress: 0%;
  width: calc(100% - 26px);
  height: 16px;
  margin: 0 auto;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.streaming-progress-slider::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--text) 0 var(--stream-progress), rgba(255, 255, 255, 0.48) var(--stream-progress) 100%);
}

.streaming-progress-slider::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -6.5px;
  border: 0;
  border-radius: 999px;
  appearance: none;
  background: var(--text);
  box-shadow: 0 0 18px rgb(var(--accent-rgb) / 0.45);
}

.streaming-progress-slider::-moz-range-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
}

.streaming-progress-slider::-moz-range-progress {
  height: 5px;
  border-radius: 999px;
  background: var(--text);
}

.streaming-progress-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 999px;
  background: var(--text);
  box-shadow: 0 0 18px rgb(var(--accent-rgb) / 0.45);
}

.streaming-round-controls {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.streaming-transport-controls {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(5px, 1vw, 9px);
}

.streaming-fullscreen-control {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.streaming-round-button {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.92);
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.2), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.035)),
    rgba(15, 22, 35, 0.7);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.22),
    inset 0 -10px 18px rgba(0, 0, 0, 0.18),
    0 10px 28px rgba(0, 0, 0, 0.32);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.streaming-round-button:hover:not(:disabled) {
  border-color: rgb(var(--accent-soft-rgb) / 0.75);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.24),
    inset 0 -10px 18px rgba(0, 0, 0, 0.18),
    0 12px 32px rgba(0, 0, 0, 0.36),
    0 0 22px rgb(var(--accent-rgb) / 0.18);
}

.streaming-round-button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.streaming-round-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.streaming-round-button svg path {
  vector-effect: non-scaling-stroke;
}

.streaming-play-button {
  width: 52px;
  height: 52px;
}

.streaming-play-button svg {
  width: 25px;
  height: 25px;
}

.streaming-volume-control {
  grid-column: 1;
  justify-self: start;
  position: relative;
  width: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.streaming-volume-control::before {
  content: "";
  position: absolute;
  left: -18px;
  right: -18px;
  bottom: 100%;
  height: 22px;
}

.streaming-volume-button {
  grid-column: 1;
  flex: 0 0 auto;
}

.streaming-volume-slider {
  --stream-volume: 100%;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 3px);
  width: 88px;
  min-width: 0;
  height: 14px;
  appearance: none;
  background: transparent;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.streaming-volume-control:hover .streaming-volume-slider,
.streaming-volume-control:focus-within .streaming-volume-slider {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.streaming-volume-slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--text) 0 var(--stream-volume), rgba(255, 255, 255, 0.36) var(--stream-volume) 100%);
}

.streaming-volume-slider::-webkit-slider-thumb {
  width: 13px;
  height: 13px;
  margin-top: -4.5px;
  border: 0;
  border-radius: 999px;
  appearance: none;
  background: var(--text);
  box-shadow: 0 0 14px rgb(var(--accent-rgb) / 0.42);
}

.streaming-volume-slider::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

.streaming-volume-slider::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--text);
}

.streaming-volume-slider::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 0;
  border-radius: 999px;
  background: var(--text);
  box-shadow: 0 0 14px rgb(var(--accent-rgb) / 0.42);
}

.streaming-player-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.26);
  border-radius: 22px;
  display: grid;
  gap: 12px;
  background:
    radial-gradient(circle at 20% 0%, rgb(var(--accent-rgb) / 0.18), transparent 42%),
    rgba(8, 14, 31, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 20px 42px rgba(0, 0, 0, 0.28);
}

.streaming-player-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.streaming-player-head div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.streaming-player-head strong {
  color: var(--text);
  font-size: 0.82rem;
  text-transform: none;
}

.streaming-player-head small {
  max-width: 100%;
  color: var(--soft);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.streaming-player-head b {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.25);
  border-radius: 999px;
  color: var(--text);
  background: rgb(var(--accent-rgb) / 0.12);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: none;
}

.streaming-screen {
  position: relative;
  min-height: 0;
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(4, 8, 18, 0.88);
}

.streaming-screen.has-trailer {
  aspect-ratio: 16 / 9;
}

.streaming-screen.playing {
  background: #000;
}

.streaming-screen iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.streaming-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
}

.streaming-screen > span {
  color: var(--accent);
  font-size: 4rem;
  font-weight: 950;
}

.streaming-play-ring {
  position: absolute;
  inset: 0;
  border: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 15, 0.42));
  cursor: pointer;
}

.streaming-play-ring span {
  width: 76px;
  height: 76px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.55);
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(7, 12, 28, 0.66);
  box-shadow: 0 0 34px rgb(var(--accent-rgb) / 0.3);
}

.streaming-play-ring span::before {
  content: "";
  margin-left: 5px;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 22px solid var(--text);
}

.streaming-trailer-unavailable {
  position: absolute;
  inset: auto 14px 14px;
  padding: 10px 12px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.24);
  border-radius: 14px;
  color: var(--soft);
  background: rgba(4, 8, 18, 0.76);
  font-weight: 900;
  text-align: center;
}

.streaming-player-controls {
  min-height: 48px;
  padding: 8px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.18);
  border-radius: 18px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  background: rgba(3, 7, 18, 0.58);
}

.streaming-control-play {
  width: 38px;
  height: 38px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.36);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--text);
  background: rgb(var(--accent-rgb) / 0.22);
  cursor: pointer;
}

.streaming-control-play:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.streaming-control-play span {
  margin-left: 3px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid currentColor;
}

.streaming-progress-track {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.streaming-progress-track i {
  display: block;
  width: 36%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), rgb(var(--accent-soft-rgb) / 0.95));
  box-shadow: 0 0 18px rgb(var(--accent-rgb) / 0.42);
}

.streaming-control-meta {
  display: flex;
  gap: 7px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  white-space: nowrap;
  text-transform: uppercase;
}

.streaming-control-meta span + span::before {
  content: "/";
  margin-right: 7px;
  color: rgb(var(--accent-soft-rgb) / 0.7);
}

.streaming-player-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.streaming-player-tags span {
  padding: 7px 9px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.18);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.045);
  font-size: 0.75rem;
  font-weight: 850;
}

.streaming-service-grid a {
  flex: 1 1 130px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.22);
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--text);
  text-decoration: none;
  font-weight: 900;
  background: rgb(var(--surface-solid-rgb) / 0.68);
}

.streaming-service-grid a:hover {
  border-color: rgb(var(--accent-soft-rgb) / 0.58);
  background: rgb(var(--accent-rgb) / 0.13);
}

.streaming-trailer-link {
  width: 100%;
  min-height: 42px;
}

.streaming-queue-panel,
.streaming-info-card {
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.22);
  border-radius: 20px;
  background:
    radial-gradient(circle at 0% 0%, rgb(var(--accent-rgb) / 0.08), transparent 34%),
    rgba(8, 14, 31, 0.76);
  backdrop-filter: blur(16px);
}

.streaming-queue-panel {
  padding: 16px;
}

.streaming-season-panel {
  display: grid;
  gap: 16px;
}

.streaming-season-source-list {
  display: grid;
  gap: 14px;
}

.streaming-season-hub-block {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0% 0%, rgb(var(--accent-rgb) / 0.12), transparent 40%),
    rgba(255, 255, 255, 0.04);
}

.streaming-season-hub-block + .streaming-season-hub-block {
  margin-top: 0;
  padding-top: 12px;
}

.streaming-season-card-grid {
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
}

.streaming-season-card-shell {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.streaming-season-card {
  width: 100%;
  min-height: 218px;
  cursor: pointer;
}

.streaming-season-card.is-active {
  border-color: rgb(var(--accent-soft-rgb) / 0.9);
  background:
    linear-gradient(135deg, rgb(var(--accent-rgb) / 0.2), rgba(255, 255, 255, 0.055));
}

.streaming-season-card img,
.streaming-season-card > span {
  aspect-ratio: 16 / 10;
}

.streaming-season-remove-button {
  min-height: 34px;
  width: 100%;
}

.streaming-queue {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.streaming-queue-block + .streaming-queue-block {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgb(var(--accent-soft-rgb) / 0.16);
}

.streaming-queue-subtitle {
  margin-bottom: 11px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.streaming-queue-subtitle strong {
  color: var(--text);
  font-size: 1rem;
}

.streaming-queue-subtitle small {
  color: var(--muted);
}

.streaming-queue-card {
  min-width: 0;
  min-height: 236px;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 16px;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 8px;
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, 0.035);
}

.streaming-queue-card:hover,
.streaming-queue-card.active {
  border-color: rgb(var(--accent-soft-rgb) / 0.58);
  background: rgb(var(--accent-rgb) / 0.12);
  box-shadow: 0 0 24px rgb(var(--accent-rgb) / 0.16);
}

.streaming-queue-card img,
.streaming-queue-card > span {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.045);
}

.streaming-queue-card > span {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 2.4rem;
  font-weight: 950;
}

.streaming-queue-card strong,
.streaming-queue-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.streaming-queue-card strong {
  font-size: 0.9rem;
}

.streaming-queue-card small {
  color: var(--muted);
  font-size: 0.75rem;
}

.streaming-index-panel {
  padding: 18px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.18);
  border-radius: 24px;
  background:
    radial-gradient(circle at 18% 0%, rgb(var(--accent-rgb) / 0.16), transparent 38%),
    rgba(7, 12, 24, 0.62);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.22);
}

.streaming-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.streaming-index-card {
  min-width: 0;
  min-height: 132px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 20px;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  color: var(--text);
  text-decoration: none;
  background:
    linear-gradient(135deg, rgb(var(--accent-rgb) / 0.12), rgba(255, 255, 255, 0.045)),
    rgba(4, 9, 20, 0.56);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.streaming-index-card:hover,
.streaming-index-card:focus-visible {
  border-color: rgb(var(--accent-soft-rgb) / 0.72);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28), 0 0 24px rgb(var(--accent-rgb) / 0.12);
  outline: 0;
  transform: translateY(-2px);
}

.streaming-index-cover {
  width: 86px;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: rgb(var(--accent-soft-rgb));
  background: rgb(var(--accent-rgb) / 0.14);
}

.streaming-index-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.streaming-index-cover b {
  font-size: 1.3rem;
  font-weight: 950;
}

.streaming-index-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.streaming-index-copy small {
  color: rgb(var(--accent-soft-rgb));
  font-size: 0.7rem;
  font-weight: 950;
  text-transform: uppercase;
}

.streaming-index-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 1rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.streaming-index-copy span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 780;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.streaming-index-count {
  align-self: start;
  padding: 5px 8px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.3);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 950;
  white-space: nowrap;
  background: rgb(var(--accent-rgb) / 0.16);
}

.streaming-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.streaming-info-card {
  padding: 16px;
}

.streaming-info-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1rem;
}

.streaming-info-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.streaming-source-modal {
  width: min(760px, calc(100vw - 24px));
  max-height: min(840px, calc(100dvh - 24px));
  border-radius: 16px;
}
.streaming-manager-switch {
  display: flex; flex: none; gap: 6px; padding: 0 16px 12px;
  border-bottom: 1px solid var(--line);
}
.streaming-manager-switch [aria-pressed="true"] {
  color: var(--text);
  background: rgb(var(--accent-rgb) / .2);
  border-color: rgb(var(--accent-soft-rgb) / .48);
}
.streaming-source-form[hidden], .streaming-source-manage[hidden] { display: none; }

.streaming-manager-switch { flex-wrap: wrap; }
.streaming-manager-switch .button { flex: 1; white-space: nowrap; }
.streaming-single-source,
.streaming-batch {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.streaming-single-source[hidden], .streaming-batch[hidden] { display: none; }
.streaming-batch-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr));
  gap: 10px;
}
.streaming-batch .streaming-source-options :is(.actions, button, details) { margin-top: 8px; }
.streaming-batch [data-batch-server-field][hidden] { display: none; }
.streaming-batch textarea { resize: vertical; }
.streaming-batch-status { color: var(--muted); margin: 0; }
.streaming-batch-status:empty, .streaming-batch-results:empty { display: none; }
.streaming-batch-results {
  display: grid;
  gap: 6px;
  max-height: min(350px, 45dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.streaming-batch-row {
  display: grid;
  grid-template-columns: auto minmax(60px, 85px) minmax(0, 1fr);
  align-items: end;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.streaming-batch-include { align-self: center; padding: 4px; }
.streaming-source-form h3 { margin: 0; font-size: 1rem; }
.streaming-source-section-heading {
  display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: space-between;
}
.streaming-source-section-heading small, .streaming-managed-source small, .streaming-source-manage p { color: var(--muted); }
.streaming-source-manage label { display: grid; gap: 6px; }
.streaming-source-manage p { margin: 12px 0; }
.streaming-managed-sources { display: grid; gap: 8px; }
.streaming-managed-source {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
}
.streaming-managed-source > div { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.streaming-managed-source > button { flex: none;
}

.streaming-source-form {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.streaming-source-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.streaming-source-form label > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.streaming-source-form label b {
  color: rgb(var(--accent-soft-rgb));
}

.streaming-source-form label small {
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.streaming-anime-search-wrap {
  position: relative;
}

.streaming-anime-results {
  position: absolute;
  z-index: 95;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: grid;
  gap: 6px;
  max-height: min(360px, 48vh);
  overflow: auto;
  padding: 8px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.3);
  border-radius: 14px;
  background:
    radial-gradient(circle at 12% 0%, rgb(var(--accent-rgb) / 0.14), transparent 36%),
    rgb(var(--surface-rgb) / 0.97);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

.streaming-anime-results[hidden] {
  display: none;
}

.streaming-anime-result {
  width: 100%;
  color: var(--text);
  font: inherit;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.streaming-source-form .compact-input {
  min-height: 38px;
  max-width: 220px;
}

.streaming-episode-status {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.streaming-episode-status.error {
  color: #fca5a5;
}

.streaming-quality-select {
  min-width: 0;
}

.streaming-source-kind-select {
  min-width: 0;
}

.streaming-source-episode {
  display: grid; grid-template-columns: minmax(90px, 1fr) minmax(0, 2fr); gap: 10px;
}
.streaming-source-form :is(.input, .select) { min-width: 0; width: 100%; }
.streaming-source-form .setting-toggle { display: flex; align-items: center; }
.streaming-source-form .setting-toggle > span { text-transform: none; letter-spacing: normal; }
.streaming-source-options {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
}
.streaming-source-options summary { cursor: pointer; color: var(--text); }
.streaming-source-options label { margin-top: 10px; }
.streaming-source-footer { justify-content: flex-end; }
.streaming-add-source { justify-self: start; }
#streaming-source-message:empty { display: none; }

.streaming-source-rows {
  display: grid;
  gap: 10px;
}

.streaming-source-row {
  padding: 10px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.22);
  border-radius: 12px;
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1.3fr) minmax(0,1fr) 38px;
  gap: 10px;
  align-items: end;
  background: rgba(2, 6, 23, 0.42);
}

.streaming-source-row .icon-button {
  width: 38px;
  height: 38px;
}

.streaming-source-url { grid-column: 1 / -2; }
.streaming-source-footer { flex-wrap: wrap; }
@media (max-width: 560px) {
  .streaming-source-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr) 38px; }
  .streaming-source-row .streaming-source-audio-language { grid-column: 1 / -1; grid-row: 3; }
}
@media (max-width: 460px) {
  .streaming-source-modal { width: 100%; }
  .streaming-source-episode { grid-template-columns: 1fr; }
  .streaming-source-footer .button { flex: 1; }
}

/* Collections */
.collections-page,
.collection-detail-page {
  width: 100%;
  min-width: 0;
}

.collections-head {
  align-items: end;
}

.collections-head .button .nav-icon {
  width: 18px;
  height: 18px;
}

.collections-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 18px;
  padding: 12px 0;
  border-block: 1px solid var(--line);
}

.collections-tabs,
.collections-search,
.collection-detail-actions,
.collection-detail-stats,
.collection-editor-options,
.collection-collaborator-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.collections-tabs {
  overflow-x: auto;
  scrollbar-width: none;
}

.collections-tabs::-webkit-scrollbar {
  display: none;
}

.collection-view-tab {
  flex: 0 0 auto;
}

.collections-search {
  width: min(390px, 42vw);
}

.collections-search .input {
  min-width: 0;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: 14px;
}

.collection-card {
  display: grid;
  grid-template-rows: 178px minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(var(--surface-rgb) / 0.62);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.collection-card:hover,
.collection-card:focus-within {
  border-color: rgb(var(--accent-rgb) / 0.58);
  box-shadow: 0 10px 30px rgb(var(--accent-rgb) / 0.11);
  transform: translateY(-2px);
}

.collection-card-preview,
.collection-preview {
  display: grid;
  width: 100%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  background: rgb(var(--surface-deep-rgb) / 0.86);
}

.collection-card-preview {
  grid-template-columns: minmax(0, 1fr);
}

.collection-preview {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.collection-preview img,
.collection-preview-empty {
  width: 100%;
  height: 100%;
  min-width: 0;
  object-fit: cover;
  border-right: 1px solid rgb(var(--accent-soft-rgb) / 0.12);
}

.collection-preview-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgb(var(--surface-2-rgb) / 0.45);
}

.collection-preview-empty .nav-icon {
  width: 26px;
  height: 26px;
}

.collection-card-copy {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  padding: 14px;
}

.collection-card-title {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.collection-card-copy > p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.collection-card-owner,
.collection-owner-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
}

.collection-card-owner a,
.collection-owner-line a {
  color: var(--soft);
  font-weight: 700;
}

.collection-owner-avatar {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
}

.collection-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  margin-top: auto;
  color: var(--muted);
  font-size: 0.78rem;
}

.collection-card-stats strong {
  color: var(--soft);
}

.collection-editor-modal {
  width: min(660px, calc(100vw - 28px));
}

.collection-editor-options {
  flex-wrap: wrap;
  padding: 4px 0;
}

.collection-editor-options .filter-check {
  flex: 1 1 220px;
}

.collection-detail-head {
  display: grid;
  grid-template-columns: minmax(210px, 340px) minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin-bottom: 22px;
  padding: 18px 0 24px;
  border-bottom: 1px solid var(--line);
}

.collection-detail-head > .collection-preview {
  height: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.collection-detail-copy {
  min-width: 0;
}

.collection-detail-copy h1 {
  margin: 10px 0;
  font-size: 2rem;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.collection-detail-copy > p {
  max-width: 780px;
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.55;
  white-space: pre-wrap;
}

.collection-detail-stats {
  flex-wrap: wrap;
  margin-top: 14px;
}

.collection-detail-stats span {
  display: flex;
  flex-direction: column;
  min-width: 72px;
  color: var(--muted);
  font-size: 0.76rem;
}

.collection-detail-stats strong {
  color: var(--text);
  font-size: 1rem;
}

.collection-detail-actions {
  align-content: center;
  align-items: stretch;
  flex-direction: column;
  width: 124px;
}

.collection-detail-actions .button,
.collection-detail-actions .icon-button {
  width: 100%;
}

.collection-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 310px);
  gap: 18px;
  align-items: start;
}

.collection-items-section {
  min-width: 0;
}

.collection-items {
  display: grid;
  gap: 9px;
}

.collection-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px 42px 74px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  min-height: 112px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(var(--surface-rgb) / 0.58);
  transition: border-color 140ms ease, transform 140ms ease, opacity 140ms ease;
}

.collection-item.dragging {
  opacity: 0.48;
}

.collection-item.drag-over {
  border-color: var(--accent);
  transform: translateY(3px);
  box-shadow: 0 0 0 2px rgb(var(--accent-rgb) / 0.15);
}

.collection-drag-handle {
  display: grid;
  gap: 4px;
  width: 28px;
  height: 38px;
  padding: 9px 5px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: grab;
}

.collection-drag-handle:active {
  cursor: grabbing;
}

.collection-drag-handle span {
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.collection-rank {
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 900;
  text-align: center;
}

.collection-item-cover {
  display: block;
  width: 74px;
  height: 96px;
  overflow: hidden;
  border-radius: 6px;
}

.collection-item-cover img,
.collection-item-cover .poster-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collection-item-copy {
  min-width: 0;
}

.collection-item-copy > a {
  color: var(--text);
  font-size: 1rem;
}

.collection-item-copy p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.4;
  white-space: pre-wrap;
}

.collection-note-empty:empty {
  display: none;
}

.collection-item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.collection-item-actions [data-collection-move="down"] {
  transform: none;
}

.collection-comments-panel {
  margin-top: 18px;
}

.collection-comments {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.collection-comment {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.collection-comment:first-child {
  border-top: 0;
}

.collection-comment p {
  margin: 7px 0;
  line-height: 1.5;
  white-space: pre-wrap;
}

.collection-collaborators-panel {
  position: sticky;
  top: calc(var(--topbar-height) + 18px);
}

.collection-collaborators {
  display: grid;
  gap: 8px;
}

.collection-collaborator {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-width: 0;
}

.collection-collaborator > span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.collection-collaborator small {
  color: var(--muted);
}

.collection-collaborator-form {
  align-items: stretch;
  margin-top: 14px;
}

.collection-collaborator-form .input {
  min-width: 0;
}

.collection-add-media-modal {
  width: min(820px, calc(100vw - 28px));
}

.collection-media-search {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) auto;
  gap: 9px;
}

.collection-media-results {
  display: grid;
  gap: 7px;
  max-height: min(62vh, 620px);
  margin-top: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.collection-media-result {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.collection-media-result img,
.collection-media-result .poster-placeholder {
  width: 48px;
  height: 64px;
  object-fit: cover;
  border-radius: 5px;
}

.collection-media-result > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.collection-media-result strong,
.collection-media-result small {
  overflow-wrap: anywhere;
}

.collection-media-result small {
  color: var(--muted);
}

.media-collection-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.profile-collection-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.profile-collection-list {
  display: grid;
  gap: 8px;
}

.profile-collection-row {
  display: grid;
  grid-template-columns: 338px minmax(0, 1fr);
  min-width: 0;
  min-height: 148px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(var(--surface-rgb) / 0.68);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.profile-collection-row:hover,
.profile-collection-row:focus-within {
  border-color: rgb(var(--accent-rgb) / 0.58);
  box-shadow: 0 8px 24px rgb(var(--accent-rgb) / 0.11);
  transform: translateY(-1px);
}

.profile-collection-row-art {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 8px;
  overflow: hidden;
  background: transparent;
}

.profile-collection-posters {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  width: min(320px, 100%);
  height: 132px;
  min-width: 0;
  padding: 0 32px 0 8px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.profile-collection-poster-link,
.profile-collection-poster-empty {
  flex: 0 0 82px;
  width: 82px;
  height: 126px;
  min-width: 82px;
  overflow: hidden;
  border: 0;
  border-radius: 3px;
  background: rgb(var(--surface-2-rgb) / 0.9);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08);
}

.profile-collection-poster-link {
  position: relative;
  display: block;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 190ms cubic-bezier(0.22, 0.8, 0.24, 1);
}

.profile-collection-poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-collection-poster-link:hover,
.profile-collection-poster-link:focus-visible {
  z-index: 20;
  outline: 1px solid rgb(var(--accent-rgb) / 0.9);
  outline-offset: -1px;
  box-shadow: 0 7px 18px rgb(var(--accent-rgb) / 0.24);
  transform: translateY(-2px) scale(1.035);
}

.profile-collection-posters > * + * {
  margin-left: -32.5px;
}

.profile-collection-posters > * {
  transition: transform 190ms cubic-bezier(0.22, 0.8, 0.24, 1), box-shadow 160ms ease;
}

.profile-collection-posters:has(> .profile-collection-poster-link:hover)
  > *:has(~ .profile-collection-poster-link:hover),
.profile-collection-posters:has(> .profile-collection-poster-link:focus-visible)
  > *:has(~ .profile-collection-poster-link:focus-visible) {
  transform: translateX(-14px);
}

.profile-collection-posters:has(> .profile-collection-poster-link:hover)
  > .profile-collection-poster-link:hover ~ *,
.profile-collection-posters:has(> .profile-collection-poster-link:focus-visible)
  > .profile-collection-poster-link:focus-visible ~ * {
  transform: translateX(14px);
}

.profile-collection-posters > :nth-child(1) { z-index: 5; }
.profile-collection-posters > :nth-child(2) { z-index: 4; }
.profile-collection-posters > :nth-child(3) { z-index: 3; }
.profile-collection-posters > :nth-child(4) { z-index: 2; }
.profile-collection-posters > :nth-child(5) { z-index: 1; }

.profile-collection-poster-link:hover,
.profile-collection-poster-link:focus-visible {
  z-index: 20;
}

.profile-collection-poster-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.profile-collection-poster-empty .nav-icon {
  width: 17px;
  height: 17px;
}

.profile-collection-row-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  padding: 11px 13px;
}

.profile-collection-row-meta,
.profile-collection-row-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  color: var(--muted);
  font-size: 0.72rem;
}

.profile-collection-row-meta > span:first-child {
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
}

.profile-collection-row-title {
  color: var(--text);
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.profile-collection-row-copy > p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.profile-collection-row-stats strong {
  color: var(--soft);
}

.profile-collection-row.compact {
  grid-template-columns: 298px minmax(0, 1fr);
  min-height: 132px;
}

.profile-collection-row.compact .profile-collection-row-art {
  padding: 8px;
}

.profile-collection-row.compact .profile-collection-posters {
  width: min(280px, 100%);
  height: 118px;
}

.profile-collection-row.compact .profile-collection-poster-link,
.profile-collection-row.compact .profile-collection-poster-empty {
  flex-basis: 70px;
  width: 70px;
  min-width: 70px;
  height: 108px;
}

.profile-collection-row.compact .profile-collection-posters > * + * {
  margin-left: -27.5px;
}

.profile-collection-row.compact .profile-collection-row-copy > p {
  -webkit-line-clamp: 1;
}

.user-collections-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(var(--surface-rgb) / 0.54);
}

.user-collections-search {
  flex: 1 1 260px;
}

.user-collections-toolbar label:not(.user-collections-search) {
  flex: 0 1 190px;
}

.user-collections-result-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.76rem;
}

.collection-card.compact {
  grid-template-columns: 312px minmax(0, 1fr);
  grid-template-rows: 144px;
}

.collection-card.compact .collection-card-preview {
  display: grid;
  place-items: center;
  padding: 8px;
  overflow: hidden;
  background: transparent;
}

.collection-card.compact .media-collection-posters {
  width: min(296px, 100%);
  height: 128px;
}

.collection-card.compact .media-collection-posters .profile-collection-poster-link,
.collection-card.compact .media-collection-posters .profile-collection-poster-empty {
  flex-basis: 74px;
  width: 74px;
  min-width: 74px;
  height: 116px;
}

.collection-card.compact .media-collection-posters > * + * {
  margin-left: -28.5px;
}

.collection-card.compact .collection-card-copy {
  gap: 6px;
  padding: 10px;
}

.collection-card.compact .collection-card-copy > p,
.collection-card.compact .collection-card-owner {
  display: none;
}

.collection-card.compact .collection-card-title {
  font-size: 0.92rem;
}

.collection-card.compact .collection-card-stats {
  gap: 5px 9px;
  font-size: 0.72rem;
}

@media (max-width: 1080px) {
  .collection-detail-head {
    grid-template-columns: minmax(190px, 280px) minmax(0, 1fr);
  }

  .collection-detail-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
  }

  .collection-detail-actions .button,
  .collection-detail-actions .icon-button {
    width: auto;
  }

  .collection-item {
    grid-template-columns: 28px 38px 68px minmax(0, 1fr);
  }

  .collection-item-cover {
    width: 68px;
    height: 90px;
  }

  .collection-item-actions {
    grid-column: 2 / -1;
  }
}

@media (max-width: 820px) {
  .collections-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .collections-search {
    width: 100%;
  }

  .collection-detail-head,
  .collection-detail-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .collection-detail-head > .collection-preview {
    height: 190px;
  }

  .collection-collaborators-panel {
    position: static;
  }

  .media-collection-list,
  .profile-collection-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .collections-head {
    align-items: stretch;
  }

  .collections-head .button {
    width: 100%;
  }

  .collection-detail-copy h1 {
    font-size: 1.55rem;
  }

  .collection-item {
    grid-template-columns: 22px 30px 58px minmax(0, 1fr);
    gap: 8px;
    min-height: 94px;
    padding: 8px;
  }

  .collection-drag-handle {
    width: 22px;
    padding-inline: 3px;
  }

  .collection-item-cover {
    width: 58px;
    height: 78px;
  }

  .collection-item-actions {
    grid-column: 1 / -1;
    flex-wrap: wrap;
  }

  .collection-item-actions .button {
    flex: 1 1 auto;
  }

  .collection-media-search {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .collection-media-search .select {
    grid-column: 1 / -1;
  }

  .collection-card.compact {
    grid-template-columns: 188px minmax(0, 1fr);
    grid-template-rows: 120px;
  }

  .profile-collection-row,
  .profile-collection-row.compact {
    grid-template-columns: 194px minmax(0, 1fr);
    min-height: 124px;
  }

  .profile-collection-row-art {
    padding: 6px;
  }

  .profile-collection-posters,
  .profile-collection-row.compact .profile-collection-posters {
    width: 180px;
    height: 92px;
    padding: 0 16px 0 4px;
    border-radius: 0;
  }

  .profile-collection-poster-link,
  .profile-collection-poster-empty,
  .profile-collection-row.compact .profile-collection-poster-link,
  .profile-collection-row.compact .profile-collection-poster-empty {
    flex-basis: 54px;
    width: 54px;
    min-width: 54px;
    height: 84px;
  }

  .profile-collection-posters > * + * {
    margin-left: -27.5px;
  }

  .collection-card.compact .collection-card-preview {
    padding: 6px;
  }

  .collection-card.compact .media-collection-posters {
    width: 174px;
    padding: 0 16px 0 4px;
    height: 100px;
  }

  .collection-card.compact .media-collection-posters .profile-collection-poster-link,
  .collection-card.compact .media-collection-posters .profile-collection-poster-empty {
    flex-basis: 54px;
    width: 54px;
    min-width: 54px;
    height: 88px;
  }

  .collection-card.compact .media-collection-posters > * + * {
    margin-left: -29px;
  }

  .profile-collection-posters:has(> .profile-collection-poster-link:hover)
    > *:has(~ .profile-collection-poster-link:hover),
  .profile-collection-posters:has(> .profile-collection-poster-link:focus-visible)
    > *:has(~ .profile-collection-poster-link:focus-visible) {
    transform: translateX(-7px);
  }

  .profile-collection-posters:has(> .profile-collection-poster-link:hover)
    > .profile-collection-poster-link:hover ~ *,
  .profile-collection-posters:has(> .profile-collection-poster-link:focus-visible)
    > .profile-collection-poster-link:focus-visible ~ * {
    transform: translateX(7px);
  }

  .profile-collection-row-copy {
    padding: 9px;
  }

  .profile-collection-row-copy > p,
  .profile-collection-row-stats span:nth-child(n + 3) {
    display: none;
  }

  .user-collections-toolbar label,
  .user-collections-toolbar label:not(.user-collections-search) {
    flex: 1 1 100%;
  }

  .user-collections-result-count {
    margin-left: 0;
  }

}

/* Rich collection guides */
.collection-detail-page,
.collection-suggestions-page {
  width: min(100%, 1320px);
  margin-inline: auto;
}

.collection-preview-banner {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

.collection-preview-banner img {
  border-right: 0;
}

.collection-card-tags,
.collection-detail-tags,
.collection-item-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.collection-card-tags span,
.collection-detail-tags span,
.collection-item-genres span {
  color: var(--soft);
  font-size: 0.72rem;
  font-weight: 700;
}

.collection-editor-modal {
  width: min(880px, calc(100vw - 28px));
}

.collection-editor-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.collection-editor-wide {
  grid-column: 1 / -1;
}

.collection-field-label {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.collection-banner-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px;
}

.collection-banner-choice {
  position: relative;
  height: 72px;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgb(var(--surface-deep-rgb) / 0.82);
  color: var(--soft);
  cursor: pointer;
}

.collection-banner-choice img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collection-banner-choice span {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgb(var(--surface-deep-rgb) / 0.88);
  font-size: 0.7rem;
  font-weight: 800;
}

.collection-banner-choice.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgb(var(--accent-rgb) / 0.18), 0 0 24px rgb(var(--accent-rgb) / 0.16);
}

.collection-banner-auto {
  display: grid;
  place-items: center;
}

.collection-banner-auto span {
  position: static;
  background: transparent;
}

.collection-detail-head {
  position: relative;
  display: block;
  min-height: 330px;
  overflow: hidden;
  margin: 0 0 24px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(var(--surface-deep-rgb) / 0.92);
}

.collection-detail-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.collection-detail-head::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgb(var(--surface-deep-rgb) / 0.96) 0%, rgb(var(--surface-deep-rgb) / 0.77) 48%, rgb(var(--surface-deep-rgb) / 0.42) 100%), linear-gradient(0deg, rgb(var(--surface-deep-rgb) / 0.9), transparent 65%);
}

.collection-detail-head-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  min-height: 330px;
  padding: clamp(22px, 4vw, 52px);
}

.collection-detail-copy {
  align-self: end;
  max-width: 900px;
}

.collection-detail-copy h1 {
  max-width: 850px;
  margin: 12px 0 10px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.03;
}

.collection-detail-copy > p {
  max-width: 800px;
  margin-bottom: 12px;
  color: rgb(235 242 255 / 0.88);
  text-shadow: 0 1px 8px rgb(0 0 0 / 0.45);
}

.collection-detail-description {
  max-width: 820px;
  margin: 0 0 14px;
  color: rgb(235 242 255 / 0.8);
  line-height: 1.55;
  text-shadow: 0 1px 8px rgb(0 0 0 / 0.45);
}

.collection-detail-description p {
  margin: 0 0 7px;
}

.collection-edit-kicker {
  display: inline-block;
  margin-bottom: 2px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.collection-detail-tags {
  margin-bottom: 13px;
}

.collection-detail-tags span {
  padding: 4px 7px;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 5px;
  background: rgb(var(--surface-deep-rgb) / 0.52);
}

.collection-owner-line {
  flex-wrap: wrap;
  color: rgb(235 242 255 / 0.76);
}

.collection-source-link {
  margin-left: 6px;
  color: var(--accent);
  font-weight: 800;
}

.collection-detail-stats span {
  color: rgb(235 242 255 / 0.7);
}

.collection-detail-stats a {
  color: rgb(235 242 255 / 0.76);
  text-decoration: none;
}

.collection-detail-stats a:hover {
  color: var(--accent);
}

.collection-detail-actions {
  align-self: end;
  width: 132px;
}

.collection-detail-actions .button,
.collection-detail-actions .icon-button {
  background-color: rgb(var(--surface-deep-rgb) / 0.75);
  backdrop-filter: blur(8px);
}

.collection-detail-head.has-animated-banner {
  contain: paint;
  isolation: isolate;
  transform: translateZ(0);
}

.collection-detail-head.has-animated-banner .collection-detail-actions .button,
.collection-detail-head.has-animated-banner .collection-detail-actions .icon-button {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.collection-detail-layout {
  grid-template-columns: minmax(0, 1fr) minmax(230px, 290px);
}

.collection-detail-layout.without-aside {
  grid-template-columns: minmax(0, 1fr);
}

.collection-items-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.collection-items-toolbar h2 {
  margin: 0 0 3px;
}

.collection-items-toolbar small {
  color: var(--muted);
}

.collection-item-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
}

.collection-list-search {
  width: min(270px, 28vw);
}

.collection-item-controls > .select {
  width: 150px;
}

.collection-view-switch {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.collection-view-switch .icon-button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  border: 0;
}

.collection-view-switch .icon-button.active {
  color: var(--text);
  background: rgb(var(--accent-rgb) / 0.2);
  box-shadow: 0 0 16px rgb(var(--accent-rgb) / 0.18);
}

.collection-item {
  isolation: isolate;
  grid-template-columns: 28px 42px 96px minmax(0, 1fr);
  align-items: start;
  min-height: 236px;
  overflow: hidden;
  padding: 16px;
  background: rgb(var(--surface-rgb) / 0.74);
}

.collection-item.read-only {
  grid-template-columns: 42px 96px minmax(0, 1fr);
}

.collection-item::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgb(var(--surface-rgb) / 0.98) 0%, rgb(var(--surface-rgb) / 0.94) 54%, rgb(var(--surface-rgb) / 0.74) 100%);
}

.collection-item-backdrop {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  opacity: 0.46;
}

.collection-drag-handle,
.collection-rank,
.collection-item-cover,
.collection-item-copy,
.collection-item-actions {
  position: relative;
  z-index: 1;
}

.collection-rank {
  padding-top: 5px;
  font-size: 1.45rem;
}

.collection-rank small {
  margin-right: 1px;
  color: var(--muted);
  font-size: 0.66rem;
}

.collection-item-cover {
  width: 96px;
  height: 138px;
  border: 1px solid rgb(255 255 255 / 0.16);
  box-shadow: 0 10px 24px rgb(0 0 0 / 0.28);
}

.collection-item-copy {
  display: grid;
  gap: 9px;
}

.collection-item-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.collection-item-title {
  color: var(--text);
  font-size: 1.18rem;
  font-weight: 900;
  line-height: 1.2;
}

.collection-item-scores {
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
}

.collection-item-scores > span {
  display: grid;
  min-width: 48px;
  padding: 5px 7px;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 6px;
  background: rgb(var(--surface-deep-rgb) / 0.62);
  text-align: center;
}

.collection-item-scores small {
  color: var(--muted);
  font-size: 0.61rem;
  text-transform: uppercase;
}

.collection-item-scores strong {
  font-size: 0.86rem;
}

.collection-item-genres span {
  padding: 3px 6px;
  border: 1px solid rgb(255 255 255 / 0.12);
  border-radius: 5px;
  background: rgb(var(--surface-deep-rgb) / 0.46);
}

.collection-item-synopsis {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: rgb(226 235 250 / 0.76);
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.collection-public-note,
.collection-private-note {
  padding: 11px 13px;
  border-left: 3px solid var(--accent);
  background: rgb(var(--surface-deep-rgb) / 0.64);
}

.collection-public-note h3 {
  margin: 0 0 7px;
  font-size: 0.92rem;
}

.collection-private-note {
  border-left-color: var(--gold);
}

.collection-private-note > strong {
  display: block;
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 0.73rem;
  text-transform: uppercase;
}

.collection-rich-text {
  color: rgb(232 239 252 / 0.84);
  line-height: 1.5;
}

.collection-rich-text h3,
.collection-rich-text h4 {
  margin: 10px 0 5px;
  font-size: 0.9rem;
}

.collection-rich-text p,
.collection-rich-text ul {
  margin: 5px 0;
}

.collection-rich-text ul {
  padding-left: 20px;
}

.collection-rich-text code {
  padding: 2px 4px;
  border-radius: 4px;
  background: rgb(255 255 255 / 0.08);
}

.collection-item-actions {
  grid-column: 4;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.collection-filter-empty {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.collection-items.is-sorted .collection-drag-handle,
.collection-items.is-sorted [data-collection-move] {
  opacity: 0.35;
  cursor: not-allowed;
}

.collection-items.is-compact .collection-item {
  grid-template-columns: 26px 36px 62px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 94px;
  padding: 8px 10px;
}

.collection-items.is-compact .collection-item.read-only {
  grid-template-columns: 36px 62px minmax(0, 1fr);
}

.collection-items.is-compact .collection-item-backdrop,
.collection-items.is-compact .collection-item-synopsis,
.collection-items.is-compact .collection-item-genres,
.collection-items.is-compact .collection-public-note,
.collection-items.is-compact .collection-private-note,
.collection-items.is-compact .collection-note-empty {
  display: none;
}

.collection-items.is-compact .collection-item-cover {
  width: 62px;
  height: 78px;
  box-shadow: none;
}

.collection-items.is-compact .collection-item-copy {
  display: block;
}

.collection-items.is-compact .collection-item-heading {
  align-items: center;
}

.collection-items.is-compact .collection-item-actions {
  grid-column: 5;
}

.collection-item-editor-modal {
  width: min(760px, calc(100vw - 28px));
}

.collection-note-textarea {
  min-height: 240px;
}

.collection-subpage-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: clamp(20px, 3vw, 34px) 0 18px;
  border-bottom: 1px solid var(--line);
}

.collection-subpage-head h1 {
  margin: 4px 0 7px;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.collection-subpage-head p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
}

.collection-suggestion-search-panel {
  margin-bottom: 20px;
}

.collection-suggestions-section {
  padding-bottom: 28px;
}

.collection-suggestions-title {
  align-items: end;
  margin-bottom: 10px;
}

.collection-suggestions-title .select {
  width: 190px;
}

.collection-suggestions-list {
  display: grid;
  gap: 9px;
}

.collection-suggestion-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(var(--surface-rgb) / 0.7);
}

.collection-suggestion-cover {
  display: block;
  width: 96px;
  height: 136px;
  overflow: hidden;
  border-radius: 5px;
}

.collection-suggestion-cover img,
.collection-suggestion-cover .poster-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collection-suggestion-copy {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.collection-suggestion-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.collection-suggestion-heading > div {
  min-width: 0;
}

.collection-suggestion-title {
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.collection-suggestion-status {
  text-transform: capitalize;
}

.collection-suggestion-user {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.collection-suggestion-user span {
  display: grid;
}

.collection-suggestion-user small {
  color: var(--muted);
}

.collection-suggestion-note,
.collection-suggestion-review {
  color: var(--soft);
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.collection-suggestion-review {
  padding-left: 10px;
  border-left: 2px solid var(--accent);
}

.collection-suggestion-review strong {
  display: block;
  margin-bottom: 3px;
  color: var(--accent);
  font-size: 0.7rem;
  text-transform: uppercase;
}

@media (max-width: 1080px) {
  .collection-detail-head-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .collection-detail-actions {
    grid-column: auto;
    flex-direction: row;
    width: 100%;
  }

  .collection-detail-actions .button,
  .collection-detail-actions .icon-button {
    width: auto;
  }

  .collection-detail-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .collection-collaborators-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .collection-subpage-head {
    align-items: stretch;
    flex-direction: column;
  }

  .collection-items-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .collection-item-controls {
    justify-content: stretch;
  }

  .collection-list-search {
    width: auto;
    flex: 1 1 180px;
  }

  .collection-item {
    grid-template-columns: 24px 34px 76px minmax(0, 1fr);
  }

  .collection-item.read-only {
    grid-template-columns: 34px 76px minmax(0, 1fr);
  }

  .collection-item-cover {
    width: 76px;
    height: 108px;
  }

  .collection-item-actions {
    grid-column: 3 / -1;
  }

  .collection-items.is-compact .collection-item {
    grid-template-columns: 24px 32px 56px minmax(0, 1fr);
  }

  .collection-items.is-compact .collection-item.read-only {
    grid-template-columns: 32px 56px minmax(0, 1fr);
  }

  .collection-items.is-compact .collection-item-actions {
    grid-column: 3 / -1;
  }
}

@media (max-width: 560px) {
  .collection-suggestions-title {
    align-items: stretch;
    flex-direction: column;
  }

  .collection-suggestions-title .select {
    width: 100%;
  }

  .collection-suggestion-card {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 10px;
    padding: 9px;
  }

  .collection-suggestion-cover {
    width: 68px;
    height: 98px;
  }

  .collection-suggestion-heading {
    display: grid;
  }

  .collection-editor-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .collection-editor-wide {
    grid-column: auto;
  }

  .collection-detail-head,
  .collection-detail-head-inner {
    min-height: 360px;
  }

  .collection-detail-head-inner {
    padding: 18px;
  }

  .collection-detail-copy h1 {
    font-size: 2rem;
  }

  .collection-detail-copy > p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 6;
  }

  .collection-detail-tags {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: none;
  }

  .collection-detail-tags::-webkit-scrollbar {
    display: none;
  }

  .collection-detail-tags span {
    flex: 0 0 auto;
  }

  .collection-detail-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .collection-detail-actions .button,
  .collection-detail-actions .icon-button {
    width: 100%;
  }

  .collection-item-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .collection-list-search {
    grid-column: 1 / -1;
    width: 100%;
  }

  .collection-item {
    grid-template-columns: 20px 28px 58px minmax(0, 1fr);
    gap: 7px;
    min-height: 160px;
    padding: 9px;
  }

  .collection-item.read-only {
    grid-template-columns: 28px 58px minmax(0, 1fr);
  }

  .collection-item-cover {
    width: 58px;
    height: 82px;
  }

  .collection-item-heading {
    display: grid;
  }

  .collection-item-scores {
    justify-content: flex-start;
  }

  .collection-item-title {
    font-size: 0.98rem;
  }

  .collection-item-synopsis,
  .collection-item-genres {
    display: none;
  }

  .collection-public-note,
  .collection-private-note {
    grid-column: 1 / -1;
    padding: 9px;
  }

  .collection-items.is-compact .collection-item {
    grid-template-columns: 20px 28px 52px minmax(0, 1fr);
  }

  .collection-items.is-compact .collection-item.read-only {
    grid-template-columns: 28px 52px minmax(0, 1fr);
  }

  .collection-items.is-compact .collection-item-cover {
    width: 52px;
    height: 70px;
  }
}

.amv-page {
  gap: clamp(12px, 1.3vw, 20px);
  color-scheme: dark;
}

.amv-page > .streaming-page-head {
  display: none;
}

.amv-hero,
.amv-library-panel {
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.24);
  border-radius: 26px;
  background:
    radial-gradient(circle at 12% 0%, rgb(var(--accent-rgb) / 0.18), transparent 34%),
    linear-gradient(135deg, rgba(8, 14, 31, 0.88), rgba(4, 9, 22, 0.78));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 22px 48px rgba(0, 0, 0, 0.28);
}

.amv-hero {
  min-height: auto;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(300px, 0.82fr);
  gap: 14px;
  align-items: stretch;
}

.amv-hero .streaming-local-player-card {
  min-height: 100%;
}

.amv-hero-copy {
  min-width: 0;
  padding: clamp(14px, 2vw, 24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  display: grid;
  align-content: start;
  gap: 12px;
  background:
    radial-gradient(circle at 80% 10%, rgb(var(--accent-rgb) / 0.18), transparent 42%),
    rgba(255, 255, 255, 0.04);
}

.amv-hero-copy h2 {
  max-width: 680px;
  margin: 0;
  color: var(--text);
  font-size: clamp(1.3rem, 2.2vw, 2.2rem);
  line-height: 1.05;
}

.amv-hero-copy h2 code,
.amv-empty-state code {
  padding: 0.08rem 0.34rem;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.3);
  border-radius: 8px;
  color: rgb(var(--accent-soft-rgb));
  background: rgb(var(--accent-rgb) / 0.13);
}

.amv-hero-copy p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.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;
}

.amv-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.amv-stat-grid span {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.22);
  border-radius: 16px;
  display: grid;
  gap: 2px;
  background: rgba(255, 255, 255, 0.045);
}

.amv-stat-grid strong {
  color: var(--text);
  font-size: 1.22rem;
  font-weight: 950;
}

.amv-stat-grid small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.amv-upload-panel {
  min-width: 0;
  padding: clamp(16px, 2.5vw, 26px);
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.26);
  border-radius: 22px;
  display: grid;
  align-content: center;
  gap: 12px;
  background:
    radial-gradient(circle at 20% 0%, rgb(var(--accent-rgb) / 0.16), transparent 38%),
    rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.amv-upload-modal {
  width: min(560px, calc(100vw - 28px));
}

.amv-upload-modal .modal-body {
  display: grid;
  gap: 12px;
}

.amv-upload-modal .amv-upload-panel {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.amv-upload-modal .amv-file-button {
  min-height: 84px;
  border-radius: 18px;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgb(var(--accent-rgb) / 0.22), transparent 42%),
    rgba(255, 255, 255, 0.055);
}

.amv-upload-cta {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.2);
  border-radius: 18px;
  display: grid;
  gap: 8px;
  background:
    radial-gradient(circle at 100% 0%, rgb(var(--accent-rgb) / 0.2), transparent 42%),
    rgba(255, 255, 255, 0.045);
}

.amv-upload-cta strong {
  color: var(--text);
  font-size: 0.98rem;
}

.amv-upload-cta small {
  color: var(--muted);
  line-height: 1.35;
}

.amv-upload-panel strong {
  display: block;
  color: var(--text);
  font-size: 1.05rem;
}

.amv-upload-panel small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.amv-upload-panel code {
  color: rgb(var(--accent-soft-rgb));
}

.amv-upload-panel input[type="text"],
.amv-upload-panel select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: var(--text);
  background: rgba(2, 8, 22, 0.64);
}

.amv-upload-hint {
  margin-top: -4px;
  color: rgb(var(--accent-soft-rgb));
  font-size: 0.74rem;
  font-weight: 800;
}

.amv-file-button {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px dashed rgb(var(--accent-soft-rgb) / 0.44);
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--soft);
  font-weight: 900;
  cursor: pointer;
  background: rgb(var(--accent-rgb) / 0.1);
}

.amv-file-button span,
.amv-file-button small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.amv-file-button small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.amv-file-button input {
  display: none;
}

.amv-upload-message {
  min-height: 1.1rem;
  color: rgb(var(--accent-soft-rgb));
  font-size: 0.82rem;
  font-weight: 850;
}

.amv-library-panel {
  min-height: min(940px, calc(100svh - 114px));
  padding: clamp(12px, 1.2vw, 20px);
  display: grid;
  gap: clamp(12px, 1.1vw, 18px);
  align-content: start;
  background:
    radial-gradient(circle at 58% 0%, rgb(var(--accent-rgb) / 0.12), transparent 34%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.94), rgba(3, 5, 12, 0.92));
}

.amv-reel-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.amv-upload-main-button {
  min-height: 40px;
  padding-inline: 16px;
  white-space: nowrap;
}

.amv-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.amv-filter {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: var(--soft);
  font-size: 0.8rem;
  font-weight: 950;
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.amv-filter:hover,
.amv-filter.active {
  border-color: rgb(var(--accent-soft-rgb) / 0.78);
  color: var(--text);
  background: rgb(var(--accent-rgb) / 0.16);
}

.amv-filter:disabled {
  opacity: 0.46;
  cursor: default;
}

.amv-filter:hover {
  transform: translateY(-1px);
}

.amv-filter:disabled:hover {
  transform: none;
}

.amv-filter span {
  min-width: 1.4rem;
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.amv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.amv-feed-stage {
  --amv-reel-height: clamp(620px, calc(100svh - 230px), 880px);
  position: relative;
  min-height: var(--amv-reel-height);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
}

.amv-reel-shell {
  position: relative;
  width: min(100%, 1120px);
  height: var(--amv-reel-height);
  min-height: 0;
  display: grid;
  isolation: isolate;
}

.amv-reel {
  width: 100%;
  height: 100%;
  min-height: 0;
  justify-self: stretch;
  border: 0;
  border-radius: clamp(18px, 1.6vw, 28px);
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-padding: 0;
  scroll-behavior: smooth;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  outline: none;
  background: #000;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.58);
  scrollbar-width: none;
}

.amv-reel::-webkit-scrollbar {
  width: 0;
}

.amv-reel:focus-visible {
  box-shadow: 0 0 0 3px rgb(var(--accent-soft-rgb) / 0.36), 0 22px 48px rgba(0, 0, 0, 0.28);
}

.amv-reel-item {
  position: relative;
  min-height: 0;
  height: var(--amv-reel-height);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  background: #020714;
}

.amv-reel-item[hidden] {
  display: none;
}

.amv-reel-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  transition: filter 0.18s ease, transform 0.35s ease;
}

.amv-reel-item.is-muted .amv-reel-video {
  filter: brightness(0.86) saturate(0.92);
}

.amv-reel-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), transparent 38%, rgba(0, 0, 0, 0.78)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.28), transparent 25%, transparent 76%, rgba(0, 0, 0, 0.42));
}

.amv-reel-info {
  position: absolute;
  left: clamp(16px, 3vw, 34px);
  right: clamp(110px, 9vw, 150px);
  bottom: clamp(4px, 1.15vw, 18px);
  z-index: 2;
  display: grid;
  gap: 9px;
  pointer-events: none;
}

.amv-reel-info h2 {
  max-width: min(760px, 86%);
  margin: 0;
  color: var(--text);
  font-size: clamp(1.45rem, 3.2vw, 3rem);
  line-height: 1;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.52);
}

.amv-reel-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.amv-reel-meta span {
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: var(--soft);
  font-size: 0.76rem;
  font-weight: 900;
  background: rgba(2, 8, 22, 0.58);
  backdrop-filter: blur(16px);
}

.amv-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  pointer-events: auto;
}

.amv-tag-chip {
  padding: 6px 10px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.2);
  border-radius: 999px;
  color: var(--soft);
  font-size: 0.76rem;
  font-weight: 950;
  background: rgba(2, 8, 22, 0.62);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  backdrop-filter: blur(16px);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.amv-tag-chip:hover,
.amv-tag-chip.active,
.amv-tag-chip.is-match {
  border-color: rgb(var(--accent-soft-rgb) / 0.72);
  color: var(--text);
  background: rgb(var(--accent-rgb) / 0.18);
}

.amv-tag-chip:hover {
  transform: translateY(-1px);
}

.amv-reel-play {
  position: absolute;
  z-index: 3;
  right: clamp(18px, 3vw, 34px);
  top: clamp(18px, 3vw, 34px);
  bottom: auto;
  width: 68px;
  min-height: 68px;
  padding: 9px 6px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.42);
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  gap: 2px;
  color: var(--text);
  background: rgba(5, 12, 28, 0.66);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.3), 0 0 28px rgb(var(--accent-rgb) / 0.16);
  cursor: pointer;
  backdrop-filter: blur(16px);
  transition: opacity 0.16s ease, transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.amv-action-rail {
  position: absolute;
  z-index: 3;
  right: clamp(14px, 2vw, 28px);
  top: 50%;
  display: grid;
  gap: 15px;
  justify-items: center;
  transform: translateY(-50%);
}

.amv-action-avatar {
  position: relative;
  width: 50px;
  height: 50px;
  border: 2px solid rgb(var(--accent-soft-rgb) / 0.82);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: inherit;
  text-decoration: none;
  background: #101010;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
}

.amv-action-avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.amv-action-avatar b {
  position: absolute;
  right: -2px;
  bottom: -7px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  background: #ff2f65;
}

.amv-action-button,
.amv-reel-nav button {
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(32, 32, 32, 0.92);
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.amv-action-button {
  min-width: 54px;
  gap: 5px;
  background: transparent;
}

.amv-action-button svg {
  width: 48px;
  height: 48px;
  padding: 13px;
  border-radius: 999px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.8;
  background: rgba(32, 32, 32, 0.92);
}

.amv-action-button small {
  color: #fff;
  font-size: 0.72rem;
  font-weight: 950;
  text-shadow: 0 5px 14px rgba(0, 0, 0, 0.58);
}

.amv-action-button:hover,
.amv-action-button.active {
  color: rgb(var(--accent-soft-rgb));
}

.amv-action-button:hover svg,
.amv-action-button.active svg {
  background: rgba(46, 46, 46, 0.96);
  box-shadow: 0 0 24px rgb(var(--accent-rgb) / 0.24);
  transform: translateY(-1px);
}

.amv-action-button.copied svg {
  color: #7cffc7;
}

.amv-action-button:disabled {
  opacity: 0.58;
  cursor: progress;
}

.amv-reel-nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  left: clamp(10px, 1.4vw, 18px);
  display: grid;
  gap: 12px;
  transform: translateY(-50%);
}

.amv-reel-nav button {
  width: clamp(44px, 3.5vw, 56px);
  height: clamp(44px, 3.5vw, 56px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
  background: rgba(6, 12, 28, 0.58);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.amv-reel-nav button:hover {
  color: #fff;
  background: rgb(var(--accent-rgb) / 0.52);
  transform: translateY(-1px);
}

.amv-reel-nav svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
}

.amv-reel-play span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
}

.amv-reel-play svg {
  width: 22px;
  height: 22px;
}

.amv-reel-play small {
  color: var(--soft);
  font-size: 0.64rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.amv-reel-play:hover,
.amv-reel-play:focus-visible {
  border-color: rgb(var(--accent-soft-rgb) / 0.78);
  background: rgb(var(--accent-rgb) / 0.22);
}

.amv-reel-item.is-playing:not(.is-muted):not(:hover):not(:focus-within) .amv-reel-play {
  opacity: 0.34;
  transform: scale(0.96);
}

.amv-sound-hint {
  position: absolute;
  top: clamp(16px, 3vw, 28px);
  left: 50%;
  z-index: 3;
  padding: 8px 12px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.42);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 950;
  background: rgba(5, 12, 28, 0.72);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
  transform: translateX(-50%);
  backdrop-filter: blur(16px);
  pointer-events: none;
}

.amv-sound-hint[hidden] {
  display: none;
}

.amv-comments-modal {
  width: min(620px, calc(100vw - 28px));
}

.amv-comments-body {
  display: grid;
  gap: 14px;
}

.amv-comments-list {
  max-height: min(52vh, 440px);
  overflow: auto;
  display: grid;
  gap: 10px;
}

.amv-comment-item {
  padding: 11px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.18);
  border-radius: 16px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.amv-comment-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--text);
}

.amv-comment-head small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.amv-comment-item p {
  margin: 4px 0 0;
  color: var(--soft);
  line-height: 1.45;
}

.amv-comment-form {
  padding: 10px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.18);
  border-radius: 18px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  background: rgba(255, 255, 255, 0.045);
}

.amv-comment-form .comment-composer-body {
  min-width: 0;
}

.amv-comment-form textarea {
  min-height: 48px;
  resize: vertical;
}

@media (min-width: 1100px) {
  .amv-feed-stage:has(> #amv-comments-modal:not([hidden])) {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 410px);
    gap: 14px;
    align-items: stretch;
    place-items: stretch;
  }

  .amv-feed-stage:has(> #amv-comments-modal:not([hidden])) .amv-reel-shell {
    width: 100%;
  }

  .amv-feed-stage > #amv-comments-modal:not([hidden]) {
    position: relative;
    inset: auto;
    z-index: 6;
    width: 100%;
    height: var(--amv-reel-height);
    min-height: 0;
    padding: 0;
    display: block;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    pointer-events: none;
  }

  .amv-feed-stage > #amv-comments-modal .amv-comments-modal {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 24px;
    border-color: rgb(var(--accent-soft-rgb) / 0.26);
    background:
      radial-gradient(circle at 18% 0%, rgb(var(--accent-rgb) / 0.16), transparent 34%),
      linear-gradient(180deg, rgba(7, 14, 31, 0.96), rgba(4, 8, 20, 0.92));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.07),
      0 22px 50px rgba(0, 0, 0, 0.36);
    pointer-events: auto;
  }

  .amv-feed-stage > #amv-comments-modal .modal-head {
    padding: 15px;
    border-bottom-color: rgb(var(--accent-soft-rgb) / 0.16);
    background: rgba(255, 255, 255, 0.035);
  }

  .amv-feed-stage > #amv-comments-modal .modal-head h2 {
    font-size: 1rem;
  }

  .amv-feed-stage > #amv-comments-modal .modal-head p {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .amv-feed-stage > #amv-comments-modal .amv-comments-body {
    padding: 12px;
    gap: 12px;
    grid-template-rows: minmax(0, 1fr) auto auto;
    overflow: hidden;
  }

  .amv-feed-stage > #amv-comments-modal .amv-comments-list {
    max-height: none;
    min-height: 0;
    overflow: auto;
  }

  .amv-feed-stage > #amv-comments-modal .comment-item {
    padding: 10px;
    border-radius: 16px;
  }

  .amv-feed-stage > #amv-comments-modal .comment-composer-avatar {
    width: 34px;
    height: 34px;
  }

  .amv-feed-stage > #amv-comments-modal .amv-comment-form {
    grid-template-columns: 34px minmax(0, 1fr);
    border-radius: 18px;
  }

  .amv-feed-stage > #amv-comments-modal .comment-composer-actions {
    gap: 6px;
  }

  .amv-feed-stage > #amv-comments-modal .comment-composer-actions .button {
    min-height: 34px;
  }
}

.amv-toast {
  position: fixed;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 5000;
  max-width: min(440px, calc(100vw - 28px));
  padding: 10px 14px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.32);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 850;
  background: rgba(5, 12, 28, 0.88);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}

.amv-toast[hidden] {
  display: none;
}

.amv-card {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  color: var(--text);
  text-align: left;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.028));
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.amv-card[hidden] {
  display: none;
}

.amv-card:hover,
.amv-card.is-active {
  border-color: rgb(var(--accent-soft-rgb) / 0.82);
  background: rgb(var(--accent-rgb) / 0.14);
  box-shadow: 0 0 24px rgb(var(--accent-rgb) / 0.12);
  transform: translateY(-2px);
}

.amv-card-art {
  width: 72px;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--text);
  font-size: 1.4rem;
  font-weight: 950;
  background:
    radial-gradient(circle at 35% 20%, rgb(var(--accent-soft-rgb) / 0.55), transparent 40%),
    linear-gradient(135deg, rgb(var(--accent-rgb) / 0.36), rgba(2, 6, 23, 0.7));
}

.amv-card-copy,
.amv-card-meta {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.amv-card-copy strong,
.amv-card-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.amv-card-copy strong {
  font-size: 0.88rem;
  font-weight: 950;
}

.amv-card-copy small,
.amv-card-meta small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.amv-card-meta {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.amv-card-meta b {
  padding: 3px 7px;
  border-radius: 999px;
  color: rgb(var(--accent-soft-rgb));
  font-size: 0.68rem;
  background: rgb(var(--accent-rgb) / 0.12);
}

.amv-empty-state {
  padding: 24px;
  border: 1px dashed rgb(var(--accent-soft-rgb) / 0.32);
  border-radius: 20px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  display: grid;
  gap: 10px;
  justify-items: start;
}

.amv-empty-state strong {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-size: 1rem;
}

.amv-empty-state p {
  margin: 0;
  line-height: 1.55;
}

@media (min-width: 1320px) {
  html.amv-page-active,
  body.amv-page-active {
    overflow-y: hidden;
  }

  body.amv-page-active .main {
    height: 100dvh;
    overflow: hidden;
  }

  body.amv-page-active .content {
    height: calc(100dvh - var(--topbar-height) - 16px);
    padding-top: 18px;
    padding-bottom: 12px;
    overflow: hidden;
  }

  body.amv-page-active .amv-page {
    height: 100%;
    min-height: 0;
  }

  .amv-page {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
    align-items: start;
  }

  .amv-library-panel {
    grid-column: 1;
    grid-row: 1;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }

  .amv-hero {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: 92px;
    grid-template-columns: 1fr;
    max-height: calc(100svh - 112px);
    overflow: auto;
  }

  body.amv-page-active .amv-feed-stage {
    --amv-reel-height: clamp(560px, calc(100svh - 278px), 820px);
  }

  .amv-hero-copy h2 {
    font-size: clamp(1.3rem, 1.5vw, 1.85rem);
  }

  .amv-stat-grid {
    grid-template-columns: 1fr;
  }

  .amv-upload-cta {
    align-self: start;
  }
}

@media (min-width: 1720px) {
  .amv-page {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  }

  .amv-feed-stage {
    --amv-reel-height: clamp(690px, calc(100svh - 220px), 940px);
  }

  .amv-reel-shell {
    width: min(100%, 1280px);
  }
}

@media (max-width: 980px) {
  .streaming-hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .amv-hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .amv-feed-stage {
    --amv-reel-height: min(80svh, 760px);
  }

  .amv-reel-shell {
    width: 100%;
    min-height: 540px;
  }

  .amv-reel-item {
    min-height: 540px;
  }

  .streaming-hero-copy {
    order: 1;
    padding-top: 0;
  }

  .streaming-side-stack {
    order: 2;
    width: min(100%, 560px);
    max-width: none;
  }

  .streaming-info-grid {
    grid-template-columns: 1fr;
  }

  .streaming-index-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

@media (max-width: 620px) {
  .streaming-hero {
    padding: 18px;
    border-radius: 20px;
  }

  .streaming-hero h1 {
    font-size: clamp(2rem, 13vw, 3.3rem);
  }

  .streaming-index-panel {
    padding: 12px;
    border-radius: 20px;
  }

  .streaming-index-grid {
    grid-template-columns: 1fr;
  }

  .streaming-index-card {
    grid-template-columns: 72px minmax(0, 1fr);
    min-height: 112px;
  }

  .streaming-index-cover {
    width: 72px;
  }

  .streaming-index-count {
    grid-column: 2;
    justify-self: start;
  }

  .streaming-local-controls {
    left: 12px;
    right: 12px;
    bottom: 88px;
    width: auto;
    max-height: min(420px, 54vh);
    padding: 10px;
  }

  .streaming-next-episode-button {
    right: 12px;
    bottom: 86px;
    max-width: min(210px, calc(100% - 24px));
    padding: 8px 10px;
    border-radius: 14px;
  }

  .streaming-next-episode-button strong {
    font-size: 0.76rem;
  }

  .streaming-custom-controls {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 0;
    gap: 8px;
  }

  .streaming-progress-slider {
    width: calc(100% - 16px);
  }

  .streaming-round-controls {
    grid-template-columns: 30px minmax(0, 1fr) 30px;
    gap: 4px;
  }

  .streaming-transport-controls {
    grid-column: 2;
    justify-content: center;
    gap: 3px;
    min-width: 0;
  }

  .streaming-fullscreen-control {
    grid-column: 3;
    justify-self: end;
  }

  .streaming-round-button {
    width: 30px;
    height: 30px;
  }

  .streaming-play-button {
    width: 40px;
    height: 40px;
  }

  .streaming-round-button svg {
    width: 15px;
    height: 15px;
  }

  .streaming-play-button svg {
    width: 20px;
    height: 20px;
  }

  .streaming-volume-control {
    gap: 5px;
  }

  .streaming-volume-slider {
    display: block;
    width: 76px;
  }

  .streaming-volume-control {
    display: flex;
    width: auto;
  }

  .streaming-queue {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .streaming-queue-card {
    min-height: 210px;
  }

  .amv-hero,
  .amv-library-panel {
    padding: 12px;
    border-radius: 20px;
  }

  .amv-hero-copy {
    padding: 16px;
  }

  .amv-stat-grid {
    grid-template-columns: 1fr;
  }

  .amv-grid {
    grid-template-columns: 1fr;
  }

  .amv-feed-stage {
    grid-template-columns: 1fr;
    --amv-reel-height: min(78svh, 720px);
    min-height: var(--amv-reel-height);
  }

  .amv-reel-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .amv-upload-main-button {
    width: 100%;
  }

  .amv-reel-shell {
    width: 100%;
    min-height: 540px;
  }

  .amv-reel,
  .amv-reel-item {
    border-radius: 18px;
  }

  .amv-reel-item {
    min-height: 540px;
  }

  .amv-reel-info {
    bottom: 14px;
    right: 84px;
  }

  .amv-reel-info h2 {
    max-width: 100%;
    font-size: clamp(1.35rem, 9vw, 2.2rem);
  }

  .amv-reel-play {
    width: 58px;
    min-height: 58px;
    padding: 7px 5px;
    right: 14px;
    top: 14px;
    bottom: auto;
  }

  .amv-action-rail {
    right: 10px;
    gap: 10px;
  }

  .amv-action-avatar {
    width: 42px;
    height: 42px;
  }

  .amv-action-button svg {
    width: 42px;
    height: 42px;
    padding: 11px;
  }

  .amv-action-button small {
    font-size: 0.64rem;
  }

  .amv-reel-nav {
    display: none;
  }

  .amv-reel-play svg {
    width: 19px;
    height: 19px;
  }

  .amv-reel-play small {
    font-size: 0.58rem;
  }

  .amv-sound-hint {
    top: 14px;
    max-width: calc(100% - 30px);
    white-space: nowrap;
  }

  .amv-comment-form {
    grid-template-columns: 34px minmax(0, 1fr);
  }
}

@media (max-width: 390px) {
  .streaming-custom-controls {
    left: 8px;
    right: 8px;
    gap: 6px;
  }

  .streaming-round-controls {
    gap: 2px;
  }

  .streaming-transport-controls {
    gap: 2px;
  }

  .streaming-round-button {
    width: 28px;
    height: 28px;
  }

  .streaming-play-button {
    width: 36px;
    height: 36px;
  }

  .streaming-round-button svg {
    width: 14px;
    height: 14px;
  }

  .streaming-play-button svg {
    width: 18px;
    height: 18px;
  }
}

.card-body {
  padding: 11px;
  display: grid;
  gap: 7px;
}

.media-card .card-body {
  grid-template-rows: minmax(2.5em, auto) auto auto;
  align-content: start;
}

.media-title {
  min-height: 42px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.media-card .media-title {
  min-height: 2.5em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-line {
  color: var(--muted);
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(18, 27, 55, 0.8);
  border: 1px solid var(--line);
  color: var(--soft);
  font-size: 0.78rem;
  white-space: nowrap;
}

.pill.hot {
  color: var(--text);
  border-color: rgb(var(--accent-soft-rgb) / 0.45);
  background: rgb(var(--accent-rgb) / 0.13);
}

.pill.ok {
  color: #defde8;
  border-color: rgba(134, 239, 172, 0.42);
  background: rgba(134, 239, 172, 0.12);
}

.pill.danger {
  color: #ffe8ed;
  border-color: rgba(251, 113, 133, 0.45);
  background: rgba(251, 113, 133, 0.13);
}

.pill.gold {
  color: #fff3d0;
  border-color: rgba(251, 191, 36, 0.42);
  background: rgba(251, 191, 36, 0.12);
}

.mal-score-pill[data-mal-url] {
  cursor: pointer;
}

.stats-mal-id-link {
  color: rgb(var(--accent-soft-rgb));
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: rgb(var(--accent-rgb) / 0.45);
  text-underline-offset: 3px;
}

.mal-score-pill[data-mal-url]:focus-visible {
  outline: 2px solid rgb(var(--accent-rgb));
  outline-offset: 2px;
}

a.pill:hover,
.mal-score-pill[data-mal-url]:hover,
.genre-pill.active {
  color: var(--text);
  border-color: rgb(var(--accent-soft-rgb) / 0.52);
  background: rgb(var(--accent-rgb) / 0.16);
}

.button,
.icon-button {
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  background: rgba(18, 27, 55, 0.86);
  color: var(--text);
  border-radius: 14px;
  min-height: 40px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.15;
  text-align: center;
  overflow-wrap: anywhere;
  white-space: normal;
}

.icon-button {
  width: 44px;
  padding: 0;
}

.button.primary,
.icon-button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: var(--accent);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 28px rgb(var(--accent-rgb) / 0.24);
}

.button.danger {
  background: rgba(251, 113, 133, 0.14);
  border-color: rgba(251, 113, 133, 0.5);
  color: #ffe8ed;
}

.button.ghost {
  background: transparent;
}

.button:disabled,
.icon-button:disabled,
.button.disabled {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
}

.top-panel,
.announcement-card {
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.22);
  border-radius: 20px;
  background:
    radial-gradient(circle at 18% 0%, rgb(var(--accent-rgb) / 0.16), transparent 36%),
    rgba(8, 14, 31, 0.84);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 18px 40px rgba(0, 0, 0, 0.22);
}

.top-panel {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.top-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.top-tab {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  color: var(--soft);
  font-size: 0.82rem;
  font-weight: 950;
  background: rgba(255, 255, 255, 0.05);
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.top-tab:hover,
.top-tab.active {
  border-color: rgb(var(--accent-soft-rgb) / 0.74);
  color: var(--text);
  background: rgb(var(--accent-rgb) / 0.16);
}

.top-tab:hover {
  transform: translateY(-1px);
}

.top-table {
  display: grid;
  gap: 8px;
}

.top-row {
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  display: grid;
  grid-template-columns: 58px 50px minmax(0, 1fr) 96px 80px 88px;
  gap: 10px;
  align-items: center;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.top-row:hover {
  border-color: rgb(var(--accent-soft-rgb) / 0.62);
  background: rgb(var(--accent-rgb) / 0.12);
  transform: translateY(-1px);
}

.top-row.in-list {
  border-color: rgb(var(--list-status-rgb, var(--accent-rgb)) / 0.5);
  box-shadow: inset 4px 0 0 rgb(var(--list-status-rgb, var(--accent-rgb)) / 0.9);
}

.top-rank {
  color: rgb(var(--accent-soft-rgb));
  font-size: 0.9rem;
  font-weight: 950;
}

.top-cover {
  width: 50px;
  aspect-ratio: 2 / 3;
  border-radius: 9px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--text);
  font-weight: 950;
  background: rgb(var(--accent-rgb) / 0.18);
}

.top-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.top-character-row {
  grid-template-columns: 58px 54px minmax(0, 1fr) 82px 88px 100px;
}

.top-character-cover {
  width: 54px;
  aspect-ratio: 1;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgb(var(--accent-rgb) / 0.18);
}

.top-title-cell {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.top-title-cell strong,
.top-title-cell small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-title-cell strong {
  font-size: 0.94rem;
  font-weight: 950;
}

.top-title-cell small,
.top-score small,
.top-stat small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.12;
}

.top-score,
.top-stat {
  min-width: 0;
  display: grid;
  justify-items: end;
  gap: 2px;
  text-align: right;
}

.top-score b,
.top-stat b {
  color: var(--text);
  font-size: 0.9rem;
}

.announcement-list {
  display: grid;
  gap: 14px;
}

.announcement-card {
  padding: 18px;
  display: grid;
  gap: 12px;
}

.announcement-card.pinned {
  border-color: rgb(var(--accent-soft-rgb) / 0.5);
}

.announcement-card-head {
  display: flex;
  gap: 12px;
  align-items: start;
  justify-content: space-between;
}

.announcement-category {
  display: inline-flex;
  margin-bottom: 6px;
  color: rgb(var(--accent-soft-rgb));
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.announcement-card h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.05rem, 2vw, 1.45rem);
}

.announcement-card small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 780;
}

.announcement-card p {
  margin: 0;
  color: var(--soft);
  line-height: 1.65;
}

.announcement-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.announcement-form {
  display: grid;
  gap: 12px;
}

.announcement-popup-backdrop {
  z-index: 145;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 12%, rgb(var(--accent-rgb) / 0.18), transparent 34%),
    rgba(4, 8, 19, 0.76);
}

.announcement-popup-modal {
  pointer-events: auto;
  width: min(560px, 100%);
  border-radius: 22px;
  border-color: rgb(var(--accent-soft-rgb) / 0.38);
  background:
    linear-gradient(150deg, rgb(var(--accent-rgb) / 0.12), transparent 34%),
    rgba(8, 14, 31, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 28px 80px rgba(0, 0, 0, 0.46),
    0 0 42px rgb(var(--accent-rgb) / 0.16);
}

.announcement-popup-head {
  background:
    radial-gradient(circle at 12% 0%, rgb(var(--accent-rgb) / 0.2), transparent 42%),
    rgba(10, 18, 38, 0.92);
}

.announcement-popup-labels {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 7px;
}

.announcement-popup-kicker {
  display: inline-flex;
  margin: 0;
  color: rgb(var(--accent-soft-rgb));
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.announcement-popup-labels .pill {
  min-height: 22px;
  padding: 3px 8px;
  font-size: 0.65rem;
}

.announcement-popup-body {
  display: grid;
  gap: 18px;
  padding-top: 18px;
}

.announcement-popup-body p {
  margin: 0;
  color: var(--soft);
  line-height: 1.68;
  overflow-wrap: anywhere;
}

.announcement-popup-actions {
  justify-content: flex-end;
}

@media (max-width: 760px) {
  .top-row {
    grid-template-columns: 46px 44px minmax(0, 1fr);
  }

  .top-score,
  .top-stat {
    grid-column: 3;
    display: inline-flex;
    justify-content: flex-start;
    gap: 5px;
  }

  .top-score small,
  .top-stat small {
    order: -1;
  }

  .announcement-card-head {
    flex-direction: column;
  }

  .announcement-popup-modal {
    border-radius: 18px;
  }

  .announcement-popup-actions {
    display: grid;
  }
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(7, 12, 28, 0.86);
  color: var(--text);
  min-height: 40px;
  padding: 0 12px;
  outline: none;
}

.textarea {
  min-height: 112px;
  padding: 10px 12px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.14);
}

.form-grid {
  display: grid;
  gap: 12px;
}

.setting-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.setting-toggle input {
  margin-top: 3px;
}

.setting-toggle strong,
.setting-toggle small {
  display: block;
}

.setting-toggle small {
  color: var(--muted);
  margin-top: 2px;
}

.ambient-settings {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.2);
  border-radius: 16px;
  background:
    radial-gradient(circle at 8% 0%, rgb(var(--accent-rgb) / 0.1), transparent 36%),
    rgba(255, 255, 255, 0.025);
}

.ambient-settings .setting-toggle {
  padding: 2px;
  border: 0;
  background: transparent;
}

.ambient-volume-control {
  display: grid;
  gap: 8px;
  padding: 10px 2px 2px;
  border-top: 1px solid var(--line);
}

.ambient-volume-control span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--soft);
  font-size: 0.82rem;
  font-weight: 850;
}

.ambient-volume-control b {
  color: var(--text);
}

.colour-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.22);
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0%, rgb(var(--accent-rgb) / 0.12), transparent 38%),
    rgb(var(--surface-solid-rgb) / 0.64);
}

.colour-panel .section-title {
  margin-bottom: 0;
}

.colour-spectrum {
  position: relative;
  height: 152px;
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at var(--colour-x, 72%) var(--colour-y, 10%), transparent 0 10px, rgba(255, 255, 255, 0.18) 11px 13px, transparent 14px),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.92)),
    linear-gradient(90deg, #ffffff, var(--panel-color, var(--accent)));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.colour-picker-knob {
  position: absolute;
  left: var(--colour-x, 72%);
  top: var(--colour-y, 10%);
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 1px rgba(5, 8, 13, 0.45), 0 8px 18px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

.colour-hue {
  position: relative;
  height: 22px;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(90deg, #ff3f3f, #ffd43f, #6cff3f, #3fffdc, #3f6cff, #b83fff, #ff3fc7, #ff3f3f);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.colour-hue-knob {
  position: absolute;
  left: var(--colour-hue-x, 72%);
  top: 50%;
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 1px rgba(5, 8, 13, 0.5), 0 8px 18px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

.colour-native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.colour-value-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 42px;
  gap: 9px;
  align-items: center;
  padding: 7px;
  border-radius: 8px;
  background: rgb(var(--surface-2-rgb) / 0.58);
}

.colour-swatch {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  background: var(--panel-color, var(--accent));
  box-shadow: 0 0 18px rgb(var(--accent-rgb) / 0.28);
}

.colour-hex {
  min-height: 34px;
  border: 0;
  padding: 0;
  background: transparent;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.colour-eyedropper {
  min-height: 34px;
  width: 34px;
  border-radius: 8px;
}

.colour-eyedropper svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.colour-rgb-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.colour-rgb-row label {
  display: grid;
  gap: 6px;
  text-align: center;
  color: var(--soft);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.colour-rgb-input {
  min-height: 38px;
  padding: 0 8px;
  text-align: center;
  font-weight: 850;
  color: var(--text);
  background: rgb(var(--surface-2-rgb) / 0.62);
}

.colour-rgb-input::-webkit-outer-spin-button,
.colour-rgb-input::-webkit-inner-spin-button {
  margin: 0;
}

.colour-controls {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.colour-controls > strong {
  color: var(--soft);
  font-size: 0.82rem;
}

.colour-controls label {
  display: grid;
  gap: 10px;
}

.colour-controls label span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  font-weight: 850;
}

.colour-range {
  width: 100%;
  height: 22px;
  padding: 0;
  accent-color: var(--accent);
  background: transparent;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.catalog-classic {
  display: grid;
  gap: 18px;
}

.catalog-classic .page-head {
  margin-bottom: 0;
}

.catalog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.catalog-classic .section {
  margin-top: 0;
}

.catalog-classic .grid:has(> .media-card),
.catalog-grid {
  grid-template-columns: repeat(auto-fill, minmax(144px, 174px));
  justify-content: start;
  gap: 14px;
}

.catalog-classic .media-card {
  border-radius: 14px;
}

.catalog-classic .media-card .card-body {
  padding: 10px;
  gap: 6px;
}

.catalog-classic .media-title {
  font-size: 0.94rem;
  min-height: 2.35em;
}

.classic-filter-panel {
  border-color: color-mix(in srgb, var(--accent) 18%, var(--line));
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 6%, transparent), rgba(255, 255, 255, 0.03)),
    var(--panel);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
}

.season-picker-panel {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(170px, 0.8fr) auto;
  gap: 12px;
  align-items: end;
}

.season-tabs,
.season-quick-list {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.season-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.045);
  font-weight: 850;
  text-decoration: none;
}

.season-tab span {
  display: grid;
  min-width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 999px;
  color: #04111f;
  background: var(--accent);
  font-size: 0.76rem;
}

.season-tab:hover,
.season-tab.active {
  color: var(--text);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, rgba(255, 255, 255, 0.045));
  box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 16%, transparent);
}

.season-quick-chip {
  display: grid;
  gap: 2px;
  min-height: 70px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: 12px;
  color: var(--text);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 11%, transparent), rgba(255, 255, 255, 0.035)),
    var(--panel);
  text-decoration: none;
}

.season-quick-chip:hover,
.season-quick-chip.active {
  border-color: var(--accent);
  box-shadow: 0 14px 32px color-mix(in srgb, var(--accent) 18%, transparent);
  transform: translateY(-1px);
}

.season-quick-chip span {
  color: var(--soft);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.season-quick-chip strong {
  font-size: 1.1rem;
}

.season-quick-chip small {
  color: var(--muted);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 18px;
}

.tab {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--soft);
  border-radius: 8px;
  min-height: 36px;
  padding: 0 12px;
  line-height: 1.15;
  text-align: center;
  overflow-wrap: anywhere;
}

.tab.active {
  border-color: rgb(var(--accent-soft-rgb) / 0.62);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 900;
  text-shadow: 0 1px 10px rgba(255, 255, 255, 0.14);
  box-shadow:
    0 8px 22px rgb(var(--accent-rgb) / 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.genre-type-tabs {
  width: fit-content;
  max-width: 100%;
  padding: 6px;
  gap: 6px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.28);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0% 0%, rgb(var(--accent-rgb) / 0.16), transparent 42%),
    rgb(var(--surface-rgb) / 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 14px 30px rgba(0, 0, 0, 0.18);
}

.genre-type-tabs .tab {
  min-width: 112px;
  min-height: 42px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--soft);
  font-weight: 900;
  text-decoration: none;
}

.genre-type-tabs .tab:hover {
  border-color: rgb(var(--accent-soft-rgb) / 0.42);
  color: var(--text);
  background: rgb(var(--accent-rgb) / 0.12);
}

.genre-type-tabs .tab.active {
  border-color: rgb(var(--accent-soft-rgb) / 0.62);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 12px 26px rgb(var(--accent-rgb) / 0.28);
}

.genres-page {
  min-width: 0;
  display: grid;
  gap: 22px;
}

.genres-page-head {
  align-items: end;
}

.genres-page-head .genre-type-tabs {
  margin: 0;
}

.genre-selected-section {
  display: grid;
  gap: 15px;
}

.genre-selected-banner {
  width: fit-content;
  max-width: 100%;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.18);
  border-radius: 8px;
  background: rgb(var(--surface-2-rgb) / 0.54);
}

.genre-selected-banner h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
}

.genre-selected-back {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 900;
  text-decoration: none;
}

.genre-selected-back:hover {
  color: var(--text);
}

.genre-selected-separator {
  color: var(--muted);
  font-size: 0.82rem;
}

.genre-directory {
  display: grid;
  gap: 22px;
}

.genre-directory-section {
  display: grid;
  gap: 10px;
}

.genre-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 9px;
}

.genre-directory-link {
  min-width: 0;
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.16);
  border-radius: 8px;
  background: rgb(var(--surface-2-rgb) / 0.58);
  color: var(--text);
  text-decoration: none;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.genre-directory-link:hover,
.genre-directory-link.active {
  transform: translateY(-2px);
  border-color: rgb(var(--accent-soft-rgb) / 0.5);
  background: rgb(var(--accent-rgb) / 0.12);
  box-shadow: 0 10px 24px rgb(var(--accent-rgb) / 0.1);
}

.genre-directory-link > span:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.genre-directory-link strong,
.genre-directory-link small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.genre-directory-link small {
  color: var(--muted);
  font-size: 0.68rem;
}

.genre-directory-count {
  min-width: 42px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  text-align: right;
}

.hero {
  position: relative;
  min-height: 330px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: end;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  margin-bottom: 18px;
  background:
    linear-gradient(90deg, rgba(8, 13, 29, 0.98), rgba(18, 14, 42, 0.72)),
    var(--panel-2);
  box-shadow: var(--shadow);
}

.hero-actions {
  position: absolute;
  top: 18px;
  right: 26px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: end;
  align-items: center;
  max-width: min(calc(100% - 52px), 440px);
}

.hero-actions .button {
  flex: 0 1 auto;
}

.hero-cover {
  width: 280px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  object-position: center top;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--panel-3);
}

.media-detail-hero {
  align-items: start;
  overflow: hidden;
  grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
}

body[data-theme] .media-detail-hero {
  border-color: rgb(var(--accent-soft-rgb) / 0.38);
  background:
    radial-gradient(circle at 13% 30%, rgb(var(--accent-rgb) / 0.24), transparent 28%),
    radial-gradient(circle at 82% 12%, rgb(var(--accent-2-rgb) / 0.16), transparent 34%),
    linear-gradient(90deg, rgb(var(--surface-deep-rgb) / 0.96), rgb(var(--surface-rgb) / 0.82)),
    var(--panel-2);
  box-shadow:
    0 0 0 1px rgb(var(--accent-rgb) / 0.12),
    0 24px 62px rgba(0, 0, 0, 0.34),
    0 0 42px rgb(var(--accent-rgb) / 0.12);
}

.media-banner-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: saturate(1.06) contrast(1.02);
  pointer-events: none;
}

.media-detail-hero.has-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5, 9, 18, 0.92), rgba(8, 12, 24, 0.72) 48%, rgba(5, 9, 18, 0.84)),
    linear-gradient(0deg, rgba(5, 9, 18, 0.76), transparent 44%);
}

.media-detail-hero > :not(.media-banner-backdrop) {
  position: relative;
  z-index: 1;
}

.media-detail-hero > .media-cover-stack {
  grid-column: 1;
  margin-block-start: -10px;
}

.media-cover-stack {
  width: 100%;
  display: grid;
  gap: 12px;
  justify-items: center;
  align-self: start;
}

.media-cover-stack .hero-cover {
  width: 100%;
}

.media-cover-cycle,
.character-cover-cycle {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.media-cover-cycle .hero-cover,
.character-cover-cycle .hero-cover {
  display: block;
  transition:
    transform 180ms ease,
    opacity 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.media-cover-cycle:hover .hero-cover,
.media-cover-cycle:focus-visible .hero-cover,
.character-cover-cycle:hover .hero-cover,
.character-cover-cycle:focus-visible .hero-cover {
  border-color: rgb(var(--accent-rgb) / 0.78);
  box-shadow:
    var(--shadow),
    0 0 24px rgb(var(--accent-rgb) / 0.22);
}

.media-cover-cycle:focus-visible,
.character-cover-cycle:focus-visible {
  outline: 2px solid rgb(var(--accent-rgb) / 0.72);
  outline-offset: 4px;
}

.media-cover-cycle:active .hero-cover,
.character-cover-cycle:active .hero-cover {
  transform: scale(0.985);
}

.media-cover-cycle.loading .hero-cover,
.character-cover-cycle.loading .hero-cover {
  opacity: 0.72;
}

.media-cover-actions {
  width: 100%;
  display: flex;
  justify-content: center;
}

#media-pictures-modal .media-pictures-modal,
#character-pictures-modal .media-pictures-modal {
  width: min(1460px, 100%);
  height: min(940px, calc(100dvh - 36px));
  max-height: calc(100dvh - 36px);
}

#media-pictures-modal,
#character-pictures-modal {
  z-index: 200;
}

#media-pictures-modal .media-pictures-body,
#character-pictures-modal .media-pictures-body {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 16px 22px 24px;
}

.media-picture-section-nav {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 2px 0 10px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  background: linear-gradient(to bottom, var(--panel) 72%, transparent);
}

.media-picture-section-nav::-webkit-scrollbar {
  display: none;
}

.media-picture-section-nav .button {
  flex: 0 0 auto;
}

.media-picture-sections {
  display: grid;
  gap: 28px;
}

.media-picture-section {
  display: grid;
  gap: 13px;
  min-width: 0;
  scroll-margin-top: 74px;
}

.media-picture-section + .media-picture-section {
  padding-top: 24px;
  border-top: 1px solid rgb(var(--accent-soft-rgb) / 0.2);
}

.media-picture-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.media-picture-languages {
  display: grid;
  gap: 18px;
}

.media-picture-language-group h4 {
  margin: 0;
  font-size: 0.95rem;
}

.media-picture-section-heading h3,
.media-picture-section-heading p {
  margin: 0;
}

.media-picture-section-heading h3 {
  font-size: 1.05rem;
}

.media-picture-section-heading p,
.media-picture-section-heading > span,
.media-picture-section-empty {
  color: var(--muted);
  font-size: 0.8rem;
}

.media-picture-section-heading p {
  margin-top: 3px;
}

.media-picture-section-heading > span {
  flex: 0 0 auto;
  font-weight: 800;
}

.media-picture-section-empty {
  padding: 18px 0;
}

.media-picture-provider-note {
  color: var(--muted);
  font-size: 0.84rem;
}

.media-picture-current-note {
  padding: 10px 12px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.2);
  border-radius: 8px;
  background: rgb(var(--accent-rgb) / 0.055);
  color: var(--soft);
  font-size: 0.82rem;
}

.media-picture-management-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid rgb(var(--accent-rgb) / 0.34);
  border-radius: 8px;
  background: rgb(var(--accent-rgb) / 0.09);
  box-shadow: 0 0 22px rgb(var(--accent-rgb) / 0.09);
}

.media-picture-management-note strong {
  flex: 0 0 auto;
  color: rgb(var(--accent-soft-rgb));
  font-size: 0.8rem;
}

.media-picture-management-note span {
  color: var(--soft);
  font-size: 0.76rem;
  text-align: right;
}

.media-picture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 14px;
  align-items: start;
}

.media-picture-grid:is([data-picture-grid-type="banner"], [data-picture-grid-type="episode"]) {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.media-picture-grid:is([data-picture-grid-type="clear_art"], [data-picture-grid-type="artwork"], [data-picture-grid-type="official_artwork"]) {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.media-picture-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.24);
  border-radius: 8px;
  background: rgb(var(--surface-deep-rgb) / 0.58);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
  transition: border-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.media-picture-card.is-manageable {
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.media-picture-card.is-manageable:active {
  cursor: grabbing;
}

.media-picture-card.is-dragging,
.media-picture-card.is-picture-mutating {
  opacity: 0.48;
  transform: scale(0.985);
  pointer-events: none;
}

.media-picture-card.is-primary,
.media-picture-card.selected {
  border-color: rgb(var(--accent-soft-rgb) / 0.74);
  box-shadow: 0 0 0 1px rgb(var(--accent-rgb) / 0.2), 0 0 26px rgb(var(--accent-rgb) / 0.18);
}

.media-picture-preview {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: rgba(2, 6, 15, 0.72);
  cursor: pointer;
  appearance: none;
}

.media-picture-card.is-manageable .media-picture-preview {
  cursor: grab;
  touch-action: none;
}

.media-picture-card.is-manageable .media-picture-preview:active {
  cursor: grabbing;
}

.media-picture-card[data-picture-card-type="cover"] .media-picture-preview {
  aspect-ratio: 2 / 3;
}

.media-picture-card[data-picture-card-type="portrait"] .media-picture-preview,
.media-picture-card[data-picture-card-type="clear_art"] .media-picture-preview {
  aspect-ratio: 2 / 3;
}

.media-picture-card[data-picture-card-type="banner"] .media-picture-preview,
.media-picture-card[data-picture-card-type="episode"] .media-picture-preview {
  aspect-ratio: 16 / 9;
}

.media-picture-import { margin-bottom: 14px; }
.media-picture-import > summary { cursor: pointer; padding: 8px 0; font-weight: 700; }
.fanart-source-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
}

.fanart-source-form label[data-tmdb-match-field][hidden] { display: none; }
.tmdb-manual-match { flex-basis: 100%; }
.tmdb-manual-match summary { cursor: pointer; }
.tmdb-manual-match label { margin-top: 8px; }
.fanart-source-form label { display: grid; gap: 5px; flex: 1 1 150px; min-width: 0; }
.fanart-source-form > span { flex-basis: 100%; color: var(--muted); }
.picture-character-links, .picture-character-selected { display: flex; flex-wrap: wrap; gap: 8px; }
.picture-character-links a { font-size: 0.85rem; overflow-wrap: anywhere; }
.picture-character-backdrop { z-index: 10050; }
.picture-character-modal { width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); }
.picture-character-modal .modal-body { display: grid; gap: 14px; overflow: auto; }
.picture-character-preview { width: 100%; height: 180px; object-fit: contain; }
.picture-character-results { display: grid; gap: 6px; max-height: 250px; overflow: auto; overscroll-behavior: contain; }
.picture-character-results label { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 5px; }
.picture-character-avatar { width: 36px; height: 46px; object-fit: cover; }
.picture-character-selected label { display: flex; align-items: center; gap: 6px; }
.media-picture-card:not(.character-picture-card)[data-picture-card-type="clear_art"] .media-picture-preview,
.media-picture-card:is([data-picture-card-type="background"], [data-picture-card-type="thumbnail"]) .media-picture-preview { aspect-ratio: 16 / 9; }
.media-picture-card[data-picture-card-type="clear_logo"] .media-picture-preview { aspect-ratio: 800 / 310; }
.media-picture-card[data-picture-card-type="character_art"] .media-picture-preview { aspect-ratio: 2 / 3; }
.media-picture-card[hidden] { display: none; }
.media-picture-card[data-picture-card-type="clear_logo"],
.media-picture-card[data-picture-card-type="clear_logo"] :is(.media-picture-preview, .media-picture-image) {
  background: transparent;
}
.media-picture-card[data-picture-card-type="clear_logo"] { box-shadow: none; border-color: transparent; }
.media-picture-card[data-picture-card-type="clear_logo"]:is(.is-primary, .selected) {
  border-color: rgb(var(--accent-soft-rgb) / 0.74);
}
.media-picture-card[data-picture-card-type="character_art"] .media-picture-preview {
  background: repeating-conic-gradient(#26313a 0% 25%, #1b242d 0% 50%) 0 0 / 20px 20px;
}
.media-picture-grid:is([data-picture-grid-type="clear_logo"], [data-picture-grid-type="thumbnail"], [data-picture-grid-type="background"]) {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}

.media-picture-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
  transition: transform 180ms ease, opacity 160ms ease;
}

.media-picture-pointer-dragging,
.media-picture-pointer-dragging * {
  cursor: grabbing !important;
}

.media-picture-drag-ghost {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 12050;
  max-height: min(360px, 54vh);
  overflow: hidden;
  pointer-events: none;
  opacity: 0.9;
  transform-origin: top left;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.86);
  border-radius: 8px;
  background: rgb(var(--surface-deep-rgb) / 0.94);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.42), 0 0 30px rgb(var(--accent-rgb) / 0.2);
  will-change: transform;
}

.media-picture-drag-ghost .media-picture-staff-tools,
.media-picture-drag-ghost .media-picture-votes,
.media-picture-drag-ghost .media-picture-account-choice,
.media-picture-drag-ghost .media-picture-meta > a {
  display: none !important;
}

.media-picture-preview:hover .media-picture-image,
.media-picture-preview:focus-visible .media-picture-image {
  transform: scale(1.025);
  opacity: 0.96;
}

.media-picture-preview:focus-visible {
  outline: 2px solid rgb(var(--accent-soft-rgb));
  outline-offset: -3px;
}

.media-picture-meta {
  display: grid;
  gap: 5px;
  padding: 10px;
}

.media-picture-meta > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.media-picture-staff-tools {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center !important;
  gap: 7px !important;
  margin-top: 3px;
  padding-top: 9px;
  border-top: 1px solid rgb(var(--accent-soft-rgb) / 0.16);
}

.media-picture-drag-handle {
  align-self: center;
  min-width: 0;
  color: rgb(var(--accent-soft-rgb));
  font-size: 0.7rem;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
  user-select: none;
}

.media-picture-delete {
  min-height: 34px;
  padding: 5px 10px;
  font-size: 0.72rem;
}

.is-picture-drop-target {
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.media-picture-section.is-picture-drag-over,
.media-picture-language-group.is-picture-drag-over,
.episode-picture-popup-grid.is-picture-drag-over {
  margin: -8px;
  padding: 8px;
  border-radius: 8px;
  background: rgb(var(--accent-rgb) / 0.09);
  box-shadow: inset 0 0 0 2px rgb(var(--accent-rgb) / 0.68), 0 0 28px rgb(var(--accent-rgb) / 0.17);
}

.episode-picture-group.is-picture-drag-over {
  border-color: rgb(var(--accent-rgb) / 0.92);
  background: rgb(var(--accent-rgb) / 0.16);
  box-shadow: 0 0 0 2px rgb(var(--accent-rgb) / 0.22), 0 0 30px rgb(var(--accent-rgb) / 0.2);
}

.media-picture-meta strong,
.media-picture-meta small,
.media-picture-meta a {
  min-width: 0;
  overflow-wrap: anywhere;
}

.media-picture-account-choice {
  width: 100%;
  min-height: 34px;
  justify-content: center;
  font-size: 0.76rem;
}

.media-picture-account-choice.active {
  border-color: rgb(var(--accent-rgb) / 0.62);
  background: rgb(var(--accent-rgb) / 0.14);
  box-shadow: 0 0 18px rgb(var(--accent-rgb) / 0.14);
}

.episode-picture-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.episode-picture-group {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-width: 0;
  min-height: 86px;
  padding: 8px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.26);
  border-radius: 8px;
  background: rgb(var(--surface-deep-rgb) / 0.64);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.episode-picture-group:hover,
.episode-picture-group:focus-visible {
  border-color: rgb(var(--accent-rgb) / 0.68);
  box-shadow: 0 0 24px rgb(var(--accent-rgb) / 0.16);
  transform: translateY(-1px);
}

.episode-picture-group-image {
  display: block;
  width: 96px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  background: rgb(var(--surface-solid-rgb));
}

.episode-picture-group-copy,
.episode-picture-group-score {
  display: grid;
  min-width: 0;
}

.episode-picture-group-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.episode-picture-group-copy small,
.episode-picture-group-score small {
  color: var(--muted);
  font-size: 0.7rem;
}

.episode-picture-group-score {
  justify-items: center;
  padding-right: 4px;
}

#media-episode-pictures-modal {
  z-index: 215;
}

.media-episode-pictures-modal {
  width: min(1180px, calc(100% - 32px));
  max-height: min(860px, calc(100dvh - 36px));
}

.episode-picture-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.episode-picture-popup-head p {
  margin: 0;
  color: var(--muted);
}

.episode-picture-popup-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.media-picture-meta small {
  color: var(--muted);
}

.media-picture-meta .media-picture-votes {
  display: grid;
  grid-template-columns: 34px minmax(44px, 1fr) 34px;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  padding-top: 9px;
  border-top: 1px solid rgb(var(--accent-soft-rgb) / 0.16);
}

.media-picture-votes .vote-button {
  min-height: 30px;
  padding: 4px;
  font-size: 1rem;
}

.media-picture-votes > span {
  display: grid;
  gap: 0;
  min-width: 0;
  text-align: center;
}

.media-picture-votes > span strong {
  font-size: 0.96rem;
  line-height: 1;
}

.media-picture-votes > span small {
  margin-top: 2px;
  font-size: 0.66rem;
}

.media-picture-meta a {
  width: fit-content;
  color: rgb(var(--accent-soft-rgb));
  font-size: 0.78rem;
  font-weight: 800;
}

.media-picture-submit {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgb(var(--accent-soft-rgb) / 0.2);
}

.media-picture-submit-head strong,
.media-picture-submit-head small {
  display: block;
}

.media-picture-submit-head small {
  margin-top: 3px;
  color: var(--muted);
}

.media-picture-submit-fields {
  display: grid;
  grid-template-columns: minmax(150px, 0.4fr) minmax(110px, 0.25fr) minmax(260px, 1fr);
  gap: 10px;
  align-items: end;
}

.media-picture-submit-fields:has(.media-picture-episode-field[hidden]) {
  grid-template-columns: minmax(150px, 0.36fr) minmax(260px, 1fr);
}

.character-picture-submit-fields {
  grid-template-columns: minmax(170px, 0.36fr) minmax(260px, 1fr);
}

.media-picture-episode-field[hidden] {
  display: none;
}

.media-picture-submit-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.media-picture-source-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.82rem;
}

.media-picture-file-button {
  flex: 0 0 auto;
  cursor: pointer;
}

.media-picture-source-choice small {
  min-width: 0;
  max-width: min(320px, 100%);
  overflow: hidden;
  color: var(--soft);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion-picture-value {
  display: grid;
  gap: 6px;
}

.suggestion-picture-value a {
  min-width: 0;
  color: rgb(var(--accent-soft-rgb));
  overflow-wrap: anywhere;
}

@media (max-width: 700px) {
  #media-pictures-modal .media-pictures-modal,
  #character-pictures-modal .media-pictures-modal {
    width: 100%;
    height: calc(100dvh - 20px);
    max-height: calc(100dvh - 20px);
  }

  #media-pictures-modal .media-pictures-body,
  #character-pictures-modal .media-pictures-body {
    padding: 12px 14px 18px;
  }

  .media-picture-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .media-picture-grid:is([data-picture-grid-type="banner"], [data-picture-grid-type="episode"], [data-picture-grid-type="clear_art"], [data-picture-grid-type="artwork"], [data-picture-grid-type="official_artwork"]) {
    grid-template-columns: 1fr;
  }

  .media-picture-section-heading {
    align-items: start;
  }

  .media-picture-management-note {
    display: grid;
  }

  .media-picture-management-note span {
    text-align: left;
  }

  .media-picture-submit-fields {
    grid-template-columns: 1fr;
  }

  .media-picture-submit-fields:has(.media-picture-episode-field[hidden]) {
    grid-template-columns: 1fr;
  }

  .character-picture-submit-fields {
    grid-template-columns: 1fr;
  }

  .media-picture-submit-actions .button {
    width: 100%;
  }

  .media-picture-source-choice {
    align-items: stretch;
  }

  .media-picture-source-choice > span,
  .media-picture-source-choice > small {
    width: 100%;
  }

  .episode-picture-groups {
    grid-template-columns: 1fr;
  }

  .media-episode-pictures-modal {
    width: 100%;
    max-height: calc(100dvh - 20px);
  }

  .episode-picture-popup-head {
    align-items: stretch;
    flex-direction: column;
  }

  .episode-picture-popup-head .button {
    width: 100%;
  }

  .episode-picture-popup-grid {
    grid-template-columns: 1fr;
  }
}

.media-detail-copy {
  grid-column: 2;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "heading actions" "description actions";
  grid-template-rows: auto 1fr;
  align-items: start;
  gap: 8px 14px;
}

.media-detail-heading { grid-area: heading; min-width: 0; }
.media-detail-description { grid-area: description; min-width: 0; }

.media-airing-countdown {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.3;
}

.media-airing-countdown span {
  color: var(--soft);
  font-weight: 800;
}

.media-airing-countdown strong {
  color: rgb(var(--accent-soft-rgb));
  font-weight: 950;
  text-shadow: 0 0 16px rgb(var(--accent-rgb) / 0.3);
}

.media-detail-copy .hero-actions {
  grid-area: actions;
  display: grid;
  position: static;
  inset: auto;
  width: max-content;
  max-width: 100%;
  justify-self: end;
  justify-content: stretch;
  order: initial;
  padding-top: 2px;
}

body[data-theme] .media-detail-hero .hero-cover {
  border-color: rgb(var(--accent-soft-rgb) / 0.52);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgb(var(--accent-rgb) / 0.2),
    0 0 34px rgb(var(--accent-rgb) / 0.22);
}

body[data-theme] .media-detail-hero h1 {
  text-shadow: 0 0 28px rgb(var(--accent-rgb) / 0.18);
}

.media-synonyms {
  display: grid;
  gap: 8px;
  max-width: 86ch;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.media-synonyms span {
  color: var(--soft);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
}

.media-synonym-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  min-width: 0;
}

.media-synonym {
  min-width: 0;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.22);
  border-radius: 999px;
  background: rgb(var(--surface-2-rgb) / 0.54);
  color: var(--text);
  font-weight: 750;
  font-size: 0.86rem;
  text-align: center;
  overflow-wrap: anywhere;
}

.media-synonym[hidden] {
  display: none;
}

.media-synonym-toggle {
  appearance: none;
  cursor: pointer;
  font: inherit;
  line-height: inherit;
}

.media-synonym-toggle:hover,
.media-synonym-toggle:focus-visible {
  border-color: rgb(var(--accent-rgb) / 0.58);
  background: rgb(var(--accent-rgb) / 0.16);
  color: var(--text);
}

.media-synonym-toggle[aria-expanded="false"],
.media-synonym-toggle:not([aria-expanded]) {
  color: var(--muted);
  background: rgb(var(--surface-solid-rgb) / 0.34);
}

.media-detail-hero .pill.ok,
.media-detail-hero .pill.hot,
.media-detail-hero .pill.gold {
  color: var(--text);
  border-color: rgb(var(--accent-soft-rgb) / 0.42);
  background: rgb(var(--accent-rgb) / 0.14);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.3rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.hero-synopsis {
  max-width: 940px;
  color: var(--soft);
  line-height: 1.6;
}

.synopsis-card {
  display: grid;
  gap: 12px;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-left: 3px solid rgb(var(--accent-rgb) / 0.72);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(16, 23, 50, 0.72), rgba(9, 14, 31, 0.52));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body[data-theme] .media-detail-hero .synopsis-card {
  border-color: rgb(var(--accent-soft-rgb) / 0.24);
  border-left-color: rgb(var(--accent-rgb) / 0.78);
  background:
    radial-gradient(circle at 0% 0%, rgb(var(--accent-rgb) / 0.1), transparent 36%),
    linear-gradient(180deg, rgb(var(--surface-2-rgb) / 0.74), rgb(var(--surface-rgb) / 0.6));
}

.synopsis-card p {
  margin: 0;
  max-width: 82ch;
  color: #cbd7e8;
  font-size: 0.98rem;
  line-height: 1.78;
  overflow-wrap: anywhere;
}

.compact-textarea {
  min-height: 94px;
}

.media-synopsis-row {
  margin: 16px 0;
}

.media-synopsis-row .synopsis-card {
  margin: 0;
}

.media-cover-trailer {
  width: 100%;
  min-width: 0;
}

.media-cover-trailer h2 {
  margin: 0 0 6px;
  font-size: 0.9rem;
}

.media-trailer-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #000;
}

.media-trailer-frame :is(iframe, video) {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(250px, 340px) minmax(0, 1fr);
  gap: 18px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(16, 24, 50, 0.82), rgba(9, 14, 31, 0.86));
  padding: 16px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18);
}

.panel h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

body[data-theme] .topbar,
body[data-theme] .panel,
body[data-theme] .card,
body[data-theme] .profile-hero,
body[data-theme] .review-card,
body[data-theme] .tab,
body[data-theme] .pill,
body[data-theme] .stat,
body[data-theme] .list-row,
body[data-theme] .character-row,
body[data-theme] .staff-row,
body[data-theme] .relation-card,
body[data-theme] .diff-box,
body[data-theme] .data-details,
body[data-theme] .message,
body[data-theme] .modal,
body[data-theme] .modal-head,
body[data-theme] .api-code-card,
body[data-theme] .api-table > div,
body[data-theme] .notification-popover,
body[data-theme] .messages-popover,
body[data-theme] .top-auth-popover,
body[data-theme] .live-search-dropdown,
body[data-theme] .mod-nav-popover,
body[data-theme] .mobile-nav-popover,
body[data-theme] .home-trending-panel,
body[data-theme] .continue-panel,
body[data-theme] .activity-panel,
body[data-theme] .chat-panel,
body[data-theme] .social-composer,
body[data-theme] .social-item,
body[data-theme] .comment-form,
body[data-theme] .comment-item,
body[data-theme] .asuna-action,
body[data-theme] .social-embed-card,
body[data-theme] .embed-preview,
body[data-theme] .media-picker-card,
body[data-theme] .profile-status-popover,
body[data-theme] .data-table-wrap,
body[data-theme] .admin-user-row,
body[data-theme] .ban-history-row,
body[data-theme] .episode-grid-card,
body[data-theme] .episode-number-tile,
body[data-theme] .episode-card,
body[data-theme] .episode-detail-panel,
body[data-theme] .episode-detail-head,
body[data-theme] .episode-toolbar,
body[data-theme] .episode-suggest-inline {
  border-color: rgb(var(--accent-soft-rgb) / 0.2);
}

body[data-theme] .topbar {
  background:
    linear-gradient(135deg, rgb(var(--accent-rgb) / 0.1), transparent 48%),
    rgb(var(--surface-rgb) / 0.82);
}

body[data-theme] .panel,
body[data-theme] .card,
body[data-theme] .profile-hero,
body[data-theme] .profile-list-panel,
body[data-theme] .colour-panel,
body[data-theme] .activity-panel,
body[data-theme] .chat-panel,
body[data-theme] .modal,
body[data-theme] .review-card,
body[data-theme] .social-item {
  background:
    radial-gradient(circle at 0% 0%, rgb(var(--accent-rgb) / 0.08), transparent 34%),
    linear-gradient(180deg, rgb(var(--surface-2-rgb) / 0.78), rgb(var(--surface-rgb) / 0.86));
}

body[data-theme] .social-composer,
body[data-theme] .comment-form,
body[data-theme] .ambient-popover,
body[data-theme] .notification-popover,
body[data-theme] .messages-popover,
body[data-theme] .top-auth-popover,
body[data-theme] .live-search-dropdown,
body[data-theme] .mod-nav-popover,
body[data-theme] .mobile-nav-popover,
body[data-theme] .mention-picker,
body[data-theme] .profile-status-popover {
  background:
    radial-gradient(circle at 12% 0%, rgb(var(--accent-rgb) / 0.14), transparent 36%),
    rgb(var(--surface-rgb) / 0.97);
}

body[data-theme] .input,
body[data-theme] .select,
body[data-theme] .textarea,
body[data-theme] .global-search .select,
body[data-theme] .global-search .input {
  background:
    linear-gradient(180deg, rgb(var(--accent-rgb) / 0.035), transparent),
    rgb(var(--surface-deep-rgb) / 0.78);
  border-color: rgb(var(--accent-soft-rgb) / 0.18);
}

body[data-theme] .tab,
body[data-theme] .pill,
body[data-theme] .asuna-action,
body[data-theme] .stat,
body[data-theme] .profile-stat,
body[data-theme] .list-row,
body[data-theme] .character-row,
body[data-theme] .staff-row,
body[data-theme] .relation-card,
body[data-theme] .diff-box,
body[data-theme] .data-details,
body[data-theme] .message,
body[data-theme] .comment-item,
body[data-theme] .media-picker-card,
body[data-theme] .social-embed-card,
body[data-theme] .embed-preview,
body[data-theme] .episode-grid-card,
body[data-theme] .episode-number-tile,
body[data-theme] .episode-card,
body[data-theme] .episode-detail-panel {
  background: rgb(var(--surface-solid-rgb) / 0.74);
}

body[data-theme] .api-code-card,
body[data-theme] .info-panel pre {
  background: rgb(var(--surface-code-rgb) / 0.82);
}

body[data-theme] .api-table > div,
body[data-theme] .suggestion-meta-grid div {
  background: rgb(var(--surface-solid-rgb) / 0.58);
}

body[data-theme] .data-table-wrap {
  background: rgb(var(--surface-deep-rgb) / 0.95);
}

body[data-theme] .data-table th,
body[data-theme] .modal-head,
body[data-theme] .episode-detail-head,
body[data-theme] .episode-toolbar,
body[data-theme] .episode-suggest-inline {
  background: rgb(var(--surface-solid-rgb) / 0.97);
}

.home-main-column {
  padding-right: 382px;
}

.home-grid {
  display: block;
  min-height: max(0px, calc(100dvh - 150px));
}

.home-trending-panel,
.continue-panel {
  position: relative;
  margin: 0 0 18px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.24);
  border-radius: 18px;
  background: rgba(8, 14, 31, 0.6);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.home-trending-wrap {
  position: relative;
  margin: 0 0 18px;
}

.home-trending-wrap .home-trending-panel {
  margin-bottom: 0;
}

.home-trending-toolbar {
  position: relative;
  z-index: 24;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  gap: 12px;
  margin: 0 0 10px;
}

.home-trending-toolbar h2 {
  margin: 0;
  font-size: 1.05rem;
}

.home-today-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid rgb(var(--accent-rgb) / 0.42);
  border-radius: 10px;
  background: rgb(var(--surface-solid-rgb) / 0.82);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25), 0 0 18px rgb(var(--accent-rgb) / 0.12);
  backdrop-filter: blur(16px);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.home-today-trigger:hover,
.home-today-trigger[aria-expanded="true"] {
  border-color: rgb(var(--accent-rgb) / 0.8);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3), 0 0 22px rgb(var(--accent-rgb) / 0.26);
  transform: translateY(-1px);
}

.home-today-trigger .nav-icon {
  width: 17px;
  height: 17px;
}

.home-today-trigger > b {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgb(var(--accent-rgb) / 0.2);
  color: var(--accent-strong);
  font-size: 0.68rem;
}

.home-today-trigger > b[hidden] {
  display: none;
}

.home-today-popover {
  position: absolute;
  z-index: 40;
  top: 46px;
  right: 0;
  width: min(590px, 100%);
  max-height: min(650px, calc(100dvh - 132px));
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.4);
  border-radius: 14px;
  background: rgb(var(--surface-solid-rgb) / 0.97);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.48), 0 0 32px rgb(var(--accent-rgb) / 0.12);
  backdrop-filter: blur(22px);
  overflow: hidden;
}

.home-today-popover[hidden] {
  display: none;
}

.home-today-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid rgb(var(--accent-soft-rgb) / 0.2);
}

.home-today-head > div {
  display: grid;
  gap: 2px;
}

.home-today-head strong {
  font-size: 1rem;
}

.home-today-head small {
  color: var(--muted);
  font-size: 0.75rem;
}

.home-today-head .icon-button {
  width: 32px;
  height: 32px;
  min-height: 32px;
}

.home-today-list {
  display: grid;
  max-height: min(520px, calc(100dvh - 250px));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.home-my-day-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid rgb(var(--accent-soft-rgb) / 0.2);
}

.home-my-day-summary > span {
  display: grid;
  min-width: 0;
  min-height: 62px;
  align-content: center;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.24);
  border-radius: 8px;
  background: rgb(var(--accent-rgb) / 0.06);
}

.home-my-day-summary b {
  color: var(--text);
  font-size: 1.1rem;
}

.home-my-day-summary small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-my-day-section {
  display: grid;
  border-bottom: 1px solid rgb(var(--accent-soft-rgb) / 0.18);
}

.home-my-day-section:last-child {
  border-bottom: 0;
}

.home-my-day-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px 7px;
}

.home-my-day-section-head strong {
  font-size: 0.82rem;
}

.home-my-day-section-head small {
  color: var(--muted);
  font-size: 0.65rem;
}

.home-my-day-up-next {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  border-top: 1px solid rgb(var(--accent-soft-rgb) / 0.12);
}

.home-my-day-up-next > a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px 8px 14px;
  color: var(--text);
  text-decoration: none;
}

.home-my-day-up-next > a:hover {
  background: rgb(var(--accent-rgb) / 0.07);
}

.home-my-day-up-next img {
  width: 42px;
  height: 54px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.3);
  border-radius: 7px;
  object-fit: cover;
}

.home-my-day-up-next .home-my-day-plus {
  position: static;
  min-width: 36px;
  width: 36px;
  height: 36px;
  margin-right: 14px;
  border-radius: 9px;
  transform: none;
}

.home-my-day-sync {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 9px 14px;
  border-top: 1px solid rgb(var(--accent-soft-rgb) / 0.12);
  color: var(--text);
  text-decoration: none;
}

.home-my-day-sync:hover {
  background: rgb(var(--accent-rgb) / 0.07);
}

.home-my-day-sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8290a8;
  box-shadow: 0 0 10px rgb(130 144 168 / 0.36);
}

.home-my-day-sync.healthy .home-my-day-sync-dot {
  background: #42d797;
  box-shadow: 0 0 12px rgb(66 215 151 / 0.55);
}

.home-my-day-sync.syncing .home-my-day-sync-dot {
  background: var(--accent-strong);
  box-shadow: 0 0 12px rgb(var(--accent-rgb) / 0.6);
}

.home-my-day-sync.warning .home-my-day-sync-dot {
  background: #ffb84d;
  box-shadow: 0 0 12px rgb(255 184 77 / 0.56);
}

.home-my-day-sync > span:not(.home-my-day-sync-dot) {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.home-my-day-sync strong,
.home-my-day-sync small,
.home-my-day-sync time {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-my-day-sync strong {
  font-size: 0.76rem;
}

.home-my-day-sync small,
.home-my-day-sync time {
  color: var(--muted);
  font-size: 0.65rem;
}

.home-my-day-empty,
.home-my-day-note,
.home-my-day-signin {
  padding: 13px 14px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.45;
}

.home-my-day-empty.link {
  color: var(--accent-strong);
  text-decoration: none;
}

.home-my-day-note.warning {
  border-bottom: 1px solid rgb(255 184 77 / 0.2);
  background: rgb(255 184 77 / 0.08);
  color: #ffd18a;
}

.home-my-day-signin {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 22px;
}

.home-my-day-signin strong {
  color: var(--text);
  font-size: 0.95rem;
}

.home-my-day-signin p {
  margin: 0;
}

.home-today-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 14px;
  border-bottom: 1px solid rgb(var(--accent-soft-rgb) / 0.14);
  color: var(--text);
  text-decoration: none;
  transition: background 0.16s ease;
}

.home-today-item:hover {
  background: rgb(var(--accent-rgb) / 0.08);
}

.home-today-item > img,
.home-today-cover-placeholder {
  width: 42px;
  height: 54px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.3);
  border-radius: 7px;
  object-fit: cover;
}

.home-today-cover-placeholder {
  display: grid;
  place-items: center;
  background: rgb(var(--accent-rgb) / 0.12);
  color: var(--accent-strong);
  font-weight: 900;
}

.home-today-item-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.home-today-item-copy > strong {
  overflow: hidden;
  font-size: 0.82rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-today-item-copy > small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-today-item-copy i {
  font-style: normal;
}

.home-today-item-copy b {
  color: var(--accent-strong);
  font-size: 0.62rem;
}

.home-today-item > time {
  color: var(--accent-strong);
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.home-my-day-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  gap: 12px;
  padding: 0 14px;
  border-top: 1px solid rgb(var(--accent-soft-rgb) / 0.22);
}

.home-my-day-footer a {
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.home-my-day-footer a:hover {
  color: var(--text);
}

.home-trending-panel {
  height: clamp(270px, 28vw, 340px);
  --trend-dir: 1;
}

@media (hover: hover) and (pointer: fine) {
  .home-trending-panel {
    cursor: grab;
  }

  .home-trending-panel a,
  .home-trending-panel button {
    cursor: pointer;
  }

  .home-trending-panel.trending-dragging,
  .home-trending-panel.trending-dragging * {
    cursor: grabbing !important;
    user-select: none;
  }

  .home-trending-panel:is(.trending-dragging, .trending-drag-settling) .home-trending-hero.active {
    z-index: 2;
    opacity: 1;
    transform: translate3d(var(--trending-drag-x, 0px), 0, 0);
    animation: none !important;
  }

  .home-trending-panel:is(.trending-dragging, .trending-drag-settling) .home-trending-hero.trending-drag-preview {
    z-index: 1;
    opacity: 1;
    pointer-events: none;
    transform: translate3d(var(--trending-drag-preview-x, 100%), 0, 0);
    animation: none !important;
  }

  .home-trending-panel.trending-dragging .home-trending-hero.active,
  .home-trending-panel.trending-dragging .home-trending-hero.trending-drag-preview {
    transition: none;
  }

  .home-trending-panel.trending-drag-settling .home-trending-hero.active,
  .home-trending-panel.trending-drag-settling .home-trending-hero.trending-drag-preview {
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  }
}

.home-trending-panel[data-trending-direction="prev"] {
  --trend-dir: -1;
}

.home-trending-hero {
  position: absolute;
  inset: 0;
  min-height: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(142px, 210px);
  gap: clamp(18px, 4vw, 56px);
  align-items: center;
  padding: clamp(24px, 3vw, 36px) clamp(34px, 5vw, 64px);
  isolation: isolate;
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(calc(var(--trend-dir) * 26px), 0, 0) scale(0.985);
  transition:
    opacity 0.62s ease,
    transform 0.74s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-trending-hero.active {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
}

.home-trending-hero.in-list {
  box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / 0.44);
}

.home-trending-hero.status-completed {
  box-shadow: inset 0 0 0 1px rgba(134, 239, 172, 0.52);
}

.home-trending-hero.status-planning {
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.58);
}

.home-trending-hero.status-dropped {
  box-shadow: inset 0 0 0 1px rgba(251, 113, 133, 0.58);
}

.home-trending-hero.status-paused {
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.52);
}

.home-trending-hero.entering {
  animation: trending-slide-in 0.52s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-trending-hero.leaving {
  animation: trending-slide-out 0.52s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-trending-backdrop {
  position: absolute;
  inset: -16px;
  z-index: -2;
  width: calc(100% + 32px);
  height: calc(100% + 32px);
  object-fit: cover;
  filter: blur(4px) saturate(1.14) brightness(0.78);
  transform: scale(1.012);
  opacity: 0.94;
  transition: filter 0.45s ease, transform 0.78s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-trending-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(5, 8, 19, 0.96), rgba(5, 8, 19, 0.72) 42%, rgba(5, 8, 19, 0.18)),
    radial-gradient(circle at 72% 32%, rgb(var(--accent-rgb) / 0.18), transparent 34%);
}

.home-trending-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 20%, rgb(var(--accent-rgb) / 0.24), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 22%, rgba(0, 0, 0, 0.18));
}

.home-trending-copy {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  display: grid;
  gap: 12px;
}

.home-trending-art {
  position: relative;
  z-index: 1;
  justify-self: end;
  width: min(190px, 24vw);
  aspect-ratio: 2 / 3;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.42);
  border-radius: 18px;
  overflow: hidden;
  background: rgb(var(--surface-rgb) / 0.72);
  box-shadow:
    0 26px 48px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 0 38px rgb(var(--accent-rgb) / 0.24);
  transform: perspective(720px) rotateY(-7deg) rotateZ(1deg);
  transition:
    opacity 0.52s ease,
    transform 0.78s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.45s ease;
}

.home-trending-hero.entering .home-trending-art {
  animation: trending-poster-in 0.82s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.home-trending-hero.leaving .home-trending-art {
  animation: trending-poster-out 0.58s ease both;
}

.home-trending-cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.home-trending-art span {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 3rem;
  font-weight: 950;
  color: var(--accent);
}

.home-trending-art em {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.38);
  border-radius: 999px;
  background: rgba(4, 7, 18, 0.72);
  color: var(--text);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 950;
  backdrop-filter: blur(10px);
}

@keyframes trending-slide-in {
  from { opacity: 1; transform: translateX(calc(var(--trend-dir) * 100%)); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes trending-slide-out {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 1; transform: translateX(calc(var(--trend-dir) * -100%)); }
}

@keyframes trending-poster-in {
  from {
    opacity: 0;
    transform: perspective(720px) translate3d(calc(var(--trend-dir) * 72px), 10px, 0) rotateY(calc(var(--trend-dir) * -16deg)) rotateZ(2deg) scale(0.92);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.32);
  }
  72% {
    opacity: 1;
    transform: perspective(720px) translate3d(calc(var(--trend-dir) * -6px), -2px, 0) rotateY(-5deg) rotateZ(1deg) scale(1.02);
  }
  to {
    opacity: 1;
    transform: perspective(720px) translate3d(0, 0, 0) rotateY(-7deg) rotateZ(1deg) scale(1);
    box-shadow:
      0 26px 48px rgba(0, 0, 0, 0.48),
      0 0 0 1px rgba(255, 255, 255, 0.06) inset,
      0 0 38px rgb(var(--accent-rgb) / 0.24);
  }
}

@keyframes trending-poster-out {
  from {
    opacity: 1;
    transform: perspective(720px) translate3d(0, 0, 0) rotateY(-7deg) rotateZ(1deg) scale(1);
  }
  to {
    opacity: 0;
    transform: perspective(720px) translate3d(calc(var(--trend-dir) * -46px), 5px, 0) rotateY(calc(var(--trend-dir) * 10deg)) rotateZ(-1deg) scale(0.94);
  }
}

.home-trending-copy > span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.home-trending-copy h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.05;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-trending-copy p {
  margin: 0;
  color: var(--soft);
  min-height: 1.35em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-trending-dots {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  z-index: 3;
}

.home-trending-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

.home-trending-dots button.active,
.home-trending-dots button:hover {
  background: var(--accent);
}

.home-trending-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(8, 14, 31, 0.72);
  color: var(--text);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
}

.home-trending-arrow.prev {
  left: 14px;
}

.home-trending-arrow.next {
  right: 14px;
}

.home-trending-arrow:hover {
  border-color: rgb(var(--accent-soft-rgb) / 0.48);
  background: rgb(var(--accent-rgb) / 0.18);
}

.schedule-filter-grid {
  display: grid;
  grid-template-columns: 1fr 120px 100px minmax(180px, 1fr) minmax(150px, auto) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

.schedule-list-toggle {
  min-width: 0;
}

.schedule-list-toggle .toggle-row {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.22);
  border-radius: 12px;
  background: rgb(var(--surface-solid-rgb) / 0.42);
  color: var(--soft);
  font-weight: 850;
}

.schedule-list-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.schedule-day {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}

.schedule-day.current-day > .section-title {
  padding: 10px 12px;
  border: 1px solid rgb(var(--accent-rgb) / 0.38);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgb(var(--accent-rgb) / 0.13), transparent 58%),
    rgb(var(--surface-2-rgb) / 0.62);
  box-shadow: 0 12px 34px rgb(var(--accent-rgb) / 0.12);
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.schedule-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.22);
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0%, rgb(var(--accent-rgb) / 0.1), transparent 40%),
    rgb(var(--surface-2-rgb) / 0.7);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

.schedule-card.next-up {
  border-color: rgb(var(--accent-rgb) / 0.82);
  background:
    radial-gradient(circle at 100% 0%, rgb(var(--accent-rgb) / 0.2), transparent 45%),
    linear-gradient(135deg, rgb(var(--accent-rgb) / 0.12), rgb(var(--surface-2-rgb) / 0.78));
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgb(var(--accent-rgb) / 0.18),
    0 0 28px rgb(var(--accent-rgb) / 0.22);
}

.schedule-card.in-list {
  border-color: rgb(var(--list-status-rgb) / 0.72);
  background:
    radial-gradient(circle at 100% 0%, rgb(var(--list-status-rgb) / 0.18), transparent 42%),
    linear-gradient(135deg, rgb(var(--list-status-rgb) / 0.1), rgb(var(--surface-2-rgb) / 0.76));
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.24),
    0 0 0 1px rgb(var(--list-status-rgb) / 0.14);
}

.schedule-cover {
  width: 92px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.24);
  background: var(--panel-3);
}

.schedule-cover-placeholder {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 2rem;
  font-weight: 950;
}

.schedule-card-copy {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
}

.schedule-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--soft);
  font-size: 0.82rem;
  font-weight: 850;
}

.schedule-card-head b {
  color: var(--accent);
}

.schedule-card-flags {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.schedule-card-head .next-up-pill {
  padding: 2px 7px;
  border: 1px solid rgb(var(--accent-rgb) / 0.5);
  border-radius: 999px;
  background: rgb(var(--accent-rgb) / 0.14);
  color: var(--text);
  box-shadow: 0 0 16px rgb(var(--accent-rgb) / 0.18);
}

.schedule-card h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.2;
}

.schedule-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.schedule-card h3 a:hover {
  color: var(--accent);
}

.schedule-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.pill-row.compact {
  gap: 5px;
}

.schedule-streams {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.schedule-streams a,
.schedule-streams span {
  padding: 4px 8px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.24);
  border-radius: 999px;
  color: var(--soft);
  background: rgb(var(--surface-solid-rgb) / 0.48);
  font-size: 0.78rem;
  text-decoration: none;
}

.schedule-streams a:hover {
  color: var(--text);
  border-color: rgb(var(--accent-rgb) / 0.5);
}

.continue-panel {
  padding: 14px;
}

.continue-rail {
  display: grid;
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(132px, 1fr);
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 8px;
  scroll-snap-type: x proximity;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.continue-card {
  min-width: 0;
  position: relative;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  scroll-snap-align: start;
}

.continue-card-link {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.continue-card.in-list,
.continue-card.status-watching {
  border-color: rgb(var(--accent-rgb) / 0.62);
  box-shadow: 0 0 0 1px rgb(var(--accent-rgb) / 0.18), 0 0 22px rgb(var(--accent-rgb) / 0.1);
}

.continue-card.status-completed {
  border-color: rgba(134, 239, 172, 0.62);
  box-shadow: 0 0 0 1px rgba(134, 239, 172, 0.16);
}

.continue-card.status-planning {
  border-color: rgba(251, 191, 36, 0.62);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.16);
}

.continue-card.status-dropped {
  border-color: rgba(251, 113, 133, 0.62);
  box-shadow: 0 0 0 1px rgba(251, 113, 133, 0.16);
}

.continue-card.status-paused {
  border-color: rgba(148, 163, 184, 0.56);
}

.continue-card img,
.continue-card .continue-cover {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 9px;
}

.continue-plus {
  position: absolute;
  top: 14px;
  right: 14px;
  min-width: 42px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgb(var(--accent-rgb) / 0.55);
  border-radius: 999px;
  background: linear-gradient(135deg, rgb(var(--accent-rgb) / 0.95), rgb(var(--accent-2-rgb) / 0.92));
  color: #fff;
  font-weight: 900;
  font-size: 0.82rem;
  line-height: 1;
  box-shadow: 0 12px 28px rgb(var(--accent-rgb) / 0.24), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  cursor: pointer;
  transition: transform 0.16s ease, filter 0.16s ease, opacity 0.16s ease;
  z-index: 2;
}

.continue-plus:hover:not(:disabled) {
  transform: translateY(-1px) scale(1.03);
  filter: brightness(1.08);
}

.continue-plus:disabled {
  cursor: default;
  opacity: 0.62;
}

.continue-plus.done {
  background: rgba(148, 163, 184, 0.24);
  border-color: rgba(148, 163, 184, 0.32);
  color: var(--muted);
  box-shadow: none;
}

.continue-card strong,
.continue-card span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.continue-card span {
  color: var(--muted);
  font-size: 0.78rem;
}

.continue-card i {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.continue-card b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.home-grid .activity-panel {
  width: 100%;
  min-width: 0;
}

.home-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.mobile-chat-open,
.chat-close-button,
.chat-popup-backdrop {
  display: none;
}

.chat-popup-backdrop[hidden] {
  display: none;
}

.activity-panel,
.chat-panel {
  min-width: 0;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(18, 24, 50, 0.72), rgba(8, 14, 31, 0.78)),
    var(--glass);
  backdrop-filter: blur(18px);
}

.chat-panel {
  position: fixed;
  top: 90px;
  right: 28px;
  bottom: 22px;
  z-index: 18;
  width: 360px;
  max-width: calc(100vw - 56px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  box-shadow: var(--shadow);
}

body:not(.home-route) .chat-panel {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

body:not(.home-route) .chat-panel.open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateY(0);
  z-index: 132;
}

body:not(.home-route) .chat-dock-head {
  grid-template-columns: minmax(0, 1fr) auto;
}

body:not(.home-route) .chat-close-button {
  display: inline-flex;
}

body.streaming-route .chat-panel,
body.streaming-route .global-chat-fab {
  display: none;
}

.global-chat-fab {
  position: fixed;
  right: 24px;
  top: auto;
  bottom: 24px;
  z-index: 130;
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  gap: 1px;
  border: 1px solid rgb(var(--accent-strong-rgb) / 0.5);
  border-radius: 999px;
  color: #fff;
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.28), transparent 30%),
    linear-gradient(135deg, rgb(var(--accent-rgb) / 0.96), rgb(var(--accent-2-rgb) / 0.88));
  box-shadow:
    0 18px 42px rgb(var(--accent-rgb) / 0.26),
    0 10px 26px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

@media (max-width: 920px) {
  .global-chat-fab {
    right: 18px;
    bottom: calc(90px + env(safe-area-inset-bottom));
  }
}

.global-chat-fab.dragging {
  cursor: grabbing;
  transition: none;
}

.global-chat-fab:hover {
  transform: translateY(-2px);
  box-shadow:
    0 22px 52px rgb(var(--accent-rgb) / 0.34),
    0 12px 30px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.global-chat-fab svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.global-chat-fab span {
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1;
}

body.home-route .global-chat-fab {
  display: none;
}

body.chat-popup-open .global-chat-fab {
  display: none;
}

body.wrapped-page-active .global-chat-fab,
body.wrapped-page-active .chat-panel,
body.wrapped-page-active .chat-popup-backdrop,
body.wrapped-page-active .announcement-popup-backdrop {
  display: none;
}

body.wrapped-share-open .global-chat-fab {
  display: none;
}

body.wrapped-share-open .announcement-popup-backdrop {
  z-index: 110;
}

body.wrapped-share-open .wrapped-share {
  z-index: 360;
}

.chat-dock-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.chat-title-button {
  justify-content: flex-start;
  font-weight: 900;
}

.chat-refresh-button {
  min-width: 86px;
  flex: 0 0 auto;
}

.social-composer {
  display: grid;
  gap: 11px;
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.22);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0% 0%, rgb(var(--accent-rgb) / 0.1), transparent 34%),
    rgba(9, 14, 31, 0.76);
  backdrop-filter: blur(14px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 18px 38px rgba(0, 0, 0, 0.18);
}

.chat-composer {
  margin-bottom: 0;
}

.social-composer .textarea,
.comment-form .textarea,
.direct-message-form .textarea {
  min-height: 74px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
    rgba(7, 12, 28, 0.88);
}

.composer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.klipy-open img {
  width: 27px;
  height: 27px;
  object-fit: contain;
  display: block;
  margin: 0;
  transform: translate3d(0, 0, 0);
  transform-origin: center;
  pointer-events: none;
}

.klipy-open,
.media-picker-open,
.image-upload-open,
.mention-open {
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 999px;
  display: grid !important;
  place-items: center;
  gap: 0;
  line-height: 1;
}

.mention-open {
  font-size: 1.05rem;
  font-weight: 950;
  color: var(--accent);
}

.media-picker-open svg,
.image-upload-open svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-list,
.chat-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.chat-list {
  overflow-y: auto;
  padding-right: 4px;
  align-content: start;
  min-height: 0;
}

.sidebar,
.sidebar-menu-panel .nav,
.chat-panel,
.chat-list,
.brand-status-popover,
.brand-status-components,
.notification-popover,
.messages-popover,
.messages-user-results,
.messages-thread-list,
.messages-body,
.ambient-popover,
.top-auth-popover,
.mod-nav-popover,
.mobile-nav-popover,
.presence-popover,
.score-users-popover,
.media-info-popover,
.discord-widget-popover,
.modal,
.modal-body {
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}

.social-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(19, 26, 56, 0.74), rgba(7, 12, 28, 0.8)),
    rgba(9, 14, 31, 0.72);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 14px 30px rgba(0, 0, 0, 0.18);
}

.social-avatar-link {
  position: relative;
  z-index: 2;
  display: block;
  width: fit-content;
  height: fit-content;
  cursor: pointer;
}

.reviews-panel {
  display: grid;
  gap: 12px;
}

.reviews-panel .empty {
  min-height: 46px;
  padding: 9px 12px;
  align-content: center;
  font-size: 0.84rem;
  border-radius: 12px;
}

.review-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid rgb(var(--accent-rgb) / 0.18);
  border-radius: 16px;
  background:
    radial-gradient(circle at 0% 0%, rgb(var(--accent-rgb) / 0.08), transparent 34%),
    linear-gradient(180deg, rgba(19, 26, 56, 0.74), rgba(7, 12, 28, 0.8));
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 14px 30px rgba(0, 0, 0, 0.16);
}

.review-card-compact {
  border-color: rgb(var(--accent-rgb) / 0.32);
  background:
    linear-gradient(135deg, rgb(var(--accent-rgb) / 0.12), rgb(var(--accent-2-rgb) / 0.05)),
    rgba(12, 18, 35, 0.76);
}

.review-body {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.review-body p {
  margin: 0;
  color: var(--text);
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.review-votes {
  width: min(100%, 230px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(48px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.review-vote-score strong {
  color: var(--text);
}

.reviews-modal {
  width: min(820px, 100%);
}

.reviews-modal-body,
#reviews-list {
  display: grid;
  gap: 12px;
}

.review-composer {
  margin-top: 4px;
}

.social-highlight {
  animation: social-highlight 2.4s ease;
}

@keyframes social-highlight {
  0%,
  100% {
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
  }
  25%,
  70% {
    box-shadow: 0 0 0 2px var(--accent), 0 0 32px rgb(var(--accent-rgb) / 0.44);
  }
}

.chat-item {
  grid-template-columns: 34px minmax(0, 1fr);
  padding: 9px;
}

.social-avatar,
.chat-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel-3);
}

.chat-avatar {
  width: 34px;
  height: 34px;
}

.social-avatar.store-avatar-frame,
.chat-avatar.store-avatar-frame {
  overflow: visible !important;
  box-shadow: 0 0 0 1px rgb(var(--accent-rgb) / 0.24), 0 0 18px rgb(var(--accent-rgb) / 0.18);
}

.chat-avatar.store-avatar-frame::before {
  inset: -10px;
}

.chat-avatar.store-avatar-frame .store-frame-deco {
  transform: scale(0.72);
}

.social-body {
  min-width: 0;
  display: grid;
  gap: 7px;
  overflow: visible;
}

.comment-preview-button {
  width: min(100%, 560px);
  display: grid;
  gap: 5px;
  padding: 9px 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  color: var(--soft);
  background: rgba(12, 18, 27, 0.72);
  text-align: left;
}

.comment-preview-button:hover {
  border-color: rgb(var(--accent-rgb) / 0.38);
  background: rgb(var(--accent-rgb) / 0.1);
}

.comment-preview-line {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comments-modal {
  width: min(720px, 100%);
}

.comments-modal-body {
  display: grid;
  gap: 14px;
  padding-top: 16px;
}

.comments-list {
  display: grid;
  gap: 10px;
}

.comment-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(12, 18, 27, 0.72);
}

.comment-item p {
  margin: 5px 0 0;
  color: var(--soft);
  overflow-wrap: anywhere;
}

.comment-form {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 13px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.26);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0% 0%, rgb(var(--accent-rgb) / 0.16), transparent 38%),
    linear-gradient(180deg, rgb(var(--surface-2-rgb) / 0.72), rgb(var(--surface-rgb) / 0.82));
  backdrop-filter: blur(16px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 36px rgba(0, 0, 0, 0.18);
}

.comment-form #comments-message {
  grid-column: 1 / -1;
}

.comment-composer-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid rgb(var(--accent-soft-rgb) / 0.55);
  object-fit: cover;
  background: var(--panel-3);
  box-shadow: 0 0 18px rgb(var(--accent-rgb) / 0.22);
}

.comment-composer-body {
  min-width: 0;
  display: grid;
  gap: 9px;
}

.comment-composer .textarea {
  min-height: 78px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgb(var(--accent-rgb) / 0.045), rgba(255, 255, 255, 0.014)),
    rgb(var(--surface-deep-rgb) / 0.76);
  border-color: rgb(var(--accent-soft-rgb) / 0.2);
}

.comment-composer .textarea:focus {
  border-color: rgb(var(--accent-soft-rgb) / 0.62);
  box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.14), 0 0 24px rgb(var(--accent-rgb) / 0.1);
}

.comment-composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.comment-composer-actions span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.comment-composer-actions .button {
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
}

.replying-to {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 9px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.22);
  border-radius: 10px;
  background: rgb(var(--accent-rgb) / 0.08);
  color: var(--soft);
  font-size: 0.82rem;
}

.replying-to[hidden] {
  display: none;
}

.social-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.8rem;
}

.asuna-inline-actions {
  display: inline-flex;
  gap: 6px;
}

.social-like-summary {
  margin-left: auto;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.18);
  border-radius: 999px;
  background: rgb(var(--surface-solid-rgb) / 0.68);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.social-like-summary strong {
  color: var(--text);
}

.asuna-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--soft);
  min-height: 24px;
  padding: 0 8px;
  font-size: 0.72rem;
  white-space: nowrap;
}

.asuna-action.active,
.asuna-action.like-action.active {
  border-color: rgb(var(--accent-soft-rgb) / 0.48);
  background: rgb(var(--accent-rgb) / 0.18);
  color: var(--text);
}

.like-action {
  display: inline-grid !important;
  place-items: center;
  min-height: 30px;
  height: 30px;
  width: 34px;
  padding: 0;
  gap: 0;
  border-radius: 999px;
  line-height: 1;
  font-weight: 850;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.like-action .like-icon {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgb(var(--accent-rgb) / 0.1);
  margin: auto;
}

.like-action svg {
  width: 14px;
  height: 14px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linejoin: round;
  overflow: visible;
  transform: translate(0.25px, 0.7px);
  transform-origin: center;
}

.like-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgb(var(--accent-rgb) / 0.16);
}

.like-action:active {
  transform: translateY(0) scale(0.97);
}

.like-action.active svg {
  fill: currentColor;
}

.asuna-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  width: 100%;
  min-width: 0;
  overflow: visible;
}

.chat-item .asuna-action-row {
  padding-top: 2px;
}

.chat-item .asuna-action-row .asuna-action:not(.like-action) {
  min-height: 28px;
  padding: 0 10px;
}

.mention-link {
  color: var(--accent);
  font-weight: 900;
}

.social-text-link {
  color: var(--accent);
  font-weight: 900;
  text-decoration: none;
}

.social-text-link:hover {
  text-decoration: underline;
}

.social-inline-webm {
  display: block;
  width: min(100%, 520px);
  max-height: min(430px, 62dvh);
  margin: 8px 0 2px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.28);
  border-radius: 7px;
  background: #05070c;
  object-fit: contain;
  isolation: isolate;
  contain: paint;
}

.profile-bio-webm {
  width: min(100%, 54rem);
  margin: 0;
}

.spoiler-text {
  display: inline;
  padding: 1px 4px;
  border: 0;
  border-radius: 4px;
  background: rgb(148 163 184 / 0.42);
  color: transparent;
  font: inherit;
  line-height: inherit;
  cursor: pointer;
  transition: color 140ms ease, background-color 140ms ease;
}

.spoiler-text > span,
.spoiler-text > span * {
  color: transparent;
  text-decoration: none;
  text-shadow: none;
}

.spoiler-text:hover,
.spoiler-text:focus-visible {
  background: rgb(148 163 184 / 0.54);
}

.spoiler-text.revealed {
  background: rgb(var(--surface-2-rgb) / 0.9);
  color: var(--soft);
}

.spoiler-text.revealed > span,
.spoiler-text.revealed > span * {
  color: inherit;
}

.mention-picker {
  position: fixed;
  z-index: 170;
  display: grid;
  gap: 5px;
  max-height: min(306px, 48dvh);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  pointer-events: auto;
  padding: 7px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.32);
  border-radius: 16px;
  background:
    radial-gradient(circle at 8% 0%, rgb(var(--accent-rgb) / 0.18), transparent 38%),
    rgba(8, 13, 29, 0.96);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px);
}

.mention-inline-picker {
  grid-column: 1 / -1;
  display: grid;
  gap: 5px;
  max-height: 230px;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  pointer-events: auto;
  padding: 7px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.32);
  border-radius: 14px;
  background:
    radial-gradient(circle at 8% 0%, rgb(var(--accent-rgb) / 0.16), transparent 38%),
    rgb(var(--surface-rgb) / 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 14px 28px rgba(0, 0, 0, 0.2);
}

.mention-inline-picker[hidden] {
  display: none;
}

.mention-picker[hidden] {
  display: none;
}

.mention-picker-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  width: 100%;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--soft);
  background: transparent;
  text-align: left;
}

.mention-picker-item:hover,
.mention-picker-item.active {
  border-color: rgb(var(--accent-rgb) / 0.38);
  background: rgb(var(--accent-rgb) / 0.12);
  color: var(--text);
}

.mention-picker-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel-3);
}

.mention-picker-item span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.mention-picker-item strong,
.mention-picker-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mention-picker-item small,
.mention-picker-empty {
  color: var(--muted);
}

.mention-picker-empty {
  padding: 12px;
  font-size: 0.9rem;
}

.reply-preview {
  width: min(100%, 420px);
  display: grid;
  gap: 3px;
  padding: 7px 9px;
  border: 1px solid rgba(148, 163, 224, 0.16);
  border-left-color: var(--accent);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--soft);
  text-align: left;
}

.reply-preview span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.asuna-action:hover {
  border-color: rgb(var(--accent-rgb) / 0.42);
  color: var(--text);
}

.asuna-action.danger:hover {
  border-color: rgba(251, 113, 133, 0.52);
  color: #ffe8ed;
}

.social-name {
  color: var(--text);
  font-weight: 900;
}

:is(.activity-panel, .profile-activity-panel) .activity-user-name-badge {
  gap: 8px;
  overflow: visible;
}

:is(.activity-panel, .profile-activity-panel) .activity-user-name-badge .store-profile-badge,
.profile-update-author .profile-update-user-name-badge .store-profile-badge {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  max-width: min(15rem, 46vw);
  padding: 3px 8px;
  border-color: rgb(var(--accent-soft-rgb) / 0.48);
  background:
    linear-gradient(135deg, rgb(var(--accent-rgb) / 0.24), rgb(var(--accent-2-rgb) / 0.12)),
    rgb(var(--surface-solid-rgb) / 0.72);
  color: rgb(var(--accent-soft-rgb));
  font-size: 0.68rem;
  line-height: 1.15;
  overflow-wrap: normal;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 16px rgb(var(--accent-rgb) / 0.2);
}

:is(.activity-panel, .profile-activity-panel) .activity-user-name-badge .store-profile-badge::before,
.profile-update-author .profile-update-user-name-badge .store-profile-badge::before,
.chat-item .chat-user-name-badge .store-profile-badge::before {
  content: "";
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 9px currentColor;
}

.chat-item .social-meta {
  align-items: flex-start;
}

.chat-item .social-name {
  min-width: 0;
  display: block;
}

.chat-item .chat-user-name-badge {
  display: grid;
  width: fit-content;
  grid-template-columns: minmax(0, auto) auto;
  align-items: center;
  justify-items: start;
  gap: 3px 6px;
  overflow: visible;
}

.chat-item .chat-user-name-badge .sponsor-role-badge {
  grid-column: 2;
  grid-row: 1;
}

.chat-item .chat-user-name-badge .store-profile-badge {
  grid-column: 1 / -1;
  grid-row: 2;
  max-width: min(10rem, 44vw);
  min-height: 15px;
  padding: 2px 7px;
  border-color: rgb(var(--accent-soft-rgb) / 0.48);
  background:
    linear-gradient(135deg, rgb(var(--accent-rgb) / 0.22), rgb(var(--accent-2-rgb) / 0.1)),
    rgb(var(--surface-solid-rgb) / 0.72);
  color: rgb(var(--accent-soft-rgb));
  font-size: 0.62rem;
  line-height: 1.15;
  box-shadow: 0 0 14px rgb(var(--accent-rgb) / 0.2);
}

.chat-item .chat-user-name-badge .user-name-badge-text {
  grid-column: 1;
  grid-row: 1;
  max-width: min(12rem, 42vw);
}

.social-body p {
  margin: 0;
  color: var(--soft);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.social-attachment,
.attachment-preview {
  position: relative;
  display: block;
  border: 0;
  border-radius: 7px;
  background: transparent;
  overflow: hidden;
  width: min(100%, 520px);
}

.media-picker-controls {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px;
}

.media-picker-results {
  display: grid;
  gap: 9px;
  margin-top: 14px;
  max-height: min(520px, 58dvh);
  overflow: auto;
}

.media-picker-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--soft);
  text-align: left;
}

.media-picker-card:hover {
  border-color: rgb(var(--accent-soft-rgb) / 0.44);
  background: rgb(var(--accent-rgb) / 0.1);
}

.media-picker-card .social-embed-thumb {
  width: 54px;
  height: 72px;
}

.media-picker-card span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.media-picker-card strong,
.media-picker-card small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.social-embed-card,
.embed-preview {
  position: relative;
  width: min(100%, 520px);
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 23, 34, 0.76);
}

.social-embed-card:hover {
  border-color: rgb(var(--accent-rgb) / 0.5);
  background: rgb(var(--accent-rgb) / 0.08);
}

.social-embed-thumb,
.embed-preview-thumb {
  width: 72px;
  height: 96px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--panel-3);
}

.social-embed-thumb.avatar-placeholder,
.embed-preview-thumb.avatar-placeholder {
  aspect-ratio: auto;
  font-size: 1.35rem;
}

.embed-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.embed-copy strong {
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.embed-copy span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.embed-preview .remove-attachment {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(5, 8, 13, 0.82);
  border-color: rgba(255, 255, 255, 0.2);
}

.social-attachment img,
.attachment-preview img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  display: block;
  background: transparent;
  border-radius: inherit;
}

.social-attachment.uploaded-image {
  width: min(100%, 680px);
}

.social-attachment.uploaded-image img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}

.chat-item .social-attachment {
  width: min(100%, 300px);
}

.chat-item .social-attachment.uploaded-image {
  width: min(100%, 360px);
}

.chat-item .social-embed-card {
  width: min(100%, 300px);
  grid-template-columns: 54px minmax(0, 1fr);
}

.chat-item .social-embed-thumb {
  width: 54px;
  height: 72px;
}

.chat-item .social-attachment img {
  max-height: 260px;
}

.attachment-preview {
  width: min(100%, 280px);
}

.attachment-preview img {
  max-height: 190px;
}

.attachment-preview.uploaded-image img {
  height: auto;
  max-height: min(360px, 54dvh);
}

.attachment-preview .remove-attachment {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(5, 8, 13, 0.82);
  border-color: rgba(255, 255, 255, 0.2);
}

.social-edit-modal,
.social-delete-modal {
  width: min(640px, 100%);
}

.social-edit-form {
  display: grid;
  gap: 14px;
}

.social-edit-attachment {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.2);
  border-radius: 14px;
  background:
    radial-gradient(circle at 0% 0%, rgb(var(--accent-rgb) / 0.08), transparent 40%),
    rgb(var(--surface-solid-rgb) / 0.66);
}

.social-edit-attachment[hidden] {
  display: none !important;
}

.social-edit-attachment .selected-attachment:empty {
  display: none;
}

.social-edit-tools {
  justify-content: flex-start;
}

.attachment-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.social-modal-actions {
  justify-content: flex-end;
}

.social-delete-warning {
  border-color: rgba(251, 113, 133, 0.42);
  background:
    linear-gradient(180deg, rgba(251, 113, 133, 0.12), transparent),
    rgb(var(--surface-solid-rgb) / 0.8);
}

.klipy-modal {
  width: min(940px, 100%);
}

.klipy-title {
  margin: 0;
  line-height: 1;
}

.klipy-title img {
  width: min(220px, 52vw);
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.klipy-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 12px;
}

.klipy-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.klipy-tabs .tab {
  flex: 0 0 auto;
}

.klipy-grid {
  column-width: 220px;
  column-gap: 10px;
}

.klipy-card {
  min-width: 0;
  width: 100%;
  display: inline-block;
  break-inside: avoid;
  margin: 0 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--soft);
  padding: 0;
  overflow: hidden;
  text-align: left;
}

.klipy-card:hover {
  transform: translateY(-1px);
}

.klipy-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  background: transparent;
  border-radius: inherit;
}

.compact-panel {
  padding: 12px;
}

.compact-panel h3 {
  margin-bottom: 8px;
}

.media-heart-button {
  width: 46px;
  height: 46px;
  min-height: 46px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.34);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--soft);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgb(var(--accent-rgb) / 0.08)),
    rgba(9, 14, 24, 0.74);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 14px 32px rgba(0, 0, 0, 0.26);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.media-heart-button:hover:not(:disabled),
.media-heart-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgb(var(--accent-rgb) / 0.72);
  color: var(--accent);
}

.media-heart-button.active {
  color: var(--accent);
  border-color: rgb(var(--accent-rgb) / 0.78);
  background:
    radial-gradient(circle at 50% 42%, rgb(var(--accent-rgb) / 0.28), transparent 58%),
    rgba(9, 14, 24, 0.86);
}

.media-heart-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.media-heart-icon {
  width: 22px;
  height: 22px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.media-heart-button.active .media-heart-icon {
  fill: currentColor;
}

.tracking-panel .form-grid,
.tracking-panel .two-col {
  gap: 8px;
}

.tracking-panel .field {
  gap: 4px;
}

.tracking-panel .field.full-span {
  grid-column: 1 / -1;
}

.tracking-panel .field label {
  font-size: 0.72rem;
}

.tracking-panel .input,
.tracking-panel .select {
  min-height: 34px;
  padding: 0 9px;
}

.field-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.score-field.is-disabled {
  opacity: 0.72;
}

.score-field.is-disabled .input {
  cursor: not-allowed;
  border-color: rgb(var(--accent-rgb) / 0.18);
  background: rgba(7, 12, 28, 0.48);
}

.tracking-progress-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.tracking-progress-input.has-total {
  grid-template-columns: minmax(0, 1fr) auto;
}

.tracking-progress-total {
  min-height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0 10px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.28);
  border-radius: 10px;
  background: rgb(var(--accent-rgb) / 0.08);
  color: var(--soft);
  font-size: 0.82rem;
  font-weight: 950;
  white-space: nowrap;
}

.tracking-progress-total strong,
.tracking-progress-total small {
  display: block;
  line-height: 1.05;
}

.tracking-progress-total strong {
  font-size: 0.82rem;
}

.tracking-progress-total small {
  margin-top: 3px;
  color: rgb(var(--accent-soft-rgb));
  font-size: 0.62rem;
  font-weight: 900;
}

.tracking-panel .textarea {
  min-height: 66px;
  padding: 8px 9px;
}

.tracking-panel .button {
  min-height: 36px;
}

.tracking-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.tracking-head h3 {
  margin: 0;
}

.tracking-title-row {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.progress-history-button {
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  flex: 0 0 auto;
}

.progress-history-icon {
  width: 16px;
  height: 16px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.remove-list-button {
  min-height: 28px;
  padding: 0 10px;
  font-size: 0.76rem;
  flex: 0 0 auto;
}

.episode-history-modal {
  width: min(520px, 100%);
}

.episode-history-add {
  display: grid;
  grid-template-columns: 92px minmax(150px, 1fr) 120px auto;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgb(var(--accent-rgb) / 0.28);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgb(var(--accent-rgb) / 0.1), rgba(255, 255, 255, 0.035)),
    rgba(12, 18, 27, 0.72);
}

.episode-history-add label {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.episode-history-add label span,
.episode-history-add > small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.episode-history-add .input {
  min-height: 36px;
  padding: 0 9px;
}

.episode-history-add > small {
  grid-column: 1 / -1;
  min-height: 1em;
  text-transform: none;
  letter-spacing: 0;
}

.episode-history-list {
  display: grid;
  gap: 8px;
  padding-top: 14px;
}

.episode-history-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.episode-history-row > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.episode-history-row strong,
.episode-history-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.episode-history-row strong {
  color: var(--text);
  font-size: 0.86rem;
}

.episode-history-row span,
.episode-history-row time {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.episode-history-row time {
  flex: 0 0 auto;
}

.episode-history-date {
  flex: 0 0 auto;
  display: grid;
  gap: 4px;
  justify-items: end;
}

.episode-history-row > .episode-history-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.episode-history-date .input {
  width: 184px;
  min-height: 34px;
  padding: 0 8px;
  font-size: 0.78rem;
}

.episode-history-date small {
  min-height: 1em;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.episode-history-delete {
  width: 34px;
  height: 34px;
  min-height: 34px;
  color: #ffb4bd;
  border-color: rgba(255, 111, 132, 0.35);
}

.episode-history-delete:hover {
  color: #fff;
  border-color: rgba(255, 111, 132, 0.62);
  background: rgba(255, 111, 132, 0.16);
}

.untracked-panel {
  border-color: rgb(var(--accent-rgb) / 0.22);
  background:
    linear-gradient(135deg, rgb(var(--accent-rgb) / 0.1), rgba(149, 164, 184, 0.06) 45%, rgba(19, 26, 36, 0.94)),
    var(--panel);
  padding: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.untracked-panel h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text);
}

.untracked-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
}

.untracked-label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding-left: 11px;
  position: relative;
}

.untracked-label::before {
  content: "";
  position: absolute;
  left: 0;
  width: 3px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.untracked-panel .form-grid {
  display: block;
  flex: 0 0 auto;
}

.untracked-panel .button {
  min-width: 118px;
  min-height: 34px;
  padding: 0 14px;
  font-size: 0.84rem;
}

.untracked-panel #list-message {
  margin-top: 6px;
}

.muted-pill {
  width: fit-content;
  padding: 4px 7px;
  font-size: 0.66rem;
  border-color: rgba(149, 164, 184, 0.35);
  background: rgba(149, 164, 184, 0.1);
  color: #c3cedd;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #101722;
}

.stat-label {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.stat-value {
  margin-top: 4px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.stats-panel .stat-grid {
  gap: 7px;
}

.stats-panel .stat {
  padding: 8px;
}

.stats-panel .stat-label {
  font-size: 0.66rem;
}

.stats-panel .stat-value {
  font-size: 0.88rem;
  line-height: 1.25;
}

.episode-release-stat {
  display: grid;
  gap: 2px;
}

.episode-release-stat strong {
  color: rgb(var(--accent-soft-rgb));
  font-size: 0.94rem;
}

.episode-release-stat small {
  color: var(--soft);
  font-size: 0.68rem;
  font-weight: 750;
}

.audience-ratings-block {
  display: grid;
  gap: 9px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgb(var(--accent-rgb) / 0.2);
  border-radius: 8px;
  background: linear-gradient(135deg, rgb(var(--accent-rgb) / 0.09), rgba(255, 255, 255, 0.025));
}

.audience-ratings-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.audience-ratings-head strong {
  color: var(--text);
  font-size: 0.82rem;
}

.vote-statistics {
  display: grid;
  gap: 8px;
}

.audience-groups-head {
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.vote-stat-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.vote-stat-summary > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgb(var(--accent-rgb) / 0.18);
  border-radius: 7px;
  background: rgb(var(--accent-rgb) / 0.07);
}

.vote-stat-summary strong {
  color: var(--text);
  font-size: 0.92rem;
}

.vote-stat-summary span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vote-stat-chart {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 4px;
  min-height: 84px;
  padding: 8px 6px 5px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  background: rgba(6, 12, 24, 0.34);
}

.vote-stat-column {
  display: grid;
  grid-template-rows: 48px auto auto;
  gap: 2px;
  min-width: 0;
  text-align: center;
}

.vote-stat-column i {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: center;
  min-width: 0;
}

.vote-stat-column i::before {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  content: "";
}

.vote-stat-column b {
  position: relative;
  width: min(13px, 72%);
  min-height: 0;
  border-radius: 3px 3px 1px 1px;
  background: linear-gradient(180deg, rgb(var(--accent-2-rgb) / 0.94), rgb(var(--accent-rgb) / 0.76));
  box-shadow: 0 0 10px rgb(var(--accent-rgb) / 0.18);
}

.vote-stat-column span,
.vote-stat-column small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.58rem;
  line-height: 1;
  text-overflow: ellipsis;
}

.vote-stat-column span {
  color: var(--soft);
  font-weight: 700;
}

.audience-ratings-head small,
.audience-ratings-block > p {
  color: var(--muted);
  font-size: 0.68rem;
}

.audience-ratings-block > p {
  margin: 0;
  line-height: 1.4;
}

.audience-rating-row {
  display: grid;
  gap: 6px;
}

.audience-rating-row > b {
  color: var(--muted);
  font-size: 0.64rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.audience-rating-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 6px;
}

.audience-rating-chip {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  background: rgba(6, 12, 24, 0.42);
}

.audience-rating-chip span,
.audience-rating-chip em {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.64rem;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audience-rating-chip strong {
  color: var(--text);
  font-size: 0.82rem;
}

.audience-rating-chip strong small {
  color: var(--muted);
  font-size: 0.7em;
}

.audience-rating-chip.has-score {
  border-color: rgb(var(--accent-rgb) / 0.22);
  background: rgb(var(--accent-rgb) / 0.08);
}

.audience-rating-chip.needs-scores strong {
  color: var(--soft);
  font-size: 0.7rem;
}

.audience-match-pill {
  border-color: rgb(var(--accent-2-rgb) / 0.34);
  background: linear-gradient(135deg, rgb(var(--accent-rgb) / 0.16), rgb(var(--accent-2-rgb) / 0.13));
  color: var(--text);
}

.recommendation-reason-pill {
  border-color: rgb(var(--accent-rgb) / 0.28);
  background: rgb(var(--accent-rgb) / 0.11);
  color: var(--text);
}

.anime-info-grid .stat:nth-child(-n + 2) {
  background: linear-gradient(135deg, rgb(var(--accent-rgb) / 0.16), rgb(var(--accent-2-rgb) / 0.08)), #101722;
}

.profile-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(320px, 620px);
  gap: 18px;
  align-items: end;
  margin-bottom: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgb(var(--accent-rgb) / 0.16), rgb(var(--accent-2-rgb) / 0.06)),
    var(--panel);
}

.profile-hero.has-banner {
  min-height: 260px;
  background: var(--panel);
  border-color: rgb(var(--accent-rgb) / 0.38);
  box-shadow: var(--shadow), inset 0 1px 0 rgb(255 255 255 / 0.04);
}

.profile-hero.has-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(8, 13, 29, 0.92), rgba(8, 13, 29, 0.58) 48%, rgba(8, 13, 29, 0.84)),
    linear-gradient(0deg, rgba(8, 13, 29, 0.86), rgba(8, 13, 29, 0.18) 54%, rgba(8, 13, 29, 0.72));
  pointer-events: none;
}

.profile-banner-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.03);
}

.profile-mark {
  margin-bottom: 14px;
}

.profile-identity {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.profile-stats {
  position: relative;
  z-index: 1;
}

.profile-avatar,
.settings-avatar-preview {
  width: 110px;
  height: 110px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel-3);
  object-fit: cover;
  box-shadow: var(--shadow);
}

.settings-banner-preview {
  width: 100%;
  min-height: 150px;
  aspect-ratio: 16 / 5;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-3);
  object-fit: cover;
  box-shadow: var(--shadow);
}

.banner-placeholder {
  display: grid;
  place-items: center;
  min-height: 150px;
  color: var(--soft);
  font-weight: 850;
  letter-spacing: 0;
  background:
    linear-gradient(135deg, rgb(var(--accent-rgb) / 0.22), rgb(var(--accent-2-rgb) / 0.08)),
    var(--panel-3);
}

.account-avatar {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel-3);
  object-fit: cover;
}

.avatar-placeholder {
  display: grid;
  place-items: center;
  color: #071018;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 900;
}

.profile-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.profile-bio {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--soft);
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.muted-text,
.hint {
  color: var(--muted);
}

.hint {
  margin: 0;
  font-size: 0.84rem;
}

.profile-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.profile-stat {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(12, 18, 27, 0.72);
  min-width: 0;
}

.profile-status-menu {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 35;
}

.profile-stat:has(.profile-status-menu[open]) {
  z-index: 80;
}

.profile-status-menu[open] {
  z-index: 90;
}

.profile-status-menu summary {
  width: 28px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  cursor: pointer;
  list-style: none;
}

.profile-status-menu summary::-webkit-details-marker {
  display: none;
}

.profile-status-menu summary span {
  width: 16px;
  height: 9px;
  display: block;
  border-radius: 999px 999px 999px 4px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transform: rotate(-12deg);
  box-shadow: 0 0 18px rgb(var(--accent-rgb) / 0.36);
}

.profile-status-menu[open] summary {
  background: rgb(var(--accent-rgb) / 0.12);
}

.profile-status-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 190px;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 18, 27, 0.98);
  box-shadow: var(--shadow);
  z-index: 36;
}

.profile-status-menu[open] .profile-status-popover {
  z-index: 91;
}

.profile-status-popover a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 9px;
  border-radius: 6px;
  color: var(--soft);
}

.profile-status-popover a:hover {
  color: var(--text);
  background: rgb(var(--accent-rgb) / 0.12);
}

.profile-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.profile-list-panel {
  min-width: 0;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.info-preview-panel {
  margin-bottom: 16px;
  display: grid;
  gap: 14px;
  overflow: hidden;
}

.info-preview-panel p {
  max-width: 980px;
  margin: 0;
  color: var(--soft);
  line-height: 1.62;
}

.info-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.info-live-preview,
.info-preview-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.22);
  border-radius: 18px;
  display: grid;
  gap: 12px;
  color: inherit;
  background:
    radial-gradient(circle at 18% 0%, rgb(var(--accent-rgb) / 0.16), transparent 36%),
    rgba(255, 255, 255, 0.045);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  padding: 14px;
}

.info-live-preview:hover,
.info-preview-card:hover {
  border-color: rgb(var(--accent-soft-rgb) / 0.58);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.32);
}

.info-preview-heading {
  display: grid;
  align-items: start;
  gap: 12px;
  min-width: 0;
}

.info-preview-heading span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.info-preview-heading strong {
  color: var(--text);
  font-size: 1rem;
}

.info-preview-heading small {
  color: var(--muted);
  line-height: 1.35;
}

@media (max-width: 1180px) {
  .info-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.info-preview-panel .home-trending-panel {
  margin: 0;
  min-height: 310px;
}

.info-page-frame-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.25);
  background: rgba(0, 0, 0, 0.34);
  min-height: 460px;
}

.info-page-frame {
  width: 100%;
  display: block;
  height: 460px;
  border: 0;
  background: var(--bg);
}

.info-preview-card {
  padding: 0;
}

.info-preview-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  object-position: top center;
  background: rgba(0, 0, 0, 0.36);
}

.info-preview-card span {
  min-width: 0;
  padding: 12px;
  display: grid;
  gap: 3px;
}

.info-preview-card strong {
  color: var(--text);
  font-size: 0.98rem;
}

.info-preview-card small {
  color: var(--muted);
  line-height: 1.35;
}

.info-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 8px;
  color: var(--soft);
  line-height: 1.55;
}

.api-docs {
  grid-template-columns: minmax(0, 1fr);
}

.info-panel {
  display: grid;
  gap: 12px;
}

.info-panel p {
  margin: 0;
  color: var(--soft);
  line-height: 1.65;
}

.info-panel pre {
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(5, 8, 13, 0.58);
  color: #c7eaff;
}

.api-code-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: #20242c;
}

.api-code-card figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px 0;
  color: var(--soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
}

.api-code-card pre {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.api-copy-button {
  min-width: 58px;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 7px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.78rem;
}

.info-panel code {
  color: #c7eaff;
}

.api-table {
  display: grid;
  gap: 6px;
}

.api-table > div {
  display: grid;
  grid-template-columns: 72px minmax(210px, 0.95fr) minmax(0, 1.35fr);
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.api-table > div:first-child {
  color: var(--text);
  background: rgb(var(--accent-rgb) / 0.1);
  border-color: rgb(var(--accent-rgb) / 0.22);
}

.api-table.compact > div {
  grid-template-columns: 72px minmax(190px, 0.8fr) minmax(0, 1fr);
}

.useful-pages-panel {
  grid-column: 1 / -1;
}

.api-table.useful-pages-table > div {
  grid-template-columns: minmax(150px, 0.8fr) minmax(130px, 0.65fr) minmax(0, 1.55fr);
  align-items: start;
}

.useful-pages-table > div > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.api-table code {
  overflow-wrap: anywhere;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 16px;
  align-items: start;
}

.settings-side-stack {
  display: grid;
  gap: 16px;
  align-items: start;
}

.sessions-panel {
  display: grid;
  gap: 12px;
}

.session-intro {
  margin: -3px 0 2px;
  line-height: 1.45;
}

.session-list {
  display: grid;
  gap: 10px;
}

.session-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgb(var(--accent-rgb) / 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgb(var(--accent-rgb) / 0.07), transparent 52%),
    rgb(var(--surface-2-rgb) / 0.52);
}

.session-row.current {
  border-color: rgb(var(--accent-rgb) / 0.38);
  box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / 0.08);
}

.session-row.current .session-icon {
  color: #fff;
  background: var(--accent);
}

.session-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgb(var(--accent-rgb) / 0.22);
  border-radius: 50%;
  color: var(--accent);
  background: rgb(var(--accent-rgb) / 0.1);
}

.session-icon svg,
.session-signout-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.session-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.session-copy strong {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
  color: var(--text);
  font-size: 0.92rem;
}

.session-copy strong em {
  padding: 2px 7px;
  border: 1px solid rgb(var(--accent-rgb) / 0.28);
  border-radius: 999px;
  color: var(--accent);
  background: rgb(var(--accent-rgb) / 0.1);
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.session-copy span,
.session-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-meta {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 3px 11px;
}

.session-meta small + small::before {
  content: "\00b7";
  margin-right: 11px;
  color: rgb(var(--accent-soft-rgb) / 0.55);
}

.session-signout-button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  border-color: rgba(248, 113, 113, 0.22);
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.06);
}

.session-signout-button:hover {
  border-color: rgba(248, 113, 113, 0.55);
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.1);
}

.session-only-current,
.session-action-message {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.session-action-message {
  color: var(--accent);
  font-weight: 800;
}

.session-action-message.error {
  color: #fca5a5;
}

.sessions-panel .subtle-danger {
  justify-content: center;
  width: 100%;
}

@media (max-width: 520px) {
  .session-row {
    grid-template-columns: 34px minmax(0, 1fr) 32px;
    gap: 8px;
    padding: 9px;
  }

  .session-icon {
    width: 34px;
    height: 34px;
  }

  .session-copy strong {
    font-size: 0.86rem;
  }

  .session-meta {
    display: grid;
    gap: 1px;
  }

  .session-meta small + small::before {
    content: none;
  }
}

.settings-avatar-row,
.settings-banner-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.settings-banner-row {
  grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
  align-items: start;
}

.avatar-editor-modal {
  width: min(620px, 100%);
  background: #111821;
}

.avatar-editor-body {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.avatar-crop-stage {
  position: relative;
  width: 100%;
  height: clamp(220px, 38vw, 260px);
  overflow: hidden;
  border-radius: 8px;
  background: #030508;
  touch-action: none;
  cursor: default;
}

.avatar-crop-stage img {
  position: absolute;
  max-width: none;
  user-select: none;
  pointer-events: none;
}

.avatar-crop-frame {
  position: absolute;
  border: 2px solid rgba(248, 250, 252, 0.92);
  box-shadow:
    0 0 0 999px rgba(3, 6, 10, 0.46),
    0 0 0 1px rgba(15, 23, 42, 0.7);
  cursor: move;
  touch-action: none;
}

.avatar-crop-frame.circle {
  border-radius: 50%;
}

.avatar-crop-frame.square {
  border-radius: 8px;
}

.avatar-crop-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to right, transparent 49.5%, rgba(248, 250, 252, 0.4) 49.5% 50.5%, transparent 50.5%),
    linear-gradient(to bottom, transparent 49.5%, rgba(248, 250, 252, 0.4) 49.5% 50.5%, transparent 50.5%);
}

.avatar-crop-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 1px solid rgba(15, 23, 42, 0.8);
  background: #f8fafc;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.32);
}

.avatar-crop-handle.nw {
  top: -7px;
  left: -7px;
  cursor: nwse-resize;
}

.avatar-crop-handle.ne {
  top: -7px;
  right: -7px;
  cursor: nesw-resize;
}

.avatar-crop-handle.sw {
  bottom: -7px;
  left: -7px;
  cursor: nesw-resize;
}

.avatar-crop-handle.se {
  right: -7px;
  bottom: -7px;
  cursor: nwse-resize;
}

.avatar-editor-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
}

.avatar-editor-controls label,
.avatar-editor-preview-row label {
  display: block;
  margin-bottom: 8px;
  color: var(--soft);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.avatar-zoom {
  height: 22px;
  padding: 0;
  accent-color: var(--accent);
  background: transparent;
}

.avatar-shape-toggle {
  display: flex;
  gap: 8px;
}

.avatar-shape-toggle .button {
  min-height: 38px;
  gap: 8px;
  padding: 0 12px;
  font-size: 0.86rem;
}

.avatar-shape-toggle .button.active {
  border-color: rgb(var(--accent-rgb) / 0.9);
  color: #f8fafc;
  background: rgb(var(--accent-rgb) / 0.1);
}

.shape-dot {
  width: 12px;
  height: 12px;
  display: inline-block;
  border: 2px solid currentColor;
}

.shape-dot.circle {
  border-radius: 50%;
  color: var(--accent);
}

.shape-dot.square {
  border-radius: 3px;
  color: #c4b5fd;
  background: currentColor;
}

.avatar-editor-preview-row {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  gap: 20px;
  align-items: end;
}

.avatar-preview-pair {
  display: flex;
  gap: 12px;
  align-items: end;
}

.avatar-preview-swatch {
  width: 72px;
  height: 72px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel-3);
  box-shadow: var(--shadow);
}

.avatar-preview-swatch.circle {
  border-radius: 50%;
}

.avatar-preview-swatch.square {
  border-radius: 8px;
}

.avatar-preview-swatch img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.avatar-editor-help {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.avatar-editor-help p {
  margin: 0;
}

@media (max-width: 620px) {
  .avatar-editor-modal {
    max-height: calc(100dvh - 20px);
  }

  .avatar-crop-stage {
    height: 210px;
  }

  .avatar-editor-controls,
  .avatar-editor-preview-row {
    grid-template-columns: 1fr;
  }

  .avatar-shape-toggle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .avatar-shape-toggle .button {
    width: 100%;
    justify-content: center;
  }
}

.danger-zone {
  border-color: rgba(251, 113, 133, 0.42);
}

.admin-users {
  margin-bottom: 16px;
}

.mod-account-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 8px;
  max-width: 680px;
  margin: 0 0 14px;
}

.mod-account-search .icon-button {
  width: 40px;
  height: 40px;
}

.mod-account-search .icon-button[hidden] {
  display: none;
}

.mod-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.mod-stat {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--soft);
}

.mod-stat.active {
  border-color: rgb(var(--accent-soft-rgb) / 0.5);
  background: rgb(var(--accent-soft-rgb) / 0.08);
}

.mod-stat span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.mod-stat strong {
  color: var(--text);
  font-size: 1.55rem;
}

.data-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.data-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 260px));
  gap: 10px;
  margin-bottom: 14px;
}

.data-metric {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid rgb(var(--accent-rgb) / 0.32);
  border-radius: 8px;
  background:
    radial-gradient(circle at 0% 0%, rgb(var(--accent-rgb) / 0.12), transparent 42%),
    var(--panel);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

.data-metric:hover,
.data-metric.active {
  border-color: rgb(var(--accent-rgb) / 0.6);
  background:
    radial-gradient(circle at 0% 0%, rgb(var(--accent-rgb) / 0.2), transparent 44%),
    rgb(var(--surface-2-rgb) / 0.9);
}

.data-metric span,
.data-metric small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.data-metric strong {
  color: var(--text);
  font-size: 1.7rem;
  line-height: 1;
}

.data-tab {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--soft);
}

.data-tab.active {
  border-color: rgb(var(--accent-rgb) / 0.55);
  background: rgb(var(--accent-rgb) / 0.1);
}

.data-tab span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.data-tab strong {
  color: var(--text);
  font-size: 1.25rem;
}

.data-search {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 130px auto auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.data-panel {
  padding: 14px;
}

.data-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.data-filter-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgb(var(--surface-2-rgb) / 0.74);
  color: var(--soft);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.data-filter-button strong {
  min-width: 23px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgb(var(--surface-rgb) / 0.78);
  color: var(--muted);
  font-size: 0.72rem;
  text-align: center;
}

.data-filter-button:hover,
.data-filter-button:focus-visible,
.data-filter-button.active {
  border-color: rgb(var(--accent-rgb) / 0.7);
  background: rgb(var(--accent-rgb) / 0.13);
  color: var(--text);
  box-shadow: 0 0 18px rgb(var(--accent-rgb) / 0.13);
  outline: none;
}

.data-filter-button.active strong {
  background: rgb(var(--accent-rgb) / 0.2);
  color: var(--accent);
}

#data-browser-results {
  transition: opacity 0.16s ease;
}

#data-browser-results.is-loading {
  opacity: 0.58;
}

.data-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0c121b;
}

.data-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 10px 11px;
  border-bottom: 1px solid rgba(40, 52, 71, 0.8);
  text-align: left;
  vertical-align: top;
  font-size: 0.84rem;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #101722;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.data-table .data-sort-header {
  padding: 0;
}

.data-sort-button {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 11px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 850;
  letter-spacing: 0;
  text-align: left;
  text-transform: inherit;
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.data-sort-button:hover,
.data-sort-button:focus-visible,
.data-sort-button.active {
  background: rgb(var(--accent-rgb) / 0.12);
  color: var(--text);
  box-shadow: inset 0 -2px 0 rgb(var(--accent-rgb) / 0.72);
  outline: none;
}

.data-sort-button.active {
  color: var(--accent);
}

.data-sort-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.62;
}

.data-sort-button.active .data-sort-icon {
  opacity: 1;
  filter: drop-shadow(0 0 5px rgb(var(--accent-rgb) / 0.5));
}

.data-table tr:hover td {
  background: rgb(var(--accent-rgb) / 0.06);
}

.data-table td {
  max-width: 260px;
  overflow-wrap: anywhere;
  color: var(--soft);
}

.data-table a {
  color: var(--text);
  font-weight: 800;
}

.store-log-amount {
  display: inline-flex;
  min-width: 48px;
  justify-content: flex-end;
  font-variant-numeric: tabular-nums;
}

.store-log-amount.positive {
  color: #6ee7b7;
}

.store-log-amount.negative {
  color: #fda4af;
}

.store-log-type {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(var(--surface-2-rgb) / 0.82);
  color: var(--soft);
  font-size: 0.72rem;
  font-weight: 900;
}

.store-log-type.moderator {
  border-color: rgb(var(--accent-rgb) / 0.58);
  background: rgb(var(--accent-rgb) / 0.12);
  color: var(--accent);
}

.store-log-type.gift {
  border-color: rgb(244 114 182 / 0.5);
  background: rgb(244 114 182 / 0.1);
  color: #f9a8d4;
}

.store-log-type.purchase {
  border-color: rgb(251 191 36 / 0.5);
  background: rgb(251 191 36 / 0.1);
  color: #fcd34d;
}

.store-log-type.automatic {
  border-color: rgb(52 211 153 / 0.46);
  background: rgb(52 211 153 / 0.09);
  color: #6ee7b7;
}

.store-log-reason,
.store-log-reference,
.store-log-system {
  color: var(--soft);
  font-weight: 750;
}

.store-log-actor {
  white-space: nowrap;
}

.data-thumb {
  width: 38px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}

.data-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
}

.mapping-help-panel,
.mapping-form-panel {
  margin-bottom: 14px;
}

.mapping-help-panel p {
  margin: 0;
  color: var(--soft);
  line-height: 1.55;
}

.mapping-create-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.mapping-create-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.mapping-create-form label > span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.mapping-search-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 8px;
}

.mapping-search-results {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.mapping-media-result,
.mapping-media-link {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(var(--surface-2-rgb) / 0.55);
  color: var(--text);
}

.mapping-media-result {
  width: 100%;
  padding: 8px;
  text-align: left;
  cursor: pointer;
}

.mapping-media-link {
  padding: 0;
  border: 0;
  background: transparent;
}

.mapping-media-cover {
  width: 42px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}

.mapping-media-result strong,
.mapping-media-link strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mapping-media-result small,
.mapping-media-link small,
.mapping-provider-stack small {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
}

.mapping-notes-field {
  grid-column: span 2;
}

.mapping-field-help {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border: 1px solid rgb(var(--accent-rgb) / 0.22);
  border-radius: 8px;
  background: rgb(var(--accent-rgb) / 0.08);
  color: var(--soft);
  font-size: 0.84rem;
  line-height: 1.45;
}

.mapping-field-help strong {
  color: var(--text);
}

.mapping-list {
  display: grid;
  gap: 12px;
}

.mapping-card {
  padding: 12px;
  display: grid;
  gap: 12px;
}

.mapping-card-main {
  display: grid;
  grid-template-columns: minmax(220px, 1.15fr) minmax(220px, 1fr);
  gap: 14px;
  align-items: center;
}

.mapping-provider-stack {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.mapping-provider {
  width: fit-content;
  padding: 4px 8px;
  border: 1px solid rgb(var(--accent-rgb) / 0.38);
  border-radius: 999px;
  background: rgb(var(--accent-rgb) / 0.1);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.mapping-provider-stack p {
  margin: 4px 0 0;
  color: var(--soft);
  font-size: 0.84rem;
}

.mapping-edit-form {
  display: grid;
  grid-template-columns: 125px minmax(130px, 1fr) 150px 92px 92px 92px minmax(160px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.sync-mapping-create-form {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.sync-mapping-media-search-field,
.sync-mapping-media-results,
.sync-mapping-selected-field {
  grid-column: 1 / -1;
}

.sync-mapping-summary {
  grid-template-columns: minmax(240px, 0.8fr) minmax(320px, 1.2fr);
}

.sync-mapping-edit-form {
  grid-template-columns: repeat(5, minmax(100px, 0.7fr)) minmax(180px, 1.3fr) auto auto;
}

.sync-mapping-edit-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.sync-mapping-edit-form label > span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sync-mapping-filter-form {
  grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(130px, 0.75fr)) auto;
}

.mod-page-actions,
.external-match-status-row,
.external-match-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.external-match-card {
  gap: 14px;
}

.external-match-summary {
  align-items: start;
}

.external-match-state {
  width: fit-content;
  padding: 4px 8px;
  border: 1px solid rgb(var(--accent-rgb) / 0.34);
  border-radius: 999px;
  color: var(--soft);
  font-size: 0.72rem;
  font-weight: 800;
}

.external-match-state.verified {
  border-color: rgb(69 214 148 / 0.45);
  background: rgb(69 214 148 / 0.11);
  color: #83f0bd;
}

.external-match-state.pending {
  border-color: rgb(255 190 75 / 0.44);
  background: rgb(255 190 75 / 0.1);
  color: #ffd27d;
}

.external-match-range {
  margin: 5px 0 2px !important;
  color: var(--text) !important;
  font-weight: 800;
}

.external-match-example {
  display: block;
  color: var(--accent-strong, var(--accent));
  font-weight: 700;
}

.external-match-details {
  border-top: 1px solid rgb(var(--accent-rgb) / 0.2);
  padding-top: 10px;
}

.external-match-details > summary {
  width: fit-content;
  cursor: pointer;
  color: var(--accent);
  font-weight: 800;
  list-style-position: inside;
}

.external-match-edit-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 12px;
  align-items: end;
}

.external-match-edit-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--soft);
  font-size: 0.78rem;
  font-weight: 750;
}

.external-match-edit-form .external-match-wide {
  grid-column: span 2;
}

.external-match-check {
  display: flex !important;
  grid-column: span 2;
  align-items: center;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid rgb(var(--accent-rgb) / 0.22);
  border-radius: 7px;
  background: rgb(var(--accent-rgb) / 0.06);
}

.external-match-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.external-match-actions {
  grid-column: span 2;
  justify-content: flex-end;
}

.external-match-filter {
  grid-template-columns: minmax(200px, 1.4fr) repeat(4, minmax(110px, 0.65fr)) minmax(120px, 0.65fr) auto;
}

.external-match-create-panel {
  padding: 14px;
}

.external-match-create-panel > summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 800;
}

.external-match-create-form {
  margin-top: 14px;
}

@media (max-width: 980px) {
  .mapping-create-form,
  .mapping-card-main,
  .mapping-edit-form,
  .sync-mapping-filter-form {
    grid-template-columns: 1fr;
  }

  .mapping-notes-field {
    grid-column: auto;
  }

  .mapping-filter-form {
    grid-template-columns: 1fr;
  }

  .external-match-edit-form,
  .external-match-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .mod-page-actions,
  .external-match-edit-form,
  .external-match-filter {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .mod-page-actions {
    display: grid;
  }

  .external-match-edit-form .external-match-wide,
  .external-match-check,
  .external-match-actions {
    grid-column: auto;
  }

  .external-match-actions {
    display: grid;
  }
}

.disabled-link {
  pointer-events: none;
  opacity: 0.45;
}

.mod-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.admin-user-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) minmax(180px, 240px) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101722;
}

.mod-profile-avatar-link {
  display: inline-flex;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
}

.mod-profile-avatar-link:hover .account-avatar {
  border-color: rgb(var(--accent-rgb) / 0.72);
  box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.12);
}

.mod-profile-summary {
  min-width: 0;
}

.mod-profile-link,
.mod-profile-username {
  color: var(--text);
  text-decoration: none;
}

.mod-profile-link {
  display: inline-block;
  max-width: 100%;
  font-weight: 900;
}

.mod-profile-link.inline {
  display: inline;
}

.mod-profile-username {
  display: inline-block;
  max-width: 100%;
  color: var(--muted);
  font-weight: 800;
}

.mod-profile-link:hover,
.mod-profile-username:hover,
.data-user-link:hover {
  color: var(--accent);
}

.user-role-tools,
.user-moderation-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.user-role-tools .select {
  min-width: 110px;
}

.ban-history-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101722;
}

.ban-history-row .message {
  margin-top: 8px;
}

.xml-tools {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.settings-side-stack .xml-tools {
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 0;
}

.settings-side-stack .xml-tools .section-title {
  margin-bottom: 0;
}

.settings-side-stack .xml-tools .actions {
  display: grid;
  grid-template-columns: 1fr;
}

.settings-side-stack .xml-tools .button {
  width: 100%;
}

.xml-tools #mal-xml-message {
  grid-column: 1 / -1;
}

.sr-only-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.character-row,
.staff-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101722;
}

button.staff-row {
  width: 100%;
  color: var(--text);
  font: inherit;
  text-align: left;
  appearance: none;
  cursor: pointer;
}

button.staff-row:hover,
button.staff-row:focus-visible {
  border-color: rgb(var(--accent-rgb) / 0.62);
  background: #132031;
}

.staff-open-hint {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.alias-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.alias-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.alias-pill {
  background: rgb(var(--accent-rgb) / 0.14);
  border-color: rgb(var(--accent-rgb) / 0.35);
  color: var(--soft);
}

.character-cover-stack {
  display: grid;
  gap: 12px;
  width: 280px;
  align-self: end;
}

.character-hero {
  align-items: start;
}

.character-hero .character-cover-stack {
  align-self: start;
  margin-top: -28px;
}

.character-cover-stack .hero-cover {
  width: 100%;
}

.character-format-row {
  justify-content: center;
}

.character-info-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.character-action-panel,
.character-names-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.74);
  padding: 12px;
}

.character-action-panel {
  display: grid;
  gap: 10px;
}

.favorite-character-button.active {
  border-color: rgb(var(--accent-rgb) / 0.58);
  background: linear-gradient(135deg, rgb(var(--accent-rgb) / 0.22), rgb(var(--accent-soft-rgb) / 0.12));
  color: var(--text);
}

.character-votes {
  width: 100%;
}

.character-names-panel h3 {
  margin: 0 0 10px;
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--muted);
}

.character-name-rows {
  display: grid;
  gap: 10px;
}

.character-name-row {
  display: grid;
  gap: 4px;
}

.character-name-row span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.character-name-row strong {
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.voice-actor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.voice-actor-card {
  display: block;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  width: 100%;
  color: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  font: inherit;
}

.voice-actor-card:hover {
  border-color: rgb(var(--accent-rgb) / 0.44);
  background: rgb(var(--accent-rgb) / 0.12);
  transform: translateY(-1px);
}

.voice-actor-card-banner {
  position: relative;
  display: block;
  width: 100%;
  height: 104px;
  overflow: hidden;
  background: var(--panel-3);
  border-bottom: 1px solid var(--line);
}

.voice-actor-card-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 28%, rgba(4, 10, 24, 0.92));
  pointer-events: none;
}

.voice-actor-banner-image,
.poster-placeholder.voice-actor-banner-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}

.voice-actor-banner-title {
  position: absolute;
  z-index: 1;
  left: 10px;
  right: 10px;
  bottom: 7px;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.voice-actor-card-banner.has-cover .voice-actor-banner-title {
  left: 80px;
}

.voice-actor-featured-cover-wrap {
  position: absolute;
  z-index: 2;
  left: 10px;
  top: 8px;
  width: 58px;
  height: 86px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 6px;
  background: var(--panel-3);
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.42);
}

.voice-actor-featured-cover,
.poster-placeholder.voice-actor-featured-cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.voice-actor-card-body {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px;
}

.voice-actor-card-copy {
  display: block;
  min-width: 0;
}

.voice-actor-card-copy > strong {
  display: block;
  overflow-wrap: anywhere;
}

.voice-actor-card small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.voice-actor-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: var(--panel-3);
}

.poster-placeholder.voice-actor-avatar {
  display: grid;
  place-items: center;
}

.voice-actor-modal {
  max-width: min(860px, calc(100vw - 28px));
}

.voice-actor-detail-head {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.voice-actor-detail-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgb(var(--accent-rgb) / 0.42);
  box-shadow: 0 0 26px rgb(var(--accent-rgb) / 0.18);
}

.poster-placeholder.voice-actor-detail-avatar {
  display: grid;
  place-items: center;
}

.voice-actor-detail-head h3 {
  margin: 0 0 4px;
  font-size: 1.35rem;
}

.voice-actor-detail-head p {
  margin: 0 0 10px;
  color: var(--muted);
}

.voice-role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.voice-role-card {
  display: block;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    radial-gradient(circle at 15% 0%, rgb(var(--accent-rgb) / 0.12), transparent 42%),
    rgba(15, 23, 42, 0.74);
  color: var(--text);
  text-decoration: none;
}

.voice-role-card:hover {
  border-color: rgb(var(--accent-rgb) / 0.5);
  transform: translateY(-1px);
}

.voice-role-banner {
  position: relative;
  display: block;
  width: 100%;
  height: 102px;
  overflow: hidden;
  background: var(--panel-3);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.voice-role-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 10, 24, 0.08), rgba(4, 10, 24, 0.88));
  pointer-events: none;
}

.voice-role-banner-image,
.poster-placeholder.voice-role-banner-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
}

.voice-role-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
  padding: 10px;
}

.voice-role-card.has-media-banner .voice-role-content {
  margin-top: -38px;
}

.voice-role-character,
.voice-role-media {
  object-fit: cover;
  object-position: center top;
  border: 1px solid rgba(226, 232, 240, 0.16);
}

.voice-role-character {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex: 0 0 auto;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.36);
}

.voice-role-media {
  width: 70px;
  height: 104px;
  border-radius: 7px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}

.voice-role-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
  align-content: start;
}

.voice-role-card.has-media-banner .voice-role-copy {
  padding-top: 40px;
}

.voice-role-character-line {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.voice-role-card strong,
.voice-role-copy > span:not(.voice-role-character-line):not(.pill-row) {
  display: block;
  overflow-wrap: anywhere;
}

.voice-role-copy > span:not(.voice-role-character-line):not(.pill-row) {
  color: var(--muted);
  font-weight: 800;
  margin-top: 3px;
}

.character-appearance-card.in-list {
  border-color: rgb(var(--accent-rgb) / 0.42);
  box-shadow: 0 0 0 1px rgb(var(--accent-rgb) / 0.18), 0 10px 28px rgba(0, 0, 0, 0.16);
}

.character-appearance-card.status-watching {
  border-color: rgb(var(--accent-rgb) / 0.62);
  background: linear-gradient(180deg, rgb(var(--accent-rgb) / 0.14), rgba(19, 26, 36, 0.96));
}

.character-appearance-card.status-completed {
  border-color: rgba(134, 239, 172, 0.62);
  background: linear-gradient(180deg, rgba(134, 239, 172, 0.14), rgba(19, 26, 36, 0.96));
}

.character-appearance-card.status-planning {
  border-color: rgba(251, 191, 36, 0.66);
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.14), rgba(19, 26, 36, 0.96));
}

.character-appearance-card.status-dropped {
  border-color: rgba(251, 113, 133, 0.66);
  background: linear-gradient(180deg, rgba(251, 113, 133, 0.14), rgba(19, 26, 36, 0.96));
}

.character-appearance-card.status-paused {
  border-color: rgba(148, 163, 184, 0.58);
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.12), rgba(19, 26, 36, 0.96));
}

.list-status-pill.status-watching {
  color: #e0f7ff;
  border-color: rgb(var(--accent-rgb) / 0.52);
  background: rgb(var(--accent-rgb) / 0.16);
}

.list-status-pill.status-completed {
  color: #defde8;
  border-color: rgba(134, 239, 172, 0.52);
  background: rgba(134, 239, 172, 0.16);
}

.list-status-pill.status-planning {
  color: #fff3d0;
  border-color: rgba(251, 191, 36, 0.52);
  background: rgba(251, 191, 36, 0.16);
}

.list-status-pill.status-dropped {
  color: #ffe8ed;
  border-color: rgba(251, 113, 133, 0.52);
  background: rgba(251, 113, 133, 0.16);
}

.list-status-pill.status-paused {
  color: #e5edf7;
  border-color: rgba(148, 163, 184, 0.48);
  background: rgba(148, 163, 184, 0.14);
}

.character-appearance-groups,
.character-appearance-section {
  display: grid;
  gap: 16px;
}

.character-appearance-section {
  min-width: 0;
}

.character-appearance-grid {
  grid-template-columns: 1fr;
}

.character-appearance-card .pill-row {
  gap: 6px;
}

.compact-title {
  margin-bottom: 0;
}

.compact-title h3 {
  margin: 0;
}

.characters-panel .section-title,
.staff-panel .section-title {
  align-items: start;
}

.characters-panel .section-title .button,
.staff-panel .section-title .button {
  min-height: 34px;
}

.character-preview-grid,
.character-modal-grid,
.staff-preview-grid,
.staff-modal-grid {
  display: grid;
  gap: 10px;
}

.character-preview-grid,
.staff-preview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.character-preview-grid .character-row,
.staff-preview-grid .staff-row {
  padding: 8px;
}

.character-preview-grid .avatar,
.staff-preview-grid .avatar {
  width: 48px;
  height: 48px;
}

.characters-modal,
.staff-modal {
  width: min(920px, 100%);
}

.staff-detail-modal {
  width: min(860px, 100%);
}

.character-modal-grid,
.staff-modal-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.staff-row .avatar {
  border-radius: 50%;
}

.staff-row .pill {
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-detail-head {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid rgb(var(--accent-rgb) / 0.22);
  border-radius: 12px;
  background: linear-gradient(135deg, rgb(var(--accent-rgb) / 0.14), rgb(var(--accent-soft-rgb) / 0.08));
}

.staff-detail-avatar {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgb(var(--accent-rgb) / 0.38);
  background: var(--panel-3);
}

.staff-detail-head h3 {
  margin: 0 0 4px;
}

.staff-detail-head p {
  margin: 0 0 10px;
  color: var(--muted);
}

.staff-role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.staff-role-sections {
  display: grid;
  gap: 18px;
}

.staff-role-section {
  display: grid;
  gap: 10px;
}

.staff-role-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.staff-role-section-title h4 {
  margin: 0;
  color: var(--text);
  font-size: 0.9rem;
}

.staff-role-section-title span {
  min-width: 28px;
  padding: 4px 8px;
  border: 1px solid rgb(var(--accent-rgb) / 0.32);
  border-radius: 999px;
  background: rgb(var(--accent-rgb) / 0.12);
  color: var(--soft);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
}

.staff-role-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101722;
  color: var(--text);
  text-decoration: none;
}

.staff-role-card:hover,
.staff-role-card:focus-visible {
  border-color: rgb(var(--accent-rgb) / 0.62);
  background: #132031;
}

.avatar {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--panel-3);
}

.relation-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  align-items: start;
}

.relation-group {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.relation-heading {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.relation-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.relation-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101722;
}

a.relation-card:hover {
  border-color: rgb(var(--accent-rgb) / 0.62);
  background: #132031;
}

.relation-thumb {
  width: 56px;
  height: 78px;
  object-fit: cover;
  object-position: center top;
  border-radius: 6px;
  background: var(--panel-3);
}

.relation-thumb.poster-placeholder {
  aspect-ratio: auto;
  font-size: 1.2rem;
}

.relation-copy {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.relation-title {
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.asunatracks-score-pill {
  cursor: help;
}

.stats-score-trigger {
  display: inline-grid;
  gap: 2px;
  color: inherit;
}

.stats-score-trigger small {
  color: var(--muted);
  font-size: .72em;
  font-weight: 800;
}

.score-users-popover {
  position: fixed;
  z-index: 2600;
  width: min(420px, calc(100vw - 24px));
  max-height: min(560px, calc(100vh - 24px));
  overflow: auto;
  padding: 12px;
  border: 1px solid rgb(var(--accent-rgb) / 0.34);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgb(var(--accent-rgb) / 0.16), transparent 42%),
    rgba(6, 12, 24, 0.94);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  backdrop-filter: blur(18px);
}

.score-users-popover[hidden] {
  display: none;
}

.score-users-popover-inner,
.score-users-popover-columns,
.score-user-list {
  display: grid;
  gap: 10px;
}

.score-users-popover-head {
  display: grid;
  gap: 3px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.score-users-popover-head strong {
  color: var(--text);
  font-size: .98rem;
}

.score-users-popover-head small,
.score-user-row small,
.score-user-list p {
  color: var(--muted);
}

.score-users-popover-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.score-users-popover h4 {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.score-user-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  text-decoration: none;
}

.score-user-row:hover {
  border-color: rgb(var(--accent-rgb) / 0.46);
  background: rgb(var(--accent-rgb) / 0.1);
}

.score-user-row span {
  min-width: 0;
}

.score-user-row strong,
.score-user-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
}

.score-users-popover-loading {
  color: var(--muted);
  font-weight: 800;
}

.tracked-users-pill {
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.tracked-users-pill:hover,
.tracked-users-pill:focus-visible {
  border-color: rgb(var(--accent-rgb) / 0.72);
  background: rgb(var(--accent-rgb) / 0.17);
  box-shadow: 0 0 18px rgb(var(--accent-rgb) / 0.24);
  outline: none;
  transform: translateY(-1px);
}

.tracked-users-popover-inner {
  gap: 12px;
}

.tracked-status-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tracked-user-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.score-users-popover .audience-ratings-block {
  margin-top: 2px;
}

@media (max-width: 560px) {
  .score-users-popover-columns {
    grid-template-columns: 1fr;
  }

  .tracked-user-grid {
    grid-template-columns: 1fr;
  }
}

.media-info-popover {
  position: fixed;
  z-index: 2590;
  width: min(390px, calc(100vw - 24px));
  max-height: min(500px, calc(100vh - 24px));
  overflow: auto;
  padding: 12px;
  border: 1px solid rgb(var(--accent-rgb) / 0.36);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgb(var(--accent-rgb) / 0.14), transparent 42%),
    rgb(var(--surface-deep-rgb) / 0.95);
  box-shadow: 0 22px 66px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(255, 255, 255, 0.045) inset;
  backdrop-filter: blur(20px);
  animation: media-info-in 0.16s ease-out;
}

.media-info-popover[hidden] {
  display: none;
}

@keyframes media-info-in {
  from {
    opacity: 0;
    transform: translateY(5px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.media-info-popover-card {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 13px;
  align-items: start;
}

.media-info-popover-cover {
  display: block;
  color: inherit;
  text-decoration: none;
}

.media-info-cover,
.media-info-popover-cover .poster-placeholder {
  width: 94px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  object-position: center top;
  border: 1px solid rgb(var(--accent-rgb) / 0.3);
  border-radius: 10px;
  background: var(--panel-3);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.media-info-popover-copy {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.media-info-popover-kicker {
  color: rgb(var(--accent-soft-rgb));
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.media-info-popover-title {
  color: var(--text);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.24;
  text-decoration: none;
}

.media-info-popover-title:hover {
  color: rgb(var(--accent-soft-rgb));
}

.media-info-facts,
.media-info-scores,
.media-info-progress,
.media-info-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.media-info-facts span,
.media-info-scores span,
.media-info-progress > span:not(.pill),
.media-info-genres span {
  padding: 4px 7px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.15);
  border-radius: 999px;
  color: var(--soft);
  background: rgb(var(--surface-solid-rgb) / 0.5);
  font-size: 0.7rem;
  font-weight: 800;
}

.media-info-scores span {
  color: rgb(var(--accent-soft-rgb));
}

.media-info-popover-copy p {
  display: -webkit-box;
  margin: 1px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.48;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.media-info-popover-loading {
  min-height: 74px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

[data-media-info-trigger] {
  cursor: help;
}

@media (max-width: 560px) {
  .media-info-popover {
    max-height: min(440px, calc(100vh - 24px));
  }

  .media-info-popover-card {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
  }

  .media-info-cover,
  .media-info-popover-cover .poster-placeholder {
    width: 76px;
  }

  .media-info-popover-copy p {
    -webkit-line-clamp: 3;
  }
}

.stack {
  display: grid;
  gap: 12px;
}

.message {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--soft);
}

.message.error {
  border-color: rgba(251, 113, 133, 0.5);
  color: #ffe8ed;
}

.message.success {
  border-color: rgba(134, 239, 172, 0.45);
  color: #defde8;
}

.audit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.table-like {
  display: grid;
  gap: 10px;
}

.list-filter-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.list-filter-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.list-status-tabs,
.list-view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.list-view-tabs {
  justify-content: flex-end;
}

.list-status-tab,
.list-view-tab {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.24);
  border-radius: 999px;
  color: var(--soft);
  background:
    linear-gradient(180deg, rgb(var(--accent-rgb) / 0.06), transparent),
    rgb(var(--surface-solid-rgb) / 0.54);
  font-weight: 850;
  font-size: 0.82rem;
  text-decoration: none;
}

.list-status-tab.active,
.list-status-tab:hover,
.list-view-tab.active,
.list-view-tab:hover {
  color: var(--text);
  border-color: rgb(var(--accent-rgb) / 0.58);
  background:
    radial-gradient(circle at 20% 0%, rgb(var(--accent-rgb) / 0.22), transparent 44%),
    rgb(var(--surface-2-rgb) / 0.88);
}

.list-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.45fr) minmax(140px, 0.8fr) minmax(150px, 0.85fr) auto auto;
  gap: 12px;
  align-items: end;
}

.list-search-field {
  min-width: 0;
}

.filter-check {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--soft);
  white-space: nowrap;
}

.filter-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.list-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.list-row img {
  width: 64px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 6px;
  background: var(--panel-3);
}

.user-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 220px));
  gap: 14px;
  align-items: stretch;
  justify-content: start;
}

.user-list-card {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  overflow: hidden;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.2);
  border-radius: 14px;
  background:
    radial-gradient(circle at 20% 0%, rgb(var(--accent-rgb) / 0.09), transparent 42%),
    rgb(var(--surface-2-rgb) / 0.72);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.user-list-card:hover {
  transform: translateY(-2px);
  border-color: rgb(var(--accent-rgb) / 0.48);
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.3), 0 0 24px rgb(var(--accent-rgb) / 0.12);
}

.user-list-card.status-completed {
  border-color: rgba(34, 197, 94, 0.44);
}

.user-list-card.status-planning {
  border-color: rgba(234, 179, 8, 0.44);
}

.user-list-card.status-dropped {
  border-color: rgba(239, 68, 68, 0.5);
}

.user-list-card.status-paused {
  border-color: rgba(148, 163, 184, 0.34);
}

.user-list-poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  background: var(--panel-3);
  overflow: hidden;
  border-bottom: 1px solid rgb(var(--accent-soft-rgb) / 0.14);
}

.user-list-poster {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.user-list-poster-wrap .list-status-pill {
  position: absolute;
  left: 9px;
  top: 9px;
  max-width: calc(100% - 18px);
}

.user-list-favorite {
  position: absolute;
  left: 9px;
  bottom: 9px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(244, 63, 94, 0.82);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.user-list-card-body {
  min-width: 0;
  display: grid;
  grid-template-rows: 3.75em auto auto auto;
  align-content: start;
  gap: 8px;
  padding: 0 12px 12px;
}

.user-list-card-body h3 {
  min-height: 3.75em;
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.user-list-card-facts,
.user-list-card-progress,
.user-list-card-extra {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.user-list-card-facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.user-list-card-progress {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.user-list-card-extra {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.user-list-card-facts span,
.user-list-card-progress span,
.user-list-card-progress strong,
.user-list-card-extra span {
  min-width: 0;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgb(var(--surface-solid-rgb) / 0.54);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-list-card-progress strong {
  color: var(--accent);
  text-align: right;
}

.diff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.diff-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #101722;
  min-height: 76px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--soft);
}

.diff-box-original {
  border-color: color-mix(in srgb, var(--muted) 42%, var(--line));
}

.diff-box-current {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
}

.diff-box-proposed {
  border-color: color-mix(in srgb, var(--accent) 68%, var(--line));
  background: color-mix(in srgb, var(--accent) 7%, #101722);
}

.diff-empty {
  color: var(--muted);
  font-style: italic;
}

.suggestion-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.suggestion-meta-grid div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: rgba(12, 18, 27, 0.7);
  min-width: 0;
}

.suggestion-meta-grid span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.suggestion-meta-grid strong {
  color: var(--soft);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.my-edits-search-panel {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding: 14px;
}

.my-edits-search-panel > label {
  color: var(--soft);
  font-size: 0.82rem;
  font-weight: 850;
}

.my-edits-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px auto;
  align-items: center;
  gap: 10px;
}

.my-edits-search-row .icon-button {
  width: 40px;
  height: 40px;
}

.my-edits-search-row .icon-button[hidden] {
  display: block;
  visibility: hidden;
  pointer-events: none;
}

#my-edits-result-count {
  min-width: 74px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.my-edit-result[hidden],
#my-edits-search-empty[hidden] {
  display: none;
}

@media (max-width: 560px) {
  .my-edits-search-row {
    grid-template-columns: minmax(0, 1fr) 40px;
  }

  #my-edits-result-count {
    grid-column: 1 / -1;
    min-width: 0;
    text-align: left;
  }
}

.data-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 18, 27, 0.72);
  overflow: hidden;
}

.data-details summary {
  cursor: pointer;
  padding: 10px 12px;
  color: var(--soft);
  font-weight: 800;
}

.data-details pre {
  margin: 0;
  padding: 12px;
  border-top: 1px solid var(--line);
  overflow: auto;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(5, 8, 13, 0.76);
  backdrop-filter: blur(10px);
}

.modal-backdrop[hidden] {
  display: none;
}

.app-dialog-backdrop {
  z-index: 2100;
}

.share-modal-backdrop {
  z-index: 2000;
}

.modal {
  width: min(760px, 100%);
  max-height: min(820px, calc(100dvh - 36px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.app-dialog-modal {
  width: min(460px, 100%);
  border-radius: 18px;
  border-color: color-mix(in srgb, var(--theme-accent, var(--accent)) 34%, var(--line));
  background: linear-gradient(145deg, color-mix(in srgb, var(--panel) 92%, var(--theme-accent, var(--accent)) 8%), var(--panel-strong));
}

.app-dialog-body {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.app-dialog-actions {
  justify-content: flex-end;
}

.app-dialog-actions .button {
  min-width: 92px;
}

.share-modal {
  width: min(680px, 100%);
  border-color: rgb(var(--accent-soft-rgb) / 0.34);
  background: rgb(var(--surface-solid-rgb) / 0.98);
  box-shadow: 0 28px 76px rgb(0 0 0 / 0.56), 0 0 32px rgb(var(--accent-rgb) / 0.12);
}

.share-modal-body {
  display: grid;
  gap: 16px;
  padding-top: 18px;
}

.share-preview {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgb(var(--surface-deep-rgb) / 0.68);
}

.share-preview.no-image {
  grid-template-columns: minmax(0, 1fr);
}

.share-preview img {
  width: 74px;
  height: 58px;
  border-radius: 6px;
  object-fit: cover;
}

.share-preview > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.share-preview strong,
.share-preview small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-preview small,
.share-message-field small {
  color: var(--muted);
  font-weight: 600;
}

.share-message-field {
  display: grid;
  gap: 7px;
}

.share-account-note {
  margin: -4px 0 0;
  padding: 9px 11px;
  border-left: 3px solid var(--accent);
  background: rgb(var(--accent-rgb) / 0.08);
  color: var(--muted);
  font-size: 0.78rem;
}

.share-message-field > span {
  font-size: 0.8rem;
  font-weight: 850;
}

.share-message-field .textarea {
  min-height: 82px;
  resize: vertical;
}

.share-destinations {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.share-destination,
.share-native-button {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgb(var(--surface-deep-rgb) / 0.62);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.share-destination:hover,
.share-destination:focus-visible,
.share-native-button:hover,
.share-native-button:focus-visible {
  border-color: rgb(var(--accent-soft-rgb) / 0.55);
  background: rgb(var(--accent-rgb) / 0.15);
  box-shadow: 0 0 20px rgb(var(--accent-rgb) / 0.15);
  outline: none;
  transform: translateY(-1px);
}

.share-destination:disabled,
.share-native-button:disabled {
  opacity: 0.58;
  cursor: wait;
  transform: none;
}

.share-destination svg,
.share-native-button svg {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--accent);
}

.share-destination > span,
.share-native-button > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.share-destination strong,
.share-native-button strong {
  font-size: 0.88rem;
}

.share-destination small,
.share-native-button small {
  color: var(--muted);
  font-size: 0.72rem;
}

.share-native-button {
  width: 100%;
  justify-content: flex-start;
}

.share-dm-panel {
  display: grid;
  gap: 10px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.share-dm-panel[hidden] {
  display: none;
}

.share-dm-panel .section-title {
  margin: 0;
}

.share-user-results {
  display: grid;
  gap: 5px;
  max-height: 210px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.share-user-result,
.share-selected-user {
  min-width: 0;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgb(var(--surface-deep-rgb) / 0.58);
  color: var(--text);
  text-align: left;
}

.share-user-result {
  cursor: pointer;
}

.share-user-result:hover,
.share-user-result:focus-visible {
  border-color: rgb(var(--accent-soft-rgb) / 0.5);
  background: rgb(var(--accent-rgb) / 0.12);
  outline: none;
}

.share-user-result > span,
.share-selected-user > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.share-user-result strong,
.share-user-result small,
.share-selected-user strong,
.share-selected-user small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-user-result small,
.share-selected-user small {
  color: var(--muted);
}

.share-status {
  min-height: 20px;
  color: var(--muted);
  font-size: 0.79rem;
  font-weight: 750;
}

.share-status.success {
  color: #86efac;
}

.share-status.error {
  color: #fda4af;
}

@media (max-width: 620px) {
  .share-modal-backdrop {
    place-items: end center;
    padding: 10px;
  }

  .share-modal {
    width: 100%;
    max-height: calc(100dvh - 20px);
  }

  .share-destinations {
    grid-template-columns: minmax(0, 1fr);
  }

  .share-preview {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .share-preview img {
    width: 58px;
    height: 52px;
  }
}

.episode-modal {
  width: min(980px, 100%);
  height: min(820px, calc(100dvh - 36px));
}

.modal-head {
  flex: 0 0 auto;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: #101722;
}

.modal-head > div {
  min-width: 0;
}

.modal-head h2 {
  margin: 0;
  font-size: 1.18rem;
  overflow-wrap: anywhere;
}

.modal-head p {
  margin: 4px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 18px 18px;
  scroll-padding-bottom: 24px;
}

.trending-progress-modal {
  width: min(520px, 100%);
  border-radius: 18px;
  border-color: rgb(var(--accent-soft-rgb) / 0.32);
}

.trending-progress-body {
  padding-top: 18px;
}

.trending-progress-body .compact-panel {
  margin: 0;
  box-shadow: none;
}

.trending-progress-body .progress-history-button {
  display: none;
}

.episode-modal .modal-body {
  padding-bottom: calc(34px + env(safe-area-inset-bottom));
  scroll-padding-bottom: calc(44px + env(safe-area-inset-bottom));
}

.episode-toolbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 -18px 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 23, 34, 0.97);
  backdrop-filter: blur(10px);
}

.episode-toolbar > div:first-child {
  min-width: 0;
  flex: 1 1 190px;
}

.episode-toolbar .actions {
  flex: 1 1 340px;
  justify-content: flex-end;
}

.episode-toolbar .tab,
.episode-toolbar .button {
  flex: 1 1 108px;
  min-height: 36px;
}

.episode-list {
  display: grid;
  gap: 12px;
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.episode-grid-card,
.episode-number-tile {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101722;
  color: var(--text);
  text-align: left;
}

.episode-grid-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  align-content: start;
  cursor: pointer;
}

.episode-grid-card:hover,
.episode-number-tile:hover {
  border-color: rgb(var(--accent-rgb) / 0.62);
  background: #132031;
}

.episode-grid-open {
  display: grid;
  gap: 10px;
}

.episode-card-cover-area {
  position: relative;
}

.episode-grid-cover {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: grid;
  place-items: center;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--panel-3);
  font-size: 1.6rem;
}

.episode-cover-wrap {
  position: relative;
  width: 100%;
}

.episode-cover-placeholder {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 18%, rgb(var(--accent-rgb) / 0.28), transparent 24%),
    radial-gradient(circle at 82% 68%, rgb(var(--accent-2-rgb) / 0.2), transparent 28%),
    linear-gradient(135deg, #151a25 0%, #0b1220 48%, #1b2332 100%);
}

.episode-cover-placeholder::before {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  transform: skewX(-10deg);
}

.episode-cover-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, transparent 0 38%, rgba(255, 255, 255, 0.08) 39% 43%, transparent 44% 100%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 9px);
  opacity: 0.72;
}

.episode-cover-placeholder span {
  position: absolute;
  z-index: 1;
  display: block;
  border-radius: 999px;
}

.episode-cover-placeholder span:nth-child(1) {
  width: 34%;
  height: 7px;
  left: 17%;
  bottom: 24%;
  background: rgb(var(--accent-soft-rgb) / 0.72);
}

.episode-cover-placeholder span:nth-child(2) {
  width: 18%;
  height: 7px;
  left: 56%;
  bottom: 24%;
  background: rgb(var(--accent-rgb) / 0.74);
}

.episode-cover-placeholder span:nth-child(3) {
  width: 44px;
  height: 44px;
  right: 15%;
  top: 18%;
  border: 1px solid rgba(253, 186, 116, 0.46);
  background: rgba(253, 186, 116, 0.14);
}

.episode-cover-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.56);
  border-radius: 8px;
  background: rgba(5, 8, 13, 0.82);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: lowercase;
  backdrop-filter: blur(8px);
}

.episode-number-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 10px;
}

.episode-number-wrap {
  position: relative;
  min-width: 0;
}

.episode-number-tile {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: 0;
  color: var(--accent);
  font-weight: 900;
  font-size: 1rem;
}

.episode-number-wrap.watched .episode-number-tile,
.episode-grid-card.watched {
  border-color: rgba(134, 239, 172, 0.4);
  background: rgba(134, 239, 172, 0.06);
}

.episode-number {
  display: grid;
  place-items: center;
  min-height: 30px;
  border-radius: 8px;
  background: rgb(var(--accent-rgb) / 0.14);
  color: var(--accent);
  font-weight: 900;
}

.episode-list-info-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.episode-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 118px;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101722;
}

.episode-cover {
  width: 86px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: grid;
  place-items: center;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--panel-3);
  font-size: 1.35rem;
}

.episode-copy {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.episode-title {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.episode-title strong {
  overflow-wrap: anywhere;
}

.episode-air-type {
  border-color: rgb(var(--accent-rgb) / 0.46);
  background: rgb(var(--accent-rgb) / 0.14);
  color: var(--accent);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.episode-votes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  justify-items: stretch;
  min-width: 0;
}

.episode-watched-button {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(149, 164, 184, 0.72);
  border-radius: 999px;
  background: rgba(5, 8, 13, 0.82);
  color: var(--text);
  display: grid;
  place-items: center;
  font-weight: 900;
  line-height: 1;
  backdrop-filter: blur(8px);
}

.episode-watched-button:not(.active)::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.episode-watched-button.active {
  border-color: rgba(134, 239, 172, 0.78);
  background: rgba(34, 197, 94, 0.28);
  color: #dcfce7;
}

.episode-watched-button:not(:disabled):hover {
  border-color: rgba(134, 239, 172, 0.9);
  background: rgba(34, 197, 94, 0.2);
}

.episode-watched-button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.episode-watched-button.compact {
  top: -7px;
  right: -7px;
  width: 24px;
  height: 24px;
  font-size: 0.72rem;
}

.episode-watched-button.compact:not(.active)::before {
  width: 8px;
  height: 8px;
  border-width: 1.5px;
}

.episode-detail-watch-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 10px 8px 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 18, 27, 0.7);
  color: var(--soft);
}

.episode-detail-watch-row .episode-watched-button {
  top: 50%;
  left: 10px;
  right: auto;
  transform: translateY(-50%);
}

.episode-detail-date {
  display: grid;
  gap: 5px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 18, 27, 0.7);
}

.episode-detail-date span,
.episode-detail-date small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.episode-detail-date .input {
  min-height: 34px;
  padding: 0 9px;
}

.episode-detail-date small {
  min-height: 1em;
}

.episode-detail-history {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 18, 27, 0.7);
}

.episode-detail-history-head,
.episode-detail-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.episode-detail-history-head strong {
  color: var(--text);
  font-size: 0.84rem;
}

.episode-detail-history-head span,
.episode-detail-history-row span,
.episode-detail-history-row small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.episode-detail-history-row {
  min-width: 0;
}

.episode-detail-history-row .input {
  width: 184px;
  min-height: 34px;
  padding: 0 8px;
  font-size: 0.78rem;
}

.episode-detail-history-row small {
  min-width: 56px;
}

.episode-detail-history-row .episode-history-delete {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  min-height: 32px;
}

@media (max-width: 620px) {
  .episode-history-add {
    grid-template-columns: 1fr 1fr;
  }

  .episode-history-add .button {
    min-height: 38px;
  }

  .episode-history-row,
  .episode-history-actions,
  .episode-detail-history-row {
    align-items: stretch;
  }

  .episode-history-row {
    flex-direction: column;
  }

  .episode-history-actions {
    width: 100%;
  }

  .episode-history-date {
    flex: 1 1 auto;
    justify-items: stretch;
  }

  .episode-history-date .input,
  .episode-detail-history-row .input {
    width: 100%;
  }
}

.episode-suggest-inline {
  margin: 14px 16px 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 23, 34, 0.96);
}

.episode-suggest-inline[hidden] {
  display: none;
}

.episode-grid-card .episode-votes {
  grid-template-columns: minmax(0, 1fr) minmax(48px, auto) minmax(0, 1fr);
  align-items: center;
}

.episode-detail-votes {
  grid-template-columns: 1fr;
}

.vote-button {
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--soft);
  font-weight: 800;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.vote-button.active,
.vote-button:hover:not(:disabled) {
  border-color: rgb(var(--accent-rgb) / 0.62);
  background: rgb(var(--accent-rgb) / 0.14);
  color: var(--text);
}

.vote-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.episode-vote-score {
  display: grid;
  gap: 2px;
  min-width: 0;
  text-align: center;
}

.episode-vote-score strong {
  font-size: 1.05rem;
}

.episode-vote-score span {
  color: var(--muted);
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.episode-detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(5, 8, 13, 0.78);
}

.episode-detail-backdrop[hidden] {
  display: none;
}

.episode-detail-panel {
  width: min(820px, 100%);
  max-height: min(760px, calc(100dvh - 36px));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.episode-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #101722;
}

.episode-detail-head h3 {
  margin: 0;
}

.episode-detail-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.episode-detail-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
}

.episode-detail-cover {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-3);
  font-size: 2rem;
}

.episode-detail-synopsis {
  margin: 0;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-line;
}
.episode-detail-copy {
  min-width: 0;
  display: grid;
  gap: 12px;
  align-content: start;
}

.episode-detail-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.empty {
  min-height: 190px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.empty.social-signin {
  min-height: 48px;
  margin-bottom: 10px;
  padding: 9px 12px;
  font-size: 0.84rem;
  border-radius: 12px;
  align-content: center;
}

.loading {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  color: var(--muted);
  text-align: center;
}

/* Final theme pass for surfaces defined later in the file. */
body[data-theme] .topbar {
  background:
    linear-gradient(135deg, rgb(var(--accent-rgb) / 0.1), transparent 48%),
    rgb(var(--surface-rgb) / 0.82);
}

body[data-theme] .panel,
body[data-theme] .card,
body[data-theme] .profile-hero,
body[data-theme] .activity-panel,
body[data-theme] .chat-panel,
body[data-theme] .modal,
body[data-theme] .review-card,
body[data-theme] .social-item {
  border-color: rgb(var(--accent-soft-rgb) / 0.22);
  background:
    radial-gradient(circle at 0% 0%, rgb(var(--accent-rgb) / 0.08), transparent 34%),
    linear-gradient(180deg, rgb(var(--surface-2-rgb) / 0.78), rgb(var(--surface-rgb) / 0.86));
}

body[data-theme] .social-composer,
body[data-theme] .comment-form,
body[data-theme] .notification-popover,
body[data-theme] .messages-popover,
body[data-theme] .top-auth-popover,
body[data-theme] .live-search-dropdown,
body[data-theme] .mod-nav-popover,
body[data-theme] .mobile-nav-popover,
body[data-theme] .mention-picker,
body[data-theme] .profile-status-popover {
  border-color: rgb(var(--accent-soft-rgb) / 0.26);
  background:
    radial-gradient(circle at 12% 0%, rgb(var(--accent-rgb) / 0.14), transparent 36%),
    rgb(var(--surface-rgb) / 0.97);
}

body[data-theme] .input,
body[data-theme] .select,
body[data-theme] .textarea,
body[data-theme] .global-search .select,
body[data-theme] .global-search .input {
  border-color: rgb(var(--accent-soft-rgb) / 0.2);
  background:
    linear-gradient(180deg, rgb(var(--accent-rgb) / 0.035), transparent),
    rgb(var(--surface-deep-rgb) / 0.78);
}

body[data-theme] .colour-hex {
  border: 0;
  background: transparent;
  box-shadow: none;
}

body[data-theme] .tab,
body[data-theme] .pill,
body[data-theme] .asuna-action,
body[data-theme] .stat,
body[data-theme] .profile-stat,
body[data-theme] .list-row,
body[data-theme] .character-row,
body[data-theme] .staff-row,
body[data-theme] .relation-card,
body[data-theme] .diff-box,
body[data-theme] .data-details,
body[data-theme] .message,
body[data-theme] .comment-item,
body[data-theme] .media-picker-card,
body[data-theme] .social-embed-card,
body[data-theme] .embed-preview,
body[data-theme] .episode-grid-card,
body[data-theme] .episode-number-tile,
body[data-theme] .episode-card,
body[data-theme] .episode-detail-panel,
body[data-theme] .admin-user-row,
body[data-theme] .ban-history-row,
body[data-theme] .api-table > div,
body[data-theme] .suggestion-meta-grid div {
  border-color: rgb(var(--accent-soft-rgb) / 0.18);
  background: rgb(var(--surface-solid-rgb) / 0.74);
}

body[data-theme] .api-code-card,
body[data-theme] .info-panel pre {
  background: rgb(var(--surface-code-rgb) / 0.82);
}

body[data-theme] .tab.active {
  border-color: rgb(var(--accent-soft-rgb) / 0.62);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  text-shadow: 0 1px 10px rgba(255, 255, 255, 0.14);
  box-shadow:
    0 8px 22px rgb(var(--accent-rgb) / 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

body[data-theme] .data-table-wrap,
body[data-theme] .avatar-crop-stage {
  background: rgb(var(--surface-deep-rgb) / 0.95);
}

body[data-theme] .data-table th,
body[data-theme] .modal-head,
body[data-theme] .episode-detail-head,
body[data-theme] .episode-toolbar,
body[data-theme] .episode-suggest-inline {
  background: rgb(var(--surface-solid-rgb) / 0.97);
}

/* Theme cleanup pass for older surfaces that still had fixed pink/dark styling. */
body[data-theme] .top-profile-button,
body[data-theme] .top-profile-chip,
body[data-theme] .top-auth-trigger,
body[data-theme] .top-auth-wrap .button,
body[data-theme] .top-utility-button,
body[data-theme] .ambient-popover,
body[data-theme] .ambient-player-visual,
body[data-theme] .ambient-player-volume,
body[data-theme] .top-auth-popover,
body[data-theme] .notification-popover,
body[data-theme] .messages-popover,
body[data-theme] .mod-nav-popover,
body[data-theme] .mobile-nav-popover,
body[data-theme] .mod-popover-item,
body[data-theme] .klipy-modal,
body[data-theme] .klipy-modal .modal-head,
body[data-theme] .klipy-search,
body[data-theme] .klipy-tabs .tab,
body[data-theme] .info-panel,
body[data-theme] .api-code-card,
body[data-theme] .api-table > div,
body[data-theme] .api-copy-button,
body[data-theme] .mod-stat,
body[data-theme] .mod-filter-tabs .button,
body[data-theme] .profile-stat,
body[data-theme] .profile-list-panel,
body[data-theme] .settings-grid .panel,
body[data-theme] .settings-side-stack .panel,
body[data-theme] .connected-account-row,
body[data-theme] .colour-panel,
body[data-theme] .colour-value-row,
body[data-theme] .colour-rgb-input,
body[data-theme] .colour-eyedropper,
body[data-theme] .ambient-settings,
body[data-theme] .ambient-volume-control,
body[data-theme] .setting-toggle,
body[data-theme] .list-filter-panel,
body[data-theme] .list-status-tab,
body[data-theme] .list-view-tab,
body[data-theme] .user-list-card,
body[data-theme] .data-metric,
body[data-theme] .data-tab,
body[data-theme] .data-search,
body[data-theme] .data-panel,
body[data-theme] .data-table-wrap,
body[data-theme] .data-pager .button,
body[data-theme] .mapping-help-panel,
body[data-theme] .mapping-form-panel,
body[data-theme] .mapping-card,
body[data-theme] .mapping-media-result,
body[data-theme] .admin-user-row,
body[data-theme] .ban-history-row,
body[data-theme] .diff-box,
body[data-theme] .suggestion-meta-grid div {
  border-color: rgb(var(--accent-soft-rgb) / 0.24);
  background:
    radial-gradient(circle at 12% 0%, rgb(var(--accent-rgb) / 0.1), transparent 38%),
    linear-gradient(180deg, rgb(var(--surface-2-rgb) / 0.78), rgb(var(--surface-rgb) / 0.9));
}

body[data-theme] .top-profile-button:hover,
body[data-theme] .top-profile-button.active,
body[data-theme] .top-auth-trigger.active,
body[data-theme] .top-auth-popover .button:hover,
body[data-theme] .top-utility-button:hover,
body[data-theme] .top-utility-button.active,
body[data-theme] .mod-stat.active,
body[data-theme] .profile-stat:hover,
body[data-theme] .mod-popover-item:hover,
body[data-theme] .mod-popover-item.active,
body[data-theme] .mod-filter-tabs .button:hover,
body[data-theme] .mod-filter-tabs .button.primary,
body[data-theme] .data-metric:hover,
body[data-theme] .data-metric.active,
body[data-theme] .data-tab:hover,
body[data-theme] .data-tab.active,
body[data-theme] .mapping-media-result:hover,
body[data-theme] .api-table > div:first-child,
body[data-theme] .api-copy-button:hover,
body[data-theme] .klipy-tabs .tab:hover,
body[data-theme] .klipy-tabs .tab.active,
body[data-theme] .list-status-tab:hover,
body[data-theme] .list-status-tab.active,
body[data-theme] .list-view-tab:hover,
body[data-theme] .list-view-tab.active {
  border-color: rgb(var(--accent-rgb) / 0.58);
  background:
    radial-gradient(circle at 0% 0%, rgb(var(--accent-rgb) / 0.22), transparent 44%),
    rgb(var(--surface-2-rgb) / 0.88);
  color: var(--text);
}

body[data-theme] .top-profile-avatar,
body[data-theme] .profile-avatar,
body[data-theme] .settings-avatar-preview,
body[data-theme] .settings-banner-preview,
body[data-theme] .social-avatar,
body[data-theme] .chat-avatar,
body[data-theme] .notification-avatar {
  border-color: rgb(var(--accent-soft-rgb) / 0.62);
  box-shadow: 0 0 16px rgb(var(--accent-rgb) / 0.28);
}

body[data-theme] .profile-hero.has-banner {
  border-color: rgb(var(--accent-rgb) / 0.38);
  box-shadow: var(--shadow), inset 0 1px 0 rgb(255 255 255 / 0.04), 0 0 28px rgb(var(--accent-rgb) / 0.14);
}

body[data-theme] .profile-status-menu summary span {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 18px rgb(var(--accent-rgb) / 0.36);
}

body[data-theme] .profile-status-menu[open] summary,
body[data-theme] .profile-status-popover a:hover {
  background: rgb(var(--accent-rgb) / 0.12);
}

body[data-theme] .profile-actions .button.primary {
  border-color: rgb(var(--accent-rgb) / 0.72);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 28px rgb(var(--accent-rgb) / 0.24);
}

body[data-theme] .button:not(.danger),
body[data-theme] .icon-button:not(.danger),
body[data-theme] label.button:not(.danger),
body[data-theme] .profile-actions .button:not(.danger),
body[data-theme] .settings-grid .button:not(.danger),
body[data-theme] .settings-side-stack .button:not(.danger),
body[data-theme] .xml-tools .button:not(.danger),
body[data-theme] .composer-actions .button:not(.danger),
body[data-theme] .comment-composer-actions .button:not(.danger),
body[data-theme] .social-modal-actions .button:not(.danger) {
  border-color: rgb(var(--accent-soft-rgb) / 0.3);
  background:
    linear-gradient(180deg, rgb(var(--accent-rgb) / 0.07), transparent),
    rgb(var(--surface-solid-rgb) / 0.78);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.035), 0 10px 24px rgb(var(--accent-rgb) / 0.08);
}

body[data-theme] .button.ghost:not(.danger),
body[data-theme] .icon-button.ghost:not(.danger),
body[data-theme] .composer-actions .button.ghost:not(.danger),
body[data-theme] .comment-composer-actions .button.ghost:not(.danger) {
  border-color: rgb(var(--accent-soft-rgb) / 0.32);
  background: rgb(var(--accent-rgb) / 0.08);
}

body[data-theme] .button:not(.danger):hover,
body[data-theme] .icon-button:not(.danger):hover,
body[data-theme] .profile-actions .button:not(.danger):hover,
body[data-theme] .settings-grid .button:not(.danger):hover,
body[data-theme] .settings-side-stack .button:not(.danger):hover,
body[data-theme] .xml-tools .button:not(.danger):hover,
body[data-theme] .composer-actions .button:not(.danger):hover,
body[data-theme] .comment-composer-actions .button:not(.danger):hover {
  border-color: rgb(var(--accent-rgb) / 0.58);
  background:
    radial-gradient(circle at 20% 0%, rgb(var(--accent-rgb) / 0.2), transparent 44%),
    rgb(var(--surface-2-rgb) / 0.9);
}

body[data-theme] .button.primary:not(.danger),
body[data-theme] .icon-button.primary:not(.danger),
body[data-theme] label.button.primary:not(.danger),
body[data-theme] .profile-actions .button.primary:not(.danger),
body[data-theme] .settings-grid .button.primary:not(.danger),
body[data-theme] .settings-side-stack .button.primary:not(.danger),
body[data-theme] .xml-tools .button.primary:not(.danger),
body[data-theme] .composer-actions .button.primary:not(.danger),
body[data-theme] .comment-composer-actions .button.primary:not(.danger) {
  border-color: rgb(var(--accent-rgb) / 0.78);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 12px 28px rgb(var(--accent-rgb) / 0.24);
}

body[data-theme] .composer-actions .klipy-open,
body[data-theme] .composer-actions .media-picker-open,
body[data-theme] .composer-actions .image-upload-open,
body[data-theme] .composer-actions .mention-open,
body[data-theme] .comment-composer-actions .klipy-open,
body[data-theme] .comment-composer-actions .media-picker-open,
body[data-theme] .comment-composer-actions .image-upload-open,
body[data-theme] .comment-composer-actions .mention-open {
  border-color: rgb(var(--accent-soft-rgb) / 0.38);
  background:
    radial-gradient(circle at 30% 20%, rgb(var(--accent-rgb) / 0.16), transparent 48%),
    rgb(var(--surface-solid-rgb) / 0.82);
  color: var(--accent);
}

body[data-theme] .episode-toolbar .tab,
body[data-theme] .episode-toolbar .button,
body[data-theme] .episode-detail-watch-row .button,
body[data-theme] .episode-suggest-inline .button,
body[data-theme] .episode-votes .vote-button,
body[data-theme] .character-votes .vote-button,
body[data-theme] .review-votes .vote-button,
body[data-theme] .media-picture-votes .vote-button {
  border-color: rgb(var(--accent-soft-rgb) / 0.32);
  background:
    linear-gradient(180deg, rgb(var(--accent-rgb) / 0.07), transparent),
    rgb(var(--surface-solid-rgb) / 0.78);
  color: var(--soft);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.035), 0 10px 24px rgb(var(--accent-rgb) / 0.08);
}

body[data-theme] .episode-toolbar .tab.active,
body[data-theme] .episode-toolbar .tab:hover,
body[data-theme] .episode-toolbar .button:hover:not(:disabled),
body[data-theme] .episode-detail-watch-row .button:hover:not(:disabled),
body[data-theme] .episode-suggest-inline .button:hover:not(:disabled),
body[data-theme] .episode-votes .vote-button.active,
body[data-theme] .episode-votes .vote-button:hover:not(:disabled),
body[data-theme] .character-votes .vote-button.active,
body[data-theme] .character-votes .vote-button:hover:not(:disabled),
body[data-theme] .review-votes .vote-button.active,
body[data-theme] .review-votes .vote-button:hover:not(:disabled),
body[data-theme] .media-picture-votes .vote-button.active,
body[data-theme] .media-picture-votes .vote-button:hover:not(:disabled) {
  border-color: rgb(var(--accent-rgb) / 0.62);
  background:
    radial-gradient(circle at 20% 0%, rgb(var(--accent-rgb) / 0.2), transparent 44%),
    rgb(var(--surface-2-rgb) / 0.9);
  color: var(--text);
}

body[data-theme] .episode-toolbar .button.primary,
body[data-theme] .episode-suggest-inline .button.primary {
  border-color: rgb(var(--accent-rgb) / 0.78);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 12px 28px rgb(var(--accent-rgb) / 0.24);
}

body[data-theme] .episode-watched-button:not(.active) {
  border-color: rgb(var(--accent-soft-rgb) / 0.62);
  background: rgb(var(--surface-solid-rgb) / 0.82);
  color: var(--accent);
}

body[data-theme] .episode-watched-button:not(.active):hover:not(:disabled) {
  border-color: rgb(var(--accent-rgb) / 0.78);
  background: rgb(var(--accent-rgb) / 0.16);
}

body[data-theme] .episode-watched-button.active {
  border-color: rgb(var(--accent-rgb) / 0.82);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

body[data-theme] .episode-number-wrap.watched .episode-number-tile,
body[data-theme] .episode-grid-card.watched {
  border-color: rgb(var(--accent-rgb) / 0.56);
  background:
    radial-gradient(circle at 20% 0%, rgb(var(--accent-rgb) / 0.16), transparent 44%),
    rgb(var(--surface-solid-rgb) / 0.78);
}

body[data-theme] .klipy-search .input,
body[data-theme] .klipy-search .button,
body[data-theme] .data-search .input,
body[data-theme] .data-search .select,
body[data-theme] .data-search .button,
body[data-theme] .info-panel pre,
body[data-theme] .api-copy-button,
body[data-theme] .data-table th,
body[data-theme] .data-table td {
  border-color: rgb(var(--accent-soft-rgb) / 0.18);
}

body[data-theme] .info-panel pre,
body[data-theme] .api-code-card,
body[data-theme] .data-table th {
  background:
    linear-gradient(180deg, rgb(var(--accent-rgb) / 0.045), transparent),
    rgb(var(--surface-code-rgb) / 0.9);
}

body[data-theme] .info-panel code,
body[data-theme] .info-panel pre,
body[data-theme] .api-code-card figcaption,
body[data-theme] .data-table a,
body[data-theme] .mod-popover-item strong {
  color: var(--soft);
}

body[data-theme] .info-panel a:not(.button),
body[data-theme] .api-table code,
body[data-theme] .data-tab strong,
body[data-theme] .mod-stat strong,
body[data-theme] .data-metric strong {
  color: var(--text);
}

body[data-theme] .klipy-card:hover {
  box-shadow: 0 0 0 2px rgb(var(--accent-rgb) / 0.34);
}

body[data-theme] .like-action {
  border-color: rgb(var(--accent-soft-rgb) / 0.24);
  background:
    linear-gradient(180deg, rgb(var(--accent-rgb) / 0.055), transparent),
    rgb(var(--surface-solid-rgb) / 0.82);
}

body[data-theme] .like-action .like-icon {
  color: var(--hot);
  background: rgb(var(--accent-rgb) / 0.11);
  box-shadow: inset 0 0 0 1px rgb(var(--accent-soft-rgb) / 0.18);
}

body[data-theme] .like-action:hover {
  border-color: rgb(var(--accent-rgb) / 0.5);
  background:
    radial-gradient(circle at 18% 18%, rgb(var(--accent-rgb) / 0.18), transparent 44%),
    rgb(var(--surface-2-rgb) / 0.9);
}

body[data-theme] .like-action.active {
  border-color: rgb(var(--accent-rgb) / 0.66);
  background:
    linear-gradient(135deg, rgb(var(--accent-rgb) / 0.3), rgb(var(--accent-2-rgb) / 0.16)),
    rgb(var(--surface-2-rgb) / 0.92);
  box-shadow: 0 0 18px rgb(var(--accent-rgb) / 0.22);
}

body[data-theme] .like-action.active .like-icon {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 18px rgb(var(--accent-rgb) / 0.36);
}

body[data-theme] .social-like-summary {
  border-color: rgb(var(--accent-soft-rgb) / 0.22);
  background:
    linear-gradient(180deg, rgb(var(--accent-rgb) / 0.06), transparent),
    rgb(var(--surface-solid-rgb) / 0.82);
}

body[data-theme] .social-like-summary strong {
  color: var(--hot);
}

@media (max-width: 1240px) {
  :root {
    --sidebar-width: 218px;
    --page-pad-x: 18px;
    --topbar-height: 66px;
  }

  .sidebar {
    top: 8px;
    bottom: 8px;
    left: 8px;
    width: calc(var(--sidebar-width) - 16px);
  }

  .sidebar-menu-panel {
    padding: 10px;
    border-radius: 20px;
  }

  .sidebar-brand-card {
    min-height: 64px;
    padding: 8px 58px 8px 8px;
  }

  .brand-logo-frame {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .brand-name {
    font-size: 0.92rem;
  }

  .nav {
    gap: 6px;
  }

  .nav button,
  .plain-link {
    min-height: 40px;
    padding: 0 10px;
    gap: 8px;
    font-size: 0.92rem;
  }

  .nav-icon {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
  }

  .topbar {
    gap: 12px;
    padding: 9px 12px;
  }

  .global-search {
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 9px;
  }

  .global-search .select,
  .global-search .input {
    min-height: 44px;
    border-radius: 14px;
  }

  .top-utility-button,
  .top-profile-button {
    width: 38px;
    height: 38px;
    border-radius: 13px;
  }

  .site-presence {
    height: 38px;
    padding: 0 9px;
  }

  .top-profile-avatar {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .home-main-column {
    padding-right: 0;
  }

  .mobile-chat-open {
    display: inline-flex;
  }

  .chat-close-button {
    display: inline-flex;
  }

.chat-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 131;
  display: block;
  background: rgba(5, 8, 13, 0.72);
  backdrop-filter: blur(8px);
}

  body.chat-popup-open {
    overflow: hidden;
  }

.chat-panel {
  top: 82px;
  right: 14px;
  bottom: 14px;
  z-index: 132;
  width: min(360px, calc(100vw - 28px));
  opacity: 0;
  pointer-events: none;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  }

  .chat-panel.open {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translateY(0);
  }
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .main {
    grid-column: auto;
  }

  .sidebar {
    position: static;
    height: auto;
    width: auto;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    margin: 10px 16px 0;
  }

  .sidebar-menu-panel::before {
    inset: 36px 12px 12px auto;
    width: 170px;
    opacity: 0.14;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mod-nav-popover {
    width: min(320px, calc(100vw - 32px));
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    height: 66px;
    margin: 10px 16px 0;
    padding: 12px 16px;
  }

  .content {
    padding: 18px 16px;
  }

  .hero,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    align-items: start;
    padding-top: 72px;
  }

  .hero-actions {
    left: 16px;
    right: 16px;
    max-width: none;
  }

  .hero-cover {
    width: min(220px, 70vw);
  }

  .media-detail-hero {
    grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
    padding-top: 26px;
  }

  .character-cover-stack {
    width: min(220px, 70vw);
  }

  .profile-hero,
  .profile-lists,
  .settings-grid,
  .settings-side-stack,
  .schedule-filter-grid {
    grid-template-columns: 1fr;
  }

  .home-main-column {
    padding-right: 0;
  }

  .chat-panel {
    position: fixed;
    top: 84px;
    right: 16px;
    bottom: 16px;
    width: 300px;
    max-width: calc(100vw - 32px);
  }

  .chat-list {
    max-height: none;
  }

  .profile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 1100px) {
  .top-utility-extra,
  .signed-auth-trigger .top-profile-label {
    display: none;
  }

  .site-presence {
    gap: 6px;
    padding-inline: 8px;
  }

  .presence-pill small {
    display: none;
  }

  .signed-auth-trigger.top-profile-chip {
    width: 42px;
    height: 42px;
    padding: 4px;
    justify-content: center;
  }
}

@media (max-width: 760px) {
  .top-actions .meta-line {
    display: none;
  }

  .top-utility-extra {
    display: none;
  }

  .messages-wrap .top-utility-extra {
    display: grid;
  }

  .messages-popover {
    position: fixed;
    top: 86px;
    right: 12px;
    left: 12px;
    width: auto;
    height: calc(100dvh - 112px);
    max-height: calc(100dvh - 112px);
  }

  .messages-grid {
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(96px, 140px) minmax(0, 1fr);
  }

  .messages-thread-list {
    max-height: 150px;
    min-height: 0;
  }

  .messages-thread-panel {
    min-height: 0;
  }

  .sidebar {
    padding: 0;
    gap: 0;
  }

  .sidebar .brand {
    width: 100%;
  }

  .sidebar-logo {
    width: 44px;
    height: 44px;
  }

  .sidebar-menu-panel,
  .sidebar .account-box {
    display: none;
  }

  .sidebar-menu-panel::before {
    display: none;
  }

  .mobile-nav-layer {
    display: block;
  }

  .mobile-nav-fab {
    position: fixed;
    right: 18px;
    bottom: calc(18px + env(safe-area-inset-bottom));
    z-index: 62;
    width: 58px;
    height: 58px;
    border: 1px solid rgb(var(--accent-soft-rgb) / 0.5);
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.42);
  }

  .mobile-nav-fab.active {
    background: var(--panel-2);
    color: var(--text);
    border-color: rgb(var(--accent-soft-rgb) / 0.6);
  }

  .mobile-nav-backdrop {
    position: fixed;
    top: calc(0px - env(safe-area-inset-top, 0px));
    right: 0;
    bottom: calc(0px - env(safe-area-inset-bottom, 0px));
    left: 0;
    z-index: 60;
    display: block;
    background:
      linear-gradient(135deg, rgb(var(--accent-rgb) / 0.12), transparent 42%),
      rgba(5, 8, 13, 0.5);
    backdrop-filter: blur(5px);
  }

  body.mobile-nav-open {
    overflow: hidden;
    background-color: var(--bg-mid);
  }

  .mobile-nav-popover {
    position: fixed;
    right: 18px;
    bottom: calc(86px + env(safe-area-inset-bottom));
    z-index: 61;
    width: min(284px, calc(100vw - 36px));
    max-height: min(520px, calc(100dvh - 132px));
    overflow-y: auto;
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgb(var(--accent-soft-rgb) / 0.32);
    border-radius: 18px;
    background: rgba(8, 14, 31, 0.98);
    box-shadow: var(--shadow);
  }

  .mobile-chat-open {
    display: inline-flex;
  }

  .chat-close-button {
    display: inline-flex;
  }

.chat-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 131;
  display: block;
  background: rgba(5, 8, 13, 0.72);
  backdrop-filter: blur(8px);
  }

  body.chat-popup-open {
    overflow: hidden;
  }

  .home-main-column {
    padding-right: 0;
  }

.chat-panel {
  top: 76px;
  right: 10px;
  bottom: 10px;
  z-index: 132;
  width: min(360px, calc(100vw - 20px));
  opacity: 0;
  pointer-events: none;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  }

  .chat-panel.open {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translateY(0);
  }

  .chat-dock-head {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .episode-detail-layout {
    grid-template-columns: 1fr;
  }

  .episode-detail-cover {
    max-height: 300px;
  }

}

@media (max-width: 620px) {
  .catalog-actions {
    justify-content: flex-start;
  }

  .catalog-classic .grid:has(> .media-card),
  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  .two-col,
  .three-col,
  .season-picker-panel,
  .list-filters,
  .xml-tools,
  .diff-grid,
  .list-row,
  .episode-card,
  .episode-list-info-row,
  .episode-detail-layout,
  .admin-user-row,
  .ban-history-row,
  .audit-row {
    grid-template-columns: 1fr;
  }

  #episodes-modal.modal-backdrop {
    align-items: stretch;
    justify-items: stretch;
    padding: 0;
  }

  .episode-modal {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-width: 0;
    border-radius: 0;
  }

  .episode-modal .modal-head {
    padding-top: calc(12px + env(safe-area-inset-top));
  }

  .episode-toolbar {
    align-items: stretch;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-content: stretch;
    gap: 10px;
    margin-bottom: 12px;
  }

  .episode-toolbar > div:first-child,
  .episode-toolbar .actions {
    flex: 0 0 auto;
    width: 100%;
  }

  .episode-toolbar .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    align-items: stretch;
    gap: 8px;
  }

  .episode-toolbar .tab,
  .episode-toolbar .button {
    width: 100%;
    flex: 0 0 auto;
    padding: 0 8px;
  }

  .episode-cover {
    width: 100%;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .grid:has(> .media-card) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .media-synonym-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-head {
    align-items: start;
    flex-direction: column;
  }

  .home-head-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .list-filter-head,
  .list-filters {
    grid-template-columns: 1fr;
  }

  .list-view-tabs {
    justify-content: stretch;
  }

  .list-view-tab {
    flex: 1 1 0;
  }

  .home-trending-panel {
    height: auto;
    min-height: 372px;
  }

  .home-trending-hero {
    min-height: 372px;
    grid-template-columns: 1fr;
    align-content: end;
    padding: 150px 22px 46px;
  }

  .home-trending-hero::before {
    background:
      linear-gradient(180deg, rgba(5, 8, 19, 0.26), rgba(5, 8, 19, 0.72) 44%, rgba(5, 8, 19, 0.96)),
      radial-gradient(circle at 75% 20%, rgb(var(--accent-rgb) / 0.2), transparent 38%);
  }

  .home-trending-art {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 104px;
    transform: rotateZ(2deg);
  }

  .home-trending-copy {
    width: 100%;
  }

  .home-trending-copy p {
    white-space: normal;
  }

  .profile-identity,
  .settings-avatar-row,
  .settings-banner-row {
    grid-template-columns: 1fr;
  }

  .connected-account-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .connected-account-actions {
    grid-column: 1 / -1;
    width: 100%;
  }

  .connected-account-row .button {
    width: 100%;
  }

  .profile-stats {
    grid-template-columns: 1fr;
  }

  .schedule-grid {
    grid-template-columns: 1fr;
  }

  .schedule-card {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .schedule-cover {
    width: 78px;
  }

  .user-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    justify-content: stretch;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .info-preview-grid {
    grid-template-columns: 1fr;
  }

  .info-preview-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .info-preview-heading .button {
    width: 100%;
    justify-content: center;
  }

  .info-preview-panel .home-trending-panel,
  .info-preview-panel .home-trending-hero {
    min-height: 420px;
  }

  .info-page-frame-wrap {
    min-height: 480px;
    border-radius: 14px;
  }

  .info-page-frame {
    height: 480px;
  }

  .info-preview-card img {
    max-height: 180px;
  }

  .api-table > div,
  .api-table.compact > div {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .mod-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    height: auto;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 10px;
    margin: 10px 12px 0;
    padding: 10px;
  }

  .top-actions {
    width: 100%;
    gap: 8px;
    justify-content: flex-end;
  }

  .site-presence {
    margin-right: auto;
  }

  .top-actions .meta-line {
    display: none;
  }

  .global-search {
    width: 100%;
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .signed-auth-trigger .top-profile-label {
    display: none;
  }

  .top-auth-trigger {
    padding: 4px;
  }

  .guest-auth-trigger span {
    display: inline-block;
    max-width: 54px;
  }

  .top-profile-chip {
    width: 42px;
    height: 42px;
    padding: 4px;
    justify-content: center;
  }

  .top-auth-trigger.top-profile-chip {
    min-width: 0;
    justify-content: center;
  }

  .guest-auth-trigger.top-profile-chip {
    width: 42px;
    height: 42px;
    padding: 4px;
    justify-content: center;
  }

  .guest-auth-trigger.top-profile-chip span {
    display: none !important;
  }

  .user-role-tools,
  .user-moderation-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 460px) {
  .modal-backdrop {
    padding: 10px;
  }

  #episodes-modal.modal-backdrop,
  .episode-detail-backdrop {
    padding: 0;
  }

  #episodes-modal .modal-head h2,
  .episode-detail-head h3 {
    font-size: 1.02rem;
  }

  .modal-head,
  .episode-detail-head {
    padding: 12px;
  }

  #episodes-modal .modal-head {
    padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
  }

  #episodes-modal .icon-button,
  .episode-detail-head .icon-button {
    width: 38px;
    min-height: 38px;
    flex: 0 0 38px;
  }

  .modal-body,
  .episode-detail-layout {
    padding: 12px;
  }

  .episode-modal .modal-body {
    padding: 0 12px calc(72px + env(safe-area-inset-bottom));
    scroll-padding-bottom: calc(82px + env(safe-area-inset-bottom));
  }

  .episode-toolbar {
    margin: 0 -12px 14px;
    padding: 10px 12px;
    max-height: none;
    min-height: 0;
  }

  .episode-toolbar strong {
    font-size: 0.92rem;
  }

  .episode-toolbar .meta-line {
    font-size: 0.76rem;
  }

  .episode-detail-panel {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-width: 0;
    border-radius: 0;
  }

  .episode-detail-head {
    position: sticky;
    top: 0;
    z-index: 2;
    padding-top: calc(12px + env(safe-area-inset-top));
  }

  .hero {
    padding: 16px;
  }

  .media-detail-hero {
    grid-template-columns: 1fr;
  }

  .media-detail-copy {
    grid-column: 1;
    padding-top: 0;
    order: 1;
  }

  .media-detail-hero > .media-cover-stack {
    grid-column: 1;
    width: min(190px, 64vw);
    order: 2;
  }

  .hero-actions {
    position: static;
    grid-column: 1 / -1;
    justify-content: stretch;
    order: -1;
  }

  .hero-actions .button {
    flex: 1 1 140px;
  }

  .episode-grid {
    grid-template-columns: 1fr;
  }

  .episode-number-list {
    grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  }

  .episode-detail-stats {
    grid-template-columns: 1fr;
  }

  .klipy-search,
  .social-item {
    grid-template-columns: 1fr;
  }

  .attachment-edit-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 390px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-presence {
    padding-inline: 7px;
  }

  .presence-divider {
    display: none;
  }

  .top-actions .meta-line {
    display: none;
  }

  .global-search {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .media-synonym-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .episode-grid-card .episode-votes {
    grid-template-columns: minmax(0, 1fr) minmax(42px, auto) minmax(0, 1fr);
  }

  .episode-toolbar .actions {
    gap: 6px;
  }

  .episode-toolbar .tab,
  .episode-toolbar .button,
  .vote-button {
    font-size: 0.82rem;
  }
}

@media (min-width: 761px) {
  :root {
    --sidebar-width: 220px;
    --page-pad-x: 20px;
    --topbar-height: 62px;
  }

  .topbar {
    top: 10px;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 16px;
  }

  .content {
    padding-top: 18px;
    padding-bottom: 22px;
  }

  .sidebar {
    top: 8px;
    bottom: 8px;
    left: 8px;
    width: calc(var(--sidebar-width) - 16px);
    height: auto;
    margin: 0;
  }

  .sidebar-menu-panel {
    padding: 10px;
    border-radius: 18px;
  }

  .sidebar-brand-card {
    min-height: 64px;
    padding: 8px 58px 8px 8px;
    border-radius: 17px;
  }

  .brand-logo-frame {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .nav {
    gap: 6px;
  }

  .nav button,
  .plain-link {
    min-height: 39px;
    padding: 0 10px;
    border-radius: 10px;
    gap: 8px;
  }

  .nav-icon {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
  }

  .global-search {
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 9px;
  }

  .global-search .select,
  .global-search .input {
    min-height: 42px;
    border-radius: 13px;
  }

  .top-actions {
    gap: 8px;
  }

  .top-utility-button,
  .top-profile-button {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .site-presence {
    height: 38px;
  }

  .top-profile-avatar {
    width: 32px;
    height: 32px;
  }

  .button,
  .tab {
    min-height: 38px;
    padding: 0 12px;
    border-radius: 12px;
  }

  .icon-button {
    width: 38px;
    min-height: 38px;
    border-radius: 12px;
  }

  .panel {
    padding: 14px;
    border-radius: 14px;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
  }

  .grid:has(> .media-card) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .wide-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
  }

  .card {
    border-radius: 12px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
  }

  .section {
    margin: 24px 0;
  }

  .page-head {
    margin-bottom: 18px;
  }

  .home-trending-panel {
    height: clamp(230px, 24vw, 300px);
    border-radius: 16px;
  }

  .home-trending-hero {
    grid-template-columns: minmax(0, 1fr) minmax(126px, 180px);
    gap: clamp(16px, 3vw, 42px);
    padding: clamp(20px, 2.4vw, 30px) clamp(28px, 4vw, 48px);
  }

  .home-trending-copy {
    width: min(390px, 100%);
    gap: 9px;
  }

  .home-trending-copy h2 {
    line-height: 1.02;
  }

  .home-trending-art {
    width: min(170px, 16vw);
  }

  .home-trending-arrow {
    width: 34px;
    height: 34px;
  }

  .continue-panel {
    border-radius: 16px;
  }

  .continue-card {
    min-width: 128px;
    border-radius: 12px;
  }

  .continue-card img {
    height: 138px;
  }

  .activity-panel,
  .chat-panel,
  .social-composer,
  .social-item {
    border-radius: 15px;
  }

  .media-detail-hero,
  .detail-layout {
    gap: 16px;
  }

  .hero-cover {
    width: min(230px, 28vw);
  }

  .profile-page .profile-hero,
  .profile-hero-content {
    min-height: 300px;
  }

  .profile-page .profile-avatar {
    width: 94px;
    height: 94px;
  }

  .profile-page .profile-identity {
    grid-template-columns: 94px minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  html {
    font-size: 15px;
  }
}

/* Keep list-status colors visible even when the selected UI theme recolors cards. */
.status-watching {
  --list-status-rgb: var(--status-watching-rgb);
  --list-status-soft-rgb: var(--status-watching-soft-rgb);
}

.status-completed {
  --list-status-rgb: var(--status-completed-rgb);
  --list-status-soft-rgb: var(--status-completed-soft-rgb);
}

.status-planning {
  --list-status-rgb: var(--status-planning-rgb);
  --list-status-soft-rgb: var(--status-planning-soft-rgb);
}

.status-dropped {
  --list-status-rgb: var(--status-dropped-rgb);
  --list-status-soft-rgb: var(--status-dropped-soft-rgb);
}

.status-paused {
  --list-status-rgb: var(--status-paused-rgb);
  --list-status-soft-rgb: var(--status-paused-soft-rgb);
}

.media-card.in-list,
.continue-card.in-list,
.continue-card.status-watching,
.continue-card.status-completed,
.continue-card.status-planning,
.continue-card.status-dropped,
.continue-card.status-paused,
.character-appearance-card.in-list,
.user-list-card.status-watching,
.user-list-card.status-completed,
.user-list-card.status-planning,
.user-list-card.status-dropped,
.user-list-card.status-paused,
.top-row.in-list,
.list-row.in-list {
  border-color: rgb(var(--list-status-rgb, var(--accent-rgb)) / 0.78) !important;
  background:
    radial-gradient(circle at 20% 0%, rgb(var(--list-status-rgb, var(--accent-rgb)) / 0.16), transparent 42%),
    linear-gradient(180deg, rgb(var(--surface-2-rgb) / 0.82), rgb(var(--surface-rgb) / 0.92)) !important;
  box-shadow:
    inset 0 0 0 1px rgb(var(--list-status-rgb, var(--accent-rgb)) / 0.5),
    0 0 0 1px rgb(var(--list-status-rgb, var(--accent-rgb)) / 0.18),
    0 16px 34px rgba(0, 0, 0, 0.25),
    0 0 28px rgb(var(--list-status-rgb, var(--accent-rgb)) / 0.14) !important;
}

.home-trending-hero.in-list {
  box-shadow:
    inset 0 0 0 2px rgb(var(--list-status-rgb, var(--accent-rgb)) / 0.72),
    0 0 34px rgb(var(--list-status-rgb, var(--accent-rgb)) / 0.18) !important;
}

.top-row.in-list,
.list-row.in-list {
  box-shadow:
    inset 5px 0 0 rgb(var(--list-status-rgb, var(--accent-rgb)) / 0.95),
    inset 0 0 0 1px rgb(var(--list-status-rgb, var(--accent-rgb)) / 0.42),
    0 12px 26px rgba(0, 0, 0, 0.22) !important;
}

.list-status-pill.status-watching,
.list-status-pill.status-completed,
.list-status-pill.status-planning,
.list-status-pill.status-dropped,
.list-status-pill.status-paused {
  border-color: rgb(var(--list-status-soft-rgb, var(--accent-soft-rgb)) / 0.62) !important;
  color: rgb(var(--list-status-soft-rgb, var(--accent-soft-rgb))) !important;
  background: rgb(var(--list-status-rgb, var(--accent-rgb)) / 0.18) !important;
}

/* AniList-inspired profile refresh. */
.profile-page {
  display: grid;
  gap: 18px;
}

.profile-page .profile-hero {
  display: block;
  min-height: 340px;
  padding: 0;
  margin-bottom: 0;
  border-radius: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 12%, rgb(var(--accent-rgb) / 0.24), transparent 36%),
    linear-gradient(135deg, rgb(var(--surface-2-rgb) / 0.82), rgb(var(--surface-deep-rgb) / 0.94));
}

.profile-page .profile-hero.has-banner::after {
  display: none;
}

.profile-hero-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5, 10, 24, 0.92), rgba(5, 10, 24, 0.42) 50%, rgba(5, 10, 24, 0.88)),
    linear-gradient(0deg, rgba(5, 10, 24, 0.95), rgba(5, 10, 24, 0.08) 58%, rgba(5, 10, 24, 0.54));
}

.profile-page .profile-banner-image {
  filter: saturate(1.08) contrast(1.04);
}

.profile-hero-content {
  position: relative;
  z-index: 2;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 18px;
  padding: clamp(18px, 3vw, 34px);
}

.profile-page .profile-identity {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.profile-page .profile-avatar {
  width: 110px;
  height: 110px;
  border: 3px solid rgb(var(--accent-soft-rgb) / 0.64);
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.34), 0 0 28px rgb(var(--accent-rgb) / 0.22);
}

.profile-name-block {
  min-width: 0;
}

.profile-points-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 4px 10px;
  border: 1px solid rgb(var(--accent-rgb) / 0.35);
  border-radius: 999px;
  background: linear-gradient(135deg, rgb(var(--accent-rgb) / 0.18), rgba(8, 14, 28, 0.52));
  color: var(--text);
  font: inherit;
  font-weight: 800;
  box-shadow: 0 0 18px rgb(var(--accent-rgb) / 0.14);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.profile-points-pill:hover,
.profile-points-pill:focus-visible {
  border-color: rgb(var(--accent-rgb) / 0.72);
  box-shadow: 0 0 24px rgb(var(--accent-rgb) / 0.22);
  transform: translateY(-1px);
}

.gift-points-modal {
  width: min(520px, calc(100vw - 28px));
}

.gift-points-form {
  display: grid;
  gap: 14px;
}

.gift-points-form label {
  display: grid;
  gap: 7px;
  color: var(--soft);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gift-points-form label .input {
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.gift-points-actions {
  justify-content: flex-end;
}

.profile-page .profile-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 0.94;
  text-shadow: 0 18px 38px rgba(0, 0, 0, 0.5);
}

.profile-page .profile-actions {
  grid-column: auto;
  margin-top: 0;
  justify-content: flex-end;
}

.profile-nav-strip {
  align-self: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  padding: 8px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.2);
  border-radius: 999px;
  background: rgb(var(--surface-rgb) / 0.68);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.05), 0 18px 42px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.profile-nav-strip a,
.profile-nav-strip button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--soft);
  background: transparent;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.profile-nav-strip a:hover,
.profile-nav-strip button:hover,
.profile-nav-strip .active {
  color: var(--text);
  border-color: rgb(var(--accent-rgb) / 0.38);
  background: rgb(var(--accent-rgb) / 0.12);
}

.profile-nav-strip .nav-icon {
  width: 18px;
  height: 18px;
}

.profile-dashboard {
  display: grid;
  grid-template-columns: minmax(250px, 350px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.profile-sidebar-column,
.profile-main-column,
.profile-activity-list {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.profile-activity-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.profile-activity-tabs .tab {
  min-height: 32px;
  padding: 7px 10px;
}

.profile-activity-list[hidden] {
  display: none;
}

.profile-follow-button {
  width: fit-content;
  margin-top: 8px;
}

.profile-follow-modal {
  width: min(1120px, calc(100vw - 28px));
  height: min(820px, calc(100dvh - 28px));
}

.profile-follow-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 18px;
  overflow: hidden;
}

.profile-follow-group {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(var(--surface-solid-rgb) / 0.48);
}

.profile-follow-group h3 {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.profile-follow-group h3 span {
  color: var(--text);
  letter-spacing: 0;
}

.profile-follow-list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: auto;
  padding-right: 4px;
}

.profile-follow-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 48px;
  padding: 6px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}

.profile-follow-row:hover {
  background: rgb(var(--accent-rgb) / 0.1);
}

.profile-follow-row span {
  min-width: 0;
  display: grid;
}

.profile-follow-row strong,
.profile-follow-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-follow-row small {
  color: var(--muted);
}

@media (max-width: 720px) {
  .profile-follow-modal {
    width: calc(100vw - 16px);
    height: calc(100dvh - 16px);
  }

  .profile-follow-modal-body {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .profile-follow-group {
    min-height: 280px;
  }
}

.profile-page .profile-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.profile-page .profile-stat {
  min-height: 74px;
  padding: 12px 14px;
  display: grid;
  align-content: center;
  overflow: visible;
  border-radius: 12px;
  background:
    radial-gradient(circle at 20% 0%, rgb(var(--accent-rgb) / 0.1), transparent 38%),
    rgb(var(--surface-solid-rgb) / 0.72);
}

.profile-page .profile-stat .stat-value {
  margin-top: 5px;
  font-size: 1.75rem;
  color: var(--accent);
  line-height: 0.98;
}

.profile-about-panel .section-title,
.profile-shelf .section-title,
.profile-activity-panel .section-title,
.profile-list-panel .section-title {
  margin-bottom: 12px;
}

.profile-about-panel .profile-bio {
  margin: 0;
  max-width: none;
  line-height: 1.7;
}

.rich-profile-bio {
  display: grid;
  gap: 10px;
}

.rich-profile-bio p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.profile-bio-image {
  display: block;
  width: min(100%, 46rem);
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.profile-bio-image.is-custom-size {
  width: min(100%, var(--profile-bio-image-width, 100%));
}

.profile-bio-link {
  display: block;
  width: 100%;
  max-width: 100%;
}

.mal-sync-result {
  display: grid;
  gap: 8px;
}

.mal-sync-result-list {
  display: grid;
  gap: 4px;
  max-height: 260px;
  overflow: auto;
}

.mal-sync-result small {
  color: var(--muted);
}

.profile-info-stack {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.profile-info-stack > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 11px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.16);
  border-radius: 12px;
  background: rgb(var(--surface-solid-rgb) / 0.52);
}

.profile-info-stack span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.profile-info-stack strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.profile-status-overview {
  display: grid;
  gap: 14px;
}

.profile-status-block {
  display: grid;
  gap: 7px;
}

.profile-status-head,
.profile-status-row {
  display: grid;
  grid-template-columns: minmax(78px, 1fr) minmax(70px, 1.2fr) auto;
  gap: 10px;
  align-items: center;
}

.profile-status-head {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-status-row {
  padding: 9px 10px;
  border: 1px solid rgb(var(--list-status-rgb, var(--accent-rgb)) / 0.2);
  border-radius: 12px;
  color: var(--soft);
  background: rgb(var(--list-status-rgb, var(--accent-rgb)) / 0.08);
}

.profile-status-row:hover {
  color: var(--text);
  border-color: rgb(var(--list-status-rgb, var(--accent-rgb)) / 0.5);
}

.profile-status-meter {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.08);
}

.profile-status-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgb(var(--list-status-rgb, var(--accent-rgb))), rgb(var(--accent-2-rgb)));
}

.profile-shelf-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.profile-shelf-card {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: var(--soft);
}

.profile-shelf-card:hover {
  color: var(--text);
}

.profile-shelf-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid rgb(var(--list-status-rgb, var(--accent-rgb)) / 0.26);
  border-radius: 12px;
  background: var(--panel-3);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.profile-shelf-card span {
  min-height: 2.6em;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.3;
}

.profile-status-prompt {
  display: block;
  padding: 14px 15px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.16);
  border-radius: 14px;
  color: var(--muted);
  background: rgb(var(--surface-solid-rgb) / 0.46);
}

.profile-status-prompt:hover {
  color: var(--text);
  border-color: rgb(var(--accent-rgb) / 0.42);
  background: rgb(var(--accent-rgb) / 0.1);
}

.profile-update-row {
  position: relative;
  display: block;
  container-type: inline-size;
  padding: 20px 22px;
  border: 1px solid rgb(var(--list-status-rgb, var(--accent-rgb)) / 0.3);
  border-radius: 20px;
  color: var(--soft);
  background:
    radial-gradient(circle at 12% 50%, rgb(var(--list-status-rgb, var(--accent-rgb)) / 0.1), transparent 30%),
    linear-gradient(135deg, rgb(var(--surface-2-rgb) / 0.86), rgb(var(--surface-solid-rgb) / 0.7));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.profile-update-main {
  display: grid;
  grid-template-columns: minmax(220px, 0.78fr) 96px minmax(240px, 1.35fr) auto;
  gap: 22px;
  align-items: center;
  padding-right: 24px;
  color: inherit;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.profile-update-main > *,
.activity-panel,
.profile-activity-panel,
.activity-list,
.profile-activity-list {
  min-width: 0;
  max-width: 100%;
}

.profile-update-media-link,
.profile-update-author {
  color: inherit;
}

.profile-update-media-link {
  min-width: 0;
}

.profile-update-cover-link {
  display: block;
  width: 96px;
  height: 128px;
}

.profile-update-status {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid rgb(var(--list-status-rgb, var(--accent-rgb)) / 0.52);
  border-radius: 999px;
  color: rgb(var(--list-status-rgb, var(--accent-rgb)));
  background: rgb(var(--list-status-rgb, var(--accent-rgb)) / 0.09);
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 0 22px rgb(var(--list-status-rgb, var(--accent-rgb)) / 0.1);
}

.profile-update-status::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid currentColor;
}

.profile-update-actions {
  width: fit-content;
  margin-top: 13px;
  gap: 12px;
}

.profile-update-row .profile-update-actions {
  display: flex;
  align-items: center;
}

.profile-update-actions > .asuna-action,
.social-card-actions > .asuna-action {
  align-self: center;
  vertical-align: middle;
}

.profile-update-actions .social-icon-action,
.social-card-actions .social-icon-action {
  min-width: 42px;
  min-height: 34px;
  padding: 0 10px;
  gap: 6px;
}

.social-icon-action svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-share-action {
  width: 42px;
  padding: 0;
}

.counted-like-action {
  width: auto;
  min-width: 58px;
  height: 34px;
  grid-template-columns: 21px auto;
  column-gap: 7px;
  padding: 0 11px 0 8px;
  color: var(--soft);
}

.counted-like-action .like-icon {
  margin: 0;
}

.counted-like-action .like-count {
  color: inherit;
  font-size: 0.84rem;
  line-height: 1;
}

.social-item:not(.chat-item) .asuna-inline-actions {
  margin-left: auto;
}

body[data-theme] .counted-like-action.active {
  color: #fff;
  text-shadow: 0 0 10px rgb(var(--accent-rgb) / 0.62);
}

.profile-update-row .comment-preview-button {
  margin-top: 8px;
}

.profile-update-author {
  min-width: 0;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  align-self: stretch;
  padding-right: 22px;
  border-right: 1px solid rgb(var(--list-status-rgb, var(--accent-rgb)) / 0.24);
}

.profile-update-author .social-avatar {
  width: 70px;
  height: 70px;
  border: 2px solid rgb(var(--list-status-rgb, var(--accent-rgb)) / 0.55);
  box-shadow: 0 0 22px rgb(var(--list-status-rgb, var(--accent-rgb)) / 0.18);
}

.profile-update-author > div > strong {
  font-size: 1.18rem;
  line-height: 1.25;
}

.profile-update-author > div > span {
  margin-top: 3px;
  font-size: 0.94rem;
  line-height: 1.25;
}

.profile-update-author-time {
  display: flex !important;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

.profile-update-author-time svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-update-author div,
.profile-update-copy {
  min-width: 0;
}

.profile-update-row:hover {
  color: var(--text);
  border-color: rgb(var(--list-status-rgb, var(--accent-rgb)) / 0.5);
}

.profile-update-hide {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  min-height: 26px;
  font-size: 1rem;
  opacity: 0;
}

.profile-update-row:hover .profile-update-hide,
.profile-update-hide:focus-visible {
  opacity: 1;
}

.profile-update-cover {
  width: 96px;
  height: 128px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgb(var(--list-status-rgb, var(--accent-rgb)) / 0.48);
  background: var(--panel-3);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.profile-update-title-link {
  display: grid;
  gap: 4px;
}

.profile-update-action-lead {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.3;
}

.profile-update-title-link strong {
  color: var(--text);
  font-size: 1.38rem;
  line-height: 1.18;
}

.profile-update-score {
  margin-top: 4px;
  color: var(--soft);
  font-size: 0.86rem;
}

:is(.activity-panel, .profile-activity-panel) .social-item:not(.chat-item) .social-meta {
  gap: 8px;
  font-size: 0.88rem;
}

:is(.activity-panel, .profile-activity-panel) .social-item:not(.chat-item) .social-name {
  font-size: 1rem;
  line-height: 1.25;
}

:is(.activity-panel, .profile-activity-panel) .social-item:not(.chat-item) {
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 15px;
  padding: 16px;
  border-color: rgb(var(--accent-soft-rgb) / 0.26);
  border-radius: 18px;
  background:
    radial-gradient(circle at 4% 16%, rgb(var(--accent-rgb) / 0.1), transparent 24%),
    linear-gradient(135deg, rgb(var(--surface-2-rgb) / 0.86), rgb(var(--surface-solid-rgb) / 0.72));
}

:is(.activity-panel, .profile-activity-panel) .social-item:not(.chat-item) > .social-avatar-link .social-avatar {
  width: 58px;
  height: 58px;
  border: 2px solid rgb(var(--accent-soft-rgb) / 0.46);
  box-shadow: 0 0 20px rgb(var(--accent-rgb) / 0.16);
}

:is(.activity-panel, .profile-activity-panel) .social-item:not(.chat-item) .social-body {
  gap: 10px;
}

:is(.activity-panel, .profile-activity-panel) .social-item:not(.chat-item) .social-body > p {
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.55;
}

:is(.activity-panel, .profile-activity-panel) .social-item:not(.chat-item) .social-attachment,
:is(.activity-panel, .profile-activity-panel) .social-item:not(.chat-item) .social-embed-card,
:is(.activity-panel, .profile-activity-panel) .social-item:not(.chat-item) .comment-preview-button {
  width: min(100%, 640px);
}

.social-card-actions {
  width: fit-content;
  gap: 10px;
  margin-top: 2px;
}

.profile-update-row strong,
.profile-update-row span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.profile-update-row span,
.profile-update-row small {
  color: var(--muted);
}

.profile-update-status small {
  color: inherit;
}

@container (max-width: 780px) {
  .profile-update-row {
    padding: 16px;
  }

  .profile-update-main {
    grid-template-columns: 76px minmax(0, 1fr) auto;
    gap: 14px;
    padding-right: 24px;
  }

  .profile-update-author {
    grid-column: 1 / -1;
    grid-template-columns: 54px minmax(0, 1fr);
    min-height: 0;
    padding: 0 0 13px;
    border-right: 0;
    border-bottom: 1px solid rgb(var(--list-status-rgb, var(--accent-rgb)) / 0.2);
  }

  .profile-update-author .social-avatar {
    width: 54px;
    height: 54px;
  }

  .profile-update-cover-link,
  .profile-update-cover {
    width: 76px;
    height: 102px;
  }

  .profile-update-title-link strong {
    font-size: 1.12rem;
  }

  .profile-update-action-lead {
    font-size: 0.9rem;
  }
}

@container (max-width: 500px) {
  .profile-update-main {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .profile-update-cover-link,
  .profile-update-cover {
    width: 72px;
    height: 96px;
  }

  .profile-update-status {
    grid-column: 2;
    min-height: 32px;
    padding-inline: 12px;
  }
}

.profile-list-panel .table-like {
  max-height: 600px;
  overflow: auto;
  padding-right: 3px;
}

.profile-uploads-page {
  gap: 18px;
}

.profile-uploads-hero {
  min-height: 260px !important;
}

.profile-uploads-hero .profile-hero-content {
  min-height: 260px;
}

.profile-uploads-panel {
  display: grid;
  gap: 16px;
}

.profile-uploads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.profile-upload-card {
  min-width: 0;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.18);
  border-radius: 18px;
  overflow: hidden;
  color: var(--soft);
  background:
    radial-gradient(circle at 22% 0%, rgb(var(--accent-rgb) / 0.16), transparent 42%),
    linear-gradient(145deg, rgb(var(--surface-rgb) / 0.78), rgb(var(--surface-deep-rgb) / 0.72));
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.profile-upload-card:hover {
  color: var(--text);
  border-color: rgb(var(--accent-soft-rgb) / 0.62);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.3), 0 0 24px rgb(var(--accent-rgb) / 0.13);
  transform: translateY(-3px);
}

.profile-upload-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    radial-gradient(circle at 40% 20%, rgb(var(--accent-soft-rgb) / 0.36), transparent 42%),
    rgba(2, 6, 23, 0.76);
}

.profile-upload-media video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.profile-upload-media span {
  position: absolute;
  left: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  padding: 5px 9px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.34);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 950;
  background: rgb(var(--surface-deep-rgb) / 0.72);
  backdrop-filter: blur(12px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-upload-copy,
.profile-upload-tags,
.profile-upload-actions {
  padding-inline: 13px;
}

.profile-upload-copy {
  padding-top: 12px;
  display: grid;
  gap: 4px;
}

.profile-upload-copy strong,
.profile-upload-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-upload-copy strong {
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 950;
}

.profile-upload-copy small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.profile-upload-tags {
  margin-top: 9px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-upload-tags b {
  padding: 3px 7px;
  border-radius: 999px;
  color: rgb(var(--accent-soft-rgb));
  font-size: 0.68rem;
  background: rgb(var(--accent-rgb) / 0.12);
}

.profile-upload-actions {
  padding-block: 12px 13px;
  display: flex;
  gap: 8px;
  color: var(--muted);
}

.profile-upload-actions small {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 900;
}

.profile-upload-actions svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-upload-empty {
  padding: 24px;
  border: 1px dashed rgb(var(--accent-soft-rgb) / 0.34);
  border-radius: 18px;
  display: grid;
  gap: 10px;
  justify-items: start;
  color: var(--muted);
  background: rgb(var(--surface-solid-rgb) / 0.42);
}

.profile-upload-empty strong {
  color: var(--text);
}

.profile-upload-empty p {
  margin: 0;
}

.profile-map-settings {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgb(var(--accent-rgb) / 0.18);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgb(var(--accent-rgb) / 0.1), rgba(9, 15, 28, 0.56)),
    rgb(var(--surface-rgb) / 0.34);
}

.personal-data-settings {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgb(var(--accent-rgb) / 0.2);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgb(var(--accent-rgb) / 0.12), transparent 44%),
    rgb(var(--surface-rgb) / 0.38);
}

.personal-data-settings .section-title {
  margin: 0;
}

.personal-data-clear {
  min-height: 34px;
  padding: 0 12px;
}

.personal-data-intro {
  margin: -2px 0 0;
  line-height: 1.5;
}

.personal-data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.personal-data-grid .hint {
  margin: 5px 0 0;
}

.personal-data-consent {
  border-color: rgb(var(--accent-rgb) / 0.22);
  background: rgb(var(--accent-rgb) / 0.075);
}

.map-device-location-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgb(var(--accent-rgb) / 0.24);
  border-radius: 8px;
  background: rgb(var(--accent-rgb) / 0.08);
}

.map-device-location-button {
  flex: 0 0 auto;
}

.map-device-location-row .hint {
  margin: 0;
}

.map-settings-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.6fr) minmax(120px, 0.7fr) minmax(120px, 0.7fr);
  gap: 12px;
}

.user-map-page {
  display: grid;
  gap: 18px;
}

.map-notice {
  color: var(--soft);
}

.user-map-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 16px;
  padding: clamp(12px, 2vw, 18px);
}

.user-map-stage {
  position: relative;
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
}

.user-map-toolbar {
  position: relative;
  z-index: 15;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.user-map-search-control {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.24);
  border-radius: 8px;
  background: rgb(var(--surface-solid-rgb) / 0.84);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28), 0 0 24px rgb(var(--accent-rgb) / 0.1);
  backdrop-filter: blur(18px) saturate(1.18);
}

.user-map-search-modes {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.16);
  border-radius: 6px;
  background: rgb(var(--surface-rgb) / 0.42);
}

.user-map-search-modes button {
  min-height: 32px;
  padding: 5px 10px;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 850;
  cursor: pointer;
}

.user-map-search-modes button.active {
  color: var(--text);
  background: rgb(var(--accent-rgb) / 0.18);
  box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / 0.34), 0 0 18px rgb(var(--accent-rgb) / 0.14);
}

.user-map-search-form {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px 36px;
  gap: 6px;
}

.user-map-search-form .input {
  min-width: 0;
  min-height: 36px;
  padding-block: 6px;
}

.user-map-search-form .icon-button {
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
}

.user-map-search-form .icon-button svg {
  width: 17px;
  height: 17px;
}

.user-map-search-form .user-map-search-clear {
  width: 32px;
  min-width: 32px;
  min-height: 36px;
  color: var(--muted);
  background: rgb(var(--surface-rgb) / 0.48);
  font-size: 1.25rem;
  line-height: 1;
}

.user-map-search-form .user-map-search-clear:hover {
  color: var(--text);
  background: rgb(var(--accent-rgb) / 0.14);
}

.user-map-search-form .user-map-search-clear[hidden] {
  display: none;
}

.user-map-search-form:has(.user-map-search-clear[hidden]) {
  grid-template-columns: minmax(0, 1fr) 36px;
}

.user-map-search-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  max-height: min(420px, 58vh);
  overflow-y: auto;
  display: grid;
  gap: 4px;
  padding: 7px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.26);
  border-radius: 9px;
  background: rgb(var(--surface-solid-rgb) / 0.97);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.46), 0 0 30px rgb(var(--accent-rgb) / 0.13);
  backdrop-filter: blur(20px) saturate(1.2);
}

.user-map-search-results[hidden] {
  display: none;
}

.user-map-search-result {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.user-map-search-result:hover,
.user-map-search-result:focus-visible {
  border-color: rgb(var(--accent-rgb) / 0.34);
  background: rgb(var(--accent-rgb) / 0.12);
  outline: none;
}

.user-map-search-result .social-avatar,
.user-map-place-icon {
  width: 38px;
  height: 38px;
}

.user-map-place-icon {
  display: grid;
  place-items: center;
  border: 1px solid rgb(var(--accent-rgb) / 0.3);
  border-radius: 50%;
  color: rgb(var(--accent-soft-rgb));
  background: rgb(var(--accent-rgb) / 0.11);
}

.user-map-place-icon svg,
.user-map-search-result > svg {
  width: 17px;
  height: 17px;
}

.user-map-search-result > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.user-map-search-result strong,
.user-map-search-result small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-map-search-result small {
  color: var(--muted);
}

.user-map-search-result em {
  max-width: 90px;
  overflow: hidden;
  color: var(--soft);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  text-transform: capitalize;
  white-space: nowrap;
}

.user-map-search-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.user-map-search-empty.error {
  color: #fca5a5;
}

.user-map-style-control {
  position: relative;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.24);
  border-radius: 8px;
  background: rgb(var(--surface-solid-rgb) / 0.84);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34), 0 0 24px rgb(var(--accent-rgb) / 0.12);
  backdrop-filter: blur(18px) saturate(1.18);
}

.user-map-style-control > label {
  padding-left: 4px;
  color: var(--soft);
  font-size: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
}

.user-map-style-select {
  width: auto;
  min-width: 112px;
  min-height: 34px;
  padding-block: 5px;
  border-radius: 6px;
  color: var(--text);
  background-color: rgb(var(--surface-rgb) / 0.82);
  font-weight: 800;
}

.user-map-globe-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 5px 8px;
  border: 1px solid rgb(var(--accent-rgb) / 0.3);
  border-radius: 6px;
  color: rgb(var(--accent-soft-rgb));
  background: rgb(var(--accent-rgb) / 0.11);
  font-size: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
}

.user-map-globe-state svg {
  width: 15px;
  height: 15px;
}

.user-map-canvas {
  position: relative;
  min-height: clamp(460px, 64vh, 760px);
  overflow: hidden;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.22);
  border-radius: 14px;
  background:
    radial-gradient(circle at 20% 18%, rgb(var(--accent-rgb) / 0.24), transparent 28%),
    radial-gradient(circle at 76% 28%, rgb(var(--accent-2-rgb) / 0.18), transparent 30%),
    linear-gradient(145deg, rgba(5, 14, 28, 0.98), rgba(9, 24, 42, 0.92));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.05), inset 0 -40px 80px rgba(0, 0, 0, 0.28);
}

.user-map-water,
.user-map-grid-lines,
.user-map-region,
.user-map-marker,
.user-map-empty {
  position: absolute;
}

.user-map-water {
  inset: 0;
  background:
    linear-gradient(90deg, transparent 49.8%, rgb(255 255 255 / 0.06) 50%, transparent 50.2%),
    linear-gradient(0deg, transparent 49.8%, rgb(255 255 255 / 0.05) 50%, transparent 50.2%);
  background-size: 12.5% 12.5%;
  opacity: 0.6;
}

.user-map-grid-lines {
  inset: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 82px, rgb(var(--accent-rgb) / 0.09) 83px 84px),
    repeating-linear-gradient(0deg, transparent 0 72px, rgb(var(--accent-2-rgb) / 0.08) 73px 74px);
  mask-image: radial-gradient(circle at center, black 28%, transparent 88%);
  opacity: 0.75;
}

.user-map-region {
  background:
    linear-gradient(135deg, rgb(var(--accent-rgb) / 0.28), rgb(var(--accent-2-rgb) / 0.12));
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.2);
  filter: blur(0.2px);
  opacity: 0.72;
}

.user-map-region.north-america {
  left: 8%;
  top: 20%;
  width: 25%;
  height: 22%;
  clip-path: polygon(5% 42%, 30% 12%, 74% 7%, 98% 36%, 73% 74%, 40% 92%, 9% 76%);
}

.user-map-region.south-america {
  left: 27%;
  top: 52%;
  width: 12%;
  height: 30%;
  clip-path: polygon(20% 0, 82% 8%, 72% 38%, 100% 62%, 42% 100%, 9% 56%);
}

.user-map-region.europe {
  left: 47%;
  top: 25%;
  width: 13%;
  height: 14%;
  clip-path: polygon(0 42%, 30% 5%, 72% 10%, 100% 54%, 54% 100%, 15% 78%);
}

.user-map-region.africa {
  left: 48%;
  top: 40%;
  width: 18%;
  height: 30%;
  clip-path: polygon(32% 0, 78% 16%, 100% 52%, 62% 100%, 20% 88%, 0 44%);
}

.user-map-region.asia {
  left: 58%;
  top: 24%;
  width: 31%;
  height: 28%;
  clip-path: polygon(0 32%, 28% 6%, 72% 8%, 100% 34%, 82% 86%, 36% 100%, 12% 74%);
}

.user-map-region.australia {
  left: 73%;
  top: 68%;
  width: 14%;
  height: 12%;
  clip-path: polygon(8% 34%, 42% 2%, 88% 18%, 100% 66%, 54% 96%, 0 74%);
}

.user-map-marker {
  z-index: 8;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 5px 10px 5px 5px;
  border: 1px solid rgb(var(--accent-rgb) / 0.42);
  border-radius: 999px;
  background: rgb(var(--surface-solid-rgb) / 0.74);
  color: var(--text);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3), 0 0 26px rgb(var(--accent-rgb) / 0.2);
  backdrop-filter: blur(16px);
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.user-map-marker:hover,
.user-map-marker.active {
  z-index: 12;
  border-color: rgb(var(--accent-rgb) / 0.82);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.36), 0 0 34px rgb(var(--accent-rgb) / 0.32);
  transform: translate(-50%, -50%) scale(1.05);
}

.user-map-avatar {
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  flex: 0 0 32px;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  object-position: var(--avatar-focus-x, 50%) var(--avatar-focus-y, 50%);
}

.user-map-avatar.store-avatar-frame {
  display: inline-grid;
  place-items: center;
}

.user-map-avatar.store-avatar-frame .store-avatar-frame-media {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1 / 1;
}

.user-map-marker span {
  max-width: 120px;
  overflow: hidden;
  color: var(--text);
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-map-empty {
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  color: var(--soft);
  text-align: center;
}

.user-map-empty strong {
  color: var(--text);
  font-size: 1.1rem;
}

.user-map-list {
  max-height: clamp(460px, 64vh, 760px);
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  padding-right: 4px;
}

.user-map-country-list {
  display: none;
  max-height: clamp(460px, 64vh, 760px);
  overflow: auto;
  align-content: start;
  gap: 10px;
  padding-right: 4px;
}

.user-map-page[data-map-style="top_anime"] .user-map-list {
  display: grid;
}

.user-map-country-list-card {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 42px 44px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(9, 15, 28, 0.64);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.user-map-country-list-card:hover,
.user-map-country-list-card.active {
  border-color: rgb(var(--accent-rgb) / 0.72);
  background: rgb(var(--accent-rgb) / 0.12);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24), 0 0 22px rgb(var(--accent-rgb) / 0.12);
  transform: translateY(-1px);
}

.user-map-country-list-flag {
  display: grid;
  place-items: center;
  width: 42px;
  height: 30px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.22);
  border-radius: 5px;
  background: rgb(var(--surface-rgb) / 0.54);
  font-size: 1.5rem;
  line-height: 1;
  object-fit: cover;
}

.user-map-country-list-card > img {
  width: 44px;
  height: 58px;
  border-radius: 5px;
  object-fit: cover;
}

.user-map-country-list-card > span:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.user-map-country-list-card strong,
.user-map-country-list-card small,
.user-map-country-list-card em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-map-country-list-card small {
  color: var(--soft);
  font-weight: 800;
}

.user-map-country-list-card em {
  color: var(--muted);
  font-size: 0.7rem;
  font-style: normal;
}

.user-map-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(9, 15, 28, 0.64);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.user-map-card.active {
  border-color: rgb(var(--accent-rgb) / 0.72);
  background: rgb(var(--accent-rgb) / 0.12);
}

.user-map-card-focus {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.user-map-card-focus span {
  min-width: 0;
}

.user-map-card-focus .user-map-card-copy {
  display: grid;
  gap: 4px;
  flex: 1 1 auto;
}

.user-map-card-name-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.user-map-card-name-line > strong {
  max-width: 100%;
}

.user-map-card-name-line .user-map-role,
.user-map-card-name-line .store-profile-badge {
  flex: 0 0 auto;
  padding: 2px 6px;
  font-size: 0.64rem;
  line-height: 1.15;
}

.user-map-card-focus strong,
.user-map-card-focus small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-map-card-focus small {
  color: var(--muted);
}

.user-map-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.user-map-card-stats span {
  padding: 4px 8px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.18);
  border-radius: 999px;
  color: var(--soft);
  background: rgb(var(--surface-rgb) / 0.38);
  font-size: 0.78rem;
  font-weight: 750;
}

.user-map-canvas.maplibregl-map {
  z-index: 0;
  font-family: inherit;
  background: #0a1424;
  transition: filter 0.2s ease, opacity 0.2s ease;
}

.user-map-canvas.is-changing-style {
  filter: saturate(0.72) brightness(0.82);
  opacity: 0.86;
}

.user-map-canvas .maplibregl-ctrl-group,
.user-map-canvas .maplibregl-ctrl-attrib {
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.2);
  border-radius: 7px;
  background: rgb(var(--surface-solid-rgb) / 0.82);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
}

.user-map-canvas .maplibregl-ctrl-group button {
  border-color: rgb(var(--accent-soft-rgb) / 0.14);
  background: transparent;
  color: var(--text);
}

.user-map-canvas .maplibregl-ctrl-group button:hover {
  background: rgb(var(--accent-rgb) / 0.16);
  color: var(--text);
}

.user-map-canvas .maplibregl-ctrl-attrib,
.user-map-canvas .maplibregl-ctrl-attrib a {
  color: var(--muted);
}

.user-map-maplibre-marker {
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  min-height: 42px;
  padding: 5px 11px 5px 5px;
  border: 2px solid rgb(var(--accent-rgb) / 0.62);
  border-radius: 999px;
  background: rgb(var(--surface-solid-rgb) / 0.86);
  color: var(--text);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38), 0 0 24px rgb(var(--accent-rgb) / 0.24);
  backdrop-filter: blur(14px);
  transform: translateY(-2px);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.user-map-country-overlay {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.user-map-country-overlay[hidden] {
  display: none;
}

.user-map-country-cover-shape {
  pointer-events: none;
  opacity: 0.94;
  filter: saturate(1.1) contrast(1.06) brightness(0.96) drop-shadow(0 0 4px rgb(0 0 0 / 0.68));
}

.user-map-country-cover-fallback {
  fill: rgb(var(--accent-rgb) / 0.48);
}

.user-map-country-shape-outline {
  fill: rgb(var(--accent-rgb) / 0.08);
  stroke: rgb(var(--accent-soft-rgb) / 0.92);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 7px rgb(var(--accent-rgb) / 0.68));
}

.user-map-canvas .maplibregl-popup {
  z-index: 7;
}

.user-map-maplibre-marker:hover,
.user-map-maplibre-marker.active {
  border-color: rgb(var(--accent-soft-rgb) / 0.96);
  box-shadow: 0 15px 36px rgba(0, 0, 0, 0.44), 0 0 32px rgb(var(--accent-rgb) / 0.4);
  transform: translateY(-2px) scale(1.05);
}

.user-map-maplibre-marker > .user-map-marker-name {
  display: block;
  max-width: 130px;
  overflow: hidden;
  font-size: 0.8rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-map-country-marker {
  position: relative;
  width: max-content;
  min-height: 54px;
  display: grid;
  grid-template-columns: 34px 38px minmax(0, 112px);
  align-items: center;
  gap: 6px;
  padding: 5px 9px 5px 5px;
  border: 2px solid rgb(var(--accent-rgb) / 0.72);
  border-radius: 9px;
  color: var(--text);
  background: rgb(var(--surface-solid-rgb) / 0.9);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.48), 0 0 30px rgb(var(--accent-rgb) / 0.3);
  backdrop-filter: blur(16px) saturate(1.2);
  cursor: pointer;
  transform-origin: bottom center;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.user-map-country-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 12px;
  height: 12px;
  border-right: 2px solid rgb(var(--accent-rgb) / 0.72);
  border-bottom: 2px solid rgb(var(--accent-rgb) / 0.72);
  background: rgb(var(--surface-solid-rgb) / 0.92);
  transform: translateX(-50%) rotate(45deg);
}

.user-map-country-marker:hover {
  border-color: rgb(var(--accent-soft-rgb) / 0.98);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.52), 0 0 38px rgb(var(--accent-rgb) / 0.44);
  transform: translateY(-3px) scale(1.04);
}

.user-map-country-flag {
  display: grid;
  place-items: center;
  width: 34px;
  height: 24px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.24);
  border-radius: 4px;
  background: rgb(var(--surface-rgb) / 0.7);
  font-size: 1.32rem;
  line-height: 1;
  object-fit: cover;
}

.user-map-country-marker > img,
.user-map-country-poster-fallback {
  width: 38px;
  height: 48px;
  border-radius: 5px;
  object-fit: cover;
}

.user-map-country-poster-fallback {
  display: grid;
  place-items: center;
  color: var(--text);
  background: rgb(var(--accent-rgb) / 0.2);
  font-weight: 900;
}

.user-map-country-marker-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
  text-align: left;
}

.user-map-country-marker-copy strong {
  color: rgb(var(--accent-soft-rgb));
  font-size: 0.68rem;
}

.user-map-country-marker-copy small {
  overflow: hidden;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-map-canvas .maplibregl-popup-content {
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.2);
  background: rgb(var(--surface-solid-rgb) / 0.94);
  color: var(--text);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

.user-map-canvas .maplibregl-popup-content {
  padding: 14px;
  border-radius: 9px;
}

.user-map-canvas .maplibregl-popup-tip {
  border-top-color: rgb(var(--surface-solid-rgb) / 0.94);
  border-bottom-color: rgb(var(--surface-solid-rgb) / 0.94);
}

.user-map-canvas .maplibregl-popup-close-button {
  color: var(--muted);
}

.user-map-popup {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  min-width: 190px;
}

.user-map-popup > div {
  min-width: 0;
}

.user-map-popup strong,
.user-map-popup small,
.user-map-popup span,
.user-map-popup a {
  display: block;
}

.user-map-popup small,
.user-map-popup span {
  color: var(--muted);
}

.user-map-popup a {
  margin-top: 7px;
  color: rgb(var(--accent-soft-rgb));
  font-weight: 800;
}

.user-map-popup em {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
}

.user-map-country-popup {
  min-width: min(310px, 76vw);
  display: grid;
  gap: 11px;
}

.user-map-country-popup-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.user-map-country-popup-flag {
  display: grid;
  place-items: center;
  width: 44px;
  height: 31px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.22);
  border-radius: 5px;
  background: rgb(var(--surface-rgb) / 0.52);
  font-size: 1.65rem;
  object-fit: cover;
}

.user-map-country-popup-head > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.user-map-country-popup-head span {
  color: var(--muted);
  font-size: 0.75rem;
}

.user-map-country-popup-ranking {
  display: grid;
  gap: 5px;
}

.user-map-country-popup-ranking > a {
  min-width: 0;
  display: grid;
  grid-template-columns: 20px 32px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 5px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text);
}

.user-map-country-popup-ranking > a:hover {
  border-color: rgb(var(--accent-rgb) / 0.28);
  background: rgb(var(--accent-rgb) / 0.1);
}

.user-map-country-popup-ranking img {
  width: 32px;
  height: 42px;
  border-radius: 4px;
  object-fit: cover;
}

.user-map-country-popup-ranking a > span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.user-map-country-popup-ranking strong,
.user-map-country-popup-ranking small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-map-country-popup-ranking small {
  color: var(--muted);
  font-size: 0.68rem;
}

.user-map-country-taste {
  display: grid;
  gap: 14px;
  padding: clamp(14px, 2vw, 20px);
}

.user-map-country-taste > .section-title {
  align-items: end;
}

.user-map-country-taste .section-title > div {
  display: grid;
  gap: 4px;
}

.user-map-country-taste .section-title p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.user-map-country-taste-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 10px;
}

.user-map-taste-card {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 11px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.2);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgb(var(--accent-rgb) / 0.1), transparent 48%),
    rgb(var(--surface-rgb) / 0.56);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.035);
}

.user-map-taste-card-head {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.user-map-taste-flag {
  display: grid;
  place-items: center;
  width: 38px;
  height: 27px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.2);
  border-radius: 5px;
  background: rgb(var(--surface-solid-rgb) / 0.66);
  font-size: 1.35rem;
  object-fit: cover;
}

.user-map-taste-card-head > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.user-map-taste-card-head strong,
.user-map-taste-card-head small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-map-taste-card-head small {
  color: var(--muted);
  font-size: 0.7rem;
}

.user-map-taste-card-head b {
  padding: 5px 7px;
  border: 1px solid rgb(var(--accent-rgb) / 0.34);
  border-radius: 6px;
  color: rgb(var(--accent-soft-rgb));
  background: rgb(var(--accent-rgb) / 0.12);
  font-size: 0.76rem;
}

.user-map-taste-top {
  min-width: 0;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 7px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.15);
  border-radius: 7px;
  color: var(--text);
  background: rgb(var(--surface-solid-rgb) / 0.32);
}

.user-map-taste-top:hover {
  border-color: rgb(var(--accent-rgb) / 0.42);
  background: rgb(var(--accent-rgb) / 0.1);
}

.user-map-taste-top img {
  width: 48px;
  height: 64px;
  border-radius: 5px;
  object-fit: cover;
}

.user-map-taste-top > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.user-map-taste-top small {
  color: rgb(var(--accent-soft-rgb));
  font-size: 0.66rem;
  font-weight: 850;
  text-transform: uppercase;
}

.user-map-taste-top strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.35;
}

.user-map-taste-shared {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.user-map-taste-shared > small {
  color: var(--muted);
  font-weight: 750;
}

.user-map-taste-shared > div {
  display: flex;
  justify-content: flex-end;
  padding-right: 3px;
}

.user-map-taste-shared a {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  margin-right: -4px;
  overflow: hidden;
  border: 2px solid rgb(var(--surface-solid-rgb));
  border-radius: 50%;
  color: var(--text);
  background: rgb(var(--accent-rgb) / 0.22);
  font-size: 0.66rem;
  font-weight: 900;
}

.user-map-taste-shared img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-map-place-marker {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid rgb(var(--accent-soft-rgb) / 0.96);
  border-radius: 50% 50% 50% 10%;
  color: var(--text);
  background: rgb(var(--accent-rgb) / 0.94);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.44), 0 0 30px rgb(var(--accent-rgb) / 0.48);
  transform: rotate(-45deg);
}

.user-map-place-marker svg {
  width: 19px;
  height: 19px;
  transform: rotate(45deg);
}

.user-map-place-popup {
  display: grid;
  gap: 11px;
  min-width: min(280px, 72vw);
}

.user-map-place-popup-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.user-map-place-popup-head > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.user-map-place-popup-head span,
.user-map-place-details small {
  color: var(--muted);
  line-height: 1.4;
}

.user-map-place-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.user-map-place-details > span {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 7px 8px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.17);
  border-radius: 6px;
  background: rgb(var(--surface-rgb) / 0.46);
}

.user-map-place-details small {
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
}

.user-map-place-details strong {
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
}

.user-map-place-popup > a {
  width: fit-content;
  color: rgb(var(--accent-soft-rgb));
  font-size: 0.78rem;
  font-weight: 850;
}

.user-map-maplibre-marker.anonymous {
  border-color: rgba(148, 163, 184, 0.58);
  background: rgba(32, 40, 54, 0.9);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 22px rgba(148, 163, 184, 0.18);
  filter: grayscale(1);
}

.user-map-anonymous-avatar {
  display: grid !important;
  place-items: center;
  border: 1px solid rgba(203, 213, 225, 0.34);
  border-radius: 50%;
  background: rgba(100, 116, 139, 0.42);
  color: #e2e8f0;
  font-weight: 900;
}

.user-map-card.anonymous {
  border-color: rgba(148, 163, 184, 0.2);
  filter: grayscale(0.78);
}

.user-map-access-note {
  display: block;
  padding: 7px 9px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(100, 116, 139, 0.08);
  font-size: 0.76rem;
  font-weight: 800;
  text-align: center;
}

.map-access-notice {
  color: var(--soft);
}

.private-profile-page {
  display: grid;
  gap: 18px;
}

.private-profile-notice {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 720px;
  margin-inline: auto;
}

.private-profile-notice h2,
.private-profile-notice p {
  margin: 0;
}

.private-profile-notice p {
  margin-top: 5px;
  color: var(--muted);
}

.private-profile-lock {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 50%;
  background: rgba(100, 116, 139, 0.14);
  color: var(--soft);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

@media (max-width: 1120px) {
  .user-map-shell {
    grid-template-columns: 1fr;
  }

  .user-map-list {
    max-height: none;
  }

  .user-map-country-list {
    max-height: 430px;
  }

  .profile-dashboard {
    grid-template-columns: 1fr;
  }

  .profile-sidebar-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .profile-about-panel,
  .profile-status-overview {
    grid-column: span 1;
  }
}

@media (max-width: 760px) {
  .user-map-toolbar {
    grid-template-columns: 1fr;
  }

  .user-map-style-control {
    justify-self: stretch;
    justify-content: flex-end;
  }
}

@media (max-width: 820px) {
  .map-settings-grid,
  .personal-data-grid {
    grid-template-columns: 1fr;
  }

  .settings-grid > *,
  .settings-grid .panel,
  .personal-data-settings,
  .personal-data-grid .field {
    min-width: 0;
    max-width: 100%;
  }

  .settings-grid > .panel.form-grid {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }

  .personal-data-settings {
    width: 100%;
  }

  .personal-data-grid .input,
  .personal-data-grid .select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .map-device-location-row {
    align-items: stretch;
    flex-direction: column;
  }

  .map-device-location-button {
    width: 100%;
    justify-content: center;
  }

  .profile-page .profile-identity {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .profile-page .profile-avatar {
    width: 82px;
    height: 82px;
  }

  .profile-page .profile-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .profile-page .profile-actions .button {
    flex: 1 1 150px;
  }

  .profile-page .profile-stats,
  .profile-page .profile-lists,
  .profile-sidebar-column {
    grid-template-columns: 1fr;
  }

  .profile-nav-strip {
    align-self: stretch;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    border-radius: 18px;
  }
}

@media (max-width: 560px) {
  .user-map-shell {
    padding: 10px;
  }

  .user-map-canvas {
    min-height: 420px;
  }

  .user-map-style-control {
    justify-content: flex-end;
    gap: 6px;
  }

  .user-map-search-control {
    grid-template-columns: 1fr;
  }

  .user-map-search-modes {
    width: 100%;
  }

  .user-map-search-result {
    grid-template-columns: 36px minmax(0, 1fr) auto;
  }

  .user-map-search-result .social-avatar,
  .user-map-place-icon {
    width: 36px;
    height: 36px;
  }

  .user-map-style-control > label,
  .user-map-globe-state > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .user-map-style-select {
    min-width: 106px;
  }

  .user-map-globe-state {
    width: 34px;
    justify-content: center;
    padding-inline: 0;
  }

  .user-map-marker {
    padding: 4px;
  }

  .user-map-marker span {
    display: none;
  }

  .user-map-country-marker {
    grid-template-columns: 30px 34px;
    min-height: 48px;
    padding: 4px 7px 4px 4px;
  }

  .user-map-country-marker-copy {
    display: none;
  }

  .user-map-country-flag {
    width: 30px;
    height: 21px;
    font-size: 1.12rem;
  }

  .user-map-country-marker > img,
  .user-map-country-poster-fallback {
    width: 34px;
    height: 42px;
  }

  .user-map-country-taste > .section-title {
    align-items: start;
  }

  .user-map-country-taste-grid {
    grid-template-columns: 1fr;
  }

  .profile-page .profile-hero,
  .profile-hero-content {
    min-height: 300px;
  }

  .profile-hero-content {
    padding: 16px;
  }

  .profile-page .profile-hero h1 {
    font-size: clamp(1.9rem, 12vw, 3rem);
  }

  .profile-shelf-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profile-update-row {
    display: block;
  }
}

/* Keep top-right avatars centered, and let GIF avatars animate as normal images. */
.top-auth-wrap {
  flex: 0 0 auto;
  align-self: center;
}

.top-profile-button.top-profile-chip {
  box-sizing: border-box;
  width: auto;
  max-width: min(230px, 28vw);
  height: 42px;
  min-height: 42px;
  padding: 4px 12px 4px 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.signed-auth-trigger.top-profile-chip {
  min-width: 42px;
}

.top-profile-avatar,
.profile-avatar,
.settings-avatar-preview,
.account-avatar,
.social-avatar,
.chat-avatar,
.notification-avatar,
.comment-composer-avatar,
.mention-picker-avatar {
  box-sizing: border-box;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: cover;
  object-position: var(--avatar-focus-x, 50%) var(--avatar-focus-y, 50%);
  overflow: hidden;
}

.store-avatar-frame {
  position: relative;
  display: inline-grid;
  place-items: center;
  overflow: visible !important;
  isolation: isolate;
}

.store-avatar-frame-media {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
  object-position: var(--avatar-focus-x, 50%) var(--avatar-focus-y, 50%);
  overflow: hidden;
}

.store-avatar-frame::before,
.store-avatar-frame::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 3;
}

.store-avatar-frame .store-frame-deco {
  z-index: 4;
}

.top-profile-avatar.avatar-placeholder,
.profile-avatar.avatar-placeholder,
.settings-avatar-preview.avatar-placeholder,
.account-avatar.avatar-placeholder,
.social-avatar.avatar-placeholder,
.chat-avatar.avatar-placeholder,
.notification-avatar.avatar-placeholder,
.comment-composer-avatar.avatar-placeholder,
.mention-picker-avatar.avatar-placeholder {
  display: grid;
  place-items: center;
}

.top-profile-label {
  min-width: 0;
}

@media (max-width: 1100px) {
  .signed-auth-trigger.top-profile-chip {
    width: 42px;
    max-width: 42px;
    height: 42px;
    padding: 4px;
  }
}

.top-profile-avatar {
  width: 34px !important;
  height: 34px !important;
  flex: 0 0 34px !important;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  line-height: 0;
}

.top-profile-avatar-frame img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
  object-position: var(--avatar-focus-x, 50%) var(--avatar-focus-y, 50%);
}

.top-profile-avatar.avatar-placeholder {
  line-height: 1;
}

@media (max-width: 640px) {
  .cookie-consent {
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
    grid-template-columns: 1fr;
  }

  .cookie-consent-actions {
    justify-content: stretch;
  }

  .cookie-consent-actions .button {
    flex: 1 1 160px;
  }
}

/* Responsive polish for tablet, zoomed laptop, and phone layout checks. */
.poster-placeholder.image-fallback {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-weight: 950;
  background:
    radial-gradient(circle at 28% 18%, rgb(var(--accent-rgb) / 0.24), transparent 38%),
    rgb(var(--surface-solid-rgb) / 0.8);
}

@media (max-width: 1240px) and (min-width: 921px) {
  .discord-widget-popover {
    width: min(350px, calc(100vw - var(--sidebar-width) - 36px));
  }
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    width: auto;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    margin: 10px 16px 0;
    display: block;
  }

  .sidebar-menu-panel,
  .sidebar .account-box {
    display: none;
  }

  .sidebar-menu-panel::before {
    display: none;
  }

  .mobile-nav-layer {
    display: block;
  }

  .mobile-nav-fab {
    position: fixed;
    right: 18px;
    bottom: calc(18px + env(safe-area-inset-bottom));
    z-index: 62;
    width: 58px;
    height: 58px;
    border: 1px solid rgb(var(--accent-soft-rgb) / 0.5);
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.42);
  }

  .mobile-nav-fab.active {
    background: var(--panel-2);
    color: var(--text);
    border-color: rgb(var(--accent-soft-rgb) / 0.6);
  }

  .mobile-nav-backdrop {
    position: fixed;
    inset: calc(0px - env(safe-area-inset-top, 0px)) 0 calc(0px - env(safe-area-inset-bottom, 0px));
    z-index: 60;
    display: block;
    background:
      linear-gradient(135deg, rgb(var(--accent-rgb) / 0.12), transparent 42%),
      rgba(5, 8, 13, 0.5);
    backdrop-filter: blur(5px);
  }

  .mobile-nav-popover {
    position: fixed;
    right: 18px;
    bottom: calc(86px + env(safe-area-inset-bottom));
    z-index: 61;
    width: min(330px, calc(100vw - 36px));
    max-height: min(640px, calc(100dvh - 132px));
    overflow-y: auto;
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgb(var(--accent-soft-rgb) / 0.32);
    border-radius: 18px;
    background: rgba(8, 14, 31, 0.98);
    box-shadow: var(--shadow);
  }

  body.mobile-nav-open {
    overflow: hidden;
    background-color: var(--bg-mid);
  }

  .home-main-column {
    padding-right: 0;
  }

  .content {
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 760px) {
  .home-today-popover {
    top: 46px;
    right: 0;
    width: 100%;
  }

  .home-trending-panel {
    display: flex;
    height: 364px;
    min-height: 364px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .home-trending-panel::-webkit-scrollbar {
    display: none;
  }

  .home-trending-hero {
    position: relative;
    inset: auto;
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    height: 100%;
    min-height: 100%;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
    animation: none !important;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .home-trending-hero.entering,
  .home-trending-hero.leaving,
  .home-trending-hero.entering .home-trending-art,
  .home-trending-hero.leaving .home-trending-art {
    animation: none !important;
  }

  .home-trending-arrow {
    display: none !important;
  }

  .home-trending-art {
    top: 18px;
    right: 18px;
    width: min(106px, 28vw);
  }
}

@media (max-width: 480px) {
  .home-my-day-summary {
    gap: 6px;
    padding: 10px;
  }

  .home-my-day-summary > span {
    min-height: 56px;
    padding: 7px;
  }

  .home-my-day-summary small {
    white-space: normal;
  }

  .home-my-day-sync {
    grid-template-columns: 10px minmax(0, 1fr);
  }

  .home-my-day-sync > time {
    display: none;
  }

  .home-today-item {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .home-today-item > img,
  .home-today-cover-placeholder {
    width: 38px;
    height: 50px;
  }

  .home-today-item > time {
    grid-column: 2;
    margin-top: -2px;
  }
}

@media (max-width: 640px) {
  .cookie-consent {
    max-height: min(38dvh, 300px);
    overflow-y: auto;
    padding: 12px;
    gap: 10px;
  }

  .cookie-consent-copy p {
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .cookie-consent-actions .button {
    min-height: 36px;
    flex: 1 1 126px;
    padding: 0 10px;
    font-size: 0.82rem;
  }
}

@media (max-width: 560px) {
  .profile-nav-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    overflow: visible;
    border-radius: 18px;
  }

  .profile-nav-strip a,
  .profile-nav-strip button {
    min-width: 0;
    justify-content: center;
    padding: 8px 9px;
  }
}

#search-results .grid:has(> .media-card) {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
  justify-content: start;
  align-items: stretch;
  gap: 14px;
}

[data-search-grid] > [hidden] {
  display: none !important;
}

#genre-results .genre-catalog-grid {
  grid-template-columns: repeat(auto-fill, minmax(144px, 174px));
  justify-content: start;
  align-items: stretch;
  gap: 14px;
}

#search-results .media-card > .poster,
#search-results .media-card > .poster-placeholder,
#genre-results .media-card > .poster,
#genre-results .media-card > .poster-placeholder {
  aspect-ratio: 2 / 3;
}

@media (max-width: 620px) {
  #search-results .grid:has(> .media-card),
  #genre-results .genre-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    gap: 12px;
  }
}

/* Viewport hardening for real phones, tablets, and browser zoom. */
html,
body,
#app,
.app-shell,
.main,
.content {
  max-width: 100%;
}

.content,
.home-grid,
.home-main-column,
.home-trending-panel,
.continue-panel,
.media-detail-hero,
.amv-page,
.amv-feed-stage,
.amv-reel-shell {
  min-width: 0;
}

@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    overflow-x: hidden;
  }

  .content {
    overflow-x: hidden;
  }

  .page-head,
  .page-head > * {
    min-width: 0;
    max-width: 100%;
  }

  .home-main-column,
  .home-grid,
  .home-trending-panel,
  .continue-panel {
    width: 100%;
    max-width: 100%;
    padding-right: 0;
  }

  .page-copy,
  .home-trending-copy p,
  .home-trending-copy h2 {
    overflow-wrap: anywhere;
  }

  .page-copy {
    width: 100%;
    max-width: calc(100vw - 28px);
    font-size: 0.94rem;
    white-space: normal;
  }

  .page-head:has(.home-head-actions) .page-copy {
    max-width: 100%;
    display: none;
  }

  .home-trending-panel {
    min-height: 364px;
  }

  .home-trending-hero {
    width: 100%;
    max-width: 100%;
    padding-inline: 18px;
  }

  .home-trending-copy {
    max-width: calc(100vw - 56px);
  }

  .home-trending-copy h2 {
    font-size: clamp(1.65rem, 8vw, 2.45rem);
  }

  .home-trending-copy p {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 0.86rem;
  }

  .home-trending-art {
    right: 14px;
  }

  .media-detail-hero {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .media-detail-hero > .media-cover-stack {
    grid-column: 1;
    order: 1;
    width: min(218px, 58vw);
    margin-inline: auto;
    justify-self: center;
  }

  .media-detail-copy {
    grid-column: 1;
    order: 2;
    width: 100%;
    grid-template-columns: 1fr;
    grid-template-areas: "heading" "actions" "description";
    grid-template-rows: auto;
  }

  .media-detail-copy .hero-actions {
    display: flex;
    justify-content: end;
  }

  .media-detail-copy .hero-actions .button {
    flex: 0 1 auto;
  }


  .amv-page,
  .amv-library-panel,
  .amv-feed-stage,
  .amv-reel-shell,
  .amv-reel,
  .amv-reel-item {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .amv-filter-row {
    max-width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .amv-filter-row::-webkit-scrollbar {
    display: none;
  }

  .amv-filter {
    flex: 0 0 auto;
  }

  .amv-reel-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .amv-reel-toolbar small {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .amv-reel-info {
    left: 14px;
    right: 78px;
    max-width: calc(100% - 96px);
  }

  .cookie-consent {
    max-height: min(32dvh, 260px);
  }

  .cookie-consent-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .cookie-consent-actions .button {
    width: 100%;
    flex: none;
  }
}

@media (max-width: 430px) {
  .content {
    padding-inline: 10px;
  }

  .home-trending-panel {
    height: 350px;
    min-height: 350px;
  }

  .home-trending-hero {
    min-height: 350px;
    padding: 132px 16px 44px;
  }

  .home-trending-art {
    width: min(96px, 30vw);
  }

  .home-trending-arrow {
    width: 34px;
    height: 34px;
    top: 50%;
    transform: translateY(-50%);
  }

  .cookie-consent {
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    width: auto;
    max-height: min(34dvh, 250px);
    border-radius: 16px;
  }

  .cookie-consent-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cookie-consent-actions .button {
    width: 100%;
  }

  .amv-reel-info {
    bottom: 56px;
    right: 72px;
  }
}

@media (max-width: 620px) {
  .top-actions {
    gap: 7px;
    justify-content: flex-end;
  }

  .site-presence {
    width: auto;
    max-width: min(162px, 36vw);
    flex: 0 0 auto;
    margin-right: 0;
    padding-inline: 9px;
  }

  .top-actions > .top-utility-extra,
  .messages-wrap .top-utility-extra {
    display: grid !important;
  }

  .top-auth-wrap {
    width: 42px;
    flex: 0 0 42px;
  }

  .top-profile-button.top-profile-chip,
  .top-auth-trigger.top-profile-chip,
  .guest-auth-trigger.top-profile-chip,
  .signed-auth-trigger.top-profile-chip {
    width: 42px !important;
    max-width: 42px !important;
    min-width: 42px !important;
    height: 42px;
    min-height: 42px;
    flex: 0 0 42px !important;
    padding: 4px !important;
    justify-content: center;
  }

  .guest-auth-trigger.top-profile-chip span,
  .top-profile-button.top-profile-chip .top-profile-label {
    display: none !important;
  }
}

@media (min-width: 520px) and (max-width: 1100px) {
  .site-presence {
    max-width: none;
  }

  .presence-pill small {
    display: inline;
  }

  .presence-divider {
    display: block;
  }
}

@media (max-width: 1100px) {
  .top-actions > .announcement-trigger {
    display: grid !important;
  }
}

@media (max-width: 380px) {
  .top-actions {
    gap: 6px;
  }

  .site-presence {
    max-width: 74px;
  }

  .site-presence .presence-divider,
  .site-presence .presence-pill:last-child {
    display: none;
  }
}

.mobile-nav-fab,
.mobile-nav-backdrop,
.mobile-nav-popover,
.mobile-nav-item {
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-fab {
  appearance: none;
  -webkit-appearance: none;
  touch-action: manipulation;
}

.mobile-nav-fab:focus {
  outline: none;
}

.mobile-nav-fab:focus-visible {
  outline: 2px solid rgb(var(--accent-soft-rgb) / 0.72);
  outline-offset: 4px;
}

.mobile-nav-fab:active,
.mobile-nav-fab.active,
.mobile-nav-fab.active:active {
  background:
    radial-gradient(circle at 35% 20%, rgb(var(--accent-rgb) / 0.22), transparent 46%),
    rgb(var(--surface-rgb) / 0.42);
  color: var(--text);
  backdrop-filter: blur(18px);
}

body.mobile-nav-open {
  background-color: transparent;
}

.mobile-nav-backdrop {
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  inset: 0 !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.mobile-nav-popover {
  max-height: min(430px, calc(100dvh - 170px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px))) !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.noscript-content {
  max-width: 860px;
  margin: 40px auto;
  padding: 24px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.24);
  border-radius: 20px;
  color: var(--text);
  background: rgb(var(--surface-rgb) / 0.86);
}

.noscript-content p {
  color: var(--soft);
  line-height: 1.6;
}

.noscript-content nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.noscript-content a {
  padding: 8px 12px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.26);
  border-radius: 999px;
  color: var(--text);
  background: rgb(var(--accent-rgb) / 0.12);
}

.topbar:has(.notification-popover:not([hidden])),
.topbar:has(.messages-popover:not([hidden])),
.topbar:has(.ambient-popover:not([hidden])),
.topbar:has(.top-auth-popover:not([hidden])) {
  z-index: 190;
}

.notification-popover,
.messages-popover,
.ambient-popover,
.top-auth-popover {
  z-index: 180;
}

@media (max-height: 740px) {
  .mobile-nav-popover {
    max-height: min(360px, calc(100dvh - 154px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px))) !important;
    gap: 6px;
    padding: 10px;
  }

  .mobile-nav-item {
    min-height: 38px;
  }

  .mobile-nav-discord {
    min-height: 46px;
  }
}

/* iPhone/PWA hardening: keep the mobile shell compact and avoid Safari viewport snap. */
@media (max-width: 920px) {
  body::before {
    display: none;
  }

  body {
    background-attachment: scroll;
  }

  html.standalone-app,
  html.ios-device {
    overscroll-behavior: none;
  }

  html.standalone-app body,
  html.ios-device body {
    min-height: 100svh;
    background-attachment: scroll;
    overscroll-behavior: none;
    overflow-x: hidden;
  }

  html.standalone-app body::before,
  html.ios-device body::before {
    display: none;
  }

  html,
  body,
  #app,
  .app-shell,
  .main,
  .content {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .app-shell {
    min-height: 100svh;
    display: block;
    background:
      radial-gradient(circle at 22% 0%, rgb(var(--accent-rgb) / 0.14), transparent 32%),
      radial-gradient(circle at 88% 8%, rgb(var(--accent-2-rgb) / 0.1), transparent 34%),
      linear-gradient(135deg, var(--bg-deep) 0%, var(--bg-mid) 48%, var(--bg-end) 100%),
      var(--bg-deep);
  }

  html.standalone-app,
  html.ios-device,
  html.standalone-app body,
  html.ios-device body {
    background-color: var(--bg-deep);
    background:
      radial-gradient(circle at 22% 0%, rgb(var(--accent-rgb) / 0.18), transparent 32%),
      radial-gradient(circle at 88% 8%, rgb(var(--accent-2-rgb) / 0.13), transparent 34%),
      linear-gradient(135deg, var(--bg-deep) 0%, var(--bg-mid) 48%, var(--bg-end) 100%),
      var(--bg-deep);
  }

  html.standalone-app #app,
  html.ios-device #app,
  html.standalone-app .app-shell,
  html.ios-device .app-shell {
    background: transparent;
  }

  .sidebar {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    grid-template-rows: auto !important;
    display: block !important;
    margin: 0 16px !important;
    overflow: visible !important;
  }

  .sidebar-brand-card {
    position: relative !important;
    min-height: calc(64px + env(safe-area-inset-top, 0px)) !important;
    padding: calc(env(safe-area-inset-top, 0px) + 8px) 58px 8px 10px !important;
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  .sidebar-brand-card::before {
    content: "";
    position: absolute;
    inset: env(safe-area-inset-top, 0px) 0 0;
    z-index: 0;
    border: 1px solid rgb(var(--accent-soft-rgb) / 0.55);
    border-radius: 20px;
    background:
      radial-gradient(circle at 18% 18%, rgb(var(--accent-soft-rgb) / 0.22), transparent 42%),
      linear-gradient(180deg, rgb(var(--accent-rgb) / 0.16), rgba(9, 13, 30, 0.9));
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 16px 34px rgb(var(--accent-rgb) / 0.2), var(--shadow);
  }

  .sidebar-brand-card > * {
    position: relative;
    z-index: 1;
  }

  .brand-status-wrap {
    position: absolute !important;
    top: calc(env(safe-area-inset-top, 0px) + 10px);
    right: 10px;
  }

  .sidebar-menu-panel,
  .sidebar-menu-panel::before,
  .sidebar .account-box {
    display: none !important;
  }

  .topbar {
    position: relative !important;
    top: auto !important;
    margin: 10px 16px 0 !important;
  }

  .content {
    padding-top: 16px;
  }
}

@media (max-width: 460px) {
  .sidebar {
    margin-inline: 12px !important;
  }

  .topbar {
    margin-inline: 12px !important;
  }

  .sidebar-brand-card {
    border-radius: 18px !important;
  }
}

@media (min-width: 761px) {
  body:not(.streaming-route) .topbar {
    position: fixed !important;
    top: max(10px, var(--safe-top)) !important;
    left: calc(var(--sidebar-width) + var(--page-pad-x));
    right: var(--page-pad-x);
    margin: 0 !important;
    z-index: 150;
    transition: left 0.28s cubic-bezier(0.22, 1, 0.36, 1), right 0.2s ease;
  }

  body:not(.streaming-route) .main {
    padding-top: calc(var(--topbar-height) + var(--safe-top) + 24px);
  }
}

@media (min-width: 761px) and (max-width: 920px) {
  body:not(.streaming-route) .topbar {
    left: 16px;
    right: 16px;
  }

  body:not(.streaming-route) .sidebar {
    padding-top: calc(var(--topbar-height) + var(--safe-top) + 18px) !important;
  }
}

.app-shell.status-shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.status-shell .main {
  flex: 1 0 auto;
  width: 100%;
  max-width: none;
}

.status-shell .content {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(22px, 4vw, 52px) 0 64px;
}

.status-dashboard {
  display: grid;
  gap: 20px;
}

.status-site-header {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 12px;
}

.status-site-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.status-site-brand .brand-logo-frame {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
}

.status-site-brand > span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.status-site-brand strong {
  font-size: 1.05rem;
}

.status-site-brand small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.status-overview {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 4vw, 44px);
  border-color: rgb(134 239 172 / 0.32);
  background:
    radial-gradient(circle at 9% 15%, rgb(74 222 128 / 0.17), transparent 32%),
    radial-gradient(circle at 90% 0%, rgb(var(--accent-rgb) / 0.14), transparent 38%),
    rgb(var(--surface-rgb) / 0.84);
}

.status-dashboard.status-degraded .status-overview {
  border-color: rgb(251 191 36 / 0.42);
  background: radial-gradient(circle at 9% 15%, rgb(251 191 36 / 0.15), transparent 32%), rgb(var(--surface-rgb) / 0.84);
}

.status-dashboard.status-outage .status-overview {
  border-color: rgb(251 113 133 / 0.48);
  background: radial-gradient(circle at 9% 15%, rgb(251 113 133 / 0.16), transparent 32%), rgb(var(--surface-rgb) / 0.84);
}

.status-overview-main {
  display: flex;
  align-items: center;
  gap: 22px;
}

.status-overview-icon {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  display: grid;
  place-items: center;
  border: 1px solid rgb(134 239 172 / 0.36);
  border-radius: 50%;
  background: rgb(74 222 128 / 0.1);
  box-shadow: 0 0 38px rgb(74 222 128 / 0.2);
}

.status-overview-icon .system-status-dot {
  width: 22px;
  height: 22px;
}

.status-eyebrow {
  color: var(--ok);
  font-size: 0.72rem;
  font-weight: 900;
}

.status-overview h1 {
  margin: 5px 0 8px;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  letter-spacing: 0;
}

.status-overview p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.status-refresh-button {
  flex: 0 0 auto;
}

.status-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.status-facts > div {
  min-height: 88px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgb(var(--surface-rgb) / 0.7);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.035);
}

.status-facts span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-facts strong {
  font-size: 1.35rem;
}

.status-fact-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-fact-label .status-state-symbol {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
}

.status-uptime-label > i {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.42);
  border-radius: 50%;
  color: rgb(var(--accent-soft-rgb));
  background: rgb(var(--accent-rgb) / 0.1);
  font-size: 0.85rem;
  font-style: normal;
}

.status-history-panel {
  display: grid;
  gap: 16px;
  padding: 22px;
  background:
    linear-gradient(145deg, rgb(var(--accent-rgb) / 0.07), transparent 54%),
    rgb(var(--surface-rgb) / 0.74);
}

.status-history-head,
.status-incident-title,
.status-no-incidents {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.status-history-head > div {
  display: grid;
  gap: 4px;
}

.status-history-head h2,
.status-incident-title h3 {
  margin: 0;
}

.status-history-head small,
.status-history-scale,
.status-incident-meta,
.status-no-incidents small {
  color: var(--muted);
}

.status-history-head > strong {
  color: var(--ok);
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.status-availability-track {
  min-height: 40px;
  display: grid;
  grid-template-columns: repeat(30, minmax(4px, 1fr));
  align-items: stretch;
  gap: 4px;
}

.status-availability-day {
  min-width: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 0.05);
  border-radius: 4px;
  background: #86efac;
  box-shadow: 0 0 12px rgb(74 222 128 / 0.12);
}

.status-availability-day.status-degraded {
  background: #fbbf24;
  box-shadow: 0 0 12px rgb(251 191 36 / 0.15);
}

.status-availability-day.status-outage {
  background: #fb7185;
  box-shadow: 0 0 12px rgb(251 113 133 / 0.18);
}

.status-availability-day.status-unknown {
  background: rgb(148 163 184 / 0.2);
  box-shadow: none;
}

.status-availability-icon {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
  border-color: rgb(4 16 29 / 0.24);
  color: rgb(4 16 29 / 0.76);
  background: rgb(255 255 255 / 0.28);
  box-shadow: none;
  font-size: 0.58rem;
}

.status-history-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.78rem;
}

.status-history-scale {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.7rem;
}

.status-availability-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.status-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.status-state-symbol {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: inline-grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: #86efac;
  background: rgb(74 222 128 / 0.12);
  box-shadow: 0 0 12px rgb(74 222 128 / 0.14);
  font-size: 0.7rem;
  font-weight: 950;
  font-style: normal;
  line-height: 1;
}

.status-state-symbol.status-degraded {
  border-radius: 6px;
  color: #fbbf24;
  background: rgb(251 191 36 / 0.12);
  box-shadow: 0 0 12px rgb(251 191 36 / 0.13);
}

.status-state-symbol.status-outage {
  color: #fb7185;
  background: rgb(251 113 133 / 0.12);
  box-shadow: 0 0 12px rgb(251 113 133 / 0.14);
}

.status-state-symbol.status-unknown,
.status-state-symbol.status-not_configured,
.status-state-symbol.status-checking {
  color: #94a3b8;
  background: rgb(148 163 184 / 0.08);
  box-shadow: none;
}

.status-component-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.status-badge-icon,
.status-summary-icon {
  width: 15px;
  height: 15px;
  flex-basis: 15px;
  font-size: 0.5rem;
}

.status-overview-icon .status-state-symbol {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  font-size: 0.95rem;
}

.status-components-section {
  display: grid;
  gap: 12px;
}

.status-components-section .section-title {
  align-items: end;
}

.status-updated {
  color: var(--muted);
  font-size: 0.76rem;
}

.status-component-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.status-component-card {
  min-width: 0;
  display: grid;
  gap: 13px;
  padding: 18px;
  border: 1px solid rgb(134 239 172 / 0.2);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgb(74 222 128 / 0.055), transparent 48%),
    rgb(var(--surface-rgb) / 0.74);
}

.status-component-card.status-degraded {
  border-color: rgb(251 191 36 / 0.33);
  background: linear-gradient(145deg, rgb(251 191 36 / 0.07), transparent 48%), rgb(var(--surface-rgb) / 0.74);
}

.status-component-card.status-outage {
  border-color: rgb(251 113 133 / 0.36);
  background: linear-gradient(145deg, rgb(251 113 133 / 0.08), transparent 48%), rgb(var(--surface-rgb) / 0.74);
}

.status-component-card.status-not_configured {
  border-color: rgb(148 163 184 / 0.2);
  background: linear-gradient(145deg, rgb(148 163 184 / 0.045), transparent 48%), rgb(var(--surface-rgb) / 0.7);
  opacity: 0.8;
}

.status-component-card.status-not_configured .system-status-dot {
  background: #94a3b8;
  box-shadow: 0 0 0 5px rgb(148 163 184 / 0.08);
}

.status-component-card.status-not_configured .status-component-state {
  border-color: rgb(148 163 184 / 0.28);
  color: #cbd5e1;
}

.status-external-section {
  margin-top: 6px;
}

.status-external-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-external-summary span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgb(var(--surface-rgb) / 0.62);
  font-size: 0.72rem;
}

.status-external-summary strong {
  color: var(--text);
}

.status-external-loading {
  grid-column: 1 / -1;
  min-height: 110px;
  display: grid;
  place-items: center;
}

.status-component-head,
.status-component-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-component-head {
  justify-content: space-between;
}

.status-component-title > .system-status-dot {
  width: 11px;
  height: 11px;
  flex-basis: 11px;
}

.status-component-title > .status-state-symbol {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
  font-size: 0.75rem;
}

.status-component-title div {
  display: grid;
  gap: 2px;
}

.status-component-title h3 {
  margin: 0;
  font-size: 1rem;
}

.status-component-title small,
.status-component-card p,
.status-component-meta small {
  color: var(--muted);
}

.status-component-card p {
  min-height: 44px;
  margin: 0;
  line-height: 1.55;
}

.status-component-state {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid rgb(134 239 172 / 0.28);
  border-radius: 999px;
  color: var(--ok);
  font-size: 0.68rem;
  font-weight: 850;
}

.status-component-card.status-degraded .status-component-state,
.status-incident.status-degraded .status-component-state {
  border-color: rgb(251 191 36 / 0.34);
  color: #fde68a;
}

.status-component-card.status-outage .status-component-state,
.status-incident.status-outage .status-component-state {
  border-color: rgb(251 113 133 / 0.38);
  color: #fda4af;
}

.status-component-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.status-component-meta > span {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(var(--surface-solid-rgb) / 0.58);
  overflow-wrap: anywhere;
  font-size: 0.7rem;
}

.status-component-meta small {
  text-transform: capitalize;
}

.status-footer-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
}

.status-footer-panel > div:first-child {
  display: grid;
  gap: 4px;
}

.status-footer-panel span {
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.status-footer-panel strong {
  overflow-wrap: anywhere;
}

.status-incidents-section {
  display: grid;
  gap: 12px;
}

.status-incidents-list {
  display: grid;
  gap: 10px;
}

.status-incident {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  border: 1px solid rgb(251 191 36 / 0.28);
  border-radius: 14px;
  background: linear-gradient(145deg, rgb(251 191 36 / 0.06), transparent 50%), rgb(var(--surface-rgb) / 0.74);
}

.status-incident.status-outage {
  border-color: rgb(251 113 133 / 0.32);
  background: linear-gradient(145deg, rgb(251 113 133 / 0.07), transparent 50%), rgb(var(--surface-rgb) / 0.74);
}

.status-incident-marker {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: #fbbf24;
  background: rgb(251 191 36 / 0.08);
}

.status-incident.status-outage .status-incident-marker {
  color: #fb7185;
  background: rgb(251 113 133 / 0.08);
}

.status-incident-marker > .status-state-symbol {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.status-incident-copy {
  min-width: 0;
  display: grid;
  gap: 9px;
}

.status-incident-title {
  align-items: flex-start;
}

.status-incident-copy p {
  margin: 0;
  color: var(--soft);
  line-height: 1.5;
}

.status-incident-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 16px;
  font-size: 0.72rem;
}

.status-no-incidents {
  justify-content: flex-start;
  padding: 18px;
}

.status-no-incidents > .system-status-dot {
  width: 11px;
  height: 11px;
  flex-basis: 11px;
}

.status-no-incidents > .status-state-symbol {
  width: 26px;
  height: 26px;
  flex-basis: 26px;
}

.status-no-incidents > div {
  display: grid;
  gap: 3px;
}

@media (max-width: 760px) {
  .status-shell .content {
    width: min(100% - 24px, 1180px);
    padding-top: 16px;
  }

  .status-overview,
  .status-overview-main,
  .status-footer-panel {
    align-items: flex-start;
  }

  .status-overview {
    min-height: 0;
    flex-direction: column;
  }

  .status-overview-main {
    gap: 14px;
  }

  .status-overview-icon {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
  }

  .status-overview-icon .system-status-dot {
    width: 16px;
    height: 16px;
  }

  .status-refresh-button {
    width: 100%;
  }

  .status-facts,
  .status-component-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .status-component-card {
    grid-column: 1 / -1;
  }

  .status-footer-panel {
    flex-direction: column;
  }

  .status-site-header {
    padding-inline: 2px;
  }

  .status-availability-track {
    gap: 2px;
  }

  .status-availability-legend {
    justify-content: flex-start;
    gap: 8px 14px;
  }

  .status-history-head,
  .status-incident-title {
    align-items: flex-start;
  }
}

@media (max-width: 460px) {
  .sidebar-brand-card {
    padding-right: 62px !important;
  }

  .brand-status-trigger {
    min-width: 50px;
    justify-content: center;
  }

  .brand-status-label {
    display: inline;
  }

  .status-facts {
    grid-template-columns: 1fr 1fr;
  }

  .status-availability-icon {
    display: none;
  }

  .status-history-panel,
  .status-incident {
    padding: 15px;
  }

  .status-history-head {
    flex-direction: column;
  }

  .status-incident {
    grid-template-columns: 1fr;
  }

  .status-incident-marker {
    width: 30px;
    height: 30px;
  }

  .status-component-head {
    align-items: flex-start;
  }

  .status-site-header > .button {
    width: 40px;
    min-width: 40px;
    padding-inline: 0;
    overflow: hidden;
    color: transparent;
    font-size: 0;
  }

  .status-site-header > .button::before {
    content: "↗";
    color: var(--text);
    font-size: 1rem;
  }
}

.store-head {
  align-items: center;
}

.store-points-pill {
  min-width: 136px;
  padding: 12px 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 44%, var(--border));
  border-radius: 18px;
  background:
    radial-gradient(circle at 25% 15%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 52%),
    color-mix(in srgb, var(--panel) 88%, transparent);
  box-shadow: 0 18px 48px color-mix(in srgb, var(--accent) 12%, transparent);
  text-align: right;
}

.store-points-pill span {
  display: block;
  color: var(--text);
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1;
}

.store-points-pill small {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.store-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  overflow: hidden;
  position: relative;
}

.store-hero::after {
  content: "";
  position: absolute;
  inset: auto -12% -60% auto;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 66%);
  pointer-events: none;
}

.store-hero small,
.store-card-copy small {
  color: var(--accent);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.store-hero h2 {
  margin: 4px 0 8px;
  color: var(--text);
}

.store-hero p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.store-section {
  margin-top: 18px;
}

.store-section + .store-section {
  margin-top: 24px;
}

.store-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin: 18px 0 22px;
}

.store-earn-card {
  margin: 18px 0 22px;
}

.store-earn-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
}

.store-earn-list div {
  min-height: 78px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  border-radius: 16px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 54%),
    rgba(255, 255, 255, .035);
}

.store-earn-list span {
  color: var(--muted);
  font-size: .86rem;
  font-weight: 800;
  line-height: 1.25;
}

.store-earn-list strong {
  color: var(--text);
  font-weight: 950;
}

.store-tool-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.store-user-search-wrap {
  position: relative;
}

.store-user-results {
  position: absolute;
  z-index: 80;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow: auto;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--border));
  border-radius: 16px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 42%),
    color-mix(in srgb, var(--panel) 96%, #020617);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .32);
  backdrop-filter: blur(18px);
}

.store-user-results button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.store-user-results button:hover {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.store-user-results span {
  min-width: 0;
  display: grid;
}

.store-user-results strong,
.store-user-results small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-user-results small {
  color: var(--muted);
}

.store-user-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 999px;
  object-fit: cover;
}

.store-tool-message:empty {
  display: none;
}

.store-card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border));
  border-radius: 18px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 42%),
    color-mix(in srgb, var(--panel) 90%, transparent);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .18);
}

.store-card.owned {
  border-color: color-mix(in srgb, var(--accent) 54%, var(--border));
}

.store-card-preview {
  min-height: 92px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border));
  background: rgba(255, 255, 255, .035);
  overflow: hidden;
}

.store-preview-name {
  font-size: 1.35rem;
  font-weight: 950;
  text-shadow: 0 0 18px currentColor;
}

.store-preview-avatar {
  width: 58px;
  height: 58px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--text);
  font-weight: 950;
  background: linear-gradient(145deg, var(--accent), color-mix(in srgb, var(--accent-2) 55%, #111827));
  isolation: isolate;
}

.store-preview-avatar::before,
.store-preview-avatar::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
}

.store-frame-deco {
  position: absolute;
  pointer-events: none;
  z-index: 2;
}

.store-preview-badge,
.store-profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--text);
  font-size: .78rem;
  font-weight: 900;
}

.user-name-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  vertical-align: middle;
  font-weight: 900;
  line-height: 1.15;
}

.user-name-badge-text {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-name-badge .store-profile-badge {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 10rem;
  padding: 2px 6px;
  overflow: hidden;
  font-size: .64rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-profile-name-badge .store-profile-badge {
  max-width: 5.5rem;
  padding: 1px 5px;
  font-size: .56rem;
}

.top-profile-name-badge .sponsor-role-badge {
  width: 18px;
  height: 18px;
}

.store-preview-banner {
  width: min(170px, 88%);
  height: 58px;
  position: relative;
  border-radius: 14px;
  background:
    radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--accent) 65%, transparent), transparent 40%),
    linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.02));
  overflow: hidden;
}

.store-preview-banner i,
.store-preview-banner b,
.store-preview-banner em {
  position: absolute;
  inset: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 56%, transparent);
  border-radius: 12px;
}

.store-preview-banner b {
  inset: 18px 42px;
}

.store-preview-banner em {
  inset: auto;
  width: 54px;
  height: 54px;
  right: -16px;
  top: -18px;
  border: 0;
  background: radial-gradient(circle, rgba(255,255,255,.45), transparent 62%);
  filter: blur(1px);
  animation: store-aura-float 4s ease-in-out infinite;
}

.store-preview-banner-starburst {
  background:
    radial-gradient(circle at 18% 24%, rgba(251, 191, 36, .65), transparent 36%),
    radial-gradient(circle at 78% 28%, color-mix(in srgb, var(--accent) 42%, transparent), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, .5), rgba(255, 255, 255, .08));
}

.store-preview-banner-aincrad-sky {
  background:
    linear-gradient(160deg, rgba(56, 189, 248, .55), rgba(37, 99, 235, .18) 54%, rgba(2, 6, 23, .35)),
    radial-gradient(circle at 78% 15%, rgba(255,255,255,.55), transparent 18%);
}

.store-preview-banner-aincrad-sky b {
  inset: auto 18px 12px;
  height: 2px;
  border: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.85), transparent);
}

.store-preview-banner-crystal-rain {
  background:
    linear-gradient(135deg, rgba(103, 232, 249, .38), rgba(167, 139, 250, .22)),
    rgba(15, 23, 42, .4);
}

.store-preview-banner-crystal-rain i {
  border: 0;
  inset: 0;
  background:
    linear-gradient(110deg, transparent 0 22%, rgba(255,255,255,.48) 23% 25%, transparent 26% 46%, rgba(186,230,253,.5) 47% 49%, transparent 50% 100%);
  animation: store-rain-slide 2.8s linear infinite;
}

.store-preview-banner-rose {
  background:
    radial-gradient(ellipse at 20% 30%, rgba(251,113,133,.68) 0 12%, transparent 26%),
    radial-gradient(ellipse at 78% 24%, rgba(244,114,182,.56), transparent 30%),
    radial-gradient(ellipse at 62% 84%, rgba(255,228,230,.32), transparent 32%),
    linear-gradient(135deg, rgba(63, 7, 31, .24), rgba(15, 23, 42, .5));
  box-shadow: 0 0 24px rgba(251,113,133,.14);
}

.store-preview-banner-rose b {
  border: 0;
  inset: 0;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg opacity='.96'%3E%3Cellipse fill='%23ffe4e6' cx='50' cy='22' rx='13' ry='19'/%3E%3Cellipse fill='%23fb7185' cx='34' cy='39' rx='17' ry='13' transform='rotate(-32 34 39)'/%3E%3Cellipse fill='%23f472b6' cx='66' cy='39' rx='17' ry='13' transform='rotate(32 66 39)'/%3E%3Cellipse fill='%23fb7185' cx='42' cy='58' rx='15' ry='12' transform='rotate(24 42 58)'/%3E%3Cellipse fill='%23ffe4e6' cx='58' cy='58' rx='15' ry='12' transform='rotate(-24 58 58)'/%3E%3Ccircle fill='%23be123c' cx='50' cy='44' r='10'/%3E%3Cpath fill='%237f1d1d' opacity='.55' d='M50 48c-8 12-18 20-31 25 16-1 30-7 41-17z'/%3E%3C/g%3E%3C/svg%3E") 18% 34% / 34px 34px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg opacity='.9'%3E%3Cellipse fill='%23ffe4e6' cx='50' cy='22' rx='13' ry='19'/%3E%3Cellipse fill='%23fb7185' cx='34' cy='39' rx='17' ry='13' transform='rotate(-32 34 39)'/%3E%3Cellipse fill='%23f472b6' cx='66' cy='39' rx='17' ry='13' transform='rotate(32 66 39)'/%3E%3Cellipse fill='%23fb7185' cx='42' cy='58' rx='15' ry='12' transform='rotate(24 42 58)'/%3E%3Cellipse fill='%23ffe4e6' cx='58' cy='58' rx='15' ry='12' transform='rotate(-24 58 58)'/%3E%3Ccircle fill='%23be123c' cx='50' cy='44' r='10'/%3E%3C/g%3E%3C/svg%3E") 78% 68% / 26px 26px no-repeat,
    radial-gradient(ellipse at 62% 24%, rgba(255,228,230,.72) 0 3%, transparent 4%),
    radial-gradient(ellipse at 36% 78%, rgba(251,113,133,.65) 0 4%, transparent 5%);
  filter: drop-shadow(0 0 10px rgba(251, 113, 133, .72));
  animation: store-rose-banner-petals 6s ease-in-out infinite;
}

.store-preview-banner-system-grid {
  background:
    linear-gradient(135deg, rgba(34, 197, 94, .26), rgba(2, 6, 23, .5)),
    repeating-linear-gradient(90deg, rgba(74, 222, 128, .18) 0 1px, transparent 1px 17px),
    repeating-linear-gradient(0deg, rgba(74, 222, 128, .16) 0 1px, transparent 1px 15px);
}

.store-preview-banner-system-grid i {
  border: 0;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(74, 222, 128, .42), transparent);
  height: 26px;
  animation: store-system-scan 2.4s linear infinite;
}

.store-preview-banner-moonlit-duel {
  background:
    radial-gradient(circle at 72% 20%, rgba(226, 246, 255, .62), transparent 19%),
    linear-gradient(140deg, rgba(14, 165, 233, .32), rgba(30, 41, 59, .48) 55%, rgba(2, 6, 23, .56));
}

.store-preview-banner-moonlit-duel b {
  border: 0;
  inset: auto 18px 13px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(125, 211, 252, .95), transparent);
  box-shadow: 0 0 18px rgba(125, 211, 252, .45);
}

.store-preview-banner-boss-room {
  background:
    linear-gradient(135deg, rgba(127, 29, 29, .5), rgba(2, 6, 23, .42)),
    repeating-linear-gradient(90deg, rgba(248, 113, 113, .18) 0 2px, transparent 2px 18px);
}

.store-preview-banner-boss-room i {
  border-color: rgba(248, 113, 113, .55);
  box-shadow: inset 0 0 22px rgba(239, 68, 68, .22), 0 0 20px rgba(239, 68, 68, .2);
  animation: store-boss-warning 1.8s ease-in-out infinite;
}

.store-preview-banner-starlight-gate {
  background:
    radial-gradient(circle at 50% 48%, rgba(216, 180, 254, .52), transparent 32%),
    conic-gradient(from 180deg, rgba(56, 189, 248, .26), rgba(216, 180, 254, .34), rgba(251, 191, 36, .18), rgba(56, 189, 248, .26));
}

.store-preview-banner-starlight-gate i {
  inset: 7px 42px;
  border-radius: 999px;
  border-color: rgba(255,255,255,.52);
  animation: store-frame-spin 8s linear infinite;
}

.store-card-copy {
  flex: 1;
}

.store-card-copy h3 {
  margin: 5px 0 8px;
  color: var(--text);
}

.store-card-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.store-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.store-price {
  color: var(--muted);
  font-weight: 850;
}

.store-equipped-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.store-equipped-list span {
  padding: 6px 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--border));
  border-radius: 999px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
}

.store-frame-guild {
  border: 2px solid color-mix(in srgb, var(--accent) 76%, white 8%) !important;
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent),
    0 0 22px color-mix(in srgb, var(--accent) 30%, transparent) !important;
  animation: store-frame-pulse 2.9s ease-in-out infinite;
}

.store-frame-crystal {
  border: 2px solid rgba(226, 246, 255, .9) !important;
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--accent) 68%, transparent),
    0 0 0 7px rgba(255,255,255,.08),
    0 0 30px color-mix(in srgb, var(--accent) 48%, transparent) !important;
  animation: store-frame-crystal-glint 3.4s ease-in-out infinite;
}

.store-frame-aincrad {
  border: 2px solid color-mix(in srgb, var(--accent) 84%, white 10%) !important;
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, .08),
    0 0 0 8px color-mix(in srgb, var(--accent-2) 22%, transparent),
    0 0 28px color-mix(in srgb, var(--accent) 34%, transparent) !important;
  animation: store-frame-pulse 3.8s ease-in-out infinite;
}

.store-frame-starburst {
  border: 2px solid color-mix(in srgb, #ffe29a 84%, var(--accent)) !important;
  box-shadow:
    0 0 0 4px color-mix(in srgb, #fbbf24 26%, transparent),
    0 0 18px color-mix(in srgb, #f59e0b 55%, transparent),
    0 0 38px color-mix(in srgb, var(--accent) 30%, transparent) !important;
  animation: store-frame-star-glow 2.6s ease-in-out infinite;
}

.store-frame-knight {
  border: 2px solid rgba(244, 244, 245, .92) !important;
  box-shadow:
    0 0 0 4px color-mix(in srgb, #facc15 28%, transparent),
    0 0 0 8px color-mix(in srgb, #94a3b8 20%, transparent),
    0 0 26px rgba(250, 204, 21, .28) !important;
  animation: store-frame-knight-shine 4s linear infinite;
}

.store-frame-fracture {
  border: 2px solid rgba(20, 6, 9, .98) !important;
  box-shadow:
    0 0 0 4px rgba(239, 68, 68, .24),
    0 0 18px rgba(239, 68, 68, .42),
    0 0 34px rgba(12, 2, 6, .55) !important;
  animation: store-frame-fracture-pulse 1.7s steps(2, end) infinite;
}

.store-frame-snowfall {
  border: 2px solid rgba(230, 249, 255, .95) !important;
  box-shadow:
    0 0 0 4px rgba(125, 211, 252, .22),
    0 0 0 8px rgba(255, 255, 255, .06),
    0 0 28px rgba(186, 230, 253, .38) !important;
  animation: store-frame-snow-glow 4.4s ease-in-out infinite;
}

.store-frame-duel {
  border: 2px solid rgba(255,255,255,.9) !important;
  box-shadow:
    -5px 0 0 2px rgba(56, 189, 248, .58),
    5px 0 0 2px rgba(244, 63, 94, .58),
    0 0 30px color-mix(in srgb, var(--accent) 36%, transparent) !important;
  animation: store-frame-duel-pulse 2.1s ease-in-out infinite;
}

.store-frame-system {
  border: 2px solid rgba(74, 222, 128, .92) !important;
  box-shadow:
    0 0 0 4px rgba(34, 197, 94, .2),
    0 0 22px rgba(34, 197, 94, .36),
    inset 0 0 16px rgba(74, 222, 128, .2) !important;
  animation: store-frame-system-glow 3s linear infinite;
}

.store-frame-rose {
  border: 2px solid rgba(251, 113, 133, .92) !important;
  box-shadow:
    0 0 0 4px rgba(244, 114, 182, .18),
    0 0 25px rgba(251, 113, 133, .34),
    0 0 44px rgba(190, 24, 93, .18) !important;
  /* Animate the petal layers, not a filter over the animated avatar. */
  animation: none;
}

.store-frame-lightning {
  border: 2px solid rgba(186, 230, 253, .96) !important;
  box-shadow:
    0 0 0 4px rgba(14, 165, 233, .25),
    0 0 18px rgba(59, 130, 246, .46),
    0 0 40px rgba(125, 211, 252, .32) !important;
  animation: store-frame-lightning-flash 1.9s steps(2, end) infinite;
}

.store-frame-rapier {
  border: 2px solid rgba(248, 250, 252, .96) !important;
  box-shadow:
    0 0 0 4px rgba(56, 189, 248, .2),
    0 0 22px rgba(226, 246, 255, .46),
    0 0 42px rgba(56, 189, 248, .2) !important;
  animation: store-frame-crystal-glint 2.6s ease-in-out infinite;
}

.store-frame-shadow-burst {
  border: 2px solid rgba(192, 132, 252, .9) !important;
  box-shadow:
    0 0 0 4px rgba(88, 28, 135, .36),
    0 0 28px rgba(168, 85, 247, .42),
    inset 0 0 16px rgba(88, 28, 135, .32) !important;
  animation: store-shadow-pulse 2.4s ease-in-out infinite;
}

.store-frame-floor-boss {
  border: 2px solid rgba(248, 113, 113, .94) !important;
  box-shadow:
    0 0 0 4px rgba(239, 68, 68, .22),
    0 0 0 8px rgba(251, 191, 36, .12),
    0 0 34px rgba(239, 68, 68, .46) !important;
  animation: store-boss-warning 1.8s ease-in-out infinite;
}

.store-preview-avatar.store-frame-crystal::before,
.store-avatar-frame.store-frame-crystal::before {
  inset: -10px;
  border-radius: 18px;
  border: 2px solid color-mix(in srgb, var(--accent) 58%, transparent);
  transform: rotate(45deg);
}

.store-preview-avatar.store-frame-aincrad::before,
.store-avatar-frame.store-frame-aincrad::before {
  inset: -12px;
  border-radius: 999px;
  border: 2px dashed color-mix(in srgb, var(--accent-2) 70%, transparent);
}

.store-preview-avatar.store-frame-aincrad::after,
.store-avatar-frame.store-frame-aincrad::after {
  right: -14px;
  bottom: -5px;
  width: 25px;
  height: 25px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 82%, #020617);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.18);
}

.store-preview-avatar.store-frame-starburst::before,
.store-avatar-frame.store-frame-starburst::before {
  inset: -17px;
  background:
    conic-gradient(from 10deg, transparent 0 8%, rgba(255,226,154,.95) 9% 12%, transparent 13% 23%, rgba(255,226,154,.8) 24% 27%, transparent 28% 100%);
  border-radius: 999px;
  filter: drop-shadow(0 0 12px rgba(245, 158, 11, .55));
}

.store-preview-avatar.store-frame-knight::before,
.store-avatar-frame.store-frame-knight::before {
  inset: -13px;
  border-radius: 22px 10px 22px 10px;
  border: 2px solid rgba(250, 204, 21, .72);
  transform: rotate(45deg);
}

.store-preview-avatar.store-frame-knight::after,
.store-avatar-frame.store-frame-knight::after {
  inset: -5px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.45);
}

.store-preview-avatar.store-frame-fracture::before,
.store-avatar-frame.store-frame-fracture::before {
  inset: -18px;
  z-index: 1;
  background:
    linear-gradient(138deg, transparent 0 35%, rgba(11, 2, 6, .95) 36% 39%, rgba(239, 68, 68, .95) 40% 43%, transparent 44% 100%),
    linear-gradient(32deg, transparent 0 45%, rgba(127, 29, 29, .92) 46% 49%, rgba(0, 0, 0, .9) 50% 53%, transparent 54% 100%);
  filter: drop-shadow(0 0 6px rgba(239, 68, 68, .72));
  transform: rotate(-8deg);
  animation: store-frame-fracture-swipe 2.2s ease-in-out infinite;
}

.store-preview-avatar.store-frame-fracture .store-frame-deco.one,
.store-avatar-frame.store-frame-fracture .store-frame-deco.one {
  left: -14px;
  top: -8px;
  width: 42px;
  height: 24px;
  background:
    radial-gradient(circle at 30% 42%, #050102 0 22%, transparent 23%),
    linear-gradient(135deg, transparent 0 33%, #ef4444 34% 47%, #050102 48% 58%, transparent 59% 100%);
  transform: rotate(-20deg);
  filter: drop-shadow(0 0 5px rgba(239,68,68,.7));
  animation: store-frame-jitter 1.15s steps(2, end) infinite;
}

.store-preview-avatar.store-frame-fracture .store-frame-deco.two,
.store-avatar-frame.store-frame-fracture .store-frame-deco.two {
  right: -16px;
  bottom: 8px;
  width: 52px;
  height: 30px;
  border-top: 5px solid #050102;
  border-bottom: 3px solid rgba(239, 68, 68, .92);
  border-radius: 70% 40% 60% 30%;
  transform: rotate(28deg);
  filter: drop-shadow(0 0 5px rgba(239,68,68,.65));
  animation: store-frame-jitter 1.45s steps(2, end) infinite reverse;
}

.store-preview-avatar.store-frame-snowfall::before,
.store-avatar-frame.store-frame-snowfall::before {
  inset: -16px;
  z-index: 1;
  border-radius: 999px;
  background:
    radial-gradient(circle at 20% 12%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 74% 7%, #bae6fd 0 2px, transparent 3px),
    radial-gradient(circle at 86% 55%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 18% 82%, #e0f2fe 0 2px, transparent 3px);
  filter: drop-shadow(0 0 5px rgba(186, 230, 253, .72));
  animation: store-frame-snowfall 3.6s linear infinite;
}

.store-preview-avatar.store-frame-snowfall::after,
.store-avatar-frame.store-frame-snowfall::after {
  inset: -11px;
  z-index: 1;
  border-radius: 999px;
  border: 1px solid rgba(224, 242, 254, .76);
  box-shadow: inset 0 0 18px rgba(186, 230, 253, .25);
  animation: store-frame-spin 7s linear infinite;
}

.store-preview-avatar.store-frame-snowfall .store-frame-deco.one,
.store-avatar-frame.store-frame-snowfall .store-frame-deco.one {
  right: -10px;
  top: -8px;
  width: 18px;
  height: 18px;
  background:
    linear-gradient(90deg, transparent 42%, #e0f2fe 43% 57%, transparent 58%),
    linear-gradient(0deg, transparent 42%, #e0f2fe 43% 57%, transparent 58%);
  filter: drop-shadow(0 0 8px rgba(186,230,253,.9));
  animation: store-frame-spin 3s linear infinite;
}

.store-preview-avatar.store-frame-duel::before,
.store-avatar-frame.store-frame-duel::before {
  inset: -15px;
  border-radius: 999px;
  background: conic-gradient(from 90deg, rgba(56,189,248,.86), transparent 34%, rgba(244,63,94,.92), transparent 68%, rgba(56,189,248,.86));
  filter: blur(.2px) drop-shadow(0 0 10px rgba(56,189,248,.45));
  animation: store-frame-spin 5.5s linear infinite;
}

.store-preview-avatar.store-frame-duel::after,
.store-avatar-frame.store-frame-duel::after {
  inset: -9px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.4);
}

.store-preview-avatar.store-frame-system::before,
.store-avatar-frame.store-frame-system::before {
  inset: -13px;
  border-radius: 12px;
  border: 1px solid rgba(74, 222, 128, .68);
  background:
    repeating-linear-gradient(0deg, transparent 0 7px, rgba(74,222,128,.24) 8px 9px),
    repeating-linear-gradient(90deg, transparent 0 9px, rgba(74,222,128,.16) 10px 11px);
}

.store-preview-avatar.store-frame-system::after,
.store-avatar-frame.store-frame-system::after {
  left: -13px;
  right: -13px;
  height: 16px;
  top: -10px;
  border-radius: 10px;
  background: linear-gradient(180deg, transparent, rgba(74,222,128,.5), transparent);
  animation: store-system-scan 2.2s linear infinite;
}

.store-preview-avatar.store-frame-rose::before,
.store-avatar-frame.store-frame-rose::before {
  inset: -17px;
  border-radius: 999px;
  background:
    radial-gradient(ellipse at 25% 22%, rgba(251,113,133,.95) 0 8%, transparent 9%),
    radial-gradient(ellipse at 78% 16%, rgba(244,114,182,.85) 0 7%, transparent 8%),
    radial-gradient(ellipse at 76% 82%, rgba(251,113,133,.78) 0 8%, transparent 9%);
  filter: drop-shadow(0 0 8px rgba(251,113,133,.6));
  animation: store-frame-spin 9s linear infinite;
}

.store-preview-avatar.store-frame-rose .store-frame-deco.one,
.store-avatar-frame.store-frame-rose .store-frame-deco.one {
  right: -18px;
  top: 18px;
  width: 26px;
  height: 18px;
  border-radius: 70% 10% 70% 10%;
  background: rgba(251, 113, 133, .9);
  transform: rotate(-24deg);
  animation: store-aura-float 2.7s ease-in-out infinite;
}

.store-preview-avatar.store-frame-lightning::before,
.store-avatar-frame.store-frame-lightning::before {
  inset: -17px;
  background:
    linear-gradient(126deg, transparent 0 33%, rgba(186,230,253,.96) 34% 39%, rgba(59,130,246,.95) 40% 44%, transparent 45% 100%),
    linear-gradient(42deg, transparent 0 52%, rgba(125,211,252,.95) 53% 56%, transparent 57% 100%);
  filter: drop-shadow(0 0 9px rgba(125,211,252,.8));
  animation: store-frame-lightning-bolt 1.6s steps(2, end) infinite;
}

.store-preview-avatar.store-frame-lightning .store-frame-deco.one,
.store-avatar-frame.store-frame-lightning .store-frame-deco.one {
  left: -12px;
  bottom: -4px;
  width: 18px;
  height: 28px;
  clip-path: polygon(55% 0, 100% 0, 65% 42%, 100% 42%, 20% 100%, 42% 54%, 0 54%);
  background: #e0f2fe;
  filter: drop-shadow(0 0 8px rgba(125,211,252,.9));
}

.store-preview-avatar.store-frame-rapier::before,
.store-avatar-frame.store-frame-rapier::before {
  left: -18px;
  right: -18px;
  top: 50%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.96), rgba(56,189,248,.9), transparent);
  transform: rotate(-34deg);
  filter: drop-shadow(0 0 9px rgba(125,211,252,.82));
  animation: store-rapier-sweep 2.2s ease-in-out infinite;
}

.store-preview-avatar.store-frame-rapier::after,
.store-avatar-frame.store-frame-rapier::after {
  inset: -9px;
  border-radius: inherit;
  border: 1px solid rgba(226,246,255,.62);
}

.store-preview-avatar.store-frame-shadow-burst::before,
.store-avatar-frame.store-frame-shadow-burst::before {
  inset: -18px;
  border-radius: inherit;
  background:
    radial-gradient(circle at 18% 24%, rgba(168,85,247,.8), transparent 20%),
    radial-gradient(circle at 82% 72%, rgba(76,29,149,.86), transparent 26%),
    conic-gradient(from 20deg, transparent, rgba(192,132,252,.34), transparent 32%, rgba(88,28,135,.45), transparent 72%);
  filter: blur(.2px) drop-shadow(0 0 12px rgba(168,85,247,.65));
  animation: store-frame-spin 7.2s linear infinite;
}

.store-preview-avatar.store-frame-shadow-burst .store-frame-deco.one,
.store-avatar-frame.store-frame-shadow-burst .store-frame-deco.one {
  inset: -8px;
  border-radius: inherit;
  border: 1px solid rgba(216,180,254,.5);
  animation: store-shadow-pulse 1.9s ease-in-out infinite;
}

.store-preview-avatar.store-frame-floor-boss::before,
.store-avatar-frame.store-frame-floor-boss::before {
  inset: -16px;
  border-radius: 16px;
  border: 2px solid rgba(239,68,68,.72);
  background:
    linear-gradient(90deg, rgba(239,68,68,.34), transparent 30% 70%, rgba(239,68,68,.34)),
    repeating-linear-gradient(45deg, transparent 0 8px, rgba(251,191,36,.32) 8px 10px);
  animation: store-boss-warning 1.6s ease-in-out infinite;
}

.store-preview-avatar.store-frame-floor-boss::after,
.store-avatar-frame.store-frame-floor-boss::after {
  content: "!";
  right: -12px;
  top: -12px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #ef4444;
  color: white;
  font-weight: 950;
  box-shadow: 0 0 16px rgba(239,68,68,.7);
}

@keyframes store-frame-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.18); }
}

@keyframes store-frame-crystal-glint {
  0%, 100% { filter: brightness(1) saturate(1); }
  45% { filter: brightness(1.28) saturate(1.25); }
}

@keyframes store-frame-star-glow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(251,191,36,0)); }
  50% { filter: drop-shadow(0 0 8px rgba(251,191,36,.65)); }
}

@keyframes store-frame-knight-shine {
  0%, 100% { filter: brightness(1); }
  35% { filter: brightness(1.22); }
}

@keyframes store-frame-fracture-pulse {
  0%, 100% { filter: saturate(1); }
  50% { filter: saturate(1.45) contrast(1.08); }
}

@keyframes store-frame-fracture-swipe {
  0%, 100% { opacity: .78; transform: translate(0, 0) rotate(-8deg); }
  45% { opacity: 1; transform: translate(4px, -3px) rotate(-4deg); }
  52% { transform: translate(-2px, 1px) rotate(-10deg); }
}

@keyframes store-frame-jitter {
  0%, 100% { transform: translate(0, 0) rotate(-20deg); }
  50% { transform: translate(2px, -1px) rotate(-15deg); }
}

@keyframes store-frame-snow-glow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.16); }
}

@keyframes store-frame-snowfall {
  0% { transform: translateY(-7px) rotate(0deg); opacity: .72; }
  50% { opacity: 1; }
  100% { transform: translateY(9px) rotate(18deg); opacity: .72; }
}

@keyframes store-frame-spin {
  to { transform: rotate(360deg); }
}

@keyframes store-frame-duel-pulse {
  0%, 100% { filter: saturate(1) brightness(1); }
  50% { filter: saturate(1.35) brightness(1.16); }
}

@keyframes store-frame-system-glow {
  0%, 100% { filter: brightness(1) hue-rotate(0deg); }
  50% { filter: brightness(1.18) hue-rotate(8deg); }
}

@keyframes store-frame-rose-bloom {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.18) saturate(1.2); }
}

@keyframes store-frame-lightning-flash {
  0%, 78%, 100% { filter: brightness(1); }
  82%, 88% { filter: brightness(1.42) saturate(1.3); }
}

@keyframes store-frame-lightning-bolt {
  0%, 72%, 100% { opacity: .46; transform: translate(0, 0) rotate(0deg); }
  78%, 88% { opacity: 1; transform: translate(2px, -2px) rotate(2deg); }
}

@keyframes store-rapier-sweep {
  0%, 100% { opacity: .38; transform: translateX(-7px) rotate(-34deg); }
  46% { opacity: 1; transform: translateX(7px) rotate(-34deg); }
}

@keyframes store-shadow-pulse {
  0%, 100% { filter: brightness(1) saturate(1); opacity: .78; }
  50% { filter: brightness(1.22) saturate(1.35); opacity: 1; }
}

@keyframes store-boss-warning {
  0%, 100% { opacity: .68; filter: saturate(1); }
  50% { opacity: 1; filter: saturate(1.4) brightness(1.12); }
}

@keyframes store-aura-float {
  0%, 100% { transform: translate(0, 0); opacity: .72; }
  50% { transform: translate(-8px, 5px); opacity: 1; }
}

@keyframes store-rose-petal-drift {
  0%, 100% {
    transform: translate3d(-4px, 0, 0) scale(1);
    opacity: .72;
  }
  45% {
    transform: translate3d(7px, 4px, 0) scale(1.03);
    opacity: 1;
  }
  72% {
    transform: translate3d(2px, -3px, 0) scale(1.01);
    opacity: .86;
  }
}

@keyframes store-rose-banner-petals {
  0% {
    transform: translateX(-10px) rotate(0deg);
    opacity: .68;
  }
  45% {
    transform: translateX(8px) rotate(3deg);
    opacity: 1;
  }
  100% {
    transform: translateX(-10px) rotate(0deg);
    opacity: .68;
  }
}

@keyframes store-rain-slide {
  0% { transform: translateX(-24px); }
  100% { transform: translateX(28px); }
}

@keyframes store-system-scan {
  0% { transform: translateY(-18px); opacity: .3; }
  45% { opacity: .9; }
  100% { transform: translateY(58px); opacity: .3; }
}

.profile-hero[class*="store-banner-"] .profile-hero-content {
  position: relative;
  z-index: 3;
}

.profile-hero[class*="store-banner-"]::after {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.profile-hero.store-banner-rose::before {
  content: "";
  position: absolute;
  inset: 12px 18px;
  pointer-events: none;
  z-index: 2;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg opacity='.92'%3E%3Cellipse fill='%23ffe4e6' cx='50' cy='22' rx='13' ry='19'/%3E%3Cellipse fill='%23fb7185' cx='34' cy='39' rx='17' ry='13' transform='rotate(-32 34 39)'/%3E%3Cellipse fill='%23f472b6' cx='66' cy='39' rx='17' ry='13' transform='rotate(32 66 39)'/%3E%3Cellipse fill='%23fb7185' cx='42' cy='58' rx='15' ry='12' transform='rotate(24 42 58)'/%3E%3Cellipse fill='%23ffe4e6' cx='58' cy='58' rx='15' ry='12' transform='rotate(-24 58 58)'/%3E%3Ccircle fill='%23be123c' cx='50' cy='44' r='10'/%3E%3Cpath fill='%237f1d1d' opacity='.45' d='M50 48c-8 12-18 20-31 25 16-1 30-7 41-17z'/%3E%3C/g%3E%3C/svg%3E") 8% 26% / 58px 58px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg opacity='.86'%3E%3Cellipse fill='%23ffe4e6' cx='50' cy='22' rx='13' ry='19'/%3E%3Cellipse fill='%23fb7185' cx='34' cy='39' rx='17' ry='13' transform='rotate(-32 34 39)'/%3E%3Cellipse fill='%23f472b6' cx='66' cy='39' rx='17' ry='13' transform='rotate(32 66 39)'/%3E%3Cellipse fill='%23fb7185' cx='42' cy='58' rx='15' ry='12' transform='rotate(24 42 58)'/%3E%3Cellipse fill='%23ffe4e6' cx='58' cy='58' rx='15' ry='12' transform='rotate(-24 58 58)'/%3E%3Ccircle fill='%23be123c' cx='50' cy='44' r='10'/%3E%3C/g%3E%3C/svg%3E") 82% 22% / 48px 48px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg opacity='.72'%3E%3Cellipse fill='%23ffe4e6' cx='50' cy='22' rx='13' ry='19'/%3E%3Cellipse fill='%23fb7185' cx='34' cy='39' rx='17' ry='13' transform='rotate(-32 34 39)'/%3E%3Cellipse fill='%23f472b6' cx='66' cy='39' rx='17' ry='13' transform='rotate(32 66 39)'/%3E%3Cellipse fill='%23fb7185' cx='42' cy='58' rx='15' ry='12' transform='rotate(24 42 58)'/%3E%3Cellipse fill='%23ffe4e6' cx='58' cy='58' rx='15' ry='12' transform='rotate(-24 58 58)'/%3E%3Ccircle fill='%23be123c' cx='50' cy='44' r='10'/%3E%3C/g%3E%3C/svg%3E") 39% 82% / 38px 38px no-repeat;
  filter: drop-shadow(0 0 12px rgba(251,113,133,.68));
  mix-blend-mode: screen;
  animation: store-rose-banner-petals 8s ease-in-out infinite;
}

.profile-page .profile-hero[class*="store-banner-"]::after {
  display: block;
}

.profile-hero.store-banner-starburst::after {
  background:
    radial-gradient(circle at 12% 18%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 32%),
    radial-gradient(circle at 86% 22%, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 30%);
}

.profile-hero.store-banner-aincrad-sky::after {
  background:
    linear-gradient(165deg, rgba(56, 189, 248, .24), transparent 38%),
    radial-gradient(circle at 78% 18%, rgba(255,255,255,.22), transparent 22%),
    linear-gradient(90deg, transparent 0 16%, rgba(255,255,255,.18) 17% 18%, transparent 19% 100%);
}

.profile-hero.store-banner-crystal-rain::after {
  background:
    linear-gradient(110deg, transparent 0 18%, rgba(186,230,253,.25) 19% 20%, transparent 21% 42%, rgba(167,139,250,.2) 43% 44%, transparent 45% 100%),
    radial-gradient(circle at 80% 18%, rgba(103,232,249,.18), transparent 28%);
  animation: store-rain-slide 4.8s linear infinite;
}

.profile-hero.store-banner-rose::after {
  background:
    radial-gradient(ellipse at 12% 22%, rgba(251,113,133,.3) 0 7%, transparent 22%),
    radial-gradient(ellipse at 74% 21%, rgba(244,114,182,.26) 0 7%, transparent 22%),
    radial-gradient(ellipse at 50% 88%, rgba(255,228,230,.18), transparent 36%);
  box-shadow: none;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 14px rgba(251,113,133,.32));
  animation: store-rose-banner-petals 10s ease-in-out infinite;
}

.profile-hero.store-banner-system-grid::after {
  background:
    repeating-linear-gradient(90deg, rgba(74,222,128,.09) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(0deg, rgba(74,222,128,.08) 0 1px, transparent 1px 24px),
    linear-gradient(180deg, transparent, rgba(74,222,128,.13), transparent);
  animation: store-system-scan 4.2s linear infinite;
}

.profile-hero.store-banner-moonlit-duel::after {
  background:
    radial-gradient(circle at 78% 18%, rgba(226,246,255,.32), transparent 18%),
    linear-gradient(135deg, rgba(14,165,233,.2), transparent 42%),
    linear-gradient(90deg, transparent 0 18%, rgba(125,211,252,.2) 19% 20%, transparent 21% 100%);
  animation: store-aura-float 5s ease-in-out infinite;
}

.profile-hero.store-banner-boss-room::after {
  background:
    repeating-linear-gradient(90deg, rgba(248,113,113,.13) 0 2px, transparent 2px 34px),
    linear-gradient(135deg, rgba(127,29,29,.26), transparent 44%),
    radial-gradient(circle at 88% 20%, rgba(239,68,68,.24), transparent 24%);
  animation: store-boss-warning 2.1s ease-in-out infinite;
}

.profile-hero.store-banner-starlight-gate::after {
  background:
    radial-gradient(circle at 50% 44%, rgba(216,180,254,.28), transparent 30%),
    conic-gradient(from 180deg at 50% 45%, transparent, rgba(56,189,248,.16), rgba(216,180,254,.22), transparent 48%),
    radial-gradient(circle at 18% 20%, rgba(255,255,255,.22) 0 2px, transparent 3px),
    radial-gradient(circle at 82% 30%, rgba(255,255,255,.18) 0 2px, transparent 3px);
  animation: store-frame-spin 18s linear infinite;
}

@media (max-width: 640px) {
  .store-head,
  .store-hero,
  .store-card-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .store-earn-list {
    grid-template-columns: 1fr 1fr;
  }

  .store-points-pill {
    width: 100%;
    text-align: left;
  }
}

@media (max-width: 420px) {
  .store-earn-list {
    grid-template-columns: 1fr;
  }
}

/* Keep repeated feed rows light while the primary panels retain the glass treatment. */
.social-item,
.review-card {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

@supports (content-visibility: auto) {
  .social-item,
  .review-card {
    content-visibility: auto;
    contain-intrinsic-size: auto 190px;
  }

  .profile-update-row,
  .relation-card,
  .episode-card {
    content-visibility: auto;
    contain-intrinsic-size: auto 112px;
  }

  .media-card,
  .user-card,
  .user-list-card,
  .profile-shelf-card {
    content-visibility: auto;
    contain-intrinsic-size: auto 360px;
  }

  .schedule-card {
    content-visibility: auto;
    contain-intrinsic-size: auto 170px;
  }
}

/* Keep attachment painting contained without forcing GPU layers. */
.animated-media,
.klipy-card {
  contain: paint;
  isolation: isolate;
}

/* Animated images keep their normal paint path. Promoting every GIF to a
   separate GPU texture can flash black when several copies animate together. */
.animated-media img,
.klipy-card img {
  backface-visibility: visible;
}

@supports selector(.social-item:has(.animated-media)) {
  .social-item:has(.animated-media) {
    content-visibility: visible;
    contain: layout paint style;
  }
}

#klipy-modal,
.klipy-modal {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.klipy-modal {
  isolation: isolate;
  transform: translateZ(0);
}

.discover-page {
  display: grid;
  gap: 28px;
  min-width: 0;
}

.discover-page-head {
  margin-bottom: -4px;
}

.discover-spotlight {
  position: relative;
  min-width: 0;
  min-height: 390px;
  overflow: hidden;
  border: 1px solid rgb(var(--accent-rgb) / 0.28);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  isolation: isolate;
}

.discover-spotlight-stage {
  position: relative;
  min-height: 390px;
}

.discover-spotlight-slide {
  position: absolute;
  inset: 0;
  min-height: 390px;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.015);
  transition: opacity 520ms ease, transform 700ms ease, visibility 0s linear 700ms;
  isolation: isolate;
  pointer-events: none;
}

.discover-spotlight-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  transition-delay: 0s;
  pointer-events: auto;
}

.discover-spotlight-backdrop {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 26%;
  opacity: 0.58;
  filter: saturate(0.86) brightness(0.7);
  transform: scale(1.015);
}

.discover-spotlight-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(5, 9, 22, 0.96) 0%, rgba(5, 9, 22, 0.82) 47%, rgba(5, 9, 22, 0.36) 100%),
    linear-gradient(0deg, rgba(5, 9, 22, 0.78), transparent 58%);
}

.discover-spotlight-content {
  min-height: 390px;
  display: grid;
  grid-template-columns: 152px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 28px 96px 28px 28px;
}

.discover-spotlight-cover,
.discover-spotlight-cover.poster-placeholder {
  width: 152px;
  aspect-ratio: 2 / 3;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.34);
  border-radius: 10px;
  object-fit: cover;
  object-position: center top;
  background: var(--panel-3);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
}

.discover-spotlight-copy {
  min-width: 0;
  display: grid;
  gap: 11px;
  align-content: center;
}

.discover-eyebrow {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.discover-spotlight-copy h2,
.discover-section-head h2 {
  margin: 0;
}

.discover-spotlight-copy h2 {
  max-width: 680px;
  font-size: clamp(1.55rem, 2.5vw, 2.5rem);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.discover-spotlight-copy p {
  max-width: 680px;
  margin: 0;
  color: var(--soft);
  line-height: 1.55;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.discover-spotlight-meta,
.discover-spotlight-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.discover-spotlight-controls {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 5;
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 7px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.2);
  border-radius: 999px;
  background: rgb(var(--surface-solid-rgb) / 0.68);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

.discover-spotlight-controls .icon-button {
  width: 32px;
  height: 32px;
  min-height: 32px;
  border-radius: 50%;
  font-size: 1.35rem;
}

.discover-spotlight-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.discover-spotlight-dots button {
  width: 7px;
  height: 7px;
  min-height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(var(--accent-soft-rgb) / 0.34);
  transition: width 180ms ease, background-color 180ms ease;
}

.discover-spotlight-dots button.active {
  width: 22px;
  border-radius: 999px;
  background: var(--accent);
}

.discover-section,
.discover-genres,
.discover-moods {
  min-width: 0;
  display: grid;
  gap: 13px;
}

.discover-mood-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.discover-mood-card {
  position: relative;
  min-width: 0;
  min-height: 94px;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-content: center;
  padding: 15px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.18);
  border-radius: 8px;
  color: var(--text);
  background: rgb(var(--surface-2-rgb) / 0.66);
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.discover-mood-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, rgb(var(--accent-rgb)), rgb(var(--accent-soft-rgb)));
  opacity: 0.72;
  transform: scaleX(0.32);
  transform-origin: left;
  transition: transform 220ms ease, opacity 220ms ease;
}

.discover-mood-card:hover {
  transform: translateY(-2px);
  border-color: rgb(var(--accent-rgb) / 0.46);
  background: rgb(var(--accent-rgb) / 0.1);
}

.discover-mood-card:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.discover-mood-card > span {
  grid-row: 1 / -1;
  align-self: center;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
}

.discover-mood-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
}

.discover-mood-card small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discover-surprise {
  min-height: 36px;
  white-space: nowrap;
}

.discover-section-head {
  min-width: 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.discover-section-head > div:first-child {
  min-width: 0;
}

.discover-section-head h2 {
  font-size: 1.08rem;
}

.discover-section-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.discover-section-actions,
.discover-genre-tabs {
  flex: 0 0 auto;
  display: flex;
  gap: 7px;
  align-items: center;
}

.discover-view-all {
  margin-right: 4px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 850;
  white-space: nowrap;
}

.discover-rail {
  min-width: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(148px, 174px);
  grid-template-rows: 1fr;
  align-items: stretch;
  gap: 13px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 10px;
  scroll-padding-inline: 2px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.drag-scroll-row.can-drag {
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.drag-scroll-row.dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
}

.drag-scroll-row.can-drag img {
  -webkit-user-drag: none;
  user-select: none;
}

.discover-rail .media-card {
  width: auto;
  height: 100%;
  align-self: stretch;
  grid-template-rows: auto minmax(0, 1fr);
  scroll-snap-align: start;
  content-visibility: visible;
  contain-intrinsic-size: none;
}

.discover-rail .media-card > .poster,
.discover-rail .media-card > .poster-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
}

.discover-rail .media-card .card-body {
  height: 100%;
  align-content: start;
}

.discover-rail .media-card .meta-line,
.discover-rail .media-card .pill-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 6px;
}

.discover-rail .media-card .meta-line > span,
.discover-rail .media-card .pill-row > .pill {
  width: 100%;
  min-width: 0;
  min-height: 24px;
  padding-inline: 6px;
  justify-content: center;
  overflow: hidden;
  text-overflow: ellipsis;
}

.discover-rail .media-card .list-status-pill,
.discover-rail .media-card .recommendation-reason-pill,
.discover-rail .media-card .audience-match-pill {
  grid-column: 1 / -1;
}

.discover-rail-button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  font-size: 1.45rem;
  line-height: 1;
}

.discover-rail-button:disabled {
  opacity: 0.34;
}

.discover-genre-panel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 9px;
  padding: 16px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.16);
  border-radius: 12px;
  background: rgb(var(--surface-2-rgb) / 0.54);
}

.discover-genre-panel[hidden] {
  display: none;
}

@media (max-width: 620px) {
  .genres-page-head {
    align-items: stretch;
  }

  .genres-page-head .genre-type-tabs {
    width: 100%;
  }

  .genres-page-head .genre-type-tabs .tab {
    flex: 1;
  }

  .genre-selected-banner {
    min-height: 40px;
    padding: 7px 10px;
  }

  .genre-directory-grid,
  .discover-genre-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .genre-directory-link {
    min-height: 60px;
    padding: 9px;
  }

  .genre-directory-count {
    display: none;
  }
}

@media (max-width: 760px) {
  .discover-page {
    gap: 24px;
  }

  .discover-section-head {
    align-items: center;
  }

  .discover-section-head p {
    display: none;
  }

  .discover-mood-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .discover-rail-button {
    display: none;
  }
}

@media (max-width: 540px) {
  .discover-spotlight {
    min-height: 430px;
  }

  .discover-spotlight-stage,
  .discover-spotlight-slide {
    min-height: 430px;
  }

  .discover-spotlight-content {
    min-height: 430px;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 14px;
    align-items: end;
    padding: 18px 18px 76px;
  }

  .discover-spotlight-cover,
  .discover-spotlight-cover.poster-placeholder {
    width: 92px;
  }

  .discover-spotlight-copy h2 {
    font-size: 1.45rem;
  }

  .discover-spotlight-copy p {
    grid-column: 1 / -1;
    -webkit-line-clamp: 3;
  }

  .discover-spotlight-actions {
    grid-column: 1 / -1;
  }

  .discover-section-head {
    align-items: end;
  }

  .discover-section-actions {
    gap: 4px;
  }

  .discover-view-all {
    margin-right: 0;
  }

  .discover-rail {
    grid-auto-columns: minmax(138px, 42vw);
  }

  .discover-genres .discover-section-head {
    align-items: center;
  }

  .discover-mood-card {
    min-height: 82px;
    padding: 12px;
  }

  .discover-spotlight-controls {
    right: auto;
    left: 14px;
    bottom: 14px;
  }
}

@media (min-width: 1051px) and (max-width: 1240px) {
  body.home-route .home-main-column {
    padding-right: 348px;
  }

  body.home-route .mobile-chat-open,
  body.home-route .chat-close-button,
  body.home-route .chat-popup-backdrop {
    display: none !important;
  }

  body.home-route.chat-popup-open {
    overflow: auto;
  }

  body.home-route .chat-panel,
  body.home-route .chat-panel.open {
    position: fixed;
    top: 82px;
    right: 14px;
    bottom: 14px;
    z-index: 18;
    width: 324px;
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: none;
  }
}

@media (max-width: 1050px) {
  body.home-route .mobile-chat-open {
    display: none;
  }

  body.home-route:not(.chat-popup-open) .global-chat-fab {
    display: grid;
  }

  body.home-route.chat-popup-open .global-chat-fab {
    display: none;
  }
}

/* Dedicated staff subdomain and public team directory. */
.staff-shell.staff-guest-shell {
  min-height: 100dvh;
  grid-template-columns: minmax(0, 1fr);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(110deg, rgba(3, 9, 24, 0.96) 0%, rgba(5, 16, 38, 0.86) 45%, rgba(7, 29, 57, 0.5) 100%),
    radial-gradient(circle at 72% 15%, rgb(var(--accent-soft-rgb) / 0.28), transparent 29%),
    radial-gradient(ellipse at 76% 74%, rgba(60, 160, 220, 0.2), transparent 46%),
    linear-gradient(160deg, #071023 0%, #10294b 52%, #071226 100%);
}

.staff-shell.staff-guest-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 78% 28%, transparent 0 116px, rgb(var(--accent-soft-rgb) / 0.18) 118px 120px, transparent 122px 172px, rgb(var(--accent-rgb) / 0.1) 174px 176px, transparent 178px),
    linear-gradient(125deg, transparent 54%, rgb(var(--accent-rgb) / 0.11) 54.2%, transparent 54.8%),
    linear-gradient(35deg, transparent 66%, rgba(255, 255, 255, 0.045) 66.2%, transparent 66.8%);
}

.staff-shell.staff-guest-shell::after {
  content: "";
  position: fixed;
  right: clamp(-54px, 1vw, 18px);
  bottom: -4vh;
  z-index: -1;
  width: clamp(330px, 38vw, 610px);
  height: min(88vh, 850px);
  pointer-events: none;
  background: url("/static/asuna-sidebar.png?v=20260824-activity-chat-badges-3") right bottom / contain no-repeat;
  opacity: 0.82;
  filter:
    saturate(1.08)
    drop-shadow(0 26px 42px rgba(0, 0, 0, 0.56))
    drop-shadow(0 0 34px rgb(var(--accent-rgb) / 0.22));
}

.staff-shell.staff-guest-shell .main {
  min-height: 0;
  position: relative;
  z-index: 1;
}

.staff-shell.staff-guest-shell .staff-topbar,
.staff-shell.staff-guest-shell .staff-directory-hero,
.staff-shell.staff-guest-shell .staff-team-section,
.staff-shell.staff-guest-shell .staff-access-panel {
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
}

.staff-shell.staff-guest-shell .staff-directory-page {
  padding-bottom: 28px;
}

.staff-shell.staff-guest-shell .staff-directory-hero,
.staff-shell.staff-guest-shell .staff-team-section,
.staff-shell.staff-guest-shell .staff-access-panel {
  background:
    linear-gradient(145deg, rgb(var(--accent-rgb) / 0.1), rgba(5, 13, 31, 0.84)),
    rgba(5, 13, 31, 0.72);
}

.staff-shell.staff-guest-shell .staff-team-section {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.staff-sidebar .sidebar-menu-panel {
  --sidebar-art-top: 430px;
}

.staff-sidebar .sidebar-menu-panel::before {
  z-index: 2;
  opacity: 0.96;
  filter:
    saturate(1.22)
    contrast(1.08)
    brightness(1.07)
    drop-shadow(0 22px 25px rgba(0, 0, 0, 0.5))
    drop-shadow(0 0 7px rgba(255, 255, 255, 0.2))
    drop-shadow(0 0 22px rgb(var(--accent-rgb) / 0.4));
  transform: translateX(20px) scale(1.1);
}

.staff-sidebar .nav {
  z-index: 3;
}

.staff-portal-main-link {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 4;
  min-height: 54px;
  padding: 9px 11px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.38);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  background: linear-gradient(135deg, rgb(var(--accent-rgb) / 0.16), rgba(8, 14, 31, 0.86));
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  cursor: pointer;
  text-align: left;
}

.staff-portal-main-link:hover {
  border-color: rgb(var(--accent-soft-rgb) / 0.78);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.36), var(--glow);
  transform: translateY(-1px);
}

.staff-portal-main-link .nav-icon {
  flex: 0 0 auto;
}

.staff-portal-main-link .nav-label {
  display: grid;
  gap: 1px;
}

.staff-portal-main-link strong {
  font-size: 0.78rem;
}

.staff-portal-main-link small {
  color: var(--muted);
  font-size: 0.66rem;
}

.staff-topbar {
  background:
    linear-gradient(135deg, rgb(var(--accent-rgb) / 0.12), transparent 50%),
    rgba(8, 14, 31, 0.78);
}

.staff-topbar-heading {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.staff-topbar-heading strong {
  font-size: 0.98rem;
}

.staff-topbar-heading span {
  color: var(--muted);
  font-size: 0.78rem;
}

.staff-open-main {
  min-height: 38px;
  padding: 8px 13px;
}

.staff-directory-page {
  width: min(1280px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 22px;
}

.staff-directory-hero {
  min-height: 190px;
  padding: 30px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.48);
  border-radius: 8px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  background:
    radial-gradient(circle at 84% 18%, rgb(var(--accent-soft-rgb) / 0.24), transparent 34%),
    linear-gradient(135deg, rgb(var(--accent-rgb) / 0.14), rgba(7, 15, 34, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 24px 58px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.staff-directory-hero .eyebrow,
.staff-access-panel .eyebrow {
  color: rgb(var(--accent-soft-rgb));
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.staff-directory-hero h1,
.staff-access-panel h1 {
  margin: 7px 0 9px;
  font-size: 2rem;
  letter-spacing: 0;
}

.staff-directory-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--soft);
  line-height: 1.65;
}

.staff-directory-hero .actions {
  flex: 0 0 auto;
}

.staff-directory-hero .button {
  white-space: nowrap;
}

.staff-directory-summary {
  min-height: 76px;
  padding: 12px 18px;
  border-block: 1px solid rgb(var(--accent-soft-rgb) / 0.3);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: linear-gradient(90deg, transparent, rgb(var(--accent-rgb) / 0.07), transparent);
}

.staff-directory-summary > span {
  min-width: 0;
  display: grid;
  place-content: center;
  text-align: center;
}

.staff-directory-summary > span + span {
  border-left: 1px solid rgb(var(--accent-soft-rgb) / 0.2);
}

.staff-directory-summary strong {
  font-size: 1.35rem;
  color: rgb(var(--accent-soft-rgb));
}

.staff-directory-summary small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.staff-team-section {
  display: grid;
  gap: 14px;
}

.staff-team-section .section-heading {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.staff-team-section .section-heading h2 {
  margin: 0 0 4px;
  font-size: 1.2rem;
}

.staff-team-section .section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.staff-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  gap: 14px;
}

.staff-member-card {
  min-width: 0;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.34);
  border-radius: 8px;
  background: rgba(7, 16, 36, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 42px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.staff-member-card.role-admin {
  border-color: rgb(var(--accent-rgb) / 0.62);
}

.staff-member-banner {
  position: relative;
  height: 108px;
  overflow: hidden;
  background: linear-gradient(135deg, rgb(var(--accent-rgb) / 0.22), rgba(7, 15, 34, 0.94));
}

.staff-member-banner > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.staff-member-banner::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 54%;
  background: linear-gradient(transparent, rgba(7, 16, 36, 0.94));
  pointer-events: none;
}

.staff-member-banner-fallback {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 28%, rgb(var(--accent-soft-rgb) / 0.16) 49%, transparent 70%),
    radial-gradient(circle at 72% 20%, rgb(var(--accent-rgb) / 0.32), transparent 46%);
}

.staff-member-body {
  position: relative;
  min-width: 0;
  padding: 0 18px 16px;
}

.staff-member-avatar-link {
  position: absolute;
  top: -42px;
  left: 18px;
  z-index: 2;
  display: block;
  border-radius: 50%;
}

.staff-member-avatar {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 3px rgba(7, 16, 36, 0.96), 0 0 0 5px rgb(var(--accent-soft-rgb) / 0.55), 0 12px 28px rgba(0, 0, 0, 0.42);
}

.staff-member-identity {
  min-height: 76px;
  padding: 13px 0 10px 96px;
  display: grid;
  align-content: start;
  gap: 2px;
}

.staff-member-name-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.staff-member-name-row > a {
  min-width: 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 950;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.staff-member-name-row .role-pill,
.staff-member-name-row .store-profile-badge {
  font-size: 0.62rem;
}

.staff-member-identity > span,
.staff-member-identity > small {
  color: var(--muted);
  font-size: 0.72rem;
}

.staff-member-body > p {
  display: -webkit-box;
  min-height: 3.84em;
  margin: 2px 0 14px;
  overflow: hidden;
  color: var(--soft);
  line-height: 1.55;
  font-size: 0.82rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.staff-member-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid rgb(var(--accent-soft-rgb) / 0.18);
}

.staff-member-facts > span {
  min-width: 0;
  padding: 11px 7px;
  display: grid;
  gap: 2px;
  text-align: center;
}

.staff-member-facts > span + span {
  border-left: 1px solid rgb(var(--accent-soft-rgb) / 0.16);
}

.staff-member-facts strong {
  color: rgb(var(--accent-soft-rgb));
  font-size: 0.96rem;
}

.staff-member-facts small {
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.25;
}

.staff-member-footer {
  min-width: 0;
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.72rem;
}

.staff-member-footer a {
  flex: 0 0 auto;
  color: rgb(var(--accent-soft-rgb));
  font-weight: 850;
  text-decoration: none;
}

.staff-responsibilities {
  padding: 18px 0;
  border-block: 1px solid rgb(var(--accent-soft-rgb) / 0.24);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

.staff-responsibilities > div {
  min-width: 0;
  padding: 5px 22px;
  display: grid;
  gap: 5px;
}

.staff-responsibilities > div + div {
  border-left: 1px solid rgb(var(--accent-soft-rgb) / 0.2);
}

.staff-responsibilities strong {
  font-size: 0.86rem;
}

.staff-responsibilities span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.staff-access-page {
  min-height: calc(100dvh - var(--topbar-height) - 80px);
  display: grid;
  place-items: center;
}

.staff-access-panel {
  width: min(520px, 100%);
  padding: 34px;
  border: 1px solid rgb(var(--accent-soft-rgb) / 0.42);
  border-radius: 8px;
  background: linear-gradient(145deg, rgb(var(--accent-rgb) / 0.13), rgba(7, 15, 34, 0.86));
  box-shadow: var(--shadow);
  text-align: center;
}

.staff-access-panel > .nav-icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 14px;
  color: rgb(var(--accent-soft-rgb));
}

.staff-access-panel p {
  margin: 0 auto 22px;
  color: var(--muted);
  line-height: 1.6;
}

.staff-access-panel .actions {
  justify-content: center;
}

@media (min-width: 921px) {
  .staff-shell.staff-guest-shell .staff-topbar {
    left: 50% !important;
    right: auto !important;
    width: min(1280px, calc(100vw - (var(--page-pad-x) + var(--page-pad-x))));
    transform: translateX(-50%);
  }

  body.staff-route:not(.sidebar-collapsed):not(.sidebar-auto-collapsed) {
    --sidebar-width: 260px;
  }

  body.staff-route .staff-sidebar {
    grid-template-columns: minmax(0, 1fr);
  }

  body.staff-route .staff-sidebar > .sidebar-brand-card,
  body.staff-route .staff-sidebar > .sidebar-menu-panel {
    width: 100%;
    min-width: 0;
  }

  body:is(.sidebar-collapsed, .sidebar-auto-collapsed) .staff-portal-main-link {
    min-height: 48px;
    padding: 6px;
    justify-content: center;
    gap: 0;
  }
}

@media (max-width: 760px) {
  .staff-shell.staff-guest-shell::after {
    right: -92px;
    bottom: -4vh;
    width: min(92vw, 430px);
    height: 70vh;
    opacity: 0.34;
  }

  .staff-topbar-heading span,
  .staff-open-main {
    display: none;
  }

  .staff-directory-hero {
    min-height: 0;
    padding: 22px;
    align-items: start;
    flex-direction: column;
  }

  .staff-directory-hero h1 {
    font-size: 1.55rem;
  }

  .staff-directory-summary {
    padding-inline: 6px;
  }

  .staff-directory-summary strong {
    font-size: 1.12rem;
  }

  .staff-directory-summary small {
    font-size: 0.62rem;
  }

  .staff-responsibilities {
    grid-template-columns: 1fr;
  }

  .staff-responsibilities > div {
    padding: 13px 4px;
  }

  .staff-responsibilities > div + div {
    border-left: 0;
    border-top: 1px solid rgb(var(--accent-soft-rgb) / 0.2);
  }

  .staff-access-panel {
    padding: 26px 20px;
  }
}

@media (max-width: 920px) {
  body.staff-route .sidebar {
    padding-top: 0 !important;
  }

  body.staff-route .main {
    padding-top: 0;
  }

  body.staff-route .staff-topbar {
    position: relative !important;
    top: auto !important;
    right: auto;
    left: auto;
    z-index: 162;
    margin: 10px 16px 0 !important;
  }

  body.staff-route .content {
    padding-top: 16px;
  }

  .staff-topbar-nav-trigger {
    position: static;
    z-index: auto;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    box-shadow: none;
  }

  body.staff-route .mobile-nav-backdrop {
    z-index: 160;
  }

  body.staff-route .mobile-nav-popover {
    top: 150px;
    right: 16px;
    bottom: auto;
    z-index: 161;
    max-height: calc(100dvh - 166px);
  }
}

.admin-users {
  container-type: inline-size;
}

@container (max-width: 720px) {
  .admin-user-row {
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: start;
    gap: 10px 12px;
    padding: 12px;
  }

  .admin-user-row .mod-profile-avatar-link {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
  }

  .admin-user-row .mod-profile-summary {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    min-width: 0;
  }

  .admin-user-row .mod-profile-link,
  .admin-user-row .mod-profile-username {
    display: block;
    width: 100%;
    max-width: 100%;
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .admin-user-row .user-role-tools,
  .admin-user-row .user-moderation-actions {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: flex-start;
  }

  .admin-user-row .user-role-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .admin-user-row .user-role-tools .select {
    width: 100%;
    min-width: 0;
  }
}

/* User identities can appear in cards, feeds, popovers, maps, and staff tools. */
:is(
  .user-card .card-body,
  .profile-name-block,
  .profile-update-author > div,
  .social-body,
  .social-meta,
  .account-panel-user > div,
  .message-user-result > span,
  .message-thread-button > span,
  .user-map-card-copy,
  .staff-member-identity,
  .mod-profile-summary
) {
  min-width: 0;
  max-width: 100%;
}

:is(
  .user-card .media-title,
  .user-card .meta-line > *,
  .profile-name-block h1,
  .profile-name-block .meta-line > *,
  .profile-update-author > div > strong,
  .profile-update-author > div > span,
  .social-name,
  .social-meta > span,
  .account-name,
  .account-role,
  .user-map-card-copy strong,
  .user-map-card-copy small,
  .staff-member-identity > span,
  .staff-member-identity > small,
  .mod-profile-link,
  .mod-profile-username
) {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
}

@media (max-width: 560px) {
  :is(
    .user-card .meta-line,
    .profile-name-block .meta-line,
    .social-meta,
    .staff-member-name-row
  ) {
    min-width: 0;
    max-width: 100%;
    flex-wrap: wrap;
  }

  :is(
    .user-card .media-title,
    .profile-name-block h1,
    .profile-update-author > div > strong,
    .profile-update-author > div > span,
    .social-name,
    .social-meta > span,
    .staff-member-name-row > a,
    .staff-member-identity > span,
    .staff-member-identity > small,
    .mod-profile-link,
    .mod-profile-username
  ) {
    white-space: normal;
  }
}

@media (max-width: 460px) {
  body.staff-route .staff-topbar {
    margin-inline: 12px !important;
  }

  body.staff-route .mobile-nav-popover {
    top: 168px;
    right: 12px;
    width: min(330px, calc(100vw - 24px));
    max-height: calc(100dvh - 184px);
  }
}

/* Sponsor options keep the same reading width on desktop and small screens. */
#sponsor { grid-column: 1 / -1; }
#sponsor-plans { margin-top: 20px; }
#sponsor-currency { max-width: 220px; }
.sponsor-plans-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 16px 0; }
.sponsor-plan { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: rgb(var(--accent-rgb) / .05); }
.sponsor-plan h3, .sponsor-plan p { margin: 0; }
.sponsor-plan-price { font-size: 1.6rem; overflow-wrap: anywhere; }
.sponsor-plan .button { margin-top: auto; }
@media (max-width: 700px) { .sponsor-plans-grid { grid-template-columns: 1fr; } }

/* Profile role icons sit together beneath the display name. */
.admin-role-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 20px; height: 20px; color: #a78bfa; vertical-align: middle; }
.admin-role-icon svg { width: 18px; height: 18px; }

.profile-update-author > .activity-role-icons { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; margin-left: auto; }
.profile-update-author > .activity-role-icons:empty { display: none; }

.activity-role-icons .sponsor-role-badge { display: inline-flex; color: #f5b85b; }
.activity-role-icons .admin-role-icon { display: inline-flex; color: #a78bfa; }

.profile-update-author:has(> .activity-role-icons:not(:empty)) { grid-template-columns: 70px minmax(0, 1fr) auto; }
@media(max-width: 700px) { .profile-update-author:has(> .activity-role-icons:not(:empty)) { grid-template-columns: auto minmax(0, 1fr) auto; } }

/* Linked community badges stay compact in names, profiles and Activity. */
[data-badge-href] { cursor: pointer; border-radius: 5px; }
[data-badge-href]:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
[data-badge-href]:hover { filter: brightness(1.2); }
.moderator-role-icon, .activity-role-icons .moderator-role-icon { color: #4fd1b3; }
#sponsor { scroll-margin-top: 90px; }

.sponsor-popup { width: min(850px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow-y: auto; margin: auto; padding: 24px; color: var(--text, #e4eaf5); background: var(--panel, #10243b); border: 1px solid #396080; border-radius: 18px; }
.sponsor-popup::backdrop { background: #020914b8; backdrop-filter: blur(5px); }
body:has(#sponsor-popup[open]) { overflow: hidden; }
@media (max-width: 600px) { .sponsor-popup { padding: 18px; } .sponsor-popup .sponsor-plans-grid { grid-template-columns: 1fr; } }

.sponsor-access-card { display:flex; align-items:center; gap:18px; margin:20px 0; padding:22px; border:1px solid #e6b65b66; border-radius:16px; background:linear-gradient(120deg, #dba74723, #dba74708 75%); box-shadow:inset 0 1px 0 #ffe3a51c; }
.sponsor-access-emblem { display:grid; place-items:center; flex:0 0 62px; width:62px; height:62px; border-radius:18px; background:#edbc591a; border:1px solid #edbc5940; color:#f5b85b; }
.sponsor-access-emblem svg { width:34px; height:34px; filter:drop-shadow(0 3px 8px #eeb85130); }
.sponsor-access-copy { min-width:0; }
.sponsor-access-heading { display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.sponsor-access-heading strong { font-size:21px; color:#ffe0a0; line-height:1.3; }
.sponsor-access-active { display:inline-flex; padding:4px 9px; border-radius:999px; background:#52d6a51c; border:1px solid #52d6a540; color:#8de8c2; font-size:12px; font-weight:700; }
.sponsor-access-copy p { margin:8px 0 12px; color:var(--text); opacity:.85; font-size:14px; line-height:1.5; }
.sponsor-access-perks { display:flex; flex-wrap:wrap; gap:6px 14px; color:#e6c990; font-size:12px; }
.sponsor-access-perks span::before { content:"✓"; margin-right:5px; }
@media(max-width:540px) { .sponsor-access-card { align-items:flex-start; gap:12px; padding:16px; } .sponsor-access-emblem { flex-basis:42px; width:42px; height:42px; border-radius:12px; } .sponsor-access-emblem svg { width:25px; height:25px; } .sponsor-access-heading strong { font-size:18px; } }

/* Separate companion panel for referral rewards. */
.sponsor-popup { width:min(1180px, calc(100vw - 40px)); max-width:none; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; overflow:hidden; }
.sponsor-popup[open] { display:grid; grid-template-columns:minmax(0, 1fr) 330px; gap:18px; align-items:start; }
.sponsor-popup-main, .sponsor-referral-sidebar { min-width:0; max-height:calc(100dvh - 48px); overflow-y:auto; overscroll-behavior:contain; padding:24px; border:1px solid #396080; border-radius:18px; background:rgb(var(--surface-3-rgb) / .98); box-shadow:0 18px 55px #0005; }
.sponsor-referral-sidebar { padding:22px; border-color:#b68b444d; background:linear-gradient(150deg, #dba7470c, transparent 55%), rgb(var(--surface-3-rgb) / .98); font-size:13px; line-height:1.6; }
.sponsor-referral-sidebar h3 { margin:0 0 14px; font-size:19px; line-height:1.3; color:#ffe0a0; }
.sponsor-referral-sidebar p { margin:0 0 14px; }
.sponsor-referral-sidebar label { display:grid; gap:6px; margin:12px 0; font-size:12px; }
.sponsor-referral-sidebar .input { width:100%; min-width:0; font-size:12px; }
.sponsor-referral-sidebar .actions { display:grid; grid-template-columns:1fr; gap:8px; margin:16px 0; }
.sponsor-referral-sidebar .button { width:100%; white-space:normal; font-size:13px; }
@media(max-width:900px) {
  .sponsor-popup { width:calc(100vw - 24px); overflow-y:auto; }
  .sponsor-popup[open] { grid-template-columns:minmax(0, 1fr); gap:12px; }
  .sponsor-popup-main, .sponsor-referral-sidebar { max-height:none; overflow:visible; padding:20px; }
}
@media(max-width:540px) { .sponsor-popup-main, .sponsor-referral-sidebar { padding:16px; } }

.progress-undo-toast { position:fixed; z-index:2147483647; bottom:28px; left:50%; transform:translateX(-50%); display:flex; align-items:center; gap:14px; width:max-content; max-width:calc(100vw - 32px); padding:12px 16px; border:1px solid #55b7db77; border-radius:14px; background:#10263b; color:#f7f8ff; box-shadow:0 12px 40px #0006; }
.progress-undo-toast span { min-width:0; font-size:14px; }
@media(max-width:600px) { .progress-undo-toast { bottom:80px; gap:8px; } }

.progress-undo-tray { position:fixed; z-index:2147483647; bottom:28px; left:50%; transform:translateX(-50%); display:grid; gap:8px; width:max-content; max-width:calc(100vw - 32px); }
.progress-undo-tray .progress-undo-toast { position:static; transform:none; max-width:100%; width:auto; }
@media(max-width:600px) { .progress-undo-tray { bottom:80px; } }

/* Backup tools and touch-friendly tracking. */
.backup-tools { display:grid; gap:12px; margin-block:16px; }
.backup-tools .actions { flex-wrap:wrap; gap:10px; }
.drive-backup-card { border-top:1px solid #7293ad44; padding-top:16px; }
.search-empty { grid-column:1/-1; }
.search-title-suggestions { display:grid; gap:8px; margin-block:12px 20px; }
.search-title-suggestions a { white-space:normal; overflow-wrap:anywhere; max-width:100%; display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-start; }
.search-title-suggestions small { opacity:.75; }
.progress-stepper { display:grid; grid-template-columns:44px minmax(0,1fr) 44px; gap:8px; }
.progress-stepper .input { min-width:0; text-align:center; }
.progress-step { min-height:44px; padding:0; font-size:22px; touch-action:manipulation; }
@media(max-width:600px) {
  #list-form .input, #list-form .select, #list-form .textarea { font-size:16px; min-height:44px; }
  #list-form .two-col, #list-form .three-col { grid-template-columns:minmax(0,1fr); }
  #list-form button[type=submit] { min-height:48px; }
  .continue-plus, .episode-number-tile, [data-episode-watched], [data-chapter-read] { min-width:44px; min-height:44px; touch-action:manipulation; }
  .progress-undo-tray { bottom:calc(80px + env(safe-area-inset-bottom)); width:calc(100vw - 24px); max-height:35dvh; overflow-y:auto; }
  .progress-undo-toast { padding:10px 12px; }
  .progress-undo-toast .button { flex-shrink:0; min-width:64px; min-height:44px; }
  .backup-tools .actions > .button { min-height:44px; flex:1 1 140px; }
}

/* Keep the add-to-list card compact and numeric controls inside their column. */
.untracked-panel { align-self: start; }
.untracked-inline { flex-wrap: wrap; }
.tracking-panel .progress-stepper { min-width: 0; }
.tracking-panel .progress-step { min-width: 44px; min-height: 44px; padding: 0; }

.stack:has(> .tracking-panel) { align-content: start; }

.progress-undo-toast { flex-wrap:wrap; }
.progress-undo-toast > span { flex:1 1 160px; }

.episode-detail-footer { display:flex; justify-content:flex-start; margin-top:18px; }
.episode-suggest-inline { scroll-margin-top:16px; }

.component-history { margin-top:16px; padding-top:14px; border-top:1px solid var(--line); }
.component-history .status-availability-track { margin:12px 0 6px; gap:3px; }
.component-history .status-availability-day { min-width:0; height:24px; }
.component-history details { margin-top:12px; }
.component-history summary { cursor:pointer; color:var(--accent); }
.component-history p { font-size:12px; line-height:1.6; }
.component-history > small { color:var(--muted); }

/* Readable chat messages, including long pasted links. */
.chat-item .social-body > p { margin: 8px 0 10px; line-height: 1.6; }
.social-body .social-text-link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.social-body .social-text-link:hover { text-decoration-thickness: 2px; }
.social-body .social-text-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.social-inline-image { display: block; max-width: 100%; max-height: 420px; width: auto; height: auto; object-fit: contain; border-radius: 10px; margin: 8px 0; }
.social-inline-preview { padding: 12px; border: 1px solid var(--border); border-radius: 10px; max-height: 340px; overflow: auto; }
.social-inline-preview[hidden] { display: none; }
.social-inline-preview > small { display: block; margin-bottom: 8px; color: var(--muted); }

/* Shared links in announcements, reviews, bios and other rich text. */
.social-text-link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.social-text-link:hover { text-decoration-thickness: 2px; }
.social-text-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.announcement-popup-modal { display: flex; flex-direction: column; max-height: 85dvh; }
.announcement-popup-body { overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
.unread-announcement + .unread-announcement { border-top: 1px solid var(--border); padding-top: 20px; margin-top: 20px; }
.unread-announcement h3 { margin: 8px 0 12px; }
.announcement-popup-modal > .announcement-popup-actions { flex-shrink: 0; padding: 16px 20px; flex-wrap: wrap; }

.announcement-author, .announcement-author-line { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; vertical-align: middle; }
.announcement-author .admin-role-icon { flex-shrink: 0; }
.announcement-site-label { font-size: 0.75rem; color: var(--muted); font-weight: normal; }

/* Keep dialogs below the fixed navigation, including short mobile screens. */
#announcement-popup, #activity-comments-modal {
  box-sizing: border-box; padding: calc(var(--site-topbar-space, 82px) + 12px) 12px max(12px, env(safe-area-inset-bottom));
  align-items: flex-start; overflow: hidden;
}
#announcement-popup .announcement-popup-modal, #activity-comments-modal .comments-modal {
  max-height: calc(100dvh - var(--site-topbar-space, 82px) - 32px - env(safe-area-inset-bottom));
  margin: 0 auto; display: flex; flex-direction: column; min-height: 0;
}
#activity-comments-modal .comments-modal { width: min(1000px, 100%); }
#activity-comments-modal .comments-modal-body { overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
#activity-comments-modal .modal-head, #announcement-popup .modal-head { flex-shrink: 0; }
#activity-comments-modal .social-inline-image { max-height: 60dvh; }
@media (prefers-reduced-motion: no-preference) {
  #activity-comments-modal:not([hidden]) .comments-modal, #announcement-popup .announcement-popup-modal { animation: dialog-arrive 160ms ease-out; }
  @keyframes dialog-arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
}

/* All standard dialogs share the measured navigation clearance, at every viewport size. */
:is(.modal-backdrop, .episode-detail-backdrop) {
  --dialog-top: calc(var(--site-topbar-space, 112px) + 12px);
  --dialog-bottom: max(12px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  padding: var(--dialog-top) 12px var(--dialog-bottom) !important;
  overflow: hidden;
}
:is(.modal-backdrop, .episode-detail-backdrop) > :is(.modal, .episode-detail-panel) {
  max-height: calc(100dvh - var(--dialog-top) - var(--dialog-bottom)) !important;
  min-height: 0;
  min-width: 0;
}
.modal-backdrop > .modal > :is(.modal-head, .modal-header) { flex-shrink: 0; }

.playback-tools { display:flex; flex-wrap:wrap; gap:12px; margin-bottom:16px; }
.playback-tools > .input { flex:1 1 260px; }
.playback-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,440px),1fr)); gap:16px; margin-bottom:24px; }
.playback-card { display:grid; grid-template-columns:110px minmax(0,1fr); gap:16px; }
.playback-card .poster { width:110px; height:160px; object-fit:cover; border-radius:8px; }
.playback-card progress { width:100%; accent-color:var(--accent); }
.playback-card p { color:var(--muted); }
.playback-card strong { overflow-wrap:anywhere; }
@media(max-width:480px){.playback-card{grid-template-columns:78px minmax(0,1fr);gap:10px}.playback-card .poster{width:78px;height:116px}}

/* Playback manager: readable poster cards and a compact manual editor. */
.playback-heading { align-items:center; gap:16px; }
.playback-eyebrow { display:block; font-size:11px; letter-spacing:.14em; color:var(--accent); margin-bottom:8px; }
.playback-summary { display:flex; flex-wrap:wrap; gap:12px 28px; margin:0 0 22px; color:var(--muted); }
.playback-summary strong { color:var(--text); font-size:21px; margin-right:5px; }
.playback-tools { padding:18px; align-items:center; border-radius:16px; }
.playback-tools .select { flex:0 1 160px; min-width:140px; }
.playback-bulk-actions { flex-basis:100%; border-top:1px solid var(--line); padding-top:14px; }
#playback-selected-count { margin-right:auto; color:var(--muted); font-size:13px; }
.playback-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr)); }
.playback-card { padding:18px; border-radius:16px; gap:18px; align-items:start; background:linear-gradient(135deg,rgb(var(--accent-rgb) / .06),transparent),var(--panel); }
.playback-card.is-selected { border-color:var(--accent); box-shadow:0 0 0 1px var(--accent); }
.playback-cover .poster { height:165px; border-radius:10px; }
.playback-card-heading { display:flex; align-items:start; gap:10px; justify-content:space-between; }
.playback-card-heading a { color:var(--text); text-decoration:none; }
.playback-card h2 { margin:0; font-size:17px; line-height:1.35; }
.playback-card input[type=checkbox] { width:18px; height:18px; accent-color:var(--accent); flex-shrink:0; }
.playback-card .playback-episode { margin:5px 0 10px; font-size:13px; }
.playback-tags { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:16px; }
.playback-tags span { padding:4px 8px; border-radius:6px; background:rgb(var(--accent-rgb) / .10); color:var(--muted); font-size:11px; text-transform:capitalize; overflow-wrap:anywhere; }
.playback-progress-label,.playback-time { display:flex; justify-content:space-between; gap:8px; font-size:12px; color:var(--muted); }
.playback-progress-label strong { color:var(--accent); }
.playback-card progress { display:block; height:7px; margin:7px 0; border:0; border-radius:99px; overflow:hidden; background:var(--line); }
.playback-card progress::-webkit-progress-bar { background:var(--line);border-radius:99px; }
.playback-card progress::-webkit-progress-value { background:var(--accent);border-radius:99px; }
.playback-card progress::-moz-progress-bar { background:var(--accent); }
.playback-card .actions { margin-top:16px; }
.playback-card .actions .button { flex:1 1 100px; min-height:38px; }
.playback-manual-editor { margin-top:24px; border-radius:16px; scroll-margin-top:var(--site-topbar-space,130px); }
.playback-manual-editor summary { display:flex; justify-content:space-between; align-items:center; gap:16px; cursor:pointer; list-style:none; }
.playback-manual-editor summary::-webkit-details-marker { display:none; }
.playback-manual-editor summary small { display:block; color:var(--muted); margin-top:5px; }
.playback-manual-editor[open] summary { margin-bottom:20px; padding-bottom:16px; border-bottom:1px solid var(--line); }
#playback-manual label { display:grid; gap:7px; font-size:13px; color:var(--muted); }
#playback-title-results { display:flex; flex-wrap:wrap; gap:8px; }
.playback-apps { margin-top:18px; border-radius:16px; color:var(--muted); }
.playback-apps h2 { font-size:16px; color:var(--text); }
.playback-empty { grid-column:1/-1; text-align:center; padding:40px 20px; border-style:dashed; }
.playback-empty > span { display:block; color:var(--accent); font-size:40px; }
.playback-empty h2 { font-size:19px; }
@media(max-width:600px) {
 .playback-heading { align-items:start;flex-direction:column; }
 .playback-tools .select { flex:1 1 120px; }
 .playback-bulk-actions .button { flex:1 1 140px; }
 #playback-selected-count { flex-basis:100%; }
 .playback-card { padding:14px;gap:12px;grid-template-columns:80px minmax(0,1fr); }
 .playback-cover .poster { width:80px;height:120px; }
 .playback-card h2 { font-size:15px; }
 #playback-manual .three-col { grid-template-columns:1fr; }
}

.playback-filter { display:grid; gap:6px; color:var(--muted); font-size:12px; flex:1 1 140px; }
.playback-tools > .input { min-height:46px; }
.playback-filter .select { width:100%; }
.playback-result-count { flex-basis:100%; font-size:13px; color:var(--muted); }
.playback-card .playback-time { align-items:baseline; margin-top:10px; }
.playback-time strong { font-size:22px; font-variant-numeric:tabular-nums; color:var(--text); }
.playback-card progress { height:10px; }
.playback-card .actions { gap:8px; }
.playback-card .actions .button { min-height:42px; }
.playback-card .playback-episode { font-size:15px; color:var(--text); }
.playback-tags span:first-child { color:var(--accent); font-weight:600; }
.playback-card-content { min-width:0; }
.playback-manual-editor .form-grid { max-width:850px; }
@media(min-width:1200px){.playback-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.playback-card{grid-template-columns:130px minmax(0,1fr)}.playback-cover .poster{width:130px;height:190px}}

/* Compact playback toolbar; bulk controls expand only when needed. */
.playback-tools { gap:8px; padding:10px 12px; border-radius:12px; }
.playback-tools > .input { flex:1 1 220px; min-height:38px; height:38px; font-size:13px; }
.playback-filter { display:flex; align-items:center; gap:5px; flex:0 1 auto; padding:0 8px; border:1px solid var(--line); border-radius:9px; background:var(--panel); }
.playback-filter > span { font-size:11px; color:var(--muted); }
.playback-tools .playback-filter .select { min-width:0; width:auto; height:36px; min-height:36px; flex:0 1 auto; border:0; background:transparent; padding-left:4px; font-size:13px; }
.playback-tools > .button { min-height:36px; padding:7px 10px; font-size:12px; }
.playback-result-count { flex:0 1 auto; font-size:12px; margin-right:auto; }
.playback-bulk-menu { position:relative; margin-left:auto; }
.playback-bulk-menu summary { display:flex; align-items:center; gap:8px; cursor:pointer; padding:7px 10px; border:1px solid var(--line); border-radius:8px; font-size:12px; list-style:none; }
.playback-bulk-menu summary::-webkit-details-marker { display:none; }
.playback-bulk-menu summary::after { content:'⌄'; }
.playback-bulk-menu[open] summary::after { content:'⌃'; }
.playback-bulk-menu #playback-selected-count { margin:0; font-size:11px; }
.playback-bulk-menu .playback-bulk-actions { position:absolute; right:0; top:calc(100% + 8px); z-index:20; width:min(340px,calc(100vw - 48px)); display:grid; grid-template-columns:1fr 1fr; padding:12px; background:var(--panel); border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow); }
.playback-bulk-menu .button { min-height:38px; font-size:12px; }
@media(max-width:600px){
 .playback-tools > .input { flex-basis:100%; }
 .playback-tools .playback-filter { flex:1 1 auto; padding:0 6px; }
 .playback-filter > span { position:absolute; width:1px;height:1px;overflow:hidden;clip-path:inset(50%); }
 .playback-tools .playback-filter .select { width:100%; font-size:12px; }
 .playback-result-count { flex:1 1 auto; }
 .playback-bulk-menu .playback-bulk-actions .button { min-width:0; }
}

.playback-live-status { color:var(--muted); font-size:12px; }

.playback-episode-title { display:block; font-size:13px; color:var(--muted); margin-top:4px; }
.playback-episode-image { display:block; width:100%; max-height:145px; aspect-ratio:16/9; object-fit:cover; border-radius:8px; margin:10px 0; }

/* Compact playback cards with uncropped episode previews beside the details. */
.playback-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,390px),1fr)); gap:12px; }
.playback-card { grid-template-columns:112px minmax(0,1fr); padding:12px; gap:12px; border-radius:12px; }
.playback-cover { display:flex; flex-direction:column; align-items:center; gap:8px; min-width:0; }
.playback-card .playback-cover .poster { width:74px; height:108px; border-radius:7px; }
.playback-card .playback-episode-image { width:100%;height:auto;max-height:none;aspect-ratio:16/9;object-fit:contain;background:rgb(0 0 0 / .2);margin:0;border-radius:6px; }
.playback-card h2 { font-size:15px; }
.playback-card .playback-episode { font-size:13px;margin:4px 0 7px; }
.playback-episode-title { font-size:12px;margin-top:3px; }
.playback-tags { margin-bottom:8px;gap:4px; }
.playback-tags span { padding:3px 6px;font-size:10px; }
.playback-card .playback-time { margin-top:6px;font-size:11px; }
.playback-time strong { font-size:18px; }
.playback-card .actions { margin-top:10px;gap:5px; }
.playback-card .actions .button { min-height:34px;padding:6px 8px;font-size:11px;flex:1 1 85px; }
@media(max-width:480px){.playback-card{grid-template-columns:88px minmax(0,1fr);gap:10px}.playback-card .playback-cover .poster{width:64px;height:94px}.playback-card .actions .button{min-height:40px}.playback-time{flex-wrap:wrap}}

/* Keep sparse playback grids compact instead of stretching a card across the page. */
.playback-grid { grid-template-columns:repeat(auto-fill,minmax(min(100%,430px),min(100%,540px))); justify-content:start; align-items:start; }
.playback-card { grid-template-columns:144px minmax(0,1fr); align-self:start; align-items:start; padding:12px; gap:12px; }
.playback-card .playback-cover { position:relative; display:block; width:144px; height:104px; margin-top:2px; border-radius:9px; background:var(--panel); overflow:hidden; }
.playback-card .playback-cover .playback-episode-image { position:absolute; inset:0; width:100%; height:100%; aspect-ratio:auto; object-fit:contain; border-radius:0; }
.playback-card .playback-cover .poster { position:absolute; z-index:1; bottom:6px; left:6px; width:35px; height:51px; border:2px solid var(--panel); border-radius:5px; box-shadow:0 2px 8px #0008; }
.playback-card .playback-cover:not(:has(.playback-episode-image)) { width:76px;height:112px;margin:auto; }
.playback-card .playback-cover:not(:has(.playback-episode-image)) .poster { position:static;width:76px;height:112px;border:0; }
.playback-card h2 { font-size:15px; line-height:1.3; display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden; }
.playback-card .playback-episode { margin:4px 0 6px; }
.playback-card .playback-episode-title { display:inline; margin:0; }
.playback-episode-title::before { content:' · '; }
.playback-card .playback-tags { margin-bottom:6px; }
.playback-card .playback-time strong { font-size:16px; }
.playback-card .actions { margin-top:8px;flex-wrap:nowrap; }
.playback-card .actions .button { flex:0 1 auto; min-width:0;min-height:32px;padding:5px 8px;font-size:11px;white-space:nowrap; }
@media(max-width:600px) {
 .playback-grid{grid-template-columns:minmax(0,1fr)}
 .playback-card{grid-template-columns:100px minmax(0,1fr);gap:10px}
 .playback-card .playback-cover{width:100px;height:78px}
 .playback-card .actions{flex-wrap:wrap}
 .playback-card .actions .button{min-height:38px;flex:1 1 auto}
}

/* Fill the episode preview without letterboxing. */
.playback-card .playback-cover .playback-episode-image { object-fit:cover; object-position:center; }

.drop-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr));gap:18px;align-items:start}
.drop-card{border-radius:14px;padding:18px}.drop-heading{display:flex;gap:14px;margin-bottom:18px}.drop-heading .poster{width:66px;height:96px;object-fit:cover;border-radius:7px}.drop-heading h2{font-size:18px;margin:0 0 8px}.drop-heading p{color:var(--muted);font-size:13px}
.drop-card .form-grid label{display:grid;gap:7px;font-size:13px}.drop-reasons{border:1px solid var(--line);border-radius:10px;padding:12px;display:flex;flex-wrap:wrap;gap:8px}.drop-reasons legend{padding:0 5px;color:var(--muted);font-size:13px}.drop-card .drop-reasons label{display:flex;align-items:center;gap:6px;padding:6px 8px;border-radius:7px;background:rgb(var(--accent-rgb)/.08)}.drop-reasons input{accent-color:var(--accent)}
@media(max-width:500px){.drop-card .two-col{grid-template-columns:1fr}}

.drop-list-details { padding: 12px 16px; border-top: 1px solid var(--border); }
.drop-list-details summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.drop-list-details[open] .form-grid { margin-top: 16px; }
.dropped-list-entry { min-width: 0; }

/* Activity grids must size cards to the feed, including beside desktop chat. */
.activity-list,
.profile-activity-list {
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  min-width: 0;
}
.profile-update-row {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}
.profile-update-main {
  box-sizing: border-box;
  grid-template-columns: minmax(0, .78fr) 96px minmax(0, 1.35fr) auto;
}
.profile-update-copy,
.profile-update-author > div {
  overflow-wrap: anywhere;
}
.profile-update-actions { flex-wrap: wrap; }
@container (max-width: 780px) {
  .profile-update-main { grid-template-columns: 76px minmax(0, 1fr) auto; }
}
@container (max-width: 500px) {
  .profile-update-main { grid-template-columns: 72px minmax(0, 1fr); }
}

.apps-developer-panel { display:flex; align-items:center; justify-content:space-between; gap:32px; margin-top:28px; padding:clamp(24px,4vw,48px); border:1px solid rgb(var(--accent-rgb) / .3); border-radius:24px; background:linear-gradient(120deg,rgb(var(--accent-rgb) / .14),rgb(var(--surface-solid-rgb) / .85)); }
.apps-developer-copy { max-width:680px; min-width:0; }
.apps-developer-copy h2 { font-size:clamp(1.5rem,3vw,2.2rem); margin:14px 0 12px; }
.apps-developer-copy p { color:var(--soft); line-height:1.7; margin:0; }
.apps-developer-links { display:flex; flex-direction:column; gap:10px; flex-shrink:0; }
@media(max-width:800px) { .apps-developer-panel { flex-direction:column; align-items:stretch; gap:22px; } .apps-developer-links { flex-direction:row; flex-wrap:wrap; } }

.profile-watching-now { background:linear-gradient(120deg,rgb(var(--accent-rgb) / .14),rgb(var(--surface-solid-rgb) / .8)); }
.profile-watching-now[hidden] { display:none; }
.watching-live { display:inline-flex; align-items:center; gap:7px; font-size:11px; font-weight:800; letter-spacing:1px; color:var(--accent); }
.watching-live i { width:7px; height:7px; background:currentColor; border-radius:50%; box-shadow:0 0 12px currentColor; }
.watching-now-card { display:flex; align-items:center; gap:20px; color:inherit; }
.watching-now-image { width:160px; height:100px; object-fit:cover; border-radius:12px; flex-shrink:0; }
.watching-now-copy { flex:1; min-width:0; overflow-wrap:anywhere; }
.watching-now-copy strong { font-size:1.2rem; }
.watching-now-copy p { color:var(--soft); margin:6px 0 12px; }
.watching-now-copy small { color:var(--muted); }
.watching-now-track { height:6px; background:rgb(var(--accent-rgb) / .14); border-radius:6px; overflow:hidden; margin-bottom:9px; }
.watching-now-track span { display:block; height:100%; background:var(--accent); border-radius:inherit; transition:width .3s ease; }
@media(max-width:600px) { .watching-now-card { gap:12px; } .watching-now-image { width:90px; height:80px; } .watching-now-copy strong { font-size:1rem; } }

.profile-playback-tools { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin-bottom:20px; }
.profile-playback-tools .input { flex:1; min-width:180px; }
.profile-playback-tools .select { width:auto; }
.profile-playback-list { display:grid; gap:12px; }
.profile-playback-row { display:flex; align-items:center; gap:20px; padding:18px; border:1px solid var(--line); border-radius:16px; color:inherit; background:rgb(var(--accent-rgb) / .04); }
.profile-playback-row:hover { border-color:var(--accent); }
.profile-playback-image { width:140px; height:90px; object-fit:cover; border-radius:10px; flex-shrink:0; }
.profile-playback-meta { display:grid; gap:10px; text-align:right; color:var(--muted); }
@media(max-width:650px) { .profile-playback-row { flex-wrap:wrap; gap:12px; padding:12px; } .profile-playback-image { width:84px; height:72px; } .profile-playback-meta { display:flex; align-items:center; width:100%; justify-content:space-between; } }

.profile-hero-content .profile-watching-now { width:min(100%,620px); margin:16px 0 4px; padding:14px 16px; border-radius:16px; }
.profile-watching-now .section-title { margin-bottom:10px; gap:10px; flex-wrap:wrap; }
.profile-watching-now .section-title h2 { font-size:.95rem; }
.profile-watching-now .section-title a { font-size:.78rem; }
.profile-watching-now .watching-now-card { gap:12px; }
.profile-watching-now .watching-now-image { width:88px; height:64px; border-radius:8px; }
.profile-watching-now .watching-now-copy strong { font-size:1rem; }
.profile-watching-now .watching-now-copy p { font-size:.82rem; margin:4px 0 8px; }
.profile-watching-now .watching-now-copy small { font-size:.75rem; }
.profile-watching-now .watching-now-track { height:4px; margin-bottom:6px; }

.profile-navigation-live-row { display:flex; align-items:center; gap:18px; width:100%; min-width:0; margin-top:14px; }
.profile-navigation-live-row > .profile-nav-strip { flex:1; min-width:0; margin:0; }
.profile-navigation-live-row > .profile-watching-now { flex:0 0 320px; width:320px; max-width:100%; margin:0; padding:10px 12px; }
.profile-navigation-live-row .profile-watching-now .section-title { margin-bottom:6px; }
.profile-navigation-live-row .watching-now-image { width:58px; height:48px; }
.profile-navigation-live-row .watching-now-copy strong { display:block; font-size:.85rem; line-height:1.25; }
.profile-navigation-live-row .watching-now-copy p { font-size:.72rem; margin:3px 0 5px; }
.profile-navigation-live-row .watching-now-copy small { display:block; font-size:.68rem; }
@media(max-width:1000px) { .profile-navigation-live-row { flex-wrap:wrap; } .profile-navigation-live-row > .profile-nav-strip { flex-basis:100%; } .profile-navigation-live-row > .profile-watching-now { flex-basis:320px; } }

.profile-navigation-live-row { display:grid; grid-template-columns:320px minmax(0,1fr) 320px; align-items:center; gap:16px; }
.profile-navigation-live-row > .profile-watching-now { grid-column:1; grid-row:1; justify-self:start; }
.profile-navigation-live-row > .profile-nav-strip { grid-column:2; grid-row:1; justify-content:center; width:100%; }
@media(max-width:1200px) {
  .profile-navigation-live-row { grid-template-columns:minmax(0,1fr); }
  .profile-navigation-live-row > .profile-watching-now { grid-column:1; grid-row:1; }
  .profile-navigation-live-row > .profile-nav-strip { grid-column:1; grid-row:2; justify-content:center; }
}

.profile-navigation-live-row { grid-template-columns:230px minmax(0,1fr) 230px; gap:12px; }
.profile-navigation-live-row > .profile-watching-now { width:230px; flex-basis:230px; padding:8px 10px; }
.profile-navigation-live-row > .profile-nav-strip { display:flex; flex-wrap:nowrap; overflow-x:auto; overflow-y:hidden; justify-content:safe center; border-radius:999px; }
.profile-navigation-live-row > .profile-nav-strip > a,
.profile-navigation-live-row > .profile-nav-strip > button { flex:0 0 auto; white-space:nowrap; }
.profile-navigation-live-row .profile-watching-now .section-title { gap:6px; }
.profile-navigation-live-row .profile-watching-now .section-title h2 { font-size:.78rem; }
.profile-navigation-live-row .profile-watching-now .section-title a { font-size:.65rem; }
.profile-navigation-live-row .profile-watching-now .watching-live { font-size:9px; letter-spacing:.5px; }
.profile-navigation-live-row .watching-now-image { width:42px; height:42px; }
.profile-navigation-live-row .watching-now-card { gap:8px; }
.profile-navigation-live-row .watching-now-copy strong { font-size:.78rem; }
.profile-navigation-live-row .watching-now-copy p { font-size:.68rem; }
@media(max-width:1200px) { .profile-navigation-live-row { grid-template-columns:minmax(0,1fr); } }

.public-playback-hero { display:flex; justify-content:space-between; align-items:center; gap:28px; padding:clamp(24px,4vw,44px); margin-bottom:24px; border:1px solid rgb(var(--accent-rgb) / .25); border-radius:24px; background:radial-gradient(ellipse at 0 0,rgb(var(--accent-rgb) / .17),transparent 70%),rgb(var(--surface-solid-rgb) / .65); }
.public-playback-owner { font-size:.85rem; color:var(--accent); }
.public-playback-hero h1 { margin:12px 0; font-size:clamp(1.5rem,3vw,2.4rem); }
.public-playback-hero p { max-width:640px; color:var(--soft); line-height:1.6; margin:0; }
.public-playback-summary { display:grid; gap:6px; min-width:160px; text-align:center; }
.public-playback-summary strong { font-size:2.6rem; color:var(--accent); line-height:1; }
.public-playback-summary small { color:var(--muted); font-size:.75rem; }
.public-playback-content .profile-playback-tools { margin-bottom:22px; }
.public-playback-content .profile-playback-tools .input { max-width:480px; }
.public-playback-page .profile-playback-list { grid-template-columns:repeat(auto-fill,minmax(min(100%,320px),1fr)); gap:18px; }
.public-playback-page .profile-playback-row { display:flex; flex-direction:column; align-items:stretch; gap:0; padding:0; overflow:hidden; background:rgb(var(--surface-solid-rgb) / .65); transition:border-color .15s ease,background .15s ease; }
.public-playback-art { position:relative; height:150px; overflow:hidden; background:rgb(var(--accent-rgb) / .06); }
.public-playback-page .profile-playback-image { width:100%; height:100%; border-radius:0; object-fit:cover; }
.public-playback-poster { position:absolute; bottom:12px; left:14px; width:46px; height:64px; object-fit:cover; border-radius:6px; border:2px solid rgb(var(--surface-solid-rgb)); box-shadow:0 3px 14px #0006; }
.public-playback-state { position:absolute; top:12px; right:12px; border:1px solid #ffffff30; border-radius:999px; background:#101827df; color:#fff; padding:6px 10px; font-size:.72rem; }
.public-playback-state.playing { color:#adf0cf; }
.public-playback-page .watching-now-copy { padding:18px; }
.public-playback-page .watching-now-copy strong { font-size:1.05rem; line-height:1.4; }
.public-playback-page .watching-now-copy p { min-height:1.4em; font-size:.82rem; }
.public-playback-progress-label,.public-playback-card-footer { display:flex; justify-content:space-between; gap:12px; align-items:center; }
.public-playback-progress-label { font-size:.85rem; margin:16px 0 8px; }
.public-playback-progress-label b { color:var(--accent); }
.public-playback-card-footer { margin-top:12px; }
.public-playback-note { margin-top:22px; }
@media(max-width:650px) { .public-playback-hero { align-items:flex-start; flex-direction:column; gap:20px; } .public-playback-summary { text-align:left; display:flex; align-items:baseline; flex-wrap:wrap; gap:10px; } .public-playback-summary small { flex-basis:100%; } .public-playback-page .profile-playback-list { grid-template-columns:minmax(0,1fr); } }

.public-playback-page .watching-now-copy .public-playback-source { min-height:0; margin:10px 0 0; font-size:.75rem; color:var(--accent); }

.watching-now-art { position:relative; flex:0 0 62px; width:62px; height:48px; }
.profile-navigation-live-row .watching-now-art .watching-now-image { width:62px; height:48px; }
.watching-now-cover { position:absolute; left:3px; bottom:3px; width:22px; height:31px; object-fit:cover; border:1px solid rgb(var(--surface-solid-rgb)); border-radius:3px; box-shadow:0 2px 6px #0007; }

/* Keep a single document scroller on touch devices. overflow-x:hidden on
   body creates an extra scroll container and can trap Chromium touch gestures. */
@media (hover: none) and (pointer: coarse) {
  html { overflow-x: clip; overflow-y: auto; touch-action: auto; }
  body { overflow-x: clip; touch-action: auto; }
  body:not(.modal-open):not(.mobile-nav-open):not(.chat-popup-open) {
    overflow-x: clip;
    overflow-y: visible;
  }
  #app, .app-shell, .main, .content { touch-action: auto; }
  .modal, .modal-body, .chat-panel, .notification-popover,
  .messages-popover, .mobile-nav-popover, .top-auth-popover {
    touch-action: auto;
    overscroll-behavior-y: contain;
  }
}

/* Profile navigation ends after the last button instead of filling empty space. */
.profile-nav-strip,
.profile-navigation-live-row > .profile-nav-strip {
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  justify-self: center;
  margin-inline: auto;
  flex: 0 1 auto;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  justify-content: safe center;
  border-radius: 999px;
}
.profile-nav-strip > a,
.profile-nav-strip > button { flex: 0 0 auto; white-space: nowrap; }

/* Mini integration: readable versions and a distinct installation status. */
.mini-app-card { display:flex; flex-direction:column; gap:16px; }
.mini-app-card > p { margin:0; color:var(--soft); line-height:1.6; }
.mini-app-heading { display:flex; align-items:center; gap:14px; }
.mini-app-heading img { border-radius:18px; flex-shrink:0; }
.mini-app-heading h2 { margin:0 0 5px; }
.mini-app-heading small { color:var(--soft); }
.mini-app-versions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:0; }
.mini-app-versions > div { padding:12px; border:1px solid var(--line); border-radius:14px; background:rgb(var(--accent-rgb) / .045); min-width:0; }
.mini-app-versions dt { font-size:12px; color:var(--soft); margin-bottom:6px; }
.mini-app-versions dd { margin:0; font-weight:750; overflow-wrap:anywhere; }
.mini-version-status { display:flex; align-items:flex-start; gap:12px; padding:16px; border:1px solid var(--line); border-radius:16px; background:rgb(var(--accent-rgb) / .07); }
.mini-version-status[data-status="current"] { border-color:#4ac69566; background:#4ac69512; }
.mini-version-status[data-status="update"] { border-color:#eab75e77; background:#eab75e12; }
.mini-status-symbol { display:grid; place-items:center; width:32px; height:32px; flex-shrink:0; border-radius:50%; background:rgb(var(--accent-rgb) / .15); font-size:20px; }
.mini-version-status[data-status="current"] .mini-status-symbol { color:#6eddb1; background:#4ac69522; }
.mini-version-status p { margin:5px 0 0; color:var(--soft); font-size:13px; line-height:1.5; }
.mini-release-notes { border-top:1px solid var(--line); padding-top:12px; }
.mini-release-notes summary { cursor:pointer; font-weight:650; color:var(--soft); }
.mini-release-notes p { line-height:1.6; white-space:pre-line; }
.mini-app-card > .actions { margin-top:auto; gap:8px; flex-wrap:wrap; }
@media(max-width:420px) { .mini-app-versions { gap:6px; } .mini-app-versions > div { padding:9px; } .mini-app-card > .actions > * { flex:1 1 auto; text-align:center; } }

/* Compact Mini card; detailed help stays collapsed until requested. */
.mini-app-card { gap:10px; padding:18px; align-self:start; }
.mini-app-heading { gap:10px; }
.mini-app-heading img { width:44px; height:44px; border-radius:12px; }
.mini-app-heading h2 { font-size:1.1rem; margin-bottom:2px; }
.mini-app-card > p { font-size:13px; line-height:1.45; }
.mini-app-versions { gap:6px; }
.mini-app-versions > div { padding:8px 10px; border-radius:10px; }
.mini-app-versions dt { font-size:11px; margin-bottom:2px; }
.mini-app-versions dd { font-size:13px; }
.mini-version-status { padding:10px 12px; gap:9px; border-radius:12px; }
.mini-status-symbol { width:25px; height:25px; font-size:16px; }
.mini-version-status strong { font-size:13px; }
.mini-version-status p { font-size:12px; margin-top:2px; }
.mini-version-status[data-status="current"] p { display:none; }
.mini-app-card .actions { margin-top:0; gap:6px; }
.mini-app-card .actions .button { padding:8px 10px; min-height:34px; font-size:12px; }
.mini-release-notes { padding-top:8px; font-size:12px; }
.mini-install-help { font-size:12px; border-top:1px solid var(--line); padding-top:8px; }
.mini-install-help summary { cursor:pointer; color:var(--soft); font-weight:650; }
.mini-help-content { line-height:1.6; padding-top:12px; }
.mini-help-content ol, .mini-help-content ul { padding-left:20px; margin:8px 0 14px; }
.mini-help-content code { overflow-wrap:anywhere; }

/* Keep browser and versions beside the Mini identity. */
.mini-app-heading { flex-wrap:wrap; }
.mini-app-heading > div { flex:1 1 140px; min-width:0; }
.mini-app-heading .mini-app-versions { margin-left:auto; flex:0 1 auto; }
.mini-app-heading .mini-app-versions > div { min-width:78px; }
@media(max-width:480px) {
  .mini-app-heading img { width:34px; height:34px; }
  .mini-app-heading > div { flex-basis:100px; }
  .mini-app-heading .mini-app-versions { gap:3px; }
  .mini-app-heading .mini-app-versions > div { min-width:0; padding:6px; }
  .mini-app-heading .mini-app-versions dt { font-size:10px; }
  .mini-app-heading .mini-app-versions dd { font-size:11px; }
}

.mini-browser-link { overflow-wrap:anywhere; }

.mini-help-content .mini-browser-link {
  color:var(--accent);
  font-weight:700;
  text-decoration:underline;
  text-decoration-thickness:1.5px;
  text-underline-offset:3px;
}
.mini-help-content .mini-browser-link:hover { color:var(--text); }
.mini-help-content .mini-browser-link:focus-visible { outline:2px solid var(--accent); outline-offset:3px; border-radius:3px; }

/* Cover fan showcase: selected artwork and native, accessible navigation. */
.cover-showcase { position:relative; isolation:isolate; overflow:hidden; border-radius:24px; margin:0 0 28px; background:var(--panel); min-height:520px; }
.cover-showcase-backdrop,.cover-showcase-shade { position:absolute; inset:0; z-index:-1; pointer-events:none; }
.cover-showcase-backdrop img { width:100%; height:100%; object-fit:cover; opacity:.55; }
.cover-showcase-shade { background:linear-gradient(0deg,var(--bg-deep) 0%,rgb(0 0 0 / .25) 85%),linear-gradient(90deg,rgb(0 0 0 / .5),transparent,rgb(0 0 0 / .5)); }
.cover-showcase-inner { max-width:1000px; margin:auto; padding:24px; text-align:center; }
.cover-showcase-stage { position:relative; height:240px; margin:18px auto 6px; max-width:660px; }
.cover-showcase-poster { position:absolute; left:calc(50% - 75px); top:8px; width:150px; height:210px; padding:0; border:1px solid rgb(255 255 255 / .25); border-radius:12px; overflow:hidden; cursor:pointer; background:var(--panel); transform:translateX(calc(var(--offset) * 105px)) translateY(calc(var(--distance) * 13px)) rotate(calc(var(--offset) * 9deg)) scale(calc(1 - var(--distance) * .12)); transition:transform .35s ease,box-shadow .35s ease; box-shadow:0 14px 30px #0008; }
.cover-showcase-poster img { width:100%; height:100%; object-fit:cover; }
.cover-showcase-poster[data-showcase-active] { border:2px solid var(--accent); box-shadow:0 0 26px rgb(var(--accent-rgb) / .35),0 16px 32px #0009; }
.cover-showcase-poster:focus-visible { outline:3px solid var(--accent); outline-offset:4px; }
.cover-showcase-details { min-height:160px; max-width:650px; margin:auto; }
.cover-showcase-details h2 { font-size:clamp(1.4rem,3vw,2.3rem); margin:0 0 8px; }
.cover-showcase-details .meta-line { justify-content:center; }
.cover-showcase-details p { color:var(--soft); line-height:1.5; margin:10px auto; }
.cover-showcase-controls { display:flex; justify-content:center; align-items:center; gap:18px; margin-top:16px; }
.cover-showcase-controls span { color:var(--soft); font-variant-numeric:tabular-nums; }
@media(max-width:600px) { .cover-showcase { min-height:470px; border-radius:16px; } .cover-showcase-inner { padding:18px 12px; } .cover-showcase-stage { height:210px; } .cover-showcase-poster { width:120px; height:175px; left:calc(50% - 60px); transform:translateX(calc(var(--offset) * 75px)) translateY(calc(var(--distance) * 14px)) rotate(calc(var(--offset) * 8deg)) scale(calc(1 - var(--distance) * .15)); } }
@media(prefers-reduced-motion:reduce) { .cover-showcase-poster { transition:none; } }

.cover-showcase-stage { cursor:grab; touch-action:pan-y pinch-zoom; user-select:none; }
.cover-showcase-stage.dragging, .cover-showcase-stage.dragging .cover-showcase-poster { cursor:grabbing; }
.cover-showcase-poster img { pointer-events:none; -webkit-user-drag:none; }

/* Direct manipulation while dragging, soft settling on release. */
.cover-showcase { border:1px solid rgb(var(--accent-rgb) / .16); background:var(--bg-deep); }
.cover-showcase-stage { height:265px; perspective:900px; margin-top:26px; }
.cover-showcase-poster { width:164px; height:230px; left:calc(50% - 82px); border-radius:14px; transform:translateX(calc(var(--offset) * 122px)) translateY(calc(var(--distance) * 14px)) rotate(calc(var(--offset) * 6deg)) scale(calc(1 - min(var(--distance), 3) * .1)); transition:transform .48s cubic-bezier(.22,.8,.25,1),opacity .3s ease,box-shadow .3s ease; }
.cover-showcase-stage.dragging .cover-showcase-poster { transition:none; }
.cover-showcase-backdrop img { position:absolute; inset:0; transition:opacity .4s ease; }
.cover-showcase-backdrop .showcase-background-enter { opacity:0; }
.cover-showcase-backdrop .showcase-background-enter.ready { opacity:.55; }
.cover-showcase-details h2 { letter-spacing:-.025em; text-wrap:balance; }
.cover-showcase-details p { max-width:560px; font-size:13px; }
.cover-showcase-controls .icon-button { border-radius:50%; background:rgb(var(--accent-rgb) / .08); }
@media(max-width:600px) { .cover-showcase-stage { height:225px; } .cover-showcase-poster { width:132px; height:188px; left:calc(50% - 66px); transform:translateX(calc(var(--offset) * 86px)) translateY(calc(var(--distance) * 12px)) rotate(calc(var(--offset) * 5deg)) scale(calc(1 - min(var(--distance), 3) * .13)); } }
@media(prefers-reduced-motion:reduce) { .cover-showcase-poster,.cover-showcase-backdrop img { transition:none; } }

/* Composite moving covers separately; avoid repainting their shadows per frame. */
.cover-showcase-stage { contain:layout style; }
.cover-showcase-poster { will-change:transform; backface-visibility:hidden; }
.cover-showcase-stage.dragging .cover-showcase-poster { transition:none; }

.cover-showcase-stage.spinning .cover-showcase-poster { transition:none; }

.cover-showcase-backdrop img { transition:opacity .7s ease; will-change:opacity; }
@media(prefers-reduced-motion:reduce) { .cover-showcase-backdrop img { transition:none; } }

.cover-showcase-stage { max-width:920px; }

.cover-showcase-backdrop img { transition:opacity 1.1s cubic-bezier(.22,.61,.36,1); }
@media(prefers-reduced-motion:reduce) { .cover-showcase-backdrop img { transition:opacity .3s ease; } }

.discover-initial-loading { min-height:340px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:16px; color:var(--muted); }
.discover-initial-loading img { width:76px; height:76px; object-fit:contain; border-radius:50%; }
.discover-page-head[hidden] { display:none; }

.personal-mood { text-align:left; font:inherit; cursor:pointer; color:var(--text); min-height:170px; grid-template-columns:minmax(0,1fr); grid-template-rows:auto auto auto; }
.personal-mood.active { border-color:var(--accent); background:rgb(var(--accent-rgb) / .14); }
.mood-cover-stack { display:flex; height:70px; align-items:center; padding-left:4px; margin-bottom:10px; }
.mood-cover-stack img { width:43px; height:63px; object-fit:cover; border-radius:7px; border:1px solid var(--line); box-shadow:0 3px 12px #0004; }
.mood-cover-stack img + img { margin-left:-9px; transform:rotate(7deg); }
.personal-mood strong,.personal-mood small { display:block; }
.personal-mood strong { white-space:normal; overflow-wrap:anywhere; line-height:1.4; }
[data-mood-results] { margin-top:20px; }

.discover-moods .discover-mood-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.personal-mood[hidden] { display:none; }
@media(max-width:900px) { .discover-moods .discover-mood-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:360px) { .discover-moods .discover-mood-grid { grid-template-columns:minmax(0,1fr); } }

.discover-mood-builder { margin:0 0 16px; padding:12px 14px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); }
.discover-mood-builder summary { cursor:pointer; font-weight:700; }
.discover-mood-builder p { color:var(--muted); margin:10px 0; }
.discover-mood-builder input { width:100%; max-width:400px; margin:0 0 10px; padding:9px 11px; box-sizing:border-box; color:var(--text); background:var(--surface-2); border:1px solid var(--line); border-radius:8px; }
.discover-mood-choices { display:flex; flex-wrap:wrap; gap:7px; }
.discover-mood-choices .button { padding:7px 11px; min-height:36px; }
.discover-mood-choices [aria-pressed="true"] { border-color:var(--accent); background:rgb(var(--accent-rgb) / .18); }

/* Custom mood builder: keep the selected mix separate from the catalog. */
.discover-mood-selection-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:18px 0 10px; }
.discover-mood-selection-head span { font-size:12px; color:var(--muted); }
.discover-mood-selected { display:flex; flex-wrap:wrap; align-items:center; gap:8px; min-height:48px; padding:12px; border:1px dashed var(--line); border-radius:12px; background:var(--surface-1); }
.discover-mood-selected .button { gap:12px; border:1px solid var(--accent); background:var(--accent); color:#fff; font-weight:700; padding:8px 12px; }
.discover-mood-selected .button span { font-size:20px; line-height:1; }
.discover-mood-empty { color:var(--muted); font-size:13px; }
.discover-mood-search { display:block; font-size:13px; font-weight:600; margin:18px 0 4px; }
.discover-mood-builder .discover-mood-search input { display:block; margin-top:8px; max-width:none; background:var(--surface-1); }
.discover-mood-choices { max-height:250px; overflow-y:auto; padding:3px 3px 8px; scrollbar-width:thin; }
.discover-mood-choices [aria-pressed="true"] { border:2px solid var(--accent); background:rgb(var(--accent-rgb) / .25); font-weight:800; }
.discover-mood-builder .discover-mood-browse { margin-top:10px; font-size:12px; }
.discover-mood-builder-actions { margin-top:18px; padding-top:14px; border-top:1px solid var(--line); display:flex; gap:10px; }
.discover-mood-builder .button:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.discover-moods [data-mood-results]:not([hidden]) { margin:0 0 24px; padding:16px; border:1px solid var(--line); border-radius:12px; }
@media(max-width:600px) { .discover-mood-builder { padding:14px 12px; } .discover-mood-builder-actions [data-mood-find] { flex:1; } .discover-mood-selection-head { align-items:flex-start; } .discover-mood-choices { max-height:220px; } }

/* Initial public HTML is replaced by the interactive application shell. */
.public-document { max-width:960px; margin:32px auto; padding:24px; color:var(--text); background:var(--surface-1); border:1px solid var(--line); border-radius:16px; }
.public-document nav,.public-document footer { display:flex; flex-wrap:wrap; gap:8px; line-height:1.8; }
.public-document h1 { font-size:clamp(1.7rem,5vw,2.5rem); }
.public-document h2 { margin-top:28px; }
.public-document a { color:var(--accent); text-decoration:underline; }
.public-document li { margin:12px 0; }
.public-document dt { font-weight:700; }
.public-document dd { margin:0 0 10px; }
.public-document .public-text { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.65; }

#view:has(> .loading) { min-height:calc(100svh - 140px); }

/* Ad boxes follow the creative size; empty units do not leave a white panel. */
.native-ad-slot { margin:12px 0; padding:0; border:0; min-height:0; background:transparent; overflow:hidden; }
.native-ad-slot > small { display:block; margin-bottom:4px; color:var(--muted); font-size:10px; text-align:center; }
.native-ad-slot[data-ad-format="banner"] { width:var(--ad-width,100%); max-width:100%; margin-inline:auto; }
.native-ad-slot:not([data-ad-ready="true"]) > small { display:none; }
.native-ad-slot[data-ad-format="banner"] [data-native-content] { min-height:var(--ad-height,0px); }
.native-ad-slot[hidden] { display:none !important; }
.banner-ad-frame { display:block; border:0; margin:0 auto; background:transparent; }
.vertical-ad-slot { display:none; }
@media(min-width:1100px) { .partner-ad-row:has(.vertical-ad-slot[data-ad-ready="true"]:not([hidden])) { display:grid; grid-template-columns:minmax(0,1fr) 160px; align-items:start; gap:12px; } .vertical-ad-slot { display:block; } }

/* Keep initial page loading centered in the visible content area. */
#view > .loading,
.discover-initial-loading {
  min-height:calc(100svh - var(--topbar-height, 74px) - 76px);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:16px;
  text-align:center;
}
.public-app-boot.boot {
  flex-direction:column;
  align-items:center;
  justify-content:center;
}

/* Independent cookie choices with equal-size controls. */

.cookie-preferences-popup { width:min(360px,calc(100vw - 28px)); max-height:calc(100svh - 32px); overflow:auto; box-sizing:border-box; margin:auto; padding:18px; border:1px solid var(--line); border-radius:16px; color:var(--text); background:var(--panel,var(--bg)); }
.cookie-preferences-popup::backdrop { background:#0007; backdrop-filter:blur(2px); }
.cookie-preferences-popup p { font-size:13px; line-height:1.6; color:var(--muted); }
.cookie-preferences-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.cookie-preferences-options { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:14px 0; }
.cookie-preferences-options .button { width:100%; white-space:normal; }
.cookie-preferences-popup > a { font-size:12px; }

.cookie-preferences-popup { width:min(300px,calc(100vw - 28px)); padding:14px; }
.cookie-preferences-options { grid-template-columns:1fr; gap:6px; }

/* Account identity links retain profile decorations and keyboard access. */
.account-profile-link { color:inherit; text-decoration:none; }
a.account-role.account-profile-link { display:block; color:var(--muted); }
.account-profile-link:hover { text-decoration:underline; text-underline-offset:3px; }
.account-profile-link:focus-visible { outline:2px solid var(--accent); outline-offset:4px; border-radius:6px; }

.pwa-refresh-indicator { position:fixed; top:calc(var(--site-topbar-space,120px) + 8px); left:50%; transform:translateX(-50%); z-index:20001; max-width:calc(100vw - 32px); padding:10px 18px; border:1px solid var(--line); border-radius:24px; background:var(--panel-3); color:var(--text); box-shadow:var(--shadow); font-size:14px; pointer-events:none; }
.pwa-refresh-indicator[hidden] { display:none; }

/* Release schedule beneath the title, with stable ticking digits. */
.media-airing-countdown { display: flex; padding: 10px 14px; margin: 10px 0; border: 1px solid rgb(var(--accent-rgb) / .22); border-radius: 12px; background: rgb(var(--accent-rgb) / .06); }
.media-airing-countdown strong { font-variant-numeric: tabular-nums; }
.media-airing-countdown time, .media-airing-countdown small { flex-basis: 100%; color: var(--muted); font-size: .78rem; }

/* Prominent, responsive next-release card. */
.media-airing-countdown { width: min(100%, 460px); box-sizing: border-box; display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 16px; margin: 14px 0; border-radius: 16px; }
.media-airing-countdown .release-countdown-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.media-airing-countdown .release-countdown-heading { color: var(--text); font-size: .95rem; font-weight: 800; }
.media-airing-countdown .release-countdown-badge { padding: 4px 8px; border-radius: 20px; background: rgb(var(--accent-rgb) / .12); color: rgb(var(--accent-soft-rgb)); font-size: .7rem; }
.release-countdown-clock { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.media-airing-countdown .release-countdown-unit { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 3px; border-radius: 10px; background: rgb(var(--accent-rgb) / .09); }
.release-countdown-unit b { font-size: clamp(1.25rem, 4vw, 1.9rem); line-height: 1.2; font-variant-numeric: tabular-nums; color: var(--text); }
.media-airing-countdown .release-countdown-unit small { font-size: .65rem; font-weight: 500; }
.media-airing-countdown time { color: var(--soft); }
.release-countdown-unknown p { margin: 0; font-weight: 600; }
@media (max-width: 380px) { .media-airing-countdown { padding: 12px; } .release-countdown-clock { gap: 5px; } }

.sound-webm-embed { display:block; max-width:520px; margin:8px 0; }
.sound-webm-embed video { width:100%; margin:0; }


/* Never reserve poster space for failed inline bio images, including older fallbacks. */
.image-fallback.profile-bio-image, .image-fallback.social-inline-image, .profile-bio-image[hidden], .social-inline-image[hidden] { display:none !important; height:0 !important; min-height:0 !important; margin:0 !important; padding:0 !important; }


.media-airing-countdown > .release-countdown-note { display:block; width:100%; margin:0; color:var(--muted); font-size:.75rem; line-height:1.5; overflow-wrap:anywhere; }

/* Keep CSS timelines paused, not reset, while their content is out of view. */
.offscreen-animation-paused, .offscreen-animation-paused::before, .offscreen-animation-paused::after,
.offscreen-animation-paused *, .offscreen-animation-paused *::before, .offscreen-animation-paused *::after,
.page-animations-paused *, .page-animations-paused *::before, .page-animations-paused *::after { animation-play-state:paused !important; }

.media-airing-countdown > .release-countdown-footer { display:grid; grid-template-columns:minmax(0,1fr); gap:5px; width:100%; min-width:0; }
.media-airing-countdown .release-countdown-footer > time { display:block; white-space:normal; }
.media-airing-countdown .release-countdown-footer > .release-countdown-note { display:block; margin:0; color:var(--muted); font-size:.75rem; line-height:1.5; white-space:normal; overflow-wrap:anywhere; }

/* API documentation section navigation */
.api-section-nav { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 20px; }
.api-section-nav a { padding:8px 12px; border:1px solid var(--line, rgba(148,163,184,.22)); border-radius:999px; color:var(--soft); background:var(--panel, rgba(15,23,42,.5)); font-size:.85rem; text-decoration:none; }
.api-section-nav a:hover, .api-section-nav a:focus-visible { color:var(--text); border-color:var(--accent, #38bdf8); }
.api-docs > section { min-width:0; scroll-margin-top:130px; }
@media (max-width:600px) { .api-section-nav { flex-wrap:nowrap; overflow-x:auto; padding-bottom:8px; } .api-section-nav a { flex-shrink:0; } }

.welcome-ad-dialog { box-sizing:border-box; width:332px; max-width:calc(100vw - 16px); max-height:calc(100dvh - 24px); overflow:auto; padding:15px; border:1px solid rgba(148,163,184,.35); border-radius:16px; background:var(--panel, #102136); color:var(--text, #edf5ff); box-shadow:0 20px 70px #0009; }
.welcome-ad-dialog::backdrop { background:rgba(2,8,18,.7); }
.welcome-ad-dialog header { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:12px; font:14px system-ui; }
.welcome-ad-dialog header button { min-height:44px; padding:8px 12px; border:1px solid #8495aa66; border-radius:8px; background:transparent; color:inherit; cursor:pointer; }
.welcome-ad-content { position:relative; width:300px; height:250px; overflow:hidden; background:#fff; color:#334155; }
.welcome-ad-content > p { position:absolute; inset:0; display:grid; place-items:center; margin:0; font:14px system-ui; pointer-events:none; }
.welcome-ad-dialog > button { width:100%; margin-top:12px; min-height:44px; }

.store-sponsor-preview { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 14px; margin:0 0 16px; border:1px solid rgba(232,185,85,.25); border-radius:12px; background:rgba(163,111,25,.06); }
.store-sponsor-compact-copy { display:flex; align-items:center; gap:10px; min-width:0; }
.store-sponsor-compact-copy > span { color:var(--soft); font-size:.85rem; line-height:1.4; }
.store-sponsor-preview > .button { flex-shrink:0; padding:7px 10px; font-size:.85rem; }
@media(max-width:600px) { .store-sponsor-preview { gap:8px; padding:10px; } .store-sponsor-compact-copy { gap:6px; flex-wrap:wrap; } }

/* Owned cosmetics share the existing equip controls without another API read. */
.store-view-switch { display:flex; gap:8px; margin:16px 0; }
.store-view-switch button > span { padding:2px 7px; border-radius:999px; background:rgba(128,148,170,.2); font-size:.8em; }
#store-owned-panel[hidden],#store-shop-panel[hidden] { display:none !important; }
.store-inventory-heading { margin:20px 0; }
.store-inventory-heading h2 { margin-bottom:6px; }
.store-inventory-heading p { color:var(--soft); margin:0; }
/* Keep the aura bounds attached to the banner; animate its painted details. */
.profile-hero[class*="store-banner-"] { isolation:isolate; overflow:hidden; }
.profile-hero[class*="store-banner-"]::after { inset:0; border-radius:inherit; transform:none; animation:store-aura-light 7s ease-in-out infinite; }
.profile-hero.store-banner-rose::before { inset:0; transform:none; animation:store-aura-petals 9s ease-in-out infinite; }
.profile-hero.store-banner-crystal-rain::after { animation:store-aura-rain 6s linear infinite; background-size:140% 140%,100% 100%; }
.profile-hero.store-banner-system-grid::after { animation:store-aura-grid 5s ease-in-out infinite; background-size:auto,auto,100% 200%; }
.profile-hero.store-banner-starlight-gate::after { animation:store-aura-stars 9s ease-in-out infinite; }
@keyframes store-aura-light { 0%,100% { opacity:.65; } 50% { opacity:1; } }
@keyframes store-aura-petals { 0%,100% { background-position:8% 26%,82% 22%,39% 82%; } 50% { background-position:11% 31%,79% 27%,42% 77%; } }
@keyframes store-aura-rain { from { background-position:0% 0%,0 0; } to { background-position:100% 100%,0 0; } }
@keyframes store-aura-grid { 0%,100% { background-position:0 0,0 0,0 0%; } 50% { background-position:0 0,0 0,0 100%; } }
@keyframes store-aura-stars { 0%,100% { opacity:.7; background-position:0 0,0 0,0 0,0 0; } 50% { opacity:1; background-position:0 0,0 0,8px -5px,-6px 4px; } }
@media(prefers-reduced-motion:reduce) { .profile-hero[class*="store-banner-"]::after,.profile-hero.store-banner-rose::before { animation:none; } }

.store-profile-background-moonlit { --profile-cosmetic-tint:#38bdf8; background:radial-gradient(circle at 86% 12%,#e0f2fe85 0 18px,#7dd3fc22 19px 60px,transparent 110px),radial-gradient(ellipse at 5% 55%,#0891b280,transparent 65%),radial-gradient(ellipse at 95% 85%,#2563eb65,transparent 60%),linear-gradient(145deg,color-mix(in srgb,var(--panel,#102136) 65%,#075985),var(--panel,#102136)); }
.store-profile-background-rose { --profile-cosmetic-tint:#f472b6; background:radial-gradient(ellipse at 12% 18%,#fb7185a0 0,transparent 48%),radial-gradient(ellipse at 88% 52%,#e879f980,transparent 55%),radial-gradient(ellipse at 25% 90%,#fda4af70,transparent 55%),linear-gradient(145deg,color-mix(in srgb,var(--panel,#102136) 70%,#9d174d),var(--panel,#102136)); }
.store-profile-background-starlight { --profile-cosmetic-tint:#c4b5fd; background:radial-gradient(circle at 20% 30%,#f5eaff 0 1.4px,#d8b4fe60 1.5px,transparent 3px) 0 0 / 76px 94px,radial-gradient(circle at 70% 20%,#a5f3fcdd 0 1.2px,transparent 2.5px) 0 0 / 128px 116px,radial-gradient(ellipse at 85% 15%,#7c3aed95,transparent 60%),radial-gradient(ellipse at 10% 80%,#0891b275,transparent 65%),linear-gradient(135deg,color-mix(in srgb,var(--panel,#102136) 65%,#4c1d95),var(--panel,#102136)); }
.profile-page[class*="store-profile-background-"] { border-radius:18px; padding:clamp(8px,1.4vw,18px); }
.store-background-swatch { display:grid; align-items:end; width:160px; height:90px; border-radius:12px; border:1px solid var(--line); padding:10px; box-sizing:border-box; }
.store-background-swatch > span { font-size:.75rem; color:var(--text); }
.store-card-extra,.store-collection-actions { display:flex; gap:8px; flex-wrap:wrap; }
.store-card-extra .button { flex:1; }
.store-collection-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); gap:16px; }
.store-collection-card { display:flex; flex-direction:column; gap:14px; min-width:0; }
.store-collection-card h3,.store-collection-card p { margin:0; }
.store-collection-card p { color:var(--soft); font-size:.9rem; }
.store-collection-card s { font-size:.8rem; margin-left:6px; }
.store-collection-swatches { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; align-items:center; justify-items:center; min-height:140px; overflow:hidden; }
.store-collection-swatches .store-background-swatch { width:100%; }
.store-collection-actions { margin-top:auto; }
.store-look-dialog,.store-gift-dialog { box-sizing:border-box; width:min(680px,calc(100vw - 24px)); max-height:calc(100dvh - 32px); overflow:auto; padding:20px; border:1px solid var(--line); border-radius:18px; background:var(--panel,#102136); color:var(--text); }
.store-look-dialog::backdrop,.store-gift-dialog::backdrop { background:#020817b8; }
.store-look-profile { border:1px solid var(--line); border-radius:14px; overflow:hidden; }
.store-look-profile .profile-hero { margin:0; min-height:200px; grid-template-columns:1fr; }
.store-look-profile .profile-avatar { width:72px; height:72px; }
.store-look-profile .profile-identity { display:flex; align-items:center; gap:16px; }
.store-look-body { padding:18px; }
.store-look-body p,.store-gift-dialog p { color:var(--soft); line-height:1.6; }
.store-gift-dialog { width:min(460px,calc(100vw - 24px)); }
.store-gift-dialog label { display:grid; gap:8px; }

.store-look-sections { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.store-look-sections > .panel { min-width:0; padding:16px; margin:0; }
.store-look-sections h3 { margin:0 0 12px; font-size:1rem; }
.store-look-sections p { margin:0; font-size:.85rem; overflow-wrap:anywhere; white-space:pre-line; }
.store-look-example-label { font-size:.75rem; margin:0 0 14px; }
.store-look-activity { grid-column:1/-1; }
.store-look-list-row { display:flex; justify-content:space-between; gap:12px; padding:8px 0; border-bottom:1px solid var(--line); font-size:.85rem; }
.store-look-list-row:last-child { border-bottom:0; }
.store-look-list-row span { color:var(--soft); }
.store-look-activity-row { display:flex; gap:12px; padding:12px 0; }
.store-look-activity-row > div { flex:1; min-width:0; }
.store-look-activity-row > span { color:var(--accent); }
.store-look-activity-row strong { font-size:.85rem; }
.store-look-progress { height:5px; margin-top:9px; border-radius:5px; background:rgba(128,148,170,.2); overflow:hidden; }
.store-look-progress > span { display:block; width:50%; height:100%; background:var(--accent); }
@media(max-width:600px) { .store-look-sections { grid-template-columns:1fr; } }

/* Carry the selected background into content panels, keeping an opaque readable surface. */
.profile-page[class*="store-profile-background-"] :is(.profile-about-panel,.profile-shelf,.profile-activity-panel,.profile-list-panel),
.store-look-profile[class*="store-profile-background-"] .store-look-sections > .panel {
  background:color-mix(in srgb,var(--panel,#102136) 88%,var(--profile-cosmetic-tint));
  border-color:color-mix(in srgb,var(--line,#385069) 55%,var(--profile-cosmetic-tint));
}
.profile-page[class*="store-profile-background-"],.store-look-profile[class*="store-profile-background-"] {
  border:1px solid color-mix(in srgb,var(--line,#385069) 55%,var(--profile-cosmetic-tint));
}

/* Exact store preview shares profile markup, CSS, theme and the current content width. */
.store-exact-dialog { position:fixed; inset:0; margin:0; padding:0; width:100vw; max-width:none; height:100dvh; max-height:none; border:0; border-radius:0; background:var(--bg,var(--panel,#102136)); }
.store-exact-header { position:sticky; top:0; z-index:30; display:flex; justify-content:space-between; align-items:center; gap:14px; padding:12px 20px; border-bottom:1px solid var(--line); background:var(--panel,#102136); }
.store-exact-header h2 { margin:0; font-size:1.1rem; }
.store-exact-header p { margin:5px 0 0; color:var(--soft); font-size:.8rem; }
.store-exact-header > button { flex-shrink:0; }
.store-exact-stage { width:var(--store-profile-width); max-width:100%; margin:0 auto; box-sizing:border-box; }
.store-preview-views { display:flex; gap:8px; padding:12px 0; }
.store-exact-stage [data-store-exact-preview] { padding-bottom:30px; }
.store-preview-locations { margin:0 0 20px; }
.store-preview-locations p { color:var(--soft); line-height:1.6; }
.store-preview-topbar { display:inline-flex; padding:12px; border:1px solid var(--line); border-radius:14px; }
.store-preview-community { display:flex; align-items:center; gap:12px; padding:14px; border:1px solid var(--line); border-radius:14px; }
.store-preview-community .social-avatar { width:44px; height:44px; flex-shrink:0; }

/* Make the profile skin consistent across About, lists, stats, collections and activity. */
.profile-page[class*="store-profile-background-"] :is(.profile-about-panel,.profile-status-overview,.profile-shelf,.profile-collections-panel,.profile-activity-panel,.profile-list-panel,.profile-stat) {
  background:color-mix(in srgb,var(--panel,#102136) 85%,var(--profile-cosmetic-tint));
  border-color:color-mix(in srgb,var(--line,#385069) 50%,var(--profile-cosmetic-tint));
}
.profile-page[class*="store-profile-background-"] .profile-dashboard { gap:20px; }
.profile-page[class*="store-profile-background-"] .profile-stats { gap:12px; }
.profile-page[class*="store-profile-background-"] :is(.profile-about-panel,.profile-status-overview,.profile-collections-panel,.profile-activity-panel,.profile-list-panel) > .section-title { padding-bottom:10px; border-bottom:1px solid color-mix(in srgb,var(--profile-cosmetic-tint) 35%,transparent); }

/* Activity cosmetics belong to the author; status colors stay independent. */
.store-profile-background-moonlit { --profile-cosmetic-card-pattern:radial-gradient(ellipse at 95% 5%,#38bdf855,transparent 65%),radial-gradient(ellipse at 5% 100%,#2563eb33,transparent 65%); }
.store-profile-background-rose { --profile-cosmetic-card-pattern:radial-gradient(ellipse at 95% 5%,#f472b65c,transparent 65%),radial-gradient(ellipse at 5% 100%,#fb71853d,transparent 65%); }
.store-profile-background-starlight { --profile-cosmetic-card-pattern:radial-gradient(circle at 20% 30%,#d8b4feaa 0 1px,transparent 2px) 0 0 / 90px 95px,radial-gradient(ellipse at 95% 5%,#a78bfa55,transparent 65%); }
.store-profile-background-pumpkin-lantern { --profile-cosmetic-card-pattern:radial-gradient(ellipse at 95% 5%,#f59e0b55,transparent 65%),radial-gradient(ellipse at 5% 100%,#c2410c3d,transparent 65%); }
.store-profile-background-haunted-moon { --profile-cosmetic-card-pattern:radial-gradient(ellipse at 95% 5%,#a78bfa55,transparent 65%),radial-gradient(ellipse at 5% 100%,#4338ca3d,transparent 65%); }
body .social-item.store-activity-skin,
body[data-theme] .social-item.store-activity-skin,
:is(.activity-panel,.profile-activity-panel) .social-item.store-activity-skin:not(.chat-item),
.profile-update-row.store-activity-skin {
  background:var(--profile-cosmetic-card-pattern),var(--panel,#102136);
  border-color:color-mix(in srgb,var(--line,#385069) 50%,var(--profile-cosmetic-tint));
}
:is(.social-item,.profile-update-row).store-activity-skin {
  position:relative;
  isolation:isolate;
}
:is(.social-item,.profile-update-row).store-activity-skin.store-profile-background-live::before,
:is(.social-item,.profile-update-row).store-activity-skin.store-profile-background-live::after { z-index:0; }
:is(.social-item,.profile-update-row).store-activity-skin > * { position:relative; z-index:1; }
.profile-update-row.store-activity-skin {
  background:linear-gradient(90deg,rgb(var(--list-status-rgb,var(--accent-rgb)) / .17),transparent 45%),var(--profile-cosmetic-card-pattern),var(--panel,#102136);
}
.profile-update-row:is(.status-watching,.status-completed,.status-planning,.status-paused,.status-dropped) {
  border-inline-start:4px solid rgb(var(--list-status-rgb));
}
.profile-update-row .profile-update-status {
  border-color:rgb(var(--list-status-rgb,var(--accent-rgb)) / .8);
  background:linear-gradient(rgb(var(--list-status-rgb,var(--accent-rgb)) / .2),rgb(var(--list-status-rgb,var(--accent-rgb)) / .2)),var(--panel,#102136);
  color:rgb(var(--list-status-soft-rgb,var(--accent-rgb)));
  font-weight:800;
}

.store-preview-feed { container-type:inline-size; margin:12px 0 24px; }
.store-preview-feed > .social-item,.store-preview-feed > .profile-update-row { margin:0; }

.store-preview-loading { display:flex; align-items:center; justify-content:center; gap:12px; min-height:110px; padding:20px; color:var(--soft); font-size:.9rem; }
.store-preview-spinner { position:relative; display:inline-grid; place-items:center; flex:0 0 48px; width:48px; height:48px; }
.store-preview-spinner::before { content:""; position:absolute; inset:0; border:2px solid var(--line); border-top-color:var(--accent); border-radius:50%; animation:store-preview-spin .8s linear infinite; }
.store-preview-loading-logo,.store-preview-spinner > .image-fallback { display:block; width:36px; height:36px; object-fit:contain; border-radius:50%; }
@keyframes store-preview-spin { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { .store-preview-spinner::before { animation:none; } }

/* Premium live backgrounds: stationary surfaces, bounded decorative layers. */
.store-profile-background-live { position:relative; isolation:isolate; }
.store-profile-background-live::before,.store-profile-background-live::after {
  content:""; position:absolute; inset:0; height:min(100%,600px); border-radius:inherit; clip-path:inset(0 round 18px); pointer-events:none; z-index:-1;
}
.store-profile-background-live::after { top:auto; bottom:0; height:min(100%,380px); }
.social-item.store-profile-background-live::before,.social-item.store-profile-background-live::after,
.profile-update-row.store-profile-background-live::before,.profile-update-row.store-profile-background-live::after,
.store-background-swatch.store-profile-background-live::before,.store-background-swatch.store-profile-background-live::after { height:100%; }
.store-profile-live-moonlit::before {
  background:radial-gradient(ellipse at 20% 30%,#22d3ee45,transparent 55%),linear-gradient(115deg,transparent 30%,#7dd3fc30 45%,#a5f3fc18 52%,transparent 70%);
  background-size:130% 130%,200% 100%; animation:store-live-aurora 12s ease-in-out infinite alternate;
}
.store-profile-live-moonlit::after {
  background:radial-gradient(circle at 18% 45%,#cffafeaa 0 1px,transparent 3px) 0 0 / 110px 100px,radial-gradient(ellipse at 80% 80%,#38bdf845,transparent 60%);
  animation:store-live-twinkle 6s ease-in-out infinite alternate;
}
.store-profile-live-rose::before {
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='170' viewBox='0 0 150 170'%3E%3Cellipse cx='38' cy='45' rx='3' ry='7' fill='%23fda4af' opacity='.65' transform='rotate(-30 38 45)'/%3E%3Cellipse cx='112' cy='126' rx='3' ry='6' fill='%23f9a8d4' opacity='.48' transform='rotate(35 112 126)'/%3E%3C/svg%3E"),url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='210' height='230'%3E%3Cellipse cx='140' cy='75' rx='4' ry='8' fill='%23fbcfe8' opacity='.4' transform='rotate(24 140 75)'/%3E%3C/svg%3E");
  background-size:150px 170px,210px 230px; animation:store-live-petals 22s linear infinite;
}
.store-profile-live-rose::after { background:radial-gradient(ellipse at 15% 80%,#fb71854d,transparent 65%),radial-gradient(ellipse at 90% 30%,#e879f938,transparent 65%); animation:store-live-twinkle 8s ease-in-out infinite alternate; }
.store-profile-live-starlight::before {
  background:radial-gradient(circle at 25% 30%,#ede9facc 0 1px,transparent 2.5px) 0 0 / 100px 120px,radial-gradient(circle at 70% 65%,#a5f3fcaa 0 1px,transparent 2px) 40px 10px / 170px 190px;
  animation:store-live-stars 32s linear infinite;
}
.store-profile-live-starlight::after { background:radial-gradient(ellipse at 60% 70%,#a78bfa4a,transparent 65%),radial-gradient(circle at 28% 22%,#f5f3ffc0 0 1px,#c4b5fd38 2px,transparent 7px),radial-gradient(circle at 80% 75%,#a5f3fccc 0 1px,transparent 5px); animation:store-live-twinkle 4.5s ease-in-out infinite alternate; }
@keyframes store-live-aurora { from { background-position:0% 20%,0% 0%; opacity:.6; } to { background-position:100% 70%,100% 0%; opacity:1; } }
@keyframes store-live-petals { from { background-position:0 0,40px -80px; } to { background-position:150px 170px,-170px 150px; } }
@keyframes store-live-stars { from { background-position:0 0,40px 10px; } to { background-position:100px 120px,-130px 200px; } }
@keyframes store-live-twinkle { from { opacity:.35; } to { opacity:1; } }
.store-live-tag { display:inline-flex; justify-self:start; width:fit-content; padding:3px 8px; border-radius:999px; border:1px solid var(--line); color:var(--accent); font-size:.72rem; font-weight:700; }
@media(prefers-reduced-motion:reduce) { .store-profile-background-live::before,.store-profile-background-live::after { animation:none; } }

.store-manager-layout { display:grid; grid-template-columns:minmax(280px,360px) minmax(0,1fr); gap:20px; align-items:start; }
.store-manager-form,.store-manager-form label { display:grid; gap:8px; }
.store-manager-form { gap:14px; }
.store-manager-form small { color:var(--soft); line-height:1.5; }
.store-manager-pair,.store-manager-filters { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.store-manager-form .store-manager-check { display:flex; align-items:center; }
.store-manager-catalog { max-height:850px; overflow:auto; margin-top:14px; }
.store-manager-row { display:flex; justify-content:space-between; align-items:center; gap:14px; padding:14px 0; border-bottom:1px solid var(--line); }
.store-manager-row small { display:block; color:var(--soft); margin-top:5px; }
.store-manager-row[hidden] { display:none; }
.store-manager-row .actions { flex-wrap:wrap; flex-shrink:0; }
.store-manager-history { margin-top:20px; }
.store-manager-history p { color:var(--soft); font-size:.85rem; }
.store-staff-link { display:flex; justify-content:flex-end; margin:8px 0; }
.store-edition-tag { display:inline-block; width:fit-content; border:1px solid var(--line); padding:3px 8px; border-radius:999px; font-size:.75rem; color:var(--soft); }
@media(max-width:850px) { .store-manager-layout { grid-template-columns:1fr; } }
@media(max-width:500px) { .store-manager-row { align-items:flex-start; flex-direction:column; } .store-manager-filters { grid-template-columns:1fr; } }

/* Halloween 2026: original lanterns and crescent ornaments, fixed to their surfaces. */
.store-profile-background-pumpkin-lantern,.store-frame-pumpkin-lantern,.store-preview-banner-pumpkin-lantern,.store-banner-pumpkin-lantern {
 --halloween-ornament:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'%3E%3Cpath d='M40 19q-2-10 7-12' fill='none' stroke='%2385a85c' stroke-width='5'/%3E%3Cpath d='M40 23C13 9 3 57 24 67q16 8 32 0C77 57 67 9 40 23Z' fill='%23f59432' stroke='%23ffcf73' stroke-width='2'/%3E%3Cpath d='M39 25q-17 20-6 42M44 25q17 20 6 42' fill='none' stroke='%23b75520' stroke-width='2'/%3E%3Cpath d='m23 38 12 5-12 4Zm33 0-12 5 12 4ZM25 53l9 4 6-5 6 5 9-4-6 10H32Z' fill='%23fff1ad'/%3E%3C/svg%3E");
}
.store-profile-background-haunted-moon,.store-frame-haunted-moon,.store-preview-banner-haunted-moon,.store-banner-haunted-moon {
 --halloween-ornament:url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2080%2080%27%3E%3Cpath%20d%3D%27M50%209A30%2030%200%201%200%2069%2055%2031%2031%200%200%201%2050%209Z%27%20fill%3D%27%23e9dcff%27%20stroke%3D%27%23bfa2f5%27%20stroke-width%3D%271.5%27%2F%3E%3Cg%20fill%3D%27%23e9dcff%27%3E%3Cpath%20d%3D%27m62%2013%202%206%206%202-6%202-2%206-2-6-6-2%206-2Z%27%2F%3E%3Ccircle%20cx%3D%2766%27%20cy%3D%2741%27%20r%3D%272%27%2F%3E%3Ccircle%20cx%3D%2748%27%20cy%3D%2761%27%20r%3D%271.5%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
}
.store-profile-background-pumpkin-lantern {
 --profile-cosmetic-tint:#ffb454;
 --profile-cosmetic-card-pattern:radial-gradient(ellipse at 95% 0%,#f59e0b35,transparent 65%),radial-gradient(circle at 20% 40%,#ffcf7344 0 1px,transparent 2px) 0 0 / 97px 89px;
 background:radial-gradient(ellipse at 100% 0%,#b4530970,transparent 55%),radial-gradient(ellipse at 0% 90%,#78350f70,transparent 65%),linear-gradient(145deg,color-mix(in srgb,var(--panel,#102136) 70%,#381c17),var(--panel,#102136));
}
.store-profile-background-haunted-moon {
 --profile-cosmetic-tint:#c9a7ff;
 --profile-cosmetic-card-pattern:radial-gradient(ellipse at 90% 0%,#a78bfa3a,transparent 60%),radial-gradient(circle at 20% 40%,#ddd6fe55 0 1px,transparent 2px) 0 0 / 110px 96px;
 background:radial-gradient(ellipse at 100% 0%,#7c3aed65,transparent 55%),radial-gradient(ellipse at 0% 90%,#4338ca50,transparent 65%),linear-gradient(145deg,color-mix(in srgb,var(--panel,#102136) 70%,#281542),var(--panel,#102136));
}
.store-profile-live-pumpkin-lantern::before { background:radial-gradient(circle at 25% 70%,#ffce7388 0 1px,transparent 3px) 0 0 / 91px 113px,radial-gradient(circle at 70% 20%,#ff9d4b88 0 1px,transparent 3px) 0 0 / 163px 167px; animation:store-halloween-embers 24s linear infinite; }
.store-profile-live-haunted-moon::before { background:radial-gradient(ellipse at 10% 60%,#c4b5fd28,transparent 55%),radial-gradient(circle at 70% 20%,#ede9fe99 0 1px,transparent 3px) 0 0 / 141px 137px; background-size:150% 140%,141px 137px; animation:store-live-aurora 18s ease-in-out infinite alternate; }
.store-profile-live-pumpkin-lantern::after,.store-profile-live-haunted-moon::after { background-image:var(--halloween-ornament),radial-gradient(ellipse at 95% 90%,color-mix(in srgb,var(--profile-cosmetic-tint) 20%,transparent),transparent 60%); background-repeat:no-repeat; background-position:right 16px bottom 12px,center; background-size:76px 76px,100% 100%; animation:store-halloween-glow 6s ease-in-out infinite alternate; }
.social-item.store-profile-live-pumpkin-lantern::after,.social-item.store-profile-live-haunted-moon::after,.profile-update-row.store-profile-live-pumpkin-lantern::after,.profile-update-row.store-profile-live-haunted-moon::after { background-size:38px 38px,100% 100%; opacity:.4; }
:is(.store-preview-avatar,.store-avatar-frame):is(.store-frame-pumpkin-lantern,.store-frame-haunted-moon)::before { inset:-6px; border:2px solid var(--halloween-frame-color); border-radius:50%; background:conic-gradient(from 20deg,transparent 15%,var(--halloween-frame-color) 20%,transparent 25% 65%,var(--halloween-frame-color) 70%,transparent 75%); box-shadow:0 0 0 3px #100e2466,0 0 14px color-mix(in srgb,var(--halloween-frame-color) 45%,transparent); animation:store-halloween-glow 5s ease-in-out infinite alternate; }
.store-frame-pumpkin-lantern { --halloween-frame-color:#ffb454; }
.store-frame-haunted-moon { --halloween-frame-color:#c9a7ff; }
:is(.store-preview-avatar,.store-avatar-frame):is(.store-frame-pumpkin-lantern,.store-frame-haunted-moon) .store-frame-deco.one { width:36%; height:36%; right:-10%; bottom:-6%; top:auto; background:var(--halloween-ornament) center / contain no-repeat; filter:drop-shadow(0 2px 3px #100e24); }
:is(.store-preview-avatar,.store-avatar-frame):is(.store-frame-pumpkin-lantern,.store-frame-haunted-moon) .store-frame-deco.two { width:8px; height:8px; left:0; top:4%; background:var(--halloween-frame-color); clip-path:polygon(50% 0,65% 35%,100% 50%,65% 65%,50% 100%,35% 65%,0 50%,35% 35%); }
.store-preview-banner-pumpkin-lantern,.store-preview-banner-haunted-moon { background:linear-gradient(135deg,#281626,#152238); }
.store-preview-banner-pumpkin-lantern i,.store-preview-banner-haunted-moon i { inset:8px; background:var(--halloween-ornament) right center / 52px 52px no-repeat; animation:store-halloween-glow 6s ease-in-out infinite alternate; }
.profile-hero.store-banner-pumpkin-lantern::after,.profile-hero.store-banner-haunted-moon::after { background-image:var(--halloween-ornament),radial-gradient(ellipse at 90% 20%,var(--halloween-aura-color),transparent 55%); background-position:right 22px top 15px,center; background-repeat:no-repeat; background-size:72px 72px,100% 100%; animation:store-halloween-glow 6s ease-in-out infinite alternate; }
.store-banner-pumpkin-lantern { --halloween-aura-color:#f59e0b40; }
.store-banner-haunted-moon { --halloween-aura-color:#a78bfa45; }
.store-collection-season { color:var(--soft); font-size:.8rem; line-height:1.6; }
@keyframes store-halloween-embers { from { background-position:0 0,0 0; } to { background-position:91px -113px,-163px -167px; } }
@keyframes store-halloween-glow { from { opacity:.65; } to { opacity:1; } }
@media(prefers-reduced-motion:reduce) {
 .store-profile-background-live::before,.store-profile-background-live::after,
 :is(.store-preview-avatar,.store-avatar-frame):is(.store-frame-pumpkin-lantern,.store-frame-haunted-moon)::before,
 .store-preview-banner-pumpkin-lantern i,.store-preview-banner-haunted-moon i,
 .profile-hero.store-banner-pumpkin-lantern::after,.profile-hero.store-banner-haunted-moon::after { animation:none; }
}

/* Keep small statistics quiet and leave room for the actual profile content. */
.profile-stat:is(.store-profile-live-pumpkin-lantern,.store-profile-live-haunted-moon)::after { background-image:radial-gradient(ellipse at 95% 90%,color-mix(in srgb,var(--profile-cosmetic-tint) 18%,transparent),transparent 60%); }
:is(.profile-about-panel,.profile-collections-panel,.profile-activity-panel,.profile-list-panel):is(.store-profile-live-pumpkin-lantern,.store-profile-live-haunted-moon)::after { background-size:48px 48px,100% 100%; }
.store-preview-banner-pumpkin-lantern :is(i,b,em),.store-preview-banner-haunted-moon :is(i,b,em) { border:0; }
.store-preview-banner-pumpkin-lantern :is(b,em),.store-preview-banner-haunted-moon :is(b,em) { display:none; }

:is(.store-preview-avatar,.store-avatar-frame):is(.store-frame-pumpkin-lantern,.store-frame-haunted-moon)::before { mask:radial-gradient(farthest-side,transparent calc(100% - 5px),#000 calc(100% - 4px)); }

/* Live Halloween polish: restrained ornament, moving light and fine particles. */
:is(.profile-about-panel,.profile-status-overview,.profile-collections-panel,.profile-activity-panel,.profile-list-panel,.profile-stat,.social-item,.profile-update-row):is(.store-profile-live-pumpkin-lantern,.store-profile-live-haunted-moon)::after {
 background-image:radial-gradient(ellipse at 90% 90%,color-mix(in srgb,var(--profile-cosmetic-tint) 14%,transparent),transparent 65%); background-size:100% 100%;
}
.store-profile-background-pumpkin-lantern { background:radial-gradient(ellipse at 100% 0%,#b4530940,transparent 55%),radial-gradient(ellipse at 0% 90%,#78350f40,transparent 65%),var(--panel,#102136); }
.store-profile-background-haunted-moon { background:radial-gradient(ellipse at 100% 0%,#7c3aed40,transparent 55%),radial-gradient(ellipse at 0% 90%,#4338ca30,transparent 65%),var(--panel,#102136); }
.store-profile-live-pumpkin-lantern::before { background:radial-gradient(circle,#ffcf95cc 0 1px,transparent 2.5px) 0 0 / 103px 127px,radial-gradient(circle,#ff984b99 0 1px,transparent 3px) 35px 30px / 173px 191px; animation:store-halloween-rising 12s linear infinite; }
.store-profile-live-haunted-moon::before { background:radial-gradient(ellipse at 15% 60%,#c4b5fd35,transparent 55%) 0 0 / 160% 140%,radial-gradient(circle,#e9dcffbb 0 1px,transparent 2.5px) 0 0 / 137px 149px; animation:store-halloween-mist 10s ease-in-out infinite alternate; }
:is(.store-profile-live-pumpkin-lantern,.store-profile-live-haunted-moon)::after { animation:store-halloween-breathe 4s ease-in-out infinite alternate; }
:is(.store-preview-avatar,.store-avatar-frame):is(.store-frame-pumpkin-lantern,.store-frame-haunted-moon)::before { background:conic-gradient(from 0deg,transparent 0 10%,var(--halloween-frame-color) 18% 22%,transparent 30% 60%,var(--halloween-frame-color) 68% 72%,transparent 80%); animation:store-halloween-ring 6s linear infinite; }
:is(.store-preview-avatar,.store-avatar-frame):is(.store-frame-pumpkin-lantern,.store-frame-haunted-moon) .store-frame-deco.one { width:30%; height:30%; right:-5%; bottom:-4%; animation:store-halloween-lantern 3s ease-in-out infinite alternate; }
:is(.store-preview-avatar,.store-avatar-frame):is(.store-frame-pumpkin-lantern,.store-frame-haunted-moon) .store-frame-deco.two { animation:store-halloween-breathe 2s ease-in-out infinite alternate; }
.profile-hero.store-banner-pumpkin-lantern::before,.profile-hero.store-banner-haunted-moon::before { content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none; z-index:2; background:radial-gradient(circle,#ffcd8cbb 0 1px,transparent 3px) 0 0 / 137px 157px,radial-gradient(ellipse at 80% 50%,#f59e0b22,transparent 65%); animation:store-halloween-rising 12s linear infinite; }
.profile-hero.store-banner-haunted-moon::before { background:radial-gradient(circle,#e9dcffbb 0 1px,transparent 3px) 0 0 / 137px 157px,radial-gradient(ellipse at 80% 50%,#a78bfa30,transparent 65%); animation:store-halloween-mist 10s ease-in-out infinite alternate; }
.profile-hero.store-banner-pumpkin-lantern::after,.profile-hero.store-banner-haunted-moon::after { background-size:58px 58px,100% 100%; animation:store-halloween-lantern 3s ease-in-out infinite alternate; }
.store-preview-banner-pumpkin-lantern i,.store-preview-banner-haunted-moon i { animation:store-halloween-lantern 3s ease-in-out infinite alternate; }
.store-preview-banner-pumpkin-lantern b,.store-preview-banner-haunted-moon b { display:block; inset:0; border:0; background:radial-gradient(circle,#ffdfbbaa 0 1px,transparent 2px) 0 0 / 41px 47px; animation:store-halloween-rising 8s linear infinite; }
@keyframes store-halloween-rising { from { background-position:0 0,35px 30px; } to { background-position:103px -127px,-138px -161px; } }
@keyframes store-halloween-mist { from { background-position:0% 20%,0 0; opacity:.5; } to { background-position:100% 70%,24px -36px; opacity:1; } }
@keyframes store-halloween-breathe { from { opacity:.35; } to { opacity:.9; } }
@keyframes store-halloween-ring { to { transform:rotate(360deg); } }
@keyframes store-halloween-lantern { from { filter:drop-shadow(0 0 2px var(--halloween-frame-color,#bf93ed)); opacity:.75; } to { filter:drop-shadow(0 0 7px var(--halloween-frame-color,#ffc36c)); opacity:1; } }
@media(prefers-reduced-motion:reduce) {
 :is(.store-profile-live-pumpkin-lantern,.store-profile-live-haunted-moon)::before,:is(.store-profile-live-pumpkin-lantern,.store-profile-live-haunted-moon)::after,
 :is(.store-frame-pumpkin-lantern,.store-frame-haunted-moon)::before,:is(.store-frame-pumpkin-lantern,.store-frame-haunted-moon) .store-frame-deco,
 .profile-hero.store-banner-pumpkin-lantern::before,.profile-hero.store-banner-haunted-moon::before,.profile-hero.store-banner-pumpkin-lantern::after,.profile-hero.store-banner-haunted-moon::after,
 :is(.store-preview-banner-pumpkin-lantern,.store-preview-banner-haunted-moon) :is(i,b) { animation:none; }
}

@media(prefers-reduced-motion:reduce) {
 :is(.store-preview-avatar,.store-avatar-frame):is(.store-frame-pumpkin-lantern,.store-frame-haunted-moon)::before,
 :is(.store-preview-avatar,.store-avatar-frame):is(.store-frame-pumpkin-lantern,.store-frame-haunted-moon) .store-frame-deco { animation:none; }
}

.store-preview-handle { display:block; color:var(--soft); font-size:.7rem; font-weight:500; margin-top:4px; overflow:hidden; text-overflow:ellipsis; max-width:100%; }
.store-preview-name { max-width:100%; overflow-wrap:anywhere; text-align:center; }
.store-preview-person { display:flex; align-items:center; gap:12px; padding:14px; position:relative; z-index:1; min-width:0; }
.store-preview-person > span { min-width:0; overflow:hidden; }
.store-preview-person strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:180px; }
.store-preview-person-avatar { flex:0 0 38px; width:38px; height:38px; border-radius:50%; object-fit:cover; object-position:var(--avatar-focus-x,50%) var(--avatar-focus-y,50%); display:inline-grid; place-items:center; background:var(--panel); }
.store-preview-avatar .store-avatar-frame-media { border-radius:50%; object-position:var(--avatar-focus-x,50%) var(--avatar-focus-y,50%); }
.store-preview-banner-photo { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; border-radius:inherit; }
.store-preview-banner:has(.store-preview-banner-photo) { background:transparent; }
.store-preview-banner :is(i,b,em) { z-index:1; pointer-events:none; }
.store-preview-banner-identity { display:flex; align-items:center; gap:8px; position:absolute; inset:auto 8px 8px; z-index:2; padding:5px 8px; border-radius:10px; background:#081321b8; font-size:.75rem; color:#fff; }
.store-preview-banner-identity strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.store-preview-banner-identity .store-preview-person-avatar { width:26px; height:26px; flex-basis:26px; }
.store-preview-badge-person { display:flex; flex-wrap:wrap; gap:8px; align-items:center; justify-content:center; padding:8px; }
.store-preview-badge-person > strong { max-width:100%; overflow-wrap:anywhere; }
.store-preview-badge-person .store-preview-handle { flex-basis:100%; text-align:center; }

.continue-card .continue-release-time,.home-today-item-copy .continue-release-time {
 display:block; min-width:0; max-width:100%; color:var(--accent); font-size:.73rem;
 line-height:1.4; white-space:normal; overflow-wrap:anywhere; font-variant-numeric:tabular-nums;
}

/* Keep release notes and progress bars aligned across the Continue Watching rail. */
.continue-card .continue-release-slot {
 display:block; height:2.8em; min-height:2.8em; font-size:.73rem; line-height:1.4;
 white-space:normal; overflow:hidden;
}
.continue-card .continue-release-slot .continue-release-time {
 display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2;
 overflow:hidden; font-size:inherit; line-height:inherit; white-space:normal;
}

/* Give people names room in narrow media panels and dialogs. */
.character-preview-grid,
.staff-preview-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.character-modal-grid,
.staff-modal-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.character-row > div,
.staff-row > div {
  min-width: 0;
}
.character-row .media-title,
.staff-row .media-title {
  display: block;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .character-row,
  .staff-row {
    grid-template-columns: 48px minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 6px;
  }
  .character-row > .avatar,
  .staff-row > .avatar {
    grid-row: 1 / 3;
    width: 48px;
    height: 48px;
  }
  .character-row > .pill,
  .staff-row > .pill {
    grid-column: 2;
    justify-self: start;
    max-width: 100%;
  }
}
/* Small OP/ED panel in the existing anime sidebar. */
.detail-layout > aside.stack { align-self:start; align-content:start; min-width:0; }
.anime-themes.panel { padding:12px; min-width:0; align-self:start; }
.anime-themes-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.anime-themes-heading h2 { margin:0; font-size:.95rem; }
.anime-themes-source { font-size:.68rem; color:var(--muted); white-space:nowrap; }
.anime-themes-content { margin-top:12px; }
.anime-theme-groups { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; }
.anime-theme-group { min-width:0; }
.anime-themes .anime-theme-group h3 { margin:0 0 5px; font-size:.75rem; color:var(--muted); }
.anime-theme-song { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:7px; align-items:start; padding:7px 0; border-top:1px solid var(--line); }
.anime-theme-number { font-size:.62rem; font-weight:800; background:rgb(var(--accent-rgb) / .15); color:var(--accent); padding:3px 5px; border-radius:5px; white-space:nowrap; }
.anime-theme-copy { min-width:0; display:grid; gap:2px; overflow-wrap:anywhere; }
.anime-theme-copy > strong { font-size:.8rem; line-height:1.35; }
.anime-theme-copy > span,.anime-theme-copy small { color:var(--muted); font-size:.7rem; line-height:1.35; }
.anime-theme-copy small:empty { display:none; }
.anime-theme-version { display:block; min-width:0; }
.anime-theme-version select { width:100%; max-width:100%; font:inherit; font-size:.68rem; color:var(--muted); background:var(--panel,#102137); border:1px solid var(--line); border-radius:5px; padding:3px; }
.anime-theme-play { min-width:34px; min-height:34px; font-size:.7rem; padding:5px 7px; }
.anime-theme-player { grid-column:1/-1; min-width:0; }
.anime-theme-player video { display:block; width:100%; max-height:220px; border-radius:8px; background:#000; }
.anime-theme-player[hidden] { display:none; }

/* Screenshot search stays separate from ordinary title queries. */
.global-search .input { padding-right:48px; }
.image-search-trigger { position:absolute; right:8px; top:50%; transform:translateY(-50%); display:grid; place-items:center; width:34px; height:34px; color:var(--accent); border-radius:9px; }
.image-search-trigger:hover,.image-search-trigger:focus-visible { background:rgb(var(--accent-rgb) / .15); }
.screenshot-search { max-width:850px; }
.screenshot-drop { display:grid; justify-items:center; gap:12px; padding:24px 12px; border:1px dashed var(--line); border-radius:12px; cursor:pointer; }
.screenshot-drop input { max-width:100%; }
.screenshot-selected { max-width:100%; max-height:240px; object-fit:contain; border-radius:8px; }
.screenshot-result-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); gap:12px; }
.screenshot-result { display:grid; align-content:start; gap:8px; padding:14px; border:1px solid var(--line); border-radius:12px; min-width:0; overflow-wrap:anywhere; }
.screenshot-result .actions { flex-wrap:wrap; }
.scene-preview video { width:100%; max-height:250px; }
.screenshot-results { margin-top:18px; }

/* Image search opens beside normal search, without leaving the current page. */
.image-search-trigger { border:0; background:transparent; cursor:pointer; }
.live-search-dropdown.image-search-popup { position:fixed; z-index:12000; bottom:auto; right:auto; margin:0; overflow:auto; padding:12px; overscroll-behavior:contain; }
.image-search-popup-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.image-search-popup-heading strong { font-size:.9rem; }
.image-search-popup .screenshot-search { border:0; background:none; padding:0; box-shadow:none; }
.image-search-popup .screenshot-drop { padding:14px 8px; gap:8px; font-size:.8rem; }
.image-search-popup .screenshot-selected { max-height:130px; }
.image-search-popup .page-copy,.image-search-popup [data-image-availability] { font-size:.75rem; line-height:1.45; margin:9px 0; }
.image-search-popup .button { min-height:34px; font-size:.75rem; padding:6px 9px; }
.image-search-popup .screenshot-result-grid { grid-template-columns:minmax(0,1fr); gap:8px; }
.image-search-popup .screenshot-result { padding:10px; gap:5px; }
.image-search-popup .screenshot-results { margin-top:12px; }

.screenshot-alternatives { margin-top:12px; }
.screenshot-alternatives > summary { cursor:pointer; font-size:.75rem; color:var(--muted); padding:8px 0; }
.screenshot-alternatives .screenshot-result-grid { margin-top:6px; }

.home-trending-wrap .home-trending-panel {
  gap: 0;
  border-radius: 20px;
}

.home-trending-wrap .home-trending-hero {
  background: #080e1f;
}

.home-trending-wrap .home-trending-backdrop {
  filter: saturate(1.08);
}

.home-trending-wrap .home-trending-backdrop.is-cover-backdrop {
  filter: blur(12px) saturate(1.12);
}

.home-trending-wrap .home-trending-hero::before {
  background: linear-gradient(90deg, #080e1f 0%, rgba(8, 14, 31, 0.90) 28%, rgba(8, 14, 31, 0.38) 72%, rgba(8, 14, 31, 0.60));
}

.home-trending-wrap .home-trending-hero::after {
  background: linear-gradient(0deg, rgba(8, 14, 31, 0.68), transparent 44%);
}

.home-trending-wrap .home-trending-copy {
  width: min(510px, 100%);
}

.home-trending-kicker,
.home-trending-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  min-width: 0;
}

.home-trending-kicker .pill {
  border-color: rgb(var(--accent-rgb) / 0.44);
  background: rgb(var(--accent-rgb) / 0.20);
  color: var(--accent-strong);
  font-weight: 750;
}

.home-trending-position,
.home-trending-facts {
  color: #d6deed;
  font-size: 0.81rem;
}

.home-trending-position {
  font-variant-numeric: tabular-nums;
}

.home-trending-rating {
  color: #ffe4a3;
  font-weight: 750;
}

.home-trending-wrap .home-trending-copy h2 {
  color: #fff;
  text-wrap: balance;
}

.home-trending-wrap .home-trending-art {
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.26);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42);
  transform: none;
}

.home-trending-wrap .home-trending-dots button.active {
  width: 22px;
}

@media (max-width: 760px) {
  .home-trending-wrap .home-trending-panel {
    height: 380px;
    min-height: 380px;
  }

  .home-trending-wrap .home-trending-hero {
    grid-template-columns: minmax(0, 1fr);
    align-content: end;
    padding: 130px 16px 34px;
  }

  .home-trending-wrap .home-trending-hero::before {
    background: linear-gradient(180deg, rgba(8, 14, 31, 0.12), rgba(8, 14, 31, 0.82) 42%, #080e1f 85%);
  }

  .home-trending-wrap .home-trending-art {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 78px;
  }

  .home-trending-wrap .home-trending-copy h2 {
    font-size: clamp(1.35rem, 5.6vw, 2.15rem);
  }
}

/* Match the space taken by the fixed Live Chat dock on Home. */
@media (min-width: 1051px) {
  body.home-route {
    --home-chat-width: 360px;
    --home-chat-right: 28px;
  }

  body.home-route .chat-panel,
  body.home-route .chat-panel.open {
    width: var(--home-chat-width);
    right: var(--home-chat-right);
  }

  .home-trending-area {
    margin-left: calc(-1 * var(--page-pad-x));
    padding-right: max(0px, calc(var(--home-chat-width) + var(--home-chat-right) - var(--page-pad-x)));
  }

  .home-page-head {
    padding-right: max(0px, calc(var(--home-chat-width) + var(--home-chat-right) - var(--page-pad-x) + 12px));
  }

  .home-page-head #open-mobile-chat {
    display: none;
  }
}

@media (min-width: 1051px) and (max-width: 1240px) {
  body.home-route {
    --home-chat-width: 324px;
    --home-chat-right: 14px;
  }
}

.home-trending-wrap {
  width: min(100%, 1120px);
  margin: 0 auto;
}

.home-page-head {
  margin-bottom: 8px;
}

.home-trending-heading {
  margin: 0 0 4px;
  text-align: center;
  font-size: 1.05rem;
}

.home-head-actions[data-home-actions] {
  position: relative;
  align-items: center;
}

.home-head-actions .home-today-popover {
  width: min(590px, calc(100vw - 28px));
  top: calc(100% + 8px);
}

.cover-showcase.cover-showcase-trending {
  container-type: inline-size;
  min-height: 0;
  margin: 0 auto;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.cover-showcase-trending .cover-showcase-inner {
  max-width: none;
  padding: 0 0 4px;
}

.cover-showcase-trending .cover-showcase-stage {
  width: 100%;
  max-width: 1120px;
  height: 332px;
  margin: 0 auto;
}

.cover-showcase-trending .cover-showcase-poster {
  width: 228px;
  height: 320px;
  left: calc(50% - 114px);
  top: 4px;
  border-radius: 10px;
  box-shadow: 0 5px 12px #0006;
}

.cover-showcase-trending .cover-showcase-details {
  min-height: 0;
  padding: 0 10px;
  text-align: center;
}

.trending-showcase-title {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@container (max-width: 520px) {
  .cover-showcase-trending .cover-showcase-stage {
    height: 222px;
  }

  .cover-showcase-trending .cover-showcase-poster {
    width: 150px;
    height: 210px;
    left: calc(50% - 75px);
  }
}

body.home-route #view { padding-top: 0; }
@media (min-width: 761px) {
  body.home-route .main { padding-top: calc(var(--topbar-height) + max(10px, var(--safe-top)) + 2px); }
}

.home-trending-area {
  container-type: inline-size;
}

.home-trending-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas: "fan fan" "coming monthly";
  align-items: center;
  gap: 10px;
}

.home-trending-layout > [data-home-live-panel="trending"] { grid-area: fan; min-width: 0; }
.home-highlight-coming { grid-area: coming; }
.home-highlight-monthly { grid-area: monthly; }

.home-highlight {
  width: min(100%, 190px);
  justify-self: center;
  min-width: 0;
  padding: 10px;
  text-align: center;
  border: 1px solid rgb(var(--accent-rgb) / .20);
  border-radius: 12px;
  background: rgb(var(--surface-rgb) / .45);
}

.home-highlight h3 {
  margin: 0 0 6px;
  font-size: .88rem;
  color: var(--accent-strong);
}

.home-highlight-title {
  display: grid;
  gap: 7px;
  justify-items: center;
  color: var(--text);
  text-decoration: none;
}

.home-highlight-cover {
  width: min(100%, 162px);
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 8px;
}

.home-highlight-title > span { min-width: 0; width: 100%; min-height: 4.2rem; }
.home-highlight-title small { display: block; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-highlight-title strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: .9rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.home-highlight-title small,
.home-highlight-fallback {
  color: var(--muted);
  font-size: .72rem;
}

.home-highlight-title time { line-height: 1.2;
  display: block;
  font-size: .83rem;
  font-weight: 800;
  color: var(--accent-strong);
  font-variant-numeric: tabular-nums;
}

@container (min-width: 860px) {
  .home-trending-layout {
    --home-fan-width: clamp(520px, calc(100cqw - 376px), 1120px);
    /* The outer covers end inside the fan's column. Include that space in each side card's center. */
    --home-highlight-inset: calc(var(--home-fan-width) / 28 - 2px);
    grid-template-columns: minmax(0, 1fr) var(--home-fan-width) minmax(0, 1fr);
    column-gap: 0;
    grid-template-areas: "coming fan monthly";
  }

  .home-highlight-coming {
    translate: var(--home-highlight-inset) 0;
  }

  .home-highlight-monthly {
    translate: calc(-1 * var(--home-highlight-inset)) 0;
  }

}

@container (width < 860px) {
  .home-trending-layout > .home-highlight {
    align-self: stretch;
    width: min(100%, 140px);
    padding: 7px;
  }

  .home-highlight-cover {
    width: min(100%, 108px);
  }
}

.cover-showcase {
  container-type: inline-size;
}

.cover-showcase-stage {
  --showcase-cover-edge: 96px;
  --showcase-cover-span: 8;
  --showcase-cover-preferred: 122px;
  --showcase-cover-step: min(var(--showcase-cover-preferred), max(0px, calc((100cqw - 2 * var(--showcase-cover-edge)) / var(--showcase-cover-span))));
}

@media (max-width: 600px) {
  .cover-showcase-stage {
    --showcase-cover-edge: 78px;
    --showcase-cover-preferred: 86px;
  }
}

.cover-showcase-trending .cover-showcase-stage {
  --showcase-cover-edge: 124px;
  --showcase-cover-span: 7;
  --showcase-cover-preferred: min(15cqw, 164px);
}

@container (max-width: 520px) {
  .cover-showcase-trending .cover-showcase-stage {
    --showcase-cover-edge: 86px;
    --showcase-cover-preferred: min(12.5cqw, 142px);
  }
}

/* Streaming catalog and its dedicated navigation. */
.streaming-shell {
  --stream-edge: clamp(14px, 3vw, 56px);
  --stream-topbar-top: calc(10px + var(--safe-top));
  --stream-topbar-height: 60px;
  color: #f7f8fc;
  background: #090b11;
}
.streaming-shell .main {
  min-width: 0;
  padding-top: calc(var(--stream-topbar-top) + var(--stream-topbar-height));
}
.streaming-shell .topbar {
  position: fixed !important;
  z-index: 94;
  inset: 0 0 auto;
  top: var(--stream-topbar-top) !important;
  margin: 0 auto !important;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  width: max-content;
  max-width: calc(100% - 2 * var(--stream-edge));
  gap: clamp(8px, 1.5vw, 24px);
  height: var(--stream-topbar-height);
  padding: 6px 10px;
  border: 1px solid #ffffff22;
  border-radius: 100px;
  background: #10131bec;
  box-shadow: 0 8px 30px #0006;
}
.streaming-shell .content { width: 100%; max-width: none; padding: 0; }
.streaming-shell .content > .streaming-page { padding: 24px var(--stream-edge); }
.streaming-brand { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; }
.streaming-brand-logo { display: block; width: 38px; height: 38px; object-fit: contain; }
.streaming-welcome-hero .streaming-brand-logo { margin-inline: auto; }
.streaming-header-links, .streaming-header-actions { display: flex; align-items: center; flex: none; gap: 5px; }
.streaming-shell .streaming-header-actions { width: auto; }
.streaming-shell:not(:has(#streaming-source-modal)) .streaming-header-add { display: none; }
.streaming-header-add svg { width: 20px; height: 20px; }
.streaming-header-links a, .streaming-category-link {
  padding: 7px 10px; border-radius: 999px; white-space: nowrap; color: #dce3ee; font-size: .86rem; font-weight: 700;
}
.streaming-header-links a:hover, .streaming-header-links a[aria-current], .streaming-category-link:hover { background: #ffffff20; }
.streaming-shell .top-actions .top-utility-button, .streaming-shell .top-profile-button { flex: none; }
.streaming-shell .signed-auth-trigger .top-profile-label { display: none; }
.streaming-shell :is(.top-auth-popover,.notification-popover) { max-width: min(380px, calc(100vw - 36px)); }
.streaming-mobile-nav { display: none; }
@media (max-width:980px) {
  body:has(.streaming-mobile-nav) #asuna-show {
    bottom:calc(max(10px, env(safe-area-inset-bottom)) + 72px);
    right:16px;
  }
}
.streaming-landing { padding: 0 var(--stream-edge, 16px) 64px; min-height: 60vh; }
.streaming-landing > h1 { margin: 14px 0 18px; font-size: clamp(1.65rem, 4vw, 2.6rem); }
.streaming-manage { display: flex; justify-content: flex-end; padding: 8px 0; }
.streaming-spotlight {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  min-height: clamp(410px, 57vw, 720px);
  margin: 12px 0 clamp(20px, 3vw, 44px);
  border-radius: clamp(14px, 1.6vw, 26px);
  background: #131e30;
}
.streaming-spotlight-art, .streaming-spotlight::after {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.streaming-spotlight-art { z-index: 0; object-fit: cover; object-position: 70% 35%; }
.poster-backdrop .streaming-spotlight-art { inset-inline-start: auto; width: min(100%, 58rem); object-position: center 30%; }
.streaming-spotlight::after {
  content: ""; z-index: 2; pointer-events: none;
  background: linear-gradient(90deg,#080b12ee 0%,#080b1277 48%,transparent 80%),
              linear-gradient(0deg,#080b12f5 0%,transparent 68%);
}
.streaming-spotlight-copy { position: relative; z-index: 3; max-width: min(100%, 710px); padding: clamp(18px, 4vw, 64px); }
.streaming-spotlight h1 { margin: 8px 0; font-size: clamp(2.25rem, 5vw, 5.35rem); line-height: 1.01; text-wrap: balance; color: #fff; }
.streaming-title-logo { display: none; background: transparent; }
.streaming-title-logo.is-loaded {
  display: block; width: auto; max-width: min(100%, 420px); height: auto;
  max-height: clamp(72px, 15vw, 170px); object-fit: contain; object-position: left;
  filter: drop-shadow(0 3px 14px #000a);
}
.streaming-title-logo.is-loaded { filter: none; }
.streaming-preview-title .streaming-title-logo.is-loaded { max-height: clamp(66px, 12vw, 126px); }
.streaming-title-logo.is-loaded + span {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.streaming-spotlight-meta { color: #dce6f2; font-weight: 700; }
.streaming-spotlight-scores { display: flex; flex-wrap: wrap; gap: 3px 14px; }
.streaming-spotlight-scores > span { white-space: nowrap; }
.streaming-spotlight-summary {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
  overflow: hidden; max-width: 54ch; color: #edf0f8; margin: 10px 0 18px;
}
.streaming-spotlight-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.streaming-spotlight-actions a { padding: 10px 15px; border-radius: 9px; font-weight: 800; }
.streaming-play-cta { background: #f4f8ff; color: #10131c; }
.streaming-info-cta { background: #ffffff28; color: #fff; }
.streaming-shelf { margin-block: clamp(20px, 3vw, 42px); min-width: 0; }
.streaming-shelf-heading { display: flex; align-items: center; justify-content: space-between; min-height: 35px; margin-bottom: 8px; }
.streaming-shelf h2 { margin: 0; color: #f7f8fc; font-size: clamp(1.12rem, 1.8vw, 1.65rem); }
.streaming-shelf-controls button {
  border: 1px solid #ffffff28; background: #1a202c; color: #fff; border-radius: 50%;
  width: 32px; height: 32px; cursor: pointer; font-size: 1.25rem;
}
.streaming-shelf-controls button:disabled { opacity: .35; cursor: default; }
.streaming-shelf-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(210px, 16.2vw, 365px);
  gap: clamp(6px, .65vw, 12px); overflow-x: auto; overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none; padding: 3px 2px 9px;
}
.streaming-shelf-track::-webkit-scrollbar { display: none; }
.streaming-shelf-track.can-drag .streaming-tile { cursor: grab; }
.streaming-shelf-track.dragging .streaming-tile { cursor: grabbing; }
.streaming-tile {
  position: relative; display: grid; min-width: 0; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 9px; isolation: isolate; background: #171e29; color: #fff; scroll-snap-align: start;
}
.streaming-tile picture, .streaming-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.streaming-tile::after { content: ""; position: absolute; inset: 28% 0 0; z-index: 0; background: linear-gradient(transparent,#02050bec); pointer-events: none; }
.streaming-tile:hover, .streaming-tile:focus-visible { outline: 2px solid #9bdcff; outline-offset: -2px; }
.streaming-tile-caption { align-self: end; z-index: 1; min-width: 0; padding: 10px; display: grid; gap: 2px; line-height: 1.2; }
.streaming-tile-caption strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.streaming-tile-caption small { color: #d7e6f4; }
.streaming-tile-quick-info { display: none; min-width: 0; gap: 3px; }
.streaming-tile-quick-facts { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.streaming-tile-quick-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.streaming-tile-caption .streaming-tile-quick-score { color: #b0e7ff; font-weight: 700; white-space: nowrap; }
.streaming-tile-quick-summary {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; line-height: 1.25;
}
.streaming-tile.has-quick-info:focus-visible::after {
  inset: 0; background: linear-gradient(#060d167d, #060d16f7 88%);
}
.streaming-tile.has-quick-info:focus-visible .streaming-tile-quick-info { display: grid; }
.streaming-tile.has-quick-info:focus-visible :is(.streaming-card-note, .streaming-home-card-labels) { display: none; }
@media (hover: hover) and (pointer: fine) {
  .streaming-tile.has-quick-info:hover::after {
    inset: 0; background: linear-gradient(#060d167d, #060d16f7 88%);
  }
  .streaming-tile.has-quick-info:hover .streaming-tile-quick-info { display: grid; }
  .streaming-tile.has-quick-info:hover :is(.streaming-card-note, .streaming-home-card-labels) { display: none; }
}
.streaming-tile progress { position: absolute; inset: auto 8px 3px; width: calc(100% - 16px); height: 4px; z-index: 2; accent-color: #89d8ff; }
.streaming-browse-links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.streaming-browse-links a { background: #202a3a; color: #f7f8fc; border-radius: 999px; padding: 8px 12px; }
.streaming-filter { display: grid; gap: 6px; max-width: 540px; margin-bottom: 20px; font-weight: 700; }
.streaming-filter input {
  border: 1px solid #697b97; border-radius: 9px; background: #141a25; color: #fff; padding: 10px 12px; font: inherit; min-width: 0;
}
.streaming-result-grid, .streaming-genre-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 214px), 1fr)); gap: 10px;
}
.streaming-language-page { padding-block: 24px; }
.streaming-language-header {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between;
  gap: 20px; padding-block-end: 20px; border-bottom: 1px solid #6d82a340;
}
.streaming-language-header h1 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.5rem); }
.streaming-language-header p { margin: 6px 0 0; color: #b8c7df; }
.streaming-language-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.streaming-language-filters label { display: grid; gap: 5px; flex: 1; color: #c5d4ea; font-size: .84rem; }
.streaming-language-filters select {
  width: 100%; min-width: min(155px, 40vw); min-height: 42px; padding: 6px 10px;
  border: 1px solid #53708b; border-radius: 9px; background: #111e30; color: #f4f8ff; font: inherit;
}
.streaming-language-count, .streaming-language-coverage { color: #b8c7df; font-size: .86rem; }
.streaming-language-count { margin: 16px 0 12px; }
.streaming-language-result { min-width: 0; }
.streaming-language-result-coverage,
.streaming-availability-note {
  display: block;
  margin: 6px 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}
.streaming-language-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 16px 12px;
}
.streaming-language-grid .streaming-tile { width: 100%; aspect-ratio: 16 / 9; min-height: 0; }
.streaming-language-grid .streaming-tile > .streaming-cover-logo {
  bottom: 0; padding: 20px 10px 10px; background: linear-gradient(transparent, #080e1be6);
}
.streaming-language-grid .streaming-tile[data-watch-status] > .streaming-cover-logo { padding-inline: 36px; }
.streaming-language-grid .streaming-cover-logo .streaming-title-logo { width: 68%; height: clamp(26px, 4vw, 56px); }
@media (max-width: 640px) {
  .streaming-language-filters { width: 100%; }
  .streaming-language-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}
.streaming-genre-grid a { display: grid; gap: 6px; padding: 18px; border-radius: 10px; background: #191f2c; }
.streaming-genre-grid a:hover { background: #27364d; }
.streaming-genre-grid small { color: #bdc9d9; }
@media (max-width: 980px) {
  .streaming-shell .streaming-header-links { display: none; }
  .streaming-shell .topbar { width: calc(100% - 2 * var(--stream-edge)); }
  .streaming-mobile-nav {
    display: flex; position: fixed; z-index: 90; bottom: max(10px, env(safe-area-inset-bottom)); left: 50%;
    transform: translateX(-50%); width: min(380px, calc(100% - 24px)); justify-content: space-between;
    border: 1px solid #ffffff25; border-radius: 999px; background: #10131bee; padding: 4px;
    box-shadow: 0 6px 25px #0009;
  }
  .streaming-mobile-nav a { flex: 1; display: grid; gap: 3px; justify-items: center; padding: 6px 1px; border-radius: 999px; color: #e1e6f0; font-size: .73rem; }
  .streaming-mobile-nav a[aria-current] { background: #2c384e; color: #fff; }
  .streaming-mobile-nav svg { width: 21px; height: 21px; }
  .streaming-shell { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .streaming-shell .cookie-consent { bottom: calc(72px + env(safe-area-inset-bottom)); }
}
@media (max-width: 640px) {
  .streaming-shell { --stream-topbar-height: 54px; }
  .streaming-shell .topbar { padding-inline: 6px; gap: 4px; }
  .streaming-header-actions .streaming-category-link, .streaming-shell .guest-auth-trigger .top-profile-label { display: none; }
  .streaming-spotlight { min-height: min(125vw, 510px); }
  .streaming-spotlight::after { background: linear-gradient(0deg,#080b12fa 0%,#080b1288 42%,transparent 83%); }
  .streaming-spotlight-summary { -webkit-line-clamp: 2; }
  .streaming-shelf-track { grid-auto-columns: clamp(106px, 28vw, 170px); }
  .streaming-result-grid { grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); }
  .streaming-tile { aspect-ratio: 2 / 3; }
  .streaming-tile-caption { font-size: .83rem; padding: 8px; }
  .streaming-shelf-controls { display: none; }
}
@media (max-width: 360px) {
  .streaming-shell .guest-auth-trigger .top-profile-label { display: none; }
}

/* Streaming previews, title pages, and chart shelves. */
.streaming-spotlight-actions button {
  color: #fff; background: #ffffff26; border: 1px solid #ffffff32;
  border-radius: 9px; padding: 9px 14px; font: inherit; font-weight: 750; cursor: pointer;
}
.streaming-spotlight-actions button:hover { background: #ffffff40; }
.streaming-overlay {
  box-sizing: border-box; width: min(860px, calc(100vw - 24px)); max-width: none;
  max-height: calc(100dvh - 24px); margin: auto; padding: 0;
  color: #f5f7fc; background: #141823; border: 1px solid #ffffff30; border-radius: 17px;
  box-shadow: 0 24px 90px #000b; overflow: auto; overscroll-behavior: contain;
}
.streaming-overlay::backdrop { background: #03050bd4; }
.streaming-overlay-close {
  position: absolute; z-index: 4; top: 12px; right: 12px; width: 40px; height: 40px;
  display: grid; place-items: center; border: 1px solid #ffffff40; border-radius: 50%;
  background: #070911e8; color: #fff; cursor: pointer; font-size: 1.5rem;
}
.streaming-preview-art { position: relative; isolation: isolate; aspect-ratio: 16 / 8.5; min-height: 225px; background: #090c14; }
.streaming-preview-art > :is(img, iframe) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.streaming-preview-art:not(.playing)::after { content: ""; position: absolute; z-index: 2; inset: 0; pointer-events: none; background: linear-gradient(0deg,#141823 0%,#14182377 33%,transparent 70%); }
.streaming-preview-title { position: absolute; z-index: 3; inset: auto clamp(14px, 4vw, 34px) 12px; }
.streaming-preview-title h2 { margin: 5px 0 10px; font-size: clamp(1.6rem,5vw,3.5rem); line-height: 1.05; text-wrap: balance; }
.streaming-preview-details { padding: 8px clamp(14px, 4vw, 34px) 24px; }
.streaming-preview-details > p { max-width: 80ch; color: #d9e2ef; }
.streaming-preview-episode-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 24px; }
.streaming-preview-episode-head h3 { margin: 0; }
.streaming-overlay select, .streaming-part-select select {
  max-width: 100%; min-width: 0; color: #f7f8ff; background: #212b3b; border: 1px solid #a5bfd654;
  padding: 8px 10px; border-radius: 8px; font: inherit;
}
.streaming-episode-section { margin-top: 12px; }
.streaming-episode-section h3 { font-size: .9rem; color: #c3d4e6; margin: 10px 0 5px; }
.streaming-episode-row {
  box-sizing: border-box; display: grid; grid-template-columns: 24px clamp(78px, 18vw, 195px) minmax(0, 1fr);
  align-items: center; gap: 10px; width: 100%; padding: 9px 6px; border: 0; border-top: 1px solid #ffffff20;
  color: #f7f8fc; background: transparent; text-align: left; font: inherit; cursor: pointer;
}
.streaming-episode-row:hover, .streaming-episode-row.is-active { background: #7895c125; }
.streaming-episode-row img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 5px; }
.streaming-episode-row strong { display: block; overflow-wrap: anywhere; }
.streaming-episode-row small { color: #c0cfe2; }
.streaming-row-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.streaming-row-duration { flex: none; white-space: nowrap; }
.streaming-row-synopsis { display: block; margin-top: 4px; line-height: 1.45; overflow-wrap: anywhere; }
.streaming-row-number { text-align: center; color: #b4c4db; }
.streaming-search-overlay { width: min(580px, calc(100vw - 24px)); padding: 20px; }
.streaming-search-overlay h2 { margin: 0 48px 16px 0; }
.streaming-search-overlay .streaming-filter { margin-bottom: 8px; }
.streaming-search-overlay input { width: 100%; }
.streaming-search-result {
  display: grid; grid-template-columns: 46px minmax(0,1fr) auto; gap: 10px; width: 100%; align-items: center;
  padding: 7px; border: 0; border-radius: 8px; color: #f7f8fc; background: transparent; cursor: pointer; text-align: left;
}
.streaming-search-result:hover, .streaming-search-result:focus-visible { background: #29364b; }
.streaming-search-result img { width: 46px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; }
.streaming-search-result small { display: block; margin-top: 3px; color: #becee3; }
.streaming-hub-banner { min-height: clamp(270px,36vw,520px); }
.streaming-hub-banner h1 { font-size: clamp(1.8rem,5vw,4.5rem); }
.streaming-watch-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(210px, 1fr); align-items: start; gap: 16px; }
.streaming-watch-about { padding: 14px 16px; border-radius: 12px; background: #141b28; }
.streaming-watch-about h2 { margin: 0; }
.streaming-part-select { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; }
.streaming-watch-episodes { margin-top: 22px; }
.streaming-hub-banner, #streaming-player { scroll-margin-top: calc(var(--stream-topbar-top, 10px) + var(--stream-topbar-height, 60px) + 10px); }
.streaming-new-intro { color: #bdc9db; }
.streaming-ranked-track { grid-auto-columns: clamp(180px, 18vw, 330px); }
.streaming-ranked-tile { display: flex; align-items: stretch; min-width: 0; scroll-snap-align: start; }
.streaming-ranked-tile > b {
  display: grid; place-items: center; flex: 1; font-weight: 900; font-size: clamp(3.2rem, 8vw, 8rem);
  color: #141922; -webkit-text-stroke: 1.5px #94a6c5; letter-spacing: -.08em; line-height: 1;
}
.streaming-ranked-tile .streaming-tile { flex: 0 0 57%; aspect-ratio: 2 / 3; }
@media (max-width: 740px) {
  .streaming-watch-layout { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 640px) {
  .streaming-overlay { max-height: calc(100dvh - 18px); }
  .streaming-preview-art { min-height: 205px; }
  .streaming-episode-row { grid-template-columns: 20px 76px minmax(0,1fr); gap: 7px; }
  .streaming-ranked-track { grid-auto-columns: clamp(145px, 41vw, 210px); }
}

.streaming-title-preview { width: min(960px, calc(100vw - 24px)); }
.streaming-preview-overview { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(130px, 1fr); gap: 20px; }
.streaming-preview-overview p { color: #d9e2ef; margin: 0 0 10px; }
.streaming-preview-genres strong { color: #aebdd3; margin-right: 5px; }
[data-preview-resume-note] { font-weight: 750; }
.streaming-saved-progress { display: flex; align-items: center; gap: 8px; color: #fff; }
.streaming-preview-title .streaming-saved-progress { width: min(380px, 100%); margin: 4px 0 12px; }
.streaming-saved-progress progress {
  appearance: none; width: 100%; height: 4px; border: 0; border-radius: 999px;
  background: #ffffff4a; accent-color: #76d8ff;
}
.streaming-saved-progress progress::-webkit-progress-bar { background: #ffffff4a; border-radius: inherit; }
.streaming-saved-progress progress::-webkit-progress-value { background: #76d8ff; border-radius: inherit; }
.streaming-saved-progress progress::-moz-progress-bar { background: #76d8ff; border-radius: inherit; }
.streaming-saved-progress small { flex: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
.streaming-row-art { display: block; position: relative; aspect-ratio: 16 / 9; background: #1a2332; border-radius: 5px; overflow: hidden; }
.streaming-row-art .streaming-saved-progress { position: absolute; inset: auto 0 0; }
.streaming-episode-choice-cover .streaming-saved-progress { position: absolute; inset: auto 0 0; }
[data-streaming-episode-progress][hidden] { display: none; }
.streaming-title-preview .streaming-overlay-close { position: sticky; float: right; margin: 12px 12px -52px 0; top: 12px; }
.streaming-preview-title[hidden], .streaming-preview-art img[hidden] { display: none; }

.streaming-watch-page .streaming-local-player-card { padding: 0; border: 0; background: #030507; min-width: 0; }
.streaming-watch-page .streaming-local-screen { background: #030507; }
.streaming-watch-page .streaming-local-video { object-fit: contain; }
.streaming-watch-page .streaming-custom-controls:not(.is-embed-source) {
  inset: auto 0 0; padding: 30px 14px 10px; gap: 3px;
  background: linear-gradient(transparent, #000c 68%, #000e);
}
.streaming-timeline { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 10px; }
.streaming-time-left { min-width: 4ch; text-align: right; color: #fff; font-size: .82rem; font-variant-numeric: tabular-nums; }
.streaming-watch-page .streaming-progress-slider { width: 100%; }
.streaming-watch-page .streaming-custom-controls:not(.is-embed-source) .streaming-round-controls {
  display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 8px; align-items: center;
}
.streaming-watch-page .streaming-transport-controls,
.streaming-watch-page .streaming-fullscreen-control { display: flex; align-items: center; grid-column: auto; gap: 3px; }
.streaming-watch-page .streaming-round-button {
  border: 0; background: transparent; color: #fff; box-shadow: none; position: relative;
}
.streaming-watch-page .streaming-round-button:hover { background: #ffffff26; }
.streaming-watch-page .streaming-round-button small { font-size: .64rem; line-height: 1; position: absolute; right: 2px; bottom: 3px; }
.streaming-player-caption { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; text-align: center; font-size: .85rem; }
.streaming-speed-button { font-weight: 800; font-variant-numeric: tabular-nums; }
.streaming-back-button {
  position: absolute; z-index: 5; top: 10px; left: 10px; width: 38px; height: 38px;
  border: 0; border-radius: 50%; background: #000a; color: #fff; font-size: 1.3rem; cursor: pointer;
}
.has-embed-video .streaming-back-button { left: auto; right: 10px; }
.streaming-controls-hidden:not(.has-embed-video) .streaming-back-button:not(:focus-visible) { opacity: 0; pointer-events: none; }
.streaming-custom-controls.is-embed-source :is(.streaming-timeline, .streaming-player-caption, .streaming-speed-button, .streaming-transport-controls) { display: none; }
.streaming-watch-page .streaming-custom-controls.is-embed-source .streaming-round-controls { display: flex; }
.streaming-watch-page .streaming-custom-controls.is-embed-source [data-streaming-menu] { min-width: 34px; padding: 0 6px; }
.streaming-watch-page .streaming-custom-controls.is-embed-source [data-streaming-menu]::after { content: none; }
@media (max-width: 640px) {
  .streaming-preview-overview { grid-template-columns: 1fr; gap: 3px; }
  .streaming-watch-page .streaming-custom-controls:not(.is-embed-source) { padding: 16px 7px 4px; }
  .streaming-watch-page .streaming-custom-controls:not(.is-embed-source) .streaming-round-controls { grid-template-columns: 1fr auto; }
  .streaming-player-caption { display: none; }
  .streaming-watch-page .streaming-transport-controls { justify-content: flex-start; }
}

.streaming-guest-shell .topbar { width: min(1120px, calc(100% - 32px)); padding: 8px 14px; }
.streaming-welcome { color: #f4f7ff; padding-bottom: 54px; }
.streaming-welcome-hero {
  position:relative; isolation:isolate; overflow:hidden; display:grid; align-items:center;
  min-height:clamp(540px,49vw,730px); margin:8px auto 36px;
  padding:clamp(28px,6vw,88px); text-align:left; border-radius:24px;
  background:radial-gradient(ellipse at 74% 25%,#284d6d 0%,#12192d 50%,#090c15 90%);
}
.streaming-welcome-hero::after { content:""; position:absolute; inset:0; z-index:-1; background:linear-gradient(90deg,#080d18 0%,#080d18e8 30%,#080d1850 66%,#080d1810),linear-gradient(0deg,#080d18,transparent 40%); pointer-events:none; }
.streaming-welcome-copy { position:relative; z-index:2; max-width:600px; }
.streaming-welcome-eyebrow { font-size:.68rem; letter-spacing:.18em; font-weight:800; color:#97dbed; }
.streaming-welcome-hero h1 { font-size:clamp(2.6rem,5.9vw,5.7rem); margin:18px 0; line-height:1.02; letter-spacing:-.045em; }
.streaming-welcome-hero p { max-width:36ch; margin:0 0 26px; color:#d5e1f7; font-size:clamp(1rem,1.6vw,1.22rem); line-height:1.6; }
.streaming-welcome-hero .button { display:inline-flex; align-items:center; gap:24px; min-height:50px; padding:12px 24px; font-size:1.02rem; border-radius:10px; }
.streaming-welcome-account { display:block; max-width:36ch; margin-top:16px; color:#a9b7cf; line-height:1.5; }
.streaming-welcome-asuna { position:absolute; z-index:0; right:9%; bottom:-12%; width:auto; height:110%; object-fit:contain; pointer-events:none; }
.streaming-welcome-mosaic { position:absolute; z-index:-2; inset:-25% -9% -25% 36%; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; transform:rotate(-13deg); opacity:.28; pointer-events:none; }
.streaming-welcome-mosaic img { width:100%; height:auto; aspect-ratio:2/3; object-fit:cover; border-radius:10px; }
.streaming-welcome-section { width:min(1200px,calc(100% - 32px)); margin:38px auto; }
.streaming-welcome-section-heading { display:flex; align-items:end; justify-content:space-between; gap:16px; margin-bottom:18px; }
.streaming-welcome-section-heading h2 { margin:8px 0 0; }
.streaming-welcome-section-heading > span { color:#9eacc1; font-size:.8rem; white-space:nowrap; }
.streaming-welcome-posters { display:grid; grid-auto-flow:column; grid-auto-columns:clamp(128px,13vw,185px); gap:12px; overflow-x:auto; padding:3px 0 12px; scrollbar-width:thin; scroll-snap-type:x proximity; }
.streaming-welcome-poster { background:transparent; border:0; padding:0; color:#eaf2ff; text-align:left; cursor:pointer; scroll-snap-align:start; min-width:0; }
.streaming-welcome-poster img { display:block; width:100%; height:auto; aspect-ratio:2/3; object-fit:cover; border-radius:10px; }
.streaming-welcome-poster strong { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; margin-top:9px; font-size:.8rem; line-height:1.4; }
.streaming-welcome-poster:focus-visible { outline:2px solid #83d9ff; outline-offset:3px; border-radius:10px; }
.streaming-welcome-section h2 { font-size: clamp(1.2rem,3vw,1.6rem); }
.streaming-welcome-features { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.streaming-welcome-features article {
  min-width: 0; padding: clamp(14px,2vw,24px); border: 1px solid #9ab9ed26; border-radius: 14px;
  background: linear-gradient(145deg,#172745,#211729);
}
.streaming-welcome-features article > span { color: #83d9ff; font-size: 1.6rem; }
.streaming-welcome-features h3 { margin: 6px 0; }
.streaming-welcome-features p, .streaming-welcome-section details p { margin: 5px 0 0; color: #d0d9eb; }
.streaming-welcome-section details { border-radius: 9px; background: #171e2c; padding: 13px 16px; margin: 7px 0; }
.streaming-welcome-section summary { font-weight: 750; cursor: pointer; }
.streaming-guest-auth { width: min(520px,calc(100vw - 24px)); padding: 18px; }
.streaming-guest-auth h2 { margin: 0 42px 14px 0; }
.streaming-guest-shell { padding-bottom: 0; }
@media (max-width: 640px) {
  .streaming-welcome-features { grid-template-columns: 1fr; }
  .streaming-welcome-hero { border-radius:16px; min-height:650px; padding:260px 24px 32px; align-items:end; }
  .streaming-welcome-hero h1 { font-size:clamp(2.6rem,10vw,3.8rem); }
  .streaming-welcome-asuna { top:-24px; bottom:auto; right:8%; height:500px; }
  .streaming-welcome-hero::after { background:linear-gradient(0deg,#080d18 2%,#080d18f2 30%,#080d18a0 52%,transparent 85%); }
  .streaming-welcome-mosaic { inset:-12% -40% 10% -20%; opacity:.3; }
  .streaming-welcome-section-heading { display:block; }
  .streaming-welcome-section-heading > span { display:block; margin-top:8px; }
  .streaming-welcome-section { width:calc(100% - 12px); margin-block:28px; }
}

.streaming-preview-title { bottom: clamp(16px, 3vw, 32px); }
.streaming-preview-title h2 { max-width: 18ch; text-wrap: wrap; }
.streaming-preview-title .streaming-saved-progress { width: min(490px, 100%); gap: 10px; margin: 14px 0 12px; }
.streaming-preview-title .streaming-spotlight-actions { align-items: center; gap: 6px; }
.streaming-preview-title .streaming-play-cta { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 15px; }
.streaming-preview-title .streaming-preview-icon {
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 50%;
  background: #080a10b8; border: 1px solid #ffffff6e;
}
.streaming-preview-title .streaming-preview-icon:hover,
.streaming-preview-title .streaming-preview-icon[aria-pressed="true"] { background: #344c66; border-color: #bde8ff; }
.streaming-preview-icon svg, .streaming-reaction-options svg { width: 20px; height: 20px; }
.streaming-preview-icon .media-heart-icon { fill: transparent; stroke: currentColor; stroke-width: 1.7; }
.streaming-preview-icon[aria-pressed="true"] .media-heart-icon { fill: #93dcff; color: #93dcff; }
.streaming-reactions { position: relative; }
.streaming-reaction-options {
  position: absolute; z-index: 5; display: flex; gap: 2px; left: 50%; bottom: 100%; transform: translateX(-50%);
  padding: 4px; border-radius: 999px; border: 1px solid #ffffff35; background: #202532;
  box-shadow: 0 5px 20px #0008;
}
.streaming-reaction-options[hidden] { display: none; }
.streaming-preview-title .streaming-reaction-options button {
  width: 38px; height: 38px; padding: 0; display: grid; place-items: center;
  border-radius: 50%; border: 0; background: transparent;
}
.streaming-preview-title .streaming-reaction-options button:is(:hover,:focus-visible,[aria-pressed="true"]) {
  background: #455772; color: #c4eeff;
}
.streaming-season-picker { position: relative; min-width: min(165px, 100%); }
.streaming-season-picker summary {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 8px 11px; border: 1px solid #ffffff40; border-radius: 6px;
  background: #232936; color: #fff; font-weight: 750; cursor: pointer;
}
.streaming-season-picker summary::-webkit-details-marker { display: none; }
.streaming-season-picker[open] summary [aria-hidden] { transform: rotate(180deg); }
.streaming-season-options {
  position: absolute; z-index: 6; right: 0; top: calc(100% + 4px); width: max-content;
  min-width: 100%; max-width: min(340px, calc(100vw - 60px)); padding: 5px;
  border: 1px solid #ffffff37; border-radius: 7px; background: #202532;
  box-shadow: 0 8px 24px #0008;
}
.streaming-season-options button {
  display: block; width: 100%; padding: 9px; border: 0; border-radius: 4px; background: transparent;
  text-align: left; color: #fff; font: inherit; cursor: pointer; overflow-wrap: anywhere;
}
.streaming-season-options button:is(:hover,:focus-visible,[aria-pressed="true"]) { background: #384459; }
.streaming-season-options button[data-season-key="all"] { border-top: 1px solid #ffffff35; margin-top: 4px; }
.streaming-season-options small { color: #c9d6e8; white-space: nowrap; }
.streaming-preview-facts { font-size: .88rem; line-height: 1.5; }
.streaming-preview-facts strong, .streaming-preview-rating label { color: #9daec6; margin-right: 3px; font-weight: 700; }
.streaming-preview-facts [data-preview-community-score], .streaming-preview-facts a { color: #a8e5ff; }
.streaming-preview-facts [data-preview-status]:empty { display: none; }
.streaming-preview-rating { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.streaming-preview-rating input, .streaming-preview-rating button {
  border: 1px solid #ffffff36; background: #242c3b; color: #fff; border-radius: 5px; padding: 3px 5px; font: inherit;
}
.streaming-preview-rating input { width: 4.5rem; }
.streaming-preview-rating button { cursor: pointer; }
@media (max-width: 640px) {
  .streaming-title-preview .streaming-preview-art { min-height: 248px; }
  .streaming-preview-title .streaming-saved-progress { margin-top: 8px; }
  .streaming-season-picker { min-width: min(138px, 100%); }
  .streaming-season-options { max-width: min(280px, calc(100vw - 52px)); }
}

.streaming-preview-section { margin-top: 24px; }
.streaming-preview-section h3 { margin: 0 0 12px; }
.streaming-preview-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.streaming-preview-card { overflow: hidden; border-radius: 8px; background: #222a39; }
.streaming-preview-card button {
  display: block; width: 100%; padding: 0; border: 0;
  background: transparent; color: inherit; text-align: left; font: inherit; cursor: pointer;
}
.streaming-preview-card button:focus-visible { outline: 2px solid #b7e8ff; outline-offset: -2px; }
.streaming-preview-card button:hover strong { color: #a8e5ff; }
.streaming-preview-card img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.streaming-preview-card strong { display: block; padding: 9px 10px 5px; overflow-wrap: anywhere; }
.streaming-preview-card small, .streaming-preview-card p { margin: 0; padding: 0 10px 10px; color: #cbd8e9; }
.streaming-preview-card small { display: block; }
.streaming-preview-card p {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
  padding-bottom: 0; margin-bottom: 10px; font-size: .82rem;
}
@media (max-width: 640px) {
  .streaming-preview-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
}
@media (max-width: 360px) {
  .streaming-preview-grid { grid-template-columns: minmax(0,1fr); }
}

.streaming-preview-facts a { text-decoration: underline; text-underline-offset: 2px; }
.streaming-preview-scores { margin-bottom: 9px; }
.streaming-preview-scores summary { cursor: pointer; color: #a8e5ff; }
.streaming-preview-scores [data-preview-score-users] { margin: 7px 0; padding: 8px; border-radius: 7px; background: #1e2735; overflow-wrap: anywhere; }
.streaming-preview-scores .score-users-popover-columns { grid-template-columns: minmax(0,1fr); }

.streaming-search-fields { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 8px; margin-bottom: 10px; }
.streaming-search-fields :is(select,input) {
  min-width: 0; border: 1px solid #8bb9e459; border-radius: 999px;
  background: #172435; color: #f4f8ff; padding: 9px 12px; font: inherit;
}
.streaming-search-fields :is(select,input):focus-visible { outline: 2px solid #89d8ff; outline-offset: 1px; }
.streaming-search-count { color:#9fb3cb; font-size:.8rem; margin:12px 0; }
[data-streaming-search-selection]:not([hidden]) { display:flex; flex-wrap:wrap; align-items:center; gap:12px; padding:12px 0; border-bottom:1px solid #ffffff16; }
[data-streaming-search-selection] button { border:1px solid #ffffff25; border-radius:8px; padding:7px 10px; background:#ffffff08; color:inherit; font:inherit; cursor:pointer; }
.streaming-credit-result > img { border-radius:10px; object-fit:cover; }
.streaming-credit-symbol { display:grid; place-items:center; width:48px; min-height:58px; color:#8bc8e9; background:#ffffff08; border-radius:10px; }
.streaming-credit-symbol svg { width:24px; height:24px; }
.streaming-preview-facts > :is([data-preview-characters],[data-preview-studios]) { min-width:0; overflow-wrap:anywhere; }
.streaming-preview-facts > :is([data-preview-characters],[data-preview-studios]) > strong { display:block; margin-bottom:6px; color:#dce7f4; font-size:.8rem; }
.streaming-search-overlay .streaming-search-fields { grid-template-columns:minmax(100px,150px) minmax(0,1fr); }
@media(max-width:420px) { .streaming-search-overlay .streaming-search-fields { grid-template-columns:1fr; } }
/* Keep the poster visible until the player confirms playback. */
.streaming-auto-trailer-layer {
  position: absolute; inset: 0; z-index: 1; container-type: size; overflow: hidden;
  pointer-events: none; visibility: hidden;
}
.streaming-auto-trailer-layer.is-playing { visibility: visible; }
.streaming-auto-trailer-layer > video {
  display: block; width: 100%; height: 100%; object-fit: cover;
}
.streaming-auto-trailer-layer > iframe {
  position: absolute; top: 50%; left: 50%; translate: -50% -50%; border: 0;
  width: max(100cqw, calc(100cqh * 16 / 9));
  /* Extra vertical letterboxing moves YouTube's edge UI outside the viewport.
     Keep the existing width so the video itself is not zoomed further in. */
  height: calc(max(100cqh, calc(100cqw * 9 / 16)) + 160px);
}
.streaming-preview-art > img { z-index: 0; }
:is(.streaming-landing, .streaming-title-preview) img[src*=".gif" i] {
  backface-visibility: visible;
  transform: none;
}
.streaming-auto-actions { position: absolute; z-index: 4; top: 12px; right: 12px; display: flex; gap: 6px; }
.streaming-auto-toggle {
  color: #f5f8ff; background: #10141ddc; border: 1px solid #ffffff59; border-radius: 999px;
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0; cursor: pointer;
}
.streaming-auto-toggle[hidden] { display: none; }
.streaming-auto-toggle:hover { background: #252d3b; }
.streaming-auto-toggle:focus-visible { outline: 2px solid #b7e8ff; outline-offset: 2px; }
.streaming-preview-art .streaming-auto-actions { right: 62px; }
.streaming-auto-toggle svg {
  width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
@media (max-width: 420px) {
  .streaming-search-fields :is(select,input) { padding-inline: 8px; font-size: .82rem; }
}

/* Streaming Home library and glass navigation. */
.streaming-shell .main > .topbar {
  border-color: rgb(209 232 255 / 27%);
  background: linear-gradient(155deg, rgb(171 209 255 / 19%), transparent 66%), rgb(12 20 34 / 94%);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 20%), 0 8px 28px rgb(0 0 0 / 30%);
}
.streaming-home-shelves {
  --home-row-columns: 5;
  --home-row-gap: clamp(5px, .55vw, 10px);
  margin-top: clamp(16px, 2.5vw, 32px);
  min-width: 0;
}
.streaming-home-library-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.streaming-home-shelves .streaming-shelf-controls { flex: none; }
@media (min-width: 1550px) {
  .streaming-home-shelves { --home-row-columns: 6; }
}
@media (max-width: 1120px) {
  .streaming-home-shelves { --home-row-columns: 4; }
}
@media (max-width: 840px) {
  .streaming-home-shelves { --home-row-columns: 3; }
}
.streaming-home-shelves .streaming-shelf,
.streaming-home-library { margin-block: 0 clamp(18px, 2.5vw, 34px); }
.streaming-home-library-heading {
  display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap;
  gap: 10px 20px; margin-bottom: 14px;
}
.streaming-home-library-heading h2 { margin: 0 0 4px; font-size: clamp(1.2rem, 2vw, 1.7rem); }
.streaming-home-library-heading p { margin: 0; color: #bbc9dd; font-size: .9rem; }
.streaming-home-library-heading .streaming-browse-links { margin: 0; font-size: .86rem; }
.streaming-home-shelves :is(.streaming-art-shelf .streaming-shelf-track, .streaming-home-library-grid) {
  grid-auto-columns: calc((100% - (var(--home-row-columns) - 1) * var(--home-row-gap)) / var(--home-row-columns));
  gap: var(--home-row-gap);
  scroll-padding-inline: 2px;
}
.streaming-home-card-labels { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.streaming-home-card-labels small {
  padding: 2px 6px; border-radius: 999px; background: #111c2ced;
  border: 1px solid #b9dbff36; font-size: .68rem; color: #edf6ff;
}
@media (max-width: 640px) {
  .streaming-home-shelves :is(.streaming-art-shelf .streaming-shelf-track, .streaming-home-library-grid) {
    grid-auto-columns: clamp(90px, 29vw, 156px);
  }
  .streaming-home-shelves .streaming-art-tile { aspect-ratio: 2 / 3; }
  .streaming-home-library-heading .streaming-browse-links a { padding: 6px 8px; }
}

.streaming-home-spotlight {
  display: grid; grid-template-columns: minmax(0,1fr) auto;
  align-content: end; align-items: end; margin-top: 6px;
}
.streaming-home-brand { position: absolute; z-index: 4; inset: 12px auto auto 14px; pointer-events: none; }
.streaming-home-spotlight .streaming-spotlight-actions > :is(a, button) {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.streaming-home-spotlight .streaming-spotlight-actions svg { width: 17px; height: 17px; flex: none; }
.streaming-home-spotlight .streaming-play-cta svg { fill: currentColor; }
.streaming-spotlight-badges {
  position: relative; z-index: 3; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px;
  max-width: 26rem; margin: 0 clamp(14px, 3vw, 46px) clamp(14px, 3vw, 46px) 0;
  padding: 0; list-style: none;
}
.streaming-spotlight-badges li {
  display: flex; align-items: center; gap: 6px; min-height: 25px;
  padding: 4px 7px; border-radius: 6px; color: #f7fbff;
  background: rgb(5 8 14 / 76%);
  font-size: .74rem; font-weight: 750; line-height: 1.25;
}
.streaming-spotlight-badge-icon {
  flex: none; display: grid; place-items: center; min-width: 13px;
  color: #cbeaff; font-size: .78rem;
}
.streaming-spotlight-badge-icon.is-score { color: #ffdf99; }
.streaming-spotlight-badge-icon.is-chart {
  width: 18px; min-height: 18px; border-radius: 3px; background: #ab194d;
  color: #fff; font-size: .47rem; text-align: center; line-height: .95;
}
.streaming-spotlight-badge-icon.is-community { color: #ffacd2; }
.streaming-spotlight-badge-icon.is-fresh { color: #a9e9ce; }
@media (max-width: 860px) {
  .streaming-home-spotlight { grid-template-columns: minmax(0, 1fr); }
  .streaming-home-spotlight:has(.streaming-spotlight-badges) .streaming-spotlight-copy { padding-bottom: 8px; }
  .streaming-spotlight-badges { max-width: none; margin-inline: clamp(14px, 4vw, 34px); }
}

@media (max-width: 640px) {
  .streaming-home-spotlight {
    --home-banner-art-height: clamp(166px, calc((100vw - 2 * var(--stream-edge, 12px)) * .5625), 350px);
    min-height: 0; padding-top: calc(var(--home-banner-art-height) - 12px);
    align-content: start; margin-bottom: 18px; border-radius: 16px;
    background: linear-gradient(145deg, #17263a, #131b28 78%);
    box-shadow: inset 0 0 0 1px #a6c5ec23;
  }
  .streaming-home-spotlight > :is(.streaming-spotlight-art, .streaming-auto-trailer-layer),
  .streaming-home-spotlight::after {
    inset: 0 0 auto; width: 100%; height: var(--home-banner-art-height);
  }
  .streaming-home-spotlight .streaming-spotlight-art { object-position: 50% 35%; }
  .streaming-home-spotlight::after { background: linear-gradient(0deg, #172335, #17233500 42%); }
  .streaming-home-spotlight .streaming-spotlight-copy { padding: 0 14px 14px; }
  .streaming-home-spotlight h1 { margin: 0 0 6px; font-size: clamp(1.55rem, 6vw, 2.5rem); overflow-wrap: anywhere; }
  .streaming-home-spotlight .streaming-title-logo.is-loaded { max-height: 72px; }
  .streaming-home-spotlight .streaming-spotlight-meta { margin: 6px 0; font-size: .8rem; }
  .streaming-home-spotlight .streaming-spotlight-summary { margin: 8px 0 12px; font-size: .88rem; }
  .streaming-home-spotlight .streaming-spotlight-actions > :is(a, button) {
    display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  }
  .streaming-home-spotlight .streaming-spotlight-actions > :is(a, button):not([data-edit-banner-prompt]) {
    flex: 1 1 auto;
  }
  .streaming-home-spotlight .streaming-spotlight-badges { justify-content: flex-start; margin: 0 14px 14px; }
}

.streaming-shelf-note { margin: 4px 0 0; color: #b7c7db; font-size: .82rem; }
.streaming-card-note { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.streaming-card-ratings { display:flex; justify-content:center; gap:4px; line-height:1; }
.streaming-card-ratings > span {
  display:inline-flex; align-items:baseline; gap:3px; padding:5px 4px;
  border-radius:5px; background:#0a1323ed; color:#f0f7ff; white-space:nowrap;
}
.streaming-card-ratings small { font-size:.6rem; color:#a8c9e8; }
.streaming-card-ratings b { font-size:.75rem; font-variant-numeric:tabular-nums; }
.streaming-ranked-tile .streaming-tile:has(.streaming-card-ratings) .streaming-list-mark {
  inset:6px 6px auto auto;
}
.streaming-ranked-tile .streaming-tile:has(.streaming-card-ratings) .streaming-tile-caption {
  position:absolute; inset:auto 0 0; padding:5px 2px;
}
.streaming-ranked-tile .streaming-tile:has(.streaming-card-ratings) .streaming-cover-logo { bottom:24px; }
[data-streaming-trailer-shelf]:empty { display:none; }
.streaming-new-header {
  margin-top: 8px; padding: clamp(20px, 4vw, 50px);
  border: 1px solid #b9dbff32; border-radius: 16px;
  background: radial-gradient(ellipse at 84% 12%, #233d65, transparent 65%), #111a28;
}
.streaming-new-header h1 { margin: 5px 0; font-size: clamp(1.9rem, 5vw, 3.65rem); }
.streaming-new-header p { margin: 0; color: #d1ddee; }
.streaming-release-shelf .streaming-shelf-track {
  grid-auto-columns: clamp(205px, 23vw, 300px);
  gap: 10px;
}
.streaming-coming-shelf .streaming-shelf-track { grid-auto-columns: clamp(134px, 15vw, 205px); }
.streaming-coming-card {
  position: relative; min-width: 0; overflow: hidden; border-radius: 9px;
  border: 1px solid #ffffff18; background: #171e2b; scroll-snap-align: start;
}
.streaming-coming-link { display: block; color: #f3f8ff; text-decoration: none; }
.streaming-coming-art { position: relative; display: block; aspect-ratio: 2 / 3; background: #101722; }
.streaming-coming-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.streaming-coming-image.is-landscape { object-fit: contain; }
.streaming-coming-art .poster-placeholder { display: grid; place-items: center; }
.streaming-coming-art .streaming-cover-logo .streaming-title-logo { max-height: 42px; }
.streaming-coming-copy { display: grid; gap: 2px; padding: 6px 8px; }
.streaming-coming-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; }
.streaming-coming-copy small { color: #becddd; font-size: .72rem; }
.streaming-coming-follow {
  position: absolute; top: 5px; right: 5px; display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0; border: 1px solid #c4dff852; border-radius: 50%;
  background: #101a2ded; color: #f3f8ff; cursor: pointer;
}
.streaming-coming-follow svg { width: 20px; height: 20px; }
.streaming-coming-follow:is(:hover, :focus-visible, [aria-pressed="true"]) { background: #234560; border-color: #a1ddff; }
.streaming-coming-follow:disabled { opacity: .65; }
@media (max-width: 640px) {
  .streaming-coming-shelf .streaming-shelf-track { grid-auto-columns: clamp(114px, 36vw, 170px); }
}
.streaming-release-card {
  display: grid; align-self: start; min-width: 0; overflow: hidden; scroll-snap-align: start;
  border-radius: 10px; border: 1px solid #afccf326; background: #131d2b; color: #f4f8ff;
}
.streaming-release-card:is(:hover, :focus-visible) { border-color: #a7ddff; }
.streaming-release-art { display: block; position: relative; aspect-ratio: 16 / 9; background: #101722; }
.streaming-release-art > :is(img, .image-fallback) { display: block; width: 100%; height: 100%; object-fit: cover; }
.streaming-release-chip {
  position: absolute; inset: 7px auto auto 7px; display: inline-flex; align-items: center; gap: 4px;
  max-width: calc(100% - 14px); padding: 4px 6px; border-radius: 6px;
  color: #fff; background: #0b1222ed; font-size: .72rem; font-weight: 750;
}
.streaming-release-card svg { width: 13px; height: 13px; flex: none; }
.streaming-release-copy { display: grid; gap: 4px; min-width: 0; padding: 6px 8px; }
.streaming-release-copy > strong {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem;
}
.streaming-release-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px;
  color: #bacce2; font-size: .69rem; line-height: 1.15;
}
.streaming-release-meta time { display: inline-flex; align-items: center; gap: 4px; margin-inline-start: auto; white-space: nowrap; }
@media (max-width: 640px) {
  .streaming-new-header { padding: 14px 15px; }
  .streaming-new-header p { font-size: .86rem; }
  .streaming-release-shelf .streaming-shelf-track { grid-auto-columns: clamp(172px, 55vw, 245px); gap: 8px; }
}

.streaming-list-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px; }
.streaming-list-header > a { padding: 8px 12px; border-radius: 8px; white-space: nowrap; font-weight: 700; }

.streaming-personal-list { padding-top: 4px; }
.streaming-personal-header {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px;
  padding: clamp(12px, 2vw, 20px) 0; border-bottom: 1px solid #a8c5e32b;
}
.streaming-personal-header h1 { margin: 0; font-size: clamp(1.55rem, 3.5vw, 2.3rem); line-height: 1.1; }
.streaming-personal-label { color: #b8c9dc; font-size: .75rem; font-weight: 700; }
.streaming-personal-avatar { width: 48px; height: 48px; object-fit: cover; border-radius: 50%; flex: none; }
.streaming-personal-header > a { margin-inline-start: auto; border-radius: 8px; padding: 8px 12px; font-size: .83rem; }
@media (max-width: 420px) {
  .streaming-personal-header > a { margin-inline-start: 0; }
}
.streaming-personal-list .streaming-shelf { margin-block: clamp(14px, 3.2vw, 38px); }
.streaming-personal-list .streaming-shelf-heading { min-height: 0; margin-bottom: 11px; }
.streaming-personal-list .streaming-shelf-track {
  grid-auto-columns: clamp(134px, 11vw, 192px); gap: clamp(6px, .65vw, 12px);
}
.streaming-personal-list .streaming-tile { aspect-ratio: 2 / 3; }
.streaming-art-tile { border-radius: 6px; }
.streaming-art-tile::after { inset: 42% 0 0; background: linear-gradient(transparent, #05070ce0); }
.streaming-art-tile .streaming-tile-caption { padding-bottom: 12px; }
.streaming-art-tile .streaming-tile-logo {
  display: block; position: absolute; visibility: hidden; width: 1px; height: 1px;
}
.streaming-art-tile .streaming-tile-logo.is-loaded {
  position: static; visibility: visible; width: auto; height: auto;
  max-width: min(82%, 174px); max-height: 48px; object-fit: contain;
}
.streaming-art-tile .streaming-home-card-labels small { background: #0a101be6; }
.streaming-card-play {
  position: absolute; z-index: 1; inset: 50% auto auto 50%; transform: translate(-50%, -50%);
  display: grid; place-items: center; width: 42px; height: 42px;
  border-radius: 50%; border: 1px solid #fff9; background: #080a12b8; color: #fff;
  opacity: 0; transition: opacity 120ms ease; pointer-events: none;
}
.streaming-card-play svg { width: 20px; height: 20px; fill: currentColor; }
.streaming-resume-tile:is(:hover, :focus-visible) .streaming-card-play,
.streaming-episode-row:is(:hover, :focus-visible) .streaming-card-play { opacity: 1; }
.streaming-art-tile progress { accent-color: #5ac8fa; }
.streaming-resume-tile[data-watch-status] .streaming-tile-caption { padding-inline-start: 10px; }
.streaming-resume-tile .streaming-list-mark { display: none; }
.streaming-resume-next {
  position: absolute; z-index: 1; inset: 7px auto auto 7px; padding: 3px 6px;
  border-radius: 5px; background: #0a101be8; color: #edf7ff; font-size: .72rem; font-weight: 650;
}
.streaming-resume-schedule { padding: 3px 6px; }
.streaming-resume-schedule .streaming-upcoming-release { margin: 0; }
.streaming-shell :is(.streaming-home-shelves, .streaming-personal-list) .streaming-resume-shelf .streaming-shelf-track {
  grid-auto-columns: clamp(220px, 25vw, 340px);
}
.streaming-resume-card { display: flex; flex-direction: column; align-self: start; min-width: 0; }
.streaming-resume-card:has(> .streaming-resume-schedule) {
  border-radius: 10px; background: #151e2d;
}
.streaming-shell .streaming-resume-card .streaming-tile { aspect-ratio: 16 / 9; border-radius: 10px; }
.streaming-shell .streaming-resume-card .streaming-cover-logo.has-card-meta { bottom: 4px; }
.streaming-resume-card > progress {
  display: block; inline-size: 72%; block-size: 4px; margin: 6px auto 4px;
  accent-color: var(--accent, #5ac8fa);
}
.streaming-resume-actions { display: flex; position: relative; }
.streaming-resume-actions > :is(button,details) { flex: 1 1 0; min-width: 0; }
.streaming-resume-actions > button, .streaming-resume-actions summary {
  display: grid; place-items: center; width: 100%; min-height: 44px;
  background: transparent; color: #eaf2ff; border: 0; cursor: pointer;
}
.streaming-resume-actions summary { list-style: none; }
.streaming-resume-actions summary:is(:hover, :focus-visible), .streaming-resume-actions details[open] summary { background: #243951; border-radius: 7px; }
.streaming-resume-actions summary::-webkit-details-marker { display: none; }
.streaming-resume-actions svg { width: 22px; height: 22px; }
.streaming-resume-actions details { border-inline-start: 1px solid #ffffff25; }
.streaming-resume-menu {
  position: absolute; z-index: 4; inset: auto 4px calc(100% + 4px);
  border: 1px solid #ffffff28; border-radius: 8px; background: #152033;
}
.streaming-resume-remove {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px;
  min-height: 44px; font: inherit; font-size: .78rem; text-align: start;
  color: #fff; background: transparent; border: 0; border-radius: inherit; cursor: pointer;
}
.streaming-resume-remove > svg { flex: none; width: 17px; height: 17px; color: #f5b4bf; }
.streaming-hover-actions [data-hover-resume-remove] { color: #f5b4bf; }
.streaming-resume-remove:is(:hover,:focus-visible) { background: #ffffff16; }
@media (min-width: 761px) and (hover: hover) and (pointer: fine) {
  .streaming-resume-card:not(:has(.streaming-tile:focus-visible), :has(.streaming-resume-actions:focus-within)) .streaming-resume-actions {
    position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%);
  }
}
@media (max-width: 760px) {
  .streaming-shell :is(.streaming-home-shelves, .streaming-personal-list) .streaming-resume-shelf .streaming-shelf-track {
    grid-auto-columns: clamp(100px, 29vw, 175px);
  }
  .streaming-resume-card { border-radius: 10px; background: #151e2d; }
  [data-streaming-live-shelf="next"] .streaming-resume-card { align-self: stretch; }
  [data-streaming-live-shelf="next"] .streaming-resume-actions { margin-top: auto; }
  .streaming-shell .streaming-resume-card .streaming-tile { aspect-ratio: 2 / 3; }
  .streaming-resume-card .streaming-card-play { opacity: 1; width: clamp(40px, 12vw, 65px); height: auto; aspect-ratio: 1; }
  .streaming-resume-card .streaming-card-play svg { width: 44%; height: 44%; }
  .streaming-resume-card > progress { inline-size: calc(100% - 16px); margin: 8px auto 2px; }
}
@media (hover: none) {
  .streaming-card-play { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .streaming-card-play { transition: none; }
}
.streaming-personal-playback-card {
  align-self: stretch;
  min-width: 0; overflow: hidden; border-radius: 7px; scroll-snap-align: start;
  background: #171a22; border: 1px solid #ffffff12;
}
.streaming-personal-playback-card .streaming-tile { border-radius: 0; }
.streaming-personal-playback-card .streaming-tile::after { inset: auto 0 0; height: 36px; }
.streaming-personal-card-progress { height: 3px; }
.streaming-personal-card-progress progress {
  appearance: none; display: block; width: 100%; height: 3px; border: 0;
  background: #4b515e; color: #5ac8fa; accent-color: #5ac8fa;
}
.streaming-personal-card-progress progress::-webkit-progress-bar { background: #4b515e; }
.streaming-personal-card-progress progress::-webkit-progress-value { background: #5ac8fa; }
.streaming-personal-card-progress progress::-moz-progress-bar { background: #5ac8fa; }
.streaming-personal-card-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 3px;
  padding: 5px 6px; line-height: 1.2;
}
.streaming-personal-card-copy { flex: 1; align-self: start; min-width: 0; }
.streaming-personal-card-copy strong {
  display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-size: .77rem;
}
.streaming-personal-card-copy small {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  color: #becddd; font-size: .66rem; margin-top: 2px;
}
.streaming-personal-card-copy .streaming-personal-card-reason,
.streaming-personal-card-reason > span {
  display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.streaming-personal-card-footer button {
  display: grid; place-items: center; width: 28px; height: 38px; flex: none;
  border: 0; border-radius: 50%; background: transparent; color: #e7f4ff; cursor: pointer;
}
.streaming-personal-card-footer button:is(:hover, :focus-visible) { background: #ffffff24; }
.streaming-personal-card-footer button svg { width: 19px; height: 19px; }
.streaming-personal-playback-card .streaming-card-play { opacity: 1; }
.streaming-list-mark {
  position: absolute; z-index: 2; bottom: 8px; left: 8px; display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%; border: 1px solid #ffffff4a;
  background: #111a29ee; color: #fff;
}
.streaming-list-mark svg {
  width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round;
}
.streaming-tile[data-watch-status] .streaming-tile-caption { padding-inline-start: 38px; }
.streaming-tile[data-watch-status="completed"] picture::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; background: rgb(0 0 0 / 32%);
}
.streaming-personal-playback-card .streaming-tile[data-watch-status="completed"] picture::after {
  background: rgb(0 0 0 / 17%);
}
.streaming-tile[data-watch-status="completed"] .streaming-list-mark { background: #fff; color: #10131b; }
.streaming-tile:is([data-watch-status="watching"], [data-watch-status="rewatching"]) .streaming-list-mark {
  background: #a1ddff; color: #122237; border-color: transparent;
}
.streaming-personal-list .streaming-history-shelf .streaming-shelf-track {
  grid-auto-columns: clamp(200px, 19vw, 300px);
}
.streaming-history-card {
  position: relative; display: block; align-self: start; min-width: 0; overflow: hidden; scroll-snap-align: start;
  border: 1px solid #ffffff16; border-radius: 9px; background: #171e2b; color: #fff; text-decoration: none;
}
.streaming-history-card > a { display: block; color: inherit; text-decoration: none; }
.streaming-history-card > a:focus-visible { outline: 2px solid #a1ddff; outline-offset: -2px; }
.streaming-personal-playback-card { position: relative; }
.streaming-shelf-dismiss {
  position: absolute; z-index: 3; top: 6px; right: 6px; display: grid; place-items: center;
  width: 30px; height: 30px; padding: 0; border: 1px solid #ffffff52;
  border-radius: 50%; background: #090e18db; color: #fff; font-size: 1.14rem; cursor: pointer;
}
.streaming-shelf-dismiss:is(:hover, :focus-visible) { background: #354963; border-color: #b8def7; }
.streaming-shelf-dismiss:disabled { opacity: .6; }
@media (hover: hover) and (pointer: fine) {
  [data-dismissible-card]:not(:hover, :focus-within) > .streaming-shelf-dismiss {
    opacity: 0;
    pointer-events: none;
  }
}
.streaming-history-art { display: block; position: relative; aspect-ratio: 16 / 9; background: #101722; }
.streaming-history-art > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.streaming-history-art::after {
  content: ""; position: absolute; inset: 45% 0 0; pointer-events: none;
  background: linear-gradient(transparent, #070b14dd);
}
.streaming-history-title { position: absolute; z-index: 1; inset: auto auto 9px 9px; max-width: min(68%, calc(100% - 110px)); }
.streaming-history-title strong { display: block; overflow-wrap: anywhere; font-size: .85rem; line-height: 1.2; }
.streaming-history-title .streaming-title-logo.is-loaded { max-width: 100%; max-height: 36px; }
.streaming-history-art > .streaming-saved-progress { position: absolute; z-index: 1; inset: auto 0 0; }
.streaming-history-actions {
  position: absolute; z-index: 2; inset: 0 0 auto; aspect-ratio: 16 / 9;
  display: flex; align-items: flex-end; justify-content: flex-end; gap: 3px; padding: 0 5px 5px;
  pointer-events: none;
}
.streaming-history-actions button {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: #f3f8ff;
  cursor: pointer; pointer-events: auto;
}
.streaming-history-actions button::before {
  content: ""; grid-area: 1 / 1; box-sizing: border-box; width: 28px; height: 28px;
  border: 1px solid #d4ebff40; border-radius: 50%; background: #101a2de0;
}
.streaming-history-actions button:is(:hover, :focus-visible)::before { background: #274662; }
.streaming-history-actions svg { grid-area: 1 / 1; width: 15px; height: 15px; }
.streaming-history-actions [data-history-share] { color: #c3edff; }
.streaming-history-actions [data-history-share]::before { border-color: #85d5f96b; }
.streaming-history-option-list svg { width: 20px; height: 20px; flex: none; }
.streaming-history-actions [data-history-options] svg { transform: rotate(90deg); }
.streaming-history-options { width: min(390px, calc(100vw - 24px)); padding: 16px; }
.streaming-history-options h2 { min-height: 36px; margin: 0 48px 6px 0; font-size: 1.1rem; }
.streaming-history-option-list { display: grid; gap: 4px; }
.streaming-history-option-list > :is(button, a) {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px 10px;
  border: 0; border-radius: 8px; background: #ffffff08; color: #eaf4ff; text-align: start;
  font: inherit; font-size: .9rem; text-decoration: none; cursor: pointer;
}
.streaming-history-option-list > :is(button, a):is(:hover, :focus-visible) { background: #293a53; }
@media (max-width: 640px) {
  .streaming-history-options {
    width: 100%; margin: auto auto 0; border-radius: 16px 16px 0 0;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
}
.streaming-history-copy { display: grid; gap: 3px; min-width: 0; padding: 6px 9px 7px; }
.streaming-history-copy strong {
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .8rem;
}
.streaming-history-meta {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 6px;
  color: #becddd; font-size: .68rem;
}
.streaming-history-meta small { font-size: inherit; }
.streaming-history-meta time { white-space: nowrap; }
.streaming-personal-link { margin: 26px 0 0; color: #a5d9f7; }
.streaming-personal-empty { margin: 22px 0; }
@media (max-width: 640px) {
  .streaming-personal-list .streaming-shelf-track { grid-auto-columns: clamp(106px, 28vw, 156px); }
  .streaming-art-tile .streaming-tile-logo.is-loaded { max-width: 100%; max-height: 30px; }
}


.streaming-local-controls.streaming-track-settings {
  width: min(320px, calc(100% - 24px));
  grid-template-rows: none;
  max-height: calc(100% - 80px);
  overflow-y: auto;
  color: #fff;
  background: rgba(13, 19, 30, 0.95);
}
.streaming-local-controls.streaming-track-settings[hidden] { display: none; }
.streaming-track-settings label { display: grid; gap: 5px; min-width: 0; }
.streaming-track-settings .select { width: 100%; }
.streaming-track-settings small { color: var(--muted); }
.streaming-track-settings small:empty { display: none; }
.streaming-round-button.streaming-tracks-button { font-size: 0.72rem; font-weight: 800; }
.streaming-round-button.streaming-tracks-button[aria-expanded="true"] {
  background: rgb(var(--accent-rgb) / 0.3);
}
.streaming-source-audio-language { grid-column: 1 / 3; grid-row: 3; }

@media (max-width: 460px) {
  .streaming-local-controls.streaming-track-settings { bottom: 64px; }
}

@media (max-width: 980px) {
  .streaming-mobile-nav { width: min(430px, calc(100% - 20px)); }
  .streaming-mobile-nav a {
    min-width: 0; min-height: 48px; align-content: center; white-space: nowrap;
  }
}
@media (max-width: 640px) {
  .streaming-shell { --stream-edge: 12px; }
  .streaming-shell .streaming-header-actions [data-streaming-search] { display: none; }
  .streaming-shell .topbar { padding-inline: 10px; }
  .streaming-home-shelves :is(.streaming-art-shelf .streaming-shelf-track, .streaming-home-library-grid) {
    grid-auto-columns: clamp(114px, 37vw, 170px);
  }
  .streaming-personal-list .streaming-shelf-track { grid-auto-columns: clamp(114px, 36vw, 170px); }
  .streaming-personal-list .streaming-history-shelf .streaming-shelf-track {
    grid-auto-columns: clamp(155px, 57vw, 250px);
  }
  .streaming-watch-page .streaming-hub-banner { min-height: clamp(210px, 60vw, 320px); }
  .streaming-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .streaming-search-overlay:not(.streaming-share-overlay) {
    margin: max(10px, var(--safe-top)) auto auto;
    padding: 16px;
  }
  .streaming-search-overlay h2 { padding-inline-end: 48px; }
  .streaming-search-fields { grid-template-columns: minmax(0, .85fr) minmax(0, 1.3fr); }
  .streaming-search-fields :is(input, select) {
    width: 100%; min-height: 44px; padding-inline: 8px; font-size: 16px;
  }
  .streaming-filter input { font-size: 16px; }
  .streaming-tile.streaming-poster-first:not(.streaming-art-failed, :focus-visible)::after,
  .streaming-tile.streaming-poster-first:not(.streaming-art-failed, :focus-visible) .streaming-tile-caption,
  .streaming-personal-playback-card:not([data-streaming-live-shelf="reminders"] .streaming-personal-playback-card):has(> .streaming-poster-first:not(.streaming-art-failed, :focus-visible))
    > :is(.streaming-personal-card-footer, .streaming-personal-card-progress),
  .streaming-tile .streaming-home-card-labels { display: none; }
  .streaming-tile:not(.streaming-poster-first) .streaming-tile-caption {
    gap: 3px; padding: 8px 8px 10px;
  }
  .streaming-tile > picture > .image-fallback { position: absolute; inset: 0; width: 100%; height: 100%; }
  .streaming-title-preview .streaming-spotlight-actions :is(button, a) { min-height: 44px; }
}
@media (max-width: 640px) and (orientation: portrait) {
  .streaming-title-preview {
    width: 100%; max-height: calc(100dvh - max(12px, var(--safe-top)));
    margin: auto auto 0; border-radius: 16px 16px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .streaming-title-preview .streaming-overlay-close { width: 44px; height: 44px; margin-bottom: -56px; }
  .streaming-title-preview .streaming-preview-art {
    --stream-preview-art-height: clamp(174px, 53vw, 310px);
    min-height: var(--stream-preview-art-height); aspect-ratio: auto;
    padding-top: calc(var(--stream-preview-art-height) - 18px);
    background: #141823;
  }
  .streaming-title-preview .streaming-preview-art > :is(img, iframe, .streaming-auto-trailer-layer),
  .streaming-title-preview .streaming-preview-art::after {
    height: var(--stream-preview-art-height); bottom: auto;
  }
  .streaming-title-preview .streaming-preview-title { position: relative; inset: auto; padding: 0 14px 8px; }
  .streaming-title-preview .streaming-preview-title h2 { max-width: none; overflow-wrap: anywhere; }
  .streaming-title-preview .streaming-preview-details { padding-inline: 14px; }

  /* Keep touch controls below the video in portrait; fullscreen retains the overlay. */
  .streaming-watch-page .streaming-local-screen.has-local-video:not(:is(.has-embed-video, :fullscreen, :-webkit-full-screen)) {
    display: block; aspect-ratio: auto;
  }
  .streaming-watch-page .streaming-local-screen.has-local-video:not(:is(.has-embed-video, :fullscreen, :-webkit-full-screen))::after {
    display: none;
  }
  .streaming-watch-page .streaming-local-screen.has-local-video:not(:is(.has-embed-video, :fullscreen, :-webkit-full-screen)) .streaming-local-video {
    height: auto; aspect-ratio: 16 / 9;
  }
  .streaming-watch-page .streaming-local-screen.has-local-video:not(:is(.has-embed-video, :fullscreen, :-webkit-full-screen)) .streaming-custom-controls {
    position: relative; inset: auto; padding: 0 6px 4px; gap: 0; background: #10141d;
    opacity: 1; visibility: visible; transform: none; pointer-events: auto;
  }
  .streaming-watch-page .streaming-custom-controls:not(.is-embed-source) :is(.streaming-transport-controls, .streaming-fullscreen-control) { gap: 0; }
  .streaming-watch-page .streaming-custom-controls:not(.is-embed-source) .streaming-round-button { min-width: 34px; min-height: 44px; width: auto; padding-inline: 5px; }
}
@media (max-width: 375px) and (orientation: portrait) {
  .streaming-watch-page .streaming-local-screen.has-local-video:not(:is(.has-embed-video, :fullscreen, :-webkit-full-screen))
    .streaming-custom-controls .streaming-round-controls {
    grid-template-columns: minmax(0, 1fr); gap: 0;
  }
  .streaming-watch-page .streaming-custom-controls:not(.is-embed-source) :is(.streaming-transport-controls, .streaming-fullscreen-control) {
    justify-self: center; justify-content: center;
  }
}


.streaming-timeline-track { position: relative; display: grid; min-width: 0; }
.streaming-timeline-track .streaming-progress-slider { width: 100%; }
.streaming-chapter-markers { position: absolute; inset: 0 9px; pointer-events: none; }
.streaming-chapter-marker { position: absolute; top: calc(50% - 3px); height: 6px; border-radius: 2px; background: #65ddff; opacity: .88; }
.streaming-chapter-marker.is-outro { background: #f9c47a; }
.streaming-chapter-skip { position: absolute; z-index: 4; bottom: 85px; right: 12px; color: white; background: #161b25; }
.streaming-chapter-skip[hidden], [data-streaming-edit-chapter][hidden] { display: none; }
.streaming-history-log { display: grid; gap: 16px; width: 100%; margin: auto; }
.streaming-history-heading, .streaming-history-search { display: flex; align-items: end; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.streaming-history-heading h1 { margin: 5px 0 0; }
.streaming-history-heading > div > a { color: #b0d7ed; font-size: .84rem; }
.streaming-history-layout { display: flex; gap: 3px; padding: 3px; border: 1px solid #314255; border-radius: 10px; }
.streaming-history-layout a { padding: 7px 16px; border-radius: 7px; color: #c0cfe0; font-size: .87rem; }
.streaming-history-layout a[aria-current] { background: #213b52; color: #f5faff; }
.streaming-history-search { justify-content: start; align-items: center; flex-wrap: nowrap; }
.streaming-history-search input[type="search"] { flex: 0 1 340px; min-width: 0; }
.streaming-history-results { display: grid; gap: clamp(9px, 1.15vw, 18px); }
.streaming-history-results.is-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.streaming-history-row { position: relative; min-width: 0; overflow: hidden; border: 1px solid #28374a; border-radius: 11px; background: #131c29; }
.streaming-history-row:is(:hover, :focus-within) { border-color: #6499b6; }
.streaming-history-link { display: grid; grid-template-rows: auto 1fr; color: inherit; text-decoration: none; height: 100%; }
.streaming-history-link:focus-visible { outline-offset: -3px; }
.streaming-history-thumb { display: block; position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #101722; }
.streaming-history-thumb > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.streaming-history-status { position: absolute; top: 7px; left: 7px; padding: 4px 7px; background: #101824; color: #e9f5ff; border-radius: 6px; font-size: .72rem; }
.streaming-history-status.is-watched { color: #afecd5; }
.streaming-history-thumb > .streaming-saved-progress { position: absolute; inset: auto 0 0; margin: 0; }
.streaming-history-thumb progress { display: block; width: 100%; height: 5px; border-radius: 0; background: #526478; }
.streaming-history-thumb progress::-webkit-progress-bar { background: #526478; }
.streaming-history-details { display: grid; align-content: center; gap: 4px; min-width: 0; padding: 9px 42px 9px 10px; }
.streaming-history-details > :is(strong, small) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.streaming-history-details small, .streaming-history-meta time { color: #b4c4d7; }
.streaming-history-meta { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 9px; font-size: .75rem; }
.streaming-history-meta > span { color: #a8ddfc; font-weight: 650; }
.streaming-history-row[data-dismissible-card] > .streaming-shelf-dismiss { top: auto; bottom: 7px; right: 7px; opacity: 1; pointer-events: auto; width: 30px; height: 30px; border-radius: 7px; }
.streaming-history-row[data-dismissible-card] > .streaming-shelf-dismiss:disabled { opacity: .6; }
.streaming-history-results.is-list { gap: 7px; }
.streaming-history-results.is-list .streaming-history-link { grid-template-columns: minmax(80px, 150px) minmax(0, 1fr); grid-template-rows: 1fr; }
.streaming-history-results.is-list .streaming-history-thumb { height: 100%; }
.streaming-history-empty[hidden] { display: none; }
@media (min-width: 1460px) {
  .streaming-history-results.is-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .streaming-history-results.is-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .streaming-history-details { padding: 8px 33px 8px 8px; }
  .streaming-history-details > strong { font-size: .86rem; }
  .streaming-history-row[data-dismissible-card] > .streaming-shelf-dismiss { right: 4px; bottom: 4px; width: 27px; height: 27px; }
  .streaming-history-results.is-list .streaming-history-link { grid-template-columns: minmax(78px, 28%) minmax(0, 1fr); }
}
.streaming-category-summary { color: var(--muted); margin: -5px 0 16px; }
.streaming-genre-grid .streaming-category-card { position: relative; overflow: hidden; align-content: end; min-height: 106px; isolation: isolate; }
.streaming-category-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; z-index: -2; }
.streaming-category-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent, #10151f 92%); z-index: -1; }

.streaming-shelf-actions { display: flex; flex: none; align-items: center; gap: 10px; }
.streaming-history-button {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px;
  padding: 6px 11px; border: 1px solid #405672; border-radius: 999px;
  background: #192538; color: #eef5ff; font-size: .84rem; font-weight: 650; white-space: nowrap;
}
.streaming-history-button:is(:hover, :focus-visible) { background: #263b56; border-color: #72bce0; }
.streaming-history-button svg { width: 17px; height: 17px; flex: none; color: #9edbff; }
.streaming-history-button span:last-child { color: #a4bed4; font-size: 1.15em; }
.streaming-history-empty { color: var(--muted); margin: 0; }
.streaming-history-pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-top: 12px; }
.streaming-history-pagination [data-history-status] { min-width: 1px; min-height: 1px; color: var(--muted); text-align: center; }
.streaming-history-pagination [hidden] { display: none; }
.streaming-history-pagination > a:first-child { justify-self: start; }
.streaming-history-pagination > a:last-child { justify-self: end; }
.streaming-track-settings [data-streaming-player-section] { display: grid; gap: 8px; }
.streaming-track-settings [data-streaming-player-section][hidden] { display: none; }
.streaming-fullscreen-control { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 440px) {
  .streaming-history-button { gap: 5px; padding-inline: 8px; font-size: .76rem; }
  .streaming-history-shelf .streaming-shelf-heading h2 { font-size: clamp(1rem, 4.5vw, 1.2rem); }
}

.parental-guide > summary { cursor: pointer; }
.parental-guide > summary span { float: inline-end; color: var(--accent); font-size: .85rem; }
.parental-guide p { margin: 10px 0; font-size: .875rem; }
.parental-guide-rule, .parental-guide-row small { color: var(--muted); }
.parental-guide-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-top: 1px solid rgb(255 255 255 / .12);
}
.parental-guide-row strong, .parental-guide-row small { display: block; }
.parental-guide-row small { margin-top: 4px; }
.parental-guide-row select { width: auto; max-width: 110px; }
.parental-guide form button { margin-top: 8px; }
.parental-severity { font-weight: 700; margin-inline-end: 4px; }
.parental-severity[data-severity="1"] { color: #9dd78a; }
.parental-severity[data-severity="2"] { color: #f9ce72; }
.parental-severity[data-severity="3"] { color: #ff9a9a; }

.streaming-preview-details > .parental-guide { margin-top: 18px; }
.parental-age-vote { margin: 12px 0; }

.streaming-subtitle-appearance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.streaming-subtitle-appearance[hidden] { display: none; }
.streaming-local-player-card video::cue { color: #fff; background-color: rgb(0 0 0 / .68); text-shadow: 0 1px 3px #000; }
.streaming-local-player-card[data-subtitle-size="small"] video::cue { font-size: clamp(14px, 1.55vw, 24px); }
.streaming-local-player-card[data-subtitle-size="large"] video::cue { font-size: clamp(22px, 2.85vw, 48px); }
.streaming-local-player-card[data-subtitle-background="solid"] video::cue { background-color: #000; }
.streaming-local-player-card[data-subtitle-background="clear"] video::cue { background-color: transparent; text-shadow: 0 1px 3px #000, 0 0 5px #000; }

.streaming-captions {
  position: absolute; z-index: 2; pointer-events: none; overflow: hidden;
  color: #fff; font-family: Arial, Helvetica, sans-serif; font-size: var(--caption-font-size, 24px);
  font-weight: 600; line-height: 1.3; text-shadow: 0 1px 3px #000b;
}
.streaming-captions[hidden] { display: none; }
.streaming-caption-group {
  position: absolute; display: flex; flex-direction: column; align-items: center;
  gap: .18em; max-width: 92%;
}
.streaming-caption-group[data-caption-row="bottom"] { bottom: var(--caption-bottom, 10%); }
.streaming-caption-group[data-caption-row="top"] { top: 8%; }
.streaming-caption-group[data-caption-row="middle"] { top: 50%; transform: translateY(-50%); }
.streaming-caption-group[data-caption-align="center"] { left: 4%; right: 4%; text-align: center; }
.streaming-caption-group[data-caption-align="left"] { left: 5%; align-items: flex-start; text-align: left; }
.streaming-caption-group[data-caption-align="right"] { right: 5%; align-items: flex-end; text-align: right; }
.streaming-caption {
  box-sizing: border-box; max-width: 100%; white-space: pre-line; overflow-wrap: anywhere;
  border-radius: .38em; padding: .16em .48em .2em;
  background: rgb(10 13 20 / .48); backdrop-filter: blur(5px); box-shadow: 0 2px 9px #0002;
}
.streaming-local-player-card[data-subtitle-size="small"] .streaming-captions { font-size: calc(var(--caption-font-size, 24px) * .82); }
.streaming-local-player-card[data-subtitle-size="large"] .streaming-captions { font-size: calc(var(--caption-font-size, 24px) * 1.3); }
.streaming-local-player-card[data-subtitle-background="solid"] .streaming-caption { background: #000; backdrop-filter: none; box-shadow: none; }
.streaming-local-player-card[data-subtitle-background="clear"] .streaming-caption { background: transparent; backdrop-filter: none; box-shadow: none; text-shadow: 0 1px 3px #000, 0 0 5px #000; }

.streaming-manager-context { display: flex; align-items: center; gap: 12px; padding: 0 18px 14px; }
.streaming-manager-context[hidden], .streaming-source-form [hidden] { display: none; }
.streaming-manager-context img { object-fit: cover; border-radius: 6px; flex: none; }
.streaming-manager-context div { display: grid; gap: 3px; min-width: 0; }
.streaming-manager-context small { color: var(--muted); }
.streaming-source-modal .modal-head p { margin: 5px 0 0; font-size: .85rem; }
.streaming-source-modal .streaming-source-form { gap: 12px; }
.streaming-source-form label > span { text-transform: none; letter-spacing: normal; font-weight: 650; }
.streaming-source-options > summary { cursor: pointer; padding: 3px 0; font-size: .9rem; }
.streaming-source-options[open] > summary { margin-bottom: 10px; }
.streaming-source-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr) 34px; gap: 9px; }
.streaming-source-row > .streaming-source-url { grid-column: 1 / 3; grid-row: 1; }
.streaming-source-row > .icon-button { grid-column: 3; grid-row: 1; width: 34px; height: 38px; }
.streaming-source-row > label:not(.streaming-source-url) { grid-row: 2; }
.streaming-source-row > .streaming-source-audio-language { grid-column: 1 / -1; grid-row: 3; color: var(--muted); font-size: .85rem; }
.streaming-source-audio-language summary { cursor: pointer; }
.streaming-source-audio-language[open] label { margin-top: 7px; }
.streaming-managed-anime { display: grid; gap: 12px; }
.streaming-managed-anime h3 { margin: 4px 0; font-size: 1.05rem; }
.streaming-managed-title { display: grid; gap: 10px; }
.streaming-group-connection { display: flex; gap: 8px; align-items: flex-end; }
.streaming-group-connection label { display: grid; gap: 5px; flex: 1; min-width: 0; font-size: .8rem; color: var(--muted); }
.streaming-group-connection .select { width: 100%; }
.streaming-managed-season { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.streaming-managed-season > summary { padding: 12px; cursor: pointer; }
.streaming-managed-season > summary small { margin-inline-start: 10px; color: var(--muted); }
.streaming-managed-episodes { display: grid; gap: 10px; padding: 0 10px 10px; }
.streaming-managed-episode { border-radius: 9px; background: rgb(0 0 0 / .17); border: 1px solid var(--line); overflow: hidden; }
.streaming-managed-episode-head { display: flex; align-items: center; gap: 10px; padding: 10px; }
.streaming-managed-episode-head > img { width: 108px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; flex: none; }
.streaming-managed-episode-head > div { display: grid; gap: 4px; flex: 1; min-width: 0; }
.streaming-managed-episode-head > div small { color: var(--muted); }
.streaming-managed-episode-head > button { padding: 6px 9px; font-size: .8rem; flex: none; }
.streaming-managed-versions { padding: 0 10px 8px; }
.streaming-managed-versions .streaming-managed-source { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 8px 0; }
.streaming-managed-versions .button { padding: 5px 9px; font-size: .8rem; }
@media(max-width: 520px) {
  .streaming-managed-episode-head { flex-wrap: wrap; }
  .streaming-managed-episode-head > img { width: 84px; }
  .streaming-managed-episode-head > button { margin-left: auto; }
  .streaming-source-modal .modal-head { padding: 14px; }
}

.parental-guide-summary-row { grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center; }
.parental-guide-summary-row > div { text-align: right; }
.parental-severity { display:inline-block; padding:4px 10px; border-radius:999px; font-weight:700; }
.parental-vote-editor { margin-top:14px; }
.parental-vote-editor summary { cursor:pointer; padding:10px 0; }
.parental-vote-editor form { padding-top:10px; }

.content-guidance { margin-top:16px; padding-top:12px; border-top:1px solid var(--line,#ffffff22); }
.content-guidance h4 { margin:0 0 8px; font-size:.9rem; }
.content-guidance > p { margin:0 0 10px; font-size:.76rem; color:var(--muted,#aab9cc); }
.content-guidance-row { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:7px 0; font-size:.8rem; line-height:1.4; }
.content-guidance-result { display:flex; flex-shrink:0; align-items:center; gap:6px; }
.content-guidance-result .parental-severity { margin:0; padding:3px 8px; font-size:.75rem; background:#ffffff0a; }
.content-guidance-result small { min-width:35px; color:var(--muted,#aab9cc); font-size:.68rem; }
.community-age-note { display:block; color:var(--muted,#aab9cc); font-size:.7rem; font-weight:400; margin-top:4px; }
@media (max-width:420px) { .content-guidance-row { gap:8px; } .content-guidance-result { gap:4px; } }

.streaming-group-search { padding:0 12px 12px; display:grid; gap:5px; }
.streaming-group-search > small { color:var(--muted); font-size:.75rem; }
.streaming-group-result { width:100%; display:flex; align-items:center; gap:10px; padding:8px; border:1px solid var(--line); border-radius:8px; background:var(--panel); color:var(--text); text-align:left; cursor:pointer; }
.streaming-group-result img { width:32px; height:46px; object-fit:cover; border-radius:4px; }
.streaming-group-result span { display:grid; gap:4px; }.streaming-group-result small { color:var(--muted); }

/* Keep animated artwork damage inside its existing visual bounds. No forced
   GPU textures: native GIF playback and the card hover surface stay intact. */
.streaming-spotlight,
.streaming-preview-art,
.streaming-tile > picture,
.cover-showcase-backdrop {
  contain: paint;
}

/* Covered/offscreen artwork keeps its source and geometry, but does not paint. */
.offscreen-artwork,
.streaming-trailer-visible > img { visibility: hidden !important; }

/* Move the navigation itself; grid centering absorbs added row margins. */
.profile-page .profile-navigation-live-row > .profile-nav-strip {
  position: relative;
  top: 36px;
}

/* Signs/names stay above the scene; dialogue keeps its control-safe bottom lane. */
.streaming-caption-group[data-caption-row="top"] {
  top: 5%; flex-direction: row; flex-wrap: wrap; justify-content: center;
  gap: .25em .8em; font-size: .8em;
}
.streaming-caption-group.is-positioned[data-caption-row="top"] {
  left: var(--caption-x); right: auto; width: max-content; max-width: 40%;
  transform: translateX(var(--caption-anchor));
}

/* Offer chapter skipping briefly, then let the picture stay clear.
   Display:none at the chapter boundary resets this animation for the next range. */
.streaming-chapter-skip { opacity: 1; visibility: visible; }
.streaming-controls-hidden .streaming-chapter-skip:not([hidden]):not(:hover):not(:focus) {
  animation: streaming-skip-dismiss .25s ease 4s both;
}
@keyframes streaming-skip-dismiss {
  from { opacity: 1; visibility: visible; }
  to { opacity: 0; visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .streaming-controls-hidden .streaming-chapter-skip:not([hidden]):not(:hover):not(:focus) {
    animation-duration: .01ms;
  }
}

/* Catalog attribution is separate from the description, including MAL credits. */
.synopsis-credit { display:block; margin-top:.7em; font-size:.8em; line-height:1.5; font-weight:400; color:var(--muted,#aab9cc); }
.synopsis-credit + .synopsis-credit { margin-top:.25em; }

/* Mobile Streaming dialogs can be pulled down without intercepting scrolled content. */
.streaming-popup-grab { display: none; }
@media (max-width: 760px) {
  .streaming-overlay { overscroll-behavior: contain; transition: transform 240ms cubic-bezier(.2,.8,.2,1); }
  .streaming-overlay.streaming-popup-dragging { transition: none; user-select: none; }
  .streaming-overlay::backdrop { transition: opacity 300ms ease-out; }
  .streaming-overlay.streaming-popup-closing::backdrop { opacity: 0; }
  .streaming-popup-grab { display: block; position: absolute; top: 8px; left: calc(50% - 18px); width: 36px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.65); z-index: 8; pointer-events: none; }
}
@media (prefers-reduced-motion: reduce) { .streaming-overlay { transition: none; } }

.streaming-preview-episode-head[hidden], [data-preview-episodes][hidden] { display: none !important; }

.streaming-managed-title-card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: rgba(5,14,28,.36); }
.streaming-managed-title-summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px; cursor: pointer; }
.streaming-managed-title-summary::-webkit-details-marker { display:none; }
.streaming-managed-title-summary > img { width: 46px; height: 64px; object-fit:cover; border-radius: 6px; flex-shrink:0; }
.streaming-managed-title-summary > span:first-of-type { min-width:0; flex:1; display:grid; gap:5px; }
.streaming-managed-title-summary strong { font-size:.95rem; overflow-wrap:anywhere; }
.streaming-managed-title-summary small { color:var(--muted); font-size:.78rem; }
.streaming-managed-expand { margin-left:auto; }
.streaming-managed-title-card[open] > .streaming-managed-title-summary { border-bottom:1px solid var(--line); }
.streaming-managed-title-card > .streaming-managed-title { padding:12px; }
.streaming-group-settings { margin:10px 0 14px; }
.streaming-group-settings p { font-size:.8rem; color:var(--muted); }
.streaming-manager-title-actions { gap:8px; }
.streaming-managed-versions { padding:6px 0; }
@media(max-width:640px) { .streaming-manager-title-actions .button { flex:1; } .streaming-managed-source { flex-wrap:wrap; } }

.streaming-hover-preview { position:fixed; z-index:15000; width:min(350px,calc(100vw - 16px)); border:1px solid rgba(255,255,255,.13); border-radius:12px; overflow:hidden; color:#fff; background:#171b23; box-shadow:0 14px 42px rgba(0,0,0,.65); }
.streaming-hover-preview.is-shelf-preview { pointer-events: none; }
.streaming-hover-preview.is-shelf-preview .streaming-hover-body { pointer-events: auto; }
.streaming-hover-art { position:relative; background:#0a1019; }
.streaming-hover-art img { width:100%; height:100%; object-fit:cover; display:block; }
.streaming-hover-art strong { padding:8px 14px 10px; background:linear-gradient(transparent,rgba(0,0,0,.85)); font-size:1rem; }
.streaming-hover-body { padding:12px 14px; }
.streaming-hover-actions { display:flex; align-items:center; gap:8px; margin-bottom:10px; }
.streaming-hover-actions :is(button,a) { display:grid; place-items:center; width:34px; height:34px; padding:7px; color:#fff; border:1px solid #89919c; background:transparent; border-radius:50%; cursor:pointer; text-decoration:none; }
.streaming-hover-actions .streaming-hover-play { background:#fff; color:#111; border-color:#fff; }
.streaming-hover-actions [data-hover-info] { margin-left:auto; }
.streaming-hover-actions svg { width:19px; height:19px; }
.streaming-hover-actions [aria-pressed=true] { color:#6dd5ff; border-color:#6dd5ff; }
.streaming-hover-facts { display:flex; flex-wrap:wrap; gap:6px 10px; color:#bac3d0; font-size:.76rem; }
.streaming-hover-score { display:flex; gap:6px 14px; margin:9px 0 5px; color:#83d9ff; font-weight:700; font-size:.85rem; }
.streaming-hover-genres { margin:8px 0 3px; font-size:.8rem; }
.streaming-hover-status { font-size:.72rem; color:#a8b7c8; }
.streaming-hover-message { font-size:.75rem; color:#ffbdad; margin:0; }
.streaming-hover-message:empty { display:none; }
@media(hover:hover) and (pointer:fine) { .streaming-tile .streaming-tile-quick-info { display:none; } }

.streaming-source-modal > :is([data-streaming-auto-import], [data-streaming-coverage]) { margin: 8px 16px 0; padding: 8px 12px; }
.streaming-coverage-search, .streaming-coverage-pages, .streaming-coverage-tracks, .streaming-coverage-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
}
.streaming-coverage-search input { flex: 1 1 12rem; min-width: 0; }
.streaming-coverage-pages[hidden] { display: none; }
.streaming-coverage-title { padding: 9px 0; border-top: 1px solid #a8c6f12c; }
.streaming-coverage-title summary small { display: inline-block; margin-inline-start: 8px; color: var(--muted); }
.streaming-coverage-title h4 { margin: 8px 0 4px; }
.streaming-coverage-title ul { list-style: none; margin: 0 0 8px; padding: 0; }
.streaming-coverage-range { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 5px 0; }
.streaming-coverage-range > strong { min-width: 5rem; }
.streaming-coverage-actions label { display: flex; align-items: center; gap: 5px; margin: 0; }
.streaming-coverage-actions input { width: 5.5rem; }
.streaming-coverage-actions .button { font-size: .8rem; padding: 5px 8px; min-height: 30px; }
.streaming-coverage [role="status"]:empty { display: none; }

.streaming-hover-summary { margin:8px 0; font-size:.8rem; line-height:1.45; color:#ced8e5; }
.streaming-recommendation-note { font-size: .8rem; line-height: 1.4; overflow-wrap: anywhere; }
.streaming-preview-card .streaming-title-logo { width:auto; height:auto; max-width:85%; max-height:70px; aspect-ratio:auto; object-fit:contain; margin:0 auto; }
strong.streaming-title-heading:has(> .streaming-title-logo.is-loaded) > .streaming-cover-title { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }

.streaming-preview-card-art { position:relative; overflow:hidden; }
.streaming-preview-card-art > img { height:100%; }
.streaming-preview-card-art > strong { padding:8px 12px 10px; background:linear-gradient(transparent,rgba(0,0,0,.8)); }
:is(.streaming-preview-card-art, .streaming-hover-art) { display:grid; grid-template-columns:minmax(0,1fr); container-type:inline-size; }
:is(.streaming-preview-card-art, .streaming-hover-art)::before { content:""; grid-area:1/1; align-self:start; aspect-ratio:16/9; }
:is(.streaming-preview-card-art, .streaming-hover-art) > img { position:absolute; inset:0; object-fit:cover; }
:is(.streaming-preview-card-art, .streaming-hover-art) > strong { position:relative; grid-area:1/1; align-self:end; min-width:0; }
.streaming-preview-card-art .streaming-title-logo { margin:0 auto; max-height:64px; max-width:78%; }
.streaming-row-audio { display:block; margin-top:4px; font-size:.7rem; color:#a9c7dc; }

.streaming-awards { margin:12px 0; font-size:.78rem; }
.streaming-awards > strong,.streaming-hover-award { color:#f5d492; }
.streaming-awards summary { margin-top:5px; cursor:pointer; }
.streaming-awards ul { list-style:none; padding:0; }
.streaming-awards li { margin:10px 0; }
.streaming-awards li span { display:block; color:#c7d5e2; }
.streaming-awards-editor { width:min(700px,calc(100vw - 24px)); padding:24px; }
.streaming-awards-editor label { display:grid; gap:5px; font-size:.8rem; }
.streaming-award-edit-row { display:grid; grid-template-columns:1fr 1fr; gap:10px; padding:14px; margin:16px 0; border:1px solid #395468; border-radius:12px; }
.streaming-award-edit-row .award-source { grid-column:1/-1; }
@media(max-width:480px) { .streaming-award-edit-row { grid-template-columns:1fr; } }

.streaming-hover-actions [data-hover-favorite] .media-heart-icon { fill:transparent; stroke:currentColor; stroke-width:1.7; }
.streaming-hover-actions [data-hover-favorite][aria-pressed="true"] { color:#ff91b7; border-color:#ff91b7; background:rgba(255,111,161,.12); }
.streaming-hover-actions [data-hover-favorite][aria-pressed="true"] .media-heart-icon { fill:currentColor; }
.streaming-hover-actions [data-hover-favorite]:disabled { opacity:.6; cursor:wait; }

/* Let metadata use the available width rather than stretching a narrow sidebar. */
.streaming-preview-overview { display:block; }
.streaming-preview-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 24px; margin-top:18px; align-items:start; }
.streaming-preview-facts > p { margin:0; }
.streaming-preview-facts > .content-guidance,.streaming-preview-next-release { grid-column:1/-1; }
.streaming-preview-next-release:empty { display:none; }
.streaming-preview-facts .content-guidance { margin-top:4px; padding-top:10px; }
.streaming-preview-facts [data-parental-summary-rows] { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 24px; }
.streaming-personal-logo { position:absolute; inset:auto 12px 14px; pointer-events:none; }
.streaming-cover-logo { position:absolute; inset:auto 0 0; z-index:2; display:grid; justify-items:center; padding:24px 12px 12px; pointer-events:none; }
.streaming-cover-logo { background:transparent; container-type:inline-size; }
.streaming-tile img.streaming-title-logo { position:static; inset:auto; }
.streaming-cover-logo .streaming-title-logo { display:block; visibility:hidden; width:100%; height:clamp(48px,5vw,82px); max-width:100%; max-height:none; object-fit:contain; object-position:center bottom; }
.streaming-cover-logo .streaming-title-logo.is-loaded { visibility:visible; }
.streaming-cover-title {
  display: grid;
  container-type: inline-size;
  justify-items: center;
  gap: .15em;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  font-size: 1rem;
  line-height: 1.06;
  text-align: center;
  color: #f8fbff;
  text-shadow: 0 1px 3px #030910, 0 2px 8px #030910;
}
.streaming-cover-title.is-long { font-size: .875rem; }
:is(.streaming-cover-logo, .streaming-preview-card-art, .streaming-hover-art) .streaming-cover-title { font-size: clamp(.8rem, 10cqi, 1.5rem); }
:is(.streaming-cover-logo, .streaming-preview-card-art, .streaming-hover-art) .streaming-cover-title.is-long { font-size: clamp(.75rem, 8cqi, 1.2rem); }
:is(.streaming-history-title, .streaming-release-copy) .streaming-cover-title { font-size: inherit; }
.streaming-history-title:has(.streaming-cover-title):not(:has(.streaming-title-logo.is-loaded)) { width: min(68%, calc(100% - 110px)); }
.streaming-release-copy > .streaming-title-heading { white-space:normal; }
.streaming-wordmark-name,
.streaming-wordmark-subtitle,
.streaming-wordmark-suffix {
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.streaming-wordmark-name {
  padding-inline: .08em;
  font-size: clamp(.5rem, var(--name-fit, 1em), 1em);
  font-weight: 900;
  letter-spacing: -.025em;
  text-transform: uppercase;
  -webkit-text-stroke: .07em rgb(4 11 21 / .82);
  paint-order: stroke fill;
}
.streaming-cover-title.is-long .streaming-wordmark-name { text-transform: none; }
.streaming-wordmark-subtitle {
  font-size: max(.625rem, .72em);
  font-weight: 750;
  line-height: 1.14;
  color: #edf5ff;
}
.streaming-wordmark-suffix {
  min-width: 0;
  max-width: 100%;
  font-size: clamp(.5rem, calc(175cqi / var(--suffix-characters, 22)), max(.625rem, .65em));
  font-weight: 700;
  line-height: 1.15;
  color: #cfe4f7;
}
.streaming-wordmark-suffix::before { content: "-\00a0"; }
.streaming-wordmark-suffix::after { content: "\00a0-"; }
.streaming-cover-logo .streaming-title-logo:not(.is-loaded) { position:absolute; }
.streaming-tile:has(> .streaming-cover-logo) .streaming-tile-caption > strong { display:none; }
.streaming-tile:has(> .streaming-cover-logo):not(:has(> .streaming-cover-logo .is-loaded)) .streaming-tile-caption { display:grid; }
.streaming-tile > .streaming-cover-logo { bottom:24px; }
.streaming-tile > .streaming-cover-logo.has-card-meta { bottom:40px; }
.streaming-result-grid .streaming-tile > .streaming-cover-logo { bottom:4px; padding:8px 14px; }
.streaming-result-grid .streaming-cover-logo .streaming-title-logo { width:82%; height:clamp(34px,4vw,60px); }
.streaming-result-grid .streaming-tile > .streaming-cover-logo.has-card-meta { bottom:32px; }
@media (max-width:640px) {
  .streaming-result-grid .streaming-tile[data-watch-status] > .streaming-cover-logo { bottom:30px; }
  :is(.streaming-home-shelves,.streaming-personal-list) .streaming-cover-logo .streaming-title-logo { width:82%; height:clamp(34px,9vw,52px); }
}
.streaming-home-shelves .streaming-art-tile > .streaming-cover-logo:has(> .streaming-cover-title):not(:has(> .is-loaded)) {
  padding-inline: 8px;
  padding-bottom: 4px;
}
.streaming-home-shelves .streaming-art-tile[data-watch-status] > .streaming-cover-logo:has(> .streaming-cover-title):not(:has(> .is-loaded)) {
  padding-bottom: 8px;
}
.streaming-personal-list .streaming-tile > .streaming-cover-logo { bottom:30px; padding:8px 12px; }
.streaming-personal-list .streaming-cover-logo .streaming-title-logo { max-width:90%; }
.streaming-personal-logo { bottom:34px; }
.streaming-tile:has(> .streaming-cover-logo .is-loaded) .streaming-tile-caption { position:absolute; inset:auto 0 0; padding-block:8px; font-size:.75rem; }
.streaming-tile:has(> .streaming-cover-logo .is-loaded) .streaming-tile-caption > strong { display:none; }
.streaming-release-card:has(.streaming-cover-logo .is-loaded) .streaming-release-copy > strong { display:none; }
.streaming-personal-logo .streaming-title-logo.is-loaded { max-width:90%; max-height:64px; width:auto; height:auto; }
.streaming-hover-art .streaming-title-logo.is-loaded { width:auto; height:auto; max-width:80%; max-height:68px; object-fit:contain; object-position:left bottom; }
.streaming-tile .streaming-tile-logo.is-loaded { width:auto; height:auto; max-width:85%; max-height:52px; object-fit:contain; }
.streaming-release-copy .streaming-title-logo.is-loaded { width:auto; height:auto; max-width:100%; max-height:28px; object-fit:contain; }
.streaming-trailer-popup { width:min(1100px,96vw); padding:0; overflow:hidden; background:#05080d; }
.streaming-trailer-popup .streaming-preview-art { min-height:0; aspect-ratio:16/9; }
.streaming-trailer-popup .streaming-overlay-close { position:absolute; top:12px; right:12px; z-index:10; }
.streaming-upcoming-episode, .streaming-upcoming-episode:hover { cursor: default; background: transparent; }
.streaming-upcoming-episode img.streaming-upcoming-art {
  display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #080c13;
}
.streaming-upcoming-copy { min-width: 0; display: grid; gap: 4px; }
.streaming-upcoming-schedule { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.streaming-upcoming-schedule time { color: #b4c4db; font-size: .82rem; }
.streaming-upcoming-schedule [data-media-countdown] { color: #83dcfa; font-weight: 700; }
.streaming-episode-picker .streaming-upcoming-episode {
  grid-template-columns: 64px minmax(0, 1fr); gap: 8px; padding: 8px 5px 4px; margin-top: 2px;
}
.streaming-episode-picker .streaming-upcoming-episode .streaming-row-number { display: none; }
.streaming-episode-picker .streaming-upcoming-copy { gap: 2px; font-size: .78rem; }
.streaming-episode-picker .streaming-upcoming-schedule time { font-size: .72rem; }

/* Keep title facts compact, with clear labels and room for long credits. */
.streaming-preview-meta-row { display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; margin-bottom:12px; }
.streaming-preview-meta-row .streaming-spotlight-meta { margin:0; }
.streaming-preview-meta-row .streaming-awards { margin:0; position:relative; }
.streaming-preview-meta-row .streaming-awards:not(:has(strong, details)) { display:none; }
.streaming-preview-meta-row .streaming-awards details[open] ul { max-width:40ch; }
.streaming-title-preview button.streaming-info-cta { border:1px solid #ffffff24; border-radius:8px; padding:7px 11px; font:inherit; font-size:.78rem; line-height:1.3; cursor:pointer; background:#ffffff0b; color:#dbe8f6; }
.streaming-title-preview button.streaming-info-cta:hover { background:#ffffff18; border-color:#8acfea66; }
.streaming-title-preview button.streaming-info-cta:focus-visible { outline:2px solid #72c8ec; outline-offset:3px; }
.streaming-preview-meta-row [data-edit-awards] { margin-left:auto; }
.streaming-preview-score-strip { display:flex; align-items:baseline; gap:8px 16px; font-size:.82rem; }
.streaming-preview-score-strip > p { margin:0; }
.streaming-preview-score-strip .streaming-preview-scores { margin:0; position:relative; }
.streaming-preview-rating { margin:0 0 10px; gap:8px; }
.streaming-preview-rating label { display:flex; align-items:center; gap:8px; }
.streaming-preview-rating input { padding:7px 9px; border-radius:7px; width:4.3rem; }
.streaming-preview-rating button { padding:8px 12px; border-radius:7px; background:#72c8ec18; border-color:#72c8ec44; }
@media (min-width: 761px) {
  .streaming-preview-score-strip [data-preview-score-users] {
    position:absolute; inset-block-start:100%; inset-inline-start:0; z-index:3;
    width:min(340px, 40vw); max-height:45vh; overflow:auto; box-shadow:0 10px 24px #0008;
  }
}
.streaming-preview-facts { gap:18px 24px; font-size:.85rem; }
.streaming-preview-facts > [data-preview-cast], .streaming-preview-facts > [data-preview-staff], .streaming-preview-tags { min-width:0; overflow-wrap:anywhere; }
.streaming-preview-facts > [data-preview-cast] > strong, .streaming-preview-facts > [data-preview-staff] > strong,
.streaming-preview-tags > strong { display:block; margin-bottom:6px; color:#dce7f4; font-size:.8rem; }
.streaming-preview-facts a { text-decoration:none; }
.streaming-preview-facts a:hover { text-decoration:underline; }
.streaming-preview-facts [data-preview-staff] small { color:#95a5ba; font-size:.72rem; }
.streaming-preview-tags a { display:inline-block; margin:0 4px 5px 0; padding:3px 9px; border:1px solid #ffffff18; border-radius:999px; background:#ffffff05; }
.streaming-preview-facts .content-guidance { margin:0; padding:14px 0 0; }
.streaming-preview-facts .content-guidance h4 { font-size:.9rem; color:#e7eff8; }
.streaming-preview-facts [data-parental-summary-rows] { gap:4px 20px; }
.streaming-preview-facts .content-guidance-row { padding:9px 10px; border-radius:8px; background:#ffffff03; gap:8px; }
.streaming-preview-facts .content-guidance-result small { min-width:0; white-space:nowrap; }
.streaming-preview-facts [data-preview-status]:empty { display:none; }
.streaming-preview-facts > a { justify-self:start; font-size:.8rem; }
.streaming-content-guide { grid-column:1/-1; padding:14px; border:1px solid #ffffff18; border-radius:12px; background:#ffffff03; }
.streaming-content-guide .content-guidance { padding:0; border:0; }
.streaming-content-guide .parental-guide { margin:12px 0 0; padding:0; border:0; border-top:1px solid #ffffff18; border-radius:0; background:transparent; box-shadow:none; }
.streaming-content-guide .parental-guide > summary { padding:12px 0 2px; }
.parental-guide-notes { margin-top:18px; }
.parental-note-category { padding:14px 0; border-top:1px solid #ffffff15; }
.parental-note-category > header { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; margin-bottom:10px; }
.parental-note-category h4 { margin:0; font-size:.86rem; }
.parental-guide-notes button:not(.button) { border:0; padding:4px 6px; border-radius:5px; background:transparent; color:var(--accent,#7bcbe8); font:inherit; font-size:.77rem; cursor:pointer; }
.parental-guide-notes button:not(.button):hover { background:#ffffff0a; }
.parental-content-note { border:1px solid #ffffff15; border-radius:9px; padding:12px; margin:8px 0; background:#ffffff04; }
.parental-content-note p { white-space:pre-wrap; overflow-wrap:anywhere; margin:0; line-height:1.55; }
.parental-content-note footer { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:8px; color:var(--muted,#aab9cc); }
.parental-content-note details summary { cursor:pointer; color:var(--muted,#aab9cc); }
.parental-content-note details[open] p { margin-top:8px; }
.parental-content-note.is-hidden { opacity:.65; border-style:dashed; }
.parental-notes-empty,.parental-note-hidden { color:var(--muted,#aab9cc); font-size:.75rem; }
.parental-note-editor:not([hidden]) { display:grid; gap:12px; border:1px solid #69c9ed40; border-radius:10px; padding:14px; }
.parental-note-editor label { display:grid; gap:7px; }
.parental-note-editor textarea { width:100%; resize:vertical; min-height:100px; padding:10px; border:1px solid #ffffff25; border-radius:8px; background:#060e1b; color:inherit; font:inherit; }
.parental-note-editor .parental-note-spoiler { display:flex; align-items:center; gap:8px; }
.parental-note-editor > div { display:flex; flex-wrap:wrap; gap:8px; }
.parental-guide-notes { margin-top:12px; }
.parental-note-category { padding:10px 0; }
.parental-note-category > header { margin-bottom:0; }
.parental-category-actions { display:flex; align-items:center; gap:8px; }
.parental-category-actions select { width:126px; min-height:36px; font:inherit; font-size:.8rem; }
.parental-note-category .parental-content-note { margin-top:10px; }
.parental-guide-notes [data-parental-votes] > .button { margin-top:12px; }
.streaming-content-guide .parental-guide > summary { background:transparent; border-radius:0; padding:12px 0 4px; }
.streaming-content-guide .parental-guide[open] { padding-bottom:0; }
.streaming-content-guide .parental-guide-rule { font-size:.75rem; color:#a9b8cc; line-height:1.55; }
@media(max-width:480px) {
  .parental-note-category > header { align-items:flex-start; }
  .parental-category-actions { width:100%; justify-content:space-between; }
}
@media(max-width:600px) {
  .streaming-preview-score-strip { flex-basis:100%; }
  .streaming-preview-meta-row [data-edit-awards] { margin-left:0; }
  .streaming-preview-facts { gap:16px; }
}
.streaming-upcoming-release {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 1px 2px;
  margin-top: 3px; font-size: .7rem; line-height: 1.25;
}
.streaming-upcoming-release + .streaming-upcoming-release { margin-top: 2px; }
.streaming-release-episode { color: #e7f4ff; font-weight: 700; white-space: nowrap; }
.audio-type-badge {
  display: inline-flex; align-items: center; padding-inline: 5px; border-radius: 999px;
  background: var(--audio-badge-background, #26364d); color: var(--audio-badge-text, #e2edff);
  box-shadow: inset 0 0 0 1px var(--audio-badge-border, #a7c9fa38);
  font-size: .9em; font-weight: 750; line-height: 1.45; white-space: nowrap;
}
.audio-type-badge-group { align-items: stretch; padding: 0; overflow: hidden; background: #202a3b; }
.audio-type-badge-part {
  padding-inline: 2px; background: var(--audio-badge-background); color: var(--audio-badge-text);
}
.audio-type-badge-part:first-child { padding-inline-start: 3px; }
.audio-type-badge-part:last-child { padding-inline-end: 3px; }
.audio-type-badge-plus { display: grid; place-items: center; min-width: 7px; color: #c5d4e8; font-size: .82em; }
:is(.audio-type-badge, .audio-type-badge-part)[data-audio-type="raw"] {
  --audio-badge-background: #3c2c1b; --audio-badge-text: #ffdda2; --audio-badge-border: #dfa65c55;
}
:is(.audio-type-badge, .audio-type-badge-part)[data-audio-type="sub"] {
  --audio-badge-background: #173b39; --audio-badge-text: #baf7e6; --audio-badge-border: #71dfbf55;
}
:is(.audio-type-badge, .audio-type-badge-part)[data-audio-type="dub"] {
  --audio-badge-background: #38294e; --audio-badge-text: #efdbff; --audio-badge-border: #c197ef55;
}
.streaming-upcoming-release > time { color: #aee2ff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.streaming-preview-next-release .media-airing-countdown { margin:0 0 8px; }
@media(max-width:600px) { .streaming-preview-facts { grid-template-columns:1fr; gap:8px; } .streaming-preview-facts [data-parental-summary-rows] { grid-template-columns:1fr; } }

.streaming-search-expand { display:inline-flex; margin:0 0 12px; }
.streaming-search-page { max-width:1200px; margin-inline:auto; }
.streaming-search-page .streaming-search-fields { grid-template-columns:minmax(110px,180px) minmax(0,1fr); }
.streaming-search-page [data-streaming-search-results] { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,310px),1fr)); gap:12px; }
.streaming-search-page .streaming-search-result { height:100%; margin:0; }
.streaming-auto-trailer-layer :is(video,iframe) { pointer-events:none; }
.streaming-trailer-visible { cursor:pointer; }
.streaming-trailer-visible :is(button,a,input,select,textarea,summary) { cursor:auto; }

.streaming-title-preview .streaming-content-guide .parental-guide { background:transparent !important; }

.streaming-source-variants { grid-column:1/-1; display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.streaming-source-variants small { flex:1 1 250px; color:var(--muted); line-height:1.5; }

/* Long text-only titles should leave room for artwork and playback actions. */
.streaming-title-preview .streaming-preview-title h2.streaming-title-heading {
  overflow-wrap: break-word;
  text-wrap: balance;
  letter-spacing: -.025em;
}
.streaming-title-preview .streaming-preview-title h2.streaming-title-heading.is-long {
  max-width: 27ch;
  font-size: clamp(1.5rem, 3.4vw, 2.6rem);
  line-height: 1.12;
}
.streaming-title-preview .streaming-preview-title h2.streaming-title-heading.is-very-long {
  max-width: 32ch;
  font-size: clamp(1.35rem, 2.7vw, 2.1rem);
  line-height: 1.15;
}
@media (max-width: 640px) {
  .streaming-title-preview .streaming-preview-title h2.streaming-title-heading:is(.is-long,.is-very-long) {
    max-width: 100%;
    font-size: clamp(1.25rem, 5.5vw, 1.8rem);
    line-height: 1.18;
    margin-block: 8px 14px;
  }
}

/* Keep short episode lists compact, with scrolling for longer seasons. */
.streaming-local-screen.has-embed-video .streaming-episode-picker {
  width: min(272px, calc(100% - 24px));
  max-height: min(360px, calc(100% - 74px));
}

@media (max-width: 640px), (max-height: 480px) {
  .streaming-local-screen .streaming-episode-picker {
    inset: auto 8px 50px auto;
    z-index: 22;
    width: min(272px, calc(100% - 16px));
    max-height: min(285px, calc(100% - 58px));
    border-radius: 12px;
  }

  .streaming-local-screen.has-embed-video .streaming-episode-picker {
    inset: 50px auto auto 8px;
    width: min(272px, calc(100% - 16px));
    max-height: min(285px, calc(100% - 58px));
  }

  .streaming-episode-picker-head .streaming-round-button { height: 44px; flex-basis: 44px; }
  .streaming-episode-choice { grid-template-columns: 62px minmax(0, 1fr) auto; padding: 4px; min-height: 44px; }
  .streaming-episode-choice-current span { display: none; }
  .streaming-episode-choice .streaming-episode-choice-play { opacity: 1; }
  .streaming-episode-picker .streaming-source-remove-button { min-height: 44px; }
}
