:root { color-scheme:dark; --bg:#121723; --panel:#1c2331; --panel2:#222b3c; --line:#354052; --cream:#f5f1e8; --muted:#a5adbb; --coral:#ff8a6c; --green:#5ccd9a; --red:#ee736d; --yellow:#e8cb89; }
* { box-sizing:border-box; }
html { min-height:100%; -webkit-text-size-adjust:100%; }
body { margin:0; min-width:320px; min-height:100vh; color:var(--cream); background:radial-gradient(ellipse 700px 500px at 8% 12%,#293144 0, transparent 78%),radial-gradient(ellipse 750px 480px at 100% 80%,#202c38 0, transparent 72%),var(--bg); font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif; }
button { font:inherit; }
button:focus-visible,a:focus-visible { outline:3px solid var(--yellow); outline-offset:3px; }
button:disabled { cursor:not-allowed; }
[hidden] { display:none !important; }
.page-shell { width:min(1190px,calc(100% - 64px)); margin:0 auto; min-height:100vh; display:flex; flex-direction:column; }
.site-header { min-height:104px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid #ffffff1a; gap:15px; }
.brand { display:inline-flex; align-items:center; gap:11px; font-weight:900; letter-spacing:.065em; text-decoration:none; color:var(--cream); font-size:19px; }
.brand-secondary { color:var(--coral); }
.brand-icon { color:var(--coral); display:flex; align-items:center; justify-content:center; }
.header-actions { display:flex; align-items:center; gap:18px; }
.daily-pill { display:flex; gap:9px; align-items:center; border:1px solid #485165; padding:9px 13px; border-radius:50px; font-size:10px; letter-spacing:.15em; font-weight:850; color:#c3c6cd; white-space:nowrap; }
.pill-dot,.save-dot { display:inline-block; width:7px; height:7px; border-radius:50%; background:var(--green); box-shadow:0 0 12px #5ccd9a88; }
.icon-button { width:36px; height:36px; border:1px solid #566073; background:#ffffff0b; color:var(--cream); border-radius:50%; cursor:pointer; font-size:17px; font-weight:700; }
@media (hover:hover) { .icon-button:hover { background:#ffffff1e; } }
.main-grid { flex:1; width:100%; max-width:620px; margin:0 auto; padding:48px 0 72px; }
.intro { padding-top:40px; }
.eyebrow { display:flex; align-items:center; gap:12px; font-size:11px; letter-spacing:.24em; font-weight:850; color:var(--coral); }
.eyebrow-line { display:inline-block; height:2px; width:30px; background:var(--coral); }
h1 { margin:29px 0 26px; letter-spacing:-.075em; font-size:clamp(55px,5.8vw,86px); line-height:1.045; font-weight:900; }
h1 em { color:var(--coral); font-style:normal; }
.intro-description { max-width:440px; font-size:18px; line-height:1.73; color:#bbc2cf; margin:0 0 36px; }
.intro-description strong { color:var(--cream); font-weight:700; }
.feature-stack { max-width:420px; border-top:1px solid #ffffff24; }
.feature-item { display:flex; align-items:center; gap:21px; min-height:61px; border-bottom:1px solid #ffffff24; color:#d4d7df; font-size:14px; line-height:1.4; }
.feature-number { color:var(--coral); font-weight:800; font-size:11px; letter-spacing:.13em; }
.legend-square { display:inline-block; vertical-align:-2px; width:14px; height:14px; margin:0 4px; border-radius:3px; }
.legend-square.green { background:var(--green); }.legend-square.red { background:var(--red); }
.intro-footnote { color:#8690a1; font-size:12px; margin-top:30px; }
.game-panel { background:linear-gradient(160deg,#232c3d,var(--panel) 80%); border:1px solid #3b4659; border-radius:20px; box-shadow:0 30px 85px #0000004a; padding:clamp(19px,3vw,34px); }
.panel-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; padding-bottom:25px; }
.panel-eyebrow { font-size:10px; font-weight:900; color:var(--coral); letter-spacing:.2em; margin-bottom:11px; }
h2 { font-size:clamp(21px,2.5vw,27px); line-height:1.18; margin:0; letter-spacing:-.025em; }
.date-block { text-align:right; border-left:1px solid #ffffff24; padding-left:15px; color:var(--cream); font-weight:750; font-size:14px; white-space:nowrap; }
.date-caption { display:block; color:#8791a1; font-size:9px; letter-spacing:.16em; margin-top:5px; }
.order-labels { display:flex; justify-content:space-between; gap:10px; margin-bottom:12px; color:#8895a6; font-size:10px; font-weight:850; letter-spacing:.12em; }
.order-arrow { color:var(--coral); font-size:15px; }
.movie-list { display:flex; flex-direction:column; list-style:none; gap:9px; padding:0; margin:0; }
.movie-row { display:flex; gap:8px; align-items:stretch; min-height:74px; }
.movie-select { position:relative; min-width:0; flex:1; display:flex; align-items:center; gap:14px; text-align:left; padding:13px 13px; border-radius:10px; border:1px solid #47536a; background:#303a4d; color:var(--cream); cursor:pointer; transition:background .15s,border-color .15s,transform .12s; }
@media (hover:hover) { .movie-select:hover:not(:disabled) { background:#3c4960; } }
.movie-select:active:not(:disabled) { transform:scale(.99); }
.movie-row.selected .movie-select { border-color:var(--yellow); background:#494738; box-shadow:inset 0 0 0 1px var(--yellow); }
.movie-row.correct .movie-select { background:#264e45; border-color:#63d8ab; }
.movie-row.incorrect .movie-select { background:#573b45; border-color:#eb797d; }
.place-number { font-size:12px; font-weight:900; color:#a5b1c3; letter-spacing:.05em; width:24px; flex-shrink:0; }
.movie-row.correct .place-number { color:#a6eed0; }.movie-row.incorrect .place-number { color:#ffc5c0; }
.movie-name { font-size:clamp(13px,1.3vw,16px); font-weight:700; line-height:1.28; flex:1; min-width:0; }
.movie-year { color:#bbecd2; font-size:12px; margin-left:4px; white-space:nowrap; font-weight:600; }
.feedback-box { display:flex; align-items:center; justify-content:center; width:26px; height:26px; flex-shrink:0; border-radius:5px; font-size:18px; font-weight:800; }
.feedback-box.correct { background:var(--green); color:#103b2a; }.feedback-box.incorrect { background:var(--red); color:#431e27; }
.movie-row { position:relative; }
.drag-handle { width:56px; flex-shrink:0; display:grid; place-items:center; padding:0; border:1px solid #4a586e; background:#313d50; color:#c3ccd9; border-radius:10px; cursor:grab; touch-action:none; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; -webkit-tap-highlight-color:transparent; transition:background .15s,color .15s,border-color .15s; }
.drag-handle svg { width:14px; height:24px; pointer-events:none; }
@media (hover:hover) { .drag-handle:hover:not(:disabled) { background:#3c4960; color:var(--cream); } }
.drag-handle:disabled { opacity:.3; cursor:not-allowed; }
.movie-row.shifting { transition:transform .18s ease; }
.movie-row.settling { transition:transform .15s ease; }
.movie-row.dragging { z-index:5; }
.movie-row.dragging .movie-select { background:#3c4960; border-color:var(--coral); box-shadow:0 16px 34px #0009; }
.movie-row.dragging .drag-handle { background:var(--coral); border-color:var(--coral); color:#1b2230; cursor:grabbing; box-shadow:0 16px 34px #0009; }
body.is-dragging, body.is-dragging * { cursor:grabbing !important; user-select:none; -webkit-user-select:none; }
.order-label-bottom { font-size:10px; color:#8d9aaa; font-weight:850; letter-spacing:.13em; margin:12px 0 0; }
.status-message { text-align:center; font-size:12px; color:#aab4c5; line-height:1.6; margin:20px 0 15px; min-height:20px; }
.primary-button { width:100%; border:0; padding:17px 20px; background:var(--coral); border-radius:9px; color:#1b2230; font-weight:900; font-size:13px; letter-spacing:.11em; display:flex; align-items:center; justify-content:space-between; cursor:pointer; transition:background .15s,transform .15s; }
@media (hover:hover) { .primary-button:not(:disabled):hover { background:#ffa187; transform:translateY(-1px); } }
.primary-button:disabled { background:#455362; color:#89919e; }
.button-arrow { font-size:22px; font-weight:400; line-height:1; }
.panel-lower { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:15px; color:#8792a4; font-size:11px; }
.panel-lower span:last-child { white-space:nowrap; }.save-dot { width:5px; height:5px; margin-left:4px; box-shadow:none; }
.history-section { margin-top:28px; padding-top:22px; border-top:1px solid #ffffff20; }
.section-heading { display:flex; justify-content:space-between; align-items:center; margin-bottom:13px; }
.section-heading h3 { font-size:11px; letter-spacing:.15em; margin:0; color:#c5ccd7; }.section-heading span { font-size:10px; color:#8d99a9; }
.history-list { display:flex; flex-direction:column; gap:7px; max-height:230px; overflow:auto; scrollbar-color:#59677b transparent; }
.guess-entry { display:flex; align-items:center; gap:12px; }
.guess-label { color:#a3b0c2; font-size:10px; font-weight:800; width:44px; flex-shrink:0; }
.guess-blocks { display:grid; grid-template-columns:repeat(6,1fr); flex:1; gap:5px; }
.guess-block { display:grid; place-items:center; height:20px; border-radius:3px; font-size:11px; font-weight:850; }
.guess-block.correct { background:var(--green); color:#143a2c; }.guess-block.incorrect { background:var(--red); color:#4a232a; }
.win-panel { margin-top:23px; padding:26px 18px 22px; background:#263b3b; border:1px solid #568e79; border-radius:13px; text-align:center; }
.win-stars { color:var(--green); letter-spacing:3px; font-size:12px; }
.win-panel h3 { font-size:29px; letter-spacing:-.035em; margin:12px 0 5px; }
.win-panel p { color:#c7d9d4; line-height:1.6; font-size:13px; margin:0 0 17px; }
.share-button { background:#d8f6e7; border:0; padding:15px 22px; width:100%; border-radius:8px; color:#193729; letter-spacing:.08em; font-size:12px; font-weight:900; cursor:pointer; }
@media (hover:hover) { .share-button:hover { background:white; } }
.share-button span { font-size:17px; margin-right:7px; }
.win-panel .share-caption { color:#96b6aa; font-size:11px; margin:12px 0 0; }
.site-footer { display:flex; justify-content:space-between; gap:18px; padding:24px 0 30px; border-top:1px solid #ffffff1a; font-size:10px; letter-spacing:.12em; font-weight:750; color:#798597; }
.site-footer a { color:inherit; }
.new-day-button { width:100%; margin:0 0 16px; padding:12px 14px; border:1px solid var(--yellow); border-radius:9px; background:#494738; color:var(--cream); font-weight:800; font-size:12px; letter-spacing:.04em; cursor:pointer; }
@media (hover:hover) { .new-day-button:hover { background:#5a573f; } }
.footer-bullet { margin:0 9px; color:var(--coral); }
.help-dialog { width:min(465px,calc(100% - 32px)); max-height:min(90vh,750px); overflow:auto; background:#242e3f; border:1px solid #536177; color:var(--cream); border-radius:17px; padding:33px; box-shadow:0 30px 100px #000a; }
.help-dialog::backdrop { background:#060a13d6; backdrop-filter:blur(5px); }
.help-dialog h2 { font-size:29px; margin-bottom:18px; }
.help-dialog p { font-size:14px; line-height:1.7; color:#c4ccd9; margin:0 0 15px; }.help-dialog p strong { color:var(--cream); }
.help-dialog .help-example { display:flex; align-items:center; gap:10px; font-size:13px; line-height:1.4; margin:10px 0; color:#e1e7ee; }
.help-dialog .help-example .legend-square { flex-shrink:0; width:19px; height:19px; }
.help-dialog .primary-button { margin-top:23px; }
.close-help { position:absolute; right:15px; top:12px; width:30px; height:30px; border:0; background:transparent; color:#a7b5c7; font-size:26px; cursor:pointer; }
.toast { position:fixed; bottom:24px; left:50%; transform:translateX(-50%); background:#eaf8f0; border-radius:9px; color:#183729; box-shadow:0 10px 35px #0006; font-weight:750; font-size:13px; padding:14px 18px; z-index:20; max-width:calc(100% - 35px); text-align:center; }
@media (max-width:930px) { .intro { padding-top:0; }.intro-description { max-width:640px; }.feature-stack { max-width:unset; }.game-panel { max-width:660px; width:100%; margin:0 auto; }.intro-footnote { margin-top:17px; } h1 { font-size:clamp(52px,10vw,78px); } }
@media (max-width:560px) { .page-shell { width:calc(100% - 30px); }.site-header { min-height:77px; }.brand { gap:8px; font-size:17px; }.brand-icon svg { width:23px; }.header-actions { gap:9px; }.daily-pill { font-size:9px; padding:8px 9px; }.icon-button { width:32px; height:32px; }.main-grid { padding-top:20px; padding-bottom:40px; }.eyebrow { font-size:9px; letter-spacing:.18em; }.eyebrow-line { width:19px; } h1 { font-size:clamp(51px,12vw,66px); margin:21px 0 17px; }.intro-description { font-size:15px; line-height:1.58; margin-bottom:20px; }.feature-item { font-size:12px; gap:15px; min-height:47px; }.intro-footnote { font-size:11px; line-height:1.5; }.game-panel { padding:18px 13px 20px; border-radius:13px; }.panel-heading { padding:5px 4px 21px; }.panel-eyebrow { font-size:9px; }.date-block { font-size:12px; padding-left:10px; }.panel-heading h2 { font-size:21px; }.order-labels { font-size:9px; }.movie-row { min-height:64px; gap:6px; }.movie-select { padding:10px 9px; gap:9px; }.place-number { width:17px; font-size:10px; }.movie-name { font-size:13px; }.drag-handle { width:52px; }.panel-lower { font-size:10px; }.site-footer { font-size:9px; line-height:1.6; flex-direction:column; gap:6px; }.help-dialog { padding:26px 22px; } }
@media (prefers-reduced-motion:reduce) { *,*:before,*:after { transition:none !important; animation:none !important; } }
.movie-row.locked .movie-select:disabled { cursor:default; opacity:1; }
.movie-row.locked .drag-handle:disabled { opacity:1; background:#264e45; border-color:#63d8ab; color:#a6eed0; cursor:default; }
.drag-handle svg { pointer-events:none; }
#helpTitle:focus { outline:none; }
.test-tools { margin-top:18px; padding:14px; border:1px dashed #5b6679; border-radius:13px; display:flex; flex-wrap:wrap; align-items:center; gap:10px 14px; }
.test-label { font-size:10px; font-weight:900; letter-spacing:.18em; color:var(--yellow); }
.test-button { flex:1; min-width:180px; padding:13px 16px; border:1px solid #6a7486; border-radius:9px; background:#2c3546; color:var(--cream); font-weight:800; font-size:13px; cursor:pointer; }
.test-link { border:0; background:none; color:var(--muted); text-decoration:underline; font-size:12px; cursor:pointer; padding:6px 0; }
@media (hover:hover) { .test-button:hover { background:#38435a; } }
/* Phones: keep the whole game, Check button included, well clear of Safari's bottom toolbar. */
@media (max-width:560px) {
  .site-header { min-height:56px; }
  .main-grid { padding-top:10px; padding-bottom:32px; }
  .game-panel { padding:14px 11px 16px; }
  .panel-heading { padding:2px 4px 12px; }
  .panel-eyebrow { margin-bottom:6px; }
  .panel-heading h2 { font-size:19px; }
  .order-labels { margin-bottom:8px; }
  .movie-list { gap:7px; }
  .movie-row { min-height:56px; }
  .movie-select { padding:8px 9px; }
  .order-label-bottom { margin-top:8px; }
  .status-message { margin:10px 0 10px; line-height:1.45; }
  .primary-button { padding:15px 18px; }
}
.movie-row.close .movie-select { background:#4a4630; border-color:var(--yellow); }
.feedback-box.close, .guess-block.close, .legend-square.yellow { background:var(--yellow); color:#3a3214; }
.debug-log { margin:10px 0 0; padding:8px 10px; max-height:160px; overflow:auto; background:#0e131c; border:1px solid #3a4558; border-radius:8px; color:#9fe0c0; font:11px/1.45 ui-monospace,Menlo,monospace; white-space:pre-wrap; }
/* Six films on a phone: keep Check high enough to stay clear of Safari's toolbar. */
@media (max-width:560px) {
  .movie-list { gap:6px; }
  .movie-row { min-height:52px; }
  .movie-select { padding:6px 9px; }
  .movie-name { font-size:14px; line-height:1.22; }
  .order-labels { margin-bottom:6px; }
  .order-label-bottom { margin-top:6px; }
}
.status-message { margin:12px 0 4px; }
.order-label-bottom { margin-bottom:12px; }
.movie-text { display:flex; flex-direction:column; gap:2px; min-width:0; flex:1; }
.movie-sub { font-size:12px; font-weight:500; color:var(--muted); line-height:1.25; }
.movie-row.correct .movie-sub, .movie-row.close .movie-sub { color:#d7dbe2; }
.test-select { padding:12px 10px; border:1px solid #6a7486; border-radius:9px; background:#2c3546; color:var(--cream); font:inherit; font-size:13px; font-weight:700; }
@media (max-width:560px) { .movie-sub { font-size:11.5px; } }
.movie-sub { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
/* Glued yellow pair: a short yellow link bridges the gap between the two rows. */
.movie-row { position:relative; }
.movie-row.pair-top::after { content:""; position:absolute; left:22px; right:calc(56px + 22px); bottom:-7px; height:8px; z-index:1; pointer-events:none;
  border-left:3px solid var(--yellow); border-right:3px solid var(--yellow); }
.movie-row.pair-top .drag-handle, .movie-row.pair-bottom .drag-handle { border-color:var(--yellow); }
@media (max-width:560px) { .movie-row.pair-top::after { right:calc(52px + 22px); bottom:-6px; height:7px; } }
/* One-guess results */
.primary-button.armed { background:var(--yellow); color:#2b2610; }
.movie-row.result .movie-select:disabled { opacity:1; cursor:default; }
.movie-row.res-exact .movie-select { background:#264e45; border-color:#63d8ab; }
.movie-row.res-near .movie-select { background:#4a4630; border-color:var(--yellow); }
.movie-row.res-close .movie-select { background:#4d3a2c; border-color:#f0a35e; }
.movie-row.res-far .movie-select { background:#2c3546; border-color:#55607a; }
.result-badge { width:56px; flex-shrink:0; display:grid; place-items:center; border-radius:10px; font-size:11px; font-weight:900; letter-spacing:.02em; text-align:center; line-height:1.1; padding:0 4px; }
.result-badge.res-exact { background:#63d8ab; color:#123a2c; font-size:18px; }
.result-badge.res-near { background:var(--yellow); color:#3a3214; }
.result-badge.res-close { background:#f0a35e; color:#3d2410; }
.result-badge.res-far { background:#55607a; color:#e8ecf2; }
.score-panel { text-align:center; }
.score-big { font-size:56px; font-weight:900; line-height:1; letter-spacing:-.02em; color:var(--cream); }
.score-out { font-size:22px; font-weight:800; color:var(--muted); margin-left:4px; }
.score-panel h3 { margin:8px 0 4px; }
.score-breakdown { font-size:13px; color:var(--muted); margin:0 0 10px; }
.score-grid { font-size:26px; letter-spacing:4px; margin:4px 0 6px; }
.score-legend { font-size:11.5px; color:var(--muted); margin:0 0 12px; }
.legend-square.green { background:#63d8ab; }
@media (max-width:560px) { .result-badge { width:52px; } .score-big { font-size:48px; } }
.movie-row.res-far .movie-select { background:#4e2c33; border-color:var(--red); }
.result-badge.res-far { background:var(--red); color:#fff; }
.result-badge { width:64px; flex-direction:column; display:flex; align-items:center; justify-content:center; gap:1px; }
.badge-small { font-size:9px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; opacity:.85; }
.badge-big { font-size:16px; font-weight:900; }
@media (max-width:560px) { .result-badge { width:60px; } }
.badge-small { white-space:nowrap; letter-spacing:.02em; }
.result-badge { width:66px; }
@media (max-width:560px) { .result-badge { width:64px; } }
/* Stats and archive */
.side-panel { margin-top:18px; padding:16px 16px 14px; border:1px solid var(--line); border-radius:13px; background:var(--panel); }
.side-title { margin:0 0 12px; font-size:11px; letter-spacing:.16em; color:var(--muted); font-weight:900; }
.side-note { margin:10px 0 0; font-size:12px; color:var(--muted); }
.stat-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:6px; text-align:center; }
.stat { display:flex; flex-direction:column; gap:2px; }
.stat-value { font-size:24px; font-weight:900; color:var(--cream); }
.stat-label { font-size:10px; font-weight:800; letter-spacing:.06em; color:var(--muted); text-transform:uppercase; }
.stat-bands { margin-top:14px; display:flex; flex-direction:column; gap:5px; }
.band-row { display:grid; grid-template-columns:78px 1fr 26px; align-items:center; gap:8px; font-size:12px; }
.band-label { color:var(--muted); font-weight:700; }
.band-track { height:14px; background:#2a3344; border-radius:4px; overflow:hidden; }
.band-bar { display:block; height:100%; background:var(--coral); border-radius:4px; }
.band-count { text-align:right; font-weight:800; color:var(--cream); }
.archive-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:6px; }
.archive-item { width:100%; display:grid; grid-template-columns:38px 1fr auto 46px; gap:8px; align-items:center; padding:10px 12px; border:1px solid #3a4558; border-radius:9px; background:#232c3d; color:var(--cream); font:inherit; font-size:13px; text-align:left; cursor:pointer; }
.archive-item.current { border-color:var(--coral); }
.archive-num { font-weight:900; color:var(--muted); font-size:12px; }
.archive-date { color:var(--cream); font-weight:700; }
.archive-topic { color:var(--muted); font-size:12px; text-align:right; }
.archive-score { text-align:center; font-weight:900; background:#2f3a4f; border-radius:6px; padding:3px 0; }
.archive-score.unplayed { background:var(--coral); color:#1b2230; font-size:11px; letter-spacing:.04em; }
.archive-banner { margin:0 0 14px; padding:10px 12px; border:1px dashed var(--coral); border-radius:9px; font-size:12.5px; color:var(--muted); }
.archive-back { background:none; border:0; color:var(--coral); font:inherit; font-weight:800; text-decoration:underline; cursor:pointer; padding:0; }
@media (hover:hover) { .archive-item:hover { border-color:#5a6680; } }
@media (max-width:560px) { .stat-value { font-size:20px; } .archive-item { grid-template-columns:34px 1fr auto 42px; font-size:12.5px; } }
