/* Kalesh House: one scene at a time, and a house screen between scenes. One typeface (Nunito), big type, one thing to look at:
 * the 3D house behind, two characters in front, one text box at the bottom, three numbers at the top. */
:root {
  --ink: #fff8f0; --muted: #c9bcd8; --bg: #160a26; --panel: rgba(22, 11, 38, 0.94); --line: rgba(255, 255, 255, 0.14);
  --gold: #ffd166; --pink: #ff4d8d; --teal: #2dd4a7; --red: #ff5a6e; --blue: #5cc8ff; --violet: #7b3fe4; --cream: #fff3e0;
  --sat: env(safe-area-inset-top); --sab: env(safe-area-inset-bottom); --sal: env(safe-area-inset-left); --sar: env(safe-area-inset-right);
  --num: "Nunito", system-ui, sans-serif; --vh: 100vh;
}
@supports (height: 100dvh) { :root { --vh: 100dvh; } }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font-family: "Nunito", system-ui, sans-serif; -webkit-text-size-adjust: 100%; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
body { -webkit-user-select: none; user-select: none; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; border: 0; background: none; }
kbd { border: 1px solid rgba(255, 255, 255, 0.35); border-bottom-width: 2px; border-radius: 5px; padding: 0 6px; font: 800 13px Nunito; background: rgba(255, 255, 255, 0.1); }
#loading { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: var(--bg); z-index: 60; }
#loading b { font: 900 48px/1 Nunito; letter-spacing: 1px; } #loading b span { color: var(--gold); }
.lbar { width: 220px; height: 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); overflow: hidden; } .lbar u { display: block; height: 100%; width: 10%; background: var(--gold); transition: width .25s; }
#loading > span:last-child { color: var(--muted); font-size: 15px; }

/* ------------------------------------------------------------ the stage */
#play { position: fixed; inset: 0; z-index: 5; }
#play::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22, 10, 38, 0.55), rgba(22, 10, 38, 0.15) 30%, rgba(22, 10, 38, 0.2) 55%, rgba(22, 10, 38, 0.85)); pointer-events: none; }
.top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 12px; padding: max(12px, var(--sat)) max(16px, var(--sar)) 0 max(16px, var(--sal)); z-index: 3; }
.when { display: flex; flex-direction: column; line-height: 1.15; } .when b { font-size: 20px; font-weight: 900; } .when span { font-size: 15px; font-weight: 800; color: var(--gold); }
.stats { margin-left: auto; display: flex; gap: 8px; }
.stats span { padding: 7px 13px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: 16px; font-weight: 900; white-space: nowrap; }
.stats span.danger { color: var(--red); border-color: rgba(255, 90, 110, 0.6); } .stats span.risky { color: #ffb35c; } .stats span.safe { color: var(--teal); }
.stats span.bump { animation: bump .6s ease-out; } @keyframes bump { 40% { transform: scale(1.15); } }
#b-pause { width: 44px; height: 40px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-weight: 900; }
.stage { position: absolute; inset: 0; pointer-events: none; }
.por { position: absolute; bottom: 150px; height: min(68vh, 560px); transition: opacity .25s, filter .25s, transform .25s; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.5)); }
.por.left { left: max(2vw, var(--sal)); } .por.right { right: max(2vw, var(--sar)); }
.por.dim { filter: brightness(0.5) drop-shadow(0 18px 24px rgba(0, 0, 0, 0.5)); transform: scale(0.96); transform-origin: bottom center; }
.por:not([src]), .por[src=""] { display: none; }
.eye { position: absolute; right: 12vw; bottom: 30vh; width: min(26vh, 200px); filter: drop-shadow(0 0 30px rgba(255, 77, 141, 0.7)); animation: whistle 1.6s ease-in-out infinite; } .eye svg { width: 100%; height: auto; display: block; }
@keyframes whistle { 50% { transform: translateY(-4px) rotate(-2deg); } }
@keyframes blink { 92% { transform: scaleY(1); } 96% { transform: scaleY(0.1); } }

/* ------------------------------------------------------------ the text box */
.box { position: absolute; left: 50%; bottom: max(14px, var(--sab)); transform: translateX(-50%); width: min(920px, calc(100vw - 24px)); max-height: calc(var(--vh) - 90px); overflow: auto; background: var(--panel); border: 2px solid var(--line); border-radius: 22px; padding: 16px 24px 18px; z-index: 4; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); cursor: pointer; }
.who { display: inline-block; margin: -6px 0 6px; padding: 4px 14px; border-radius: 999px; background: var(--gold); color: #2a1300; font-size: 17px; font-weight: 900; }
.box.me .who { background: var(--teal); color: #032; } .box.vb .who { background: var(--pink); color: #fff; } .box.boss .who { background: #120617; color: var(--pink); border: 1px solid var(--pink); } .box.note .who, .who:empty { display: none; }
.say { margin: 4px 0 0; font-size: 22px; line-height: 1.45; font-weight: 700; min-height: 1.45em; }
.box.note .say { font-style: italic; color: var(--muted); font-weight: 700; }
.prompt { margin: 0 0 10px; font-size: 17px; font-weight: 900; color: var(--gold); } .prompt:empty { display: none; }
.opts { display: flex; flex-direction: column; gap: 8px; } .opts:empty { display: none; }
.opts button { display: grid; grid-template-columns: 34px 1fr; gap: 0 12px; align-items: center; text-align: left; padding: 11px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.07); border: 2px solid var(--line); }
.opts button i { grid-row: 1 / 3; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-style: normal; font-weight: 900; background: rgba(255, 255, 255, 0.12); }
.opts button b { font-size: 19px; font-weight: 800; line-height: 1.3; } .opts button small { font-size: 14px; color: var(--muted); font-weight: 700; }
.opts button:hover, .opts button.on { border-color: var(--gold); background: rgba(255, 209, 102, 0.12); } .opts button:hover i, .opts button.on i { background: var(--gold); color: #2a1300; }
.box.choosing { cursor: default; } .box.choosing .say { display: none; }
.more { position: absolute; right: 18px; bottom: 10px; font-size: 13px; font-weight: 800; color: var(--muted); animation: pulse 1.4s infinite; } .box.typing .more, .box.choosing .more { visibility: hidden; }
@keyframes pulse { 50% { opacity: .35; } }

/* ------------------------------------------------------------ panels: who to talk to, cards, nominations, reveals */
.panel { position: absolute; inset: 0; z-index: 6; display: flex; align-items: center; justify-content: center; padding: 70px 16px 16px; background: rgba(14, 6, 26, 0.55); overflow: auto; }
.sheet { width: min(620px, 100%); max-height: calc(var(--vh) - 90px); overflow: auto; background: var(--panel); border: 2px solid var(--line); border-radius: 24px; padding: 22px 24px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); }
.sheet.wide { width: min(1000px, 100%); } .sheet.narrow { width: min(440px, 100%); }
.kicker { font-size: 14px; font-weight: 900; color: var(--pink); letter-spacing: 1px; }
.sheet h2 { margin: 2px 0 10px; font-size: 30px; line-height: 1.1; font-weight: 900; }
.sheet p, .sheet li { font-size: 18px; line-height: 1.45; font-weight: 700; } .sheet p { margin: 8px 0; }
.sheet h4 { margin: 16px 0 4px; font-size: 15px; font-weight: 900; color: var(--gold); }
.sheet ul { margin: 4px 0; padding-left: 22px; } .sheet b.bad { color: var(--red); } .sheet .next { color: var(--gold); }
.sheet header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; } .sheet header h2 { margin: 0; } .sheet header .ghost { margin-left: auto; }
.btn, .menu button, .ghost { padding: 13px 22px; border-radius: 16px; font-size: 18px; font-weight: 900; background: rgba(255, 255, 255, 0.1); border: 2px solid var(--line); }
.btn.primary, .menu button.primary { background: var(--gold); color: #2a1300; border-color: var(--gold); }
.ghost { padding: 8px 16px; font-size: 15px; }
.go { display: flex; justify-content: flex-end; margin-top: 16px; } .go .btn { min-width: 200px; } .go .btn::after { content: '  Space'; font-size: 12px; opacity: .6; }
.faces { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; } .faces div { text-align: center; font-size: 15px; font-weight: 900; } .faces img { display: block; width: 76px; height: 100px; object-fit: contain; }
.pick-head { text-align: center; margin-bottom: 14px; } .pick-head h2 { margin: 0; font-size: 28px; font-weight: 900; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6); } .pick-head p { margin: 4px 0 0; font-size: 17px; font-weight: 800; color: var(--gold); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 260px)); gap: 14px; justify-content: center; }
.pc { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 12px 14px 16px; border-radius: 22px; background: var(--panel); border: 2px solid var(--line); transition: transform .15s, border-color .15s; }
.pc:hover, .pc.on { border-color: var(--gold); transform: translateY(-4px); }
.pc img { width: 140px; height: 180px; object-fit: contain; } .pc b { font-size: 22px; font-weight: 900; } .pc small { font-size: 14px; font-weight: 800; color: var(--muted); }
.pc .rel { margin-top: 6px; padding: 3px 12px; border-radius: 999px; font-size: 14px; font-weight: 900; background: rgba(255, 255, 255, 0.1); } .pc .rel.g { color: var(--teal); } .pc .rel.b { color: var(--red); }
.pc p { margin: 8px 0 0; font-size: 16px; line-height: 1.35; font-weight: 800; }
.pc i { position: absolute; left: 12px; top: 10px; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-style: normal; font-weight: 900; background: rgba(255, 255, 255, 0.12); }
.res { list-style: none; padding: 0 !important; display: flex; flex-direction: column; gap: 8px; } .res li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.06); }
.res li::before { content: '▲'; color: var(--teal); font-size: 14px; margin-top: 4px; } .res li.b::before { content: '▼'; color: var(--red); } .res li.n::before { content: '•'; color: var(--muted); }
.noms { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin: 10px 0; }
.noms button { display: flex; flex-direction: column; align-items: center; padding: 8px; border-radius: 16px; border: 2px solid var(--line); background: rgba(255, 255, 255, 0.05); font-weight: 900; font-size: 16px; }
.noms button img { width: 80px; height: 104px; object-fit: contain; } .noms button.on { border-color: var(--red); background: rgba(255, 90, 110, 0.18); }
.rv { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 14px 0; }
.rv div { width: 130px; text-align: center; padding: 8px; border-radius: 18px; border: 2px solid var(--line); background: rgba(255, 255, 255, 0.05); transition: all .4s; } .rv img { width: 100px; height: 130px; object-fit: contain; } .rv b { display: block; font-size: 18px; } .rv small { font-size: 14px; font-weight: 900; color: var(--muted); }
.rv .safe { border-color: var(--teal); } .rv .safe small { color: var(--teal); } .rv .out { border-color: var(--red); opacity: .6; } .rv .out small { color: var(--red); } .rv .win { border-color: var(--gold); transform: scale(1.12); } .rv .win small { color: var(--gold); }
.rv-msg { text-align: center; min-height: 2.8em; }

/* ------------------------------------------------------------ menus */
#ui { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
.screen { position: absolute; inset: 0; display: none; pointer-events: auto; padding: 16px; background: rgba(14, 6, 26, 0.6); }
.screen.on { display: flex; align-items: center; justify-content: center; gap: 24px; }
#title { background: linear-gradient(90deg, rgba(14, 6, 26, 0.92), rgba(14, 6, 26, 0.4)); justify-content: space-between; padding: 24px max(32px, var(--sar)) 24px max(32px, var(--sal)); }
.t-main { display: flex; flex-direction: column; gap: 18px; max-width: 560px; }
.t-main a[data-bumshi-back] { color: var(--muted); font-weight: 800; }
.logo-wrap { display: flex; align-items: center; gap: 14px; } .logo-wrap .cooker { width: 96px; flex: none; filter: drop-shadow(0 0 20px rgba(255, 77, 141, 0.5)); }
.logo { margin: 0; font-size: 84px; line-height: .95; font-weight: 900; letter-spacing: -1px; } .logo b { color: var(--gold); display: block; }
.lead { margin: 0; font-size: 21px; line-height: 1.45; font-weight: 700; }
.menu { display: flex; flex-direction: column; gap: 10px; align-items: stretch; max-width: 320px; }
.note { margin: 0; font-size: 13px; color: var(--muted); } .note a { color: inherit; }
.t-side { width: 300px; display: flex; flex-direction: column; gap: 10px; }
.cast { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.cast button { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 8px 12px; border-radius: 18px; border: 2px solid var(--line); background: rgba(255, 255, 255, 0.05); }
.cast button:hover { border-color: var(--gold); } .cast img { width: 96px; height: 124px; object-fit: contain; } .cast b { font-size: 18px; font-weight: 900; } .cast small { font-size: 13px; font-weight: 800; color: var(--gold); } .cast p { margin: 4px 0 0; font-size: 13px; line-height: 1.3; color: var(--muted); font-weight: 700; }
.how { padding-left: 22px; } .how li { margin: 8px 0; } .keys { color: var(--muted); }
.end p.big { font-size: 40px; font-weight: 900; color: var(--gold); margin: 4px 0; }

/* ------------------------------------------------------------ tasks (tasks.js) */
#task { position: fixed; inset: 0; z-index: 30; background: #000; }
#task canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.t-hud { position: absolute; left: 0; right: 0; top: max(8px, var(--sat)); display: flex; justify-content: center; pointer-events: none; }
.t-score { display: flex; gap: 14px; align-items: center; padding: 6px 16px; border-radius: 999px; background: rgba(20, 8, 36, 0.85); font: 900 15px var(--num); }
.t-score .a b { color: var(--blue); font-size: 22px; } .t-score .b b { color: var(--pink); font-size: 22px; } .t-score .tm { color: var(--gold); font-size: 18px; }
.t-ctrl { position: absolute; left: 0; right: 0; bottom: max(12px, var(--sab)); display: flex; justify-content: center; gap: 10px; padding: 0 max(12px, var(--sar)) 0 max(12px, var(--sal)); }
.t-snatch { position: absolute; right: max(18px, var(--sar)); bottom: 6px; width: 96px; height: 96px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #ff7aa8, var(--pink)); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), inset 0 -4px 0 rgba(0, 0, 0, 0.25); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 26px; }
.t-snatch b { font: 900 11px var(--num); letter-spacing: 1px; }
.t-lr { width: 110px; height: 80px; border-radius: 20px; background: rgba(255, 255, 255, 0.18); font-size: 34px; border: 2px solid rgba(255, 255, 255, 0.4); }
.t-item { padding: 10px 16px; border-radius: 999px; background: rgba(20, 8, 36, 0.85); font-weight: 900; border: 2px solid transparent; }
.t-item.on { border-color: var(--gold); }
.t-big { min-width: 180px; height: 84px; border-radius: 24px; background: var(--pink); font: 900 30px var(--num); letter-spacing: 3px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5); }
.t-big.small { height: 56px; font-size: 18px; min-width: 160px; }
.t-cards { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.t-card-btn { display: flex; flex-direction: column; padding: 10px 14px; border-radius: 16px; background: var(--cream); color: #2b1300; min-width: 120px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); }
.t-card-btn b { font: 900 16px var(--num); } .t-card-btn small { font-size: 11px; font-weight: 700; }
.t-card { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100vw - 24px)); max-height: calc(var(--vh) - 24px); overflow: auto; padding: 18px 20px; border-radius: 22px; background: var(--panel); border: 1px solid var(--gold); text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7); }
.t-card small { font: 900 11px var(--num); letter-spacing: 3px; color: var(--pink); text-transform: uppercase; }
.t-card h2 { margin: 4px 0 8px; font: 900 28px/1.1 var(--num); color: var(--gold); }
.t-card p { margin: 6px 0; font-size: 14px; line-height: 1.4; } .t-card p.how { color: var(--muted); } .t-card p.role { font-weight: 800; }
.t-card p.big { font: 900 26px var(--num); } .t-card p.warn { color: #ffadad; font-weight: 800; }
.t-rank { text-align: left; margin: 8px auto; max-width: 260px; padding-left: 20px; } .t-rank li { margin: 2px 0; } .t-rank li b { float: right; color: var(--gold); } .t-rank li.me { color: var(--gold); }
#rotate { position: fixed; inset: 0; z-index: 80; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: #12061f; text-align: center; padding: 20px; }
#rotate b { font-size: 60px; animation: rot 1.6s ease-in-out infinite; } #rotate p { font-weight: 800; font-size: 18px; }
@keyframes rot { 50% { transform: rotate(90deg); } }
@media (orientation: portrait) and (pointer: coarse) { #rotate { display: flex; } }

/* ------------------------------------------------------------ phones held sideways */
@media (max-height: 500px) {
  .top { padding-top: max(8px, var(--sat)); } .when b { font-size: 16px; } .when span { font-size: 13px; }
  .stats span { padding: 5px 10px; font-size: 14px; } #b-pause { width: 38px; height: 34px; }
  .por { bottom: 96px; height: min(66vh, 330px); }
  .box { padding: 16px 16px 12px; border-radius: 16px; max-height: calc(var(--vh) - 56px); } .who { font-size: 14px; padding: 2px 11px; margin: -4px 0 4px; }
  .say { font-size: 17px; } .prompt { font-size: 14px; margin-bottom: 6px; }
  .opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .opts button { padding: 7px 10px; grid-template-columns: 24px 1fr; gap: 0 8px; } .opts button i { width: 22px; height: 22px; font-size: 13px; } .opts button b { font-size: 15px; } .opts button small { font-size: 12px; }
  .panel { padding: 50px 10px 8px; } .sheet { padding: 14px 16px; border-radius: 18px; max-height: calc(var(--vh) - 56px); } .sheet h2 { font-size: 22px; } .sheet p, .sheet li { font-size: 15px; }
  .pick-head h2 { font-size: 20px; } .pick-head p { font-size: 14px; } .pick-head { margin-bottom: 8px; }
  .cards { gap: 8px; } .pc { padding: 6px 8px 10px; } .pc img { width: 70px; height: 90px; } .pc b { font-size: 17px; } .pc p { font-size: 13px; } .pc .rel { font-size: 12px; }
  .faces img { width: 50px; height: 66px; } .rv div { width: 96px; } .rv img { width: 62px; height: 80px; }
  .logo { font-size: 52px; } .lead { font-size: 16px; } .menu button { padding: 10px 16px; font-size: 16px; } .t-main { gap: 10px; }
  .cast img { width: 66px; height: 86px; } .cast p { display: none; }
  .go { margin-top: 10px; } .btn { padding: 10px 18px; font-size: 16px; }
  .t-card h2 { font-size: 22px; } .t-card p { font-size: 12.5px; } .t-snatch { width: 76px; height: 76px; } .t-lr { width: 90px; height: 64px; } .t-big { height: 64px; font-size: 22px; }
}
@media (max-width: 760px) { .t-side { display: none; } .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } .stats span { padding: 4px 8px; } }
@media (max-height: 340px) {
  .opts button small { display: none; }
  /* faces stay on screen: the speakers stand in the two bottom corners and the text box narrows between them */
  :root { --ph: min(calc(var(--vh) - 50px), 240px); --pw: calc(var(--ph) * 0.62); }
  .por { bottom: max(4px, var(--sab)); height: var(--ph); width: var(--pw); object-fit: cover; object-position: 50% 0; }
  .por.left { left: max(4px, var(--sal)); } .por.right { right: max(4px, var(--sar)); }
  body:has(.por[src^="data"]:not(.hidden)) .box { width: calc(100vw - 2 * var(--pw) - 20px); }
  #title { overflow: auto; align-items: flex-start; padding-top: 10px; } .t-side { display: none; } .logo { font-size: 40px; } .lead { font-size: 14px; } .menu { flex-direction: row; flex-wrap: wrap; max-width: none; } .t-main { gap: 8px; }
  .pc img { width: 46px; height: 58px; } .pc p { font-size: 12px; margin-top: 4px; } .pc .rel { margin-top: 2px; } .pc i { width: 22px; height: 22px; font-size: 12px; } .pick-head h2 { font-size: 17px; } .pick-head p { display: none; } .panel { padding-top: 44px; }
}

/* ---------------------------------------------------------------- the top bar, the house button */
#b-house { height: 40px; padding: 0 14px; border-radius: 12px; background: var(--violet); border: 1px solid var(--line); font-weight: 900; font-size: 15px; white-space: nowrap; }
.when span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.por.hidden { display: none; }
img.mini { width: 34px; height: 44px; object-fit: contain; vertical-align: middle; margin-right: 8px; float: left; }

/* ---------------------------------------------------------------- results: odds, reasons */
.sheet h2.great, .sheet h2.good { color: var(--teal); } .sheet h2.bad, .sheet h2.awful { color: var(--red); } .sheet h2.meh { color: var(--muted); }
.sheet p.why { font-size: 15px; color: var(--muted); } .why span.g { color: var(--teal); } .why span.b { color: #ff8a98; }
.sheet .dim, p.dim { color: var(--muted); font-size: 15px; }
.kicker.sm { margin-top: 14px; font-size: 12px; color: var(--gold); }
ul.feed, ul.brief, ul.meet, ul.tally, ul.ledger { list-style: none; padding: 0 !important; display: flex; flex-direction: column; gap: 6px; }
ul.feed li { padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); font-size: 16px; }
ul.brief li { font-size: 17px; } ul.brief .bad { color: var(--red); }
ul.meet { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; } ul.meet li { padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); font-size: 14px; line-height: 1.35; overflow: hidden; } ul.meet small { color: var(--muted); } ul.meet i { color: var(--gold); font-style: normal; }
ul.tally li, ul.ledger li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); font-size: 16px; overflow: hidden; }
ul.tally li span { color: var(--red); letter-spacing: 2px; } ul.tally li small { color: var(--muted); font-size: 13px; margin-left: auto; } ul.tally li.in { border: 1px solid var(--red); }
ul.ledger li { display: block; } ul.ledger small { color: var(--muted); font-size: 14px; }
.votes { display: flex; flex-direction: column; gap: 10px; margin: 8px 0; }
.vrow { display: grid; grid-template-columns: 120px 1fr 54px; align-items: center; gap: 8px; } .vrow > b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vbar { height: 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); overflow: hidden; } .vbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--pink), var(--gold)); }
.vrow span { font-weight: 900; text-align: right; } .vrow small { grid-column: 1 / -1; color: var(--muted); font-size: 13px; line-height: 1.4; } .vrow img.mini { width: 26px; height: 34px; }

/* ---------------------------------------------------------------- the house screen */
#hub { align-items: flex-start; padding-top: 64px; }
.hubs header { align-items: flex-start; } .hubs header h2 { font-size: 26px; } .hubs header p { margin: 4px 0 0; }
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.room { padding: 10px; border-radius: 18px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.room h3 { margin: 0; font-size: 17px; font-weight: 900; color: var(--gold); }
.ppl { display: flex; flex-wrap: wrap; gap: 8px; } .ppl p { margin: 0; }
.chip { display: grid; grid-template-columns: 46px 1fr; grid-template-rows: auto auto auto; column-gap: 8px; align-items: center; text-align: left; padding: 6px 10px 6px 6px; border-radius: 14px; background: rgba(255, 255, 255, 0.07); border: 2px solid var(--line); min-width: 150px; flex: 1 1 150px; }
.chip:hover { border-color: var(--gold); } .chip img { grid-row: 1 / 4; width: 46px; height: 58px; object-fit: contain; }
.chip b { font-size: 16px; font-weight: 900; } .chip small { font-size: 12px; color: var(--muted); font-weight: 800; } .chip em { font-style: normal; font-size: 12px; font-weight: 900; }
.chip.g em { color: var(--teal); } .chip.b em { color: #ff8a98; }
.ract { text-align: left; padding: 8px 12px; border-radius: 12px; background: rgba(123, 63, 228, 0.25); border: 1px solid rgba(123, 63, 228, 0.6); font-weight: 900; font-size: 15px; }
.ract small { display: block; color: var(--muted); font-size: 12px; font-weight: 800; }
.roster .chip { flex: 1 1 200px; }

/* ---------------------------------------------------------------- a profile */
.prof header { margin-bottom: 0; } .ptop { display: flex; gap: 16px; align-items: flex-start; }
.ptop img { width: 130px; height: 170px; object-fit: contain; flex: none; } .ptop h2 { font-size: 28px; margin: 0; } .ptop p { margin: 4px 0; font-size: 16px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); font-size: 13px; font-weight: 900; } .pill.g { color: var(--teal); } .pill.b { color: #ff8a98; }
.traits { display: flex; flex-wrap: wrap; gap: 6px; } .traits span { padding: 4px 10px; border-radius: 999px; background: rgba(45, 212, 167, 0.15); color: var(--teal); font-size: 14px; font-weight: 900; } .traits span.q { background: rgba(255, 255, 255, 0.06); color: var(--muted); }
.prof dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 10px 0; } .prof dt { font-weight: 900; color: var(--gold); font-size: 14px; } .prof dd { margin: 0; font-size: 15px; font-weight: 700; }
h4.what small { color: var(--muted); font-weight: 800; }
.acts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.agroup { display: flex; flex-direction: column; gap: 6px; } .agroup h4 { margin: 4px 0 0; font-size: 13px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
.act { display: grid; grid-template-columns: 1fr auto; text-align: left; gap: 2px 8px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.07); border: 2px solid var(--line); }
.act:hover { border-color: var(--gold); } .act b { font-size: 15px; } .act small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; font-weight: 800; }
.odds { font-size: 12px; font-weight: 900; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); align-self: center; }
.odds.o0, .odds.o1 { color: #ff8a98; } .odds.o2 { color: #ffb35c; } .odds.o3 { color: var(--gold); } .odds.o4, .odds.o5, .odds.o6 { color: var(--teal); }

@media (max-height: 500px) {
  #hub { padding: 46px 8px 8px; } .hubs { padding: 10px 12px; } .hubs header h2 { font-size: 18px; } .hubs header p { display: none; } .hubs header .ghost { padding: 6px 10px; font-size: 13px; }
  .rooms { gap: 6px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } .room { padding: 6px; gap: 5px; } .room h3 { font-size: 14px; }
  .chip { min-width: 0; grid-template-columns: 34px 1fr; padding: 3px 8px 3px 3px; } .chip img { width: 34px; height: 40px; } .chip b { font-size: 13px; } .chip small { display: none; } .chip em { font-size: 11px; }
  .ract { padding: 5px 8px; font-size: 13px; } .ract small { display: none; }
  .ptop img { width: 80px; height: 104px; } .ptop h2 { font-size: 21px; } .ptop p { font-size: 13px; } .prof dd { font-size: 13px; } .prof dt { font-size: 12px; }
  .act { padding: 6px 10px; } .act b { font-size: 14px; }
  .logo-wrap .cooker { width: 56px; } #b-house { height: 34px; padding: 0 10px; font-size: 13px; }
  ul.meet { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } ul.meet li { font-size: 12px; }
  .vrow { grid-template-columns: 90px 1fr 44px; } .vrow small { font-size: 11px; }
}
@media (max-width: 760px) { .stats #s-friends, .stats #s-energy { display: none; } .when span { max-width: 150px; } .top { gap: 8px; } .stats { gap: 5px; } }
.t-ud { position: absolute; left: max(18px, var(--sal)); bottom: 6px; display: flex; flex-direction: column; gap: 10px; }
.t-ud button { width: 92px; height: 72px; border-radius: 18px; background: rgba(22, 11, 38, 0.8); border: 2px solid var(--gold); color: var(--gold); font-size: 32px; font-weight: 900; touch-action: none; }
.t-ud button:active { background: var(--gold); color: #1a0d2e; }
.t-steady { background: radial-gradient(circle at 40% 35%, #ffe08a, #f4a300) !important; color: #2b1600; }
@media (max-height: 500px) { .t-ud button { width: 76px; height: 54px; font-size: 26px; } .t-ud { gap: 6px; } }

/* ---------------------------------------------------------------- the season: move hand, fans, recap, new tasks */
.agroup.hand { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
.act i { grid-column: 1 / -1; font-style: normal; font-size: 11px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.act.k-warm i { color: var(--teal); } .act.k-heart i { color: var(--pink); } .act.k-game i { color: var(--blue); } .act.k-edge i { color: var(--red); } .act.k-fix i { color: var(--gold); }
#s-fans { color: var(--gold); font-weight: 900; }
ol.fans, ol.clips { padding-left: 22px !important; display: flex; flex-direction: column; gap: 6px; }
ol.fans li { padding: 6px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); font-size: 16px; }
ol.fans li span { float: right; color: var(--gold); font-weight: 900; } ol.fans li.me { border: 1px solid var(--gold); }
ol.clips li { font-size: 15px; line-height: 1.35; } ol.clips small { color: var(--muted); margin-right: 6px; }
.t-tray { display: flex; gap: 8px; padding: 6px; border-radius: 18px; background: rgba(22, 11, 38, 0.82); }
.t-tray button { width: 64px; height: 64px; border-radius: 14px; border: 2px solid var(--line); background: rgba(255, 255, 255, 0.08); font-size: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; touch-action: none; color: var(--ink); }
.t-tray button small { font: 800 10px var(--num); color: var(--muted); }
.t-tray button.on { border-color: var(--gold); background: rgba(255, 209, 102, 0.25); }
.t-cards { display: flex; gap: 10px; max-width: 980px; width: 100%; }
.t-cards button { flex: 1; text-align: left; padding: 10px 12px; border-radius: 14px; border: 2px solid var(--gold); background: rgba(22, 11, 38, 0.9); color: var(--ink); font: 700 13.5px/1.3 var(--num); display: flex; flex-direction: column; gap: 4px; touch-action: none; }
.t-cards button i { font-style: normal; font-weight: 900; font-size: 12px; color: var(--gold); letter-spacing: 0.5px; }
.t-cards button:active { background: var(--gold); color: #1a0d2e; }
.t-offer { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); width: min(560px, 70vw); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 16px; background: rgba(22, 11, 38, 0.94); border: 2px solid var(--gold); }
.t-offer span { flex: 1 1 100%; font: 800 14px/1.3 var(--num); }
.t-offer button { flex: 1; padding: 10px; border-radius: 12px; border: 2px solid var(--line); background: rgba(255, 255, 255, 0.1); color: var(--ink); font: 900 14px var(--num); }
.t-offer button[data-y="1"] { border-color: var(--gold); color: var(--gold); }
.t-ud.lr { flex-direction: row; }
@media (max-height: 500px) {
  .t-tray button { width: 50px; height: 50px; font-size: 22px; } .t-cards button { font-size: 12px; padding: 6px 8px; } .t-offer { width: min(520px, 62vw); padding: 6px 8px; } .t-offer span { font-size: 12.5px; }
  .agroup.hand { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 6px; }
}
/* the fans counter makes the top bar longer: let the day line shrink and drop the friends count on mid-size phones */
.when { min-width: 0; flex: 1 1 auto; } .stats { flex: 0 0 auto; }
@media (max-width: 960px) { .stats #s-friends { display: none; } .when span { max-width: 220px; } .stats { gap: 5px; } .stats span { padding: 5px 9px; } }

/* ---------------------------------------------------------------- phones sideways: everything on one screen, no scrolling to find the buttons */
@media (max-height: 500px) {
  .sheet { position: relative; width: min(760px, 100%); } .sheet.narrow { width: min(480px, 100%); }
  .sheet:has(ul.meet) { width: min(980px, 100%); }
  /* a profile: who they are on the left, your moves on the right, each scrolls on its own */
  .prof { display: flex; flex-direction: column; overflow: hidden; }
  .prof > header { position: absolute; top: 8px; right: 10px; margin: 0; z-index: 1; } .prof > header .ghost { padding: 5px 10px; font-size: 13px; }
  .pbody { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 12px; min-height: 0; flex: 1 1 auto; }
  .pbody:not(:has(.pmoves)) { grid-template-columns: 1fr; }
  .pinfo, .pmoves { overflow: auto; min-height: 0; overscroll-behavior: contain; } .pmoves { padding-top: 34px; }
  .pinfo h4 { margin-top: 8px; } .prof dl { margin: 6px 0 0; gap: 2px 8px; }
  .ptop { gap: 10px; } .ptop img { width: 62px; height: 80px; } .ptop p { margin: 2px 0; }
  .pmoves h4.what { margin: 0 0 6px; font-size: 13px; } .pmoves h4.what small { display: block; font-size: 11px; }
  .pmoves .acts { display: block; } .pmoves .agroup.hand { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; }
  .pmoves .ppl .chip { flex: 1 1 130px; }
  /* the house screen: one short title line, five narrow rooms side by side, one-line chips */
  .hubs header { margin-bottom: 6px; } .hubs header .kicker { font-size: 11px; }
  .rooms { display: flex; gap: 5px; } .room { flex: 1 1 0; min-width: 0; }
  .room:has(.chip:nth-child(5)) { flex-grow: 2.6; } .room:not(:has(.chip)) { flex-grow: 0.75; } .room:has(.chip:nth-child(9)) { flex-grow: 3.6; }
  .room .ppl { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(90px, 100%), 1fr)); } .room.conf { flex-grow: 0.75; }
  .room h3 { font-size: 13px; } .ppl { gap: 4px; }
  .chip { flex: 1 1 100%; grid-template-columns: 22px 1fr; grid-template-rows: auto auto; column-gap: 5px; padding: 1px 5px 1px 2px; border-radius: 10px; border-width: 1px; }
  .chip img { grid-row: 1 / 3; width: 22px; height: 27px; } .chip b { font-size: 12.5px; line-height: 1.15; } .chip em { font-size: 10.5px; line-height: 1.15; }
  .ract { padding: 4px 8px; font-size: 12.5px; border-radius: 10px; }
  .roster .chip { flex: 1 1 150px; }
  /* who do you want to be: small side-on cards, the whole cast at once */
  .cast { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 4px; }
  .cast button { display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto auto; column-gap: 6px; align-items: center; text-align: left; padding: 1px 5px 1px 2px; border-radius: 10px; }
  .cast img { grid-row: 1 / 3; width: 28px; height: 34px; } .cast p { display: none; } .cast b { font-size: 13px; line-height: 1.15; } .cast small { font-size: 10.5px; line-height: 1.15; }
  #cast .sheet header { margin-bottom: 6px; } #cast .sheet header h2 { font-size: 18px; } #cast .ghost { padding: 5px 10px; font-size: 13px; }
  /* first impressions: three or four across, small type */
  ul.meet { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 5px; } ul.meet li { padding: 5px 7px; font-size: 11.5px; line-height: 1.3; border-radius: 9px; }
  .sheet:has(ul.meet) > p, .sheet p:has(+ ul.meet) { display: none; }
}
@media (max-height: 360px) {
  .top { padding-top: max(4px, var(--sat)); gap: 6px; } .when b { font-size: 14px; } .when span { font-size: 11.5px; }
  .stats span { padding: 3px 8px; font-size: 12.5px; } #b-pause { width: 32px; height: 28px; } #b-house { height: 28px; font-size: 12px; }
  .panel, #hub { padding: 38px 8px 4px; } .sheet { padding: 10px 14px; border-radius: 14px; max-height: calc(var(--vh) - 42px); }
  .kicker { font-size: 11px; } .sheet h2 { font-size: 18px; margin-bottom: 6px; } .sheet p, .sheet li { font-size: 13.5px; line-height: 1.38; } .sheet p { margin: 5px 0; }
  .sheet h4 { margin: 8px 0 3px; font-size: 12.5px; } .sheet p.why, .sheet .dim, p.dim { font-size: 12.5px; }
  .go { margin-top: 6px; } .btn { padding: 7px 16px; font-size: 14px; }
  .hubs header h2 { font-size: 15px; } .room { padding: 5px; gap: 4px; border-radius: 12px; }
  .ptop h2 { font-size: 17px; } .ptop p { font-size: 12px; } .pill { font-size: 11px; padding: 2px 7px; } .traits span { font-size: 11.5px; padding: 2px 8px; }
  .act { padding: 5px 9px; } .act b { font-size: 13px; } .act small { font-size: 11px; } .act i { font-size: 10px; }
  ul.feed li, ol.fans li, ul.tally li, ul.ledger li { font-size: 13px; padding: 5px 9px; } ul.brief li { font-size: 13.5px; }
}
@media (max-height: 500px) {
  /* the button that moves the story on stays in view while the text scrolls */
  .sheet > .go { position: sticky; bottom: -14px; margin-bottom: -14px; padding: 6px 0 10px; background: linear-gradient(transparent, var(--panel) 30%); }
}
@media (max-height: 500px) and (pointer: coarse) { .go .btn::after { content: none; } }
@media (max-height: 500px) {
  .res { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px; } .res li { padding: 4px 9px; gap: 7px; border-radius: 9px; align-items: center; } .res li::before { margin-top: 0; font-size: 11px; }
}
@media (max-height: 500px) {
  ul.meet { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } ul.meet small { display: none; } ul.meet img.mini { width: 24px; height: 31px; margin-right: 5px; }
}
@media (max-height: 360px) {
  /* the small label and the title share one line */
  .sheet > .kicker, .hubs header .kicker { display: inline-block; margin-right: 8px; } .sheet > .kicker + h2, .hubs header .kicker + h2 { display: inline; }
  .sheet > .kicker + h2 + * { margin-top: 6px; } .hubs header > div > h2 { font-size: 15px; }
  .sheet > .go { bottom: -10px; margin-bottom: -10px; padding-bottom: 8px; }
  ul.meet li { line-height: 1.25; }
}
@media (max-height: 280px) {
  /* the smallest phones: first impressions keep the name and what you noticed, the full bio waits in their profile */
  ul.meet .tag { display: none; } ul.meet { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
@media (max-height: 500px) { .chip b, .chip em { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; } }
@media (max-height: 280px) {
  #title { padding-top: 4px; } .logo { font-size: 32px; } .logo-wrap .cooker { width: 40px; } .lead { font-size: 12.5px; margin: 4px 0; } .menu button { padding: 7px 14px; font-size: 14px; } .t-main { gap: 5px; }
}

/* tasks on the 3D stage: the scene below, a transparent 2D layer on top */
#task { background: #120820; }
#task canvas.t2d { pointer-events: auto; background: transparent; }
#task canvas.t3d { pointer-events: none; }
.t-ctrl.wait { visibility: hidden; }
.t-score .tm.hot { color: var(--red); animation: t-hot 0.5s ease-in-out infinite alternate; }
@keyframes t-hot { to { transform: scale(1.18); } }
.t-snatch { transition: transform 0.15s, box-shadow 0.15s; opacity: 0.6; }
.t-snatch.ready { opacity: 1; transform: scale(1.12); box-shadow: 0 0 0 4px #fff, 0 0 30px 8px rgba(255, 77, 141, 0.8); animation: t-ready 0.45s ease-in-out infinite alternate; }
.t-steady { opacity: 1; }
@keyframes t-ready { to { box-shadow: 0 0 0 6px #fff, 0 0 44px 14px rgba(255, 77, 141, 0.9); } }
/* the briefing sits at the left so the set stays in view */
.t-card.intro { left: max(16px, var(--sal)); top: 50%; transform: translateY(-50%); width: min(380px, 46vw); text-align: left; padding: 16px 18px; background: rgba(22, 11, 38, 0.9); backdrop-filter: blur(6px); animation: t-slide 0.35s ease-out; }
@keyframes t-slide { from { opacity: 0; transform: translate(-30px, -50%); } }
.t-intro h2 { margin: 2px 0 4px; }
.t-intro p.desc { color: var(--muted); }
.t-how { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.t-how li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.35; }
.t-how li i { font-style: normal; flex: 0 0 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: rgba(255, 209, 102, 0.14); font-size: 17px; }
.t-how li span { padding-top: 5px; }
.t-how kbd { font: 900 11px var(--num); padding: 1px 6px; border-radius: 5px; background: rgba(255, 255, 255, 0.14); border-bottom: 2px solid rgba(255, 255, 255, 0.3); }
.t-card button.primary { margin-top: 10px; width: 100%; padding: 12px; border-radius: 14px; background: var(--gold); color: #2a1300; font: 900 17px var(--num); letter-spacing: 1px; border: 0; box-shadow: 0 6px 0 #b8892a; }
.t-card button.primary:active { transform: translateY(4px); box-shadow: 0 2px 0 #b8892a; }
/* the results card */
.t-card.res { animation: t-pop 0.4s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes t-pop { from { opacity: 0; transform: translate(-50%, -50%) scale(0.7); } }
.t-res.lose { --gold: #ffadad; }
.t-stars { display: flex; justify-content: center; gap: 6px; margin: 2px 0 6px; }
.t-stars b { font-size: 40px; line-height: 1; color: rgba(255, 255, 255, 0.15); }
.t-stars b.on { color: #ffd166; text-shadow: 0 0 18px rgba(255, 209, 102, 0.8); animation: t-star 0.45s cubic-bezier(0.2, 1.8, 0.4, 1) both; }
@keyframes t-star { from { transform: scale(0) rotate(-40deg); opacity: 0; } }
.t-stats { display: flex; gap: 8px; justify-content: center; margin: 10px 0; }
.t-stats span { flex: 1; display: flex; flex-direction: column; padding: 8px 6px; border-radius: 12px; background: rgba(255, 255, 255, 0.07); font-size: 11px; font-weight: 800; color: var(--muted); }
.t-stats b { font: 900 22px var(--num); color: var(--ink); }
.t-mvp { display: flex; align-items: center; gap: 10px; margin: 8px auto 0; padding: 6px 12px 6px 6px; width: fit-content; border-radius: 999px; background: rgba(255, 209, 102, 0.12); border: 1px solid rgba(255, 209, 102, 0.4); text-align: left; }
.t-mvp img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #2a1840; }
.t-mvp small { display: block; font-size: 10px; letter-spacing: 1px; }
.t-mvp b { font: 900 16px var(--num); }
@media (max-height: 500px) {
  .t-card.intro { width: min(340px, 48vw); padding: 10px 12px; max-height: calc(var(--vh) - 16px); }
  .t-card.intro h2 { font-size: 19px; } .t-intro p.desc { display: none; }
  .t-how { gap: 4px; margin: 6px 0; } .t-how li { font-size: 11.5px; gap: 7px; } .t-how li i { flex-basis: 24px; height: 24px; font-size: 14px; } .t-how li span { padding-top: 3px; }
  .t-card button.primary { padding: 8px; font-size: 15px; margin-top: 6px; }
  .t-stars b { font-size: 30px; } .t-stats b { font-size: 17px; } .t-stats { margin: 6px 0; } .t-mvp img { width: 34px; height: 34px; }
}

/* mini games only */
.arcade { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.arcade button { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 16px; border: 2px solid var(--line); background: rgba(255, 255, 255, 0.05); }
.arcade button:hover { border-color: var(--gold); }
.arcade i { grid-row: span 2; font-style: normal; font-size: 32px; text-align: center; }
.arcade b { font-size: 17px; font-weight: 900; } .arcade p { margin: 2px 0 0; font-size: 13px; line-height: 1.3; color: var(--muted); font-weight: 700; }
.t-res [data-again] { margin-right: 8px; }
@media (max-height: 500px) { .arcade { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; } .arcade button { padding: 5px 8px; grid-template-columns: 30px 1fr; } .arcade i { font-size: 22px; } .arcade b { font-size: 14px; } .arcade p { font-size: 11px; } }
@media (max-height: 300px) { .arcade p { display: none; } .arcade button { padding: 6px 8px; } }

/* ---------------------------------------------------------------- twists, points, stickers, the arcade extras */
.t-twist { display: inline-flex; gap: 6px; align-items: center; margin: 6px 0 0; padding: 4px 10px; border-radius: 999px; background: rgba(255, 209, 102, 0.14); border: 1px solid rgba(255, 209, 102, 0.45); font-size: 12.5px; font-weight: 800; }
.t-twist b { color: var(--gold); }
.t-intro .desc > i { font-style: italic; color: var(--muted); }
.t-pts { margin: 8px 0; padding: 8px 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.06); text-align: left; }
.t-pts ul { list-style: none; margin: 0; padding: 0; font-size: 12.5px; font-weight: 800; }
.t-pts li { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; color: var(--muted); }
.t-pts li b { color: var(--ink); font-family: var(--num); }
.t-pts li.m b { color: var(--gold); }
.t-pts li.lock { cursor: pointer; color: var(--muted); opacity: 0.85; text-decoration: underline dotted; }
.t-pts li.lock b { color: var(--muted); }
.t-pts .tot { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 0 0; padding-top: 6px; border-top: 1px dashed var(--line); font-weight: 900; }
.t-pts .tot b { font: 900 26px var(--num); color: var(--gold); }
.t-kit:empty { display: none; }
.t-host { margin: 6px 0 0; font-size: 12.5px; }
.t-host .hq { margin: 0 0 4px; color: var(--ink); font-weight: 700; }
.t-host .pb { margin: 0 0 6px; font-weight: 900; color: var(--teal); } .t-host .pb.dim { color: var(--muted); font-weight: 800; }
.stk-drop { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; margin: 0 0 6px; border-radius: 14px; border: 2px solid var(--line); background: rgba(255, 255, 255, 0.06); color: var(--ink); text-align: left; animation: stk-in 0.6s cubic-bezier(.2, 1.6, .4, 1) both; }
.stk-drop i { font-style: normal; font-size: 30px; } .stk-drop small { display: block; font-size: 10.5px; letter-spacing: 0.5px; color: var(--muted); font-weight: 900; text-transform: uppercase; }
.stk-drop b { font: 900 15px var(--num); } .stk-drop em { display: block; font-style: normal; font-size: 12px; color: var(--gold); font-weight: 800; }
.stk-drop.r2 { border-color: var(--blue); } .stk-drop.r3 { border-color: var(--gold); box-shadow: 0 0 18px rgba(255, 209, 102, 0.45); }
.stk-drop.lock { cursor: pointer; }
@keyframes stk-in { from { transform: scale(0.4) rotate(-8deg); opacity: 0; } }
#arcade-total { font-size: 14px; color: var(--muted); font-weight: 800; margin-left: 6px; } #arcade-total b { color: var(--gold); }
.ar-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin-bottom: 8px; }
.ar-top button { display: flex; gap: 10px; align-items: center; text-align: left; padding: 8px 12px; border-radius: 16px; border: 2px solid var(--line); background: rgba(255, 255, 255, 0.06); color: var(--ink); }
.ar-top i { font-style: normal; font-size: 28px; } .ar-top span { display: flex; flex-direction: column; min-width: 0; }
.ar-top small { font-size: 10.5px; font-weight: 900; letter-spacing: 0.5px; color: var(--muted); text-transform: uppercase; }
.ar-top b { font: 900 15px var(--num); } .ar-top em { font-style: normal; font-size: 12px; font-weight: 800; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-daily { border-color: var(--gold) !important; background: rgba(255, 209, 102, 0.12) !important; } .ar-daily.done { border-color: var(--teal) !important; background: rgba(45, 212, 167, 0.1) !important; }
.ar-perk { border-color: rgba(255, 77, 141, 0.6) !important; }
.ar-note { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--muted); font-weight: 700; }
.arcade u { text-decoration: none; font-size: 10px; padding: 1px 6px; border-radius: 6px; background: var(--pink); color: #fff; vertical-align: 3px; }
.arcade .ar-rnd { border-style: dashed; }
.album { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.stk { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: 14px; border: 2px dashed var(--line); text-align: center; opacity: 0.55; }
.stk i { font-style: normal; font-size: 30px; } .stk b { font: 900 12px var(--num); } .stk small { font-size: 10px; color: var(--muted); font-weight: 800; }
.stk.got { opacity: 1; border-style: solid; background: rgba(255, 255, 255, 0.06); } .stk.pend { opacity: 0.85; border-color: var(--gold); }
.stk.got.r2 { border-color: var(--blue); } .stk.got.r3 { border-color: var(--gold); box-shadow: 0 0 14px rgba(255, 209, 102, 0.4); }
.arcade > .ghost, .arcade > .primary { grid-column: 1 / -1; }
@media (max-height: 500px) {
  .t-pts { padding: 6px 10px; margin: 6px 0; } .t-pts ul { font-size: 11.5px; } .t-pts .tot b { font-size: 20px; }
  .ar-top { gap: 6px; margin-bottom: 6px; } .ar-top button { padding: 5px 8px; } .ar-top i { font-size: 22px; } .ar-top b { font-size: 13px; }
  .album { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; } .stk { padding: 4px; } .stk i { font-size: 22px; }
  .stk-drop { padding: 5px 8px; } .stk-drop i { font-size: 24px; }
}
@media (max-height: 300px) { .ar-top em { display: none; } .t-pts ul { columns: 2; column-gap: 14px; } .t-host .hq { font-size: 11.5px; } }
/* short landscape phones: the result card goes two-up so it fits without scrolling the whole card.
   Left: verdict, stars, stats, buttons. Right: total points first, the House line, the breakdown, then save and share. */
@media (max-height: 500px) and (min-width: 560px) {
  .t-card:has(.t-res) { width: min(780px, calc(100vw - 20px)); padding: 10px 14px; max-height: calc(var(--vh) - 14px); overflow: hidden; display: flex; }
  .t-res { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); grid-auto-rows: min-content; column-gap: 14px; align-content: start; }
  .t-res > * { grid-column: 1; }
  .t-res > p:empty, .t-res > .t-mvp { display: none; }
  .t-res > h2 { font-size: 19px; margin: 2px 0; } .t-res .t-stars b { font-size: 24px; } .t-res .t-stats { margin: 4px 0; } .t-res .t-stats b { font-size: 15px; }
  .t-res > button { padding: 7px; font-size: 14px; margin: 4px 0 0; width: 100%; }
  .t-res > [data-again] { margin-right: 0; }
  .t-res > .t-pts { grid-column: 2; grid-row: 1 / span 12; margin: 0; max-height: calc(var(--vh) - 34px); overflow: auto; display: flex; flex-direction: column; }
  .t-res > .t-pts .tot { order: -2; margin: 0 0 4px; padding: 0 0 4px; border-top: 0; border-bottom: 1px dashed var(--line); }
  .t-res > .t-pts .t-host { order: -1; margin: 0 0 4px; }
  .t-res .bk-home { display: none; }
}
@media (max-height: 500px) { .menu { display: grid; grid-template-columns: 1fr 1fr; max-width: 440px; gap: 8px; } }
@media (max-height: 280px) { .menu { gap: 5px; } .menu button { padding: 6px 12px; } .t-main { gap: 4px; } }
@media (max-height: 500px) and (min-width: 560px) {
  .t-res > p.big { font-size: 17px; margin: 2px 0; line-height: 1.2; }
  .t-res > p:not(.big) { font-size: 11.5px; margin: 2px 0; line-height: 1.25; }
}
/* very short: the breakdown on the right already says what the stats and the flavour line say */
@media (max-height: 300px) and (min-width: 560px) { .t-res > p:not(.big), .t-res > .t-stats { display: none; } }
