/* Movie Night: a quiet, Notion-like page where film stills bring the color. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f7f7f5;
  --hover: rgba(55, 53, 47, 0.06);
  --press: rgba(55, 53, 47, 0.1);
  --border: #e9e9e7;
  --border-strong: #dcdcd8;
  --ink: #37352f;
  --muted: #73726e;
  --faint: #9b9a97;
  --blue: #0f6cbd;
  --blue-hover: #0c5aa0;
  --on-blue: #ffffff;
  --red: #e03e3e;
  --green: #0f7b6c;
  --scrim: rgba(15, 15, 15, 0.6);
  --shadow-pop: 0 0 0 1px rgba(15, 15, 15, 0.05), 0 3px 6px rgba(15, 15, 15, 0.1), 0 9px 24px rgba(15, 15, 15, 0.2);
  --shadow-card: 0 1px 2px rgba(15, 15, 15, 0.06), 0 8px 24px -8px rgba(15, 15, 15, 0.18);

  /* Notion's tag palette */
  --t-gray-bg: #e3e2e0; --t-gray: #32302c;
  --t-brown-bg: #eee0da; --t-brown: #442a1e;
  --t-orange-bg: #fadec9; --t-orange: #49290e;
  --t-yellow-bg: #fdecc8; --t-yellow: #402c1b;
  --t-green-bg: #dbeddb; --t-green: #1c3829;
  --t-blue-bg: #d3e5ef; --t-blue: #183347;
  --t-purple-bg: #e8deee; --t-purple: #412454;
  --t-pink-bg: #f5e0e9; --t-pink: #4c2337;
  --t-red-bg: #ffe2dd; --t-red: #5d1715;

  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif;
  --serif: "Newsreader", "Iowan Old Style", "Charter", Georgia, serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --rail: 1080px;
  --pad: 48px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #191919; --surface: #202020; --hover: rgba(255, 255, 255, 0.055); --press: rgba(255, 255, 255, 0.09);
    --border: rgba(255, 255, 255, 0.094); --border-strong: rgba(255, 255, 255, 0.16);
    --ink: rgba(255, 255, 255, 0.86); --muted: rgba(255, 255, 255, 0.56); --faint: rgba(255, 255, 255, 0.4);
    --red: #ff7369; --green: #4dab9a; --scrim: rgba(0, 0, 0, 0.7);
    --shadow-pop: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 3px 6px rgba(0, 0, 0, 0.4), 0 9px 24px rgba(0, 0, 0, 0.5);
    --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 10px 30px -10px rgba(0, 0, 0, 0.7);
    --t-gray-bg: #373737; --t-gray: rgba(255,255,255,.86);
    --t-brown-bg: #4a3228; --t-brown: rgba(255,255,255,.86);
    --t-orange-bg: #5c3b23; --t-orange: rgba(255,255,255,.86);
    --t-yellow-bg: #564328; --t-yellow: rgba(255,255,255,.86);
    --t-green-bg: #243d30; --t-green: rgba(255,255,255,.86);
    --t-blue-bg: #143a4e; --t-blue: rgba(255,255,255,.86);
    --t-purple-bg: #3c2d49; --t-purple: rgba(255,255,255,.86);
    --t-pink-bg: #4e2c3c; --t-pink: rgba(255,255,255,.86);
    --t-red-bg: #522e2a; --t-red: rgba(255,255,255,.86);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #191919; --surface: #202020; --hover: rgba(255, 255, 255, 0.055); --press: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.094); --border-strong: rgba(255, 255, 255, 0.16);
  --ink: rgba(255, 255, 255, 0.86); --muted: rgba(255, 255, 255, 0.56); --faint: rgba(255, 255, 255, 0.4);
  --red: #ff7369; --green: #4dab9a; --scrim: rgba(0, 0, 0, 0.7);
  --shadow-pop: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 3px 6px rgba(0, 0, 0, 0.4), 0 9px 24px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 10px 30px -10px rgba(0, 0, 0, 0.7);
  --t-gray-bg: #373737; --t-gray: rgba(255,255,255,.86);
  --t-brown-bg: #4a3228; --t-brown: rgba(255,255,255,.86);
  --t-orange-bg: #5c3b23; --t-orange: rgba(255,255,255,.86);
  --t-yellow-bg: #564328; --t-yellow: rgba(255,255,255,.86);
  --t-green-bg: #243d30; --t-green: rgba(255,255,255,.86);
  --t-blue-bg: #143a4e; --t-blue: rgba(255,255,255,.86);
  --t-purple-bg: #3c2d49; --t-purple: rgba(255,255,255,.86);
  --t-pink-bg: #4e2c3c; --t-pink: rgba(255,255,255,.86);
  --t-red-bg: #522e2a; --t-red: rgba(255,255,255,.86);
}
@media (max-width: 720px) { :root { --pad: 16px; } }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; min-height: 100vh; overflow-x: hidden; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.serif { font-family: var(--serif); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.caption { font-size: 13px; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 30; height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 12px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
.crumbs { display: flex; align-items: center; gap: 2px; min-width: 0; font-size: 14px; }
.crumbs a, .crumbs span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 6px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs a:hover { background: var(--hover); }
.crumbs .sep { color: var(--faint); padding: 0 2px; }
.iconbtn { width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 6px; color: var(--muted); }
.iconbtn:hover { background: var(--hover); color: var(--ink); }
.iconbtn svg, .ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; } :root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .i-sun { display: block; } :root:not([data-theme="light"]) .i-moon { display: none; } }

/* ---------- page: cover, icon, title ---------- */
main { outline: none; padding-bottom: 96px; }
.cover { position: relative; height: clamp(180px, 30vw, 300px); margin-top: -48px; background: var(--surface); overflow: hidden; }
.cover-btn { position: absolute; right: 16px; bottom: 12px; opacity: 0; transition: opacity .15s var(--ease); }
.cover:hover .cover-btn, .cover-btn:focus-visible { opacity: 1; }
@media (hover: none) { .cover-btn { opacity: 1; } }
.rail { max-width: var(--rail); margin: 0 auto; padding: 0 var(--pad); }
.pageicon { font-size: 72px; line-height: 1; margin-top: -40px; position: relative; width: max-content; user-select: none; filter: drop-shadow(0 2px 6px rgba(0,0,0,.12)); }
.pageicon.nocover { margin-top: 40px; }
h1 { font-size: clamp(32px, 5vw, 40px); line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; margin: 16px 0 4px; }
h2 { font-size: 24px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.lead { font-size: 17px; color: var(--muted); margin: 4px 0 0; max-width: 40em; }
.section { margin-top: 48px; }
.section.first { margin-top: 28px; }
.section .props { margin-top: 0; }
.sectionhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }

/* ---------- properties (Notion-style rows) ---------- */
.props { margin-top: 20px; display: grid; gap: 2px; }
.prop { display: grid; grid-template-columns: 180px 1fr; align-items: center; min-height: 40px; gap: 8px; }
.prop > .k { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; padding: 6px 6px; }
.prop > .k .ic { width: 18px; height: 18px; }
.prop > .v { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 6px; min-height: 36px; }
@media (max-width: 600px) { .prop { grid-template-columns: 1fr; gap: 0; } .prop > .k { padding-bottom: 0; } }

/* ---------- tags / chips ---------- */
.tag { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 4px; font-size: 14px; line-height: 1; white-space: nowrap; background: var(--t-gray-bg); color: var(--t-gray); }
.tag.lg { height: 30px; padding: 0 10px; font-size: 15px; }
.tag .x { border: 0; background: transparent; padding: 0; width: 18px; height: 18px; border-radius: 3px; display: grid; place-items: center; color: inherit; opacity: .6; margin-right: -4px; }
.tag .x:hover { opacity: 1; background: rgba(0,0,0,.08); }
.tag .x .ic { width: 14px; height: 14px; }
.c-gray { background: var(--t-gray-bg); color: var(--t-gray); } .c-brown { background: var(--t-brown-bg); color: var(--t-brown); }
.c-orange { background: var(--t-orange-bg); color: var(--t-orange); } .c-yellow { background: var(--t-yellow-bg); color: var(--t-yellow); }
.c-green { background: var(--t-green-bg); color: var(--t-green); } .c-blue { background: var(--t-blue-bg); color: var(--t-blue); }
.c-purple { background: var(--t-purple-bg); color: var(--t-purple); } .c-pink { background: var(--t-pink-bg); color: var(--t-pink); }
.c-red { background: var(--t-red-bg); color: var(--t-red); }
button.tag { border: 0; cursor: pointer; transition: box-shadow .12s var(--ease), opacity .12s; }
.choice { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.choice button { height: 30px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--border); background: transparent; font-size: 14px; color: var(--muted); transition: background .12s var(--ease), color .12s, border-color .12s; }
.choice button:hover { background: var(--hover); color: var(--ink); }
.choice button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.inline-add { display: inline-flex; align-items: center; }
.inline-add input { width: 130px; height: 30px; border: 0; background: transparent; border-radius: 6px; padding: 0 8px; outline: none; font-size: 14px; }
.inline-add input:hover { background: var(--hover); }
.inline-add input:focus { background: var(--hover); box-shadow: inset 0 0 0 1px var(--border-strong); }
.inline-add input::placeholder { color: var(--muted); }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; }
.check input { appearance: none; margin: 0; width: 18px; height: 18px; border-radius: 4px; border: 1.5px solid var(--faint); display: grid; place-items: center; cursor: pointer; transition: background .12s, border-color .12s; }
.check input:checked { background: var(--blue); border-color: var(--blue); }
.check input:checked::after { content: ""; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--bg); font-size: 15px; font-weight: 500; text-decoration: none; transition: background .12s var(--ease), border-color .12s, transform .12s var(--ease); white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn:active { transform: scale(.98); }
.btn .ic { width: 18px; height: 18px; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }
.btn.primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--hover); color: var(--ink); }
.btn.danger { color: var(--red); }
.btn.lg { min-height: 44px; padding: 0 20px; font-size: 16px; border-radius: 8px; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }

/* ---------- callout ---------- */
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 8px; background: var(--surface); font-size: 15px; }
.callout .em { font-size: 20px; line-height: 1.3; }

/* ---------- film images ---------- */
.still { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--fb, var(--t-gray-bg)); isolation: isolate; }
.still img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; z-index: 1; opacity: 0; transition: opacity .35s var(--ease); }
.still img.ok { opacity: 1; }
.still .fbtitle { position: absolute; inset: 0; display: none; align-items: flex-end; padding: 10px 12px; font: 500 18px/1.15 var(--serif); color: var(--fbink, var(--t-gray)); }
.still.poster { aspect-ratio: 2 / 3; border-radius: 6px; }
.still.poster .fbtitle { padding: 12px; }
.noimg > .fbtitle { display: flex; }
.still .fbtitle.center { align-items: center; justify-content: center; text-align: center; padding: 12px 16px; font-size: 22px; }
.still.poster.wide img.main { object-fit: contain; z-index: 2; }
.still.poster.wide img.wash { filter: blur(22px) saturate(1.2); transform: scale(1.4); }
.still.poster.wide img.wash.ok { opacity: 1; }
/* 16:9 frame: blurred wash of the poster with the sharp poster on top */
.still.frame img.wash { filter: blur(26px) saturate(1.25); transform: scale(1.25); }
.still.frame img.wash.ok { opacity: .85; }
.still.frame .fg { position: absolute; z-index: 2; top: 9%; bottom: 9%; left: 50%; transform: translateX(-50%); aspect-ratio: 2 / 3; border-radius: 4px; overflow: hidden; box-shadow: 0 6px 18px rgba(0,0,0,.28); background: var(--fb); }
.still.frame .fg .fbtitle { font-size: 13px; padding: 6px; }
/* game cards: three fanned posters */
.still.fan .fp { position: absolute; z-index: 2; top: 14%; width: 26%; transition: transform .35s var(--ease); }
.still.fan .fp .still { box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.still.fan .fp .fbtitle { font-size: 12px; padding: 6px; }
.still.fan .fp0 { left: 20%; transform: rotate(-9deg) translateY(6%); }
.still.fan .fp1 { left: 37%; transform: translateY(-2%); z-index: 3; }
.still.fan .fp2 { left: 54%; transform: rotate(9deg) translateY(6%); }
.card:hover .still.fan .fp0 { transform: rotate(-14deg) translate(-10%, 4%); }
.card:hover .still.fan .fp1 { transform: translateY(-7%); }
.card:hover .still.fan .fp2 { transform: rotate(14deg) translate(10%, 4%); }
.still.fan img.wash { filter: blur(30px) saturate(1.2); transform: scale(1.3); }
.still.fan img.wash.ok { opacity: .55; }
/* page cover: a slowly drifting strip of posters */
.strip { position: absolute; inset: 0; overflow: hidden; background: var(--surface); }
.strip .track { display: flex; gap: 8px; height: 100%; width: max-content; padding: 0 4px; animation: drift 90s linear infinite; }
.strip .sp { height: 100%; aspect-ratio: 2 / 3; }
.strip .sp .still { height: 100%; border-radius: 0; }
.strip .sp .fbtitle { font-size: 15px; }
@keyframes drift { to { transform: translateX(-50%); } }
.cover:hover .strip .track { animation-play-state: paused; }

/* ---------- gallery cards ---------- */
.gallery { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.gallery.games { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1060px) { .gallery.games { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 520px) { .gallery.games { grid-template-columns: 1fr; } }
.card { display: flex; flex-direction: column; text-align: left; padding: 0; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); overflow: hidden; color: inherit; text-decoration: none; transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .2s; }
.card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }
.card > .still { border-radius: 0; }
.card .still img { transition: opacity .35s var(--ease), transform .6s var(--ease); }
.card.pcard:hover > .still img { transform: scale(1.03); }
.card .body { padding: 12px 14px 14px; display: grid; gap: 6px; }
.card .name { font-size: 16px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.card .desc { font-size: 14px; color: var(--muted); line-height: 1.45; }
.card .tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.card .ftitle { font: 500 19px/1.2 var(--serif); letter-spacing: -0.005em; }
.card .meta { font-size: 14px; color: var(--muted); }
.gallery.posters { grid-template-columns: repeat(auto-fill, minmax(min(46%, 150px), 1fr)); gap: 20px 16px; }
.card.pcard { border: 0; border-radius: 0; background: transparent; overflow: visible; }
.card.pcard:hover { box-shadow: none; transform: translateY(-3px); }
.card.pcard > .still { border-radius: 6px; box-shadow: 0 1px 2px rgba(15,15,15,.08), 0 0 0 1px var(--border); transition: box-shadow .2s var(--ease); }
.card.pcard:hover > .still { box-shadow: var(--shadow-card); }
.card.pcard .body { padding: 10px 2px 0; gap: 4px; }
.card.pcard .ftitle { font-size: 17px; }

/* view tabs */
.tabs { display: flex; gap: 4px; }
.tabs button { border: 0; background: transparent; height: 32px; padding: 0 10px; border-radius: 6px; font-size: 14px; color: var(--muted); position: relative; }
.tabs button:hover { background: var(--hover); color: var(--ink); }
.tabs button[aria-pressed="true"] { color: var(--ink); font-weight: 500; }
.tabs button[aria-pressed="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -9px; height: 2px; background: var(--ink); border-radius: 2px; }
.tabs .count { color: var(--muted); margin-left: 4px; font-weight: 400; }

/* ---------- game layouts ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; margin-top: 32px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.label { font-size: 14px; color: var(--muted); margin: 0 0 8px; }
.stack > * + * { margin-top: 20px; }
.field { display: flex; gap: 8px; }
.input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--bg); outline: none; font-size: 16px; transition: border-color .12s, box-shadow .12s; }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 20%, transparent); }
.input::placeholder, textarea::placeholder { color: var(--muted); }

/* hat */
.slips { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.slips li { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 6px; border-radius: 8px; animation: pop .28s var(--ease) both; }
.slips li:hover { background: var(--hover); }
.slips .still { border-radius: 3px; box-shadow: 0 0 0 1px var(--border); }
.slips .still .fbtitle { display: none; }
.slips .t { font: 500 17px/1.2 var(--serif); }
.slips .by { font-size: 14px; color: var(--muted); }
.slips .x { opacity: .55; }
.slips li:hover .x { opacity: 1; }
@media (hover: none) { .slips .x { opacity: 1; } }
.empty { padding: 20px; border-radius: 8px; border: 1px dashed var(--border-strong); color: var(--muted); font-size: 15px; text-align: center; }
.hatstage { display: grid; justify-items: center; gap: 16px; padding: 24px 16px 28px; border-radius: 12px; background: var(--surface); text-align: center; }
.hat { width: min(240px, 70%); color: var(--ink); overflow: visible; }
.hat .brim, .hat .crown { fill: var(--ink); stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.hat .opening { fill: #000; opacity: .45; }
.hat .band { fill: #d9a531; stroke: var(--ink); stroke-width: 3; }
.hat .slip { transform-box: fill-box; transform-origin: 50% 100%; }
.hat .slip .paper { fill: #fbf6e9; stroke: rgba(0,0,0,.18); stroke-width: 1; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.18)); }
.hat .slip.s1 .paper { fill: #f6efdc; }
.hat .slip.s2 .paper { fill: #fffdf7; }
.hat .slip .fold { stroke: rgba(0,0,0,.1); stroke-width: 1; }
.hat .slip .ink { stroke: #4a5a78; stroke-width: 2; stroke-linecap: round; opacity: .7; fill: none; }
.hat .slip.s0 { animation: peek 3.2s var(--ease) infinite; }
.hat .slip.s1 { animation: peek 3.2s var(--ease) .6s infinite; }
.hat.shake { animation: wobble .9s var(--ease); transform-origin: 50% 90%; }
@keyframes wobble { 0%,100% { transform: rotate(0); } 15% { transform: rotate(-10deg) translateY(-6px); } 35% { transform: rotate(8deg); } 55% { transform: rotate(-6deg) translateY(-3px); } 75% { transform: rotate(4deg); } 90% { transform: rotate(-1deg); } }
@keyframes peek { 0%, 70%, 100% { transform: translateY(0); } 80% { transform: translateY(-6px); } }
.hatcount { font-size: 15px; color: var(--muted); }
.drawn { width: 100%; max-width: 440px; text-align: left; border-radius: 12px; background: var(--bg); box-shadow: var(--shadow-card); overflow: hidden; animation: draw .55s var(--ease) both; transform-origin: 50% 100%; }
.drawn .still { border-radius: 0; }
.drawn .body { padding: 16px 18px 18px; }
.drawn .from { font-size: 14px; color: var(--muted); }
.drawn .ftitle { font: 500 30px/1.1 var(--serif); margin: 4px 0 6px; }
@keyframes draw { from { opacity: 0; transform: translateY(60px) rotate(-4deg) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(4px); } }

/* one line */
.narrow { max-width: 640px; }
.turn { margin-top: 32px; }
.turn .who { font-size: clamp(28px, 4.5vw, 36px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; margin: 6px 0 20px; }
.bigtext { width: 100%; min-height: 120px; resize: vertical; border: 0; border-radius: 8px; background: var(--surface); padding: 14px 16px; font-size: 20px; line-height: 1.45; outline: none; }
.bigtext:focus { box-shadow: inset 0 0 0 1px var(--border-strong); }
.dots { display: flex; gap: 6px; align-items: center; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); transition: background .2s; }
.dots i.on { background: var(--ink); }
.dots span { margin-left: 6px; font-size: 14px; color: var(--muted); }
.handoff { min-height: 56vh; display: grid; place-items: center; text-align: center; padding: 24px 0; }
.handoff .big { font-size: 64px; line-height: 1; display: inline-block; animation: bob 2s var(--ease) infinite; }
.handoff h2 { font-size: clamp(26px, 4vw, 32px); font-weight: 700; letter-spacing: -0.02em; margin: 16px 0 6px; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-4deg); } }
.roll { margin: 48px auto 0; max-width: 560px; text-align: center; }
.roll .still { box-shadow: var(--shadow-card); border-radius: 12px; }
.verdict { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; margin-top: 28px; align-items: center; }
@media (max-width: 640px) { .verdict { grid-template-columns: 130px minmax(0, 1fr); gap: 16px; align-items: start; } .verdict p { font-size: 15px; } }
.verdict .still { box-shadow: var(--shadow-card); }
.verdict .ftitle { font: 500 clamp(32px, 4.5vw, 44px)/1.08 var(--serif); margin: 2px 0 6px; letter-spacing: -0.01em; }
.reasons { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--border); }
.reasons li { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); align-items: start; }
@media (max-width: 520px) { .reasons li { grid-template-columns: 1fr; gap: 6px; } }
.reasons q { font-style: italic; color: var(--muted); }
.reasons .ok { color: var(--green); font-size: 14px; margin-top: 2px; }
.reasons .warn { color: var(--red); font-size: 14px; margin-top: 2px; }
.minis { display: grid; grid-template-columns: repeat(3, minmax(0, 150px)); gap: 16px; margin-top: 8px; }
.minis .card .body { padding: 8px 10px 10px; }
.minis .card .ftitle { font-size: 15px; }

/* bracket */
.round-label { display: flex; align-items: center; gap: 10px; justify-content: center; margin: 32px 0 16px; font-size: 15px; color: var(--muted); }
.versus { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 20px; align-items: center; }
.versus .vs { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); font-size: 14px; font-weight: 500; color: var(--muted); }
@media (max-width: 640px) { .versus { grid-template-columns: 1fr; gap: 12px; } .versus .vs { justify-self: center; } }
.pick { cursor: pointer; }
.pick .ftitle { font-size: 26px; }
.pick .desc { font-size: 16px; }
.pick .meta { font-size: 14px; }
.pick .desc { color: var(--muted); }
.pick.out { animation: fadeout .35s var(--ease) forwards; }
.pick.win { box-shadow: 0 0 0 2px var(--blue), var(--shadow-card); }
@keyframes fadeout { to { opacity: 0; transform: scale(.96); } }
.tree { display: grid; gap: 16px; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); margin-top: 8px; }
.tree h3 { font-size: 14px; font-weight: 500; color: var(--muted); margin: 0 0 6px; }
.tree .col { display: grid; gap: 4px; align-content: start; }
.tree .slot { font-size: 14px; padding: 6px 8px; border-radius: 6px; background: var(--surface); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 32px; }
.tree .slot.out { color: var(--muted); text-decoration: line-through; background: transparent; }
.tree .slot.win { background: var(--t-blue-bg); color: var(--t-blue); }
@media (max-width: 560px) { .tree .slot { font-size: 13px; padding: 6px; } }

/* swipe */
.deck { position: relative; width: min(260px, 70vw, calc((100svh - 300px) * 2 / 3)); aspect-ratio: 2 / 3; margin: 16px auto 0; }
.deck .sw { position: absolute; inset: 0; border-radius: 14px; overflow: hidden; touch-action: none; user-select: none; box-shadow: var(--shadow-card); background: var(--surface); will-change: transform; cursor: grab; }
.deck .sw:active { cursor: grabbing; }
.deck .sw .still { position: absolute; inset: 0; border-radius: 0; aspect-ratio: auto; height: 100%; }
.deck .sw .fbtitle { font-size: 30px; padding: 20px; }
.deck .sw img { pointer-events: none; -webkit-user-drag: none; }
.deck .sw.behind { transform: scale(.94) translateY(16px); opacity: .7; box-shadow: none; }
.stamp { position: absolute; top: 20px; z-index: 3; opacity: 0; font-size: 22px; font-weight: 700; height: 40px; padding: 0 14px; border-radius: 6px; display: flex; align-items: center; }
.stamp.yes { left: 16px; transform: rotate(-10deg); background: var(--t-green-bg); color: var(--t-green); }
.stamp.no { right: 16px; transform: rotate(10deg); background: var(--t-red-bg); color: var(--t-red); }
.swipeinfo { text-align: center; max-width: 420px; margin: 16px auto 0; transition: opacity .15s var(--ease); }
.swipeinfo.leaving { opacity: 0; }
.swipeinfo .ftitle { font: 500 24px/1.2 var(--serif); }
.swipebtns { display: flex; justify-content: center; gap: 20px; margin-top: 16px; }
.round { width: 60px; height: 60px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--bg); display: grid; place-items: center; transition: transform .12s var(--ease), background .12s; }
.round:hover { background: var(--hover); }
.round:active { transform: scale(.92); }
.round .ic { width: 26px; height: 26px; stroke-width: 2; }
.round.no { color: var(--red); } .round.yes { color: var(--green); }
.round.sm { width: 44px; height: 44px; align-self: center; color: var(--muted); }
.round.sm .ic { width: 20px; height: 20px; }
.round[disabled] { opacity: .3; pointer-events: none; }
.round.yes .ic { fill: currentColor; }
.bars { display: grid; gap: 6px; margin-top: 8px; }
.bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 6px; position: relative; overflow: hidden; font-size: 15px; }
.bar::before { content: ""; position: absolute; inset: 0; right: auto; width: var(--w); background: var(--surface); border-radius: 6px; transition: width .6s var(--ease); }
.bar.full::before { background: var(--t-green-bg); }
.bar > * { position: relative; }
.bar span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- dialog ---------- */
.scrim { position: fixed; inset: 0; z-index: 50; background: var(--scrim); display: grid; place-items: center; padding: 16px; overflow-y: auto; animation: fade .2s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(560px, 100%); background: var(--bg); border-radius: 12px; box-shadow: var(--shadow-pop); overflow: hidden; animation: rise .32s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.modal { position: relative; }
.mhead { height: 120px; position: relative; overflow: hidden; background: var(--surface); }
.mhead img.wash { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(30px) saturate(1.3); transform: scale(1.3); opacity: 0; transition: opacity .35s; }
.mhead img.wash.ok { opacity: .9; }
.mposter { position: absolute; top: 40px; left: 24px; width: 120px; z-index: 2; }
.mposter .still { box-shadow: 0 10px 30px -6px rgba(0,0,0,.45), 0 0 0 1px var(--border); }
.modal .body { padding-top: 16px; }
.modal .kicker, .modal .ftitle { margin-left: 136px; }
.modal .ftitle { min-height: 0; }
@media (max-width: 520px) { .mposter { width: 96px; top: 56px; left: 16px; } .modal .kicker, .modal .ftitle { margin-left: 108px; } .modal .body { padding: 14px 16px 20px; } }
.modal .body { padding: 16px 24px 24px; }
.modal .kicker { font-size: 14px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.modal .ftitle { font: 500 clamp(26px, 5vw, 36px)/1.08 var(--serif); margin-top: 4px; margin-bottom: 0; letter-spacing: -0.01em; }
.modal .hook { margin: 28px 0 0; color: var(--ink); }
.modal .props { margin-top: 14px; }
.modal .prop { grid-template-columns: 130px 1fr; min-height: 32px; }
.modal .prop > .v { min-height: 28px; font-size: 15px; }
@media (max-width: 600px) { .modal .prop { grid-template-columns: 110px 1fr; } }
.modal .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.modal .actions .spacer { flex: 1; }
.modal .actions .btn.lg { padding: 0 14px; font-size: 15px; }
.modal .actions .btn.ghost { margin-left: auto; }
.close { position: absolute; top: 10px; right: 10px; z-index: 3; border-radius: 50%; background: color-mix(in srgb, var(--bg) 78%, transparent); color: var(--ink); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.close:hover { background: var(--bg); color: var(--ink); }
.modalwrap { position: relative; }

/* popcorn burst */
.burst { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.burst span { position: absolute; left: 50%; bottom: -40px; font-size: var(--s, 28px); animation: fly var(--d, 1.6s) cubic-bezier(.15,.7,.35,1) forwards; }
@keyframes fly {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  55% { transform: translate(calc(var(--x) * .7), var(--y)) rotate(calc(var(--r) * .6)); opacity: 1; }
  100% { transform: translate(var(--x), calc(var(--y) * .2 + 30vh)) rotate(var(--r)); opacity: 0; }
}

.foot { max-width: var(--rail); margin: 0 auto; padding: 24px var(--pad) 40px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--border); }
.foot p { margin: 0; max-width: 72em; }

/* ---------- compact play screens ---------- */
@media (max-width: 560px) { .hide-sm { display: none; } }
.crumbs .em { font-size: 16px; }
.rail.compact { padding-top: 12px; }
.ctitle { display: flex; align-items: center; gap: 10px; }
.pageicon.sm { font-size: 30px; margin: 0; }
.rail.compact h1 { font-size: clamp(24px, 3vw, 30px); margin: 0; }

/* ---------- player avatars (pass-the-phone screens) ---------- */
.avatar { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-weight: 650; font-size: 18px; box-shadow: 0 0 0 3px var(--bg); }
.avatar.xl { width: 96px; height: 96px; font-size: 42px; }
.avatars { display: flex; justify-content: center; }
.avatars .avatar + .avatar { margin-left: -10px; }
.avatars.bob { animation: bob 2.2s var(--ease) infinite; }
.handoff h2 { margin-top: 20px; }

/* hat: draw button first on phones; veto picker */
@media (max-width: 860px) { .hatstage { order: -1; } .hat { width: min(180px, 55%); } }
.vetopick { animation: pop .2s var(--ease) both; }
button.tag[disabled] { opacity: .45; cursor: default; }

/* bracket on phones: compact horizontal cards so both fit */
@media (max-width: 640px) {
  .pick { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; }
  .pick > .still.frame { aspect-ratio: 2 / 3; border-radius: 10px 0 0 10px; }
  .pick > .still.frame .fg { inset: 0; transform: none; left: 0; top: 0; bottom: 0; width: 100%; border-radius: 0; box-shadow: none; }
  .pick > .still.frame .fg img { object-fit: contain; }
  .pick .body { padding: 10px 12px; }
  .pick .ftitle { font-size: 19px; }
  .pick .desc { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .round-label { margin: 16px 0 10px; }
}

/* popcorn behind the dialog panel */
.burst.inside { position: fixed; inset: 0; z-index: 0; }
.modalwrap { position: relative; z-index: 1; }

/* dark mode: keep dark emoji page icons visible */
:root[data-theme="dark"] .pageicon { filter: drop-shadow(0 0 1px rgba(255,255,255,.7)) drop-shadow(0 0 10px rgba(255,255,255,.18)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pageicon { filter: drop-shadow(0 0 1px rgba(255,255,255,.7)) drop-shadow(0 0 10px rgba(255,255,255,.18)); } }

/* touch: every target at least 44px */
.btn, .choice button, .tabs button, .inline-add input, button.tag, .tag.lg, .check { min-height: 44px; }
.iconbtn { width: 44px; height: 44px; }
.tag .x { position: relative; }
.tag .x::after { content: ""; position: absolute; inset: -13px; }
.tabs button[aria-pressed="true"]::after { bottom: -5px; }

/* ---------- top bar link ---------- */
.topright { display: flex; align-items: center; gap: 2px; }
.toplink { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; border-radius: 6px; font-size: 14px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.toplink .lbxd { width: 24px; height: 8px; flex: none; }
.toplink:hover { background: var(--hover); color: var(--ink); }

/* ---------- movie picker (list + Wikipedia suggestions) ---------- */
.picker { position: relative; flex: 1; min-width: 0; display: flex; }
.picker .input { width: 100%; }
.sugg { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0; background: var(--bg); border-radius: 10px; box-shadow: var(--shadow-pop); padding: 4px; max-height: 360px; overflow-y: auto; animation: pop .14s var(--ease) both; }
.sugg .opt { width: 100%; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; border: 0; background: transparent; border-radius: 6px; padding: 6px 8px; min-height: 52px; }
.sugg .opt .still { grid-row: span 2; border-radius: 3px; box-shadow: 0 0 0 1px var(--border); }
.sugg .opt .still .fbtitle { display: none; }
.sugg .opt .t { font: 500 16px/1.2 var(--serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sugg .opt .m { grid-column: 2; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sugg .opt .tag { grid-row: 1 / span 2; grid-column: 3; }
.sugg .opt:hover, .sugg .opt.on { background: var(--hover); }
.sugg .opt.loading { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 14px; min-height: 40px; }
.sugg .opt.loading .ic { width: 16px; height: 16px; animation: pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: .3; } }

/* ---------- watch log ---------- */
.logbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.section.month { margin-top: 36px; }
.logrows { display: grid; gap: 2px; }
.logrow { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: start; width: 100%; text-align: left; border: 0; background: transparent; border-radius: 8px; padding: 8px; transition: background .12s var(--ease); }
.logrow:hover { background: var(--hover); }
.logrow .still { border-radius: 4px; box-shadow: 0 0 0 1px var(--border); }
.logrow .still .fbtitle { font-size: 10px; padding: 4px; }
.logrow .ftitle { font: 500 20px/1.2 var(--serif); }
.logrow .yr { font: 400 15px var(--sans); color: var(--muted); }
.logrow .meta { font-size: 14px; color: var(--muted); margin-top: 2px; }
.logrow .tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.logrow .note { margin: 8px 0 0; font-size: 15px; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stars { color: #d9a531; letter-spacing: 1px; white-space: nowrap; }
.logrow .stars { font-size: 16px; padding-top: 2px; }
.logrow.flash { animation: flash 1.6s var(--ease); }
@keyframes flash { 0%, 30% { background: var(--t-yellow-bg); } 100% { background: transparent; } }
.minis.recent { grid-template-columns: repeat(auto-fill, minmax(min(30%, 120px), 1fr)); }
@media (max-width: 520px) { .logrow { grid-template-columns: 48px minmax(0, 1fr); } .logrow .stars { grid-column: 2; grid-row: 1; justify-self: end; } .logrow .ftitle { padding-right: 72px; } .toplink .lbl { display: none; } }

/* log form (a sheet in the dialog) */
.modal.sheet { padding: 20px 24px 24px; overflow: visible; }
.sheethead { display: flex; align-items: center; gap: 10px; margin: 0 40px 16px 0; }
.sheethead h2 { font-size: 24px; }
.lf-film .chosen { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 8px; border-radius: 10px; background: var(--surface); animation: pop .2s var(--ease) both; }
.lf-film .chosen .still { border-radius: 4px; box-shadow: 0 0 0 1px var(--border); }
.lf-film .chosen .ftitle { font: 500 22px/1.15 var(--serif); margin: 0; }
.modal.sheet.redraw, .modal.sheet.redraw .chosen, .modal.sheet.redraw .sugg { animation: none; }
.sheet .props { margin-top: 12px; }
.sheet .prop { grid-template-columns: 140px 1fr; }
@media (max-width: 600px) { .sheet .prop { grid-template-columns: 1fr; } .modal.sheet { padding: 16px; } }
.input.date { flex: 0 1 200px; }
.notefield { height: auto; min-height: 64px; padding: 10px 12px; resize: vertical; line-height: 1.45; font-family: inherit; }
button.tag.toggle[aria-pressed="false"] { background: transparent; box-shadow: inset 0 0 0 1px var(--border-strong); color: var(--muted); }
button.tag.toggle[aria-pressed="true"]::before { content: "✓"; font-size: 13px; }
.starpick { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.starpick button[data-star] { width: 40px; height: 44px; border: 0; background: transparent; font-size: 26px; line-height: 1; color: var(--border-strong); border-radius: 6px; transition: transform .12s var(--ease), color .12s; }
.starpick button[data-star]:hover { transform: scale(1.12); }
.starpick button.on { color: #d9a531; }
.starpick button.half { background: linear-gradient(90deg, #d9a531 50%, var(--border-strong) 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.starpick .small { margin-left: 8px; }
.formerr { color: var(--red); font-size: 14px; min-height: 1.5em; margin: 12px 0 0; }
.sheet .actions { margin-top: 8px; }
.sheet .actions .btn.danger { margin-left: auto; }
.sheet .actions .btn.ghost.danger { color: var(--red); }

/* ---------- rooms ---------- */
.roomcta { margin-top: 20px; align-items: center; flex-wrap: wrap; }
.roomcta > div { flex: 1; min-width: 220px; }
.joincode { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; padding: 10px 12px; border-radius: 10px; background: var(--surface); }
.joincode .small { flex: 1; min-width: 140px; }
.joincode .input { flex: 0 0 110px; height: 44px; text-transform: uppercase; letter-spacing: .25em; font-weight: 600; text-align: center; }
.joinbox { text-align: center; margin-top: 28px; }
.codetiles { display: flex; justify-content: center; gap: 10px; margin: 14px 0; }
.codetiles span { width: clamp(56px, 16vw, 84px); aspect-ratio: 4 / 5; display: grid; place-items: center; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); font: 600 clamp(34px, 10vw, 52px)/1 var(--serif); animation: pop .3s var(--ease) both; }
.codetiles span:nth-child(2) { animation-delay: .05s; } .codetiles span:nth-child(3) { animation-delay: .1s; } .codetiles span:nth-child(4) { animation-delay: .15s; }
.handoff .codetiles span { width: 44px; font-size: 26px; }
.narrowfield { max-width: 360px; margin: 16px auto 0; }
.joinbox .formerr { text-align: center; }
.roster { flex-wrap: wrap; gap: 14px; justify-content: flex-start; }
.roster .who { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; position: relative; animation: pop .25s var(--ease) both; }
.roster .avatar + .avatar { margin-left: 0; }
.roster .nm { font-size: 13px; color: var(--muted); max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roomstatus .roster .who:not(.done) .avatar { opacity: .45; }
.roster .tick { position: absolute; top: -4px; right: -4px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--green); color: #fff; box-shadow: 0 0 0 2px var(--bg); }
.roster.big .avatar { width: 56px; height: 56px; font-size: 22px; }
.roomstatus { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--border); }
.roomstatus.center, .handoff .roomstatus { text-align: center; } .roomstatus.center .roster, .handoff .roster { justify-content: center; }
.handoff.short { min-height: 40vh; }

@media (prefers-reduced-motion: reduce) {
  .strip .track, .avatars.bob, .hat .slip { animation: none !important; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
