/* ============================================================
   JazzyWatch — red/black discovery interface
   Tokens → base → chrome → hero → rails/cards → browse
   → sheet → player → responsive → motion
   ============================================================ */

:root {
  --red: #b72f42;
  --red-hot: #f17d8c;
  --red-deep: #7f1d1d;
  --ink: #f4f4f5;
  --ink-2: #c9c9d1;
  --muted: #a0a0ab;
  --bg: #08080a;
  --bg-1: #0c0c10;
  --surface: #121217;
  --surface-2: #17171d;
  --line: #232329;
  --line-soft: #1a1a20;

  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;

  --gutter: clamp(16px, 4vw, 56px);
  --bar-h: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-jp: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", "Meiryo", var(--font);
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { color-scheme: dark; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { list-style: none; padding: 0; }

::selection { background: var(--red); color: #fff; }

:focus-visible {
  outline: 2px solid var(--red-hot);
  outline-offset: 3px;
  border-radius: 2px;
}

.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;
}

.skip-link {
  min-height: 44px;
  position: fixed;
  top: 10px; left: 10px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--red);
  color: #fff;
  font-weight: 600;
  border-radius: var(--r-sm);
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus-visible { transform: translateY(0); }

/* ── chrome ─────────────────────────────────────────────── */

.bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 32px);
  height: var(--bar-h);
  padding: 0 var(--gutter);
  background: linear-gradient(to bottom, rgba(8, 8, 10, 0.92), rgba(8, 8, 10, 0.55) 70%, transparent);
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease);
  border-bottom: 1px solid transparent;
}
.bar.is-stuck {
  background: rgba(9, 9, 12, 0.86);
  border-bottom-color: var(--line-soft);
  backdrop-filter: blur(14px) saturate(140%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 800;
  letter-spacing: -0.045em;
  font-size: 23px;
  flex: 0 0 auto;
  min-height: 44px;
}
.brand-mark { width: 20px; height: 20px; color: var(--red); margin-right: 6px; }
.brand-word { color: var(--ink); }
.brand-word > span { color: var(--red-hot); }
.brand-colon { color: var(--red-hot); }

.nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); }
.nav-link {
  position: relative;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  padding: 6px 0;
  transition: color 0.2s var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav-link:hover { color: var(--ink); }
.nav-link.is-active { color: var(--ink); }
.nav-link.is-active::after { transform: scaleX(1); }

.nav-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  vertical-align: 1px;
}

.bar-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: clamp(180px, 26vw, 320px);
  height: 46px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease), width 0.3s var(--ease);
}
.search:focus-within {
  border-color: var(--red);
  background: rgba(220, 38, 38, 0.07);
}
.search-icon { width: 16px; height: 16px; color: var(--muted); flex: 0 0 auto; }
.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  outline: none;
}
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { filter: invert(1) opacity(0.5); }
.search-kbd {
  font-family: inherit;
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
}

.avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(220, 38, 38, 0.45);
  background: radial-gradient(circle at 30% 25%, #3a1414, #14141a);
  color: var(--ink-2);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.avatar:hover { border-color: var(--red); transform: translateY(-1px); }

.menu-btn {
  display: none;
  flex: 0 0 auto;
  width: 40px; height: 40px;
  padding: 11px 9px;
  gap: 5px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
}
.menu-btn-line { display: block; height: 2px; background: var(--ink-2); border-radius: 1px; }
.menu-btn[aria-expanded="true"] .menu-btn-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn-line:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .menu-btn-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.menu-btn-line { transition: transform 0.25s var(--ease), opacity 0.2s var(--ease); }

.menu-panel {
  position: fixed;
  top: var(--bar-h);
  left: 0; right: 0;
  z-index: 55;
  padding: 12px var(--gutter) 20px;
  background: rgba(9, 9, 12, 0.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.menu-panel nav { display: grid; gap: 2px; }
.menu-link {
  padding: 14px 4px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.menu-link:hover { color: var(--red-hot); }
.menu-note { margin-top: 14px; color: var(--muted); font-size: 12px; }

/* ── hero ───────────────────────────────────────────────── */

main { display: block; padding-top: var(--bar-h); }

.preview-notice {
  padding: 9px var(--gutter);
  background: #101014;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.preview-badge { color: var(--ink-2); font-size: 11px; white-space: nowrap; }
#view-home { padding-top: 0; }
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 560px;
  padding: 48px var(--gutter) 56px;
  overflow: hidden;
  isolation: isolate;
}
.hero-stage { position: absolute; inset: 0; z-index: -2; background: #14151a; }
.hero-art { position: absolute; inset: 0; }
.banner-image, .poster-image { width: 100%; height: 100%; object-fit: cover; }
.hero-art .banner-image { object-position: 62% center; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, #08080af2 0%, #08080ac9 34%, #08080a14 72%),
    linear-gradient(0deg, var(--bg), transparent 42%);
}
.hero-inner { position: relative; width: 54%; max-width: 600px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--red-hot);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--red);
}

.hero-title {
  font-size: clamp(46px, 5.2vw, 76px);
  max-width: 12ch;
  text-transform: uppercase;
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 800;
  text-wrap: balance;
  margin-bottom: 8px;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.55);
}
.hero-native {
  font-family: var(--font-jp);
  font-size: clamp(13px, 1.3vw, 15px);
  color: var(--ink-2);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 18px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.meta li { display: inline-flex; align-items: center; gap: 6px; }
.meta li + li::before {
  content: "";
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--line);
  margin-right: 4px;
}
.meta .pill {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.meta .pill-red { border-color: rgba(220, 38, 38, 0.5); color: var(--red-hot); }

.hero-synopsis {
  max-width: 54ch;
  margin-bottom: 26px;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.65;
  text-wrap: pretty;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease),
    transform 0.2s var(--ease), color 0.2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-icon { width: 15px; height: 15px; flex: 0 0 auto; }

.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-hot); color: var(--bg); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--ink);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.11); border-color: rgba(255, 255, 255, 0.22); }
.btn-ghost[aria-pressed="true"] { border-color: var(--red); color: var(--red-hot); background: rgba(220, 38, 38, 0.12); }
.btn-quiet {
  background: none;
  border-color: var(--line);
  color: var(--ink-2);
}
.btn-quiet:hover { border-color: var(--ink-2); color: var(--ink); }

.hero-dots {
  position: absolute;
  right: var(--gutter);
  bottom: 46px;
  display: grid;
  gap: 8px;
  width: 228px;
}
.hero-dot {
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  padding: 8px;
  border: 1px solid #ffffff24;
  border-radius: 6px;
  background: #08080ac7;
  color: var(--ink-2);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.hero-dot img { width: 38px; height: 54px; object-fit: cover; border-radius: 3px; }
.hero-dot small { display: block; margin-bottom: 2px; color: var(--muted); font-size: 10px; letter-spacing: 0.1em; }
.hero-dot strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; font-weight: 650; line-height: 1.35; }
.hero-dot[aria-current="true"] { border-color: var(--red-hot); background: #22161cde; color: #fff; }
.hero-dot:hover { background: #202026ee; border-color: var(--ink-2); }
.hero-rule { position: absolute; bottom: 0; inset-inline: var(--gutter); height: 1px; background: var(--line); }

/* ── rails ──────────────────────────────────────────────── */

.rail { padding: clamp(26px, 4vw, 46px) 0 0; }
.rail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 0 var(--gutter);
  margin-bottom: 14px;
}
.rail-title {
  font-size: clamp(21px, 2vw, 28px);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.rail-title::before {
  content: "";
  display: inline-block;
  width: 3px; height: 15px;
  margin-right: 10px;
  background: var(--red);
  vertical-align: -1px;
}
.rail-more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s var(--ease);
}
.rail-more:hover { color: var(--red-hot); }

.rail-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(152px, 17vw, 196px);
  gap: clamp(10px, 1.2vw, 16px);
  padding: 4px var(--gutter) 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}
.rail-track::-webkit-scrollbar { display: none; }
.rail-track > * { scroll-snap-align: start; }

/* ── cards ──────────────────────────────────────────────── */

.card { position: relative; min-width: 0; }

.card-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  border-radius: var(--r-md);
}

.card-art {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid #ffffff18;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.poster-image { position: absolute; inset: 0; transition: transform 0.35s var(--ease); }
.card:hover .poster-image { transform: scale(1.035); }
.card-art::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 62%;
  background: linear-gradient(to top, rgba(6, 6, 8, 0.92), transparent);
}

.card-body { display: block; padding: 9px 2px 0; }
.card-title {
  display: block;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.3;
  color: var(--ink);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.card-sub {
  display: block;
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-badge {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 2;
  padding: 3px 6px;
  border-radius: 3px;
  background: #08080abf;
  border: 1px solid #ffffff30;
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-save {
  position: absolute;
  right: 8px; top: 8px;
  z-index: 3;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(8, 8, 10, 0.62);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  opacity: 1;
  transform: none;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.card-save:hover { border-color: var(--red); }
.card-save[aria-pressed="true"] {
  opacity: 1;
  transform: none;
  background: var(--red);
  border-color: var(--red);
}

.card:hover .card-art,
.card:focus-within .card-art {
  transform: translateY(-3px);
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.55), 0 18px 40px -18px rgba(0, 0, 0, 0.9);
}
.card:hover .card-save,
.card:focus-within .card-save { opacity: 1; transform: none; }

/* Feature films break up the repeated poster rails. */
.card-info { position: absolute; inset: auto 12px 12px; z-index: 1; color: #f1f1f4; font-size: 11px; }
.rail--films { padding-bottom: 52px; }
.rail--films .rail-track { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; overflow: visible; }
.card--wide { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.card--wide .card-open { display: grid; grid-template-columns: 132px 1fr; align-items: center; gap: 22px; min-height: 198px; }
.card--wide .card-art { border-radius: 0; border: 0; }
.card--wide .card-body { padding: 20px 48px 20px 0; }
.card--wide .card-title { font-size: clamp(19px, 1.7vw, 25px); }
.card-description { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink-2); font-size: 12.5px; line-height: 1.6; margin-top: 14px; }
.card--wide .card-info { display: none; }
.card--wide:hover .card-art { transform: none; }

/* ── page heads, filters, grid ──────────────────────────── */

.view { padding-top: clamp(28px, 4vw, 48px); }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 0 var(--gutter);
  margin-bottom: clamp(18px, 3vw, 30px);
}
.page-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.page-head .eyebrow { margin-bottom: 8px; }
.page-count { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }

.filters { padding: 0 var(--gutter); margin-bottom: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.chip {
  min-height: 44px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease), color 0.18s var(--ease);
}
.chip:hover { border-color: var(--ink-2); color: var(--ink); }
.chip[aria-pressed="true"] {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.selects {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}
.field { display: grid; gap: 5px; }
.field-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.field select {
  height: 44px;
  min-width: 122px;
  padding: 0 30px 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%238b8b96' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 10px center / 10px;
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s var(--ease);
}
.field select:hover { border-color: var(--ink-2); }
.field-inline select { min-width: 88px; }

.filters-reset { height: 44px; }
.filters-reset:disabled { opacity: 0.4; cursor: default; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: clamp(14px, 1.8vw, 26px) clamp(10px, 1.2vw, 18px);
  padding: 0 var(--gutter) clamp(40px, 6vw, 72px);
}

.empty {
  padding: clamp(40px, 9vw, 110px) var(--gutter);
  text-align: center;
}
.empty-mark {
  font-family: var(--font-jp);
  font-size: clamp(56px, 10vw, 96px);
  line-height: 1;
  color: rgba(220, 38, 38, 0.22);
  -webkit-text-stroke: 1px rgba(220, 38, 38, 0.4);
  margin-bottom: 18px;
}
.empty-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.empty-copy { color: var(--muted); font-size: 13.5px; margin-bottom: 22px; }

/* ── footer ─────────────────────────────────────────────── */

.site-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 26px var(--gutter) 40px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 11.5px;
}
.foot-mark { color: var(--red-hot); font-weight: 800; letter-spacing: 0.16em; }
.foot-meta { font-variant-numeric: tabular-nums; }

/* ── scrim + sheet ──────────────────────────────────────── */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(4, 4, 6, 0.72);
  backdrop-filter: blur(3px);
  animation: fade 0.25s var(--ease);
}

.sheet {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 90;
  width: min(520px, 100%);
  background: var(--bg-1);
  border-left: 1px solid var(--line);
  overflow-y: auto;
  overscroll-behavior: contain;
  animation: slide-in 0.32s var(--ease);
}
.sheet-close {
  position: sticky;
  top: 12px;
  margin: 12px 12px 0 auto;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(8, 8, 10, 0.8);
  backdrop-filter: blur(8px);
  cursor: pointer;
  z-index: 2;
}
.sheet-close svg { width: 15px; height: 15px; }
.sheet-close:hover { border-color: var(--red); color: var(--red-hot); }

.sheet-hero {
  position: relative;
  height: 210px;
  margin-top: -56px;
  overflow: hidden;
  background:
    radial-gradient(90% 90% at 70% 20%, var(--c1) 0%, transparent 65%),
    linear-gradient(180deg, transparent, var(--bg-1) 92%);
}
.sheet-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg-1), transparent 80%); }
.sheet-body { padding: 0 24px 40px; margin-top: -34px; position: relative; }
.sheet-title {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 6px;
  text-wrap: balance;
}
.sheet-native { font-family: var(--font-jp); color: var(--muted); font-size: 12.5px; letter-spacing: 0.08em; margin-bottom: 14px; }
.sheet-synopsis { color: var(--ink-2); font-size: 14px; line-height: 1.65; margin: 16px 0 22px; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 8px; }

.spec {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px 14px;
  margin: 22px 0;
  padding: 16px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px;
}
.spec dt { color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; font-size: 10px; font-weight: 700; padding-top: 2px; }
.spec dd { margin: 0; color: var(--ink-2); }

.season-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.season-head h3 { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.season-pills { display: flex; gap: 6px; }
.season-pill {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.season-pill[aria-pressed="true"] { border-color: var(--red); background: rgba(220, 38, 38, 0.12); color: var(--red-hot); }

.eps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 6px;
}
.ep {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: border-color 0.16s var(--ease), color 0.16s var(--ease), background-color 0.16s var(--ease);
}
.ep:hover { border-color: var(--red); color: #fff; }
.ep.is-current { background: var(--red); border-color: var(--red); color: #fff; font-weight: 700; }
.ep.is-watched { border-color: rgba(220, 38, 38, 0.4); }
.film-note { color: var(--muted); font-size: 12.5px; }

/* ── player ─────────────────────────────────────────────── */

.player { position: fixed; inset: 0; z-index: 120; display: grid; grid-template-rows: 1fr auto; background: var(--bg); }
.player-stage { position: relative; min-height: 0; display: grid; place-items: center; overflow: hidden; }
.player-image { position: absolute; inset: 0; opacity: 0.3; }
#player-frame { position: relative; width: 100%; height: 100%; border: 0; background: #000; }
#player-load { margin-top: 20px; }
.player-unavailable { position: relative; margin: 24px; padding: 26px; max-width: 520px; background: #08080ae8; border-left: 3px solid var(--red); }
.player-unavailable h2 { font-size: clamp(24px, 4vw, 38px); line-height: 1.1; margin-bottom: 16px; }
.player-unavailable > p:last-child { color: var(--ink-2); font-size: 14px; }

.player-bar {
  position: relative;
  padding: 16px clamp(16px, 4vw, 40px) 18px;
  background: linear-gradient(to top, #08080a, #0b0b0f);
  border-top: 1px solid var(--line-soft);
}
.player-titles { max-width: calc(100% - 52px); }
.player-title { font-size: clamp(16px, 2vw, 20px); font-weight: 750; letter-spacing: -0.01em; }
.player-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.player-close {
  position: absolute;
  top: 14px; right: clamp(16px, 4vw, 40px);
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: none;
  cursor: pointer;
}
.player-close svg { width: 15px; height: 15px; }
.player-close:hover { border-color: var(--red); color: var(--red-hot); }

.player-controls { margin-top: 12px; }

.controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.controls-left { display: flex; align-items: center; gap: 4px; }

.ctrl {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease);
}
.ctrl svg { width: 17px; height: 17px; }
.ctrl:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.player-note { margin-top: 10px; color: #85858f; font-size: 10.5px; letter-spacing: 0.02em; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
/* ── toast ──────────────────────────────────────────────── */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 200;
  transform: translate(-50%, 12px);
  padding: 10px 18px;
  border: 1px solid var(--red);
  border-radius: 999px;
  background: rgba(12, 12, 16, 0.96);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.2s var(--ease), transform 0.25s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.noscript {
  position: fixed;
  inset: auto 0 0;
  padding: 12px;
  background: var(--red);
  color: #fff;
  text-align: center;
  font-size: 13px;
}

/* ── account ────────────────────────────────────────────── */
.account-button { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; min-width: 44px; height: 44px; padding: 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 12px; font-weight: 650; }
.account-button svg { width: 18px; height: 18px; }
.account-button:hover { border-color: var(--red-hot); }
.account-dialog { color: var(--ink); background: var(--bg-1); border: 1px solid #ffffff24; border-radius: 16px; width: min(440px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: clamp(24px, 5vw, 36px); box-shadow: 0 32px 100px #0009; overflow-y: auto; }
.account-dialog::backdrop { background: #000b; backdrop-filter: blur(6px); }
.account-dialog h2 { font-size: clamp(28px, 5vw, 34px); line-height: 1.1; letter-spacing: -0.045em; max-width: 10ch; }
.account-close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; background: none; border: 0; font-size: 26px; color: var(--muted); cursor: pointer; }
.account-intro { color: var(--ink-2); font-size: 13px; margin: 16px 0 24px; }
.account-form { display: grid; gap: 12px; }
.account-form label { color: var(--ink-2); font-size: 12px; font-weight: 650; }
.account-form input { width: 100%; height: 48px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); padding: 0 12px; font: inherit; }
.account-form input:focus { border-color: var(--red-hot); }
.account-form input[readonly] { color: var(--muted); }
.account-form input[name="code"] { font-size: 22px; letter-spacing: 0.32em; }
.account-code-field { display: grid; gap: 12px; }
.account-privacy { color: var(--muted); font-size: 11px; line-height: 1.65; }
.account-status { color: var(--ink-2); font-size: 12px; line-height: 1.65; margin-top: 20px; }
.account-status.is-error { color: var(--red-hot); }
.account-address { overflow-wrap: anywhere; color: var(--ink-2); margin-bottom: 16px; }
#account-retry { margin-top: 16px; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
body:has(.account-dialog[open]) { overflow: hidden; }

/* ── Google sign-in and private profile ──────────────────── */
.account-google { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 12px 16px; background: #f2f2f2; color: #202124; border: 1px solid #d7d7d7; border-radius: 6px; font-weight: 650; cursor: pointer; }
.account-google:hover:not(:disabled) { background: #fff; }
.account-google svg { width: 20px; height: 20px; flex-shrink: 0; }
.account-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; margin: 6px 0; }
.account-divider::before, .account-divider::after { content: ''; height: 1px; background: var(--line); flex: 1; }
#account-signed-in { display: flex; flex-wrap: wrap; gap: 10px; }
#account-signed-in .account-address { flex-basis: 100%; }
.profile-view { padding: 36px var(--gutter) 64px; }
.profile-guest { max-width: 580px; padding: 72px 0 100px; }
.profile-guest > p:not(.eyebrow) { color: var(--ink-2); margin: 18px 0 28px; max-width: 38ch; }
.profile-guest-link { display: block; width: fit-content; color: var(--muted); font-size: 12px; padding: 16px 0; }
.profile-cover { height: clamp(160px, 22vw, 290px); position: relative; overflow: hidden; background: #1c1419; border: 1px solid #36252d; border-radius: 10px; }
.profile-cover img { width: 100%; height: 100%; object-fit: cover; }
.profile-cover-word { position: absolute; bottom: -0.23em; right: 0.12em; font-size: clamp(48px, 12vw, 170px); font-weight: 850; letter-spacing: -0.075em; color: #50303c; white-space: nowrap; }
.profile-private { position: absolute; top: 18px; right: 18px; background: #08080ae6; border: 1px solid #ffffff25; color: #ece5e8; font-size: 10px; letter-spacing: .06em; padding: 6px 10px; border-radius: 4px; }
.profile-summary { position: relative; display: grid; grid-template-columns: 144px minmax(0, 1fr) auto; align-items: start; gap: 28px; padding: 0 28px; margin-top: -44px; }
.profile-avatar { display: grid; place-items: center; width: 144px; height: 144px; background: #2b2026; color: #e0a4b4; border: 6px solid var(--bg); border-radius: 50%; overflow: hidden; font-size: 54px; font-weight: 700; position: relative; }
.profile-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.profile-identity { padding-top: 66px; min-width: 0; }
.profile-identity .eyebrow { font-size: 10px; margin-bottom: 6px; }
.profile-identity h1 { font-size: clamp(26px, 4vw, 38px); line-height: 1.12; letter-spacing: -.045em; overflow-wrap: anywhere; }
.profile-description { max-width: 62ch; color: var(--ink-2); font-size: 13px; margin-top: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.profile-email { color: var(--muted); font-size: 11px; margin-top: 10px; overflow-wrap: anywhere; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 66px; }
.profile-status { color: var(--ink-2); min-height: 20px; font-size: 12px; margin: 24px 28px 0; }
.profile-status.is-error { color: var(--red-hot); }
#profile-retry { margin-left: 28px; }
.profile-form { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; margin: 24px 28px 0; padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.profile-form h2 { font-size: 16px; letter-spacing: -.02em; margin-bottom: 16px; }
.profile-form label { display: block; margin: 18px 0 8px; color: var(--ink-2); font-size: 12px; font-weight: 650; }
.profile-form input, .profile-form textarea { display: block; width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; padding: 12px; }
.profile-form input { min-height: 46px; }
.profile-form textarea { resize: vertical; min-height: 100px; max-height: 300px; }
.profile-form input:focus, .profile-form textarea:focus { border-color: var(--red-hot); }
.profile-form input[type=file] { font-size: 12px; padding: 8px; }
.profile-form input::file-selector-button { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); border-radius: 3px; padding: 7px 10px; margin-right: 8px; cursor: pointer; }
.profile-help { color: var(--muted); font-size: 11px; line-height: 1.7; margin-top: 8px; }
.profile-form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.profile-remove { display: block; border: 0; background: none; min-height: 44px; padding: 8px 0; color: var(--red-hot); font-size: 11px; cursor: pointer; }
.profile-watchlist { padding-top: 32px; margin-top: 12px; border-top: 1px solid var(--line); }
.profile-watchlist .rail-head { padding-inline: 0; flex-wrap: wrap; gap: 12px; }
.profile-watchlist .eyebrow { margin-bottom: 5px; font-size: 10px; }
#profile-watchlist-count { color: var(--muted); font-size: 13px; margin-left: 8px; font-weight: 400; }
#profile-watchlist-status { margin: 0 0 18px; }
@media (max-width: 900px) {
  .profile-summary { grid-template-columns: 112px minmax(0, 1fr); gap: 20px; padding-inline: 18px; }
  .profile-avatar { width: 112px; height: 112px; font-size: 42px; }
  .profile-actions { grid-column: 2; padding-top: 0; }
  .profile-form { gap: 28px; margin-inline: 18px; }
}
@media (max-width: 560px) {
  .profile-view { padding-top: 20px; }
  .profile-summary { display: block; padding-inline: 12px; margin-top: -38px; }
  .profile-avatar { width: 96px; height: 96px; border-width: 5px; }
  .profile-identity { padding-top: 18px; }
  .profile-actions { padding-top: 20px; }
  .profile-status { margin-inline: 12px; }
  #profile-retry { margin-left: 12px; }
  .profile-form { grid-template-columns: minmax(0, 1fr); margin-inline: 12px; gap: 32px; }
  .profile-form input, .profile-form textarea { font-size: 16px; }
  .profile-cover .profile-private { top: 12px; right: 12px; }
  .profile-watchlist .rail-more { font-size: 11px; }
}

/* ── responsive ─────────────────────────────────────────── */

@media (max-width: 900px) {
  :root { --bar-h: 64px; }
  .nav, .preview-badge { display: none; }
  .menu-btn { display: grid; width: 44px; height: 44px; }
  .search { width: clamp(140px, 34vw, 250px); height: 46px; }
  .search-kbd { display: none; }
  .hero { display: block; min-height: 0; padding-top: 130px; padding-bottom: 24px; }
  .hero::before { background: linear-gradient(0deg, var(--bg) 6%, #08080ac9 58%, #08080a14 100%); }
  .hero-art .banner-image { object-position: 60% top; }
  .hero-inner { width: 100%; max-width: 600px; }
  .hero-title { font-size: clamp(40px, 7vw, 58px); max-width: 18ch; }
  .hero-dots { position: relative; right: auto; bottom: auto; width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 28px; }
  .rail--films .rail-track { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  :root { --gutter: 16px; --bar-h: 116px; }
  body { font-size: 14.5px; }
  .bar { gap: 10px; flex-wrap: wrap; height: auto; min-height: var(--bar-h); padding-block: 8px; background: #08080aee; }
  .brand { font-size: 21px; letter-spacing: -0.045em; min-height: 44px; }
  .brand-mark { width: 17px; height: 17px; margin-right: 2px; }
  .search { width: 100%; min-width: 0; }
  .search input { min-width: 0; font-size: 12px; }
  .bar-tools { display: contents; }
  .bar .brand { margin-right: auto; }
  .bar .search { order: 4; flex: 1 0 100%; height: 46px; }
  .account-button span { display: none; }
  .account-button { width: 44px; padding: 0; justify-content: center; }
  .preview-notice { font-size: 11px; padding-block: 8px; }
  .hero { padding-top: 42px; }
  .hero-title { font-size: 40px; max-width: 14ch; }
  .hero-native { margin-bottom: 12px; }
  .hero .meta { gap: 6px; margin-bottom: 14px; font-size: 11px; }
  .hero-synopsis { font-size: 13px; line-height: 1.6; margin-bottom: 20px; }
  .hero-actions { gap: 8px; }
  .hero-actions .btn { padding-inline: 14px; font-size: 12px; }
  .hero-actions #hero-play { flex: 1 0 100%; }
  .hero-actions .btn:not(#hero-play) { flex: 1; }
  .hero-dots { gap: 6px; margin-top: 20px; }
  .hero-dot { grid-template-columns: 1fr; gap: 5px; padding: 8px; }
  .hero-dot img { display: none; }
  .hero-dot small { font-size: 10px; }
  .hero-dot strong { font-size: 11px; }
  .rail-track { grid-auto-columns: 146px; gap: 12px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .card--wide .card-open { grid-template-columns: 100px 1fr; gap: 14px; min-height: 150px; }
  .card--wide .card-body { padding: 16px 18px 16px 0; }
  .card--wide .card-title { font-size: 18px; }
  .card--wide .card-save { top: auto; bottom: 8px; right: auto; left: 48px; }
  .card--wide .card-description { font-size: 11px; -webkit-line-clamp: 2; margin-top: 8px; }
  .page-count { font-size: 11.5px; }
  .selects { gap: 8px; }
  .field { flex: 1 1 calc(50% - 4px); }
  .field select { width: 100%; min-width: 0; }
  .filters-reset { flex: 1 1 100%; }
  .sheet { width: 100%; }
  .sheet-body { padding: 0 18px 32px; }
}

@media (min-width: 1440px) {
  :root { --gutter: 72px; }

  .grid { grid-template-columns: repeat(auto-fill, minmax(186px, 1fr)); }
}

/* ── motion preferences ─────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .hero-art { transform: none; }

}
