/* Unwrap or Steal: the app's layout. Palette, the display face and the sticker look come from art.css.
   Phones first (320 px up), then tablets and desktop; the TV view at the end. */
/* Figtree (OFL 1.1, the Figtree Project Authors), Latin subset, variable weight. */
@font-face { font-family: Figtree; src: url(/fonts/figtree.woff2) format("woff2"); font-weight: 300 900; font-display: swap; }
:root { --body: Figtree, system-ui, -apple-system, "Segoe UI", sans-serif; --line: 3px; --r: 16px; --shadow: 4px 4px 0 var(--ink); --bar: 0px; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 17px/1.5 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden;
  background-image: radial-gradient(rgba(29, 27, 34, .06) 1.1px, transparent 1.5px); background-size: 9px 9px; padding-bottom: calc(var(--bar) + env(safe-area-inset-bottom)); }
#app { max-width: 1120px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left)) 32px max(16px, env(safe-area-inset-right)); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.05; margin: 0 0 .4em; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(34px, 6vw + 14px, 64px); }
h2 { font-size: clamp(21px, 1.2vw + 17px, 28px); }
p { margin: 0 0 12px; text-wrap: pretty; }
a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--tomato); }
:focus-visible { outline: 3px solid var(--sky-d); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 10px; }
.skip:focus { left: 8px; }
.vh { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip-path: inset(50%); }
.muted { color: #5c5763; } .small { font-size: 14px; } .center { text-align: center; } .mono { font-family: ui-monospace, Menlo, monospace; }
.lede { font-size: clamp(17px, .6vw + 15px, 21px); }
.eyebrow { font: 600 13px/1.2 var(--display); text-transform: uppercase; letter-spacing: .12em; color: var(--tomato-d); margin-bottom: 6px; }
.meta { font-weight: 600; }
.err { color: var(--tomato-d); font-weight: 600; min-height: 0; } .err:empty { display: none; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.stack { display: grid; gap: 10px; }
.page { padding: 40px 0; }

/* ---------- buttons, chips, fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px; border: var(--line) solid var(--ink); border-radius: 14px;
  background: var(--tomato); color: var(--paper); font: 600 17px/1.1 var(--display); text-decoration: none; cursor: pointer; box-shadow: var(--shadow);
  transition: transform .12s cubic-bezier(.3, 1.4, .5, 1), box-shadow .12s ease-out; -webkit-tap-highlight-color: transparent; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: var(--paper); color: var(--ink); }
.btn.small { min-height: 44px; padding: 8px 14px; font-size: 15px; box-shadow: 3px 3px 0 var(--ink); }
.btn.big { min-height: 60px; padding: 14px 26px; font-size: 21px; width: 100%; }
.btn.steal { background: var(--ink); color: var(--butter); }
.btn .icon { width: 20px; height: 20px; }
.link { background: none; border: 0; padding: 6px 2px; min-height: 32px; font: inherit; color: var(--ink); text-decoration: underline; text-decoration-color: var(--tomato); text-underline-offset: 3px; cursor: pointer; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--paper);
  color: var(--ink); font: 600 15px/1 var(--display); text-decoration: none; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--butter); box-shadow: 2px 2px 0 var(--ink); }
.chip.big { min-height: 52px; font-size: 17px; }
.chip .icon { width: 18px; height: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
input, textarea, select { width: 100%; min-height: 48px; padding: 10px 14px; border: var(--line) solid var(--ink); border-radius: 12px; background: var(--paper);
  color: var(--ink); font: 17px/1.3 var(--body); }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #8a8490; }
label, .label { display: block; font: 600 16px/1.3 var(--display); margin-bottom: 6px; }
.label-sub { font-weight: 600; margin: 14px 0 6px; }
.field { margin-bottom: 18px; }
.tool { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 2.5px solid var(--ink); border-radius: 12px; background: var(--paper); color: var(--ink); cursor: pointer; padding: 0; }
.tool[aria-pressed="false"] { background: var(--paper-d); }
.iconbtn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; background: none; color: var(--ink); cursor: pointer; margin-left: auto; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { min-height: 44px; min-width: 52px; padding: 8px 12px; border: 2.5px solid var(--ink); border-radius: 12px; background: var(--paper); font: 600 16px/1 var(--display); color: var(--ink); cursor: pointer; }
.seg button[aria-checked="true"] { background: var(--butter); box-shadow: 2px 2px 0 var(--ink); }
.seg input { width: 110px; min-height: 44px; }
.card { background: var(--paper); border: var(--line) solid var(--ink); border-radius: 20px; padding: 18px; box-shadow: 0 0 0 5px var(--paper), 6px 7px 0 5px rgba(29, 27, 34, .14); margin: 0 0 22px; }
.card h2 { margin-bottom: 8px; }

/* ---------- header, footer, toast ---------- */
.topbar { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: max(8px, env(safe-area-inset-top)) 0 8px; }
#app > .lights + .topbar { padding-top: 44px; }                 /* the Party Pass lights hang above the header */
.brand { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; font: 700 20px/1 var(--display); white-space: nowrap; }
.brand .mark { width: 40px; height: 40px; display: block; }
.toplinks { display: none; gap: 18px; margin-left: 12px; }
.toplinks a { font: 600 16px/1 var(--display); text-decoration: none; padding: 12px 2px; }
.toplinks a:hover { text-decoration: underline; text-decoration-color: var(--tomato); }
.tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
@media (max-width: 400px) { .brand .word { font-size: 17px; } .tools .btn.small { padding: 8px 10px; font-size: 14px; } }
@media (max-width: 345px) { .brand .word { display: none; } }
@media (min-width: 820px) { .toplinks { display: flex; } }
.foot { max-width: 1120px; margin: 0 auto; padding: 28px 16px calc(28px + var(--bar)); border-top: 3px solid var(--ink); font-size: 15px; }
.foot .sisters ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; }
body.on-tv .foot, body.on-tv .about, body.in-party .about { display: none; }
body:not(.at-home) .about { display: none; }
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--bar) + env(safe-area-inset-bottom)); transform: translate(-50%, 30px); z-index: 110; max-width: min(92vw, 460px);
  background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s cubic-bezier(.3, 1.4, .5, 1); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
body.offline::after { content: "Reconnecting…"; position: fixed; top: max(8px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 120;
  background: var(--butter); border: 2.5px solid var(--ink); border-radius: 999px; padding: 6px 14px; font: 600 14px/1 var(--display); }

/* ---------- sheets ---------- */
.sheet { position: fixed; inset: 0; z-index: 100; display: grid; align-items: end; }
.sheet-veil { position: absolute; inset: 0; background: rgba(29, 27, 34, .45); opacity: 0; transition: opacity .2s; }
.sheet-card { position: relative; max-height: 92vh; overflow: auto; background: var(--paper); border: var(--line) solid var(--ink); border-bottom: 0; border-radius: 24px 24px 0 0;
  padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); transform: translateY(40px); opacity: 0; transition: transform .28s cubic-bezier(.2, .9, .3, 1.1), opacity .2s; }
.sheet.in .sheet-veil { opacity: 1; } .sheet.in .sheet-card { transform: none; opacity: 1; }
.sheet-close { position: absolute; right: 10px; top: 10px; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; color: var(--ink); }
@media (min-width: 640px) { .sheet { align-items: center; justify-items: center; } .sheet-card { width: min(560px, 92vw); border-radius: 24px; border-bottom: var(--line) solid var(--ink); } }
.qr { display: block; width: min(280px, 70vw); height: auto; margin: 12px auto; border: 3px solid var(--ink); border-radius: 12px; }
.qr.big { width: min(340px, 80vw); }

/* ---------- home ---------- */
.hero { display: grid; gap: 18px; padding: 8px 0 20px; }
.hero h1 { font-size: clamp(42px, 9vw + 8px, 92px); line-height: .95; margin-bottom: 14px; }
.hl { color: var(--tomato); text-shadow: .045em .04em 0 var(--ink); }
.cta { display: grid; gap: 8px; max-width: 420px; }
.cta .btn { width: 100%; }
.back-to { margin-top: 12px; font-weight: 600; }
.hero-demo { display: grid; justify-items: center; gap: 8px; }
.try { font: 600 17px/1.3 var(--display); text-align: center; min-height: 2.6em; margin: 0; }
.demo-stage { width: min(100%, 360px); aspect-ratio: 200 / 228; }
.demo-actions { min-height: 60px; display: flex; justify-content: center; }
@media (min-width: 860px) { .hero { grid-template-columns: 1.1fr .9fr; align-items: center; padding: 28px 0 40px; } }
.beats { list-style: none; padding: 0; margin: 10px 0 34px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.beats li { display: grid; justify-items: center; text-align: center; gap: 2px; background: var(--paper); border: var(--line) solid var(--ink); border-radius: 20px; padding: 12px 10px 14px;
  box-shadow: 0 0 0 5px var(--paper), 5px 6px 0 5px rgba(29, 27, 34, .14); }
.beats b { font: 700 18px/1.15 var(--display); } .beats span:last-child { font-size: 14px; color: #5c5763; }
.beat-art { width: 96px; }
@media (min-width: 760px) { .beats { grid-template-columns: repeat(4, 1fr); } }
.photo-card { width: min(100%, 520px); background: var(--paper); border: var(--line) solid var(--ink); border-radius: 18px; padding: 10px 10px 12px; text-align: center;
  box-shadow: 0 0 0 6px var(--paper), 8px 10px 0 6px rgba(29, 27, 34, .2); }
.photo-card img { display: block; width: 100%; max-height: 52vh; object-fit: contain; border-radius: 10px; background: var(--paper-d); }
.photo-card .photo-art { width: 66%; margin: 0 auto; }
.photo-card .what { font: 700 clamp(20px, 2.4vw + 12px, 34px)/1.1 var(--display); margin: 10px 0 2px; }
.photo-card .teaser, .photo-card .by { margin: 0; color: #5c5763; font-weight: 600; }
.demo-card .photo-art { width: 46%; }
.about { max-width: 760px; margin: 0 auto; padding: 10px 16px 30px; }
.steps { padding-left: 1.4em; } .steps li { margin-bottom: 10px; } .steps li::marker { font: 700 1.1em var(--display); color: var(--tomato); }
.faq details { border-top: 2.5px solid var(--ink); padding: 4px 0; }
.faq summary { font: 600 18px/1.3 var(--display); cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.notelist { list-style: none; padding: 0; display: grid; gap: 14px; }
.notelist li { background: var(--paper); border: 2.5px solid var(--ink); border-radius: 16px; padding: 14px; }
.notelist p { font-size: 18px; margin-bottom: 4px; }
.more { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 26px; }
.more a { font-weight: 600; }

/* ---------- make a party ---------- */
.make-form { max-width: 640px; margin: 0 auto; padding-bottom: 20px; }
.row2 { display: grid; gap: 0 16px; } @media (min-width: 600px) { .row2 { grid-template-columns: 1fr 1fr; } }
.seg.wrap { align-items: center; }
.modes { display: grid; gap: 10px; } @media (min-width: 520px) { .modes { grid-template-columns: 1fr 1fr; } }
.modes button { display: grid; justify-items: start; gap: 2px; text-align: left; min-height: 88px; padding: 12px 14px; border: var(--line) solid var(--ink); border-radius: 16px; background: var(--paper); color: var(--ink); cursor: pointer; font: inherit; }
.modes button b { font: 700 18px/1.15 var(--display); }
.modes button[aria-checked="true"] { background: var(--mint-l); box-shadow: 4px 4px 0 var(--ink); }
.mode-art .icon { width: 30px; height: 30px; }
.rules { display: grid; gap: 12px; border: 2.5px dashed var(--ink); border-radius: 16px; padding: 14px; }
.rules.classic p { margin: 0; }
.rule-name { display: block; font: 600 16px/1.3 var(--display); margin-bottom: 6px; }
.toggle { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font: inherit; margin: 0; min-height: 44px; }
.toggle input { flex: none; width: 26px; height: 26px; min-height: 0; margin: 2px 0 0; accent-color: var(--tomato); }
.toggle-text { display: grid; gap: 2px; font: 16px/1.35 var(--body); } .toggle-text b { font: 600 16px/1.3 var(--display); }
.tag-pass { display: inline-block; vertical-align: middle; background: var(--butter); border: 2px solid var(--ink); border-radius: 999px; padding: 1px 8px; font: 600 12px/1.5 var(--display); white-space: nowrap; }
.rules-note { font-size: 14px; margin: 0; }
.office-pick { display: flex; gap: 12px; align-items: flex-start; border: var(--line) solid var(--ink); border-radius: 16px; padding: 14px; background: var(--sky-l); font: 16px/1.4 var(--body); margin-bottom: 18px; cursor: pointer; }
.office-pick input { flex: none; width: 26px; height: 26px; min-height: 0; accent-color: var(--ink); }
.paynote { font-size: 14px; color: #5c5763; text-align: center; margin: 10px 0 0; }

/* ---------- join, gift ---------- */
.invite-card { max-width: 560px; margin: 10px auto 20px; padding: 22px 18px; text-align: center; border-radius: 26px; display: block; }
.invite-art { display: block; width: 120px; margin: -8px auto 4px; }
.invite-card .stack { text-align: left; margin-top: 16px; }
.team-name { font: 700 20px/1.2 var(--display); color: var(--sky-d); }
.who-line { color: #5c5763; }
.offer { text-align: left; display: grid; gap: 8px; }
.rules-peek { max-width: 560px; margin: 0 auto; text-align: center; color: #5c5763; }
.gift-form { max-width: 980px; margin: 0 auto; display: grid; gap: 0 28px; }
.gift-form > * { min-width: 0; }
.photo-pick { margin-bottom: 18px; }
.photo-frame { aspect-ratio: 4 / 3; border: var(--line) solid var(--ink); border-radius: 20px; overflow: hidden; background: var(--paper-d); display: grid; place-items: center; margin-bottom: 12px; }
.photo-frame img { width: 100%; height: 100%; object-fit: contain; display: block; background: var(--ink); }
.photo-empty, .surprise-art { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 16px; }
.photo-empty .icon { width: 44px; height: 44px; } .photo-empty b, .surprise-art b { font: 700 20px/1.2 var(--display); }
.surprise-art svg { width: 110px; }
.photo-actions { display: grid; gap: 10px; } .photo-actions .btn { width: 100%; } .photo-actions .chip { justify-self: center; }
@media (min-width: 520px) { .photo-actions { grid-template-columns: 1fr 1fr; } .photo-actions .chip { grid-column: 1 / -1; } }
.shapes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.shapes button, .papers button { display: grid; justify-items: center; align-content: start; gap: 2px; padding: 6px 2px 8px; min-height: 44px; border: 2.5px solid var(--ink); border-radius: 14px;
  background: var(--paper); font: 600 12px/1.15 var(--display); color: var(--ink); cursor: pointer; text-align: center; }
.shapes button[aria-checked="true"], .papers button[aria-checked="true"] { background: var(--butter-l); box-shadow: 3px 3px 0 var(--ink); }
.mini { display: block; width: 100%; max-width: 64px; }
.mini.big { max-width: 92px; flex: none; }
.papers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.papers.show { grid-template-columns: repeat(3, 1fr); }
.papers .price { font-size: 12px; background: var(--butter); border: 1.5px solid var(--ink); border-radius: 999px; padding: 0 6px; }
.preview { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 14px; padding: 12px 16px; margin: 4px 0 18px; border-radius: 20px; }
.preview-gift { width: 96px; } .preview-tag { font: 600 17px/1.3 var(--display); margin: 0; }
@media (min-width: 860px) {
  .gift-form { grid-template-columns: 1fr 1fr; align-items: start; }
  .gift-form > h1, .gift-form > .lede { grid-column: 1 / -1; }
  .gift-form .photo-pick { grid-column: 1; grid-row: 3 / span 4; }
  .preview { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .preview-gift { width: 180px; }
}

/* ---------- lobby ---------- */
.lobby-head { padding: 6px 0 10px; } .lobby-head h1 { margin-bottom: 4px; }
.lobby { display: grid; gap: 0 22px; }
@media (min-width: 860px) { .lobby { grid-template-columns: 1fr 1fr; align-items: start; } .lobby .chatcard { grid-column: 1 / -1; } }
.mine-row { display: flex; gap: 14px; align-items: center; }
.finish { margin-top: 12px; border-top: 2.5px dashed var(--ink); padding-top: 12px; }
.pilecount { display: flex; gap: 14px; align-items: center; } .pile-art { width: 110px; flex: none; }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.people li { display: flex; align-items: center; gap: 8px; min-height: 44px; border-bottom: 1.5px dashed rgba(29, 27, 34, .25); flex-wrap: wrap; }
.people .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--paper-d); border: 2px solid var(--ink); flex: none; }
.people li.on .dot { background: var(--mint); }
.hosttag { font: 600 12px/1 var(--display); background: var(--butter); border: 1.5px solid var(--ink); border-radius: 999px; padding: 3px 7px; }
.gstate { margin-left: auto; font-size: 14px; color: #5c5763; display: inline-flex; align-items: center; gap: 4px; }
.gstate.ok { color: var(--mint-d); font-weight: 600; } .gstate .icon { width: 16px; height: 16px; }
.share { display: grid; gap: 10px; } .share .btn { width: 100%; }
.share-apps { display: flex; flex-wrap: wrap; gap: 8px; }
.startbar { position: sticky; bottom: 0; z-index: 30; background: var(--paper); border-top: var(--line) solid var(--ink); margin: 0 -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); text-align: center; }
.startbar p { margin: 6px 0 0; } .waiting { margin: 0; }
.chatlog { list-style: none; margin: 0 0 10px; padding: 0; max-height: 260px; overflow: auto; display: grid; gap: 4px; font-size: 15px; }
.chatlog li { padding: 4px 0; border-bottom: 1px dashed rgba(29, 27, 34, .2); }
.chatlog .c-sys { color: #5c5763; font-style: italic; } .chatlog .c-thanks { color: var(--tomato-d); font-weight: 600; }
.say { display: flex; gap: 8px; } .say input { flex: 1; }

/* ---------- the draw ---------- */
.drawing { text-align: center; max-width: 720px; margin: 0 auto; }
.countdown { font: 700 20px/1 var(--display); color: var(--tomato-d); min-height: 1em; }
.hatwrap { position: relative; width: min(300px, 74vw); margin: 70px auto 6px; }
.hat-btn { display: block; width: 100%; border: 0; background: none; padding: 0; cursor: pointer; min-height: 44px; }
.hat-btn:disabled { cursor: default; }
.hat-btn:not(:disabled):hover .hat-svg { transform: rotate(-3deg); }
.slots { list-style: none; padding: 0; margin: 18px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; text-align: left; }
.slots li { display: flex; gap: 8px; align-items: center; min-height: 44px; padding: 6px 10px; border: 2.5px dashed rgba(29, 27, 34, .4); border-radius: 12px; font-weight: 600; overflow: hidden; }
.slots li b { font: 700 20px/1 var(--display); min-width: 1.4em; } .slots li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slots li.in { border-style: solid; border-color: var(--ink); background: var(--paper); animation: slot-in .4s cubic-bezier(.3, 1.6, .5, 1); }
.slots li.me { background: var(--butter); }
@keyframes slot-in { from { transform: scale(.85); } }

/* ---------- the board ---------- */
.screen-board { --bar: 84px; }
body:has(.screen-board) { --bar: 84px; }
.status { position: sticky; top: 0; z-index: 20; background: var(--paper); margin: 0 -16px; padding: 10px 16px; border-bottom: var(--line) solid var(--ink); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.status .turn { margin: 0; font: 500 18px/1.25 var(--display); flex: 1 1 200px; } .status b { font-weight: 700; }
.turnno { display: block; font: 600 13px/1.2 var(--body); color: #5c5763; text-transform: uppercase; letter-spacing: .08em; }
.timer { font: 700 22px/1 var(--display); background: var(--butter); border: 2.5px solid var(--ink); border-radius: 999px; padding: 6px 12px; }
.timer.low { background: var(--tomato); color: var(--paper); }
.tag-watch, .tag-acting { font: 600 13px/1 var(--display); background: var(--sky-l); border: 2px solid var(--ink); border-radius: 999px; padding: 5px 10px; }
.order-strip { list-style: none; margin: 12px -16px 4px; padding: 4px 16px 10px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.order-strip li { flex: none; display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 12px 4px 4px; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--paper); font-weight: 600; font-size: 15px; white-space: nowrap; }
.order-strip li b { display: grid; place-items: center; min-width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--paper); font: 700 15px/1 var(--display); }
.order-strip li.now { background: var(--butter); box-shadow: 3px 3px 0 var(--ink); } .order-strip li.done { opacity: .6; } .order-strip li.gone { text-decoration: line-through; opacity: .45; }
.order-strip li.me b { background: var(--tomato); }
.you { display: flex; gap: 12px; align-items: center; background: var(--butter-l); border: var(--line) solid var(--ink); border-radius: 20px; padding: 12px 14px; margin: 8px 0 14px; box-shadow: var(--shadow); }
.you.robbed { background: var(--tomato-l); }
.you h2 { margin-bottom: 4px; } .you p { margin: 0 0 8px; } .you-art { width: 86px; flex: none; }
.pile-sec h2, .opened-sec h2 { margin: 14px 0 10px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 10px; }
.tile { position: relative; display: block; padding: 4px; border: 0; border-radius: 14px; background: none; cursor: pointer; min-height: 44px; -webkit-tap-highlight-color: transparent; }
.tile:focus-visible { outline: 3px solid var(--sky-d); }
.tiles.live .tile { animation: tile-ready 2.4s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 80ms); }
.tiles.live .tile:hover { transform: translateY(-4px) rotate(-2deg); }
@keyframes tile-ready { 0%, 100% { transform: none; } 50% { transform: translateY(-3px); } }
.tile-mine { position: absolute; left: 50%; bottom: -2px; transform: translateX(-50%); font: 600 11px/1 var(--display); background: var(--ink); color: var(--paper); border-radius: 999px; padding: 3px 7px; }
.tile-tags { position: absolute; left: 0; right: 0; top: -4px; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; pointer-events: none; }
.tile-tags i { font: 600 10px/1 var(--display); font-style: normal; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 6px; padding: 2px 4px; }
.tile-tags.big { position: static; justify-content: flex-start; } .tile-tags.big i { font-size: 14px; padding: 4px 8px; }
.tiles.sack { position: relative; }
.tiles.sack .tile { filter: saturate(0) brightness(.35); pointer-events: none; }
.tiles.sack::after { content: "In the sack"; position: absolute; inset: 0; display: grid; place-items: center; font: 700 26px/1 var(--display); color: var(--paper); text-shadow: 2px 2px 0 var(--ink); pointer-events: none; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; align-content: start; align-items: start; }
.ocard { display: grid; grid-template-rows: auto 1fr auto; background: var(--paper); border: var(--line) solid var(--ink); border-radius: 18px; overflow: hidden; box-shadow: 4px 5px 0 rgba(29, 27, 34, .18); }
.ocard.mine { background: var(--mint-l); } .ocard.paid { border-color: var(--gold-d); }
.ophoto { aspect-ratio: 1; background: var(--paper-d); display: grid; place-items: center; border-bottom: var(--line) solid var(--ink); }
.ophoto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ophoto-art { display: block; width: 76%; }
.obody { padding: 8px 10px 4px; min-width: 0; }
.owhat { font: 700 16px/1.15 var(--display); margin: 0 0 2px; overflow-wrap: anywhere; } .oholder, .ofrom { font-size: 14px; margin: 0; }
.ofrom { font: 700 15px/1.2 var(--display); color: var(--tomato-d); }
.opips { min-height: 22px; display: flex; align-items: center; margin-top: 4px; }
.pips { display: flex; gap: 4px; } .pips i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); }
.pips i.on { background: var(--tomato); }
.frozen-tag { font: 700 12px/1 var(--display); background: var(--sky); border: 2px solid var(--ink); border-radius: 999px; padding: 3px 8px; }
.pips-text { font-size: 13px; font-weight: 600; }
.oact { padding: 0 10px 10px; display: flex; } .oact .btn { width: 100%; }
.blocked { font-size: 13px; font-weight: 600; color: #5c5763; }
.chatcard { margin-top: 26px; }
@media (min-width: 900px) {                                           /* wide screens: the pile and the opened gifts side by side */
  .screen-board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); column-gap: 32px; align-items: start; }
  .screen-board > :not(.pile-sec):not(.opened-sec) { grid-column: 1 / -1; }
  .screen-board .tiles { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .screen-board .cards { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
.reactbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; justify-content: center; gap: 4px; padding: 8px max(8px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom));
  background: var(--paper); border-top: var(--line) solid var(--ink); }
.reactbar p { margin: 10px 0; }
.react { width: 52px; height: 58px; padding: 4px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; -webkit-tap-highlight-color: transparent; }
.react .react-svg { width: 44px; height: 44px; }
.react.say { width: 52px; } .react.say .icon { width: 30px; height: 30px; }
@media (max-width: 360px) { .react { width: 42px; } .react .react-svg { width: 38px; height: 38px; } }
.peek { text-align: center; } .peek-gift { width: min(220px, 56vw); margin: 0 auto 8px; }
.peek.take .ocard { max-width: 240px; margin: 0 auto 12px; text-align: left; }
.peek .row { justify-content: center; }
.hostctl { display: grid; gap: 10px; } .hostctl .btn { width: 100%; justify-content: flex-start; }
.hostctl details summary { min-height: 44px; display: flex; align-items: center; gap: 8px; font: 600 17px/1.2 var(--display); cursor: pointer; }
.gavel-big { width: 72px; display: block; margin: 0 auto; }
.gavel-btn { padding: 4px; } .gavel-btn svg { width: 32px; height: 32px; }
.themes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

/* The unwrap layer: the gift big, the finger tears it. */
.ulayer { position: fixed; inset: 0; z-index: 50; display: grid; grid-template-rows: auto 1fr auto; background: rgba(251, 246, 236, .97);
  padding: max(10px, env(safe-area-inset-top)) 16px calc(12px + var(--bar) + env(safe-area-inset-bottom)); animation: layer-in .26s cubic-bezier(.2, .9, .3, 1.1); }
.ulayer.out { opacity: 0; transition: opacity .2s; }
@keyframes layer-in { from { opacity: 0; transform: scale(.96); } }
.ulayer-top { display: flex; align-items: center; gap: 10px; }
.ulayer-title { flex: 1; margin: 0; font: 600 18px/1.25 var(--display); }
.ulayer-stage { position: relative; min-height: 0; width: 100%; max-width: 560px; margin: 0 auto; }
.ulayer-bottom { text-align: center; display: grid; justify-items: center; gap: 8px; padding-top: 6px; }
.ulayer-bottom .hint { margin: 0; font-weight: 600; }
.flash { position: fixed; left: 50%; top: 42%; z-index: 80; transform: translate(-50%, -50%) scale(.6); opacity: 0; display: grid; justify-items: center; gap: 4px; text-align: center;
  padding: 16px 22px; width: min(86vw, 380px); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1), opacity .2s; pointer-events: none; }
.flash.in { transform: translate(-50%, -50%); opacity: 1; }
.flash svg { width: 110px; } .flash b { font: 700 26px/1.1 var(--display); } .flash span { font-weight: 600; }

/* ---------- the end ---------- */
.end-head { display: flex; gap: 14px; align-items: center; padding: 8px 0 14px; } .end-art { width: 120px; flex: none; }
.result { display: grid; gap: 14px; } .result-photo .ocard { max-width: 260px; }
@media (min-width: 640px) { .result { grid-template-columns: 260px 1fr; align-items: center; } }
.said { font: 600 18px/1.3 var(--display); color: var(--tomato-d); }
.receipt.paid { background: var(--butter-l); }
.charmrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; } .charmrow .mini { max-width: 54px; }
.reveal-sec h2 { margin-top: 8px; }
.awards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.award { display: grid; gap: 2px; border: var(--line) solid var(--ink); border-radius: 16px; padding: 12px 14px; background: var(--butter-l); }
.award b { font: 700 20px/1.1 var(--display); } .award i { font-style: normal; color: #5c5763; font-size: 14px; }
.a-most, .a-unlucky { background: var(--tomato-l); } .a-frozen { background: var(--sky-l); } .a-thief { background: var(--mint-l); }
.next .btn { max-width: 420px; }

/* ---------- checklist ---------- */
.checklist { max-width: 760px; margin: 0 auto; }
.checks { padding-left: 1.4em; } .checks li { margin-bottom: 22px; } .checks li::marker { font: 700 22px/1 var(--display); color: var(--tomato); }
.checks h2 { font-size: 22px; margin-bottom: 4px; }
@media print { .topbar, .foot, .row, #print, .toast { display: none !important; } body { background: none; } }

/* ---------- ceremony ---------- */
.ceremony { text-align: center; display: grid; justify-items: center; gap: 8px; }
.cer-gift { width: min(260px, 66vw); }

/* ---------- the TV view ---------- */
body.on-tv { overflow: hidden; }
body.on-tv #app { max-width: none; padding: 0; }
.tv { position: fixed; inset: 0; display: grid; grid-template-rows: auto 1fr auto; padding: 1.2vh 1.6vw; font-size: clamp(14px, 1.05vw, 22px); }
.tv-top { display: flex; align-items: center; gap: 1.2vw; padding-top: 2.6vh; }
.tv > .lights ~ .tv-top { padding-top: 46px; }
.tv-brand { display: flex; align-items: center; gap: .5vw; font: 700 1.2vw/1 var(--display); white-space: nowrap; } .tv-brand .mark { width: 2.8vw; display: block; }
.tv-top h1 { flex: 1; margin: 0; font-size: clamp(26px, 2.9vw, 64px); text-shadow: .05em .045em 0 var(--board-accent, var(--tomato)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-meta { font-weight: 600; white-space: nowrap; }
.tv-main { min-height: 0; position: relative; }
.tv-ticker { display: flex; gap: 2vw; overflow: hidden; white-space: nowrap; padding: .8vh 0; font-size: .95em; opacity: .85; }
.tv-ticker .c-sys { font-style: italic; }
.tv-tap { position: fixed; right: 2vw; bottom: 3vh; z-index: 30; font: 600 18px/1 var(--display); background: var(--butter); border: 3px solid var(--ink); border-radius: 999px; padding: 12px 18px; cursor: pointer; }
.tv-center { display: grid; place-items: center; height: 100%; }
.tv-lobby { display: grid; grid-template-columns: minmax(0, 34%) 1fr; gap: 3vw; height: 100%; align-items: center; }
.tv-join { text-align: center; padding: 2.4vh 1.6vw; color: var(--ink); }
.tv-join h2 { font-size: 2.6vw; } .tvqr { width: min(100%, 44vh); margin: 1vh auto; }
.tv-url { font: 700 1.6vw/1.2 var(--display); }
.tv-pile { display: flex; align-items: center; gap: 1.4vw; font-size: 1.4vw; } .tv-pile-art { width: 9vw; }
.tv-names { list-style: none; padding: 0; margin: 2vh 0; display: flex; flex-wrap: wrap; gap: .8vw; }
.tv-names li { background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 999px; padding: .5vw 1vw; font: 700 1.4vw/1 var(--display); display: flex; align-items: center; gap: .4vw; animation: slot-in .4s cubic-bezier(.3, 1.6, .5, 1); }
.tv-names li:not(.ok) { opacity: .6; } .host-g { width: 1.6vw; display: inline-block; }
.tv-rules { font-size: 1.1vw; margin: 0; }
.tv-draw { display: grid; grid-template-columns: 36% 1fr; gap: 3vw; align-items: center; height: 100%; }
.tv-hat { position: relative; width: 100%; max-width: 46vh; margin: 12vh auto 0; }
.tv-draw h2 { font-size: 3vw; } .tv-count { font: 700 1.8vw/1 var(--display); color: var(--board-accent); }
.tv-slots { grid-template-columns: repeat(auto-fill, minmax(11vw, 1fr)); }
.tv-slots li { background: var(--board-card); color: var(--board-card-ink); font-size: 1.1vw; min-height: 4.4vh; }
.tv-slots li b { font-size: 1.5vw; }
.tv-play { display: grid; grid-template-columns: 15% 1fr 1fr; gap: 1.4vw; height: 100%; min-height: 0; }
.tv-play > * { min-height: 0; overflow: hidden; }
.tv-play h2 { font-size: 1.5vw; margin: .6vh 0 1vh; }
.tv-order ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .5vh; font-size: .95em; }
.tv-order li { display: grid; grid-template-columns: auto 1fr; gap: 0 .6vw; align-items: center; padding: .4vh .5vw; border-radius: 10px; background: var(--board-card); color: var(--board-card-ink); border: 2px solid var(--ink); }
.tv-order li b { font: 700 1.2vw/1 var(--display); } .tv-order li span { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-order li i { grid-column: 2; font-style: normal; font-size: .85em; opacity: .75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-order li.now { background: var(--butter); color: var(--ink); transform: scale(1.04); } .tv-order li.done { opacity: .7; } .tv-order li.gone { opacity: .35; }
.tv-status { font: 600 1.7vw/1.2 var(--display); background: var(--board-card); color: var(--board-card-ink); border: 3px solid var(--ink); border-radius: 16px; padding: 1vh 1vw; }
.tv-timer { background: var(--butter); color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; padding: 0 .6vw; margin-left: .6vw; }
.tv-timer:empty { display: none; }
.tv-tiles { grid-template-columns: repeat(auto-fill, minmax(var(--tile, 120px), 1fr)); gap: .8vw; }
.tv-cards { grid-template-columns: repeat(auto-fill, minmax(var(--card, 200px), 1fr)); gap: .9vw; color: var(--ink); }
.tv-cards .owhat { font-size: clamp(12px, .95vw, 22px); } .tv-cards .oholder, .tv-cards .ofrom { font-size: clamp(11px, .85vw, 19px); }
.tv-layer { background: rgba(29, 27, 34, .9); color: var(--paper); padding: 4vh 6vw; }
.tv-layer .ulayer-title { font-size: 2.4vw; text-align: center; }
.tv-layer .ulayer-stage { max-width: 70vh; width: 100%; }
.tv-layer .photo-card { width: min(100%, 64vh); color: var(--ink); } .tv-layer .photo-card img { max-height: 58vh; }
.tv-layer .ulayer-bottom .hint { font-size: 2.2vw; }
.tv-layer .photo-card .what { font-size: 2.6vw; } .tv-layer .photo-card .by { font-size: 1.4vw; }
.tv-who { padding: 2.4vh 2vw; color: var(--ink); align-self: center; }
.tv-flash { width: auto; max-width: 70vw; padding: 2vh 3vw; } .tv-flash b { font-size: 3vw; }
.tv-end { display: grid; grid-template-columns: 1fr 18%; grid-template-rows: auto 1fr auto; gap: 1.4vh 2vw; height: 100%; min-height: 0; }
.tv-end-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 1.4vw; } .tv-end-head h2 { font-size: 2.6vw; margin: 0; } .tv-end-art { width: 6vw; }
.tv-end .reveal { overflow: hidden; min-height: 0; }
.tv-next { grid-column: 2; grid-row: 2; align-self: start; text-align: center; padding: 1.4vh 1vw; color: var(--ink); } .tv-next p { font: 700 1.3vw/1.2 var(--display); margin: 0; }
.tv-awards { grid-column: 1 / -1; grid-template-columns: repeat(6, 1fr); color: var(--ink); } .tv-awards b { font-size: 1.2vw; }
.on-tv .float-layer .floater { transform-origin: 50% 100%; } .on-tv .floater .react-svg { width: 90px; height: 90px; } .on-tv .float-line { font-size: 28px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
  .tiles.live .tile, .slots li.in, .tv-names li, .ulayer { animation: none !important; }
}
