/* Alteturia Games — "Sunny" look: warm white, one sunshine-yellow accent, chunky press-down buttons */
/* Titles, buttons and big words: Fredoka Bold (one file serves every weight the CSS asks for). */
@font-face { font-family: 'Fredoka'; font-weight: 100 900; src: url(../fonts/fredoka-latin-700-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Baloo 2'; font-weight: 800; src: url(../fonts/baloo2-latin-800-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: Nunito; font-weight: 700; src: url(../fonts/nunito-latin-700-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: Nunito; font-weight: 800; src: url(../fonts/nunito-latin-800-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: Nunito; font-weight: 900; src: url(../fonts/nunito-latin-900-normal.woff2) format('woff2'); font-display: swap; }
:root {
  --bg: #fffaf0; --card: #ffffff; --soft-bg: #fff6dc; --line: #f0e4c8; --line-dk: #e2d2ad;
  --text: #2a2440; --muted: #857c95;
  --face: #fffdf8; --face-line: #e6dccb; --sq-l: #f3dfb6; --sq-d: #a8743f; --wood: #6b4423; --wood-dk: #3e2612; --bubbles: 1; --pc-b: #2a2440; --pc-b-rim: transparent; --scrim: rgba(20, 16, 42, .45);
  --brand: #ffc21a; --brand-dk: #e09a00; --brand-ink: #3a2600; --brand-tint: #fff1c7; --brand-deep: #8a5a00;
  --good: #22b573; --good-dk: #148a55; --bad: #f0533a; --bad-dk: #c23a22;
  --navy: #2a2440; --navy-dk: #14102a;
  --pulse: #ffe1da; --placeholder: #b9b0c6; --chip: #f3eee2; --word-sh: #ffe08a; --bad-sh: #ffd2c9; --overlay: rgba(255,250,240,.96); --glow: #ffe9a8;
  --frost: rgba(255,255,255,.78); --frost-warm: rgba(255,246,220,.82);
  --m1: #ffd65c; --m2: #ffadc4; --m3: #a9dcff; --m4: #ffc79a; --m5: #fff0c2;
  --r: 22px;
  color-scheme: light;
  font-family: Nunito, 'Segoe UI', system-ui, sans-serif; font-weight: 700;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); -webkit-tap-highlight-color: transparent; transition: background .15s; }
body::before { /* soft sunshine glow behind the content */
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(70vmax 50vmax at 50% -18%, var(--glow) 0%, transparent 60%);
}
body.pulse { background: var(--pulse); }
#app { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; padding: 12px 16px 56px; }
h1, h2, h3, .word, .bigcode, .letter, .prompt, .logo, .timer, .team b, .btn { font-family: 'Fredoka', 'Arial Rounded MT Bold', 'Trebuchet MS', sans-serif; font-weight: 400; }
h1 { font-size: 40px; margin: 0; }
h2 { font-size: 26px; margin: 8px 0; letter-spacing: .3px; text-wrap: balance; }
h3 { font-family: Nunito, sans-serif; font-weight: 900; font-size: 13px; margin: 0 0 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
p { line-height: 1.45; }
small { display: block; color: var(--muted); }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---------- logo ---------- */
.hero { padding: 26px 0 8px; text-align: center; }
.logo { display: inline-flex; flex-direction: column; align-items: center; line-height: .9; transform: rotate(-3deg); animation: bob 3.2s ease-in-out infinite; }
.logo span { display: block; }
.logo .l1 { font-size: 66px; color: var(--brand); letter-spacing: 2px; -webkit-text-stroke: 2px #6b4200;
  text-shadow: 0 2px 0 #f2ad00, 0 4px 0 var(--brand-dk), 0 6px 0 #b87900, 0 12px 16px rgba(160,110,0,.25); }
.logo .l2 { font-size: 34px; color: var(--text); letter-spacing: 10px; margin-top: 6px; text-shadow: 0 3px 0 var(--line-dk); }
@keyframes bob { 50% { transform: rotate(-1.5deg) translateY(-5px); } }
.hero p { color: var(--muted); margin: 14px 0 0; }

/* ---------- panels ---------- */
.card { position: relative; background: var(--card); border: 2px solid var(--line); border-radius: var(--r); padding: 18px; margin: 14px 0; box-shadow: 0 5px 0 var(--line); }
.card.row, .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: center; }
.card.row input, .row input { flex: 1; min-width: 0; }
.grid { display: grid; gap: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
#app > h2 { margin-top: 26px; }

/* ---------- game cards: white, one yellow accent ---------- */
.game-card {
  display: flex; gap: 14px; align-items: center; text-align: left; width: 100%; padding: 14px;
  border: 2px solid var(--line); border-radius: var(--r); cursor: pointer; color: var(--text); font: inherit; background: var(--card);
  box-shadow: 0 6px 0 var(--line); transform: translateY(0); transition: transform .08s, box-shadow .08s, border-color .15s;
}
.game-card:hover { border-color: var(--brand); box-shadow: 0 6px 0 var(--brand); }
.game-card:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--line); }
.game-card .emoji { flex: none; width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; font-size: 32px; background: var(--brand-tint); box-shadow: inset 0 -3px 0 rgba(224,154,0,.18); }
.game-card b { display: block; font-family: 'Fredoka', sans-serif; font-weight: 400; font-size: 20px; }
.game-card small { font-size: 13px; line-height: 1.3; margin-top: 2px; }
.gc-text { flex: 1; min-width: 0; }
.gc-go { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-size: 12px; box-shadow: 0 3px 0 var(--brand-dk); }

.emoji { font-size: 36px; line-height: 1; }
.emoji.big { font-size: 64px; }
.emoji.huge { font-size: 120px; margin: 12px 0; }

/* ---------- inputs ---------- */
label { display: block; font-size: 12px; font-weight: 900; color: var(--muted); margin: 12px 0 6px; text-transform: uppercase; letter-spacing: .1em; }
input, select { width: 100%; background: var(--card); color: var(--text); border: 2px solid var(--line); border-radius: 14px; padding: 13px 15px; font: inherit; font-size: 17px; font-weight: 800; }
input::placeholder { color: var(--placeholder); }
input:focus, select:focus, .btn:focus-visible, .game-card:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-color: var(--brand); }

/* ---------- chunky buttons ---------- */
.btn {
  --bc: var(--card); --bd: var(--line-dk); --bt: var(--text); --bb: var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--bc); color: var(--bt); border: 2px solid var(--bb); border-radius: 16px; padding: 12px 20px;
  font-size: 18px; letter-spacing: .4px; cursor: pointer; text-decoration: none;
  box-shadow: 0 5px 0 var(--bd); transform: translateY(0); transition: transform .06s, box-shadow .06s;
}
.btn:active { transform: translateY(5px); box-shadow: 0 0 0 var(--bd); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn.primary { --bc: var(--brand); --bd: var(--brand-dk); --bt: var(--brand-ink); --bb: var(--brand); }
.btn.ghost { --bc: var(--card); }
.btn.good { --bc: var(--good); --bd: var(--good-dk); --bt: #fff; --bb: var(--good); }
.btn.bad { --bc: var(--bad); --bd: var(--bad-dk); --bt: #fff; --bb: var(--bad); }
.btn.wa { --bc: #25d366; --bd: #128c4a; --bt: #fff; --bb: #25d366; }
.btn.wide { width: 100%; margin-top: 14px; }
.btn.huge { font-size: 26px; padding: 17px; border-radius: 20px; }
.btn.small { padding: 6px 12px; font-size: 14px; border-radius: 12px; box-shadow: 0 3px 0 var(--bd); }
.btn.listening { --bc: var(--bad); --bd: var(--bad-dk); --bt: #fff; --bb: var(--bad); animation: blink .6s infinite alternate; }
.grid2 .btn { padding: 15px 10px; }
.link { background: none; border: 0; color: var(--muted); font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 8px; }
.link.danger { color: var(--bad); }

.banner { background: var(--soft-bg); color: var(--brand-deep); border: 2px dashed var(--line-dk); font-size: 13px; font-weight: 800; padding: 8px 12px; border-radius: 12px; margin-bottom: 8px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 800; box-shadow: 0 5px 0 var(--navy-dk); z-index: 10; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 4px 0 2px; }
.topbar b { font-family: 'Fredoka', sans-serif; font-weight: 400; font-size: 20px; }
.topbar .code { font-family: 'Fredoka', monospace; color: var(--brand-deep); letter-spacing: .14em; background: var(--brand-tint); padding: 4px 10px; border-radius: 10px; }
.hostbar { text-align: center; margin-top: 18px; }

/* ---------- lobby ---------- */
.invite { background: var(--soft-bg); border-color: var(--line-dk); box-shadow: 0 5px 0 var(--line-dk); }
.invite .qr { width: 210px; height: 210px; margin: 6px auto 4px; background: #fff; border-radius: 20px; padding: 10px; border: 2px solid var(--line); box-shadow: 0 6px 0 var(--line-dk); transform: rotate(-2deg); }
.invite .qr svg { width: 100%; height: 100%; display: block; }
.bigcode { font-size: 50px; letter-spacing: .14em; color: var(--text); margin: 10px 0 14px; text-shadow: 0 4px 0 var(--brand); }
.plist { list-style: none; padding: 0; margin: 0; }
.plist li { padding: 10px 0; border-bottom: 2px dashed var(--line); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 800; font-size: 17px; }
.plist li::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 2px 0 var(--brand-dk); }
.plist li:last-child { border: 0; }
.plist .link { margin-left: auto; }
.tag { font-size: 11px; font-weight: 900; background: var(--chip); color: var(--muted); border-radius: 8px; padding: 3px 8px; text-transform: uppercase; letter-spacing: .05em; }
.tag.t-A { background: var(--brand); color: var(--brand-ink); } .tag.t-B { background: var(--navy); color: #fff; } .tag.t-BM { background: var(--good); color: #fff; }
.set { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; }
.set span { color: var(--muted); font-size: 14px; }
.set b { font-weight: 900; }
.set select { width: auto; max-width: 60%; padding: 9px 12px; font-size: 15px; }

/* ---------- scoreboard: Team A = yellow, Team B = navy; the team playing pops up ---------- */
.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin: 10px 0 4px; }
.team { border-radius: var(--r); padding: 10px; text-align: center; transition: transform .2s, opacity .2s; opacity: .55; }
.team small { font-weight: 900; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; color: inherit; opacity: .85; }
.team b { font-size: 46px; line-height: 1; display: block; }
.team.t-A { background: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 0 var(--brand-dk); }
.team.t-B { background: var(--navy); color: #fff; box-shadow: 0 6px 0 var(--navy-dk); }
.team.active { opacity: 1; transform: scale(1.05) translateY(-2px); }
.vs { color: var(--muted); font-family: 'Fredoka', sans-serif; font-size: 18px; }

/* ---------- timers & big words ---------- */
.timer { font-size: 30px; color: var(--brand-deep); }
.timer.big { width: 124px; height: 124px; margin: 8px auto; border-radius: 50%; display: grid; place-items: center; font-size: 48px; line-height: 1; color: var(--brand-ink);
  background: radial-gradient(circle at 35% 30%, #ffe28a, var(--brand) 60%); box-shadow: 0 7px 0 var(--brand-dk), 0 14px 22px rgba(224,154,0,.25); }
.timer.small { font-size: 16px; }
.timer.low { color: var(--bad); animation: blink .5s infinite alternate; }
.timer.big.low { color: #fff; background: radial-gradient(circle at 35% 30%, #ff9a86, var(--bad) 60%); box-shadow: 0 7px 0 var(--bad-dk), 0 14px 22px rgba(240,83,58,.25); }
@keyframes blink { to { transform: scale(1.06); } }
.word { font-size: 48px; line-height: 1.05; margin: 16px 0; text-transform: uppercase; word-break: break-word; color: var(--text); text-shadow: 0 4px 0 var(--word-sh); animation: pop .35s cubic-bezier(.3,1.6,.5,1); }
.word.scrambled { letter-spacing: .22em; white-space: pre-wrap; color: var(--brand-deep); text-shadow: 0 4px 0 var(--brand-tint); }
.word.imp { color: var(--bad); text-shadow: 0 4px 0 var(--bad-sh); }
@keyframes pop { from { transform: scale(.4) rotate(-6deg); opacity: 0; } }
.answer { margin: 8px 0; color: var(--muted); }
.answer b { color: var(--text); }
.waiting { font-size: 22px; padding: 30px 0; color: var(--muted); font-weight: 900; }
.play.bonus { background: var(--soft-bg); border-color: var(--brand); box-shadow: 0 5px 0 var(--brand-dk); }
.result { font-size: 17px; animation: pop .35s cubic-bezier(.3,1.6,.5,1); }

/* ---------- picture puzzles ---------- */
.pz { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 190px; background: var(--face); color: #2a2440; border-radius: 20px; margin: 16px 0; padding: 18px; position: relative;
  font-family: 'Fredoka', sans-serif; border: 2px solid var(--line); box-shadow: 0 6px 0 var(--line-dk); transform: rotate(-1.5deg); animation: pop .4s cubic-bezier(.3,1.6,.5,1); }
.pz b { font-size: 44px; font-weight: 400; letter-spacing: .04em; }
.pz .arrow { font-size: 42px; color: var(--bad); }
.pz-col { flex-direction: column; gap: 2px; }
.pz-wrap { flex-wrap: wrap; }
.pz-split { gap: 60px; }
.pz-top { align-items: flex-start; }
.pz-outside { gap: 24px; }
.pz-outside .box { width: 90px; height: 90px; border: 6px solid #2a2440; border-radius: 6px; }
.pz-emoji { font-size: 70px; }

/* ---------- role cards ---------- */
.rolecard { background: var(--soft-bg); border: 2px solid var(--line-dk); border-radius: 20px; padding: 16px; margin: 8px 0; text-align: center; box-shadow: 0 5px 0 var(--line-dk); }
.rolecard summary { cursor: pointer; color: var(--muted); padding: 4px; font-weight: 900; }
.rolecard .word { font-size: 42px; }
.rolecard small { font-weight: 900; }
.role-king, .role-queen { background: var(--brand); border-color: var(--brand); box-shadow: 0 5px 0 var(--brand-dk); }
.role-king small, .role-queen small { color: var(--brand-ink); }
.role-police { background: var(--navy); border-color: var(--navy); box-shadow: 0 5px 0 var(--navy-dk); }
.role-police .word, .role-police small { color: #fff; text-shadow: none; }
.role-thief { background: #3a3a46; border-color: #3a3a46; box-shadow: 0 5px 0 #1d1d25; }
.role-thief .word, .role-thief small { color: #fff; text-shadow: none; }
.mission { background: var(--soft-bg); border-left: 5px solid var(--brand); padding: 10px 12px; border-radius: 12px; text-align: left; }
.prompt { font-size: 28px; line-height: 1.15; margin: 14px 0; text-wrap: balance; animation: pop .35s cubic-bezier(.3,1.6,.5,1); }
.winner { color: var(--text); font-size: 40px; text-shadow: 0 4px 0 var(--brand); animation: pop .5s cubic-bezier(.3,1.6,.5,1); }
.letter { font-family: 'Fredoka', sans-serif; font-size: 130px; color: var(--brand); line-height: 1; -webkit-text-stroke: 3px #6b4200;
  text-shadow: 0 4px 0 var(--brand-dk), 0 8px 0 #b87900, 0 16px 20px rgba(160,110,0,.25); animation: pop .45s cubic-bezier(.3,1.6,.5,1); }
.letter.small { font-size: 64px; -webkit-text-stroke: 2px #6b4200; }
.bad-text { color: var(--bad); font-weight: 900; }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
td, th { padding: 9px 6px; border-bottom: 2px dashed var(--line); text-align: left; font-size: 15px; font-weight: 800; }
.totals tr:first-child td { color: var(--brand-deep); }
.totals td:first-child { width: 28px; color: var(--muted); }
.totals td:last-child, .list td:last-child { text-align: right; }
.list td { white-space: nowrap; }
.clues td:first-child { color: var(--muted); width: 35%; }
.votes .bar { height: 14px; background: var(--brand); border-radius: 8px; min-width: 8px; box-shadow: 0 3px 0 var(--brand-dk); }
.votes td:nth-child(2) { width: 40%; }
.scroll { overflow-x: auto; }
.napt th, .napt td { font-size: 13px; white-space: nowrap; }
.napt td small { display: inline; margin-left: 4px; font-weight: 900; }
.napt td.uniq small { color: var(--good); } .napt td.dup small { color: var(--brand-deep); } .napt td.zero { color: var(--muted); text-decoration: line-through; }
.cellbtn { background: none; border: 0; color: inherit; font: inherit; padding: 0; cursor: pointer; text-decoration: inherit; }

/* ---------- hot potato ---------- */
.bomb { border-color: var(--bad); box-shadow: 0 5px 0 var(--bad-dk); }
.bomb .emoji.huge { animation: shake .25s infinite; }
@keyframes shake { 25% { transform: rotate(-6deg) scale(1.03); } 75% { transform: rotate(6deg) scale(.98); } }
.boom { animation: boom .5s ease-out; border-color: var(--bad); }
.boom h1 { color: var(--bad); font-family: 'Fredoka', sans-serif; font-size: 76px; text-shadow: 0 5px 0 var(--bad-sh); }
@keyframes boom { 0% { transform: scale(.3); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }

/* ---------- confetti ---------- */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 20; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; animation: fall linear forwards; }
@keyframes fall { to { top: 110vh; transform: rotate(720deg) translateX(40px); } }

/* ---------- ad banners: soft yellow, same family as the rest ---------- */
.ad { position: relative; display: flex; align-items: center; gap: 12px; margin: 18px 0 8px; padding: 12px 14px; min-height: 72px;
  border-radius: 18px; color: var(--text); background: var(--soft-bg); border: 2px dashed var(--line-dk); overflow: hidden; }
.ad.tap { cursor: pointer; }
.ad.tap:active { transform: translateY(3px); }
.ad-emoji { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; background: var(--card); border: 2px solid var(--line); }
.ad-pic { width: 54px; height: 54px; object-fit: cover; border-radius: 12px; flex: none; }
.ad-body { flex: 1; min-width: 0; }
.ad-body b { display: block; font-size: 15px; font-weight: 900; line-height: 1.2; }
.ad-body small { font-size: 12.5px; margin-top: 2px; line-height: 1.3; }
.ad-cta { flex: none; background: var(--brand); color: var(--brand-ink); font-family: 'Fredoka', sans-serif; font-size: 14px; padding: 8px 12px; border-radius: 12px; box-shadow: 0 3px 0 var(--brand-dk); }
.ad-label { position: absolute; top: 5px; right: 9px; font-size: 9.5px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ad-img { padding: 0; min-height: 0; border-style: solid; }
.ad-img img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 5; object-fit: cover; }
.ad-img .ad-label { background: rgba(255,255,255,.85); padding: 2px 6px; border-radius: 6px; }
.adstats td, .adstats th { font-size: 13px; }
.adstats td:not(:first-child), .adstats th:not(:first-child) { text-align: right; }
.adstats td:first-child { white-space: normal; }

@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

/* ---------- word games play screen (works upright and sideways) ---------- */
.wg-bar { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin: 8px 0; }
.mini { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-radius: 16px; padding: 6px 14px; transition: opacity .2s, transform .2s; opacity: .55; }
.mini small { font-weight: 900; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: inherit; opacity: .85; }
.mini b { font-family: 'Fredoka', sans-serif; font-weight: 400; font-size: 30px; line-height: 1.1; }
.mini.t-A { background: var(--brand); color: var(--brand-ink); box-shadow: 0 4px 0 var(--brand-dk); }
.mini.t-B { background: var(--navy); color: #fff; box-shadow: 0 4px 0 var(--navy-dk); }
.mini.active { opacity: 1; transform: translateY(-2px); }
.ring { --p: 1; width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; font-family: 'Fredoka', sans-serif; font-size: 20px; color: var(--text);
  background: radial-gradient(closest-side, var(--card) 76%, transparent 78%), conic-gradient(var(--brand) calc(var(--p) * 360deg), var(--line) 0); box-shadow: 0 3px 0 var(--line-dk); }
.ring.low { color: var(--bad); background: radial-gradient(closest-side, var(--card) 76%, transparent 78%), conic-gradient(var(--bad) calc(var(--p) * 360deg), var(--line) 0); }
.wg-play { display: grid; grid-template-rows: auto 1fr auto; gap: 10px; min-height: 70vh; }
.stage { position: relative; display: grid; place-items: center; align-content: center; gap: 6px; padding: 40px 14px 20px; text-align: center;
  background: var(--card); border: 2px solid var(--line); border-radius: 24px; box-shadow: 0 5px 0 var(--line); min-height: 240px; }
.stage.bonus { background: var(--soft-bg); border-color: var(--brand); box-shadow: 0 5px 0 var(--brand-dk); }
.stage .hint { position: absolute; top: 12px; left: 12px; right: 12px; font-weight: 900; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stage .prog { position: absolute; top: 34px; right: 14px; font-family: 'Fredoka', sans-serif; font-size: 15px; color: var(--brand-deep); background: var(--brand-tint); padding: 3px 10px; border-radius: 10px; }
.bigword { font-family: 'Fredoka', sans-serif; text-transform: uppercase; line-height: 1; color: var(--text); text-shadow: 0 5px 0 var(--word-sh); word-break: break-word;
  font-size: clamp(40px, min(15vw, 22vh), 150px); animation: pop .35s cubic-bezier(.3,1.6,.5,1); }
.bigword.l { font-size: clamp(34px, min(10vw, 17vh), 115px); }
.bigword.xl { font-size: clamp(28px, min(7.5vw, 13vh), 90px); }
.bigword.scrambled { color: var(--brand-deep); letter-spacing: .14em; white-space: pre-wrap; text-shadow: 0 5px 0 var(--brand-tint); }
.stage .pz { margin: 0; min-height: 0; }
.acts { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.acts .btn { min-width: 130px; }
.small-list { font-size: 13px; margin: 6px 0 0; }
.pass { padding-block: 28px; }

/* ---------- orientation controls ---------- */
.orient-btn { position: fixed; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 15; background: var(--card); color: var(--text); border: 2px solid var(--line); border-radius: 14px;
  padding: 8px 12px; font: inherit; font-weight: 900; font-size: 13px; box-shadow: 0 3px 0 var(--line-dk); cursor: pointer; }
.rotate-hint { display: none; }
@media (orientation: portrait) {
  body.ls-on .rotate-hint { display: grid; position: fixed; inset: 0; z-index: 30; place-content: center; justify-items: center; gap: 6px; padding: 24px; text-align: center;
    background: var(--overlay); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
  body.ls-on .rotate-hint .rh-icon { font-size: 64px; animation: tilt 1.6s ease-in-out infinite; }
  body.ls-on .rotate-hint b { font-family: 'Fredoka', sans-serif; font-weight: 400; font-size: 26px; }
  body.ls-on .rotate-hint p { color: var(--muted); margin: 0 0 10px; }
}
@keyframes tilt { 0%, 30% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }

/* ---------- two-panel layout (used sideways) ---------- */
.split { display: block; }

/* ---------- landscape mode ---------- */
@media (orientation: landscape) {
  body.ls-on #app { max-width: 1040px; padding: 10px 16px 18px; }
  body.ls-on .banner { display: none; }
  body.ls-on .topbar { padding: 0; font-size: 15px; }
  body.ls-on .topbar b { font-size: 16px; }
  body.ls-on .hostbar { margin-top: 4px; }
  body.ls-on .hostbar .link { padding: 4px; font-size: 12px; }
  body.ls-on .wg-play { min-height: 0; height: calc(100dvh - 72px); gap: 8px; }
  body.ls-on .wg-bar { margin: 2px 0; }
  body.ls-on .stage { min-height: 0; padding: 10px 14px 14px; }
  body.ls-on .stage .hint { position: static; }
  body.ls-on .starts b { width: 38px; height: 38px; font-size: 24px; }
  body.ls-on .stage .prog { top: 10px; }
  body.ls-on .acts .btn { padding: 10px 22px; }
  body.ls-on .split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  body.ls-on .split .card { margin: 8px 0; }
  body.ls-on .napt-write { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
  body.ls-on .napt-write .fields { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; }
  body.ls-on .napt-write .letter { font-size: 96px; }
  body.ls-on .timer.big { width: 96px; height: 96px; font-size: 38px; }
}

@media (orientation: portrait) {
  .bigword { font-size: clamp(40px, 16vw, 110px); }
  .bigword.l { font-size: clamp(34px, 12.5vw, 90px); }
  .bigword.xl { font-size: clamp(28px, 9.5vw, 70px); }
}

/* Alteturia tile logo */
.alogo { margin: 0; display: inline-flex; flex-direction: column; align-items: center; gap: 12px; --tw: min(52px, calc((100vw - 64px) / 9.4)); }
.alogo .tiles { display: flex; gap: calc(var(--tw) * .09); }
.alogo .tile { position: relative; width: var(--tw); height: calc(var(--tw) * 1.1); border-radius: calc(var(--tw) * .2); background: #FFC93C; color: #1D1A3A;
  border: calc(var(--tw) * .05) solid #1D1A3A; box-shadow: 0 calc(var(--tw) * .085) 0 #1D1A3A; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center; font-family: 'Baloo 2', 'Fredoka', sans-serif; font-weight: 800;
  font-size: calc(var(--tw) * .76); line-height: 1; padding-top: calc(var(--tw) * .12);
  transform: translateY(var(--y)) rotate(var(--r)); animation: tileDrop .6s cubic-bezier(.3,1.6,.5,1) both; animation-delay: calc(var(--i) * 55ms); }
.alogo .tile.c { background: #FF6B4A; color: #FFFBF0; }
.alogo .tile i { position: absolute; right: 9%; bottom: 3%; font: 800 calc(var(--tw) * .17) Nunito, sans-serif; font-style: normal; }
.alogo .games { font: 800 18px Nunito, sans-serif; letter-spacing: 13px; padding-left: 13px; color: var(--text); }
@keyframes tileDrop { from { opacity: 0; transform: translateY(-40px) rotate(0deg); } to { opacity: 1; transform: translateY(var(--y)) rotate(var(--r)); } }
@media (prefers-reduced-motion: reduce) { .alogo .tile { animation: none; } }
