/* משחק הגברממים: the game page. The site's tokens and look (violet, gold, paper, 2 px black lines, hard 3 px black
   offset shadows, 6 px radius, Heebo), phone first, every game screen inside the visual viewport (no page scroll). */
@font-face {
  font-family: 'Heebo';
  src: url('fonts/heebo.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --dur-instant: 90ms; --dur-fast: 160ms; --dur-base: 240ms; --dur-medium: 360ms; --dur-slow: 560ms;
  --ease-out: cubic-bezier(.16, 1, .3, 1); --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-in: cubic-bezier(.55, 0, 1, .45); --ease-pop: cubic-bezier(.34, 1.36, .64, 1);
  --violet: #381883; --violet-2: #2c1268; --violet-3: #4a23a8; --purple: #8c30fe;
  --gold: #ffde59; --gold-ink: #2b1a00; --ink: #fff; --ink-2: #d9cdfa; --ink-3: #a99ad8;
  --paper: #fffaf0; --paper-ink: #1a0d40; --line: #000; --red: #d93a3a;
  --shadow: 3px 3px 0 #000; --shadow-lg: 6px 6px 0 #000; --radius: 6px;
  --focus-ring: 0 0 0 2px var(--violet), 0 0 0 4px var(--gold);
  --vvh: 100dvh; --vvt: 0px;
}
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; overflow: hidden; }
body {
  margin: 0; height: 100%; overflow: hidden; background: var(--violet); color: var(--ink);
  font: 16px/1.45 Heebo, system-ui, sans-serif; -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: url('../ui/bg-swirl.webp') center / 760px repeat; opacity: .13;
}
img { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:where(a, button, input, [tabindex]):focus-visible { outline: none; box-shadow: var(--focus-ring); }
bdi { unicode-bidi: isolate; }

/* ---------- the app frame: the visual viewport, so the keyboard never pushes the page */
.app {
  position: fixed; inset-inline: 0; top: var(--vvt); height: var(--vvh);
  margin-inline: auto; width: 100%; max-width: 520px;
  display: flex; flex-direction: column; overflow: hidden;
}
.stage { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); overflow: hidden; }
.stage--home, .stage--new, .stage--gate { overflow-y: auto; }
.screen { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.loading { margin: auto; color: var(--ink-2); font-weight: 700; }

/* ---------- top strip and timer */
.bar {
  flex: none; height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0 12px 0 6px; background: var(--violet-2); border-bottom: 2px solid #000;
}
.bar__round { display: flex; align-items: baseline; gap: 8px; min-width: 0; font-size: 14px; color: var(--ink-2); white-space: nowrap; overflow: hidden; }
.bar__round b { color: var(--gold); font-size: 16px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; }
.bar__menu { display: flex; align-items: center; gap: 4px; min-width: 48px; height: 44px; padding: 0 6px; background: none; border: 0; color: var(--ink); font-weight: 700; }
.bar__icon { width: 34px; height: 34px; object-fit: contain; }
.bar__icon + .bar__menu-t { display: none; }
.timer { flex: none; height: 8px; background: var(--violet-2); border-bottom: 2px solid #000; overflow: hidden; }
.timer__fill { height: 100%; background: var(--gold); transform-origin: right center; transform: scaleX(0); }
[dir="rtl"] .timer__fill { transform-origin: right center; }
.timer.is-low .timer__fill { background: #ff8a3d; }
.weak { flex: none; padding: 4px 12px; font-size: 13px; text-align: center; color: var(--gold-ink); background: var(--gold); border-bottom: 2px solid #000; }

/* ---------- buttons */
.gbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 8px 20px; border: 2px solid #000; border-radius: var(--radius);
  font-weight: 900; font-size: 18px; text-decoration: none; box-shadow: var(--shadow); user-select: none;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), opacity var(--dur-fast);
}
.gbtn--gold { background: var(--gold); color: var(--gold-ink); }
.gbtn--violet { background: var(--violet-3); color: #fff; min-height: 48px; font-size: 16px; font-weight: 700; }
.gbtn--danger { background: var(--red); color: #fff; }
.gbtn:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; transition-duration: var(--dur-instant); }
@media (hover: hover) { .gbtn:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 #000; } }
.gbtn:disabled { opacity: .55; cursor: default; box-shadow: none; }
.gbtn .btn__icon { width: 30px; height: 30px; object-fit: contain; margin-inline-start: -6px; }
.quiet {
  background: none; border: 0; padding: 10px 6px; min-height: 44px; color: var(--ink-2); font-weight: 700;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px;
}
.quiet:hover { color: #fff; }
a.quiet { display: inline-flex; align-items: center; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 8px; background: none; border: 0; color: var(--ink-2); font-weight: 700; }
.back__arrow { font-size: 20px; line-height: 1; }
.breathe { animation: breathe 2.6s var(--ease-in-out) infinite; }
@keyframes breathe { 50% { transform: scale(1.035); } }
.bob { animation: bob 3.4s var(--ease-in-out) infinite; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-1.5deg); } }

/* ---------- type */
.title { margin: 6px 0 0; font: 900 40px/1.05 Heebo, sans-serif; color: var(--gold); text-shadow: 3px 3px 0 #000; text-align: center; text-wrap: balance; }
.title--sm { font-size: 28px; }
.h1 { margin: 0; font: 900 30px/1.1 Heebo, sans-serif; color: var(--gold); text-shadow: 3px 3px 0 #000; }
.lead { margin: 8px 0 0; color: var(--ink-2); text-align: center; text-wrap: balance; font-size: 17px; }
.label { display: block; font-weight: 700; color: var(--ink-2); font-size: 15px; margin: 0 0 6px; }
.note, .sheet__note { color: var(--ink-3); font-size: 14px; text-align: center; margin: 10px 0 0; text-wrap: balance; }
.err { margin: 6px 0 0; min-height: 0; color: #ffb3b3; font-weight: 700; font-size: 15px; }
.err:empty { display: none; }
.status { margin: 10px 0 0; text-align: center; font-weight: 700; color: var(--gold); }
.wait { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; color: var(--ink-2); font-weight: 700; font-size: 17px; text-align: center; }
.wait__mc { width: 64px; height: 64px; object-fit: contain; }
.late { margin: 6px 0 0; text-align: center; color: var(--ink-2); font-weight: 700; }

/* ---------- fields */
.field {
  width: 100%; min-height: 52px; padding: 10px 12px; border: 2px solid #000; border-radius: var(--radius);
  background: var(--paper); color: var(--paper-ink); font-size: 18px; box-shadow: var(--shadow);
}
.field::placeholder { color: #8b7fae; }
.field--code { font: 900 34px/1 Heebo, sans-serif; letter-spacing: .3em; text-align: center; direction: ltr; }
.frow { position: relative; }
.counter { position: absolute; inset-inline-start: 10px; bottom: -18px; font-size: 12px; color: var(--ink-2); }
/* smaller / bigger text for a caption line (17.11.2026): two buttons inside the field's end; the field keeps its focus */
.frow--sized .field { padding-inline-end: 106px; }
.fsize { position: absolute; inset-block: 0; inset-inline-end: 6px; display: flex; align-items: center; gap: 6px; }
.fsize__b { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 2px solid #000; border-radius: 12px;
  background: var(--violet-2); color: #fff; font: 900 16px/1 Heebo, sans-serif; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.fsize__b img { width: 30px; height: 30px; object-fit: contain; pointer-events: none; }
.fsize__b:disabled { opacity: .35; }
.fsize__b:active:not(:disabled) { transform: translateY(1px); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 2px solid #000; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.seg__b { min-height: 46px; border: 0; border-inline-start: 2px solid #000; background: var(--violet-2); color: var(--ink-2); font-weight: 700; }
.seg__b:first-child { border-inline-start: 0; }
.seg__b[aria-checked="true"] { background: var(--gold); color: var(--gold-ink); font-weight: 900; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.toggle__l { display: flex; flex-direction: column; gap: 2px; }
.toggle__l span { color: var(--ink-3); font-size: 14px; }
.switch { width: 52px; height: 30px; accent-color: var(--gold); flex: none; }

/* ---------- avatars (Flow art; a missing file leaves the name) */
.av { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.av__img { width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(2px 2px 0 rgba(0,0,0,.55)); }
.av--xs .av__img { width: 24px; height: 24px; filter: none; }
.av--sm .av__img { width: 36px; height: 36px; }
.av--md .av__img { width: 56px; height: 56px; }
.av--lg .av__img { width: 84px; height: 84px; }
.av--xl .av__img { width: 132px; height: 132px; }
.av__name { max-width: 84px; font-size: 13px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.av.is-dim { opacity: .45; }
.av.is-dim .av__img { filter: grayscale(.7); }
.av__stamp { position: absolute; top: 18%; inset-inline: -8px; display: grid; place-items: center; transform: rotate(-8deg); pointer-events: none; }
.av__stamp > * { grid-area: 1 / 1; }
.av__stampimg { width: 100%; height: auto; }
.av__stamp span { font-weight: 900; font-size: 13px; color: #2c1268; }

/* ---------- toasts */
.toasts { position: fixed; inset-inline: 0; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  max-width: min(480px, calc(100vw - 32px)); padding: 10px 16px; border: 2px solid #000; border-radius: var(--radius);
  background: var(--paper); color: var(--paper-ink); font-weight: 700; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(10px); transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.toast.is-in { opacity: 1; transform: none; }

/* ---------- layers (sheets): Back and Escape close them */
.layer { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.scrim { position: absolute; inset: 0; background: rgba(12, 4, 32, .62); opacity: 0; transition: opacity var(--dur-medium) var(--ease-out); }
.sheet {
  position: relative; width: 100%; max-width: 520px; max-height: calc(var(--vvh) - 24px); overflow-y: auto;
  background: var(--violet-2); border: 2px solid #000; border-bottom: 0; border-radius: 10px 10px 0 0;
  box-shadow: 0 -3px 0 #000; padding: 0 16px calc(16px + env(safe-area-inset-bottom));
  transform: translateY(16%); opacity: 0;
  transition: transform var(--dur-medium) var(--ease-out), opacity var(--dur-medium) var(--ease-out);
}
.layer.is-in .scrim { opacity: 1; }
.layer.is-in .sheet { transform: none; opacity: 1; }
.layer.is-out .scrim { opacity: 0; transition-duration: var(--dur-base); transition-timing-function: var(--ease-in); }
.layer.is-out .sheet { transform: translateY(12%); opacity: 0; transition-duration: var(--dur-base); transition-timing-function: var(--ease-in); }
.layer.is-out { pointer-events: none; }
@media (min-width: 700px) { .layer { align-items: center; } .sheet { border-bottom: 2px solid #000; border-radius: 10px; box-shadow: var(--shadow-lg); } }
.sheet__head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 0 8px; background: var(--violet-2); }
.sheet__title { margin: 0; font: 900 22px/1.2 Heebo, sans-serif; color: var(--gold); }
.sheet__x { width: 48px; height: 48px; border: 2px solid #000; border-radius: var(--radius); background: var(--violet-3); color: #fff; font-size: 18px; box-shadow: var(--shadow); }
.sheet__body { display: flex; flex-direction: column; gap: 10px; }
.sheet__body > .gbtn { width: 100%; }
.sheet__text { margin: 0; color: var(--ink-2); }
.sheet__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.how { display: flex; gap: 10px; align-items: flex-start; margin: 0; color: var(--ink); }
.how__n { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid #000; border-radius: var(--radius); background: var(--gold); color: var(--gold-ink); }
.menu { display: flex; flex-direction: column; }
.menu__i { min-height: 52px; padding: 0 4px; text-align: start; background: none; border: 0; border-bottom: 1px solid rgba(255,255,255,.12); color: #fff; font-weight: 700; font-size: 17px; }
.menu__i.is-danger { color: #ffb3b3; }
.who { display: flex; flex-direction: column; }
.who__row { display: flex; align-items: center; gap: 10px; min-height: 56px; border-bottom: 1px solid rgba(255,255,255,.12); }
.who__n { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who__st { font-size: 13px; color: var(--ink-3); }
.who__st.is-on { color: #8ff0a4; }
.who__tag { font-size: 12px; font-weight: 900; color: var(--gold-ink); background: var(--gold); border: 2px solid #000; border-radius: var(--radius); padding: 0 6px; }
.who__kick { font-size: 14px; color: #ffb3b3; }
.avgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.avpick { display: grid; place-items: center; min-height: 72px; border: 2px solid transparent; border-radius: var(--radius); background: var(--violet-3); }
.avpick.is-on { border-color: #000; background: var(--gold); box-shadow: var(--shadow); }
.avpick:disabled { opacity: .35; }

/* ---------- play home, new game, gate */
.home, .gate, .form { flex: 1; display: flex; flex-direction: column; gap: 14px; min-height: min-content; }
.home { justify-content: center; }
.home__main { margin-block: auto; display: flex; flex-direction: column; gap: 14px; }
.hero { display: flex; flex-direction: column; align-items: center; }
.hero__mc { width: min(46vw, 190px); height: auto; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(4px 4px 0 rgba(0,0,0,.5)); }
.hero--gate .hero__mc { width: min(36vw, 150px); }
.actions { display: flex; flex-direction: column; gap: 12px; }
.actions .gbtn { width: 100%; }
.foot { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 16px; margin-top: auto; }
.mine { padding: 10px 12px; border: 2px solid #000; border-radius: var(--radius); background: var(--violet-2); box-shadow: var(--shadow); }
.mine__title { margin: 0 0 6px; font-size: 16px; color: var(--gold); }
.mine__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mine__name { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.form .lead { text-align: start; margin: 0; }
.field-row { display: flex; flex-direction: column; gap: 4px; }
.form__go { margin-top: auto; padding-top: 6px; }
.form__go .gbtn { width: 100%; }
.me__row { display: flex; align-items: center; gap: 12px; }
.me__av { flex: none; display: grid; place-items: center; width: 84px; height: 84px; }
.me__col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }

/* ---------- lobby */
.lobby { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lobby__code { display: flex; flex-direction: column; align-items: center; }
.lobby__code .label { margin: 0; }
.code { font: 900 64px/1 Heebo, sans-serif; color: var(--gold); text-shadow: 3px 3px 0 #000; letter-spacing: .08em; direction: ltr; }
.lobby__qr { flex: 0 1 auto; min-height: 0; display: flex; }
.qr { width: min(180px, 24vh); height: auto; aspect-ratio: 1; border: 2px solid #000; border-radius: var(--radius); box-shadow: var(--shadow); image-rendering: pixelated; }
.bench { flex: 1; min-height: 0; width: 100%; display: flex; flex-wrap: wrap; align-content: flex-start; justify-content: center; gap: 8px 12px; overflow: hidden; padding-top: 4px; }
.bench .av { animation: pop var(--dur-medium) var(--ease-pop) both; }
.bench__me { background: none; border: 2px dashed rgba(255, 222, 89, .7); border-radius: var(--radius); padding: 2px 4px; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.lobby__tv { margin: 0; font-weight: 700; color: #8ff0a4; }
.lobby__set { margin: 0; color: var(--ink-3); font-size: 14px; }
.lobby__go { width: 100%; }
.lobby__go .gbtn { width: 100%; }

/* ---------- intro */
.intro { margin: auto 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; animation: introIn var(--dur-medium) var(--ease-out) both; }
@keyframes introIn { from { transform: translateX(calc(var(--dir, -1) * -24px)); opacity: 0; } }
.intro__art { width: min(52vw, 220px); height: auto; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(4px 4px 0 rgba(0,0,0,.5)); }
.intro__n { margin: 0; color: var(--ink-2); font-weight: 700; }
.intro__name { margin: 0; font: 900 36px/1.1 Heebo, sans-serif; color: var(--gold); text-shadow: 3px 3px 0 #000; text-wrap: balance; }
.intro__rule { margin: 0; font-size: 18px; color: #fff; text-wrap: balance; max-width: 26em; }
.intro__final { margin: 4px 0 0; font-weight: 900; color: var(--gold); }

/* ---------- ribbon (Flow art; text set in Heebo over it) */
.ribbon { position: relative; display: grid; place-items: center; width: min(100%, 420px); margin: 0 auto; }
.ribbon > * { grid-area: 1 / 1; }
.ribbon__img { width: 100%; height: auto; }
.ribbon__t { position: relative; padding: 0 18%; font-weight: 900; font-size: 18px; color: var(--gold-ink); text-align: center; line-height: 1.1; transform: translateY(-6%); }
.ribbon__img + .ribbon__t { color: var(--gold-ink); }
.ribbon:not(:has(img)) .ribbon__t { color: var(--gold); text-shadow: 2px 2px 0 #000; font-size: 20px; padding: 6px 0; }

/* ---------- writing */
.write { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.preview { position: relative; flex: 0 1 auto; min-height: 0; max-height: 45%; display: flex; justify-content: center; }
html.kb .preview { flex: none; height: calc(var(--vvh) * .3); max-height: none; }
html.kb .preview .meme { height: 100%; width: auto; }
html.kb .write .rule, html.kb .write .line, html.kb .write .count, html.kb .write #swapBtn { display: none; }
html.kb .write__actions { grid-template-columns: 1fr !important; }
html.kb .digits__mc { display: none; }
.meme { display: block; align-self: center; flex: none; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border: 2px solid #000; border-radius: var(--radius); box-shadow: var(--shadow); background: #fff; }
.preview .meme { cursor: text; }
.stamp { position: absolute; top: 10px; inset-inline-start: 10px; display: grid; place-items: center; transform: rotate(-10deg); animation: stampIn var(--dur-medium) var(--ease-pop) both; pointer-events: none; }
.stamp > * { grid-area: 1 / 1; }
.stamp__img { width: 120px; height: auto; }
.stamp__t { font: 900 24px/1 Heebo, sans-serif; color: #2c1268; }
.stamp:not(:has(img)) .stamp__t { padding: 4px 10px; border: 3px solid #2c1268; border-radius: var(--radius); background: rgba(255,250,240,.9); }
@keyframes stampIn { from { transform: rotate(-10deg) scale(1.6); opacity: 0; } }
.line { margin: 0; font-size: 14px; color: var(--ink-2); text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.line__k { font-weight: 700; color: var(--ink-3); }
.rule { margin: 0; text-align: center; font-weight: 700; color: var(--gold); font-size: 15px; text-wrap: balance; }
.fields { display: flex; flex-direction: column; gap: 14px; }
.field--cap { font-size: 18px; min-height: 52px; }
textarea.field--cap { display: block; resize: none; overflow: hidden; font: inherit; font-size: 18px; line-height: 1.35; }
.sent { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.sent__t { margin: 0; font-weight: 700; color: #fff; }
.count { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: auto; }
.count__t { font-size: 14px; color: var(--ink-2); font-weight: 700; }
.count__avs { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.write__actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
.write__actions .gbtn { width: 100%; }
.write__actions:has(> .gbtn--violet:not([hidden])) { grid-template-columns: 2fr 1fr; }
.digits { position: absolute; top: 6px; inset-inline-end: 6px; display: flex; align-items: center; gap: 2px; pointer-events: none; }
.digits__mc { width: 64px; height: 64px; object-fit: contain; }
.digits__n { font: 900 46px/1 Heebo, sans-serif; color: var(--gold); text-shadow: 3px 3px 0 #000; min-width: 1.2em; text-align: center; }

/* ---------- reveal */
.rev { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.rev__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; }
.rev__n { font-weight: 900; color: var(--gold); font-size: 18px; }
.rev__left { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); font-weight: 700; }
.tokens { display: inline-flex; gap: 2px; }
.token { width: 30px; height: 30px; object-fit: contain; }
.token--sm { width: 24px; height: 24px; }
.rev__stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.rev__meme { max-height: 100%; }
.rev__meme.is-in { animation: memeIn var(--dur-medium) var(--ease-out) both; }
@keyframes memeIn { from { transform: translateX(calc(var(--dir, -1) * -18px)) scale(.97); opacity: 0; } }
.rev__mine { margin: 0; text-align: center; font-weight: 900; color: var(--gold); }
.rev__actions { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; }
.rev__actions .gbtn { width: 100%; }
.rev__actions:has(> :only-child) { grid-template-columns: 1fr; }
.floats { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.float { position: absolute; bottom: 4%; width: 44px; height: 44px; object-fit: contain; }
.flytoken { position: absolute; width: 48px; height: 48px; z-index: 3; pointer-events: none; }

/* ---------- crowns summary */
.cr { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.cr__head { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cr__left { display: flex; align-items: center; gap: 6px; font-weight: 900; font-size: 18px; color: var(--gold); }
.hint { margin: 0; font-size: 14px; color: var(--ink-2); }
.cr__pic { display: flex; justify-content: center; max-height: 96px; }
.cr__img { max-height: 96px; width: auto; border: 2px solid #000; border-radius: var(--radius); }
.cards { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(0, 1fr); gap: 8px; }
.card {
  position: relative; display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 64px; overflow: hidden;
  padding: 8px 10px 6px; border: 2px solid #000; border-radius: var(--radius); background: var(--paper); color: var(--paper-ink);
  text-align: start; box-shadow: var(--shadow); font-weight: 700; font-size: 15px; line-height: 1.25;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast);
}
.card.is-on { background: #fff3c0; }
.card.is-mine { background: #e6dcfb; opacity: 1; }
.card:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; }
.card__n { position: absolute; top: 2px; inset-inline-end: 6px; font-size: 12px; color: #7a6aa8; }
.card__t, .card__a { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; overflow-wrap: anywhere; }
.card__t { color: #4a3a80; font-size: 13px; -webkit-line-clamp: 2; }
.card__crowns { display: flex; align-items: center; gap: 2px; min-height: 24px; }
.card__mine { font-size: 12px; font-weight: 900; color: var(--violet-3); }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; }
.pager:empty { display: none; }
.pager__b { width: 48px; height: 48px; border: 2px solid #000; border-radius: var(--radius); background: var(--violet-3); color: #fff; font-size: 20px; box-shadow: var(--shadow); }
.pager__b:disabled { opacity: .4; box-shadow: none; }
.pager__t { font-weight: 700; color: var(--ink-2); }
.cr__actions { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
.cr__actions .quiet { align-self: center; }
.again { display: flex; justify-content: center; max-height: 58vh; }
.again .meme { max-height: 58vh; }

/* ---------- results */
.res { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.res__win { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 0; flex: 0 1 auto; }
.res__memebox { position: relative; display: flex; justify-content: center; min-height: 0; }
.res__meme { max-height: 30vh; max-height: calc(var(--vvh) * .32); }
.drop { position: absolute; top: -22px; inset-inline-start: -14px; width: 56px; height: 56px; transform: rotate(-16deg); animation: drop var(--dur-slow) var(--ease-pop) .2s both; filter: drop-shadow(2px 2px 0 rgba(0,0,0,.6)); }
@keyframes drop { from { transform: translateY(-80px) rotate(-30deg); opacity: 0; } }
.res__who { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.res__note { margin: 0; text-align: center; color: var(--gold); font-weight: 700; font-size: 14px; }
.res__rows { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.res__row { display: flex; justify-content: space-between; gap: 8px; padding: 4px 8px; border-radius: var(--radius); font-size: 15px; }
.res__row.is-me { background: rgba(255, 222, 89, .14); }
.res__n { font-weight: 900; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res__l { color: var(--ink-2); white-space: nowrap; }
.res__mine { margin: 0; text-align: center; font-size: 14px; color: var(--ink-2); }
.res__empty { margin: auto; display: flex; flex-direction: column; align-items: center; }
.res__mc { width: 150px; height: auto; }
.table { display: flex; flex-direction: column; gap: 2px; margin-top: auto; padding: 6px 8px; border: 2px solid #000; border-radius: var(--radius); background: var(--violet-2); box-shadow: var(--shadow); }
.table__row { display: flex; align-items: center; gap: 8px; min-height: 30px; font-size: 15px; }
.table__row.is-me { color: var(--gold); }
.table__rank { width: 1.4em; text-align: center; font-weight: 900; color: var(--ink-3); }
.table__n { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table__p { font-weight: 900; }

/* ---------- podium */
.fin { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.fin__mc { width: 96px; height: 96px; object-fit: contain; }
.fin__title { margin: 0; font: 900 26px/1.15 Heebo, sans-serif; color: var(--gold); text-shadow: 3px 3px 0 #000; text-align: center; text-wrap: balance; }
.podium { position: relative; width: 100%; max-width: 420px; flex: 0 1 auto; min-height: 0; }
.podium__img { width: 100%; height: auto; }
.podium__cols { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: end; margin-bottom: -4%; }
.podium__col { display: flex; flex-direction: column; align-items: center; gap: 2px; animation: rise var(--dur-slow) var(--ease-out) both; }
.podium__col--1 { padding-bottom: 6%; animation-delay: .3s; }
.podium__col--2 { padding-bottom: 0; animation-delay: .15s; }
.podium__col--3 { padding-bottom: 0; }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
.podium__who { display: flex; flex-direction: column; align-items: center; }
.podium__pts { font-weight: 900; color: var(--gold); text-shadow: 2px 2px 0 #000; }
.awards { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.award { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border: 2px solid #000; border-radius: var(--radius); background: var(--paper); color: var(--paper-ink); box-shadow: var(--shadow); font-size: 15px; }
.award__k { font-weight: 900; color: var(--violet-3); }
.award__n { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fin__me { margin: 0; color: var(--ink-2); font-weight: 700; }
.fin__actions { width: 100%; margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.fin__actions .gbtn { width: 100%; }

/* ---------- paused */
.paused { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.paused__mc { width: 160px; height: auto; }

/* ---------- the big screen (TV) */
body.is-tv .app { max-width: none; }
body.is-tv .stage { padding: 2.2vh 3vw; }
.tvtitle { margin: 0; font: 900 6vh/1.05 Heebo, sans-serif; color: var(--gold); text-shadow: .5vh .5vh 0 #000; text-align: center; text-wrap: balance; }
.tvlead { margin: auto; font-size: 4vh; font-weight: 700; color: var(--ink-2); text-align: center; }
.tvhead { display: flex; align-items: baseline; gap: 2vw; font-size: 3vh; color: var(--ink-2); }
.tvhead__type { color: var(--gold); font-size: 3.6vh; font-weight: 900; }
.tvlobby { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto auto; gap: 2vh 3vw; align-items: center; }
.tvlobby__side { display: flex; flex-direction: column; align-items: center; gap: 1vh; }
.tvlobby__mc { height: 34vh; width: auto; filter: drop-shadow(.6vh .6vh 0 rgba(0,0,0,.5)); }
.tvlobby__join { display: flex; flex-direction: column; align-items: center; gap: 1vh; }
.tvlabel { margin: 0; font-size: 3vh; color: var(--ink-2); font-weight: 700; }
.tvcode { font: 900 20vh/1 Heebo, sans-serif; color: var(--gold); text-shadow: .7vh .7vh 0 #000; letter-spacing: .06em; direction: ltr; }
.tvqr { width: 22vh; height: 22vh; border: .3vh solid #000; border-radius: var(--radius); box-shadow: .5vh .5vh 0 #000; image-rendering: pixelated; }
.tvlink { margin: 0; font-size: 2.4vh; color: var(--ink-2); direction: ltr; }
.tvlobby__bench { grid-column: 1 / -1; }
.tvwait { grid-column: 1 / -1; margin: 0; text-align: center; font-size: 3.4vh; font-weight: 700; color: var(--ink-2); }
.tvbench { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.4vh 2.4vw; }
.tvbench .av__name { max-width: 14vw; font-size: 2.4vh; }
.tvbench .av--lg .av__img { width: 11vh; height: 11vh; }
.tvbench .av__stamp span { font-size: 2vh; }
.tvintro { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 1.4vh; text-align: center; animation: introIn var(--dur-medium) var(--ease-out) both; }
.tvintro__art { height: 34vh; width: auto; }
.tvintro__n { margin: 0; font-size: 3.4vh; color: var(--ink-2); font-weight: 700; }
.tvintro__name { margin: 0; font: 900 9vh/1.05 Heebo, sans-serif; color: var(--gold); text-shadow: .6vh .6vh 0 #000; }
.tvintro__rule { margin: 0; font-size: 3.6vh; max-width: 70vw; text-wrap: balance; }
.ribbon--tv { width: min(60vw, 900px); }
.ribbon--tv .ribbon__t { font-size: 4vh; }
.tvw, .tvrev, .tvcr, .tvres, .tvfin { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 1.6vh; }
.tvw__main { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1vh; padding-bottom: 1vh; }
.tvw__pic { max-height: 70vh; max-height: 100%; }
.tvw__line { margin: 0; font-size: 2.8vh; color: var(--ink-2); }
.tvw__bench { display: flex; flex-direction: column; align-items: center; gap: 1vh; margin-top: 1vh; }
.tvcount { margin: 0; font-size: 2.6vh; font-weight: 700; color: var(--ink-2); }
.tvtimer { height: 1.6vh; border: .3vh solid #000; border-radius: var(--radius); background: var(--violet-2); overflow: hidden; }
.tvtimer__fill { height: 100%; background: var(--gold); transform-origin: right center; }
.tvdigits { position: absolute; top: 0; inset-inline-end: 2vw; font: 900 14vh/1 Heebo, sans-serif; color: var(--gold); text-shadow: .8vh .8vh 0 #000; }
.tvrev__n { margin: 0; text-align: center; font-size: 3.6vh; font-weight: 900; color: var(--gold); }
.tvrev__stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.tvrev__meme { max-height: 100%; }
.tvrev__meme.is-in { animation: memeIn var(--dur-medium) var(--ease-out) both; }
.float--tv { width: 9vh; height: 9vh; }
.tvcr__title { margin: 0; text-align: center; font: 900 5vh/1.1 Heebo, sans-serif; color: var(--gold); text-shadow: .5vh .5vh 0 #000; }
.tvgrid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(22vw, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 1.6vh; }
.tvcard { position: relative; display: flex; flex-direction: column; justify-content: center; gap: .6vh; padding: 1.4vh 1.6vw; border: .3vh solid #000; border-radius: var(--radius); background: var(--paper); color: var(--paper-ink); box-shadow: .5vh .5vh 0 #000; font-weight: 900; font-size: 3.6vh; line-height: 1.2; overflow: hidden; }
.tvgrid { max-height: 62vh; align-self: stretch; }
.tvcard__n { position: absolute; top: .6vh; inset-inline-end: 1vw; font-size: 2.2vh; color: #7a6aa8; }
.tvcard__t { color: #4a3a80; font-size: 2.8vh; font-weight: 700; }
.tvcr__bench .av--lg .av__img { width: 8vh; height: 8vh; }
.tvres__main { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.6fr auto 1fr; align-items: center; gap: 3vw; }
.tvres__memebox { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; }
.tvres__meme { max-height: 62vh; max-width: 100%; }
.drop--tv { width: 11vh; height: 11vh; top: -4.5vh; inset-inline-start: -3vh; }
.tvres__who { display: flex; flex-direction: column; align-items: center; gap: 1vh; }
.tvres__who .av__name { font-size: 3vh; max-width: 20vw; }
.tvres__line { margin: 0; font-size: 2.6vh; color: var(--ink-2); text-align: center; }
.tvtable { display: flex; flex-direction: column; gap: .6vh; padding: 1.2vh 1.2vw; border: .3vh solid #000; border-radius: var(--radius); background: var(--violet-2); box-shadow: .5vh .5vh 0 #000; }
.tvtable__row { display: flex; align-items: center; gap: 1vw; font-size: 2.8vh; }
.tvtable__rank { width: 1.6em; text-align: center; font-weight: 900; color: var(--ink-3); }
.tvtable__n { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tvtable__p { font-weight: 900; color: var(--gold); }
.tvtable .av--sm .av__img { width: 5vh; height: 5vh; }
.tvnote { margin: 0; text-align: center; font-size: 2.6vh; color: var(--gold); }
.tvfin__head { display: flex; align-items: center; justify-content: center; gap: 2vw; }
.tvfin__mc { height: 16vh; width: auto; }
.tvfin__main { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.4fr 1fr; gap: 3vw; align-items: center; }
.podium--tv { max-width: none; }
.podium--tv .av__name { font-size: 2.6vh; max-width: 14vw; }
.podium--tv .podium__pts { font-size: 3.4vh; }
.tvfin__side { display: flex; flex-direction: column; gap: 2vh; }
.tvfin__side .award { font-size: 2.6vh; padding: 1vh 1.2vw; }
.tvpaused { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 3vh; }
.tvpaused__mc { height: 36vh; width: auto; }

/* ---------- short phones */
@media (max-height: 680px) {
  .code { font-size: 52px; }
  .title { font-size: 34px; }
  .hero__mc { width: min(36vw, 150px); }
  .intro__art { width: min(40vw, 160px); }
  .intro__name { font-size: 30px; }
  .gbtn { min-height: 50px; }
  .cr__pic, .cr__img { max-height: 72px; }
  .fin__mc { width: 72px; height: 72px; }
  .res__row { font-size: 14px; padding: 2px 8px; }
  .table__row { min-height: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}
.noscript { margin: 40px 16px; text-align: center; }

/* ---------- until the Flow art exists (SPEC §17.3: a spot without its asset is text-only) */
.is-off { opacity: .32; filter: grayscale(1); }
.av__name--alt { display: none; }
html.no-av .me__av, html.no-av .me__col > .quiet { display: none; }
html.no-av .av:not(:has(.av__img)) .av__name, html.no-av .av__name--alt {
  display: block; max-width: 120px; padding: 4px 10px; border: 2px solid #000; border-radius: var(--radius);
  background: var(--violet-3); box-shadow: var(--shadow); font-size: 15px;
}
html.no-av .av--xs .av__name--alt { padding: 1px 6px; font-size: 12px; box-shadow: none; max-width: 90px; }
html.no-av .av.is-lit .av__name--alt, html.no-av .av.is-lit .av__name { background: var(--gold); color: var(--gold-ink); }
html.no-av .av.is-dim { opacity: .55; }
html.no-av .av--lg .av__name, html.no-av .av--xl .av__name { font-size: 18px; max-width: 160px; }
html.no-av .table .av, html.no-av .tvtable .av, html.no-av .who__row > .av { display: none; }
html.no-av .avpick { display: none; }
.stamp:not(:has(img)) .stamp__t { color: var(--gold); text-shadow: 3px 3px 0 #000; font-size: 30px; }
.podium:not(:has(.podium__img)) .podium__cols { margin-bottom: 0; }
.podium:not(:has(.podium__img)) .podium__col:has(.podium__who)::after { content: attr(data-rank); font: 900 18px/1 Heebo, sans-serif; color: var(--ink-2); margin-top: 4px; }
body.is-tv .podium:not(:has(.podium__img)) .podium__col:has(.podium__who)::after { font-size: 3vh; }
body.is-tv.no-av .av__name { font-size: 3vh; }
html.no-av .tvbench .av__name { font-size: 3vh; max-width: 22vw; padding: .6vh 1.2vw; }

/* the big screen reads from across the room: names-only avatars and the ribbon text scale with it */
html.no-av body.is-tv .av:not(:has(.av__img)) .av__name { font-size: 3.2vh; max-width: 22vw; padding: .5vh 1.2vw; box-shadow: .4vh .4vh 0 #000; }
html.no-av body.is-tv .tvres__who .av:not(:has(.av__img)) .av__name, html.no-av body.is-tv .podium .av:not(:has(.av__img)) .av__name { font-size: 4.4vh; }
body.is-tv .ribbon:not(:has(img)) .ribbon__t { font-size: 5vh; text-shadow: .4vh .4vh 0 #000; }
.rev__actions.is-solo { grid-template-columns: 1fr; }
.fin__main { margin-block: auto; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; }

/* ================================================================ 16.11.2026: rating rounds (the genre's flow) */

/* ---------- settings */
.setgrid { display: flex; flex-direction: column; gap: 10px; }
.seg__b { padding: 0 6px; font-size: 15px; }

/* ---------- lobby panels: invite, players, settings */
.lpanel { width: 100%; padding: 10px 12px; border: 2px solid #000; border-radius: var(--radius); background: var(--violet-2); box-shadow: var(--shadow); }
.lpanel--invite { display: flex; flex-direction: column; align-items: center; gap: 8px; background: none; border: 0; box-shadow: none; padding: 0; }
.lpanel__title { margin: 0 0 6px; font-size: 16px; font-weight: 900; color: var(--gold); }
.lpanel__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lpanel__row .lpanel__title { margin: 0; }
.lpanel--players { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.lpanel--players .bench { justify-content: flex-start; }
.lpanel--set .quiet { min-height: 44px; padding: 0 4px; }
.lobby__set { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; text-wrap: balance; }
.av__host { position: absolute; top: -8px; inset-inline-start: -6px; padding: 0 5px; border: 2px solid #000; border-radius: var(--radius); background: var(--gold); color: var(--gold-ink); font-size: 11px; font-weight: 900; line-height: 16px; }

/* ---------- writing: the picture and the fields (side by side on wide screens) */
.write__pic { flex: 0 1 auto; min-height: 0; max-height: 45%; display: flex; justify-content: center; }
.write__pic .preview { max-height: 100%; }
/* everything sits together in the middle of the screen (17.11.2026, Daniel: "נמרכז את הכל למרכז של המסך") */
.write__side { display: flex; flex-direction: column; gap: 8px; min-height: 0; flex: 0 1 auto; }
.write__side .count { margin-top: 10px; }
html.kb .write__pic { flex: none; height: calc(var(--vvh) * .3); max-height: none; }
html.kb .write__side .line, html.kb .write__side .count { display: none; }

/* ---------- rating */
.vote { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.vote__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; }
.vote__n { font-weight: 900; color: var(--gold); font-size: 18px; }
.vote__rated { font-size: 14px; color: var(--ink-2); font-weight: 700; }
.vote__stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.vote__meme { max-height: 100%; }
.vote__meme.is-in { animation: memeIn var(--dur-medium) var(--ease-out) both; }
.vote__bottom { display: flex; flex-direction: column; gap: 8px; }
.vote__mine { margin: 0; padding: 12px 0; text-align: center; font-weight: 900; color: var(--gold); }
.rates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rate {
  min-height: 56px; padding: 6px 4px; border: 2px solid #000; border-radius: var(--radius); background: var(--violet-3); color: #fff;
  font-weight: 900; font-size: 17px; box-shadow: var(--shadow);
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast), box-shadow var(--dur-fast) var(--ease-out);
}
.rate[aria-checked="true"] { background: var(--gold); color: var(--gold-ink); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 #000; }
.rate:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; transition-duration: var(--dur-instant); }
.rate:disabled { opacity: .5; }
.betbtn { min-height: 44px; border: 2px dashed rgba(255, 222, 89, .8); border-radius: var(--radius); background: none; color: var(--gold); font-weight: 900; }
.betbtn.is-on { border-style: solid; background: rgba(255, 222, 89, .14); }
.betbtn:disabled { cursor: default; }
.betnote { margin: -2px 0 0; text-align: center; font-size: 13px; color: var(--ink-3); }
.betnote:empty { display: none; }

/* ---------- the round recap */
.recap { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
.recap__title { margin: 0; text-align: center; font: 900 24px/1.1 Heebo, sans-serif; color: var(--gold); text-shadow: 3px 3px 0 #000; }
.recap__best { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 0; flex: 0 1 auto; }
.recap__memebox { position: relative; display: flex; justify-content: center; min-height: 0; }
.recap__meme { max-height: calc(var(--vvh) * .3); }
.recap__by { margin: 0; text-align: center; font-weight: 700; color: #fff; font-size: 15px; }
.recap__you { display: flex; flex-direction: column; gap: 0; text-align: center; color: var(--ink-2); font-size: 14px; }
.recap__you p { margin: 0; }
.is-bad { color: #ff9b9b !important; }
.table__head { min-height: 22px !important; font-size: 12px !important; color: var(--ink-3); }
.table__head .table__p { font-weight: 700; }
.table__d { width: 4.2em; text-align: center; color: #8ff0a4; font-weight: 700; font-size: 14px; }
.table__head .table__d { color: var(--ink-3); font-size: 12px; }
.recap .table { margin-top: auto; }
.recap > .quiet { align-self: center; }
.again__by { margin: 6px 0 0; text-align: center; font-weight: 700; }

/* ---------- wide screens: the game uses the width (a tablet or a computer) */
@media (min-width: 900px) {
  body.in-game .app { max-width: 1120px; }
  body.in-game .stage { padding: 16px 24px; }
  .lobby { display: grid; grid-template-columns: 1fr 1.2fr 1fr; grid-template-rows: 1fr auto; align-items: stretch; gap: 16px; }
  .lpanel--invite { grid-column: 2; grid-row: 1; justify-content: center; }
  .lpanel--players { grid-column: 1; grid-row: 1; }
  .lpanel--set { grid-column: 3; grid-row: 1; }
  .lobby__go { grid-column: 1 / -1; display: flex; justify-content: center; }
  .lobby__go .gbtn { width: min(420px, 100%); }
  .write { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: stretch; }
  .write__pic { max-height: none; height: 100%; align-items: center; }
  .write__pic .preview { max-height: 100%; height: 100%; align-items: center; }
  .write__side { justify-content: center; }
  .write__side .count { margin-top: 12px; }
  .vote__bottom { width: min(560px, 100%); margin-inline: auto; }
  .recap { display: grid; grid-template-columns: 1.2fr 1fr; grid-template-rows: auto 1fr auto; column-gap: 24px; }
  .recap__title { grid-column: 1 / -1; }
  .recap__best { grid-row: 2 / 4; justify-content: center; }
  .recap__meme { max-height: calc(var(--vvh) * .6); }
  .recap .table, .recap__you, .recap > .quiet { grid-column: 2; }
}

/* ---------- TV: writing, rating, recap, podium */
.tvlobby__set { margin: 0; font-size: 2.4vh; color: var(--ink-2); text-align: center; max-width: 34vw; }
.tvwriting { display: flex; flex-direction: column; align-items: center; gap: 2vh; }
.tvwriting__mc { height: 30vh; width: auto; }
.tvrev__top { display: flex; justify-content: center; align-items: baseline; gap: 3vw; }
.tvrev__rated { margin: 0; font-size: 3vh; color: var(--ink-2); font-weight: 700; }
.tvrecap { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 1.6vh; }
.tvrecap__main { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 26vw; gap: 2vw; }
.tvrecap__grid { min-height: 0; display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(0, 1fr); gap: 1.6vh 1.2vw; align-items: center; }
.tvrecap__cell { display: flex; flex-direction: column; align-items: center; gap: .6vh; min-height: 0; height: 100%; justify-content: center; }
.tvrecap__memebox { position: relative; display: flex; justify-content: center; min-height: 0; max-height: 100%; }
.tvrecap__meme { max-height: 30vh; max-width: 100%; }
.tvrecap__cell.is-top .tvrecap__meme { outline: .5vh solid var(--gold); }
.tvrecap__by { margin: 0; font-size: 2.4vh; font-weight: 700; text-align: center; }
.tvrecap__by b { color: var(--gold); }
.tvtable__d { width: 4.4em; text-align: center; font-weight: 700; color: #8ff0a4; font-size: 2.4vh; }
.tvfin__best { display: flex; flex-direction: column; align-items: center; gap: .8vh; }
.tvfin__meme { max-height: 34vh; max-width: 100%; }

.line__ask { display: block; font-weight: 700; color: var(--gold); }
.vote__hint { text-align: center; margin: -4px 0 0; }
.tvrecap__main > .tvtable { align-self: start; }

/* ================================================================ 16.11.2026: menus in the genre's order (own look) */

/* ---------- play home: who I am, then two big choices */
.home { justify-content: flex-start; gap: 10px; }
.home__top { display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative; }
.home__site { position: absolute; top: -6px; inset-inline-start: -6px; font-size: 14px; }
.home__brand { display: flex; flex-direction: column; align-items: center; }
.home__mc { width: min(28vw, 110px); height: auto; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(3px 3px 0 rgba(0,0,0,.5)); }
.home__title { font-size: 34px; margin-top: 0; }
.home__main { margin-block: auto; display: flex; flex-direction: column; gap: 14px; }
.home__bottom { display: flex; justify-content: center; }
.idcard { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.idcard__av { display: grid; place-items: center; min-width: 96px; min-height: 96px; padding: 0; border: 0; background: none; }
html.no-av .idcard__av { display: none; }
.idcard__label { margin: 0; }
.idcard__row { display: flex; gap: 8px; width: 100%; max-width: 420px; }
.idcard__name { flex: 1; min-width: 0; text-align: center; font-weight: 700; }
.idcard__dice { flex: none; min-width: 88px; min-height: 52px; padding: 0 10px; border: 2px solid #000; border-radius: var(--radius); background: var(--violet-3); color: #fff; font-weight: 700; box-shadow: var(--shadow); }
.idcard__dice:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; }
.tiles { display: flex; flex-direction: column; gap: 12px; }
.tile {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; min-height: 92px; padding: 14px 18px;
  border: 2px solid #000; border-radius: var(--radius); box-shadow: var(--shadow-lg); text-align: start;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.tile--gold { background: var(--gold); color: var(--gold-ink); }
.tile--violet { background: var(--violet-3); color: #fff; }
.tile__label { font: 900 28px/1.1 Heebo, sans-serif; }
.tile__sub { font-size: 15px; font-weight: 500; opacity: .85; }
.tile:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 2px 2px 0 #000; transition-duration: var(--dur-instant); }
@media (hover: hover) { .tile:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 7px 7px 0 #000; } }
.tile:disabled { opacity: .6; }
@media (min-width: 700px) {
  .tiles { flex-direction: row; }
  .tile { flex: 1; min-height: 150px; }
}

/* ---------- the gate */
.gate__head { display: flex; align-items: center; gap: 12px; }
.gate__mc { width: 84px; height: 84px; object-fit: contain; flex: none; }
.gate__title { text-align: start; margin: 0; }
.gate__head .status { text-align: start; margin-top: 4px; }
.gate__go .gbtn { width: 100%; }

/* ---------- the lobby: head, setting steps, players with invites, the start button pinned at the bottom */
.lobby { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.lobby__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lobby__title { margin: 0; min-width: 0; font: 900 22px/1.15 Heebo, sans-serif; color: var(--gold); text-shadow: 2px 2px 0 #000; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.codechip { flex: none; display: flex; align-items: baseline; gap: 6px; min-height: 44px; padding: 4px 12px; border: 2px solid #000; border-radius: var(--radius); background: var(--violet-2); color: #fff; box-shadow: var(--shadow); }
.codechip__k { font-size: 13px; color: var(--ink-2); font-weight: 700; }
.codechip__v { font: 900 24px/1 Heebo, sans-serif; color: var(--gold); letter-spacing: .06em; direction: ltr; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
.step { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 4px 6px; border: 2px solid #000; border-radius: var(--radius); background: var(--violet-3); color: var(--ink-2); font-weight: 700; font-size: 14px; }
.step__n { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.35); color: #fff; font-size: 13px; flex: none; }
.step.is-on { background: var(--gold); color: var(--gold-ink); box-shadow: var(--shadow); }
.step.is-on .step__n { background: var(--gold-ink); color: var(--gold); }
.step__body { display: flex; flex-direction: column; gap: 6px; }
.step__note { margin: 0; color: var(--ink-2); font-size: 14px; }
.step__body .toggle { padding: 6px 0; }
.lobby__by { font-size: 13px; color: var(--ink-3); }
.lpanel--players { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.lpanel--players .bench { flex: 1; min-height: 0; align-content: flex-start; justify-content: flex-start; }
.slot { display: block; width: 72px; height: 34px; border: 2px dashed rgba(217, 205, 250, .35); border-radius: var(--radius); }
.invite { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 6px; }
.invite .gbtn { min-height: 44px; padding: 4px 8px; font-size: 15px; }
.invite__b { min-height: 44px; padding: 4px 6px; border: 2px solid #000; border-radius: var(--radius); background: none; color: #fff; font-weight: 700; font-size: 14px; box-shadow: var(--shadow); background: var(--violet-2); }
.lobby__go { flex: none; }
.codebig { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-bottom: 6px; }
.codebig .code { font-size: 72px; }
.qr--big { width: min(240px, 60vw); height: auto; }

/* ---------- writing: the swap sits under the picture */
.write__pic { flex-direction: column; align-items: center; gap: 4px; }
.swapbtn { min-height: 40px; padding: 2px 10px; border: 0; background: none; color: var(--gold); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
html.kb .swapbtn { display: none; }

@media (min-width: 900px) {
  .lobby { display: grid; grid-template-columns: 1fr 1.25fr; grid-template-rows: auto 1fr auto; gap: 16px 20px; }
  .lobby__head { grid-column: 1 / -1; }
  .lpanel--set { grid-column: 2; grid-row: 2; align-self: start; }
  .lpanel--players { grid-column: 1; grid-row: 2; }
  .lobby__go { grid-column: 1 / -1; display: flex; justify-content: center; }
  .lobby__go .gbtn { width: min(420px, 100%); }
  .lpanel--invite { display: none; }
}

/* ---------- polish after the first look (16.11) */
.home { justify-content: center; position: relative; }
.home__main { margin-block: 18px 54px; }
.home__bottom { position: absolute; inset-inline: 0; bottom: 0; }
.lpanel--players { flex: none; }
.lobby__go { margin-top: auto; }
.invite { grid-template-columns: 1.25fr 1fr .85fr; }
.invite .gbtn, .invite__b { white-space: nowrap; font-size: 14px; padding: 4px 6px; }
.step { white-space: nowrap; }
.ask { margin: -2px 0 0; }
html.kb .write__side .ask { display: none; }
@media (min-width: 900px) { .lpanel--players { align-self: start; } }

.home__top { position: static; }
.home__site { top: 0; inset-inline-start: 0; }
