@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/manrope-400-cyr.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/manrope-400-lat.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/manrope-600-cyr.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/manrope-600-lat.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/manrope-700-cyr.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/manrope-700-lat.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/manrope-800-cyr.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/manrope-800-lat.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD;
}

:root {
  --color-bg-canvas: #04060A;
  --color-bg-app: #070A0F;
  --color-bg-sidebar: #0D1119;
  --color-bg-topbar: rgba(7, 10, 15, 0.94);
  --color-surface: #11161F;
  --color-surface-raised: #171D28;
  --color-surface-elevated: #1C2330;
  --color-surface-hover: #252D3C;
  --color-surface-selected: rgba(230, 27, 48, 0.14);
  --color-text: #F6F6F7;
  --color-text-muted: #B1B8C4;
  --color-text-subtle: #949EAE;
  --color-text-disabled: #626269;
  --color-text-on-accent: #FFFFFF;
  --color-icon: #F6F6F7;
  --color-icon-muted: #949EAE;
  --color-icon-active: #FF3549;
  --color-accent: #E61B30;
  --color-accent-hover: #FF3549;
  --color-accent-pressed: #C61024;
  --color-accent-subtle: rgba(230, 27, 48, 0.14);
  --color-border: transparent;
  --color-border-default: transparent;
  --color-border-strong: transparent;
  --color-border-accent: transparent;
  --color-divider: rgba(255, 255, 255, 0.08);
  --color-focus: #FF6675;
  --color-overlay: rgba(0, 0, 0, 0.58);
  --color-scrim: rgba(0, 0, 0, 0.76);
  --color-glass: rgba(0, 0, 0, 0.5);
  --color-fill: rgba(255, 255, 255, 0.10);
  --color-fill-hover: rgba(255, 255, 255, 0.16);
  --color-field: var(--color-surface);
  --focus-ring: none;
  --gradient-top-edge: none;
  --gradient-hero-read: rgba(0,0,0,.48);
  --gradient-hero-bottom: none;
  --gradient-red-glow: none;
  --radius-xs: 5px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-card: 10px;
  --radius-control: 8px;
  --radius-pill: 999px;
  --control-h-sm: 32px;
  --control-h: 36px;
  --control-h-lg: 44px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-section: 24px;
  --shadow-surface: 0 10px 30px rgba(0, 0, 0, 0.28);
  --shadow-floating: 0 14px 36px rgba(0, 0, 0, 0.46);
  --shadow-hero: 0 18px 44px rgba(0, 0, 0, 0.34);
  --shadow-card-hover: 0 14px 34px rgba(0, 0, 0, 0.62);
  --shadow-button-red: 0 8px 22px rgba(230, 27, 48, 0.24);
  --surface-card: var(--color-surface);
  --surface-card-lead: var(--color-surface);
  --shadow-card: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 8px 24px rgba(0, 0, 0, 0.32);
  --radius-container: 16px;
  --radius-nested: 12px;
  --surface-card-hover: var(--color-surface-hover);
  --surface-nested: rgba(255, 255, 255, 0.045);
  --surface-selected: rgba(230,27,48,.14);
  --duration-fast: 140ms;
  --duration-standard: 200ms;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: "Manrope", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --z-content: 2;
  --z-topbar: 10;
  --z-modal: 50;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  background: var(--color-bg-canvas);
  color-scheme: dark;
  scrollbar-width: none;
}

html, body {
  height: var(--app-h, 100dvh);
  color: var(--color-text);
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  background: var(--color-bg-canvas);
  -webkit-font-smoothing: antialiased;
  position: fixed;
  inset: 0;
  width: 100%;
}

body.modal-open .content { overflow: hidden; }

.content::-webkit-scrollbar { width: 0; height: 0; display: none; }

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

img { max-width: 100%; display: block; }

.app-frame {
  position: relative;
  height: 100%;
  min-height: 0;
  background: var(--color-bg-app);
  overflow: hidden;
}

.sidebar { display: none; }

.main-col {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-topbar);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 48px;
  height: auto;
  padding: 0 var(--space-3) var(--space-3);
  padding-top: 0;
  background: var(--color-bg-topbar);
  backdrop-filter: blur(14px);
  overflow: hidden;
}

.top-edge {
  position: absolute;
  inset: 0;
  margin: 0;
  background: var(--gradient-top-edge);
  opacity: 0.55;
  pointer-events: none;
}

.topbar-main {
  position: relative;
  z-index: 1;
  display: flex;
  gap: var(--space-3);
  align-items: center;
  min-height: 40px;
  width: 100%;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--control-h);
  margin-top: 10px;
  padding: 0 14px;
  border-radius: var(--radius-control);
  background: var(--color-field);
  border: 1px solid var(--color-border-default);
  color: var(--color-icon-muted);
}

.search svg { width: 16px; height: 16px; flex-shrink: 0; }

.clip-search-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin-top: var(--space-2);
  padding: 8px 12px;
  border: 1px solid var(--color-border-accent);
  border-radius: var(--radius-control);
  background: var(--color-surface-selected);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.clip-search-entry svg { width: 20px; height: 20px; flex-shrink: 0; }
.clip-search-entry:hover { background: var(--color-surface-hover); }
.clip-search-arrow { margin-left: auto; }

.search input {
  width: 100%;
  background: none;
  border: 0;
  outline: none;
  color: var(--color-text);
  min-width: 0;
}

.search input::placeholder { color: var(--color-text-subtle); }

.search:focus-within {
  border-color: var(--color-border-accent);
  background: var(--color-surface-raised);
  box-shadow: var(--focus-ring);
  color: var(--color-icon);
}

.topbar-utils {
  max-width: 100%;
  flex: 0 0 auto;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.vip-tag {
  height: 24px;
  padding: 0 9px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  line-height: 14px;
  color: var(--color-text);
  background: var(--color-surface-selected);
  border: 1px solid var(--color-border-accent);
}

.content {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-anchor: none;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0 14px calc(68px + 16px + var(--safe-b));
}

.gate-panel {
  max-width: 440px;
  margin: 56px auto 0;
  padding: 28px 20px 24px;
  background: var(--surface-card-lead);
  border: 0;
  border-radius: var(--radius-container);
  box-shadow: var(--shadow-card);
}

.gate-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 10px;
}

.gate-panel h1 {
  font-size: 32px;
  line-height: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.gate-hint, .gate-panel p {
  font-size: 14px;
  line-height: 20px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.gate-panel .btn { margin-top: 16px; min-width: 188px; }
.gate-panel .btn + .btn { margin-top: 8px; }
.gate-panel b { color: var(--color-text); font-weight: 700; }

.gate-panel.is-boot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.gate-spinner {
  margin-top: 18px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2.5px solid var(--color-border-default);
  border-top-color: var(--color-accent);
  animation: gate-spin 0.7s linear infinite;
}
@keyframes gate-spin {
  to { transform: rotate(360deg); }
}

.mode-app .gate-panel { display: none; }
.mode-gate .hero,
.mode-gate .filters,
.mode-gate .search,
.mode-gate .clip-search-entry,
.mode-gate .catalog,
.mode-gate .sidebar,
.mode-gate .bottom-nav,
.mode-gate #lists-panel,
.mode-gate #profile-panel { display: none !important; }
.mode-gate .app-frame {
  display: block;
  margin: 0;
  height: 100dvh;
  border: 0;
  border-radius: 0;
  padding: 0;
}
.mode-gate .main-col { min-height: 100dvh; }
.mode-gate .content {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0 20px 40px;
}
.mode-gate .gate-panel { margin-top: min(12vh, 80px); }

.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1.15;
  min-height: 240px;
  max-height: 380px;
  margin: 12px 0 0;
  border-radius: var(--radius-container);
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: var(--shadow-hero);
  touch-action: pan-y;
  user-select: none;
}

.hero.is-swiping { touch-action: none; }

.hero-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-track {
  display: flex;
  height: 100%;
  gap: 12px;
  will-change: transform;
  transition: transform 640ms cubic-bezier(0.25, 1, 0.32, 1);
}

.hero-track.is-dragging { transition: none; }

.hero-slide {
  position: relative;
  box-sizing: border-box;
  flex: 0 0 100%;
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: pointer;
  border-radius: var(--radius-md);
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

.hero-slide.is-empty .hero-bg { display: none; }

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 8%, rgba(0,0,0,.16) 35%, rgba(0,0,0,.74) 75%, rgba(0,0,0,.92) 100%);
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 20px 16px 44px;
  max-width: 100%;
  pointer-events: none;
}

.hero-content h1 {
  font-size: 26px;
  line-height: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
}

.hero-content p {
  font-size: 13px;
  line-height: 18px;
  color: var(--color-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 42em;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.7);
  -webkit-line-clamp: 2;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 650;
  color: var(--color-text-muted);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7);
}
.hero-meta span + span::before {
  content: "·";
  margin-right: 5px;
  color: var(--color-text-subtle);
}
.hero-meta .hero-rating {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 5px;
  background: var(--color-accent);
  color: var(--color-text-on-accent);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-shadow: none;
}
.hero-meta .hero-rating + span::before { content: none; }

.hero-watch {
  pointer-events: auto;
  margin-top: 4px;
  height: var(--control-h-lg);
  padding: 0 20px;
  font-size: 14px;
  box-shadow: var(--shadow-button-red);
}
.hero-watch svg { width: 18px; height: 18px; }

.hero-pager {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  gap: 5px;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-surface);
}

.hero-dot {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-dot::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--color-text-disabled);
  transition: width var(--duration-fast) var(--ease), background var(--duration-fast) var(--ease);
}

.hero-dot.is-active::after {
  width: 16px;
  background: var(--color-text);
}

.hero-actions { display: flex; gap: 8px; }

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 6px;
  margin-top: 16px;
  position: relative;
  z-index: 5;
  overflow: visible;
}

.filter {
  position: relative;
  min-width: 0;
  flex: 1 1 4.5rem;
}

#filter-sort {
  flex: 1.35 0 auto;
  min-width: max-content;
}

#filter-genre {
  flex: 1 1 5.25rem;
  min-width: 4.5rem;
}

#filter-year {
  flex: 0.85 1 3.75rem;
  min-width: max-content;
}

.filter-trigger {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: var(--control-h);
  appearance: none;
  border-radius: var(--radius-control);
  border: 1px solid var(--color-border-default);
  background: var(--color-field) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 12 8'><path fill='none' stroke='%23898991' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1.5 1.5l4.5 4.5 4.5-4.5'/></svg>") no-repeat right 7px center;
  color: var(--color-text);
  padding: 0 22px 0 8px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: -0.02em;
  text-align: left;
  outline: none;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  touch-action: manipulation;
}

#filter-sort .filter-trigger {
  min-width: max-content;
}

.filter.is-open .filter-trigger,
.filter-trigger:focus-visible {
  border-color: var(--color-border-accent);
  box-shadow: var(--focus-ring);
}

.filter-trigger.is-active {
  border-color: var(--color-border-accent);
  background-color: var(--color-surface-selected);
}

.filter-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 8;
  min-width: 100%;
  max-height: min(280px, 46vh);
  overflow-y: auto;
  overscroll-behavior: none;
  touch-action: pan-y;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 6px;
  border-radius: var(--radius-md);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border-default);
  box-shadow: var(--shadow-floating);
}

.filter-panel::-webkit-scrollbar { width: 0; height: 0; display: none; }

#filter-sort .filter-panel {
  min-width: 13rem;
  right: auto;
  max-width: min(18rem, calc(100vw - 28px));
}

#filter-year .filter-panel {
  left: auto;
  right: 0;
}

.filter.is-open { z-index: 9; }

.filter.is-up .filter-panel {
  top: auto;
  bottom: calc(100% + 6px);
}

.filter-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: var(--control-h);
  padding: 6px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}


.filter-opt:hover { background: var(--color-surface-hover); }

.filter-opt.is-on {
  background: var(--color-surface-selected);
  color: var(--color-text);
}

.catalog { margin-top: var(--space-section); }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: 17px;
  line-height: 24px;
  font-weight: 700;
  letter-spacing: -0.012em;
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
}

.section-header h2.is-swap {
  opacity: 0;
  transform: translateY(4px);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  overflow-anchor: none;
  transition: opacity 220ms cubic-bezier(0.25, 1, 0.32, 1), transform 220ms cubic-bezier(0.25, 1, 0.32, 1);
}

.grid.is-swap {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.grid.is-swap .card {
  animation: none;
  opacity: 1;
  transform: none;
}

.card {
  cursor: pointer;
  min-width: 0;
  background: none;
  border: 0;
  text-align: left;
  color: inherit;
  animation: catalog-card-in 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--enter, 0ms);
}

.card.no-enter { animation: none; }

@keyframes catalog-card-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid transparent;
  transition: transform var(--duration-standard) var(--ease),
    box-shadow var(--duration-standard) var(--ease),
    border-color var(--duration-standard) var(--ease);
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.no-poster {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-raised);
}

.no-poster span {
  font-size: 28px;
  font-weight: 800;
  color: var(--color-text-disabled);
}

.p-bar {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: calc(100% - 16px);
}

.p-bar:empty { display: none; }

.p-rating {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: var(--radius-pill);
  background: var(--color-glass);
  border: 1px solid var(--color-border-default);
  backdrop-filter: blur(8px);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.card-title {
  margin-top: 8px;
  font-size: 13px;
  line-height: 16px;
  font-weight: 650;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}




.card:hover .poster {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.card:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: var(--radius-card);
}

.loader { display: flex; justify-content: center; padding: 28px 0; }

.skeleton-pulse {
  width: 120px;
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
}

.more-sentinel { height: 1px; }
.empty {
  text-align: center;
  color: var(--color-text-muted);
  padding: 40px 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--control-h);
  padding: 0 16px;
  border-radius: var(--radius-control);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 650;
  line-height: 16px;
  transition: background var(--duration-fast) var(--ease), transform var(--duration-fast) var(--ease);
}

.btn svg { width: 16px; height: 16px; }

.btn-primary {
  background: var(--color-accent);
  color: var(--color-text-on-accent);
  box-shadow: var(--shadow-button-red);
}

.btn-primary:hover { background: var(--color-accent-hover); }
.btn-primary:active { background: var(--color-accent-pressed); transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.45; box-shadow: none; }

.btn-secondary:hover { background: var(--color-fill-hover); }

.btn-secondary {
  background: var(--color-fill);
  color: var(--color-text);
  border-color: var(--color-border);
}


.icon-btn {
  width: var(--control-h);
  height: var(--control-h);
  border-radius: var(--radius-control);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { background: var(--color-surface-hover); }

.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: var(--z-topbar);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: calc(62px + var(--safe-b));
  padding: 4px 2px var(--safe-b);
  background: var(--color-bg-sidebar);
  border-top: 1px solid var(--color-border);
}

.nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: none;
  border: 0;
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 12px;
  min-height: 44px;
}

.nav-item span { font-size: 10px; font-weight: 600; }

.nav-item svg { width: 18px; height: 18px; color: var(--color-icon-muted); }

.nav-item.active {
  color: var(--color-text);
}

.nav-item.active svg { color: var(--color-icon-active); }

.bottom-nav .nav-item.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22%;
  right: 22%;
  height: 2px;
  background: var(--color-accent);
}

/* Floating active icon and moving curved cutout, matching navigation V2. */
.bottom-nav {
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(68px + var(--safe-b));
  padding: 8px 8px var(--safe-b);
  border: 0;
  background: transparent;
  isolation: isolate;
}
.bottom-nav::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--safe-b); background: var(--color-bg-sidebar); z-index: -1; pointer-events: none; }
.bottom-nav .nav-surface { position: absolute; top: 12px; left: 0; width: 100%; height: 56px; pointer-events: none; z-index: -1; }
.bottom-nav .nav-surface path { fill: var(--color-bg-sidebar); stroke: var(--color-border); stroke-width: 1px; }
.bottom-nav .nav-float { position: absolute; top: -7px; left: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--color-accent); display: none; place-items: center; pointer-events: none; }
.bottom-nav.has-active .nav-float { display: grid; }
.bottom-nav .nav-float svg { width: 20px; height: 20px; color: #fff; }
.bottom-nav .nav-item { padding-top: 5px; gap: 8px; }
.bottom-nav .nav-item.active::before { display: none; }
.bottom-nav .nav-item svg { transition: opacity 140ms ease; }
.bottom-nav .nav-item.active svg { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .bottom-nav .nav-item svg { transition: none; } }

.sidebar .nav-item {
  flex-direction: row;
  justify-content: flex-start;
  gap: 10px;
  height: var(--control-h);
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
}

.sidebar .nav-item.active {
  background: var(--color-surface-selected);
  box-shadow: inset 2px 0 0 var(--color-accent);
}

.sidebar .nav-item:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
}


.nav-split {
  display: block;
  height: 1px;
  margin: 10px 8px;
  background: var(--color-border);
}

.modal { position: fixed; inset: 0; z-index: var(--z-modal); }
.modal-backdrop { position: absolute; inset: 0; background: var(--color-overlay); }

.sheet {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100%;
  max-width: 560px;
  transform: translateX(-50%);
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border-default);
  border-bottom: 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  max-height: 92vh;
  overflow-y: auto;
  overscroll-behavior: none;
  box-shadow: var(--shadow-floating);
  animation: sheet-in var(--duration-standard) var(--ease);
}

.sheet .icon-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: var(--control-h-lg);
  height: var(--control-h-lg);
}

.sheet-hero { position: relative; }

.sheet-poster {
  width: 100%;
  height: clamp(160px, 46vw, 240px);
  object-fit: cover;
  object-position: center 20%;
  background: var(--color-surface);
}

.sheet-poster.is-missing { display: none; }

.sheet-fade {
  display: none;
}

.sheet-body { padding: 16px 18px calc(20px + var(--safe-b)); }
.sheet:has(.sheet-poster.is-missing) .sheet-hero { display: none; }
.sheet:has(.sheet-poster.is-missing) .sheet-body { padding-top: 56px; }

.sheet-body h2 {
  font-size: 22px;
  line-height: 28px;
  font-weight: 700;
  letter-spacing: -0.018em;
  margin-bottom: 12px;
}

.meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

.chip {
  height: 24px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-glass);
  border: 1px solid var(--color-border-default);
}

.chip:empty { display: none; }
.chip-accent {
  color: var(--color-text);
  background: var(--color-surface-selected);
  border-color: var(--color-border-accent);
}
.chip-wrap { display: contents; }

#m-desc {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--color-text-muted);
}
#m-desc:empty { display: none; }

.watch-btn { width: 100%; height: var(--control-h-lg); font-size: 14px; }

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

@keyframes sheet-in {
  from { transform: translateX(-50%) translateY(12px); opacity: 0.7; }
  to { transform: translateX(-50%); opacity: 1; }
}

@keyframes sheet-in-desk {
  from { transform: translate(-50%, -46%); opacity: 0.7; }
  to { transform: translate(-50%, -50%); opacity: 1; }
}

@media (min-width: 480px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { aspect-ratio: 1.8 / 1; }
  .hero-content h1 { font-size: 32px; line-height: 36px; -webkit-line-clamp: 2; }
}

@media (min-width: 768px) {
  .app-frame {
    margin: 8px;
    height: calc(100% - 16px);
    min-height: 0;
    border: 1px solid var(--color-border-default);
    border-radius: var(--radius-lg);
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 16px;
    padding: 8px 12px 12px 8px;
  }

  .sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 16px 10px 12px;
    border: 1px solid var(--color-border-default);
    border-radius: var(--radius-md);
    background: var(--color-bg-sidebar);
  }

  .side-nav { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
  .sidebar .nav-item span, .sidebar .nav-item { font-size: 0; width: 100%; justify-content: center; padding: 0; }
  .sidebar .nav-item { color: transparent; }
  .sidebar .nav-item svg { color: var(--color-icon-muted); }
  .sidebar .nav-item.active svg { color: var(--color-icon-active); }
  .sidebar .nav-split { margin: 8px 6px; height: 1px; }
  .sidebar-foot { margin-top: auto; display: flex; justify-content: center; }

  .bottom-nav { display: none; }

  .sheet {
    top: 50%;
    bottom: auto;
    max-height: min(86vh, 800px);
    border-bottom: 1px solid var(--color-border-default);
    border-radius: var(--radius-lg);
    transform: translate(-50%, -50%);
    animation-name: sheet-in-desk;
  }

  .main-col {
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
    overflow: hidden;
  }

  .topbar { min-height: 52px; padding: 0 0 8px; background: transparent; border: 0; backdrop-filter: none; }
  .content { padding: 0 0 32px; height: 100%; min-height: 0; }

  .hero { aspect-ratio: 2.4 / 1; min-height: 280px; max-height: 430px; }
  .hero-content {
    max-width: 52%;
    padding: clamp(20px, 3vw, 36px) clamp(20px, 3vw, 36px) 48px;
  }
  .hero-content h1 {
    font-size: 34px;
    line-height: 38px;
    font-weight: 800;
    -webkit-line-clamp: 2;
  }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .app-frame { grid-template-columns: clamp(176px, 17vw, 236px) minmax(0, 1fr); gap: 20px; }
  .sidebar .nav-item {
    font-size: 11px;
    color: var(--color-text-muted);
    justify-content: flex-start;
    padding: 0 12px;
  }
  .sidebar .nav-item.active { color: var(--color-text); }
  .hero-content { max-width: 48%; }
  .hero-content h1 { font-size: 42px; line-height: 46px; }
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .section-header h2 { font-size: 18px; }
}

@media (min-width: 1280px) {
  .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .sheet, .btn, .card:hover .poster, .grid, .card, .hero-track, .section-header h2 { animation: none; transition: none; }
}

@media (max-width: 389px) {
  .hero-content p { -webkit-line-clamp: 2; }
}

.sub-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 0 4px;
}

.chip-tab {
  flex: 0 0 auto;
  height: var(--control-h-sm);
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-default);
  background: var(--color-field);
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.chip-tab:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
}

.chip-tab.is-on {
  background: var(--color-surface-selected);
  color: var(--color-text);
}

#lists-panel,
#profile-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding-bottom: var(--space-2);
}

#profile-panel { width: 100%; max-width: 760px; margin: var(--space-4) auto 0; }

#profile-hub {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#lists-panel.hidden,
#profile-panel.hidden { display: none !important; }

.profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
.profile-hero-card {
  min-width: 0;
  padding: var(--space-4);
  background: var(--surface-card);
  border: 0;
  border-radius: var(--radius-container);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 118px;
}
.profile-hero-card.is-user {
  min-height: 0;
  justify-content: center;
  gap: 14px;
}
.profile-week {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 10px 0 0;
  background: none;
  border: 0;
  border-radius: 0;
}
.profile-week-text,
.profile-day-text {
  margin: 0;
  font-size: 13px;
  line-height: 18px;
  font-weight: 650;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}
.profile-week-bar {
  height: 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.profile-week-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--color-accent);
}
.profile-week.is-full .profile-week-text { color: var(--color-text); }
.profile-week-bar { min-height: 6px; }
#profile-sub-week { margin: 0 0 16px; padding: 0 2px; }
#profile-sub-week .profile-week { padding: 0; }
.profile-week.is-off .profile-week-bar i {
  background: var(--color-text-subtle);
}
.profile-hero-kicker {
  font-size: 13px;
  font-weight: 650;
  line-height: 18px;
  color: var(--color-text-muted);
}
.profile-hero-value {
  font-size: 22px;
  line-height: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.profile-hero-value small {
  font-size: 13px;
  font-weight: 650;
  color: var(--color-text-muted);
}
.profile-hero-meta {
  margin-top: 2px;
  font-size: 13px;
  line-height: 18px;
  color: var(--color-text-muted);
}
.profile-hero-user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}
.profile-hero-user > div { min-width: 0; flex: 1; }
.profile-hero-user .profile-hero-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-hero-ava {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-border);
  font-size: 18px;
  font-weight: 800;
  color: var(--color-text);
}
.profile-hero-card .btn {
  width: 100%;
  margin-top: auto;
}

.profile-head:empty { display: none; }

.profile-head {
  margin: 4px 0 0;
  padding: var(--space-4);
  background: var(--surface-card);
  border: 0;
  border-radius: var(--radius-container);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.profile-kicker {
  font-size: 14px;
  font-weight: 650;
  line-height: 20px;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.profile-menu {
  display: flex;
  flex-direction: column;
  margin-top: 0;
  background: var(--surface-card);
  border: 0;
  border-radius: var(--radius-container);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
[data-profile-page="documentation"] > h3 {
  margin: 0 0 16px;
  font-size: 18px;
  line-height: 24px;
}
.profile-menu-label {
  margin: 0;
  padding: 14px 16px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}
.profile-menu-label:first-child { padding-top: 12px; }
.profile-menu-item {
  text-decoration: none;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 0;
  border-top: 1px solid var(--color-divider);
  background: none;
  text-align: left;
  font-size: 15px;
  font-weight: 650;
  color: var(--color-text);
  cursor: pointer;
}
.profile-menu-label + .profile-menu-item { border-top: 0; }
.profile-menu-item:hover { background: var(--color-surface-hover); }
.profile-menu-item::after {
  content: "";
  margin-left: auto;
  width: 7px;
  height: 7px;
  border-right: 1.6px solid var(--color-text-subtle);
  border-top: 1.6px solid var(--color-text-subtle);
  transform: rotate(45deg);
  flex-shrink: 0;
}
.profile-menu-item.has-dot {
  padding-right: 16px;
}
.profile-menu-item.has-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
}

.profile-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 12px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.profile-back::before {
  content: "";
  width: 7px;
  height: 7px;
  border-left: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg);
}

.profile-back:hover { color: var(--color-text); }

.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.profile-stat {
  padding: 10px 12px;
  background: var(--surface-nested);
  border: 0;
  border-radius: var(--radius-nested);
}
.profile-stat span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-subtle);
  margin-bottom: 4px;
}
.profile-stat b {
  color: var(--color-text);
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.profile-card {
  padding: var(--space-4);
  background: var(--surface-card);
  border: 0;
  border-radius: var(--radius-container);
  box-shadow: var(--shadow-card);
  margin-bottom: var(--space-4);
}

.profile-card h3 {
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
  letter-spacing: -0.012em;
  margin-bottom: 8px;
}
.profile-card p { color: var(--color-text-muted); line-height: 20px; }

.topup-page { max-width: 640px; margin: 0 auto; }
.topup-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.topup-heading h3 { margin-bottom: 0; }
.topup-badge { padding: 5px 9px; border-radius: var(--radius-pill); background: var(--color-fill); color: var(--color-text-muted); font-size: 11px; font-weight: 650; }
.topup-lead p + p { margin-top: 10px; }
.topup-mode { font-size: 12px; }
.topup-quick { padding: 0; margin: 0 0 20px; border: 0; min-width: 0; }
.topup-quick legend, .topup-label { color: var(--color-text); font-size: 13px; font-weight: 650; margin-bottom: 10px; }
.topup-label { display: block; }
.topup-amounts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.topup-amount { min-height: 56px; padding: 12px 6px; background: var(--color-fill); border: 1px solid var(--color-border); border-radius: var(--radius-control); color: var(--color-text); font-size: 16px; font-weight: 750; font-variant-numeric: tabular-nums; cursor: pointer; }
.topup-amount span { color: var(--color-text-muted); font-size: 13px; }
.topup-amount:hover { background: var(--color-fill-hover); }
.topup-amount.is-on { border-color: var(--color-accent); box-shadow: inset 0 0 0 1px var(--color-accent); }
.topup-amount:disabled { cursor: default; opacity: 0.6; }
.topup-amount:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.topup-input-wrap { display: flex; align-items: center; gap: 12px; padding: 0 14px; background: var(--color-field); border: 1px solid var(--color-border); border-radius: var(--radius-control); }
.topup-input-wrap:focus-within { border-color: var(--color-accent); }
.topup-input-wrap input { min-width: 0; width: 100%; height: 52px; border: 0; background: none; outline: none; color: var(--color-text); font: inherit; font-size: 20px; font-weight: 700; }
.topup-input-wrap input:focus-visible { outline: none; }
.topup-input-wrap > span { color: var(--color-text-muted); font-size: 19px; }
.topup-form .topup-hint { margin: 8px 0 18px; color: var(--color-text-subtle); font-size: 12px; }
.topup-form .topup-error { margin: 0 0 12px; color: var(--color-accent); font-size: 13px; }
.topup-submit { width: 100%; }
.topup-result { margin-top: 14px; padding: 12px; border-radius: var(--radius-nested); background: var(--surface-nested); color: var(--color-text); font-size: 13px; line-height: 20px; }
@media (max-width: 360px) { .topup-amounts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.vip-page { display: flex; flex-direction: column; gap: var(--space-4); }
.vip-page .profile-card { margin-bottom: 0; }
.vip-lead { background: var(--surface-card-lead); padding: var(--space-4); }
.vip-lead h3 { margin-bottom: 10px; font-size: 20px; line-height: 26px; font-weight: 800; }
.vip-perks {
  list-style: none;
  display: grid;
  gap: 8px;
  margin: 4px 0 0;
}
.vip-perks li {
  position: relative;
  padding-left: 14px;
  color: var(--color-text-muted);
  line-height: 20px;
}
.vip-perks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}
.vip-status {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--color-divider);
  font-size: 13px;
}
.vip-pick-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
  padding: 2px 2px 0;
}
.vip-plans {
  display: grid;
  gap: 10px;
}
.vip-plan {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "badge save"
    "title price";
  gap: 2px 12px;
  width: 100%;
  text-align: left;
  padding: 14px 16px 12px;
  border-radius: var(--radius-container);
  border: 0;
  background: var(--surface-card);
  box-shadow: var(--shadow-card);
  color: inherit;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease);
}
.vip-plan.is-main { padding-top: 16px; padding-bottom: 14px; }
.vip-plan.is-best { background: var(--surface-card-lead); }
.vip-plan:hover { background: var(--surface-card-hover); }
.vip-plan.is-on { background: var(--surface-selected); }
.vip-plan-badge {
  grid-area: badge;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}
.vip-plan-badge:empty { display: none; }
.vip-plan.is-on .vip-plan-badge,
.vip-plan.is-best .vip-plan-badge { color: var(--color-accent-hover); }
.vip-plan-title {
  grid-area: title;
  font-size: 18px;
  line-height: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.vip-plan-price {
  grid-area: price;
  justify-self: end;
  align-self: center;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.vip-plan-was {
  font-size: 20px;
  font-weight: 800;
  line-height: 24px;
  color: var(--color-text-subtle);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}
.vip-plan-now {
  font-size: 20px;
  line-height: 24px;
  font-weight: 800;
}
.vip-plan-save {
  grid-area: save;
  justify-self: end;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--color-accent-subtle);
  color: var(--color-text);
}
.vip-checkout { margin-bottom: 8px; }
.vip-cta { width: 100%; height: var(--control-h-lg); font-size: 14px; }
.vip-short { margin-top: 12px; font-size: 13px; }
.vip-link {
  display: inline;
  margin-left: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-accent-hover);
  font-weight: 700;
  cursor: pointer;
}
.profile-card .ref-link {
  word-break: break-all;
  margin: 10px 0 0;
  padding: 12px 14px;
  background: var(--surface-nested);
  border: 0;
  border-radius: var(--radius-nested);
  font-size: 13px;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
}

.partner-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}
.partner-actions .btn { width: 100%; }

.aff-page { display: flex; flex-direction: column; gap: var(--space-4); }
.aff-page .profile-card { margin-bottom: 0; }
.aff-page .vip-lead h3 { margin-bottom: 8px; }
.aff-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.aff-stat {
  padding: 16px 8px 14px;
  background: var(--surface-card);
  border: 0;
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  text-align: center;
}
.aff-stat b {
  display: block;
  font-size: 20px;
  line-height: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.aff-stat span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  line-height: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}
.aff-stat .aff-help-sm {
  width: 18px;
  height: 18px;
  margin-left: 4px;
  font-size: 11px;
  letter-spacing: 0;
  vertical-align: middle;
}
.aff-level {
  margin: 4px 0 10px;
  font-size: 22px;
  line-height: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  word-break: break-word;
}
.aff-meter { margin-top: 10px; }
.aff-meter-text {
  font-size: 13px;
  line-height: 18px;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}
.aff-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
.aff-actions.is-single { grid-template-columns: 1fr; }
.aff-actions .btn { width: 100%; height: var(--control-h-lg); }
.clone-stats > .aff-actions { margin-top: 0; }
.clone-bots {
  display: flex;
  flex-direction: column;
  margin: 2px -16px 8px;
}
.clone-bot-row {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 12px 16px;
  border: 0;
  border-top: 1px solid var(--color-divider);
  background: none;
  text-align: left;
  color: inherit;
  cursor: pointer;
  font-size: 15px;
  line-height: 20px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.clone-bot-row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.clone-bots .clone-bot-row:first-child { border-top: 0; }
.clone-bot-row:hover { background: var(--color-surface-hover); }
.clone-bot-row:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -2px; }
.clone-bot-row:disabled { opacity: 0.45; cursor: default; }
.clone-bot-row.is-go::after {
  content: "";
  margin-left: auto;
  width: 7px;
  height: 7px;
  border-right: 1.6px solid var(--color-text-subtle);
  border-top: 1.6px solid var(--color-text-subtle);
  transform: rotate(45deg);
  flex-shrink: 0;
}
.clone-stats-open {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  color: inherit;
  cursor: pointer;
}
.clone-stats-open h3 { margin-bottom: 4px; }
.clone-manage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-divider);
}
.clone-manage-row:last-child { border-bottom: 0; }
.clone-manage-name {
  margin: 0 0 4px;
  font-size: 16px;
  line-height: 22px;
  font-weight: 800;
}
.clone-manage-row .btn { width: auto; flex-shrink: 0; }
.clone-stats h3 {
  margin: 0 0 4px;
  font-size: 22px;
  line-height: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  word-break: break-word;
}
.clone-earn-label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}
.clone-earn {
  margin: 6px 0 0;
  font-size: 28px;
  line-height: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.aff-list {
  list-style: none;
  display: grid;
  gap: 0;
  margin-top: 4px;
}
.aff-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-divider);
  font-size: 14px;
}
.aff-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.aff-list li span:last-child {
  color: var(--color-text-subtle);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.aff-empty {
  margin-top: 4px;
  color: var(--color-text-muted);
  line-height: 20px;
}
.aff-hint {
  font-size: 12px;
  line-height: 16px;
  color: var(--color-text-subtle);
}
.aff-page > .aff-hint { margin-top: -4px; padding: 0 2px; }
.aff-level-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 10px;
}
.aff-level-head .aff-level { margin: 0; flex: 1; min-width: 0; }
.aff-help {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border-default);
  background: var(--color-surface-raised);
  color: var(--color-text-subtle);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}
.aff-help:hover,
.aff-help:focus-visible {
  border-color: var(--color-border-accent);
  color: var(--color-text);
  outline: none;
}
.aff-ladder {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
#ladder-lead:empty { display: none; }
.aff-tier {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "badge pay"
    "name pay"
    "req req";
  gap: 2px 12px;
  padding: 14px 16px 12px;
  border-radius: var(--radius-nested);
  border: 0;
  background: var(--surface-nested);
}
.aff-tier.is-next { background: rgba(255, 255, 255, 0.07); }
.aff-tier.is-on { background: var(--surface-selected); }
.aff-tier-badge {
  grid-area: badge;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
  min-height: 14px;
}
.aff-tier-badge:empty { visibility: hidden; }
.aff-tier.is-on .aff-tier-badge,
.aff-tier.is-next .aff-tier-badge { color: var(--color-accent-hover); }
.aff-tier-name {
  grid-area: name;
  font-size: 18px;
  line-height: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.aff-tier-req {
  grid-area: req;
  font-size: 13px;
  line-height: 18px;
  color: var(--color-text-muted);
  margin-top: 6px;
}
.aff-tier-pay {
  grid-area: pay;
  justify-self: end;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 20px;
  line-height: 24px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.aff-tier-pay small {
  font-size: 11px;
  font-weight: 600;
  line-height: 14px;
  color: var(--color-text-subtle);
}

.hist-row {
  display: flex;
  gap: 12px;
  width: 100%;
  padding: 10px 8px;
  border: 0;
  background: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  text-align: left;
  color: inherit;
}


.hist-row:hover { background: var(--color-surface-hover); }

.hist-row img, .hist-poster {
  width: 44px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--color-surface-raised);
  flex-shrink: 0;
}

.hist-row h4 { font-size: 14px; font-weight: 650; letter-spacing: -0.01em; }
.hist-row p { color: var(--color-text-subtle); font-size: 12px; margin-top: 4px; }

.card-note {
  font-size: 12px;
  line-height: 17px;
  color: var(--color-text-subtle);
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-select-wrap {
  display: block;
  margin: 16px 0 18px;
}

.list-select {
  width: 100%;
  height: var(--control-h);
  appearance: none;
  border-radius: var(--radius-control);
  border: 1px solid var(--color-border-default);
  background: var(--color-field) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='none' stroke='%23898991' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1.5 1.5l4.5 4.5 4.5-4.5'/></svg>") no-repeat right 12px center;
  color: var(--color-text);
  padding: 0 36px 0 12px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  outline: none;
}

.list-select:focus {
  border-color: var(--color-border-accent);
  box-shadow: var(--focus-ring);
}

.list-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list-review {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  background: var(--surface-card);
  border: 0;
  border-radius: var(--radius-container);
  box-shadow: var(--shadow-card);
}

.list-review-cover {
  width: 72px;
  height: 108px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-surface-raised);
  color: var(--color-text-disabled);
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.list-review-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.list-review-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.list-review-title {
  font-size: 14px;
  line-height: 18px;
  font-weight: 650;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-review-note {
  width: 100%;
  min-height: 64px;
  text-align: left;
  background: var(--color-field);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  color: var(--color-text);
  padding: 10px 12px;
  font: inherit;
  line-height: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-review-note.is-empty { color: var(--color-text-subtle); }
.list-review-note:hover { background: var(--color-surface-hover); }

.note-sheet .sheet-body { padding-top: 56px; }
.note-film {
  color: var(--color-text-muted);
  margin: -4px 0 12px;
}
#note-text {
  width: 100%;
  min-height: 140px;
  background: var(--color-field);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-control);
  color: var(--color-text);
  padding: 10px 12px;
  resize: vertical;
  font: inherit;
  line-height: 20px;
  margin-bottom: 12px;
}
#note-text:focus {
  outline: none;
  border-color: var(--color-border-accent);
  box-shadow: var(--focus-ring);
}
#note-save { width: 100%; }

.chip-tab.has-dot { position: relative; padding-right: 18px; }
.chip-tab.has-dot::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

.sup-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.sup-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.sup-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  text-align: left;
  padding: 14px 16px;
  background: var(--surface-card);
  border: 0;
  border-radius: var(--radius-container);
  box-shadow: var(--shadow-card);
  color: inherit;
}
.sup-row b { font-size: 14px; }
.sup-row span { color: var(--color-text-subtle); font-size: 12px; }
.sup-row p {
  grid-column: 1 / -1;
  color: var(--color-text-muted);
  font-size: 13px;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sup-row:hover { background: var(--surface-card-hover); }
.sup-row.is-unread { background: var(--surface-selected); }
.sup-thread {
  margin: 14px 0;
  max-height: 42vh;
  overflow-y: auto;
  overscroll-behavior: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sup-msg {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  max-width: 92%;
}
.sup-msg span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-subtle);
  margin-bottom: 4px;
}
.sup-msg p { white-space: pre-wrap; word-break: break-word; }
.sup-msg.is-me {
  align-self: flex-end;
  background: var(--color-accent-subtle);
  border: 1px solid var(--color-border-accent);
}
.sup-msg.is-them {
  align-self: flex-start;
  background: var(--color-bg-sidebar);
  border: 1px solid var(--color-border);
}
.sup-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.sup-actions .btn { flex: 1; }
#sup-text {
  width: 100%;
  min-height: 88px;
  margin-top: 12px;
  background: var(--color-field);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-control);
  color: var(--color-text);
  padding: 10px 12px;
  resize: vertical;
  font: inherit;
  line-height: 20px;
}
#sup-text:focus {
  outline: none;
  border-color: var(--color-border-accent);
  box-shadow: var(--focus-ring);
}

.list-review .rating-row { margin-bottom: 0; }

.rating-row {
  display: flex;
  gap: 4px;
}

.rating-row button {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  height: var(--control-h-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-surface-raised);
  color: var(--color-text-subtle);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 0;
}

.rating-row button.is-on {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-text-on-accent);
}

.muted { color: var(--color-text-muted); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }

/* Compact, flat surfaces and partner application flows. */
.hero { aspect-ratio: 16 / 9; min-height: 0; max-height: 380px; }
.hero-bg { object-position: center; }
.hero-content { padding: 12px 40px; gap: 6px; }
.hero-content h1 { font-size: 22px; line-height: 1.16; font-weight: 800; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-content p { font-size: 12px; line-height: 1.35; color: var(--color-text-muted); -webkit-line-clamp: 2; }
.hero-meta { max-width: 100%; font-size: 10px; line-height: 18px; gap: 5px; flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
.hero-meta > span { flex-shrink: 0; }
.hero-meta > span:last-child:not(.hero-rating) { flex-shrink: 1; min-width: 0; text-overflow: ellipsis; overflow: hidden; }
.hero-watch { height: 32px; min-height: 32px; margin-top: 2px; padding: 0 12px; font-size: 12px; box-shadow: none; }
.hero-watch svg { width: 14px; height: 14px; }
.hero-controls { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 32px; height: 44px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: rgba(0,0,0,.18); color: rgba(255,255,255,.9); font-size: 26px; font-weight: 400; line-height: 1; cursor: pointer; pointer-events: auto; text-shadow: 0 1px 6px rgba(0,0,0,.65); }
.hero-prev { left: 4px; } .hero-next { right: 4px; }
.rating-good { background: #238452 !important; color: white !important; }
.rating-neutral { background: #687079 !important; color: white !important; }
.rating-low { background: #be3345 !important; color: white !important; }
.aff-stat > span { display: flex; align-items: center; justify-content: center; gap: 5px; }
.aff-help { flex: 0 0 auto; }
.rate-tier { grid-template-areas: "name pay" "req req"; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.rate-tier .aff-tier-pay small { display: none; }
.sup-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sup-cats .chip-tab { width: 100%; min-height: 42px; background: var(--color-surface-elevated); border-radius: 8px; padding: 10px; text-align: center; }
.sub-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; gap: 6px; }
.sub-tabs .chip-tab { width: 100%; min-width: 0; padding: 9px 4px; text-align: center; font-size: 12px; white-space: nowrap; }
.note-sheet { width: min(440px, 100%); }
.note-sheet textarea { display: block; width: 100%; min-height: 150px; max-height: 40dvh; resize: vertical; }
.partner-summary-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--color-divider); font-size: 13px; }
.partner-summary-row > span { display: flex; align-items: center; gap: 5px; min-width: 0; }
.partner-summary-row b { white-space: nowrap; font-size: 16px; }
.partner-summary > .btn, .partner-terms-card > .btn { width: 100%; margin-top: 16px; }
.profile-card .btn, .profile-hero-card .btn { height: var(--control-h-lg); min-height: var(--control-h-lg); font-size: 13px; }
.partner-terms-card p { margin-top: 8px; }
.partner-terms-card .profile-menu-item { width: 100%; min-height: var(--control-h-lg); display: flex; margin-top: 12px; padding: 12px 4px; background: none; border-radius: var(--radius-control); font-size: 13px; }
.partner-terms-card .profile-menu-item::after { margin-right: 2px; }
.partner-form { display: flex; flex-direction: column; gap: 12px; }
.partner-form label, .partner-form legend { font-size: 13px; font-weight: 600; }
.partner-form fieldset { border: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.partner-form legend { margin-bottom: 10px; }
.partner-form input, .partner-form textarea { width: 100%; min-width: 0; background: var(--color-surface-elevated); color: var(--color-text); border: 1px solid var(--color-divider); border-radius: 8px; padding: 12px; font: inherit; font-size: 14px; }
.partner-form textarea { resize: vertical; }
.partner-form .btn { width: 100%; }
.form-error { color: #ff8290; font-size: 13px; }
.application-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.application-status { padding: 5px 8px; background: var(--color-surface-elevated); border-radius: 6px; }
.application-status.is-approved { color: #68d59a; } .application-status.is-rejected { color: #ff8290; }
.application-card p { margin-top: 10px; font-size: 13px; overflow-wrap: anywhere; }
.application-reason { white-space: pre-wrap; }
.withdrawal-row { padding: 16px 0; border-bottom: 1px solid var(--color-divider); }
.withdrawal-row p { margin-top: 8px; font-size: 12px; overflow-wrap: anywhere; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.search input:focus-visible { outline: none; }
.search:focus-within { background: var(--color-surface-hover); color: var(--color-focus); }
@media (max-width: 360px) {
  .hero-content { padding: 10px 36px; gap: 5px; }
  .hero-content h1 { font-size: 18px; }
  .hero-content p { font-size: 11px; line-height: 15px; }
  .partner-summary-row { font-size: 12px; gap: 8px; }
  .partner-summary-row b { font-size: 14px; }
}
@media (min-width: 768px) {
  .hero-content { padding: 24px 60px; max-width: 680px; }
  .hero-content h1 { font-size: 30px; }
  .hero-content p { -webkit-line-clamp: 2; font-size: 14px; }
}

/* Catalogue: compact poster shelves and a four-column library. */
.topbar { padding-bottom: var(--space-3); }
.topbar-main { min-height: var(--control-h-lg); container-type: inline-size; }
.topbar-main .search {
  transition: opacity 320ms var(--ease), transform 320ms var(--ease), visibility 320ms;
}
.topbar-main .topbar-utils {
  transition: transform 320ms var(--ease);
}
.topbar-main.is-profile .search {
  opacity: 0;
  transform: translateX(-12px);
  visibility: hidden;
  pointer-events: none;
}
.topbar-main.is-profile .topbar-utils {
  transform: translateX(calc(-50cqw + 50%));
}
@media (prefers-reduced-motion: reduce) {
  .topbar-main .search, .topbar-main .topbar-utils { transition: none; }
}
.content { padding-left: var(--space-3); padding-right: var(--space-3); }
.topbar .search { flex: 1; min-width: 0; width: auto; margin-top: 0; }
.search { height: var(--control-h-lg); min-height: var(--control-h-lg); border-radius: var(--radius-control); background-color: var(--color-field); }
.search input { font-size: 13px; line-height: 20px; }
.search input::placeholder { color: var(--color-text-subtle); }
/* Profile follows the same control sizing and active accent as navigation. */
.user-pill { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); flex: 0 0 auto; height: var(--control-h-lg); min-height: var(--control-h-lg); padding: 0 var(--space-3); border: 0; border-radius: var(--radius-control); background: var(--color-field); color: var(--color-text-muted); font-size: 13px; line-height: 20px; font-weight: 600; }
.user-pill::before { content: ""; width: 20px; height: 20px; flex: 0 0 20px; background: currentColor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='3.5'/%3E%3Cpath d='M5 21v-2a7 7 0 0 1 14 0v2'/%3E%3C/svg%3E") center / contain no-repeat; }
.user-pill:hover { background: var(--color-surface-hover); color: var(--color-text); }
.user-pill.is-on { background: var(--color-surface-selected); color: var(--color-text); }
.user-pill.is-on::before { color: var(--color-icon-active); }
.filters { margin-top: var(--space-4); gap: var(--space-2); }
#filter-genre { order: 0; }
#filter-year { order: 1; }
#filter-sort { order: 2; }
.filter-trigger { min-height: 38px; border-radius: var(--radius-control); background-color: var(--color-field); font-size: 13px; line-height: 18px; font-weight: 600; }
.filter-opt { font-size: 13px; line-height: 18px; font-weight: 500; text-transform: none; }
.catalog { margin-top: var(--space-4); }
.catalog.is-home-hidden { display: none; }
.grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4) var(--space-2); }
.card { position: relative; transition: scale var(--duration-standard) var(--ease); display: flex; flex-direction: column; align-self: start; aspect-ratio: auto; overflow: hidden; border-radius: var(--radius-sm); background: transparent; border: 0; isolation: isolate; }
.card .poster { position: relative; inset: auto; width: 100%; height: auto; aspect-ratio: 2 / 3; border: 0; border-radius: var(--radius-sm); }
:is(.catalog, .home-shelf) .poster::after { content: none; }
.card .card-title { position: static; margin: 6px 0 0; font-size: 12px; line-height: 16px; font-weight: 600; -webkit-line-clamp: 2; text-shadow: none; overflow-wrap: normal; word-break: normal; hyphens: none; }
.card .card-year { position: absolute; left: 6px; bottom: 6px; z-index: 1; max-width: calc(100% - 12px); padding: 2px 6px; border-radius: var(--radius-xs); background: var(--color-glass); backdrop-filter: blur(8px); color: var(--color-text); font-size: 10px; line-height: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
:is(.catalog, .home-shelf) .p-bar { top: 6px; left: 6px; max-width: calc(100% - 12px); }
:is(.catalog, .home-shelf) .p-rating { height: 17px; padding: 0 5px; border-radius: 5px; font-size: 9px; line-height: 14px; }
:is(.catalog, .home-shelf) .card-note { display: none; }
:is(.catalog, .home-shelf) .card:hover .poster { transform: none; box-shadow: none; }
.home-featured { margin-top: var(--space-4); }
.home-featured .section-header { margin-bottom: var(--space-3); }
.section-header { min-height: 24px; margin-bottom: var(--space-3); gap: var(--space-3); }
.section-header h2 { font-size: 16px; line-height: 22px; font-weight: 800; letter-spacing: -.025em; }
.section-link { display: inline-flex; align-items: center; justify-content: flex-end; flex-shrink: 0; min-height: 32px; gap: 5px; padding: 0; border: 0; background: transparent; color: var(--color-text-subtle); font-size: 10px; line-height: 16px; }
.section-link span { font-size: 18px; line-height: 20px; }
.section-link:hover { color: var(--color-text); }
.hero { aspect-ratio: 1.92; min-height: 0; max-height: 340px; margin: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
.hero-viewport { inset: 0 0 20px; overflow: hidden; }
.hero-slide { border: 1px solid rgba(255,255,255,.14); border-radius: 12px; background: var(--color-surface); }
.hero-bg { object-position: center 28%; }
.hero-scrim { background: linear-gradient(180deg, rgba(0,0,0,.05) 28%, rgba(3,5,9,.08) 46%, rgba(3,5,9,.8) 85%, #05070B 100%); }
.hero-content { right: 28px; max-width: none; padding: 11px 12px; gap: 3px; }
.hero-content h1 { font-size: 17px; line-height: 22px; letter-spacing: -.025em; -webkit-line-clamp: 1; }
.hero-meta { gap: 5px; font-size: 10px; line-height: 15px; font-weight: 400; color: var(--color-text-subtle); }
.hero-meta .hero-rating { height: 16px; padding: 0 5px; border-radius: 5px; font-size: 9px; line-height: 14px; }
.hero-open { position: absolute; bottom: 13px; right: 12px; color: var(--color-accent); background: transparent; border: 0; cursor: pointer; font-size: 25px; line-height: 32px; min-width: 40px; min-height: 40px; }
.hero-controls { inset: auto 0 0; display: flex; align-items: center; justify-content: center; gap: 0; height: 18px; }
.hero-dot { width: 20px; height: 18px; pointer-events: auto; }
.hero-dot::after { width: 4px; height: 4px; background: var(--color-text-disabled); }
.hero-dot.is-active::after { width: 5px; background: var(--color-text); }
.home-sections { display: flex; flex-direction: column; }
.home-section { min-width: 0; padding-top: var(--space-section); margin-top: 0; }
.home-section:first-child { margin-top: 0; border-top: 0; }
.home-shelf { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 24px) / 4); gap: var(--space-2); overflow-x: auto; overflow-y: hidden; padding: var(--space-2); margin: calc(-1 * var(--space-2)); overscroll-behavior-x: contain; scrollbar-width: none; scroll-snap-type: x proximity; }
.home-shelf::-webkit-scrollbar { display: none; }
.home-shelf .card { scroll-snap-align: start; }
.section-actions { display: flex; align-items: center; gap: 6px; }
.shelf-scroll { width: 28px; height: 28px; border: 1px solid var(--color-border-default); border-radius: 50%; background: var(--color-surface); color: var(--color-text); cursor: pointer; font-size: 21px; line-height: 20px; }
.shelf-scroll:focus-visible, .hero-open:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.home-catalog-back { display: flex; align-items: center; gap: 9px; width: max-content; margin: 0 0 14px; padding: 0; min-height: 30px; border: 0; background: transparent; color: var(--color-text); font-size: 16px; line-height: 22px; font-weight: 800; }
.home-catalog-back span { font-size: 20px; color: var(--color-text-subtle); }
.mode-gate .home-featured, .mode-gate .home-sections { display: none !important; }
@media (min-width: 480px) {
  .hero-content h1 { font-size: 22px; line-height: 28px; }
}
@media (min-width: 768px) {
  .content { padding-left: 0; padding-right: 0; }
  .topbar { padding-bottom: var(--space-3); }
  .topbar .search { max-width: none; }
  .home-featured { margin-top: var(--space-4); }
  .hero { aspect-ratio: 2.5; max-height: 340px; }
  .hero-viewport { right: 0; }
  .hero-content { max-width: none; padding: 18px 20px; gap: 5px; }
  .hero-content h1 { font-size: 28px; line-height: 34px; }
  .hero-meta { font-size: 12px; line-height: 18px; gap: 8px; }
  .hero-open { right: 20px; bottom: 22px; }
  .grid { gap: var(--space-section) var(--space-4); }
  .home-shelf { grid-auto-columns: calc((100% - 48px) / 4); gap: var(--space-4); }
  .home-section { margin-top: 0; padding-top: var(--space-section); }
  .section-header h2 { font-size: 19px; line-height: 26px; }
  .section-link { font-size: 12px; }
  :is(.catalog, .home-shelf) .p-bar { top: 9px; left: 9px; }
  :is(.catalog, .home-shelf) .p-rating { height: 21px; font-size: 10px; padding: 0 6px; }
}
@media (prefers-reduced-motion: reduce) { .home-shelf { scroll-behavior: auto; scroll-snap-type: none; } }

/* Four animation categories share the artwork supplied in the design reference. */
.animation-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); margin: var(--space-4) 0 var(--space-section); }
.animation-section { position: relative; display: block; min-width: 0; aspect-ratio: 1; padding: 0; overflow: hidden; isolation: isolate; border: 1px solid rgba(255,255,255,.08); border-radius: 13px; background: var(--color-surface); color: var(--color-text); text-align: left; cursor: pointer; }
.animation-section-art { position: absolute; inset: 0 0 auto; aspect-ratio: 215 / 172; background-image: url("assets/animation-sections.png"); background-size: 219.07% 275.58%; background-position: 2.73% 3.64%; }
.animation-section--anime-series .animation-section-art { background-position: 92.97% 3.64%; }
.animation-section--cartoon-movie .animation-section-art { background-position: 2.73% 80.46%; }
.animation-section--cartoon-series .animation-section-art { background-position: 92.97% 80.46%; }
.animation-section::after { content: ""; position: absolute; inset: 40% 0 0; z-index: 1; background: linear-gradient(transparent, rgba(5,8,13,.78) 65%, #070A10); pointer-events: none; }
.animation-section-label { position: absolute; z-index: 2; left: 12px; right: 30px; bottom: 15px; font-size: clamp(12px, 3.4vw, 16px); line-height: 20px; font-weight: 800; letter-spacing: -.02em; }
.animation-section-arrow { position: absolute; z-index: 2; right: 11px; bottom: 13px; color: var(--color-text-subtle); font-size: 21px; line-height: 24px; }
.animation-section:hover { border-color: rgba(255,255,255,.24); }
.animation-section:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.animation-heading { margin: 15px 0 0; }
.animation-heading button { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0; border: 0; background: transparent; color: var(--color-text-subtle); font-size: 13px; font-weight: 600; }
.animation-heading button span { font-size: 20px; }
.animation-heading h1 { margin: 8px 0 3px; font-size: 21px; line-height: 28px; letter-spacing: -.025em; }
.catalog.is-animation-hidden { display: none; }
.mode-gate .animation-sections, .mode-gate .animation-heading { display: none !important; }
@media (min-width: 768px) {
  .animation-sections { gap: var(--space-section); max-width: 780px; margin-top: var(--space-4); }
  .animation-section-label { left: 19px; right: 45px; bottom: 23px; font-size: 20px; line-height: 28px; }
  .animation-section-arrow { right: 20px; bottom: 25px; }
}

@media (min-width: 480px) {
  .card .card-title { font-size: 13px; line-height: 18px; }
  .profile-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-hero-card.is-user { grid-column: 1 / -1; }
}

@media (hover: hover) and (pointer: fine) {
  .card:hover { scale: 1.025; z-index: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  .card:hover { scale: none; }
}

/* Private clip search */
.mode-gate #clip-panel { display:none !important; }
#clip-panel { max-width:760px; margin:0 auto; padding-bottom:28px; }
.clip-heading { display:flex; align-items:center; gap:12px; margin:8px 0 20px; }
.clip-heading h1 { font-size:clamp(18px,4.8vw,24px); margin:0; flex:1; }
.clip-heading .btn { padding:8px 12px; }
.clip-quota { font-size:14px; white-space:nowrap; color:var(--muted,#a3acb9); }
.clip-form { display:flex; gap:8px; }
.clip-form input { flex:1; min-width:0; background:var(--surface,#171d28); color:inherit; border:1px solid #ffffff24; border-radius:12px; padding:13px 12px; font:inherit; font-size:14px; }
.clip-form input:focus-visible { outline:2px solid #538aff; outline-offset:2px; }
.clip-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.clip-actions .btn { font-size:13px; padding:10px 12px; }
.clip-notice { font-size:14px; min-height:20px; color:var(--muted,#a3acb9); margin:14px 0; }
.clip-result { border:1px solid #ffffff14; border-radius:16px; padding:14px; margin-bottom:14px; background:var(--surface,#151b25); }
.clip-card { display:grid; grid-template-columns:minmax(0,1fr); gap:14px; margin:0 0 14px; text-align:center; }
.clip-card:last-child { margin-bottom:0; }
.clip-cover { width:min(100%,240px); justify-self:center; aspect-ratio:2/3; border-radius:12px; overflow:hidden; background:linear-gradient(140deg,#273754,#151a25); }
.clip-cover img { width:100%; height:100%; object-fit:cover; display:block; }
.clip-card-info h3 { margin:0 0 5px; font-size:20px; overflow-wrap:anywhere; line-height:1.3; }
.clip-year,.clip-status,.clip-empty { font-size:13px; color:var(--muted,#a3acb9); }
.clip-status { margin:8px 0 12px; line-height:1.45; }
.clip-card-actions { display:grid; }
.clip-card-actions .btn,.clip-reject { width:100%; min-height:46px; padding:12px 16px; }
.clip-card-pending { grid-template-columns:64px minmax(0,1fr); text-align:left; }
.clip-card-pending .clip-cover { width:64px; }
.clip-card-pending h3 { font-size:17px; }
.clip-empty { text-align:center; padding:24px; }
@media(max-width:420px) { .clip-form input { font-size:12px; padding:12px 9px; } .clip-form .btn { padding:10px 13px; } }

#clip-panel .btn:not(.btn-primary) { background:#202a38; color:#e6edf5; border:1px solid #ffffff18; }
#clip-panel .btn:disabled { opacity:.55; cursor:wait; }
