/* Fonts are served by the hub itself (public/fonts, SIL Open Font License): no request leaves for a font service. */
@font-face { font-family: Comfortaa; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/comfortaa-greek-700-normal.woff2) format("woff2"); unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF; }
@font-face { font-family: Comfortaa; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/comfortaa-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: Commissioner; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/commissioner-greek-500-normal.woff2) format("woff2"); unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF; }
@font-face { font-family: Commissioner; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/commissioner-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: Commissioner; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/commissioner-greek-700-normal.woff2) format("woff2"); unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF; }
@font-face { font-family: Commissioner; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/commissioner-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: Commissioner; font-style: normal; font-weight: 800; font-display: swap; src: url(/fonts/commissioner-greek-800-normal.woff2) format("woff2"); unicode-range: U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF; }
@font-face { font-family: Commissioner; font-style: normal; font-weight: 800; font-display: swap; src: url(/fonts/commissioner-latin-800-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
:root {
  --cream: #fff7ea;
  --ink: #1c1530;
  --gold: #ffc94a;
  --berry: #e23b4e;
  --mint: #3ee6a0;
  --bg: radial-gradient(ellipse at 20% 0%, #8a3c8c47, transparent 55%), radial-gradient(ellipse at 90% 100%, #3a3f8a33, transparent 55%), linear-gradient(160deg, #3b1d4f 0%, #150b21 100%);
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body { background: #150b21; background-image: var(--bg); background-attachment: fixed; color: var(--cream); font-family: Commissioner, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, .tv-code, .tv-title { font-family: Comfortaa, Commissioner, sans-serif; }
.hub-pill { display: inline-block; font: 800 1em/1 Commissioner, sans-serif; letter-spacing: .14em; color: var(--ink); background: var(--gold); border: .18em solid var(--ink); border-radius: .5em; padding: .35em .6em .3em; box-shadow: 0 .2em 0 var(--ink); }
.soon { color: var(--gold); }

/* ================= TV ================= */
body.tv { height: 100dvh; overflow: hidden; }
.tv-stage { height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; gap: 2.4vh; padding: 3.5vh 4vw 3vh; }
.tv-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 3vw; }
.tv-brand { display: flex; align-items: center; gap: 1.6vw; font-size: 2.6vh; }
.tv-brand img { height: 17vh; filter: drop-shadow(0 1vh 2vh #0007); }
.tv-join { display: flex; align-items: center; gap: 1.6vw; background: #fff1; border: .35vh solid #fff3; border-radius: 2.4vh; padding: 1.6vh 1.8vw; backdrop-filter: blur(6px); }
.tv-qr { width: 17vh; height: 17vh; background: #fff; border-radius: 1.4vh; padding: .6vh; }
.tv-qr svg { width: 100%; height: 100%; display: block; }
.tv-join-kicker { font-weight: 800; font-size: 2.3vh; }
.tv-code { font-size: 8.5vh; line-height: 1.05; letter-spacing: .12em; color: var(--gold); text-shadow: 0 .5vh 0 var(--ink); }
.tv-join-small { font-size: 1.8vh; opacity: .75; }

.tv-main { min-height: 0; display: grid; grid-template-rows: auto 1fr; gap: 2vh; }
.tv-main:has(.tv-poster) { grid-template-rows: 1fr; }
/* all titles side by side */
.tv-ask { text-align: center; font-size: 5.2vh; line-height: 1.1; text-shadow: 0 .5vh 0 var(--ink); }
.tv-grid { min-height: 0; display: flex; justify-content: center; gap: 2.4vw; }
.tv-cover { position: relative; flex: 0 1 38vh; min-width: 0; display: flex; align-items: flex-end; overflow: hidden; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 3.4vh; border: .5vh solid var(--ink); box-shadow: 0 1vh 0 #0007, 0 0 0 .2vh color-mix(in srgb, var(--c1) 60%, transparent), 0 2vh 5vh color-mix(in srgb, var(--c1) 30%, transparent);
  background: linear-gradient(transparent 42%, #150b21f5 86%), var(--img, none) center 16% / cover no-repeat, linear-gradient(150deg, var(--c1), var(--c2)); transition: transform .25s; animation: tv-in .5s cubic-bezier(.22,.8,.25,1) both; }
.tv-cover:nth-child(2) { animation-delay: .08s; } .tv-cover:nth-child(3) { animation-delay: .16s; } .tv-cover:nth-child(4) { animation-delay: .24s; }
.tv-cover:hover, .tv-cover:focus-visible { transform: translateY(-1vh) scale(1.02); }
.tv-cover-emoji { position: absolute; inset: 12% 0 auto; text-align: center; font-size: 16vh; line-height: 1; filter: drop-shadow(0 1vh 1vh #0006); }
.tv-cover-badge { position: absolute; top: 1.8vh; left: 1.8vh; font: 800 1.6vh Commissioner, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); background: var(--mint); border: .3vh solid var(--ink); border-radius: 99px; padding: .6vh 1.3vh; box-shadow: 0 .4vh 0 var(--ink); }
.tv-cover.off .tv-cover-badge { background: var(--gold); }
.tv-cover-text { display: flex; flex-direction: column; gap: .5vh; padding: 2.4vh 2.2vh; width: 100%; }
.tv-cover-text b { font: 700 4.2vh/1.1 Comfortaa, Commissioner, sans-serif; text-shadow: 0 .4vh 0 var(--ink); }
.tv-cover-text i { font-style: normal; font-weight: 800; font-size: 2.2vh; color: var(--gold); }
.tv-cover-text small { font-weight: 700; font-size: 1.8vh; opacity: .85; }
/* one title opened */
.tv-poster { position: relative; display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 3vw; min-height: 0; border-radius: 4vh; padding: 4vh 4vw; overflow: hidden;
  background: radial-gradient(circle at 78% 45%, color-mix(in srgb, var(--c1) 70%, transparent), transparent 55%), linear-gradient(120deg, #ffffff10, #ffffff05); border: .35vh solid #fff2; animation: tv-in .6s cubic-bezier(.22,.8,.25,1); }
.tv-kicker { font-weight: 800; font-size: 2vh; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.tv-title { font-size: 9vh; line-height: 1; margin: 1vh 0 .6vh; text-shadow: 0 .7vh 0 var(--ink); }
.tv-tagline { font-weight: 800; font-size: 3.4vh; }
.tv-about { margin-top: 1.4vh; font-size: 2.4vh; line-height: 1.4; opacity: .9; max-width: 46ch; }
.tv-chips { display: flex; gap: 1vw; margin-top: 2.2vh; font-weight: 800; font-size: 2.2vh; }
.tv-chips span { background: #fff2; border-radius: 99px; padding: .8vh 1.3vw; }
.tv-art { justify-self: center; display: grid; place-items: center; width: min(40vh, 30vw); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff8, transparent 45%), linear-gradient(145deg, var(--c1), var(--c2)); border: .7vh solid var(--ink); box-shadow: 0 2vh 5vh #0008, inset 0 -2vh 0 #0003; }
.tv-art.has-img { background: center 24% / 135% auto no-repeat; }
.tv-art span { font-size: 22vh; filter: drop-shadow(0 1.4vh 1.6vh #0006); animation: tv-float 4s ease-in-out infinite; }
.tv-cover:focus-visible, .tv-play:focus-visible, .tv-back:focus-visible, .tv-exit:focus-visible { outline: .5vh solid var(--mint); outline-offset: .5vh; }
.tv-actions { display: flex; align-items: center; gap: 1.6vw; margin-top: 2.4vh; }
.tv-back { font: 700 2.2vh Commissioner, sans-serif; color: var(--cream); background: #fff1; border: .3vh solid #fff4; border-radius: 1.8vh; padding: 1.4vh 1.8vw; cursor: pointer; }
.tv-back:hover { background: #fff2; }
/* A collection: its games fill the width, a name and a few words each */
.tv-games { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.1vh .9vw; padding: 0; }
.tv-games li { display: flex; align-items: center; gap: .7vw; background: #150b21a6; border: .25vh solid #fff2; border-radius: 1.6vh; padding: .9vh .8vw; min-width: 0; }
.tv-games li > span { font-size: 3.2vh; line-height: 1; }
.tv-games b { display: block; font-size: 1.9vh; line-height: 1.15; }
.tv-games small { display: block; font-size: 1.5vh; line-height: 1.2; opacity: .8; }
.tv-poster.has-games { grid-template-columns: 1fr auto; grid-template-rows: auto auto auto 1fr auto; align-content: center; gap: 0 3vw; padding-block: 3vh; }
.tv-poster.has-games .tv-poster-text { display: contents; }
.tv-poster.has-games .tv-kicker { grid-area: 1 / 1; align-self: end; }
.tv-poster.has-games .tv-title { grid-area: 2 / 1; font-size: 7.4vh; }
.tv-poster.has-games .tv-tagline { grid-area: 3 / 1; font-size: 2.8vh; }
.tv-poster.has-games .tv-art { grid-area: 1 / 2 / 4 / 3; width: 17vh; border-width: .5vh; }
.tv-poster.has-games .tv-games { grid-area: 4 / 1 / 5 / 3; align-self: center; margin: 2.2vh 0; }
.tv-poster.has-games .tv-actions { grid-area: 5 / 1; margin-top: 0; }
.tv-poster.has-games .tv-chips { grid-area: 5 / 2; align-self: center; justify-content: flex-end; margin-top: 0; }
.tv-play { margin-top: 0; font: 800 3vh Commissioner, sans-serif; color: var(--ink); background: var(--gold); border: .45vh solid var(--ink); border-radius: 1.8vh; padding: 1.5vh 2.4vw; box-shadow: 0 .7vh 0 var(--ink); cursor: pointer; }
.tv-play:active { transform: translateY(.5vh); box-shadow: 0 .2vh 0 var(--ink); }
.tv-soon { display: inline-block; margin-top: 0; font-weight: 800; font-size: 2.6vh; color: var(--gold); border: .35vh dashed var(--gold); border-radius: 1.8vh; padding: 1.2vh 2vw; }
.tv-foot { position: relative; display: flex; justify-content: center; align-items: center; }
.tv-status { text-align: center; font-weight: 800; font-size: 2.4vh; }
.tv-steps { list-style: none; counter-reset: s; display: flex; gap: 1.4vw; padding: 0; font-weight: 700; font-size: 2.1vh; }
.tv-steps li { counter-increment: s; display: flex; align-items: center; gap: .7vw; background: #fff1; border-radius: 99px; padding: .7vh 1.3vw .7vh .7vh; }
.tv-steps li::before { content: counter(s); display: grid; place-items: center; width: 3.2vh; height: 3.2vh; border-radius: 50%; font: 700 1.9vh Comfortaa, sans-serif; color: var(--ink); background: var(--gold); }
.tv-exit { position: absolute; right: 0; font: 700 1.8vh Commissioner, sans-serif; color: var(--cream); background: #fff1; border: .25vh solid #fff3; border-radius: 99px; padding: .7vh 1.2vw; cursor: pointer; opacity: .7; }
.tv-exit:hover { opacity: 1; }
.tv-status.on { opacity: 1; color: var(--mint); }
.tv-go { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 2vh; background: radial-gradient(circle, color-mix(in srgb, var(--c1) 55%, #150b21), #150b21 70%); animation: tv-in .35s ease both; }
.tv-go-emoji { font-size: 26vh; animation: tv-pop .6s cubic-bezier(.3,1.6,.5,1) both; }
.tv-go p { font-size: 5vh; font-weight: 800; }
@keyframes tv-in { from { opacity: 0; transform: translateY(2vh); } }
@keyframes tv-float { 50% { transform: translateY(-1.6vh) rotate(-3deg); } }
@keyframes tv-pop { from { transform: scale(.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ================= Phone ================= */
.ph { max-width: 34rem; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; gap: 1.1rem; padding: max(1rem, env(safe-area-inset-top)) 1rem max(1.4rem, env(safe-area-inset-bottom)); }
.ph-top { display: flex; align-items: center; justify-content: center; gap: .6rem; font-size: .8rem; }
.ph-top img { height: 4.6rem; }
.ph h1 { font-size: 1.6rem; text-align: center; }
.ph-ask { display: flex; flex-direction: column; gap: 1rem; text-align: center; margin-top: 8vh; }
.ph-ask p { line-height: 1.5; opacity: .9; }
.ph-code-form { display: flex; flex-direction: column; align-items: center; gap: .8rem; }
.ph-code-form input { width: 14.5rem; max-width: 100%; text-align: center; font: 700 2.4rem Comfortaa, sans-serif; letter-spacing: .2em; color: var(--ink); background: var(--cream); border: 4px solid var(--ink); border-radius: 1rem; padding: .4rem; }
.ph-btn { display: inline-block; text-align: center; text-decoration: none; font: 800 1.05rem Commissioner, sans-serif; color: var(--ink); background: var(--gold); border: 3px solid var(--ink); border-radius: .9rem; padding: .7rem 1.4rem; box-shadow: 0 4px 0 var(--ink); cursor: pointer; }
.ph-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.ph-btn:disabled { background: #fff3; color: var(--cream); border-color: #fff3; box-shadow: none; cursor: default; }
.ph-pick { display: flex; flex-direction: column; gap: .9rem; }
.ph-status { align-self: center; font-weight: 700; font-size: .9rem; background: #fff1; border-radius: 99px; padding: .4rem .9rem; text-align: center; }
.ph-status.on { color: var(--mint); }
.ph-status a { color: var(--gold); }
.ph-top a { display: contents; }
.ph-note { font-size: .85rem; text-align: center; opacity: .7; line-height: 1.45; }
.ph-note a { color: var(--gold); }

/* ---- TV mode on a narrow or upright screen (tablet, phone used as the screen) ---- */
@media (max-width: 820px), (orientation: portrait) {
  body.tv { height: auto; overflow: auto; }
  .tv-stage { height: auto; min-height: 100dvh; grid-template-rows: none; gap: 1rem; padding: max(1rem, env(safe-area-inset-top)) 1rem max(1.2rem, env(safe-area-inset-bottom)); }
  .tv-top { flex-direction: column; align-items: center; gap: .8rem; }
  .tv-brand { font-size: .8rem; gap: .7rem; }
  .tv-brand img { height: 5rem; }
  .tv-join { width: 100%; max-width: 26rem; gap: .9rem; border-width: 2px; border-radius: 1.2rem; padding: .8rem; }
  .tv-qr { width: 7rem; height: 7rem; flex: none; border-radius: .7rem; padding: .3rem; }
  .tv-join-kicker { font-size: .9rem; }
  .tv-code { font-size: 2.4rem; text-shadow: 0 .15rem 0 var(--ink); }
  .tv-join-small { font-size: .75rem; }
  .tv-poster { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 1rem; border-width: 2px; border-radius: 1.5rem; padding: 1.4rem 1.1rem; }
  .tv-art { order: -1; width: 8.5rem; border-width: 4px; box-shadow: 0 .6rem 1.4rem #0008, inset 0 -.5rem 0 #0003; }
  .tv-art.has-img { background: center 24% / 135% auto no-repeat; }
.tv-art span { font-size: 4.6rem; }
  .tv-kicker { font-size: .75rem; }
  .tv-title { font-size: 2.3rem; text-shadow: 0 .2rem 0 var(--ink); margin: .3rem 0; }
  .tv-tagline { font-size: 1.15rem; }
  .tv-about { font-size: 1rem; margin-top: .5rem; }
  .tv-chips { justify-content: center; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; font-size: .85rem; }
  .tv-chips span { padding: .3rem .7rem; }
  .tv-main { display: flex; flex-direction: column; gap: .9rem; }
  .tv-ask { font-size: 1.6rem; text-shadow: 0 .15rem 0 var(--ink); }
  .tv-grid { flex-wrap: wrap; gap: .8rem; }
  .tv-cover { flex: 1 1 9.5rem; aspect-ratio: 3 / 4; border-width: 3px; border-radius: 1.3rem; box-shadow: 0 .35rem 0 #0007; }
  .tv-cover-emoji { font-size: 4.5rem; }
  .tv-cover-badge { top: .6rem; left: .6rem; font-size: .6rem; border-width: 2px; padding: .2rem .5rem; box-shadow: 0 2px 0 var(--ink); }
  .tv-cover-text { padding: .8rem; gap: .1rem; }
  .tv-cover-text b { font-size: 1.15rem; text-shadow: 0 .1rem 0 var(--ink); } .tv-cover-text i { font-size: .8rem; } .tv-cover-text small { font-size: .7rem; }
  .tv-poster.has-games { display: flex; flex-direction: column; align-items: center; gap: .6rem; padding-block: 1.4rem; }
  .tv-poster.has-games .tv-title { font-size: 2.3rem; } .tv-poster.has-games .tv-tagline { font-size: 1.15rem; }
  .tv-poster.has-games .tv-art { order: -1; width: 7rem; border-width: 4px; }
  .tv-poster.has-games .tv-games { align-self: stretch; margin: .4rem 0; }
  .tv-poster.has-games .tv-chips { justify-content: center; }
  .tv-games { grid-template-columns: 1fr 1fr; gap: .45rem; text-align: left; }
  .tv-games li { gap: .5rem; border-width: 1px; border-radius: .8rem; padding: .45rem .55rem; }
  .tv-games li > span { font-size: 1.4rem; } .tv-games b { font-size: .85rem; } .tv-games small { font-size: .7rem; }
  .tv-actions { flex-direction: column; gap: .7rem; margin-top: 1rem; }
  .tv-back { font-size: .95rem; border-width: 2px; border-radius: .9rem; padding: .55rem 1.1rem; }
  .tv-play { margin-top: 0; font-size: 1.15rem; border-width: 3px; border-radius: .9rem; padding: .7rem 1.5rem; box-shadow: 0 4px 0 var(--ink); }
  .tv-soon { margin-top: 0; font-size: 1rem; border-width: 2px; border-radius: .9rem; padding: .5rem 1rem; }
  .tv-foot { flex-direction: column; gap: .7rem; }
  .tv-status { font-size: .95rem; }
  .tv-steps { flex-direction: column; gap: .4rem; font-size: .9rem; }
  .tv-steps li { gap: .6rem; padding: .35rem .9rem .35rem .35rem; }
  .tv-steps li::before { width: 1.6rem; height: 1.6rem; font-size: .9rem; }
  .tv-exit { position: static; font-size: .85rem; border-width: 1px; padding: .45rem 1rem; }
  .tv-go-emoji { font-size: 7rem; } .tv-go p { font-size: 1.5rem; text-align: center; padding: 0 1rem; }
}

/* ================= Host phone: plain tiles ================= */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
.tile { position: relative; aspect-ratio: 3 / 4; display: flex; align-items: flex-end; overflow: hidden; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: 1.3rem; border: 3px solid var(--ink); box-shadow: 0 .35rem 0 #0007;
  background: linear-gradient(transparent 50%, #150b21f0 90%), var(--img, none) center 16% / cover no-repeat, linear-gradient(150deg, var(--c1), var(--c2)); transition: transform .15s; }
.tile:active { transform: scale(.97); }
.tile.on { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold), 0 0 1.6rem color-mix(in srgb, var(--gold) 60%, transparent); }
.tile-emoji { position: absolute; inset: 14% 0 auto; text-align: center; font-size: 4.2rem; line-height: 1; }
.tile-soon { position: absolute; top: .55rem; left: .55rem; font: 800 .62rem Commissioner, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); background: var(--gold); border: 2px solid var(--ink); border-radius: 99px; padding: .15rem .5rem; }
.tile-name { width: 100%; padding: .7rem .8rem; font: 700 1.1rem/1.15 Comfortaa, Commissioner, sans-serif; text-shadow: 0 .1rem 0 var(--ink); }
.ph-pick { padding-bottom: 5.5rem; }
.ph-bar { position: fixed; inset: auto 0 0; z-index: 5; display: flex; gap: .6rem; align-items: center; padding: .8rem 1rem max(.9rem, env(safe-area-inset-bottom)); background: linear-gradient(transparent, #150b21 38%); animation: sheet-up .2s ease; }
.ph-bar .ph-btn { flex: 1; font-size: 1.15rem; padding: .9rem 1rem; }
.ph-bar-x { flex: none; width: 3rem; height: 3rem; font-size: 1.1rem; color: var(--cream); background: #2a1640; border: 3px solid var(--ink); border-radius: 50%; cursor: pointer; }

/* ================= Showcase covers ================= */
.cards { display: grid; gap: .9rem; }
.card-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; font-weight: 700; font-size: .82rem; }
.card-chips span { background: #fff2; border-radius: 99px; padding: .25rem .65rem; }

/* ================= Showcase: the first screen, on any device ================= */
/* drifting game pieces behind everything */
.bg { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.bg i { position: absolute; left: var(--x); top: var(--y); font: normal var(--s)/1 system-ui; opacity: .22; filter: saturate(1.2); animation: drift var(--t) ease-in-out infinite alternate; }
.bg i:nth-child(even) { animation-direction: alternate-reverse; }
@keyframes drift { from { transform: translate3d(0, -1.2rem, 0) rotate(-14deg); } to { transform: translate3d(.8rem, 1.2rem, 0) rotate(16deg); } }

/* Full width, with the content kept to 68rem by the side padding: the strip and the glow can then
   reach the screen edges, and nothing sticks out (a page wider than the screen gets zoomed out on phones). */
.sh { --pad: max(1.1rem, calc((100vw - 68rem) / 2)); position: relative; z-index: 1; min-height: 100dvh; display: flex; flex-direction: column; gap: 2.6rem; padding: max(1rem, env(safe-area-inset-top)) var(--pad) max(1.6rem, env(safe-area-inset-bottom)); overflow-x: clip; }
/* logo, hero and ribbon: on phones they fill exactly the first view */
.fold { display: contents; }
.sh-top { display: flex; justify-content: center; }
.sh-top img { height: clamp(5.2rem, 20vw, 8rem); filter: drop-shadow(0 .5rem 1rem #0008); animation: logo-in .7s cubic-bezier(.3,1.5,.5,1) both; }
@keyframes logo-in { from { transform: scale(.6) rotate(-8deg); opacity: 0; } }
.sh-h { font-size: clamp(1.5rem, 6vw, 2.2rem); text-align: center; text-wrap: balance; margin-bottom: 1.1rem; text-shadow: 0 .14em 0 var(--ink); }
.sh-foot { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center; font-size: .85rem; }
.sh-foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 1.2rem; }
.sh-foot a { color: var(--cream); opacity: .8; text-underline-offset: .2em; padding: .35rem 0; }
.sh-foot a:hover { opacity: 1; }
.sh-foot p { opacity: .5; }

/* hero */
.hero { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .9rem; }
.hero::before { content: ""; position: absolute; inset: -4rem calc(-1 * var(--pad)) auto; height: 26rem; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--berry) 38%, transparent), transparent), radial-gradient(closest-side at 70% 60%, color-mix(in srgb, var(--gold) 26%, transparent), transparent); filter: blur(10px); animation: glow 7s ease-in-out infinite alternate; }
@keyframes glow { to { transform: scale(1.12) translateY(1rem); opacity: .8; } }
/* The picture fills the whole screen behind everything and stays put while the page scrolls:
   game pieces all around, darker in the middle where the text sits. Upright phones get the middle
   of the picture (pieces at the top and bottom of the screen). */
:root { --hero: url("/brand/hero.webp"); }
@media (orientation: portrait) and (max-width: 820px) { :root { --hero: url("/brand/hero-portrait.webp"); } }
body.has-hero::before { content: ""; position: fixed; z-index: -1; inset: 0; height: 100lvh; pointer-events: none;
  background: radial-gradient(ellipse 75% 60% at 50% 45%, #150b21b3, transparent 75%), linear-gradient(#150b2126, #150b2180), var(--hero) center / cover no-repeat;
  animation: hero-in 1.2s ease both; }
@keyframes hero-in { from { opacity: 0; transform: scale(1.06); } }
/* upright phones: the text column is as wide as the screen, so the dark middle is wider and deeper */
@media (orientation: portrait) and (max-width: 820px) {
  body.has-hero::before { background: radial-gradient(ellipse 84% 54% at 50% 44%, #150b21d9 34%, #150b2166 66%, transparent 90%), linear-gradient(#150b2126, #150b2166), var(--hero) center / cover no-repeat; }
}
/* while a game is being picked on the TV the picture steps back, so the cards stay clear */
body.tv.has-hero::before { background: linear-gradient(#150b21b8, #150b21d9), var(--hero) center / cover no-repeat; }
.has-hero .bg { display: none; }
/* a soft dark spot behind the logo, so it reads over the picture */
.has-hero .sh-top { position: relative; }
.has-hero .sh-top::before { content: ""; position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: min(26rem, 90vw); aspect-ratio: 1.5; z-index: -1; background: radial-gradient(closest-side, #150b21f2 35%, #150b2199 62%, transparent); }
.hero-kicker { font-weight: 800; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); background: var(--mint); border: 2px solid var(--ink); border-radius: 99px; padding: .35rem .9rem; rotate: -2deg; box-shadow: 0 3px 0 var(--ink); }
.hero h1 { font-size: clamp(2rem, 8.6vw, 4.2rem); line-height: 1.12; text-wrap: balance; text-shadow: 0 .12em 0 var(--ink); }
.hero h1 em { font-style: normal; color: var(--gold); white-space: nowrap; background: linear-gradient(transparent 82%, color-mix(in srgb, var(--berry) 85%, transparent) 82% 94%, transparent 94%); }
.hero-lead { max-width: 31rem; font-size: clamp(1.05rem, 3.8vw, 1.35rem); line-height: 1.45; opacity: .92; text-wrap: balance; }
.sh-cta { display: flex; flex-direction: column; align-items: center; gap: .5rem; margin-top: .5rem; width: 100%; }
.sh-main { font-size: 1.35rem; padding: 1.05rem 2.4rem; min-width: min(100%, 18rem); border-radius: 1.2rem; box-shadow: 0 6px 0 var(--ink), 0 0 2.4rem color-mix(in srgb, var(--gold) 55%, transparent); animation: pulse 2.4s ease-in-out infinite; }
.sh-main:active { box-shadow: 0 1px 0 var(--ink); }
@keyframes pulse { 50% { box-shadow: 0 6px 0 var(--ink), 0 0 3.6rem color-mix(in srgb, var(--gold) 85%, transparent); } }
.sh-main:focus-visible, .sh-link:focus-visible { outline: 3px solid var(--mint); outline-offset: 4px; }
.sh-link { font: 700 .95rem Commissioner, sans-serif; color: var(--cream); background: none; border: 0; padding: .5rem .8rem; text-decoration: underline; text-underline-offset: .2em; opacity: .8; cursor: pointer; }

@keyframes bob { 50% { transform: translateY(-.45rem); } }

/* moving strip of what is inside */
.ticker { margin: 0 calc(-1 * var(--pad)); overflow: hidden; rotate: -1.5deg; scale: 1.04; background: var(--gold); color: var(--ink); border-block: 3px solid var(--ink); box-shadow: 0 5px 0 #0005; }
.ticker div { display: flex; width: max-content; animation: ticker 26s linear infinite; }
.ticker span { font: 700 1.05rem Comfortaa, Commissioner, sans-serif; padding: .55rem 0; white-space: nowrap; }
.ticker span::after { content: "★"; margin: 0 1.1rem; color: var(--berry); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* how we play: three words */
.how ol { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; padding: 0; }
.how li { counter-increment: s; position: relative; display: flex; flex-direction: column; align-items: center; gap: .15rem; text-align: center; font-size: .82rem; line-height: 1.25; background: #2a1840d9; backdrop-filter: blur(6px); border: 2px solid #fff3; border-radius: 1.2rem; padding: 1.5rem .4rem .9rem; }
.how li::before { content: counter(s); position: absolute; top: -.8rem; left: 50%; translate: -50% 0; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; font: 700 .95rem Comfortaa, sans-serif; color: var(--ink); background: var(--gold); border: 2px solid var(--ink); }
.how li span { font-size: 2.2rem; line-height: 1.2; }
.how li b { font-size: 1.05rem; }

/* game covers */
.covers { display: grid; grid-auto-flow: column; grid-auto-columns: min(84%, 21rem); gap: 1rem; margin: 0 -1.1rem; padding: .4rem 1.1rem 1.4rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 1.1rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.covers::-webkit-scrollbar { display: none; }
.cover { scroll-snap-align: start; display: flex; flex-direction: column; overflow: hidden; border-radius: 1.7rem; background: #1d1230; border: 3px solid var(--ink); box-shadow: 0 .5rem 0 #0007, 0 0 0 1px color-mix(in srgb, var(--c1) 60%, transparent), 0 1rem 2.6rem color-mix(in srgb, var(--c1) 28%, transparent); transition: transform .25s; }
.cover-art { position: relative; aspect-ratio: 4 / 5; display: grid; place-items: center; overflow: hidden; background-size: cover; background-position: center;
  background-image: radial-gradient(circle at 14% 16%, #fff5 0 .5rem, transparent .55rem), radial-gradient(circle at 84% 24%, #fff4 0 .35rem, transparent .4rem), radial-gradient(circle at 76% 60%, #fff3 0 .6rem, transparent .65rem), radial-gradient(circle at 20% 56%, #fff3 0 .3rem, transparent .35rem), radial-gradient(circle at 50% 38%, #fff5, transparent 46%), linear-gradient(150deg, var(--c1), var(--c2)); }
.cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.cover-emoji { font-size: 7.5rem; line-height: 1; translate: 0 -1.6rem; filter: drop-shadow(0 .7rem .7rem #0006); animation: tv-float 4.5s ease-in-out infinite; }
.cover-badge { position: absolute; top: .9rem; left: .9rem; font: 800 .72rem Commissioner, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); background: var(--mint); border: 2px solid var(--ink); border-radius: 99px; padding: .3rem .7rem; box-shadow: 0 3px 0 var(--ink); }
.cover.off .cover-badge { background: var(--gold); }
.cover-title { position: absolute; inset: auto 0 0; padding: 3.2rem 1.1rem 1rem; text-align: left; background: linear-gradient(transparent, #150b21e6 55%); }
.cover-title h3 { font: 700 1.9rem/1.1 Comfortaa, Commissioner, sans-serif; text-shadow: 0 .12em 0 var(--ink); }
.cover-title p { font-weight: 800; color: var(--gold); margin-top: .2rem; }
.cover-body { display: flex; flex-direction: column; gap: .8rem; padding: 1rem 1.1rem 1.2rem; }
.cover-about { line-height: 1.45; opacity: .88; }
.cover .card-chips { margin: 0; font-size: .88rem; }

/* closing call */

/* «how to start» sheet (phone) */
.sheet { width: 100%; max-width: 30rem; margin: auto auto 0; border: 3px solid var(--ink); border-bottom: 0; border-radius: 1.6rem 1.6rem 0 0; padding: 1.4rem 1.2rem max(1.4rem, env(safe-area-inset-bottom)); color: var(--cream); background: #2a1640; box-shadow: 0 -1rem 3rem #000a; }
.sheet[open] { display: flex; flex-direction: column; gap: 1rem; animation: sheet-up .28s cubic-bezier(.22,.8,.25,1); }
.sheet::backdrop { background: #0b0613cc; }
.sheet h2 { font-size: 1.5rem; text-align: center; }
.sheet-x { position: absolute; top: .7rem; right: .8rem; width: 2.4rem; height: 2.4rem; font-size: 1rem; color: var(--cream); background: #fff2; border: 0; border-radius: 50%; cursor: pointer; }
.sheet-steps { list-style: none; counter-reset: s; display: grid; gap: .55rem; padding: 0; }
.sheet-steps li { counter-increment: s; display: flex; align-items: center; gap: .8rem; background: #fff1; border-radius: 1rem; padding: .7rem .9rem; line-height: 1.35; }
.sheet-steps li::before { content: counter(s); flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; font: 700 1.05rem Comfortaa, sans-serif; color: var(--ink); background: var(--gold); border: 2px solid var(--ink); }
.sheet-code { display: grid; gap: .5rem; text-align: center; font-weight: 700; font-size: .95rem; border-top: 1px solid #fff2; padding-top: 1rem; }
.sheet-code div { display: flex; justify-content: center; gap: .6rem; }
.sheet-code input { width: 9.5rem; min-width: 0; text-align: center; font: 700 1.6rem Comfortaa, sans-serif; letter-spacing: .18em; color: var(--ink); background: var(--cream); border: 3px solid var(--ink); border-radius: .9rem; padding: .3rem; }
.sheet .sh-link { align-self: center; font-size: .85rem; opacity: .65; }
.resume { text-align: center; }
.resume p { line-height: 1.45; opacity: .9; }
.resume p b { color: var(--gold); letter-spacing: .08em; }
.resume .ph-btn { padding: .9rem 1rem; font-size: 1.1rem; }
.resume .ph-btn:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; }
.resume-new { background: #fff1; color: var(--cream); border-color: #fff5; box-shadow: none; }
@media (min-width: 1100px) { .resume { max-width: 40rem; padding: 2.2rem 2rem; gap: 1.3rem; font-size: 1.3rem; } .resume h2 { font-size: 2.2rem; } .resume .ph-btn { font-size: 1.5rem; padding: 1.1rem 1.2rem; } }
@keyframes sheet-up { from { translate: 0 2rem; opacity: 0; } }
@media (min-width: 640px) {
  .sheet { margin: auto; border-bottom: 3px solid var(--ink); border-radius: 1.6rem; }
}

@media (min-width: 640px) {
  .sheet { margin: auto; border-bottom: 3px solid var(--ink); border-radius: 1.6rem; }
}
@media (min-width: 760px) {
  .sh { gap: 3.4rem; padding-top: 1.6rem; }
  .bg i { font-size: calc(var(--s) * 1.5); }
  .sh-cta { flex-direction: row; justify-content: center; gap: 1.2rem; }
  .sh-main { min-width: 0; }
  .ticker span { font-size: 1.3rem; padding: .7rem 0; }
  .how ol { max-width: 44rem; margin: 0 auto; gap: 1.2rem; }
  .how li { font-size: 1rem; padding: 1.8rem 1rem 1.2rem; }
  .how li span { font-size: 3rem; } .how li b { font-size: 1.3rem; }
  .covers { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(17rem, 21rem)); justify-content: center; gap: 1.6rem; margin: 0; padding: .4rem 0 1rem; overflow: visible; }
  .cover:hover { transform: translateY(-.5rem) rotate(-1deg); }
  .cover-art { aspect-ratio: 1; }
}
/* phones: the ribbon sits right under the buttons, so it shows before any scrolling */
@media (max-width: 759px) {
  .fold { display: flex; flex-direction: column; gap: 1.3rem; min-height: calc(100svh - max(1rem, env(safe-area-inset-top)) - 1.1rem); }
  .fold .hero { flex: 1; justify-content: center; }
}
/* short phones: everything a little tighter, so the ribbon still fits in the first view */
@media (max-width: 759px) and (max-height: 660px) {
  .sh-top { margin-bottom: -1rem; }
  .sh-top img { height: 4.4rem; }
  .hero { gap: .65rem; }
  .hero h1 { font-size: clamp(1.8rem, 8vw, 2.4rem); }
  .hero-lead { font-size: 1rem; line-height: 1.35; }
  .sh-cta { margin-top: .2rem; gap: .2rem; }
  .sh-main { padding-block: .85rem; }
}
/* short, wide screens (a TV browser): keep the button in the first view */
@media (min-width: 760px) and (max-height: 760px) {
  .sh { gap: 2rem; padding-top: .8rem; }
  .sh-top img { height: 5rem; }
  .hero h1 { font-size: 2.9rem; }
  .hero-kicker { display: none; }
}

/* ================= Seasonal look: snow, a string of lights, festive pictures ================= */
body.xmas { --hero: var(--hero-xmas, url("/brand/hero.webp")); }
@media (orientation: portrait) and (max-width: 820px) { body.xmas { --hero: var(--hero-xmas-portrait, url("/brand/hero-portrait.webp")); } }
.snow { position: fixed; inset: 0; z-index: 40; overflow: hidden; pointer-events: none; }
.snow i { position: absolute; top: -12px; border-radius: 50%; background: #fff; opacity: .85; box-shadow: 0 0 6px #fff8; animation: snow-fall linear infinite; will-change: transform; }
@keyframes snow-fall { to { transform: translate3d(var(--sway), 105vh, 0); } }
.lights { position: fixed; inset: 0 0 auto; z-index: 41; height: 22px; pointer-events: none;
  background:
    radial-gradient(circle at 12px 13px, #ff4d5e 0 5px, #ff4d5e55 6px, transparent 10px),
    radial-gradient(circle at 36px 15px, #ffd24a 0 5px, #ffd24a55 6px, transparent 10px),
    radial-gradient(circle at 60px 13px, #3ee6a0 0 5px, #3ee6a055 6px, transparent 10px),
    radial-gradient(circle at 84px 15px, #6fb6ff 0 5px, #6fb6ff55 6px, transparent 10px),
    linear-gradient(#0000 6px, #0b3d2e 6px 8px, #0000 8px);
  background-size: 96px 22px; animation: lights-twinkle 1.6s ease-in-out infinite alternate; }
@keyframes lights-twinkle { from { filter: brightness(.75); } to { filter: brightness(1.35); } }
body.xmas .hero-kicker { background: var(--berry); color: #fff; }
body.xmas .ticker { background: var(--berry); color: #fff; }
body.xmas .ticker span::after { content: "❄"; color: #fff; }
body.xmas .sh-top img, body.xmas .tv-brand img, body.xmas .wait-logo { filter: drop-shadow(0 0 1.2rem #ffffff66) drop-shadow(0 .5rem 1rem #0008); }

/* ================= Waiting (players' phones while the host picks) ================= */
.wait { justify-content: center; align-items: center; text-align: center; gap: 1.4rem; }
.wait-logo { height: 7rem; filter: drop-shadow(0 .5rem 1rem #0008); }
.wait h1 { font-size: 1.7rem; line-height: 1.2; text-wrap: balance; }
.wait p { min-height: 1.5em; opacity: .8; line-height: 1.45; text-wrap: balance; }
.wait-dots { display: flex; gap: .7rem; }
.wait-dots i { width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--gold); border: 2px solid var(--ink); animation: wait-bounce 1.2s ease-in-out infinite; }
.wait-dots i:nth-child(2) { background: var(--berry); animation-delay: .15s; }
.wait-dots i:nth-child(3) { background: var(--mint); animation-delay: .3s; }
@keyframes wait-bounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-.9rem); } }

/* ================= Text pages (terms, privacy) ================= */
.legal { max-width: 44rem; margin: 0 auto; padding: max(1rem, env(safe-area-inset-top)) 1.2rem 3rem; line-height: 1.6; }
.legal-top { display: flex; justify-content: center; margin-bottom: 1.2rem; }
.legal-top img { height: 5rem; }
.legal h1 { font-size: clamp(1.7rem, 6vw, 2.4rem); line-height: 1.15; text-align: center; }
.legal .legal-date { text-align: center; font-size: .9rem; opacity: .65; margin: .4rem 0 1.6rem; }
.legal .legal-short { background: #ffffff12; border: 2px solid #fff3; border-radius: 1.1rem; padding: 1rem 1.1rem; margin-bottom: 1.6rem; }
.legal .legal-short b { color: var(--gold); }
.legal h2 { font-size: 1.2rem; margin: 1.8rem 0 .5rem; color: var(--gold); }
.legal h3 { font-size: 1.1rem; margin: 1.4rem 0 .5rem; padding-top: .9rem; border-top: 2px solid #fff2; }
.legal code { font-size: .9em; background: #ffffff1a; padding: .05em .35em; border-radius: .35em; overflow-wrap: anywhere; }
.legal [id] { scroll-margin-top: 1rem; }
.legal p, .legal ul { margin-bottom: .8rem; opacity: .92; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: .35rem; }
.legal a { color: var(--gold); text-underline-offset: .2em; }
.legal .sh-foot { margin-top: 2.4rem; }
