:root {
  color-scheme: dark;
  --bg: #08080b;
  --surface: rgba(25, 25, 31, .72);
  --surface-strong: #17171d;
  --surface-soft: rgba(255, 255, 255, .055);
  --line: rgba(255, 255, 255, .11);
  --line-bright: rgba(255, 255, 255, .2);
  --text: #f6f3ee;
  --muted: #a09da6;
  --accent: #ff6846;
  --accent-light: #ffab77;
  --blue: #7ab8ff;
  --green: #57d89b;
  --yellow: #f7c85c;
  --red: #ff665f;
  --shadow: 0 24px 70px rgba(0,0,0,.42);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -20%, rgba(255, 104, 70, .12), transparent 38%),
    linear-gradient(180deg, #09090d 0%, #070709 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.glass {
  background: linear-gradient(135deg, rgba(255,255,255,.105), rgba(255,255,255,.035));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), var(--shadow);
  backdrop-filter: blur(28px) saturate(1.35);
}
.ambient {
  position: fixed;
  pointer-events: none;
  filter: blur(70px);
  opacity: .18;
  border-radius: 50%;
  z-index: -1;
}
.ambient-one { width: 360px; height: 360px; background: #d94b27; top: 4%; left: -180px; }
.ambient-two { width: 440px; height: 440px; background: #294cae; right: -250px; top: 44%; }

.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  align-items: center;
  gap: clamp(40px, 7vw, 120px);
  max-width: 1320px;
  margin: 0 auto;
  padding: 56px clamp(24px, 5vw, 72px);
}
.auth-visual { max-width: 720px; }
.eyebrow, .section-kicker {
  color: var(--accent-light);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.auth-visual h1 {
  margin: 18px 0 24px;
  font-size: clamp(64px, 8vw, 124px);
  line-height: .84;
  letter-spacing: -.075em;
  font-weight: 850;
}
.auth-visual h1 span { color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.4); }
.auth-visual > p { max-width: 560px; color: var(--muted); font-size: 18px; line-height: 1.65; }
.film-strip { display: flex; gap: 10px; margin-top: 44px; transform: rotate(-2deg); }
.film-strip i { width: 70px; aspect-ratio: 2/3; border-radius: 7px; background: linear-gradient(155deg, #563147, #151824); box-shadow: 0 14px 26px rgba(0,0,0,.35); }
.film-strip i:nth-child(2) { background: linear-gradient(155deg, #9b4a36, #251313); transform: translateY(-14px); }
.film-strip i:nth-child(3) { background: linear-gradient(155deg, #31587d, #11151b); }
.film-strip i:nth-child(4) { background: linear-gradient(155deg, #73632d, #18150d); transform: translateY(-10px); }
.film-strip i:nth-child(5) { background: linear-gradient(155deg, #503775, #171121); }
.auth-card { width: min(100%, 480px); padding: 38px; border-radius: 30px; justify-self: end; }
.brand-mark, .avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--accent), #b83221);
  color: white;
  font-weight: 850;
  box-shadow: 0 10px 30px rgba(255,104,70,.25);
}
.auth-card h2 { margin: 28px 0 6px; font-size: 28px; letter-spacing: -.03em; }
.profile-picker { display: grid; gap: 12px; margin-top: 28px; }
.profile-button {
  width: 100%; display: flex; align-items: center; gap: 15px; padding: 14px;
  background: rgba(255,255,255,.045); border: 1px solid var(--line); border-radius: 18px;
  text-align: left; cursor: pointer; transition: .22s ease;
}
.profile-button:hover { transform: translateY(-2px); background: rgba(255,255,255,.085); border-color: var(--line-bright); }
.profile-button .avatar { width: 46px; height: 46px; border-radius: 14px; }
.profile-button:nth-child(2) .avatar { background: linear-gradient(145deg, #4d8dce, #32519b); }
.profile-button strong { display: block; font-size: 16px; }
.profile-button small { color: var(--muted); }
.profile-button .arrow { margin-left: auto; color: var(--muted); font-size: 20px; }
.auth-form { margin-top: 12px; }
.back-link { border: 0; background: none; color: var(--muted); padding: 6px 0; cursor: pointer; }
.selected-profile { display: flex; align-items: center; gap: 12px; margin: 18px 0 24px; font-weight: 750; }
.selected-profile .avatar { width: 42px; height: 42px; border-radius: 13px; }
.field { display: grid; gap: 8px; margin: 15px 0; color: #d5d1d7; font-size: 13px; font-weight: 700; }
.field input, .field textarea, .field select, .input {
  width: 100%; border: 1px solid var(--line); background: rgba(8,8,11,.66); color: var(--text);
  border-radius: 14px; padding: 13px 14px; font-weight: 500;
}
.field textarea { min-height: 100px; resize: vertical; }
.field select, .input[type="date"] { color-scheme: dark; }
.button {
  border: 1px solid var(--line); border-radius: 14px; padding: 11px 17px; cursor: pointer;
  background: rgba(255,255,255,.065); font-weight: 750; transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.button:hover { transform: translateY(-1px); background: rgba(255,255,255,.1); border-color: var(--line-bright); }
.button:disabled { opacity: .42; cursor: not-allowed; transform: none; }
.button.primary { border-color: transparent; background: linear-gradient(135deg, var(--accent), #dd3d28); box-shadow: 0 10px 28px rgba(255,104,70,.22); }
.button.primary:hover { background: linear-gradient(135deg, #ff795b, #e54a35); }
.button.danger { color: #ff928d; border-color: rgba(255,102,95,.25); background: rgba(255,102,95,.08); }
.button.success { background: rgba(87,216,155,.12); border-color: rgba(87,216,155,.3); color: #83e9b8; }
.button.wide { width: 100%; margin-top: 12px; }
.form-error { min-height: 20px; color: #ff8f88; font-size: 13px; margin-top: 14px; }
.mode-note { margin-top: 16px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }

.app { min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: 74px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(22px, 4vw, 64px); background: linear-gradient(to bottom, rgba(8,8,11,.94), rgba(8,8,11,.7), transparent);
  backdrop-filter: blur(16px);
}
.wordmark { display: flex; align-items: center; gap: 11px; border: 0; background: transparent; font-weight: 820; cursor: pointer; letter-spacing: -.02em; }
.wordmark span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--accent); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.user-chip { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.06); padding: 6px 11px 6px 6px; border-radius: 99px; cursor: pointer; font-size: 13px; font-weight: 750; }
.user-chip .mini-avatar { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: var(--accent); font-size: 11px; }
main { max-width: 1500px; margin: 0 auto; padding: 10px clamp(18px, 4vw, 60px) 130px; }
.page { display: none; animation: pageIn .38s cubic-bezier(.2,.8,.2,1); }
.page.active { display: block; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } }
.bottom-nav {
  position: fixed; left: 50%; bottom: 20px; z-index: 50; transform: translateX(-50%);
  display: flex; gap: 4px; padding: 7px; border-radius: 22px; width: min(calc(100% - 32px), 660px);
}
.bottom-nav button {
  flex: 1; min-width: 0; display: grid; place-items: center; gap: 3px; border: 0; padding: 8px 5px;
  border-radius: 16px; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 700; transition: .2s ease;
}
.bottom-nav button:hover { color: var(--text); }
.bottom-nav button.active { background: rgba(255,255,255,.105); color: var(--text); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.nav-icon { font-size: 18px; line-height: 1; font-weight: 400; }

.page-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 24px 0 30px; }
.page-head h1 { margin: 6px 0 0; font-size: clamp(38px, 5vw, 70px); letter-spacing: -.06em; line-height: .95; }
.page-head p { color: var(--muted); max-width: 580px; line-height: 1.55; }
.hero-panel {
  position: relative; overflow: hidden; min-height: 390px; border: 1px solid var(--line); border-radius: 34px;
  padding: clamp(28px, 5vw, 64px); display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center;
  background:
    linear-gradient(100deg, rgba(9,9,12,.98) 10%, rgba(9,9,12,.7) 58%, rgba(9,9,12,.22)),
    radial-gradient(circle at 88% 34%, rgba(255,104,70,.38), transparent 28%),
    linear-gradient(135deg, #1b1a26, #161010);
  box-shadow: var(--shadow);
}
.hero-panel::after {
  content: ""; position: absolute; inset: -30% -5% auto auto; width: 46%; aspect-ratio: 2/3; border-radius: 40px;
  background: repeating-linear-gradient(90deg, transparent 0 12%, rgba(255,255,255,.035) 12% 13%), linear-gradient(145deg, rgba(255,255,255,.08), transparent);
  transform: rotate(14deg); opacity: .6;
}
.hero-content { position: relative; z-index: 2; }
.hero-title { margin: 10px 0 14px; font-size: clamp(46px, 7vw, 96px); line-height: .92; letter-spacing: -.065em; }
.hero-title span { display: block; color: var(--accent-light); }
.hero-copy { color: var(--muted); font-size: 16px; line-height: 1.6; max-width: 620px; }
.progress-group { margin-top: 36px; max-width: 620px; }
.progress-meta { display: flex; justify-content: space-between; align-items: end; margin-bottom: 12px; }
.progress-number { font-size: 32px; font-weight: 840; letter-spacing: -.04em; }
.progress-label { color: var(--muted); font-size: 13px; }
.progress-track { height: 10px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,.4); }
.progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #ffb26e); box-shadow: 0 0 25px rgba(255,104,70,.52); transition: width .7s cubic-bezier(.2,.8,.2,1); }
.hero-stats { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.stat-card { min-height: 124px; padding: 20px; border: 1px solid var(--line); background: rgba(8,8,11,.42); border-radius: 20px; backdrop-filter: blur(12px); }
.stat-card .stat-value { font-size: 30px; font-weight: 850; letter-spacing: -.04em; }
.stat-card .stat-label { color: var(--muted); font-size: 12px; margin-top: 7px; line-height: 1.35; }
.section { margin-top: 34px; }
.section-title-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.section-title-row h2 { margin: 0; font-size: 22px; letter-spacing: -.035em; }
.current-card { display: grid; grid-template-columns: 110px 1fr auto; gap: 24px; align-items: center; padding: 18px; border-radius: 24px; border: 1px solid var(--line); background: var(--surface); }
.mini-poster { width: 100%; aspect-ratio: 2/3; border-radius: 13px; object-fit: cover; background: linear-gradient(150deg, hsl(var(--hue) 34% 38%), #15151a); display: grid; place-items: center; color: rgba(255,255,255,.75); font-size: 24px; font-weight: 900; overflow: hidden; }
.mini-poster img { width: 100%; height: 100%; object-fit: cover; }
.mini-poster span { padding: 6px; color: rgba(255,255,255,.48); font-size: 9px; font-weight: 750; text-align: center; }
.current-card h3 { margin: 0 0 8px; font-size: 26px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; padding: 6px 10px; font-size: 11px; font-weight: 800; background: rgba(255,255,255,.07); color: var(--muted); }
.status-pill.in_progress { color: #95caff; background: rgba(122,184,255,.11); }
.status-pill.watched { color: #85e8b9; background: rgba(87,216,155,.1); }
.status-pill.awaiting_ratings { color: #ffd979; background: rgba(247,200,92,.1); }
.history-grid { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(300px,.85fr); gap: 18px; }
.timeline, .insight-card { border: 1px solid var(--line); border-radius: 24px; background: var(--surface); padding: 22px; }
.timeline-list { display: grid; gap: 2px; max-height: 440px; overflow: auto; padding-right: 6px; }
.timeline-item { display: grid; grid-template-columns: 11px 1fr auto; gap: 13px; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,.055); font-size: 13px; }
.timeline-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 5px; box-shadow: 0 0 14px rgba(255,104,70,.4); }
.timeline-time { color: var(--muted); font-size: 11px; white-space: nowrap; }
.agreement-meter { height: 150px; display: grid; place-items: center; position: relative; }
.agreement-ring { width: 130px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--accent) calc(var(--value)*1%), rgba(255,255,255,.07) 0); }
.agreement-ring::before { content: ""; position: absolute; width: 100px; aspect-ratio: 1; border-radius: 50%; background: #15151b; }
.agreement-ring strong { position: relative; z-index: 1; font-size: 26px; }
.insight-note { text-align: center; color: var(--muted); font-size: 13px; line-height: 1.5; }

.roulette-stage { padding: 24px 0 0; }
.readiness { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0; }
.readiness-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.04); }
.readiness-summary strong { font-size: 15px; }.readiness-summary span { color: var(--muted); font-size: 12px; text-align: right; }
.ready-card { display: flex; align-items: center; gap: 13px; padding: 15px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-soft); }
.ready-card.ready { border-color: rgba(87,216,155,.28); background: rgba(87,216,155,.07); }
.ready-card .avatar { width: 40px; height: 40px; border-radius: 13px; font-size: 12px; }
.ready-card:nth-child(2) .avatar { background: linear-gradient(145deg, #4d8dce, #32519b); }
.ready-state { margin-left: auto; font-size: 12px; color: var(--muted); }
.ready-card.ready .ready-state { color: var(--green); }
.roulette-window { position: relative; overflow: hidden; padding: 26px 0; border-block: 1px solid var(--line); background: linear-gradient(90deg, #08080b, rgba(255,255,255,.035) 50%, #08080b); }
.roulette-window::before, .roulette-window::after { content: ""; position: absolute; z-index: 4; top: 0; bottom: 0; width: 24%; pointer-events: none; }
.roulette-window::before { left: 0; background: linear-gradient(90deg, #08080b, transparent); }
.roulette-window::after { right: 0; background: linear-gradient(-90deg, #08080b, transparent); }
.roulette-marker { position: absolute; z-index: 6; left: 50%; top: 9px; bottom: 9px; width: 2px; background: var(--accent); box-shadow: 0 0 20px rgba(255,104,70,.8); }
.roulette-marker::before { content: "▼"; position: absolute; top: -8px; left: 50%; transform: translateX(-50%); color: var(--accent); font-size: 15px; }
.reel-track { display: flex; gap: 14px; width: max-content; padding: 0 50vw; will-change: transform; }
.reel-card { width: 150px; flex: 0 0 150px; aspect-ratio: 2/3; border-radius: 15px; overflow: hidden; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 14px 35px rgba(0,0,0,.5); background: linear-gradient(150deg, hsl(var(--hue) 38% 37%), #121217); display: grid; place-items: center; }
.reel-card img { width: 100%; height: 100%; object-fit: cover; }
.reel-card span { padding: 12px; font-size: 11px; font-weight: 750; color: rgba(255,255,255,.6); text-align: center; }
.preference-panel { display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px; align-items: end; margin-top: 22px; padding: 20px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); }
.disabled-panel { opacity: .52; }
.pref-high { color: #8fe5ba; }
.pref-low { color: #ffaaa5; }
.roulette-actions { display: flex; justify-content: center; margin-top: 24px; }
.spin-button { min-width: 250px; padding: 15px 30px; font-size: 16px; border-radius: 18px; }
.probability-note { text-align: center; color: var(--muted); font-size: 12px; margin-top: 13px; }
.roulette-running { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px; margin-top: 18px; color: var(--muted); font-size: 13px; }
.roulette-running span { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 16px rgba(255,104,70,.8); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.7); } }
.roulette-result-inline { display: grid; grid-template-columns: 150px 1fr; gap: 24px; align-items: center; margin-top: 20px; padding: 20px; border: 1px solid rgba(255,104,70,.25); border-radius: 24px; background: linear-gradient(135deg, rgba(255,104,70,.1), rgba(255,255,255,.035)); }
.roulette-result-inline .spin-result-poster { width: 150px; margin: 0; }
.roulette-result-inline h2 { margin: 5px 0 7px; font-size: 30px; }
.empty-state { border: 1px dashed var(--line-bright); border-radius: 24px; padding: 44px 24px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; color: var(--text); font-size: 18px; margin-bottom: 6px; }

.film-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search-box { min-width: 250px; }
.film-search-control { position: relative; flex: 1 1 320px; min-width: 250px; }
.film-search-control .search-box { width: 100%; min-width: 0; padding-right: 42px; direction: ltr; text-align: left; unicode-bidi: plaintext; }
.film-search-clear { position: absolute; top: 50%; right: 9px; width: 28px; height: 28px; padding: 0; transform: translateY(-50%); border: 0; border-radius: 50%; color: var(--muted); background: rgba(255,255,255,.08); font: inherit; font-size: 18px; line-height: 1; cursor: pointer; }
.film-search-clear:hover { color: var(--text); background: rgba(255,255,255,.14); }
.film-search-clear:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.film-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 22px 16px; }
.film-card { min-width: 0; cursor: pointer; animation: cardIn .35s both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } }
.poster-wrap { position: relative; aspect-ratio: 2/3; border-radius: 18px; overflow: hidden; background: linear-gradient(150deg, hsl(var(--hue) 36% 36%), #111117); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 14px 30px rgba(0,0,0,.32); transition: transform .25s ease, box-shadow .25s ease; }
.film-card:hover .poster-wrap { transform: translateY(-5px) scale(1.012); box-shadow: 0 22px 45px rgba(0,0,0,.45); }
.poster-wrap img { width: 100%; height: 100%; object-fit: cover; }
.poster-fallback { height: 100%; display: grid; place-items: center; padding: 18px; text-align: center; }
.poster-fallback span { font-size: 12px; font-weight: 750; color: rgba(255,255,255,.5); }
.card-ratings { position: absolute; inset: 10px 10px auto; display: flex; justify-content: space-between; pointer-events: none; }
.rating-chip { min-width: 32px; height: 32px; display: grid; place-items: center; padding: 0 7px; border-radius: 10px; background: rgba(8,8,11,.75); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(10px); font-size: 12px; font-weight: 850; }
.rating-chip.low { color: #ff928c; }.rating-chip.mid { color: #ffd46f; }.rating-chip.high { color: #78e8ae; }
.card-status { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; justify-content: center; }
.film-card h3 { margin: 11px 4px 3px; font-size: 15px; line-height: 1.25; letter-spacing: -.015em; }
.film-card-meta { margin: 0 4px; display: flex; gap: 7px; color: var(--muted); font-size: 12px; }
.lock-badge { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(6,6,8,.62); backdrop-filter: blur(3px); color: #ddd; font-size: 24px; }

/* v1.2 filmography states */
.card-status .status-pill { background: rgba(5,5,8,.88); border: 1px solid rgba(255,255,255,.2); box-shadow: 0 5px 18px rgba(0,0,0,.45); backdrop-filter: blur(12px); color: #f5f2ee; }
.card-status .status-pill.watched { border-color: rgba(87,216,155,.42); color: #9bf0c6; }
.card-status .status-pill.in_progress { border-color: rgba(122,184,255,.42); color: #a8d5ff; }
.card-status .status-pill.awaiting_ratings { border-color: rgba(247,200,92,.42); color: #ffe08a; }
.film-card:not(.watched):not(.locked) .poster-wrap img { filter: none; }
.film-card.watched .poster-wrap img { filter: brightness(.72) saturate(.9); transition: filter .24s ease; }
.film-card.watched:hover .poster-wrap img { filter: brightness(.74) saturate(.92); }
.film-card.locked .poster-wrap img { filter: brightness(.32) saturate(.4) blur(1.8px); }
.film-card.locked:hover .poster-wrap { transform: translateY(-2px); }
.lock-badge { background: rgba(5,5,8,.67); }
.lock-badge span { transition: transform .2s ease, opacity .2s ease; }
.lock-badge small { position: absolute; left: 14px; right: 14px; bottom: 18px; padding: 9px 10px; border-radius: 11px; background: rgba(5,5,8,.9); color: #e9e4e9; font-size: 10px; line-height: 1.35; text-align: center; opacity: 0; transform: translateY(6px); transition: opacity .2s ease, transform .2s ease; }
.film-card.locked:hover .lock-badge small, .film-card.locked:focus-within .lock-badge small { opacity: 1; transform: translateY(0); }
.film-card.locked:hover .lock-badge span { transform: translateY(-12px); opacity: .7; }
.special-film-badge { display: inline-flex; margin: 5px 4px 1px; padding: 4px 7px; border: 1px solid rgba(255,171,119,.3); border-radius: 8px; background: rgba(255,104,70,.08); color: var(--accent-light); font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.special-film-detail-badge { border-color: rgba(255,171,119,.35); background: rgba(255,104,70,.1); color: var(--accent-light); }
.blocked-reason { display: grid; gap: 4px; margin: 14px 0; padding: 13px 15px; border: 1px solid rgba(247,200,92,.26); border-radius: 14px; background: rgba(247,200,92,.07); }
.blocked-reason strong { color: #ffe08a; font-size: 13px; }.blocked-reason span { color: #c9c3c7; font-size: 12px; }

.tiers-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tier-board { padding: 18px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); min-width: 0; }
.tier-board.readonly { opacity: .56; filter: saturate(.55); background: rgba(20,20,25,.55); }
.tier-board.readonly:hover { opacity: .72; }
.tier-board-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.tier-board-head h2 { margin: 0; font-size: 20px; }
.owner-note, .view-note { display: inline-block; margin-left: 7px; padding: 4px 7px; border-radius: 7px; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; vertical-align: middle; }
.owner-note { color: #83e9b8; background: rgba(87,216,155,.1); }.view-note { color: var(--muted); background: rgba(255,255,255,.06); }
.tier-row { display: grid; grid-template-columns: 88px 1fr; min-height: 146px; border-bottom: 1px solid rgba(255,255,255,.07); }
.tier-row:last-of-type { border-bottom: 0; }
.tier-label { display: grid; place-items: center; padding: 10px; font-weight: 900; font-size: 22px; text-align: center; overflow-wrap: anywhere; background: rgba(255,255,255,.045); }
.tier-row[data-tier="S"] .tier-label { color: #ff9183; }.tier-row[data-tier="A"] .tier-label { color: #ffbe78; }
.tier-row[data-tier="B"] .tier-label { color: #f5df7c; }.tier-row[data-tier="C"] .tier-label { color: #83d8ab; }.tier-row[data-tier="D"] .tier-label { color: #83bcea; }
.tier-dropzone { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; align-content: start; min-width: 0; transition: background .18s; }
.tier-dropzone.drag-over { background: rgba(255,255,255,.08); }
.tier-film { position: relative; width: 80px; aspect-ratio: 2/3; border-radius: 10px; background: linear-gradient(145deg, hsl(var(--hue) 34% 35%), #141419); border: 1px solid rgba(255,255,255,.13); overflow: visible; cursor: grab; display: grid; place-items: center; color: rgba(255,255,255,.58); font-size: 10px; font-weight: 750; text-align: center; padding: 5px; box-shadow: 0 9px 20px rgba(0,0,0,.3); transition: opacity .15s ease, transform .15s ease; }
.readonly .tier-film { cursor: default; }
.tier-film img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.tier-film.dragging { opacity: .28; transform: scale(.96); }
.tier-film.tier-insert-before::before { content: ""; position: absolute; z-index: 3; left: -7px; top: 5%; width: 3px; height: 90%; border-radius: 999px; background: var(--accent); box-shadow: 0 0 14px rgba(255,104,70,.8); pointer-events: none; }
.tier-dropzone.tier-insert-end::after { content: ""; flex: 0 0 3px; align-self: stretch; min-height: 72px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 14px rgba(255,104,70,.8); }
.unranked { margin-top: 12px; padding: 12px; border: 1px dashed var(--line); border-radius: 16px; }
.unranked-title { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 9px; }
.unranked-pool { display: flex; flex-wrap: wrap; gap: 8px; min-height: 78px; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.settings-card { padding: 22px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); }
.settings-card h2 { margin: 0 0 7px; font-size: 18px; }
.settings-card > p { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 0 0 20px; }
.button-row { display: flex; flex-wrap: wrap; gap: 9px; }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 5px; border: 1px solid var(--line); border-radius: 16px; background: rgba(0,0,0,.18); }
.mode-switch button { border: 0; border-radius: 11px; padding: 10px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 750; }
.mode-switch button.active { color: var(--text); background: rgba(255,255,255,.1); }
.warning { color: #f2cd76; font-size: 12px; line-height: 1.45; }

.modal { width: min(calc(100% - 28px), 940px); max-height: min(90vh, 900px); padding: 0; overflow: auto; border: 1px solid var(--line-bright); border-radius: 28px; color: var(--text); background: rgba(18,18,23,.96); box-shadow: 0 40px 100px rgba(0,0,0,.72); backdrop-filter: blur(30px); }
.modal::backdrop { background: rgba(0,0,0,.7); backdrop-filter: blur(8px); }
.modal-close { position: sticky; top: 14px; float: right; z-index: 10; margin: 14px 14px 0 0; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: rgba(8,8,11,.7); cursor: pointer; }
.modal-close { display: grid; place-items: center; padding: 0; font-size: 24px; line-height: 1; transition: transform .16s ease, background .16s ease; }
.modal-close:hover { transform: scale(1.08); background: rgba(255,255,255,.13); }
.modal-close:active { transform: scale(.94); }
.film-detail { display: grid; grid-template-columns: minmax(240px, 34%) 1fr; min-height: 590px; }
.detail-poster { position: relative; min-height: 590px; background: linear-gradient(150deg, hsl(var(--hue) 36% 35%), #111117); overflow: hidden; }
.detail-poster::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(18,18,23,.95)); }
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.viewing-fields { padding: 16px; border: 1px solid rgba(255,255,255,.08); border-radius: 18px; background: rgba(255,255,255,.025); }
.detail-content { padding: 44px 36px 32px; }
.detail-content h1 { margin: 10px 0 8px; font-size: clamp(31px, 4vw, 50px); line-height: 1; letter-spacing: -.05em; }
.original-title { color: var(--muted); font-size: 14px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0; }
.tag { border: 1px solid var(--line); border-radius: 99px; padding: 6px 9px; color: #cbc7ce; font-size: 11px; }
.detail-tagline { color: #d8d2dc; line-height: 1.55; font-size: 16px; font-style: italic; }
.external-ratings { display: flex; gap: 10px; margin: 19px 0; }
.external-rating { border: 1px solid var(--line); border-radius: 13px; padding: 10px 13px; font-size: 12px; color: var(--muted); }
.external-rating strong { display: block; color: var(--text); font-size: 18px; margin-top: 2px; }
.review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.review-card { padding: 14px; border-radius: 16px; background: rgba(255,255,255,.045); border: 1px solid var(--line); }
.review-card-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 800; }
.review-card .big-rating { font-size: 24px; }
.review-card p { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; white-space: pre-wrap; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.review-form { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.rating-picker { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.rating-picker button { aspect-ratio: 1; min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.045); cursor: pointer; font-size: 11px; font-weight: 850; }
.rating-picker button.selected { background: var(--accent); border-color: var(--accent); }
.edit-form { padding: 36px; }
.edit-form h2 { margin: 0 0 22px; font-size: 28px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.field.full { grid-column: 1/-1; }
.poster-drop { position: relative; display: grid; place-items: center; min-height: 130px; border: 1px dashed var(--line-bright); border-radius: 17px; color: var(--muted); text-align: center; padding: 20px; cursor: pointer; overflow: hidden; }
.poster-drop.drag-over { border-color: var(--accent); background: rgba(255,104,70,.06); }
.poster-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .28; }
.poster-drop span { position: relative; z-index: 1; }
.spin-modal { width: min(calc(100% - 28px), 520px); text-align: center; }
.spin-result { padding: 40px; }
.spin-result-poster { width: 190px; aspect-ratio: 2/3; margin: 0 auto 24px; border-radius: 18px; overflow: hidden; background: linear-gradient(150deg, hsl(var(--hue) 36% 36%), #111117); box-shadow: 0 25px 55px rgba(0,0,0,.5); display: grid; place-items: center; font-size: 45px; font-weight: 900; }
.spin-result-poster img { width: 100%; height: 100%; object-fit: cover; }
.spin-result h2 { font-size: 31px; margin: 6px 0 8px; }
.chance { color: var(--accent-light); font-weight: 850; }
.context-menu { position: fixed; z-index: 80; width: 170px; padding: 6px; background: rgba(25,25,31,.97); border: 1px solid var(--line-bright); border-radius: 14px; box-shadow: var(--shadow); backdrop-filter: blur(20px); }
.context-menu button { display: block; width: 100%; border: 0; background: transparent; text-align: left; padding: 9px 11px; border-radius: 9px; cursor: pointer; font-size: 13px; }
.context-menu button:hover { background: rgba(255,255,255,.08); }
.context-menu button.danger { color: #ff8f89; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 104px; transform: translate(-50%, 18px); opacity: 0; pointer-events: none; padding: 11px 16px; border-radius: 13px; background: rgba(32,32,38,.96); border: 1px solid var(--line-bright); box-shadow: var(--shadow); color: var(--text); font-size: 13px; transition: .25s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { color: #ffaaa5; }
.skeleton { border-radius: 18px; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 920px) {
  .auth-screen { grid-template-columns: 1fr; max-width: 620px; }
  .auth-visual { text-align: center; }.auth-visual > p { margin-inline: auto; }.film-strip { justify-content: center; }
  .auth-card { justify-self: center; }
  .hero-panel { grid-template-columns: 1fr; }.hero-stats { grid-template-columns: repeat(4, 1fr); }.stat-card { min-height: 100px; padding: 15px; }
  .history-grid, .tiers-layout { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .film-detail { grid-template-columns: 250px 1fr; }
}
@media (max-width: 680px) {
  .auth-screen { padding: 34px 18px; }.auth-visual h1 { font-size: 58px; }.film-strip { display: none; }
  .auth-card { padding: 25px; }.topbar { height: 62px; padding: 0 16px; }.wordmark { font-size: 13px; }.wordmark span { width: 30px; height: 30px; }
  .user-chip { padding-right: 7px; }.user-chip .user-name { display: none; }
  main { padding: 4px 14px 112px; }.page-head { display: block; margin-top: 18px; }.page-head h1 { font-size: 42px; }
  .hero-panel { min-height: auto; padding: 28px 22px; border-radius: 26px; }.hero-title { font-size: 49px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }.stat-card .stat-value { font-size: 25px; }
  .current-card { grid-template-columns: 78px 1fr; gap: 14px; }.current-card .detail-actions { grid-column: 1/-1; margin: 0; }.current-card h3 { font-size: 20px; }
  .readiness { grid-template-columns: 1fr; }.preference-panel { grid-template-columns: 1fr; }.roulette-window { margin-inline: -14px; }
  .reel-card { width: 124px; flex-basis: 124px; }.film-tools { display: grid; grid-template-columns: 1fr 1fr; }.search-box { min-width: 0; grid-column: 1/-1; }
  .film-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px 10px; }.poster-wrap { border-radius: 14px; }
  .tier-board { padding: 10px; }.tier-row { grid-template-columns: 64px 1fr; }.tier-label { font-size: 16px; }
  .readiness-summary { align-items: flex-start; }.roulette-result-inline { grid-template-columns: 100px 1fr; gap: 14px; }.roulette-result-inline .spin-result-poster { width: 100px; }.roulette-result-inline h2 { font-size: 22px; }
  .film-detail { display: block; }.detail-poster { min-height: 360px; height: 55vh; }.detail-content { padding: 28px 20px; }.review-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }.field.full { grid-column: auto; }.edit-form { padding: 28px 18px; }
  .bottom-nav { bottom: 10px; width: calc(100% - 20px); }.bottom-nav button { font-size: 9px; }.nav-icon { font-size: 17px; }
  .spin-result { padding: 32px 22px; }
}

/* v1.2 marathon finale */
.runtime-stat { grid-column: 1 / -1; min-height: 92px; }
.runtime-stat .stat-value { font-size: clamp(24px, 3vw, 38px); }
.completion-screen { position: relative; min-height: calc(100vh - 190px); overflow: hidden; border: 1px solid rgba(255,255,255,.12); border-radius: 34px; padding: clamp(32px, 5vw, 72px); background: radial-gradient(circle at 50% 5%, rgba(255,104,70,.19), transparent 34%), linear-gradient(145deg, rgba(24,24,31,.96), rgba(9,9,13,.98)); box-shadow: var(--shadow); }
.completion-glow { position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none; opacity: .18; }
.completion-glow-one { width: 360px; height: 360px; top: -170px; right: 10%; background: var(--accent); }
.completion-glow-two { width: 300px; height: 300px; bottom: -160px; left: 4%; background: #466fc7; }
.completion-heading { position: relative; max-width: 840px; margin: 0 auto 38px; text-align: center; }
.completion-total { margin-top: 20px; color: var(--accent-light); font-size: clamp(52px, 9vw, 112px); font-weight: 900; letter-spacing: -.07em; line-height: .9; }
.completion-heading h1 { margin: 13px 0 14px; font-size: clamp(36px, 6vw, 72px); letter-spacing: -.055em; }
.completion-heading p { max-width: 680px; margin: auto; color: var(--muted); line-height: 1.6; }
.completion-scoreboard, .completion-highlights { position: relative; display: grid; gap: 12px; }
.completion-scoreboard { grid-template-columns: repeat(4, minmax(0,1fr)); margin-bottom: 14px; }
.completion-highlights { grid-template-columns: repeat(3, minmax(0,1fr)); }
.completion-stat { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 19px; background: rgba(255,255,255,.045); }
.completion-stat span, .completion-stat small { display: block; color: var(--muted); font-size: 11px; }
.completion-stat strong { display: block; margin: 8px 0 3px; font-size: clamp(17px, 2.1vw, 28px); line-height: 1.1; overflow-wrap: anywhere; }
.completion-actions { position: relative; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.completion-reveal { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; overflow: hidden; pointer-events: all; }
.completion-reveal-shade { position: absolute; inset: 0; background: rgba(4,4,7,.2); backdrop-filter: blur(0); transition: background 1s ease, backdrop-filter 1s ease; }
.completion-reveal-light { position: absolute; width: min(80vw, 900px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255,132,85,.26), rgba(255,104,70,.06) 34%, transparent 68%); opacity: 0; transform: scale(.35); }
.completion-reveal-copy { position: relative; z-index: 2; width: min(620px, calc(100% - 48px)); text-align: center; opacity: 0; }
.completion-reveal-progress { width: min(420px, 82vw); height: 7px; margin: 0 auto 28px; overflow: hidden; border-radius: 10px; background: rgba(255,255,255,.1); opacity: 0; }
.completion-reveal-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ff6846, #ffbd82); box-shadow: 0 0 24px rgba(255,104,70,.7); }
.completion-reveal-copy strong { display: block; color: white; font-size: clamp(72px, 15vw, 168px); line-height: .85; letter-spacing: -.08em; opacity: 0; transform: scale(.78); }
.completion-reveal-copy h2 { margin: 24px 0 0; font-size: clamp(30px, 6vw, 64px); letter-spacing: -.05em; opacity: 0; transform: translateY(18px); }
.completion-particles { position: absolute; inset: 0; }
.completion-particles i { position: absolute; left: var(--x); top: 54%; width: 5px; height: 24px; border-radius: 5px; background: linear-gradient(#ffd1b3, #ff6846); opacity: 0; transform: rotate(calc(var(--particle) * 37deg)); }
.completion-reveal.playing .completion-reveal-shade { background: rgba(4,4,7,.94); backdrop-filter: blur(14px); }
.completion-reveal.playing .completion-reveal-light { animation: finaleLight 5.2s .7s ease both; }
.completion-reveal.playing .completion-reveal-copy { animation: finaleCopy 5.5s .35s ease both; }
.completion-reveal.playing .completion-reveal-progress { animation: finaleAppear .45s .45s ease both; }
.completion-reveal.playing .completion-reveal-progress span { animation: finaleProgress 1.9s .65s cubic-bezier(.2,.75,.2,1) forwards; }
.completion-reveal.playing .completion-reveal-copy strong { animation: finaleHundred 1.1s 2.2s cubic-bezier(.18,.85,.25,1) both; }
.completion-reveal.playing .completion-reveal-copy h2 { animation: finaleTitle 1s 3.15s ease both; }
.completion-reveal.playing .completion-particles i { animation: finaleParticle 2.4s calc(3.2s + var(--delay)) ease-out both; }
@keyframes finaleProgress { to { width: 100%; } }
@keyframes finaleAppear { to { opacity: 1; } }
@keyframes finaleHundred { 0% { opacity: 0; transform: scale(.78); filter: blur(12px); } 100% { opacity: 1; transform: scale(1); filter: blur(0); } }
@keyframes finaleTitle { to { opacity: 1; transform: translateY(0); } }
@keyframes finaleLight { 0% { opacity: 0; transform: scale(.35); } 45% { opacity: 1; } 100% { opacity: .25; transform: scale(1.2); } }
@keyframes finaleCopy { 0% { opacity: 0; } 10%, 88% { opacity: 1; } 100% { opacity: 0; } }
@keyframes finaleParticle { 0% { opacity: 0; transform: translateY(0) rotate(calc(var(--particle) * 37deg)) scale(.7); } 18% { opacity: .7; } 100% { opacity: 0; transform: translateY(calc(-180px - var(--particle) * 3px)) translateX(calc((var(--particle) - 9) * 8px)) rotate(calc(var(--particle) * 61deg)) scale(.2); } }
@media (max-width: 900px) { .completion-scoreboard { grid-template-columns: 1fr 1fr; }.completion-highlights { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .completion-screen { padding: 28px 18px; border-radius: 24px; }.completion-scoreboard, .completion-highlights { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .completion-reveal.playing * { animation-duration: .01ms !important; animation-delay: 0ms !important; }.completion-reveal-shade { backdrop-filter: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* v0.5 */
.stats-dashboard { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.stats-card { border: 1px solid var(--line); background: var(--surface); border-radius: 20px; padding: 19px; }
.stats-card h3 { margin: 0 0 15px; color: var(--muted); font-size: 13px; }
.stats-card > strong { font-size: 30px; }
.stats-card p { color: var(--muted); font-size: 12px; line-height: 1.45; margin: 10px 0 0; }
.roulette-window { min-height: 300px; mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); }
.roulette-window.has-result .reel-track { filter: blur(3px) brightness(.32); }
.roulette-result-overlay { position: absolute; z-index: 8; inset: 0; display: grid; grid-template-columns: 130px minmax(0, 1fr); align-items: center; justify-content: center; gap: 22px; width: min(640px, 92%); margin: auto; padding: 20px; }
.roulette-result-overlay .spin-result-poster { width: 130px; margin: 0; }
.roulette-result-overlay h2 { margin: 5px 0; font-size: clamp(24px, 3vw, 38px); }
.roulette-result-overlay p { color: var(--muted); margin: 6px 0; }
.vote-progress { color: var(--accent-light); font-size: 13px; font-weight: 750; margin-top: 12px; }
.button.selected { box-shadow: 0 0 0 2px var(--text), 0 10px 28px rgba(0,0,0,.4); }
.preference-choice { min-width: 0; height: 88px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.04); padding: 10px; text-align: left; cursor: pointer; }
.preference-choice:hover { border-color: var(--line-bright); background: rgba(255,255,255,.075); }
.preference-choice .mini-poster { width: 45px; flex: 0 0 45px; border-radius: 8px; }
.preference-choice small, .preference-choice strong { display: block; }
.preference-choice small { color: var(--muted); margin-bottom: 4px; }
.preference-choice.high small { color: #8fe5ba; }.preference-choice.low small { color: #ffaaa5; }
.probabilities { max-width: 760px; margin: 16px auto 0; border: 1px solid var(--line); border-radius: 16px; padding: 12px 15px; color: var(--muted); font-size: 13px; }
.probabilities summary { cursor: pointer; font-weight: 750; color: var(--text); }
.probabilities > div { max-height: 320px; overflow: auto; margin-top: 10px; }
.probability-row { display: flex; justify-content: space-between; gap: 20px; padding: 7px 2px; border-bottom: 1px solid rgba(255,255,255,.05); }
.selector-modal { width: min(920px, calc(100% - 28px)); padding: 28px; }
.selector-head { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.selector-head h2 { margin: 5px 0 0; }
.selector-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(125px, 1fr)); gap: 14px; margin-top: 18px; }
.selector-film { display: grid; gap: 7px; background: none; border: 0; cursor: pointer; text-align: left; padding: 0; }
.selector-film > img, .selector-film > .poster-fallback { width: 100%; aspect-ratio: 2/3; border-radius: 13px; object-fit: cover; border: 1px solid var(--line); overflow: hidden; }
.selector-film strong { font-size: 12px; line-height: 1.25; }.selector-film span { color: var(--muted); font-size: 11px; }
.segment-tabs { display: inline-flex; padding: 5px; gap: 4px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.035); margin-bottom: 18px; }
.segment-tabs button { border: 0; background: transparent; color: var(--muted); padding: 9px 18px; border-radius: 10px; cursor: pointer; font-weight: 750; }
.segment-tabs button.active { color: var(--text); background: rgba(255,255,255,.1); }
.film-tools { flex-wrap: nowrap; margin-bottom: 18px; }
.film-tools .input { min-width: 0; }
.button.compact { padding: 9px 12px; font-size: 12px; }
.relation-actions { display: flex; justify-content: flex-end; margin-bottom: 15px; }
.relations-list { display: grid; gap: 16px; }
.relation-card { border: 1px solid var(--line); border-radius: 24px; padding: 20px; background: var(--surface); }
.relation-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }.relation-head h2 { margin: 4px 0 0; }
.relation-chain { display: flex; gap: 10px; overflow-x: auto; padding: 16px 2px; min-height: 126px; }
.relation-chain.drag-over { background: rgba(255,255,255,.05); border-radius: 15px; }
.relation-film { position: relative; display: grid; grid-template-columns: 30px 58px minmax(120px,1fr); align-items: center; gap: 9px; min-width: 280px; padding: 10px 38px 10px 8px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.035); cursor: grab; }
.relation-film .mini-poster { width: 58px; }.relation-number { display: grid; place-items: center; color: var(--accent-light); font-weight: 850; }
.relation-film strong, .relation-film small { display: block; }.relation-film small { color: var(--muted); margin-top: 5px; }
.icon-button { position: absolute; top: 8px; right: 8px; border: 0; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; }
.relation-add { max-width: 420px; }
.tiers-layout.single { grid-template-columns: 1fr; }.tiers-layout.dual { grid-template-columns: 1fr 1fr; }
.tier-film { width: 104px; padding: 0; }.tier-row { min-height: 176px; }
.tier-label { border: 0; color: inherit; cursor: text; font-family: inherit; }
.tier-label-input { width: 100%; min-width: 0; border: 2px solid var(--accent); color: var(--text); }
.connection-card ol { color: var(--muted); font-size: 13px; line-height: 1.6; padding-left: 20px; }
.copy-address { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; overflow: hidden; }
.copy-address code { overflow: hidden; text-overflow: ellipsis; }
.confirm-content { padding: 38px; }.confirm-content h2 { margin-top: 0; }
.rating-field > span { display: block; color: #d5d1d7; font-size: 13px; font-weight: 700; margin: 10px 0 8px; }
.review-grid.prominent .review-card { padding: 20px; min-height: 150px; }.review-grid.prominent .review-card p { font-size: 14px; }
.result-heading { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; padding: 14px 18px; border-radius: 16px; background: linear-gradient(135deg, rgba(255,104,70,.14), rgba(255,255,255,.04)); }
.result-heading strong { font-size: 32px; }
.detail-chain { margin-top: 22px; }.detail-chain-list { display: flex; gap: 7px; overflow-x: auto; }
.chain-item { min-width: 150px; display: grid; grid-template-columns: 24px 1fr; gap: 2px 6px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.035); padding: 10px; text-align: left; cursor: pointer; }
.chain-item span { grid-row: 1/3; color: var(--muted); }.chain-item strong { font-size: 12px; }.chain-item small { color: var(--muted); }
.chain-item.current { border-color: var(--accent); }.chain-item.done span { color: var(--green); }.chain-item.locked { opacity: .45; }

@media (min-width: 1700px) {
  main { max-width: 1840px; }
  .film-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
  .reel-card { width: 180px; flex-basis: 180px; }
}
@media (max-width: 1100px) {
  .stats-dashboard { grid-template-columns: 1fr 1fr; }
  .tiers-layout.dual { grid-template-columns: 1fr; }
  .film-tools { flex-wrap: wrap; }
}
@media (max-width: 680px) {
  .stats-dashboard { grid-template-columns: 1fr; }
  .roulette-result-overlay { grid-template-columns: 90px 1fr; gap: 12px; }.roulette-result-overlay .spin-result-poster { width: 90px; }
  .roulette-result-overlay .detail-actions { margin-top: 10px; }.roulette-result-overlay .button { padding: 8px 10px; font-size: 11px; }
  .selector-modal { padding: 18px; }.selector-grid { grid-template-columns: repeat(2, 1fr); }
  .relation-head { align-items: flex-start; }.relation-film { min-width: 250px; }
  .tier-film { width: 86px; }.tier-row { min-height: 150px; }
}

/* v1.0 pre-release */
.preference-choice { min-height: 98px; height: auto; padding: 14px 16px; gap: 15px; }
.preference-choice .mini-poster { width: 52px; flex-basis: 52px; }
.preference-choice small { font-size: 13px; font-weight: 820; letter-spacing: .01em; }
.preference-choice strong { font-size: 15px; line-height: 1.3; }
#preference-search { direction: ltr !important; text-align: left !important; unicode-bidi: plaintext; }
.roulette-result-overlay { opacity: 1; transition: opacity .24s ease; }
.roulette-result-overlay.hidden { display: grid !important; opacity: 0; pointer-events: none; }
.roulette-window.idle .reel-track { transform: translateX(calc(-50vw + 24px)); }
.tier-page-head { margin: 14px 0 14px; align-items: center; }
body:has(#page-tiers.active) main { padding-bottom: 70px; }
.tier-page-head h1 { font-size: clamp(34px, 4vw, 54px); }
.tiers-layout.single { max-width: 100%; }
.tier-board { padding: 12px 14px; }
.tier-board-head { min-height: 38px; margin-bottom: 8px; }
.tier-row { grid-template-columns: minmax(150px, 18%) 1fr; min-height: 130px; height: auto; }
.tier-label { width: 100%; padding: 8px 12px; font-size: clamp(15px, 1.25vw, 20px); }
.tier-label-input { min-width: 150px; padding-inline: 12px; font-size: 16px; text-align: left; }
.tier-dropzone { gap: 6px; padding: 8px; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; align-items: flex-start; }
.tier-film { width: clamp(62px, 4.2vw, 76px); flex: 0 0 clamp(62px, 4.2vw, 76px); border-radius: 8px; }
.unranked { margin-top: 7px; padding: 7px 9px; }
.unranked-title { margin-bottom: 4px; }
.unranked-pool { min-height: 76px; }
.tier-modal { width: min(calc(100% - 32px), 1380px); max-height: 94vh; }
.tier-modal-content { padding: 30px; }
.tier-modal .tier-board { margin-top: 16px; opacity: 1; filter: none; }
.tier-modal .tier-film { width: clamp(68px, 4.8vw, 88px); flex-basis: clamp(68px, 4.8vw, 88px); }
.tier-modal .tier-row { min-height: 148px; height: auto; }
.confirm-modal { width: min(calc(100% - 28px), 520px); }
.confirm-content p { color: var(--muted); line-height: 1.55; }

@media (max-height: 820px) and (min-width: 900px) {
  .tier-page-head { margin-block: 0 7px; }
  .tier-page-head h1 { font-size: 32px; }
  .tier-board { padding-block: 8px; }
  .tier-row { min-height: 130px; height: auto; }
  .tier-film { width: 76px; flex-basis: 76px; }
  .tier-board-head { min-height: 27px; margin-bottom: 3px; }
  .unranked { display: grid; grid-template-columns: 92px 1fr; align-items: center; min-height: 68px; margin-top: 4px; padding: 2px 7px; }
  .unranked-title { margin: 0; }
  .unranked-pool { min-height: 62px; padding-block: 1px; }
}

@media (max-width: 680px) {
  .tier-row { grid-template-columns: 112px 1fr; min-height: 130px; height: auto; }
  .tier-label-input { min-width: 112px; }
  .tier-modal-content { padding: 20px 12px; }
}

/* v1.0 release */
.password-input { position: relative; display: block; }
.password-input input { padding-right: 90px; }
.password-input button { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); border: 0; border-radius: 9px; padding: 7px 9px; background: rgba(255,255,255,.08); color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 750; }
.password-input button:hover { color: var(--text); background: rgba(255,255,255,.13); }

.active-deck { position: relative; height: 172px; touch-action: pan-y; }
.active-deck:has(.active-deck-card:nth-child(2)) { height: 188px; }
.active-deck:has(.active-deck-card:nth-child(3)) { height: 204px; }
.active-deck:has(.active-deck-card:nth-child(4)) { height: 220px; }
.active-deck:has(.active-deck-card:nth-child(5)) { height: 236px; }
.active-deck-card { position: absolute; inset: 0 0 auto; min-height: 172px; transform: translateY(calc(var(--deck-index) * 16px)); transition: transform .24s ease, filter .24s ease; box-shadow: 0 18px 38px rgba(0,0,0,.32); }
.active-deck-card.peek { filter: brightness(.72); cursor: pointer; }
.active-deck-card.active { cursor: grab; }
.deck-hint { margin: 10px 4px 0; color: var(--muted); font-size: 11px; text-align: center; }

.film-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 17px 0; }
.film-facts div { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.03); }
.film-facts dt { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.film-facts dd { margin: 4px 0 0; font-size: 13px; font-weight: 750; }
.special-note { padding: 12px 14px; border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; background: rgba(255,104,70,.07); color: #ddd7df; font-size: 13px; line-height: 1.55; }

.backup-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.backup-groups > div { display: grid; align-content: start; gap: 8px; padding: 13px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.025); }
.backup-groups h3 { margin: 0 0 3px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }

.tier-row { grid-template-columns: 82px 1fr; }
.tier-label { max-width: 82px; padding-inline: 6px; font-size: clamp(13px, 1.05vw, 17px); }
.tier-label-input { min-width: 82px; }
.tier-empty { white-space: nowrap; }
.unranked { padding: 5px 8px; }
.unranked-pool { min-height: 68px; }

@media (max-height: 820px) and (min-width: 900px) {
  .tier-row { grid-template-columns: 72px 1fr; }
  .tier-label, .tier-label-input { max-width: 72px; min-width: 72px; }
  .unranked { display: block; min-height: 60px; }
}

@media (max-width: 680px) {
  .active-deck { height: 250px; }
  .active-deck:has(.active-deck-card:nth-child(2)) { height: 264px; }
  .active-deck:has(.active-deck-card:nth-child(3)) { height: 278px; }
  .active-deck:has(.active-deck-card:nth-child(4)) { height: 292px; }
  .active-deck:has(.active-deck-card:nth-child(5)) { height: 306px; }
  .active-deck-card { min-height: 250px; transform: translateY(calc(var(--deck-index) * 14px)); }
  .film-facts, .backup-groups { grid-template-columns: 1fr; }
  .tier-row { grid-template-columns: 76px 1fr; }
  .tier-label, .tier-label-input { max-width: 76px; min-width: 76px; }
}
