:root { --canvas:#14181c; --surface:#1c232b; --rule:#2c3440; --text:#fff; --body:#9ab; --faint:#678; --you:#00e054; --friend:#ff8000;
  --display: Fraunces, Georgia, serif; }
* { box-sizing: border-box; }
body { margin:0; background:var(--canvas); color:var(--body); font:14px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif; }
header, main, footer { max-width:640px; margin:0 auto; padding:16px; }
header { display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid var(--rule); }
.brand { display:inline-flex; align-items:center; min-height:44px; color:var(--text); text-decoration:none; font:700 22px var(--display); }
.brand b { color:var(--you); }
h1 { color:var(--text); font:700 30px/1.15 var(--display); margin:24px 0 8px; }
h2 { font-size:12px; font-weight:400; text-transform:uppercase; letter-spacing:.1em; border-bottom:1px solid var(--rule); padding-bottom:4px; margin:40px 0 16px; }
a, .link { color:var(--text); }
.drop { display:block; position:relative; text-align:center; padding:24px; margin-top:16px; background:var(--surface); border:1px dashed var(--faint); border-radius:4px; cursor:pointer; }
.drop:hover, .drop:focus-within { border-color:var(--you); }
.drop input { position:absolute; opacity:0; width:1px; height:1px; }
.drop strong { display:block; color:var(--text); font-size:16px; }
.help { font-size:13px; }
#start .help { display:flex; flex-wrap:wrap; align-items:center; column-gap:16px; }
.help a { display:inline-block; line-height:44px; }
.link { background:none; border:0; padding:0; min-height:44px; font:inherit; text-decoration:underline; cursor:pointer; }
.folder { display:inline-flex; align-items:center; position:relative; }
.folder input { position:absolute; opacity:0; width:1px; height:1px; }
.folder:focus-within { outline:2px solid var(--you); }
.primary { background:var(--you); color:var(--canvas); border:0; border-radius:4px; min-height:44px; padding:0 24px; font-weight:700; cursor:pointer; }
.primary:hover { filter:brightness(1.1); }
:focus-visible { outline:2px solid var(--you); outline-offset:2px; }
input[type=text] { display:block; width:100%; margin-top:8px; min-height:44px; padding:0 8px; background:var(--surface); color:var(--body); border:1px solid var(--rule); border-radius:4px; }
#start.done > :not(h1):not(#error), #start.done:not(.invited) > h1 { display:none; }
.again { display:block; margin:8px 0 0; }
.actions { display:flex; flex-wrap:wrap; column-gap:24px; margin-top:40px; border-top:1px solid var(--rule); }
.actions .link { display:inline-flex; align-items:center; margin:0; }
.actions .link, .quiet { color:var(--body); text-decoration:none; }
.actions .link:hover, .quiet:hover { color:var(--text); text-decoration:underline; }
.actions .link:disabled { cursor:default; text-decoration:none; }
.actions .help { flex-basis:100%; margin:0; }
#error { color:var(--text); border-left:2px solid var(--text); padding-left:8px; }
#error:empty { display:none; }
ul { list-style:none; margin:0; padding:0; }
.four { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
.poster { position:relative; aspect-ratio:2/3; display:flex; flex-direction:column; padding:8px; background:var(--surface); border:1px solid var(--rule); border-radius:4px; overflow:hidden; }
.poster:hover { border:2px solid var(--you); padding:7px; }
.poster .title { color:var(--text); font:700 16px/1.2 var(--display); overflow-wrap:anywhere; }
.poster .stars { margin-top:auto; }
/* the poster covers the text tile once it has loaded; the stars sit on a canvas chip above it */
.poster img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:0; }
.poster.art img { opacity:1; }
.poster.art .stars { position:relative; align-self:flex-start; padding:0 4px; background:var(--canvas); border-radius:4px; }
.stars { color:var(--you); white-space:nowrap; }
.stars.friend { color:var(--friend); }
.histogram { display:flex; align-items:flex-end; gap:8px; }
.bars { flex:1; display:flex; align-items:flex-end; gap:1px; height:64px; }
/* each column is the press target, so a very short bar is still easy to hit */
.bars button { flex:1; min-width:0; height:100%; display:flex; align-items:flex-end; padding:0; background:none; border:0; cursor:pointer; }
.bars i { width:100%; background:var(--faint); }
.bars button:hover i, .bars button[aria-pressed=true] i { background:var(--body); }
.picked p { margin:16px 0 0; color:var(--text); }
.picked li { display:flex; justify-content:space-between; gap:16px; padding:8px 0; border-bottom:1px solid var(--rule); }
.picked b { color:var(--text); overflow-wrap:anywhere; }
.score { margin:0; color:var(--text); font:700 72px/1 var(--display); }
.score.small { font-size:28px; }
.rows li { display:grid; grid-template-columns:1fr 6em 6em; gap:8px; align-items:center; min-height:44px; border-bottom:1px solid var(--rule); }
.rows b { color:var(--text); }
footer { margin-top:40px; border-top:1px solid var(--rule); color:var(--body); font-size:12px; }
footer .tmdb { height:10px; vertical-align:baseline; }
@media (max-width:640px) {
  .four { grid-template-columns:repeat(2,1fr); }
  .rows li { grid-template-columns:1fr 1fr; padding:8px 0; }
  .rows li > :first-child { grid-column:1/-1; }
}
.verdict { margin:0 0 8px; color:var(--text); font:700 22px var(--display); }
.secondary { min-height:44px; min-width:44px; padding:0 16px; background:var(--surface); color:var(--text); border:1px solid var(--rule); border-radius:4px; cursor:pointer; font:inherit; }
.secondary:hover { border-color:var(--you); }
.choices { display:grid; grid-template-columns:repeat(5,1fr); gap:8px; margin-bottom:8px; }
.quote { color:var(--text); font:700 20px/1.3 var(--display); overflow-wrap:anywhere; }
table { width:100%; border-collapse:collapse; table-layout:fixed; }
th, td { padding:8px 4px; border-bottom:1px solid var(--rule); text-align:right; font-weight:400; overflow-wrap:anywhere; }
th:first-child { text-align:left; }
.you { color:var(--you); }
.them { color:var(--friend); }
.option { display:flex; align-items:center; gap:8px; min-height:44px; }
.tabs { display:flex; gap:8px; margin-top:24px; }
.tabs [aria-pressed=true] { border-color:var(--you); color:var(--you); }
.more { margin-top:8px; }
.average b { color:var(--text); font:700 32px var(--display); margin-right:4px; }
[hidden] { display:none !important; }
header { gap:16px; }
header span { text-align:right; }
.rough { color:var(--friend); }
.ticket { --paper:#f3ead8; --ink:#231f1a; --ink-faint:#6b5d4c; --notch:8px; position:relative; display:flex; margin-top:40px; color:var(--ink); }
/* body and stub are two pieces of paper, each with half of the notches, so the stub can come away */
.ticket .body, .ticket .stub { background:var(--paper); }
.ticket .body { flex:1; min-width:0; padding:16px 24px; border-radius:4px 0 0 4px;
  -webkit-mask:radial-gradient(circle at 100% 0, #0000 var(--notch), #000 calc(var(--notch) + .5px)) top/100% 51% no-repeat, radial-gradient(circle at 100% 100%, #0000 var(--notch), #000 calc(var(--notch) + .5px)) bottom/100% 51% no-repeat;
  mask:radial-gradient(circle at 100% 0, #0000 var(--notch), #000 calc(var(--notch) + .5px)) top/100% 51% no-repeat, radial-gradient(circle at 100% 100%, #0000 var(--notch), #000 calc(var(--notch) + .5px)) bottom/100% 51% no-repeat; }
.ticket .stub { border-radius:0 4px 4px 0; transform-origin:0 0;
  -webkit-mask:radial-gradient(circle at 0 0, #0000 var(--notch), #000 calc(var(--notch) + .5px)) top/100% 51% no-repeat, radial-gradient(circle at 0 100%, #0000 var(--notch), #000 calc(var(--notch) + .5px)) bottom/100% 51% no-repeat;
  mask:radial-gradient(circle at 0 0, #0000 var(--notch), #000 calc(var(--notch) + .5px)) top/100% 51% no-repeat, radial-gradient(circle at 0 100%, #0000 var(--notch), #000 calc(var(--notch) + .5px)) bottom/100% 51% no-repeat; }
.ticket .stub.ripping { border-left-color:#0a7a38; }
.ticket .stub.gone { visibility:hidden; }
.ticket p { margin:0; }
.ticket .kicker, .ticket dt { font-size:11px; text-transform:uppercase; letter-spacing:.14em; color:var(--ink-faint); }
.ticket .title { margin:4px 0; font:700 30px/1.1 var(--display); overflow-wrap:anywhere; }
.ticket .line { color:var(--ink-faint); }
.ticket dl { display:flex; flex-wrap:wrap; gap:8px 24px; margin:16px 0 0; }
.ticket dl > div { min-width:0; }
.ticket dd { margin:0; font:700 22px var(--display); overflow-wrap:anywhere; }
.ticket .you dd { color:#0a7a38; } .ticket .them dd { color:#a84f00; }
.ticket .stub { flex:0 0 84px; display:flex; align-items:center; justify-content:center; border-left:2px dashed #c9b99f; }
.ticket .stub { align-items:stretch; }
.ticket .stub button { flex:1; touch-action:none; user-select:none; -webkit-user-select:none; writing-mode:vertical-rl; transform:rotate(180deg); min-height:120px; padding:0; background:none; border:0; color:var(--ink); font:700 12px "Helvetica Neue", Arial, sans-serif; text-transform:uppercase; letter-spacing:.14em; cursor:pointer; }
.ticket .stub button:hover { color:#0a7a38; cursor:grab; } .ticket .stub button:active { cursor:grabbing; }
.ticket .stub button:focus-visible { outline:2px solid #0a7a38; outline-offset:-6px; }
.ticket .stub .score { align-self:center; color:var(--ink); font-size:28px; }
.ticket .stub .score.small { font-size:13px; text-align:center; padding:0 8px; }
.ticket .stub .hint { font-size:10px; line-height:1.3; text-transform:uppercase; letter-spacing:.12em; color:var(--ink-faint); text-align:center; }
@media (max-width:640px) { .ticket .body { padding:16px; } .ticket dl { gap:16px; } .ticket .title { font-size:24px; } .ticket dd { font-size:18px; } }
.toast { position:fixed; top:16px; right:16px; z-index:10; max-width:calc(100vw - 32px); padding:10px 16px; background:#f3ead8; color:#231f1a; border-radius:4px; font-weight:700; box-shadow:0 8px 24px rgba(0,0,0,.4); opacity:0; transform:translateY(-8px); transition:opacity .2s, transform .2s; pointer-events:none; }
.toast.show { opacity:1; transform:none; }
@media (prefers-reduced-motion: reduce) { .toast { transition:none; } }
/* the blank ticket on the start screen */
#blank .ticket { margin-top:16px; }
#blank .title, #blank dd { color:var(--ink-faint); }
#blank .stub .hint { align-self:center; writing-mode:vertical-rl; transform:rotate(180deg); }
/* the match ticket picture; the slice sits over its right end (760,60 260x420 of 1080x540) */
.keepsake { margin:40px 0 0; }
.print { position:relative; background:#000; border:1px solid var(--rule); border-radius:4px; }
.print img { display:block; width:100%; height:auto; clip-path:inset(0 29.63% 0 0); -webkit-touch-callout:default; }
.slice { position:absolute; left:70.37%; top:11.111%; width:24.074%; height:77.778%; background-size:415.385% 128.571%; background-position:92.683% 50%; transform-origin:0 0; }
.slice.gone { visibility:hidden; }
.slice button { display:block; width:100%; height:100%; padding:0; background:none; border:0; cursor:grab; touch-action:none; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
.slice button:focus-visible { outline:2px solid #0a7a38; outline-offset:-6px; }
.keepsake figcaption { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; column-gap:16px; font-size:13px; }
.keepsake .link { display:inline-flex; align-items:center; }
.game-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:40px 0 16px; padding-bottom:8px; border-bottom:1px solid var(--rule); }
.game-head h2 { margin:0; border:0; padding:0; min-width:0; overflow-wrap:anywhere; }
.skip { flex:none; border-radius:22px; }
