/* Test games (hidden /lab/ page). Colours come from the game's theme (shared.js). */
:root { --bg: #0F7C86; --bg2: #0A5F67; --acc: #FFD23F; --onacc: #0A2A30; --accsh: #C99A00; --dark: #0A2A30; --hl: #FFD23F; --fg: #fff; --big: #FFD23F; --card: #E8F7F8; --cardink: #0A2A30; --mid: #FF6B5B; --t0: #FF6B5B; --t0ink: #fff; --t1: #0A2A30; --l1: #FFD23F; --l2: #FF6B5B; --l3: #0A2A30; --lmw: #0A2A30; --lword: #FFD23F; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); font-family: Alexandria, sans-serif; overflow: hidden; }
button { font: inherit; cursor: pointer; border: 0; color: inherit; }
#app { height: 100%; }

/* logo (same drawing as منو قالها / منو صادها, colours per game) */
.logo { display: inline-flex; align-items: center; gap: .05em; font-weight: 900; line-height: 1; white-space: nowrap; letter-spacing: -.02em; direction: rtl; font-size: 28px; }
.logo.xs { font-size: 15px; } .logo.sm { font-size: clamp(18px, 3vh, 30px); } .logo.lg { font-size: clamp(34px, 7vh, 64px); } .logo.xl { font-size: clamp(34px, 6vw, 60px); }
.mark { flex: none; position: relative; display: inline-block; width: 2.1em; height: 2.1em; }
.mark svg { display: block; width: 100%; height: 100%; overflow: visible; }
.mark-word { position: absolute; left: 48.3%; top: 54.5%; transform: translate(-50%, -50%); font-size: .588em; font-weight: 900; color: var(--lmw); letter-spacing: 0; }
.c1, .tail { fill: var(--l1); stroke: var(--l1); } .c1 { stroke-width: 0; } .tail { stroke-width: 10; stroke-linejoin: round; }
.c2 { fill: var(--l2); } .c3 { fill: var(--l3); }
.logo .word { color: var(--lword); }

/* backgrounds: same look as منو قالها / منو صادها: soft glow + slow spinning rays */
.scr { position: relative; min-height: 100%; height: 100%; overflow: hidden; background: radial-gradient(120% 90% at 50% 40%, color-mix(in srgb, var(--bg), #fff 14%) 0%, var(--bg) 55%, var(--bg2) 100%); }
.scr::before { content: ""; position: fixed; left: 50%; top: 45%; width: 170vmax; height: 170vmax; margin: -85vmax 0 0 -85vmax; pointer-events: none;
  background: repeating-conic-gradient(rgba(255, 255, 255, .07) 0 9deg, transparent 9deg 18deg); animation: lab-spin 90s linear infinite; will-change: transform;
  -webkit-mask-image: radial-gradient(circle, #000 15%, transparent 68%); mask-image: radial-gradient(circle, #000 15%, transparent 68%); }
@keyframes lab-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .scr::before { animation: none; } }
.scr > * { position: relative; }

/* shared pieces */
.btn { background: var(--acc); color: var(--onacc); border-radius: 18px; padding: 14px 26px; font-weight: 900; font-size: 20px; box-shadow: 0 5px 0 var(--accsh); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--accsh); }
.btn.ghost { background: rgba(0,0,0,.22); color: #fff; box-shadow: 0 4px 0 rgba(0,0,0,.2); }
.btn.sm { font-size: 16px; padding: 10px 12px; }
.btn.dim { opacity: .5; }
.av { width: 1.9em; height: 1.9em; border-radius: .5em; display: inline-block; flex: none; box-shadow: 0 3px 0 rgba(0,0,0,.2); }
.av svg { width: 100%; height: 100%; display: block; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 40px); opacity: 0; background: var(--dark); color: #fff; padding: 12px 20px; border-radius: 16px; font-weight: 700; transition: .25s; z-index: 50; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.paper { background: #fff; border-radius: 6px; position: relative; box-shadow: 0 8px 0 rgba(0,0,0,.22); }
.paper::before { content: ""; position: absolute; top: -10px; left: 50%; width: 70px; height: 22px; transform: translateX(-50%) rotate(-3deg); background: rgba(255,210,63,.85); z-index: 1; }
.paper canvas { display: block; width: 100%; height: 100%; }
.secret { align-self: stretch; background: var(--card); color: var(--cardink); border-radius: 24px; padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; text-align: center; box-shadow: 0 7px 0 rgba(0,0,0,.25); }
.secret small { font-weight: 700; font-size: 15px; opacity: .7; line-height: 1.6; }
.secret.liar small:first-child { margin-bottom: 6px; }
.secret b { font-weight: 900; font-size: clamp(32px, 11vw, 46px); line-height: 1.5; }
.secret.liar { background: var(--dark); color: var(--hl); }
.secret.liar small { color: #fff; opacity: .85; }

/* ---------- home (pick a game) ---------- */
.home-bg { background: #FFF8EC; }
.lab-home { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 24px 16px; }
.lab-note { margin: 0; background: var(--dark); color: #fff; font-weight: 700; font-size: 14px; padding: 6px 14px; border-radius: 12px; }
.home-bg .lab-note { background: #1C1240; }
.lab-tiles { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.lab-tile { width: min(400px, 90vw); border-radius: 30px; padding: 30px 20px; display: flex; flex-direction: column; align-items: center; gap: 16px; color: #fff; font-weight: 700; font-size: 18px; box-shadow: 0 12px 28px rgba(28,18,64,.25); }
.lab-tile b { background: #fff; color: #1C1240; border-radius: 16px; padding: 10px 30px; font-size: 20px; }
.g-allafha { background: #14B85A; --l1: #FFF04D; --l2: #FF5CA8; --l3: #0B2B1A; --lmw: #0B2B1A; --lword: #FFF04D; }
.g-rasmaha { background: #F2453D; --l1: #FFF04D; --l2: #5CE1FF; --l3: #2B0A12; --lmw: #2B0A12; --lword: #FFF04D; }

/* ---------- TV ---------- */
.tv { height: 100%; font-size: clamp(15px, min(3.2vh, 1.8vw), 44px); }
.tv-top { display: flex; justify-content: space-between; align-items: center; padding: 2.2vh 2.4vw 0; gap: 10px; }
.team { display: inline-flex; align-items: center; gap: .5em; height: 2.3em; padding: 0 .5em 0 1em; border-radius: 99px; font-weight: 900; border: 3px solid #fff; box-shadow: 0 4px 0 rgba(0,0,0,.18); white-space: nowrap; }
.team .n { width: 1.6em; height: 1.6em; border-radius: 50%; background: #fff; color: var(--cardink); display: grid; place-items: center; font-size: .9em; }
.t0 { background: var(--t0); color: var(--t0ink); } .t1 { background: var(--t1); color: #fff; }
.tv-mid { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.round { font-weight: 700; font-size: .75em; opacity: .85; }
.center { position: absolute !important; inset: 9vh 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.2vh; text-align: center; padding: 0 4vw 3vh; }
.tag { color: var(--hl); display: inline-flex; gap: 8px; align-items: center; background: var(--dark); color: var(--hl); padding: .4em 1em; border-radius: 99px; font-weight: 900; }
.big { font-weight: 900; font-size: 2.3em; line-height: 1.35; color: var(--big); text-shadow: 0 4px 0 rgba(0,0,0,.25); }
.mid { font-weight: 700; font-size: 1.1em; line-height: 1.7; }
.small { font-size: .8em; opacity: .85; margin: 0; }
.pill { color: #fff; display: inline-flex; gap: .6em; align-items: center; background: var(--dark); padding: .4em .5em .4em 1em; border-radius: 99px; font-weight: 900; font-size: 1.05em; }
.pill i { font-style: normal; background: var(--hl); color: var(--dark); border-radius: 10px; padding: 0 .5em; }
.pill .sep { opacity: .5; }
.word-card { background: var(--card); color: var(--cardink); border-radius: 22px; padding: .3em 1.2em; font-weight: 900; font-size: 2em; line-height: 1.5; box-shadow: 0 7px 0 rgba(0,0,0,.25); }
.timer { width: 3.6em; height: 3.6em; border-radius: 50%; background: var(--acc); color: var(--onacc); display: grid; place-items: center; font-weight: 900; font-size: 1.5em; box-shadow: 0 6px 0 var(--accsh); border: 4px solid #fff; flex: none; }
.chips { display: flex; gap: 1vw; flex-wrap: wrap; justify-content: center; }
.chip { background: rgba(0,0,0,.22); border-radius: 20px; padding: .6em .9em .5em; min-width: 6.5em; display: flex; flex-direction: column; align-items: center; gap: .3em; font-weight: 700; transition: transform .2s; }
.chip .av { font-size: 1.3em; }
.chip small { font-weight: 500; font-size: .75em; opacity: .85; }
.chip.now { background: var(--card); color: var(--cardink); transform: scale(1.08); box-shadow: 0 6px 0 rgba(0,0,0,.25); }
.chip.now small { color: var(--bg2); font-weight: 900; opacity: 1; }
.chip.done { opacity: .7; }
.votes { display: flex; gap: 1vw; flex-wrap: wrap; justify-content: center; }
.vote { background: var(--card); color: var(--cardink); border-radius: 20px; padding: .6em .9em; min-width: 6.5em; display: flex; flex-direction: column; align-items: center; gap: .3em; font-weight: 900; box-shadow: 0 6px 0 rgba(0,0,0,.22); }
.vote .av { font-size: 1.3em; }
.dots { display: flex; gap: 4px; min-height: 14px; }
.dots span { width: 14px; height: 14px; border-radius: 50%; background: var(--t1); }
.reveal { display: flex; align-items: center; gap: 1em; }
.reveal .av { font-size: 2.6em; border: 4px solid #fff; }
.reveal.sm .av { font-size: 1.4em; border-width: 3px; }
.stamp { font-weight: 900; font-size: 2.6em; color: var(--mid); border: 6px solid var(--mid); border-radius: 18px; padding: 0 .5em; transform: rotate(-8deg); background: rgba(255,255,255,.94); box-shadow: 0 8px 0 rgba(0,0,0,.2); animation: stamp .35s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes stamp { from { transform: scale(2.2) rotate(-8deg); opacity: 0; } to { transform: rotate(-8deg); opacity: 1; } }
.ribbon { background: var(--acc); color: var(--onacc); font-weight: 900; font-size: 1.6em; padding: .3em 1.2em; border-radius: 16px; transform: rotate(-2deg); box-shadow: 0 7px 0 var(--accsh); }
.ribbon.alt { background: var(--dark); color: #fff; box-shadow: 0 7px 0 rgba(0,0,0,.25); }
.tv-btns { display: flex; gap: 12px; }
.tv-btns .btn { font-size: .9em; padding: .55em 1.2em; }
.split { display: flex; align-items: center; gap: 4vw; width: 100%; justify-content: center; }
.side { display: flex; flex-direction: column; align-items: center; gap: 2vh; flex: 0 1 34%; }
.big-paper { width: min(52vw, 92vh); aspect-ratio: 4/3; transform: rotate(1deg); }
.dgrid { display: flex; gap: 1.6vw; flex-wrap: wrap; justify-content: center; }
.dcard { width: clamp(120px, 17vw, 260px); background: #fff; border-radius: 6px; padding: 8px; color: var(--cardink); position: relative; box-shadow: 0 8px 0 rgba(0,0,0,.22); font-weight: 900; font-size: .85em; }
.dcard:nth-child(odd) { transform: rotate(-2deg); } .dcard:nth-child(even) { transform: rotate(1.5deg); }
.dcard.cur { outline: 6px solid var(--acc); transform: scale(1.06); }
.dcard canvas { display: block; width: 100%; aspect-ratio: 4/3; }
.dcard .num { position: absolute; top: -12px; right: -12px; width: 1.9em; height: 1.9em; border-radius: 50%; background: var(--dark); color: var(--hl); display: grid; place-items: center; z-index: 2; }
.dcard .nm { margin-top: 6px; border-radius: 10px; padding: 3px 4px; display: flex; align-items: center; justify-content: center; gap: 6px; background: var(--card); }
.dcard .nm .av { font-size: .75em; box-shadow: none; }
.nm.ok { background: #4CF2B5; } .nm.no { background: var(--acc); }
.gal .dcard { width: clamp(100px, 13vw, 200px); }
.big-team { font-size: 1.4em; }

/* lobby */
.lobby { display: flex; align-items: center; justify-content: center; gap: 5vw; padding: 3vh 4vw; }
.lob-left { display: flex; flex-direction: column; align-items: center; gap: 2.4vh; }
.ticket { background: #fff; color: var(--cardink); border-radius: 26px; padding: 2vh 2vw; display: flex; flex-direction: column; align-items: center; gap: 1vh; box-shadow: 0 10px 0 rgba(0,0,0,.2); }
.qr { width: min(30vh, 26vw); }
.qr svg { width: 100%; height: auto; display: block; }
.ticket p { margin: 0; font-weight: 700; font-size: .9em; }
.code { font-weight: 900; font-size: 2.4em; letter-spacing: .12em; direction: ltr; display: flex; align-items: center; gap: 10px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: #ccc; display: inline-block; }
.dot.on { background: #18c37e; }
.lob-right { display: flex; flex-direction: column; align-items: center; gap: 2vh; flex: 0 1 46vw; }
.teams { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5vw; width: 100%; }
.tcol { border-radius: 24px; padding: 1.4vh 1vw; min-height: 30vh; display: flex; flex-direction: column; gap: .8vh; border: 3px solid #fff; }
.tcol h3 { margin: 0 0 .5vh; text-align: center; font-weight: 900; }
.tcol.t0 { color: var(--t0ink); }
.pl { display: flex; align-items: center; gap: .6em; background: rgba(255,255,255,.9); color: var(--cardink); border-radius: 14px; padding: .35em .6em; font-weight: 700; text-align: start; }
.pl.off { opacity: .45; }
.empty { opacity: .7; text-align: center; font-size: .85em; }
.rounds { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.rb { width: 2.2em; height: 2.2em; border-radius: 12px; background: rgba(0,0,0,.22); font-weight: 900; }
.rb.on { background: var(--acc); color: var(--onacc); }

@media (max-aspect-ratio: 1/1) {
  .lobby { flex-direction: column; }
  .lob-right { flex: none; width: 92vw; }
  .split { flex-direction: column; }
  .big-paper { width: 86vw; }
  .qr { width: 34vw; }
}

/* ---------- phone ---------- */
.phone-ui { display: flex; flex-direction: column; padding: max(14px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); overflow-y: auto; }
.phone-ui.join { align-items: center; justify-content: center; gap: 14px; text-align: center; }
.join input { width: min(320px, 100%); font: 700 20px Alexandria; padding: 14px; border-radius: 16px; border: 0; text-align: center; color: var(--cardink); }
.p-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.p-head .who { color: #fff; border-radius: 14px; padding: 5px 12px; font-weight: 900; border: 2px solid #fff; white-space: nowrap; }
.p-head .nm { display: flex; align-items: center; gap: 6px; }
.p-head .av { font-size: 14px; box-shadow: none; }
.p-score { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.p-score span { min-width: 34px; text-align: center; border-radius: 10px; padding: 1px 8px; font-weight: 900; border: 2px solid #fff; }
.p-score .t0 { background: var(--t0); color: var(--t0ink); } .p-score .t1 { background: var(--t1); }
.p-body { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding-top: 14px; min-height: 0; }
.p-big { font-weight: 900; font-size: 26px; line-height: 1.45; color: var(--big); }
.p-sub { margin: 0; font-weight: 500; font-size: 16px; line-height: 1.8; }
.hint { margin: 0; color: #fff; background: var(--dark); border-radius: 12px; padding: 6px 12px; font-size: 14px; }
.hl { color: var(--big); font-size: 1.3em; }
.flex { flex: 1; min-height: 8px; }
.opt { align-self: stretch; background: var(--card); color: var(--cardink); border-radius: 16px; padding: 12px; font-weight: 900; font-size: 19px; box-shadow: 0 4px 0 rgba(0,0,0,.25); display: flex; align-items: center; justify-content: center; gap: 10px; }
.opt .av { font-size: 15px; box-shadow: none; }
.opt.sel { background: var(--acc); box-shadow: 0 4px 0 var(--accsh); }
.opt:disabled:not(.sel) { opacity: .55; }
.opt.t0b { background: var(--t0); color: var(--t0ink); } .opt.t1b { background: var(--t1); color: #fff; }
.grid2 { align-self: stretch; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: center; }
.p-body > .btn { align-self: stretch; }
.myturn { background: var(--acc); color: var(--onacc); font-weight: 900; font-size: 22px; border-radius: 16px; padding: 10px; align-self: stretch; animation: pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { to { transform: scale(1.03); } }
.p-timer { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 900; font-size: 18px; }
.p-timer b { background: var(--acc); color: var(--onacc); border-radius: 12px; padding: 2px 10px; }
.pad-wrap { align-self: stretch; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.pad { width: 100%; aspect-ratio: 4/3; touch-action: none; border-radius: 14px; }
.pad::before { display: none; }
.pad canvas { touch-action: none; border-radius: 14px; }
.tools { display: flex; gap: 10px; align-items: center; }
.ink { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.6); }
.ink.on { border-color: #fff; transform: scale(1.15); box-shadow: 0 0 0 3px var(--cardink); }
.clr { background: #fff; color: var(--cardink); border-radius: 12px; padding: 6px 14px; font-weight: 900; }
.mini { width: 100%; aspect-ratio: 4/3; max-height: 32vh; }
.fb { font-weight: 900; border-radius: 12px; padding: 4px 12px; }
.fb.ok { background: #4CF2B5; color: #1C1240; } .fb.no { background: var(--dark); }
.opt.sel, .nm.no { color: var(--onacc); }
.tcol.t1 { color: #fff; }

/* ---------- each game's own home page ---------- */
a.lab-tile { text-decoration: none; }
.logo.hero { font-size: clamp(44px, 9vh, 96px); }
.ghome { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: center; gap: 4vw; padding: 5vh 6vw; overflow-y: auto; }
.gh-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2.6vh; }
.gh-line { margin: 0; font-weight: 700; font-size: clamp(18px, 2.8vh, 28px); line-height: 1.7; }
.gh-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 100%; }
.step { background: var(--card); color: var(--cardink); border-radius: 20px; padding: 14px 12px; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 6px 0 rgba(0,0,0,.18); }
.step .si { font-size: 28px; }
.step b { font-weight: 900; font-size: 18px; }
.step small { font-weight: 500; font-size: 14px; line-height: 1.6; opacity: .8; }
.gh-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.btn.xlb { font-size: 24px; padding: 16px 40px; }
.gh-join { display: flex; gap: 8px; align-items: stretch; }
.gh-join input { width: 160px; font: 900 22px/1.4 Alexandria; padding: 8px 12px; border-radius: 16px; border: 0; text-align: center; color: var(--cardink); background: var(--card); letter-spacing: .15em; text-transform: uppercase; }
.gh-join input:placeholder-shown { letter-spacing: 0; font-size: 18px; font-weight: 700; }
.gh-join input::placeholder { color: var(--cardink); opacity: .45; letter-spacing: 0; }
.gh-art { display: grid; place-items: center; min-height: 40vh; }

/* ألّفها: a hand of secret cards, one of them is the liar */
.gh-cards { position: relative; width: min(40vw, 460px); aspect-ratio: 1; }
.gcard { position: absolute; width: 46%; aspect-ratio: 3/4; left: 27%; top: 14%; background: var(--card); color: var(--cardink); border-radius: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; box-shadow: 0 10px 0 rgba(0,0,0,.22); border: 4px solid #fff; transform-origin: 50% 110%; }
.gcard small { font-weight: 700; font-size: clamp(11px, 1.6vh, 16px); opacity: .7; }
.gcard b { font-weight: 900; font-size: clamp(20px, 3.8vh, 38px); line-height: 1.5; }
.gcard.c1 { transform: rotate(-24deg); } .gcard.c2 { transform: rotate(-8deg); } .gcard.c4 { transform: rotate(24deg); }
.gcard.c3 { transform: rotate(8deg) translateY(-6%); z-index: 2; background: var(--dark); color: var(--hl); }
.gcard.liar small { color: #fff; }
.gh-stamp { position: absolute; z-index: 3; right: 4%; top: 6%; font-weight: 900; font-size: clamp(26px, 5vh, 52px); color: var(--mid); background: rgba(255,255,255,.94); border: 6px solid var(--mid); border-radius: 18px; padding: 0 .4em; transform: rotate(10deg); box-shadow: 0 8px 0 rgba(0,0,0,.2); }

/* رسمها: drawings taped to the page */
.gh-papers { position: relative; width: min(42vw, 520px); aspect-ratio: 1.1; }
.gp { position: absolute; width: 47%; padding: 10px 10px 6px; display: flex; flex-direction: column; align-items: center; }
.gp svg { width: 100%; aspect-ratio: 5/4; display: block; }
.gp span { font-weight: 900; font-size: clamp(14px, 2.2vh, 22px); color: #2B0A12; }
.gp.p1 { right: 2%; top: 0; transform: rotate(5deg); } .gp.p2 { left: 0; top: 24%; transform: rotate(-6deg); z-index: 2; } .gp.p3 { right: 4%; bottom: 0; transform: rotate(2deg); }
.doodle { fill: none; stroke: #2B0A12; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.doodle .o { stroke: #FF7A1A; } .doodle .b { stroke: #1C9BBA; }

@media (max-aspect-ratio: 1/1) {
  .ghome { display: flex; flex-direction: column; align-items: stretch; gap: 18px; padding: 5vh 16px 28px; }
  .gh-art, .gh-text { flex: none; }
  .gh-text { width: 100%; }
  .gh-join input { width: 130px; }
  .gh-text { align-items: center; text-align: center; }
  .gh-art { order: -1; min-height: 0; }
  .logo.hero { font-size: clamp(30px, 10vw, 60px); }
  .gh-art { padding: 3vh 0 2vh; }
  .gh-cards { width: 250px; height: 250px; aspect-ratio: auto; } .gh-papers { width: 320px; height: 350px; aspect-ratio: auto; }
  .gh-stamp { font-size: 26px; }
  .gcard b { font-size: 20px; }
  .gh-steps { grid-template-columns: 1fr; }
  .step { flex-direction: row; align-items: center; gap: 10px; text-align: start; }
  .gh-actions { justify-content: center; }
}

.gcard.liar small:first-child { margin-bottom: 10px; }
/* test bots in the lobby */
.addbot { margin-top: auto; align-self: center; background: transparent; color: inherit; border: 2px dashed currentColor; border-radius: 12px; padding: .3em 1em; font: inherit; font-weight: 700; font-size: .9em; cursor: pointer; opacity: .85; }
.addbot.clear { margin: 0 auto; display: block; }
.pl.bot { opacity: .9; }
.gh-join input:focus { outline: 3px solid var(--acc); outline-offset: 2px; }

/* ---- who said / answered what ---- */
.cw, .said em, .cws .cw { font-style: normal; display: inline-block; background: var(--hl); color: var(--dark); border-radius: 10px; padding: .05em .55em; font-weight: 900; font-size: .9em; line-height: 1.6; }
.chip .cw { margin-top: .15em; }
.chip.now .cw { background: var(--dark); color: var(--hl); }
.cws { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; min-height: 1.4em; }
.vf { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; min-height: 1.6em; }
.vf .av { font-size: .7em; box-shadow: none; }
.votes.sm .vote { min-width: 5.5em; padding: .4em .7em; font-size: .85em; }
.vote.right { outline: 5px solid var(--hl); }
.vlist { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 80vw; }
.vl { display: inline-flex; align-items: center; gap: .4em; background: rgba(0,0,0,.22); border-radius: 99px; padding: .25em .8em .25em .4em; font-weight: 700; font-size: .9em; }
.vl .av { font-size: .7em; box-shadow: none; }
.vl.ok { background: var(--card); color: var(--cardink); }
.feed { display: flex; flex-direction: column; gap: 6px; align-items: stretch; width: 100%; max-width: 22em; }
.fi { display: flex; align-items: center; gap: .5em; background: rgba(0,0,0,.22); border-radius: 14px; padding: .3em .7em .3em .4em; font-weight: 700; animation: fi-in .35s ease both; }
.fi .av { font-size: .75em; box-shadow: none; }
.fi .w { flex: 1; text-align: start; font-weight: 900; }
.fi i { font-style: normal; font-weight: 900; width: 1.5em; height: 1.5em; border-radius: 50%; display: grid; place-items: center; background: #E8364A; color: #fff; }
.fi.ok { background: var(--card); color: var(--cardink); } .fi.ok i { background: #1FAA59; }
@keyframes fi-in { from { transform: translateY(8px); opacity: 0; } }
.awards { display: flex; gap: 1.4vw; flex-wrap: wrap; justify-content: center; }
.aw { background: var(--card); color: var(--cardink); border-radius: 20px; padding: .6em 1.1em; display: flex; flex-direction: column; align-items: center; gap: .15em; box-shadow: 0 6px 0 rgba(0,0,0,.22); min-width: 9em; }
.aw .ic { font-size: 1.6em; line-height: 1.3; }
.aw small { font-weight: 900; opacity: .7; }
.aw b { display: flex; align-items: center; gap: .4em; font-weight: 900; }
.aw b .av { font-size: .7em; box-shadow: none; }
.aw em { font-style: normal; font-size: .8em; opacity: .7; }
.exit { position: absolute; bottom: 2vh; left: 2vw; z-index: 5; background: rgba(0,0,0,.25); color: #fff; border-radius: 99px; padding: .35em 1em; font: inherit; font-weight: 700; font-size: .85em; }

/* phone */
.p-exit { margin-inline-start: 6px; background: rgba(0,0,0,.25); color: #fff; border-radius: 99px; min-width: 28px; height: 28px; padding: 0 8px; font: inherit; font-weight: 900; font-size: 13px; }
.clue-row { display: flex; gap: 8px; align-self: stretch; }
.clue-row input { flex: 1; min-width: 0; font: 900 20px/1.4 Alexandria; padding: 10px 12px; border-radius: 16px; border: 0; text-align: center; color: var(--cardink); background: var(--card); }
.linkbtn { background: none; color: inherit; font: inherit; font-weight: 700; font-size: 15px; text-decoration: underline; opacity: .85; padding: 4px; }
.saids { display: flex; flex-direction: column; gap: 6px; align-self: stretch; }
.said { display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,.2); border-radius: 12px; padding: 5px 10px 5px 6px; font-size: 15px; font-weight: 700; }
.said .av { font-size: 12px; box-shadow: none; }
.said b { margin-inline-end: auto; }
.said.ok { background: var(--card); color: var(--cardink); }
.ocl { display: block; width: 100%; font-size: 13px; font-weight: 700; opacity: .75; }
.opt:has(.ocl) { flex-wrap: wrap; }
.myres { align-self: center; border-radius: 99px; padding: 4px 16px; font-weight: 900; font-size: 18px; background: #E8364A; color: #fff; }
.myres.ok { background: #1FAA59; }
.p-end { align-self: stretch; border-radius: 24px; padding: 16px 12px; background: var(--card); color: var(--cardink); box-shadow: 0 7px 0 rgba(0,0,0,.25); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.p-end.won { background: var(--acc); color: var(--onacc); box-shadow: 0 7px 0 var(--accsh); animation: pop .5s ease both; }
.p-end-t { font-weight: 900; font-size: 30px; line-height: 1.4; }
.p-end-s { display: flex; gap: 8px; }
.p-end-s span { display: flex; align-items: center; gap: 8px; border-radius: 14px; padding: 6px 12px; font-weight: 900; font-size: 14px; border: 2px solid rgba(0,0,0,.15); }
.p-end-s b { font-size: 22px; }
.p-end-s .t0 { background: var(--t0); color: var(--t0ink); } .p-end-s .t1 { background: var(--t1); color: #fff; }
.p-aws { display: flex; flex-direction: column; gap: 8px; align-self: stretch; }
.p-aw { display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,.2); border-radius: 16px; padding: 8px 12px; text-align: start; }
.p-aw.me { background: var(--card); color: var(--cardink); }
.p-aw .ic { font-size: 26px; }
.p-aw div { flex: 1; display: flex; flex-direction: column; }
.p-aw small { font-weight: 900; opacity: .75; font-size: 13px; }
.p-aw b { display: flex; align-items: center; gap: 6px; font-weight: 900; }
.p-aw b .av { font-size: 12px; box-shadow: none; }
.p-aw em { font-style: normal; font-weight: 900; font-size: 20px; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }

/* ---- ألّفها: how to play + step tracker ---- */
.how { display: flex; gap: 2vw; justify-content: center; flex-wrap: wrap; }
.hw { background: var(--card); color: var(--cardink); border-radius: 24px; padding: 1.2em 1em 1em; width: min(19em, 28vw); display: flex; flex-direction: column; align-items: center; gap: .8em; box-shadow: 0 7px 0 rgba(0,0,0,.22); animation: pop .5s ease both; animation-delay: var(--d); }
.hw b { font-weight: 900; font-size: 1.05em; line-height: 1.5; }
.hw-vis { display: flex; gap: .4em; align-items: center; justify-content: center; min-height: 4.6em; flex-wrap: wrap; }
.mph { width: 2.6em; height: 4.2em; border-radius: .6em; border: 3px solid var(--dark); display: grid; place-items: center; font-weight: 900; font-size: .8em; background: #fff; }
.mph.liar { background: var(--dark); color: var(--hl); font-size: 1.5em; width: 1.75em; height: 2.8em; }
.mbub { display: flex; flex-direction: column; align-items: center; gap: .25em; }
.mbub .av { font-size: .9em; box-shadow: none; }
.mbub i { font-style: normal; font-weight: 900; font-size: .8em; background: var(--hl); color: var(--dark); border-radius: 10px; padding: .1em .5em; }
.mvote { position: relative; display: inline-block; }
.mvote .av { font-size: 2.2em; box-shadow: none; }
.mvote em { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-12deg); font-style: normal; font-weight: 900; background: #fff; color: #E8364A; border: 3px solid #E8364A; border-radius: 10px; padding: 0 .4em; white-space: nowrap; animation: pop .4s ease both; animation-delay: 3.4s; }
.trk { display: flex; gap: .4em; background: rgba(0,0,0,.2); padding: .3em; border-radius: 99px; }
.trk span { display: flex; align-items: center; gap: .35em; padding: .25em .8em; border-radius: 99px; font-weight: 900; opacity: .55; font-size: .9em; }
.trk span.done { opacity: .8; }
.trk span.on { opacity: 1; background: var(--card); color: var(--cardink); }
.phone-ui .trk { align-self: center; font-size: 13px; }
.phone-ui .trk span { padding: 4px 8px; }
.phone-ui .trk small { display: none; }
.phone-ui .trk span.on small { display: inline; }
.phone-ui .how { flex-direction: column; gap: 10px; align-self: stretch; font-size: 15px; }
.phone-ui .hw { width: auto; flex-direction: row; padding: 10px 12px; gap: 12px; text-align: start; }
.phone-ui .hw-vis { min-height: 0; flex: none; width: 46%; font-size: 12px; }

/* ================= «منو صوّرها؟» ================= */
.g-sawwarha { background: #FF2E88; --l1: #FFF04D; --l2: #5CE1FF; --l3: #2A0A2E; --lmw: #2A0A2E; --lword: #FFF04D; }
.safe { font-weight: 700; font-size: .95em; background: rgba(0,0,0,.2); border-radius: 99px; padding: .3em 1em; align-self: center; margin: 0; }
.s-prompt { display: flex; align-items: center; gap: .5em; }
.s-emo { font-size: 3em; line-height: 1.2; }
.s-show { display: flex; align-items: center; gap: 4vw; justify-content: center; width: 100%; }
.s-side { display: flex; flex-direction: column; align-items: center; gap: 2vh; max-width: 42vw; }
.polaroid { background: #fff; padding: 12px 12px 44px; border-radius: 6px; box-shadow: 0 10px 0 rgba(0,0,0,.25); transform: rotate(-2.5deg); position: relative; }
.s-show .polaroid img { display: block; max-width: 46vw; max-height: 62vh; border-radius: 3px; object-fit: contain; }
.polaroid.rev { animation: pop .4s ease both; }
.s-owner { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; align-items: center; justify-content: center; gap: .4em; color: var(--cardink); font-weight: 900; }
.s-owner .av { font-size: .8em; box-shadow: none; }
.s-board { display: flex; flex-direction: column; gap: 8px; width: min(640px, 80vw); }
.s-row { display: flex; align-items: center; gap: 10px; background: var(--card); color: var(--cardink); border-radius: 16px; padding: 6px 12px; font-weight: 900; box-shadow: 0 4px 0 rgba(0,0,0,.2); }
.s-row .av { font-size: .8em; box-shadow: none; }
.s-row b { min-width: 6em; text-align: start; }
.s-rank { width: 1.6em; text-align: center; opacity: .6; }
.s-bar { flex: 1; height: 14px; background: rgba(0,0,0,.08); border-radius: 99px; overflow: hidden; }
.s-bar span { display: block; height: 100%; background: var(--bg); border-radius: 99px; }
.s-row em { font-style: normal; font-size: 1.2em; min-width: 1.6em; }
.s-players { min-height: 0; }
.s-pl { display: flex; flex-wrap: wrap; gap: 8px; }
.s-pl .pl { color: var(--cardink); }
/* home art */
.gh-photos { position: relative; width: min(40vw, 500px); aspect-ratio: 1.1; }
.gpx { position: absolute; width: 50%; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 10px 12px; }
.gpx span { width: 100%; aspect-ratio: 1; display: grid; place-items: center; font-size: clamp(50px, 7vw, 90px); background: linear-gradient(135deg, #FFE3F0, #D9F6FF); border-radius: 3px; }
.gpx i { font-style: normal; font-weight: 900; color: #2A0A2E; font-size: clamp(14px, 2vw, 22px); }
.gpx.x1 { right: 0; top: 0; transform: rotate(5deg); } .gpx.x2 { left: 0; top: 18%; transform: rotate(-6deg); z-index: 2; } .gpx.x3 { right: 8%; bottom: 0; transform: rotate(2deg); }
/* phone */
.p-pts { background: var(--acc); color: var(--onacc); border-radius: 99px; padding: 0 8px; font-size: 13px; }
.s-pcard { align-self: stretch; background: var(--card); color: var(--cardink); border-radius: 20px; padding: 12px; display: flex; align-items: center; gap: 10px; font-size: 20px; box-shadow: 0 6px 0 rgba(0,0,0,.22); }
.s-pcard .s-emo { font-size: 38px; }
.s-pcard b { font-weight: 900; line-height: 1.5; text-align: start; }
.btn.s-big { align-self: stretch; font-size: 22px; padding: 22px; }
.s-prev { align-self: stretch; background: #fff; padding: 8px 8px 20px; border-radius: 6px; transform: rotate(-1.5deg); box-shadow: 0 6px 0 rgba(0,0,0,.2); }
.s-prev img { display: block; width: 100%; max-height: 40vh; object-fit: contain; }
.s-own { display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 900; font-size: 24px; }
.s-own .av { font-size: 40px; }
.s-own small { font-size: 15px; opacity: .85; }
.phone-ui.join .btn { width: min(320px, 100%); }
@media (max-aspect-ratio: 1/1) { .gh-photos { width: 300px; height: 300px; aspect-ratio: auto; } }
.gn { white-space: nowrap; }

/* sawwarha lobby box */
.s-lob { align-self: stretch; background: var(--card); color: var(--cardink); border-radius: 28px; padding: 2.2vh 2vw 2.4vh; box-shadow: 0 8px 0 rgba(0,0,0,.22); display: flex; flex-direction: column; align-items: center; gap: 2vh; }
.s-lob-h { display: flex; align-items: center; gap: .4em; font-size: clamp(20px, 3.4vh, 34px); font-weight: 900; }
.s-lob-h b { background: var(--bg); color: #fff; border-radius: 99px; min-width: 1.8em; padding: 0 .4em; text-align: center; }
.s-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.4vh 1vw; }
.s-tile { position: relative; width: clamp(82px, 11vh, 118px); height: clamp(96px, 13.5vh, 140px); border-radius: 20px; background: #F6EEF3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .9vh; font: inherit; color: var(--cardink); animation: pop .35s ease both; }
.s-tile .av { font-size: clamp(24px, 3.6vh, 38px); }
.s-tile b { font-weight: 900; font-size: clamp(13px, 2vh, 19px); max-width: 92%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.5; }
.s-tile i { position: absolute; top: -8px; inset-inline-end: -8px; font-style: normal; font-size: clamp(16px, 2.4vh, 24px); background: #fff; border-radius: 50%; width: 1.6em; height: 1.6em; display: grid; place-items: center; box-shadow: 0 2px 0 rgba(0,0,0,.15); }
.s-tile.off { opacity: .4; }
.s-tile.empty, .s-tile.add { background: transparent; border: 3px dashed rgba(42,10,46,.25); animation: none; }
.s-tile .q { font-size: clamp(28px, 4.4vh, 44px); font-weight: 900; opacity: .35; }
.s-tile.add { cursor: pointer; border-color: var(--bg); color: var(--bg); }
.s-tile.add .q { opacity: 1; }
.s-clear { background: none; border: 0; font: inherit; font-weight: 900; color: var(--bg); font-size: clamp(13px, 1.9vh, 18px); cursor: pointer; }
.s-rounds { display: flex; align-items: center; gap: .6em; font-size: clamp(18px, 2.8vh, 28px); font-weight: 900; }
.s-rounds .rb { background: #F6EEF3; color: var(--cardink); }
.s-rounds .rb.on { background: var(--acc); color: var(--onacc); }

/* sawwarha phone fill */
.s-pcard.sm { padding: 8px 12px; font-size: 16px; } .s-pcard.sm .s-emo { font-size: 28px; }
.s-snap { position: relative; background: #fff; padding: 8px 8px 30px; border-radius: 6px; box-shadow: 0 8px 0 rgba(0,0,0,.22); width: min(78%, 330px); }
.s-snap img { display: block; width: 100%; max-height: 36vh; object-fit: contain; background: #f3f3f3; }
.s-snap.wait { aspect-ratio: 1.2; display: grid; place-items: center; } .s-snap.wait > span { font-size: 54px; opacity: .3; animation: pulse 1.2s ease-in-out infinite; }
.s-snap.tilt { transform: rotate(-2deg); } .s-snap.rev { animation: pop .4s ease both; }
.s-snap > em { position: absolute; left: 0; right: 0; bottom: 4px; font-style: normal; font-weight: 900; color: #2A0A2E; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 16px; }
.s-snap > em .av { font-size: 13px; box-shadow: none; }
.s-snap.mine { outline: 4px solid var(--acc); }
.s-q { font-weight: 900; font-size: 24px; line-height: 1.5; } .s-q small { font-size: 14px; opacity: .7; }
.s-faces { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-self: stretch; }
.s-fb { background: #fff; color: var(--cardink); border-radius: 18px; padding: 10px 4px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; font: inherit; box-shadow: 0 5px 0 rgba(0,0,0,.22); }
.s-fb .av { font-size: 30px; box-shadow: none; }
.s-fb b { font-weight: 900; font-size: 15px; max-width: 95%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.5; }
.s-fb.sel { background: var(--acc); color: var(--onacc); transform: translateY(3px); box-shadow: 0 2px 0 var(--accsh); }
.s-fb.dim { opacity: .45; }
.s-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.s-dots .d { width: 30px; height: 30px; border-radius: 10px; border: 2px dashed rgba(255,255,255,.6); display: grid; place-items: center; }
.s-dots .d.on { border: 0; } .s-dots .d .av { font-size: 15px; box-shadow: none; }
.s-hi { display: flex; flex-direction: column; align-items: center; gap: 10px; } .s-hi .av { font-size: 44px; } .s-hi b { font-size: 26px; font-weight: 900; }
.s-ppl { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.s-ppl span { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.92); color: var(--cardink); border-radius: 14px; padding: 5px 10px; font-weight: 900; font-size: 15px; }
.s-ppl span .av { font-size: 14px; box-shadow: none; }
.s-ppl.st span { position: relative; padding: 6px; } .s-ppl.st span .av { font-size: 24px; }
.s-ppl.st i { position: absolute; bottom: -6px; inset-inline-end: -6px; font-style: normal; font-size: 12px; font-weight: 900; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #2A0A2E; box-shadow: 0 1px 0 rgba(0,0,0,.2); }
.s-ppl.st .ok i { background: #3DBE6A; color: #fff; } .s-ppl.st span:not(.ok):not(.no) { opacity: .55; }
.s-bals { align-self: stretch; display: flex; flex-direction: column; gap: 6px; }
.s-bal { display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,.18); border-radius: 14px; padding: 6px 12px; font-weight: 900; }
.s-bal .av { font-size: 14px; box-shadow: none; } .s-bal b { flex: 1; text-align: start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-bal .ar { opacity: .7; } .s-bal i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; }
.s-bal.ok i { background: #3DBE6A; } .s-bal.no i { background: #E0464E; }

/* sawwarha phone: use the full height */
.s-body { gap: 2vh; }
.s-body .s-pcard.sm { padding: 12px 14px; font-size: 19px; } .s-body .s-pcard.sm .s-emo { font-size: 34px; }
.s-body .s-snap { width: min(88%, 420px); padding: 10px 10px 36px; }
.s-body .s-snap img { max-height: 40vh; }
.s-body .s-snap > em { font-size: 19px; bottom: 6px; } .s-body .s-snap > em .av { font-size: 16px; }
.s-body .s-q { font-size: 28px; }
.s-body .s-fb { padding: 14px 4px 10px; border-radius: 22px; } .s-body .s-fb .av { font-size: 44px; } .s-body .s-fb b { font-size: 17px; }
.s-body .s-dots .d { width: 36px; height: 36px; } .s-body .s-dots .d .av { font-size: 18px; }
.s-body .myres { font-size: 24px; padding: 8px 22px; }
.s-body .s-bal { padding: 9px 14px; font-size: 17px; } .s-body .s-bal .av { font-size: 18px; }
.s-body .s-hi .av { font-size: 72px; } .s-body .s-hi b { font-size: 30px; }
.s-body .s-ppl span { font-size: 17px; padding: 7px 12px; } .s-body .s-ppl span .av { font-size: 17px; }
.s-body .s-ppl.st span .av { font-size: 34px; }
.s-body .btn.s-big { padding: 26px 12px; font-size: 24px; }
.s-body .s-prev img { max-height: 46vh; }

@media (max-height: 760px) {
  .s-body { gap: 1.4vh; }
  .s-body .s-snap img { max-height: 30vh; }
  .s-body .s-snap { padding: 8px 8px 30px; }
  .s-body .s-fb { padding: 10px 4px 8px; } .s-body .s-fb .av { font-size: 34px; }
  .s-body .s-q { font-size: 24px; }
  .s-body .s-ppl.st span .av { font-size: 26px; }
  .s-body .s-bal { padding: 6px 12px; }
  .s-body .s-pcard.sm { padding: 8px 12px; font-size: 17px; }
}

/* lab list + homes on wide/short screens (Fold open) */
.lab-tile .logo.xl { font-size: clamp(26px, 3.8vw, 50px); }
@media (min-width: 820px) { .lab-tiles { flex-wrap: nowrap; } .lab-tile { width: min(360px, 30vw); padding: 26px 14px; } }
@media (min-width: 820px) and (max-height: 700px) { .lab-home { gap: 14px; padding: 14px 16px; } .lab-tile { gap: 12px; padding: 20px 12px; } .lab-tile > span { font-size: 15px; } }
/* wide phone screens (Fold open, landscape): keep the phone column readable */
@media (min-width: 700px) {
  .s-body > :not(.flex) { max-width: 560px; }
  .s-body > .s-pcard, .s-body > .grid2, .s-body > .s-faces, .s-body > .s-bals, .s-body > .btn, .s-body > .s-prev { align-self: center; width: 100%; }
  .s-body .s-snap { width: auto; max-width: 420px; }
  .s-body .s-snap img { max-height: 36vh; width: auto; max-width: 100%; margin: 0 auto; }
  .s-body .s-prev img { max-height: 40vh; }
  .s-body .s-prev { width: auto; max-width: 460px; }
}
@media (min-width: 700px) and (max-height: 700px) {
  .s-body { gap: 1.2vh; }
  .s-body .s-snap img { max-height: 30vh; }
  .s-body .s-prev img { max-height: 32vh; }
  .s-body .s-fb { padding: 8px 4px 6px; } .s-body .s-fb .av { font-size: 30px; }
  .s-body .s-hi .av { font-size: 52px; }
}
/* ألّفها / رسمها phones on wide screens (Fold open, landscape) */
@media (min-width: 700px) {
  .phone-ui .p-body:not(.s-body) > :not(.flex) { max-width: 560px; width: 100%; align-self: center; }
  .phone-ui .p-body:not(.s-body) > .p-big, .phone-ui .p-body:not(.s-body) > .p-sub, .phone-ui .p-body:not(.s-body) > .p-timer { width: auto; }
  .pad-wrap .pad { width: auto; height: min(52vh, 420px); max-width: 100%; }
}

/* صوّرها: match all photos at once */
.s-match { display: flex; align-items: center; justify-content: center; gap: 3vw; width: 100%; }
.s-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.4vh 1.6vw; max-width: 58vw; }
.s-grid.n2, .s-grid.n4 { grid-template-columns: repeat(2, 1fr); }
.s-gp { position: relative; background: #fff; padding: .5vh .5vh 3.2vh; border-radius: 6px; box-shadow: 0 6px 0 rgba(0,0,0,.22); transform: rotate(var(--r)); }
.s-gp img { display: block; width: 100%; height: 22vh; object-fit: cover; border-radius: 3px; }
.s-grid.n2 .s-gp img, .s-grid.n3 .s-gp img { height: 30vh; }
.s-gp b { position: absolute; bottom: .2vh; left: 0; right: 0; text-align: center; color: #2A0A2E; font-weight: 900; font-size: 2.4vh; }
.s-match .s-side { display: flex; flex-direction: column; align-items: center; gap: 2vh; max-width: 34vw; }
.s-match .chips { flex-wrap: wrap; justify-content: center; }
.s-mh { font-weight: 900; font-size: 24px; } .s-mh small { font-size: 15px; background: var(--acc); color: var(--onacc); border-radius: 99px; padding: 2px 10px; margin-inline-start: 6px; }
.s-ml { align-self: stretch; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; min-height: 0; flex: 0 1 auto; padding: 2px 2px 8px; }
.s-mc { display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,.18); border-radius: 18px; padding: 8px; }
.s-mc.set { background: rgba(255,255,255,.22); }
.s-mi { position: relative; flex: none; width: 92px; height: 92px; background: #fff; border-radius: 10px; padding: 4px; display: grid; place-items: center; }
.s-mi img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.s-mi .w { font-size: 30px; opacity: .3; }
.s-mi b { position: absolute; top: -6px; inset-inline-start: -6px; background: var(--acc); color: var(--onacc); border-radius: 50%; width: 24px; height: 24px; display: grid; place-items: center; font-size: 13px; font-weight: 900; }
.s-mf { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.s-mf button { display: flex; flex-direction: column; align-items: center; gap: 2px; background: #fff; color: var(--cardink); border-radius: 12px; padding: 5px 4px 3px; min-width: 56px; flex: 1 0 56px; font: inherit; box-shadow: 0 3px 0 rgba(0,0,0,.2); }
.s-mf button .av { font-size: 18px; box-shadow: none; }
.s-mf button i { font-style: normal; font-weight: 900; font-size: 12px; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.5; }
.s-mf button.sel { background: var(--acc); color: var(--onacc); transform: translateY(2px); box-shadow: 0 1px 0 var(--accsh); }
.s-mc.set .s-mf button:not(.sel) { opacity: .55; }
.s-mo { flex: 1; font-weight: 900; font-size: 18px; }
@media (min-width: 700px) { .s-ml { max-width: 620px; align-self: center; width: 100%; } }

/* صوّرها: أحلى صورة */
.s-gp b .av { font-size: .8em; box-shadow: none; vertical-align: middle; margin-inline-end: .3em; }
.s-bg { align-self: stretch; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.s-bp { position: relative; background: #fff; border-radius: 10px; padding: 6px 6px 4px; display: flex; flex-direction: column; gap: 4px; font: inherit; color: var(--cardink); box-shadow: 0 5px 0 rgba(0,0,0,.22); }
.s-bp img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; display: block; }
.s-bp .w { aspect-ratio: 1; display: grid; place-items: center; font-size: 30px; opacity: .3; }
.s-bp b { display: flex; align-items: center; justify-content: center; gap: 5px; font-weight: 900; font-size: 14px; white-space: nowrap; overflow: hidden; line-height: 1.6; }
.s-bp b .av { font-size: 12px; box-shadow: none; }
.s-bp.own { opacity: .5; }
.s-bp.sel { outline: 5px solid var(--acc); transform: translateY(2px) rotate(-1deg); }
.s-bp i { position: absolute; top: -10px; inset-inline-end: -10px; font-style: normal; font-size: 22px; background: var(--acc); border-radius: 50%; width: 36px; height: 36px; display: grid; place-items: center; }
@media (min-width: 700px) { .s-bg { grid-template-columns: repeat(3, 1fr); max-width: 620px; align-self: center; width: 100%; } }
@media (max-height: 760px) { .s-bp img, .s-bp .w { aspect-ratio: 4/3; } }

.s-wins { display: flex; justify-content: center; align-items: center; gap: 3vw; max-width: 92vw; }
.s-wins .polaroid img { display: block; max-height: 54vh; max-width: 40vw; object-fit: contain; border-radius: 3px; }
.s-wins.n2 .polaroid img { max-width: 36vw; max-height: 48vh; } .s-wins.n3 .polaroid img, .s-wins.n4 .polaroid img { max-width: 24vw; max-height: 40vh; }
.s-wins .polaroid:nth-child(2) { transform: rotate(2.5deg); }
.s-plus { font-style: normal; background: var(--acc); color: var(--onacc); border-radius: 99px; padding: 0 .5em; font-size: .85em; }
@media (max-height: 700px) { .s-wins .polaroid img { max-height: 44vh; } .s-wins.n2 .polaroid img { max-height: 40vh; } .s-wins.n3 .polaroid img, .s-wins.n4 .polaroid img { max-height: 34vh; } }

/* alignment pass (Shaimaa 2026-11-28): nothing may overlap */
.gh-photos { width: min(34vw, 60vh, 440px); aspect-ratio: .75; }
.gpx.x1 { right: 0; top: 0; } .gpx.x2 { left: 0; top: 20%; } .gpx.x3 { right: 6%; bottom: 0; }
@media (max-aspect-ratio: 1/1) { .gh-photos { width: 260px; height: 347px; } }
@media (min-aspect-ratio: 1/1) and (max-height: 640px) {
  .ghome { padding: 3vh 5vw; }
  .gh-text { gap: 1.8vh; }
  .step { padding: 10px; } .step small { display: none; } .step .si { font-size: 22px; } .step b { font-size: 16px; }
  .btn.xlb { font-size: 20px; padding: 12px 30px; }
  .gh-line { font-size: 17px; }
}
.s-tile i { top: -12px; inset-inline-end: -12px; }
.lobby { justify-content: safe center; overflow-y: auto; }
.s-wins { flex-wrap: wrap; row-gap: 3vh; }
.s-wins.n4 .polaroid img { max-width: 18vw; max-height: 34vh; }
.s-wins.n5 .polaroid img { max-width: 14vw; max-height: 24vh; }
@media (max-height: 700px) { .s-wins.n4 .polaroid img { max-height: 30vh; } .s-wins.n5 .polaroid img { max-height: 20vh; } }
/* end screen on short TVs (Fold): keep the title clear of the logo and round */
@media (max-height: 700px) { .tv .reveal .av { font-size: 1.8em; } .tv .s-board { gap: 4px; } .tv .s-row { padding-block: 2px; } .tv .aw { padding: .3em .8em; } }
.tv .center { justify-content: safe center; overflow-y: auto; }
@media (max-height: 700px) { .tv .center { inset: 11vh 0 0; gap: 1.6vh; } }
@media (max-height: 700px) { .phone-ui .p-end { padding: 10px; gap: 6px; } .phone-ui .p-end-t { font-size: 22px; } .phone-ui .p-aw { padding: 5px 10px; } .phone-ui .p-aw .ic { font-size: 20px; } .phone-ui .p-aws { gap: 5px; } }
.lab-home { height: 100%; overflow-y: auto; justify-content: safe center; }

/* صوّرها results: podium + the game's best photos */
.e-wrap { display: flex; align-items: center; justify-content: center; gap: 4vw; width: 100%; }
.e-main { display: flex; flex-direction: column; align-items: center; gap: 2vh; }
.e-title { line-height: 1.4; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 1vw; }
.pod { position: relative; display: flex; flex-direction: column; align-items: center; gap: .6vh; width: clamp(80px, 11vw, 150px); }
.pod .av { font-size: 1.9em; border: 3px solid #fff; }
.pod.p1 .av { font-size: 2.5em; }
.pod b { font-weight: 900; font-size: .95em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.5; }
.pod .blk { width: 100%; border-radius: 14px 14px 0 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: .4em; gap: .1em; background: var(--card); color: var(--cardink); box-shadow: 0 6px 0 rgba(0,0,0,.22); }
.pod .blk em { font-style: normal; font-weight: 900; font-size: 1.3em; }
.pod .blk span { font-weight: 900; font-size: .9em; opacity: .5; }
.pod.p1 .blk { height: 17vh; background: var(--acc); color: var(--onacc); } .pod.p2 .blk { height: 12vh; } .pod.p3 .blk { height: 8vh; }
.pod .crown { position: absolute; top: -1.4em; font-size: 1.3em; }
.pod.empty { width: clamp(80px, 11vw, 150px); }
.e-rest { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.e-rest span { display: inline-flex; align-items: center; gap: 6px; background: rgba(0,0,0,.2); border-radius: 99px; padding: 3px 12px; font-weight: 900; font-size: .8em; }
.e-rest .av { font-size: .8em; box-shadow: none; } .e-rest em { font-style: normal; opacity: .8; }
.e-pics { display: flex; flex-direction: column; align-items: center; gap: 1.6vh; max-width: 40vw; }
.e-ph { font-weight: 900; font-size: 1.05em; background: rgba(0,0,0,.2); border-radius: 99px; padding: 4px 16px; }
.e-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.4vh 1.6vw; }
.e-pic { background: #fff; padding: 6px 6px 4px; border-radius: 5px; box-shadow: 0 6px 0 rgba(0,0,0,.22); transform: rotate(var(--r)); animation: pop .4s ease both; }
.e-pic img { display: block; width: clamp(110px, 15vw, 210px); height: clamp(80px, 13vh, 150px); object-fit: cover; border-radius: 3px; }
.e-pic b { display: flex; align-items: center; justify-content: center; gap: 5px; color: #2A0A2E; font-weight: 900; font-size: .7em; line-height: 1.7; white-space: nowrap; }
.e-pic b .av { font-size: .9em; box-shadow: none; }
.e-wrap .awards { gap: 1vw; } .e-wrap .aw { min-width: 7.5em; padding: .4em .9em; }
@media (max-height: 700px) { .pod.p1 .blk { height: 13vh; } .pod.p2 .blk { height: 9vh; } .pod.p3 .blk { height: 6vh; } .e-pic img { height: 11vh; } .e-main { gap: 1.4vh; } }
@media (max-aspect-ratio: 1/1) { .e-wrap { flex-direction: column; } .e-pics { max-width: 92vw; } .e-strip { grid-template-columns: repeat(3, 1fr); } }
/* phone */
.e-me { flex-direction: row; justify-content: center; gap: 12px; flex-wrap: wrap; }
.e-me .av { font-size: 34px; } .e-me .p-end-t { font-size: 24px; } .e-pts { width: 100%; font-weight: 900; opacity: .8; }
.podium.sm { gap: 8px; align-self: stretch; } .podium.sm .pod { width: 30%; font-size: 15px; } .podium.sm .pod .av { font-size: 26px; } .podium.sm .pod.p1 .av { font-size: 34px; }
.podium.sm .pod.p1 .blk { height: 60px; } .podium.sm .pod.p2 .blk { height: 42px; } .podium.sm .pod.p3 .blk { height: 28px; } .podium.sm .pod .blk em { font-size: 18px; }
.e-strip.sm { display: flex; gap: 12px; overflow-x: auto; align-self: stretch; padding: 8px 4px 12px; }
.e-strip.sm .e-pic { flex: none; } .e-strip.sm .e-pic img { width: 110px; height: 84px; } .e-strip.sm .e-pic b { font-size: 12px; }
.s-body .e-ph { font-size: 15px; }
/* results fit pass */
.s-body > :not(.flex) { flex-shrink: 0; }
.pod.p1 { padding-top: 1.5em; } .pod .crown { top: 0; }
.pod.p1 .blk { height: 13vh; } .pod.p2 .blk { height: 9vh; } .pod.p3 .blk { height: 6vh; }
.e-wrap .awards { flex-wrap: nowrap; } .e-wrap .aw { min-width: 0; padding: .35em .8em; font-size: .78em; }
.e-main { gap: 1.6vh; }
@media (max-height: 700px) { .pod.p1 .blk { height: 10vh; } .pod.p2 .blk { height: 7vh; } .pod.p3 .blk { height: 5vh; } .e-title { font-size: 1.6em; } .e-pic img { height: 9.5vh; width: clamp(100px, 13vw, 180px); } .e-wrap .aw { font-size: .7em; } }
.podium.sm .pod.p1 { padding-top: 0; }
.pod .crown { top: -.25em; }
.p-aws.aw3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.p-aws.aw3 .p-aw { flex-direction: column; text-align: center; gap: 2px; padding: 6px 4px; }
.p-aws.aw3 .p-aw div { align-items: center; } .p-aws.aw3 .p-aw small { font-size: 10px; line-height: 1.5; } .p-aws.aw3 .p-aw b { font-size: 13px; justify-content: center; }
.p-aws.aw3 .p-aw .ic { font-size: 20px; } .p-aws.aw3 .p-aw em { font-size: 14px; }
.e-me { padding: 10px; } .e-me .av { font-size: 28px; }
.s-body .podium.sm .pod.p1 .blk { height: 48px; } .s-body .podium.sm .pod.p2 .blk { height: 34px; } .s-body .podium.sm .pod.p3 .blk { height: 24px; }
.e-strip.sm { justify-content: safe center; }
.pod .blk { height: auto !important; }
.pod.p1 .blk { min-height: 13vh; } .pod.p2 .blk { min-height: 9vh; } .pod.p3 .blk { min-height: 6.5vh; }
@media (max-height: 700px) { .pod.p1 .blk { min-height: 10vh; } .pod.p2 .blk { min-height: 7.5vh; } .pod.p3 .blk { min-height: 6vh; } }
.podium.sm .pod.p1 .blk { min-height: 48px; } .podium.sm .pod.p2 .blk { min-height: 34px; } .podium.sm .pod.p3 .blk { min-height: 26px; }
.e-strip.sm { gap: 8px; } .e-strip.sm .e-pic img { width: 92px; height: 70px; }

/* صوّرها vote: story style (phone) */
.story { position: relative; padding: 0 !important; background: #1a0820; overflow: hidden; }
.story .st-blur { position: absolute; inset: -20px; width: calc(100% + 40px); height: calc(100% + 40px); object-fit: cover; filter: blur(22px) brightness(.7); }
.story .st-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.story .st-wait { position: absolute; inset: 0; display: grid; place-items: center; font-size: 70px; opacity: .3; }
.st-top { position: absolute; top: 0; left: 0; right: 0; padding: max(10px, env(safe-area-inset-top)) 14px 26px; background: linear-gradient(rgba(0,0,0,.55), transparent); display: flex; flex-direction: column; gap: 8px; z-index: 2; }
.st-bar { height: 5px; border-radius: 9px; background: rgba(255,255,255,.35); overflow: hidden; }
.st-bar span { display: block; height: 100%; background: var(--acc); border-radius: 9px; transition-property: width; transition-timing-function: linear; }
.st-n { align-self: center; font-weight: 900; font-size: 13px; opacity: .85; }
.st-sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 40px 12px max(18px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(42,10,46,.88) 38%); display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.st-q { font-weight: 900; font-size: 26px; line-height: 1.5; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.st-sub { margin: 0; font-weight: 700; }
.st-bubs { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 12px; max-width: 520px; }
.st-bubs button { display: flex; flex-direction: column; align-items: center; gap: 5px; background: none; border: 0; color: #fff; font: inherit; width: 70px; }
.st-bubs button .av { font-size: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,.35); transition: transform .15s; }
.st-bubs button b { font-weight: 900; font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.5; }
.st-bubs button:active .av { transform: scale(.92); }
.st-bubs button.on .av { border-color: var(--acc); box-shadow: 0 0 0 5px var(--acc); transform: scale(1.08); }
.st-bubs button.dim { opacity: .4; }
.story .s-dots .d { border-color: rgba(255,255,255,.7); }
@media (max-height: 700px) { .st-bubs button { width: 62px; } .st-bubs button .av { font-size: 26px; } .st-q { font-size: 22px; } .st-sheet { gap: 8px; } }

/* صوّرها vote: story style (TV) */
.st-tv { display: flex; flex-direction: column; align-items: center; gap: 2vh; width: 100%; height: 100%; justify-content: center; }
.st-frame { position: relative; width: min(84vw, 108vh); height: 56vh; border-radius: 26px; overflow: hidden; background: #1a0820; box-shadow: 0 12px 0 rgba(0,0,0,.25); }
.st-frame .st-blur { position: absolute; inset: -30px; width: calc(100% + 60px); height: calc(100% + 60px); object-fit: cover; filter: blur(28px) brightness(.7); }
.st-frame .st-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.st-frame .st-q, .st-frame .st-who { position: absolute; left: 0; right: 0; bottom: 0; padding: 4vh 0 2vh; background: linear-gradient(transparent, rgba(42,10,46,.85)); font-weight: 900; font-size: 1.8em; display: flex; justify-content: center; align-items: center; gap: .4em; }
.st-frame .st-who { color: var(--acc); animation: pop .4s ease both; } .st-frame .st-who .av { font-size: .9em; }
.st-tbar { position: absolute; top: 14px; left: 18px; right: 18px; height: 6px; border-radius: 9px; background: rgba(255,255,255,.35); overflow: hidden; }
.st-tbar span { display: block; height: 100%; background: var(--acc); animation: st-shrink linear forwards; transform-origin: right; }
.st-tv.rev .st-tbar { display: none; }
@keyframes st-shrink { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.st-row { display: flex; justify-content: center; gap: 2vw; flex-wrap: wrap; }
.sb { position: relative; display: flex; flex-direction: column; align-items: center; gap: .4vh; min-width: 6.5em; }
.sb > .av { font-size: 1.7em; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,.3); }
.sb b { font-weight: 900; font-size: .85em; white-space: nowrap; }
.sb .vf { display: flex; gap: 2px; min-height: 1.3em; }
.sb .vf .av { font-size: .55em; box-shadow: none; border-radius: 50%; }
.sb.right > .av { border-color: var(--acc); box-shadow: 0 0 0 5px var(--acc); transform: scale(1.12); }
.sb.dim { opacity: .45; }
.st-meta { display: flex; align-items: center; gap: 1.6vw; }
.st-meta .tv-timer { width: 2.4em; height: 2.4em; font-size: 1em; }
@media (max-height: 700px) { .st-frame { height: 50vh; } .st-tv { gap: 1.4vh; } }
@keyframes st-shrink { from { transform: scaleX(var(--s, 1)); } to { transform: scaleX(0); } }
.e-strip.sm { flex-wrap: wrap; overflow: visible; justify-content: center; row-gap: 12px; }

/* ===== special rounds: صوّر الحين / روليت الألبوم / زووم ===== */
.k-tag { display: inline-flex; align-items: center; gap: .5em; background: var(--dark); color: #fff; border-radius: 99px; padding: .35em 1em .35em .5em; font-size: 1.1em; box-shadow: 0 5px 0 rgba(0,0,0,.25); animation: pop .4s ease both; line-height: 1.6; }
.k-tag > span { width: 1.8em; height: 1.8em; border-radius: 50%; background: var(--acc); display: grid; place-items: center; font-size: 1em; }
.k-tag b { font-weight: 900; color: var(--acc); }
.k-tag small { font-weight: 700; opacity: .85; font-size: .78em; }
.tv .k-tag { font-size: 1.5em; margin-bottom: 1.5vh; }
.k-tag.sm { align-self: center; font-size: 15px; flex-wrap: wrap; justify-content: center; max-width: 100%; }
@keyframes st-zoom { from { transform: scale(4.5); } to { transform: scale(1); } }
.st-tv.zoom .st-img, .story .st-img.zm { animation-name: st-zoom; animation-timing-function: cubic-bezier(.35,0,.65,1); animation-fill-mode: both; will-change: transform; }
.zpts { display: inline-flex; align-items: center; gap: .3em; background: var(--acc); color: var(--dark); font-weight: 900; border-radius: 99px; padding: .15em .8em; line-height: 1.6; }
.zpts.low { background: rgba(255,255,255,.25); color: #fff; }
.st-meta .zpts { font-size: 1.2em; }
.st-n .zpts { font-size: 13px; margin-inline-start: 6px; }

/* phones: start button above the fold (logo, line, buttons, then the steps) */
@media (max-aspect-ratio: 1/1) {
  .ghome { padding-top: 2vh; gap: 10px; }
  .gh-art { padding: 1vh 0 0; }
  .gh-photos { width: min(230px, 60vw); height: min(250px, 30vh); }
  .gpx span { font-size: min(50px, 6vh); }
  .gh-text { gap: 14px; }
  .gh-text .gh-actions { order: 1; }
  .gh-text .gh-steps { order: 2; }
  .gh-text .safe, .gh-text .lab-note { order: 3; }
  .gh-line { font-size: 18px; margin: 0; }
}
@media (max-aspect-ratio: 1/1) {
  .gh-photos { display: flex; justify-content: center; align-items: center; gap: 4%; width: min(340px, 92vw); height: auto; aspect-ratio: auto; padding: 8px 0; }
  .gh-photos .gpx { position: static; width: 30%; padding: 6px 6px 8px; gap: 4px; }
  .gh-photos .gpx span { font-size: min(44px, 11vw); }
  .gh-photos .gpx i { font-size: 14px; }
  .gh-photos .gpx.x2 { margin-top: 18px; }
}

/* ===== free game ===== */
.free-tag { align-self: center; background: var(--dark); color: var(--acc); font-weight: 900; border-radius: 99px; padding: .3em 1.1em; line-height: 1.6; }
.free-tag.done { color: #fff; opacity: .9; }
.s-rounds .rb.lock { opacity: .55; position: relative; }
.s-rounds .rb.lock i { position: absolute; top: -.7em; inset-inline-end: -.5em; font-style: normal; font-size: .7em; }
.lab-tools { display: flex; gap: 8px; align-self: center; padding: 4px; flex-wrap: wrap; justify-content: center; }
.lab-tools button { background: rgba(255,255,255,.14); color: #fff; font: inherit; font-weight: 700; font-size: 13px; border-radius: 9px; padding: 4px 10px; }
.free-end { display: flex; flex-direction: column; align-items: center; gap: 1vh; margin-top: 1vh; }
.fe-h { font-weight: 900; font-size: 1.1em; }
.lk-row { display: flex; gap: 1vw; flex-wrap: wrap; justify-content: center; }
.lk { display: inline-flex; align-items: center; gap: .4em; background: var(--dark); border-radius: 99px; padding: .3em .9em .3em .4em; line-height: 1.6; white-space: nowrap; }
.lk i { font-style: normal; width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--acc); display: grid; place-items: center; }
.lk b { font-weight: 900; font-size: .9em; }
.s-rounds .rb.lock { display: inline-flex; align-items: center; gap: .15em; }
.s-rounds .rb.lock i { position: static; font-size: .55em; }
