:root {
  --ink: #f8fbff;
  --muted: #aebde7;
  --studio: #050817;
  --studio-blue: #071a58;
  --panel: rgba(6, 18, 58, 0.9);
  --panel-strong: rgba(5, 12, 38, 0.96);
  --line: rgba(105, 172, 255, 0.42);
  --electric: #18c8ff;
  --royal: #2547ff;
  --gold: #f4bd35;
  --gold-deep: #a86e10;
  --magenta: #b433ff;
  --success: #12c878;
  --danger: #f04444;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
  --radius: 8px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Solo mode system */
.solo-mode-panel {
  grid-column: 1 / -1;
  width: min(980px, 100%);
  display: grid;
  gap: 12px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(6, 24, 70, 0.86), rgba(3, 11, 34, 0.94));
  border: 1px solid rgba(248, 200, 75, 0.42);
  border-radius: 18px;
  box-shadow: inset 0 0 22px rgba(24, 200, 255, 0.1), 0 18px 38px rgba(0, 0, 0, 0.24);
}

.solo-mode-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #fff2b4;
  font-weight: 950;
}

.solo-mode-heading span {
  color: var(--muted);
  font-size: 0.9rem;
}

.solo-mode-grid {
  display: grid;
  /* 2x2 so each mode card is wide enough for its Hebrew description to read in
     1-2 clean lines instead of a cramped 4-column squeeze */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.solo-mode-card {
  position: relative;
  min-height: 92px;
  display: grid;
  grid-template-columns: 32px 1fr;
  grid-template-rows: auto auto 1fr;
  align-items: center;
  column-gap: 8px;
  row-gap: 3px;
  padding: 10px 11px;
  color: #fff6d4;
  background:
    radial-gradient(circle at 20% 10%, rgba(248, 200, 75, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(10, 37, 103, 0.9), rgba(2, 10, 33, 0.96));
  border: 1px solid rgba(248, 200, 75, 0.34);
  border-radius: 14px;
  text-align: start;
  cursor: pointer;
  box-shadow: inset 0 0 18px rgba(24, 200, 255, 0.08);
}

.solo-mode-card b {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #10224e;
  background: linear-gradient(180deg, #fff1a7, #f2b733);
  border-radius: 50%;
  font-size: 1.05rem;
  box-shadow: 0 0 18px rgba(248, 200, 75, 0.32);
}

.solo-mode-card strong {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  display: block;
  margin: 0;
  color: #ffdc70;
  font-size: 0.98rem;
}

/* the long Hebrew description spans the FULL card width (was cramped beside the icon) */
.solo-mode-card small {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: start;
  display: block;
  color: #d6e5ff;
  font-size: 0.78rem;
  line-height: 1.3;
}

.solo-mode-card em {
  grid-column: 1 / -1;
  grid-row: 3;
  align-self: end;
  color: #93f5ff;
  font-style: normal;
  font-size: 0.74rem;
  font-weight: 900;
}

.solo-mode-card.active {
  border-color: #ffe58a;
  box-shadow: 0 0 0 2px rgba(248, 200, 75, 0.28), 0 0 26px rgba(248, 200, 75, 0.24);
  transform: translateY(-1px);
}

.solo-mode-options,
.resume-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.casual-timer-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff6d4;
  font-weight: 850;
}

.casual-timer-toggle input {
  width: 18px;
  height: 18px;
  accent-color: #f8c84b;
}

.learning-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.learning-filters label {
  display: grid;
  gap: 6px;
  color: #fff2b4;
  text-align: start;
  font-size: 0.86rem;
  font-weight: 900;
}

.learning-filters select {
  min-height: 42px;
  color: #fff9df;
  background: rgba(2, 12, 42, 0.92);
  border: 1px solid rgba(248, 200, 75, 0.42);
  border-radius: 10px;
  padding: 0 10px;
  font: inherit;
}

.resume-strip {
  justify-content: space-between;
  padding: 10px 12px;
  color: #dff8ff;
  background: rgba(24, 200, 255, 0.08);
  border: 1px solid rgba(24, 200, 255, 0.24);
  border-radius: 12px;
  font-weight: 850;
}

.timer-pill {
  min-width: 116px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  color: #061432;
  background: linear-gradient(180deg, #fff1a7, #f1b42e);
  border-radius: 999px;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.42), 0 0 18px rgba(248, 200, 75, 0.26);
}

.timer-pill b {
  min-width: 34px;
  font-size: 0.88rem;
  font-weight: 950;
}

.timer-pill i {
  position: relative;
  width: 52px;
  height: 7px;
  overflow: hidden;
  background: rgba(6, 20, 50, 0.26);
  border-radius: 999px;
}

.timer-pill em {
  position: absolute;
  /* BUG-036: logical insets so the fill anchors to the reading-start edge in RTL+LTR */
  inset-block: 0;
  inset-inline-start: 0;
  width: 100%;
  background: #0b2b69;
  border-radius: inherit;
  transition: width 0.24s linear;
}

.timer-pill--danger {
  animation: timer-danger 0.8s ease-in-out infinite;
}

.timer-pill--off {
  color: #dff8ff;
  background: rgba(8, 29, 78, 0.9);
  border: 1px solid rgba(248, 200, 75, 0.28);
}

.timer-pill--off i {
  display: none;
}

@keyframes timer-danger {
  50% { box-shadow: 0 0 24px rgba(255, 74, 74, 0.52); }
}

/* win/lose / study result is a CENTERED overlay (was an in-flow panel that fell
   to the bottom of the game and got pushed off-screen) */
.solo-result-panel {
  position: fixed;
  z-index: 1300;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  margin: 0;
  padding: 20px;
  display: grid;
  gap: 14px;
  color: #fff6d4;
  background:
    radial-gradient(circle at 50% 0, rgba(248, 200, 75, 0.24), transparent 44%),
    linear-gradient(180deg, rgba(8, 32, 92, 0.97), rgba(2, 10, 33, 0.99));
  border: 1px solid rgba(248, 200, 75, 0.58);
  border-radius: 18px;
  /* the huge spread shadow dims the whole screen behind the card (backdrop) */
  box-shadow: 0 0 0 100vmax rgba(2, 6, 20, 0.72), 0 24px 60px rgba(0, 0, 0, 0.5), inset 0 0 22px rgba(24, 200, 255, 0.1);
}

.solo-result-main {
  text-align: center;
}

.solo-result-main span {
  display: block;
  color: #93f5ff;
  font-size: 0.82rem;
  font-weight: 950;
}

.solo-result-main h2 {
  margin: 4px 0 6px;
  color: #ffdc70;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.solo-result-main p {
  margin: 0 auto;
  max-width: 62ch;
  color: #e8f1ff;
  line-height: 1.45;
  font-weight: 750;
}

.solo-result-rewards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.solo-result-rewards article {
  display: grid;
  gap: 4px;
  padding: 10px;
  background: rgba(2, 12, 42, 0.72);
  border: 1px solid rgba(248, 200, 75, 0.28);
  border-radius: 12px;
}

.solo-result-rewards span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.solo-result-rewards strong {
  color: #fff2b4;
  font-size: 1.1rem;
}

.solo-result-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

body[data-mode="daily"] .lifelines {
  opacity: 0.55;
}

@media (max-width: 980px) {
  .solo-mode-grid,
  .learning-filters,
  .solo-result-rewards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .solo-mode-panel {
    padding: 12px;
  }

  .solo-mode-grid,
  .learning-filters,
  .solo-result-rewards {
    grid-template-columns: 1fr;
  }

  .solo-mode-card {
    min-height: 96px;
  }

  .timer-pill {
    min-width: 96px;
    grid-template-columns: 1fr;
  }

  .timer-pill i {
    width: 100%;
  }
}

/* Unified TV-show layout cleanup */
.session-toggle {
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 196px;
  padding: 6px 10px;
}

.session-avatar {
  width: 38px;
  height: 38px;
  object-fit: cover;
  object-position: 50% 8%;
  border: 2px solid rgba(6, 18, 58, 0.68);
  border-radius: 50%;
  background: #071a58;
}

.session-copy {
  display: grid;
  min-width: 0;
}

.session-copy > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-bank {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 0 8px;
  color: #fff4c8;
  background: #06123a;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 950;
}

body[data-screen="start"] {
  overflow: hidden;
}

body[data-screen="start"] .game-shell {
  width: 100vw;
  height: 100svh;
  min-height: 100svh;
  margin: 0;
  padding: clamp(14px, 1.8vw, 24px);
  border: 0;
  border-radius: 0;
}

body[data-screen="start"] .start-screen {
  min-height: calc(100svh - clamp(28px, 3.6vw, 48px));
  padding: 58px clamp(10px, 1.5vw, 22px) 12px;
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) minmax(360px, 1fr) minmax(260px, 0.76fr);
  grid-template-areas:
    "rabbi emblem board"
    "rabbi copy board"
    "rabbi controls board"
    "rabbi stats board"
    "rabbi actions board";
  align-content: start;
  align-items: center;
  gap: clamp(9px, 1.3vw, 16px);
}

body[data-screen="start"] .start-screen::before {
  inset: auto 5% 2%;
  height: 46%;
}

body[data-screen="start"] .start-visual {
  display: contents;
}

body[data-screen="start"] .start-title-emblem {
  grid-area: emblem;
  width: min(440px, 100%);
  min-height: clamp(118px, 14vh, 168px);
  padding: clamp(12px, 1.8vh, 22px) clamp(24px, 3vw, 38px);
  clip-path: polygon(14% 0, 86% 0, 100% 28%, 92% 82%, 50% 100%, 8% 82%, 0 28%);
  background:
    linear-gradient(90deg, rgba(248, 200, 75, 0.34), transparent 18% 82%, rgba(248, 200, 75, 0.34)),
    radial-gradient(circle at 50% 28%, #123a8f 0 42%, #061b4f 64%, #020817 100%);
  border: 3px solid rgba(248, 200, 75, 0.9);
}

body[data-screen="start"] .start-title-emblem p {
  color: #f8c84b;
  font-size: clamp(1.45rem, 3.1vw, 3.6rem);
  line-height: 0.92;
  text-shadow: 0 3px 0 #6d4610, 0 8px 22px rgba(0, 0, 0, 0.7);
}

body[data-screen="start"] .start-title-emblem strong {
  color: #ffde7a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 3.3vw, 4rem);
  text-shadow: 0 3px 0 #6d4610, 0 8px 22px rgba(0, 0, 0, 0.7);
}

body[data-screen="start"] .start-title-emblem small {
  display: inline-grid;
  margin-top: 8px;
  padding: 6px 18px;
  color: #231607;
  background: linear-gradient(180deg, #ffea9d, #c88b20);
  border-radius: 999px;
  font-weight: 950;
}

body[data-screen="start"] .start-rabbi {
  grid-area: rabbi;
  justify-self: center;
  align-self: end;
  width: min(410px, 32vw);
  aspect-ratio: auto;
  overflow: visible;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body[data-screen="start"] .start-rabbi__ring,
body[data-screen="start"] .start-rabbi__halo {
  display: none;
}

body[data-screen="start"] .start-rabbi img {
  width: 100%;
  max-height: calc(100svh - 120px);
  object-fit: contain;
  filter:
    drop-shadow(0 28px 22px rgba(0, 0, 0, 0.42))
    drop-shadow(0 0 26px rgba(248, 200, 75, 0.18));
}

body[data-screen="start"] .start-copy {
  grid-area: copy;
  width: min(540px, 100%);
  margin: 0;
}

body[data-screen="start"] .start-copy h2 {
  font-size: clamp(1.45rem, 2.2vw, 2.5rem);
}

body[data-screen="start"] .start-controls {
  grid-area: controls;
  width: min(610px, 100%);
  margin: 0;
  padding: 12px;
}

body[data-screen="start"] .start-stats {
  grid-area: stats;
  width: min(610px, 100%);
  min-height: 38px;
  margin: 0;
  padding: 8px 14px;
}

body[data-screen="start"] .start-actions {
  grid-area: actions;
}

body[data-screen="start"] .public-scoreboard {
  grid-area: board;
  align-self: stretch;
  width: 100%;
  max-height: calc(100svh - 96px);
  margin: 0;
  padding: 10px;
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(5, 22, 62, 0.9), rgba(1, 10, 31, 0.88));
  border-color: rgba(248, 200, 75, 0.62);
}

body[data-screen="start"] .weekly-champions,
body[data-screen="start"] .monthly-champions {
  grid-template-columns: 1fr;
  gap: 8px;
}

body[data-screen="start"] .weekly-champions article,
body[data-screen="start"] .monthly-champions article {
  min-height: 0;
  padding: 8px 10px;
}

body[data-screen="start"] .public-board {
  max-height: 260px;
  overflow: auto;
}

body[data-screen="game"] .confirm-answer,
body[data-screen="game"] .tv-player-card,
body[data-screen="game"] .tv-utility-strip {
  display: none !important;
}

body[data-screen="game"] .tv-bottom-nav {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body[data-screen="game"] .lifelines {
  grid-template-columns: repeat(5, minmax(34px, 1fr));
  align-items: center;
  gap: 5px;
  padding: 8px;
}

body[data-screen="game"] .lifeline {
  grid-template-columns: 1fr;
  place-items: center;
  width: clamp(34px, 3.4vw, 44px);
  height: clamp(34px, 3.4vw, 44px);
  min-height: 0;
  margin: 0 auto;
  padding: 0;
  background:
    radial-gradient(circle at 35% 28%, #143875, #061738 62%, #020817 100%);
  border: 2px solid #f8c84b;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(248, 200, 75, 0.18), inset 0 0 10px rgba(77, 158, 255, 0.18);
}

body[data-screen="game"] .lifeline__icon {
  position: relative;
  width: 100%;
  height: 100%;
  border: 0;
  color: #fff2b4;
  font-size: 0.84rem;
}

body[data-screen="game"] .lifeline--fifty .lifeline__icon {
  font-size: clamp(0.54rem, 0.8vw, 0.68rem);
  letter-spacing: 0;
}

body[data-screen="game"] .lifeline__label {
  display: none !important;
}

body[data-screen="game"] .lifeline--rabbi .lifeline__icon::before {
  content: "";
  width: 22px;
  height: 12px;
  border: 2px solid #fff4c8;
  border-bottom: 0;
  border-radius: 24px 24px 3px 3px;
  background: linear-gradient(180deg, #69d8ff, #123875);
  box-shadow: 0 8px 0 -3px rgba(255, 242, 180, 0.92);
}

body[data-screen="game"] .lifeline--audience .lifeline__icon::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff2b4;
  box-shadow:
    -12px 4px 0 #fff2b4,
    12px 4px 0 #fff2b4,
    0 14px 0 3px rgba(255, 242, 180, 0.46),
    -12px 18px 0 1px rgba(255, 242, 180, 0.38),
    12px 18px 0 1px rgba(255, 242, 180, 0.38);
}

body[data-screen="game"] .lifeline--verse .lifeline__icon::before {
  content: "";
  width: 25px;
  height: 19px;
  border: 2px solid #fff2b4;
  border-radius: 4px;
  background:
    linear-gradient(90deg, transparent 48%, rgba(255, 242, 180, 0.72) 49% 51%, transparent 52%),
    linear-gradient(180deg, rgba(255, 242, 180, 0.18), rgba(255, 242, 180, 0.04));
  transform: perspective(80px) rotateX(10deg);
}

body[data-screen="game"] .lifeline--switch .lifeline__icon {
  font-size: 1.18rem;
}

[dir="rtl"] body[data-screen="game"] .answer {
  padding: 12px 100px 12px 38px;
}

[dir="rtl"] body[data-screen="game"] .answer::before {
  inset-inline-start: auto;
  inset-inline-end: auto;
  right: 12px;
  left: auto;
}

[dir="ltr"] body[data-screen="game"] .answer {
  padding: 12px 38px 12px 100px;
}

[dir="ltr"] body[data-screen="game"] .answer::before {
  inset-inline-start: auto;
  inset-inline-end: auto;
  left: 12px;
  right: auto;
}

@media (max-width: 1120px) {
  body[data-screen="start"] .start-screen {
    grid-template-columns: minmax(190px, 0.62fr) minmax(330px, 1fr);
    grid-template-areas:
      "rabbi emblem"
      "rabbi copy"
      "rabbi controls"
      "rabbi stats"
      "rabbi actions";
  }

  body[data-screen="start"] .public-scoreboard {
    display: none;
  }
}

@media (max-width: 760px) {
  .session-dock {
    top: 0;
    inset-inline-end: 8px; /* BUG-036: keep logical so RTL stays mirrored at this breakpoint */
  }

  .session-toggle {
    grid-template-columns: 32px minmax(0, 1fr);
    min-width: 132px;
    min-height: 40px;
    padding: 4px 7px;
  }

  .session-avatar {
    width: 32px;
    height: 32px;
  }

  .session-bank {
    display: none;
  }

  body[data-screen="start"] .game-shell {
    padding: 8px;
  }

  body[data-screen="start"] .start-screen {
    min-height: calc(100svh - 16px);
    padding: 48px 4px 6px;
    grid-template-columns: 1fr;
    grid-template-areas:
      "emblem"
      "rabbi"
      "copy"
      "controls"
      "stats"
      "actions";
    align-content: center;
    gap: 8px;
  }

  body[data-screen="start"] .start-title-emblem {
    width: min(320px, 100%);
    min-height: 94px;
    padding: 10px 22px 12px;
  }

  body[data-screen="start"] .start-title-emblem p {
    font-size: 1.32rem;
  }

  body[data-screen="start"] .start-title-emblem strong {
    font-size: 1.62rem;
  }

  body[data-screen="start"] .start-title-emblem small {
    margin-top: 4px;
    padding: 4px 12px;
    font-size: 0.72rem;
  }

  body[data-screen="start"] .start-rabbi {
    width: min(168px, 50vw);
  }

  body[data-screen="start"] .start-rabbi img {
    max-height: 24svh;
  }

  body[data-screen="start"] .start-copy {
    gap: 2px;
  }

  body[data-screen="start"] .start-copy h2 {
    font-size: 1.08rem;
  }

  body[data-screen="start"] .start-controls {
    gap: 8px;
    padding: 8px;
  }

  body[data-screen="start"] .start-stats {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 0.74rem;
  }

  body[data-screen="start"] .start-action {
    min-width: 168px;
    min-height: 46px;
    font-size: 0.92rem;
  }

  body[data-screen="game"] {
    overflow: hidden;
  }

  body[data-screen="game"] .game-shell {
    width: 100vw;
    height: 100svh;
    min-height: 100svh;
    margin: 0;
    padding: 6px 8px 52px;
    border: 0;
    border-radius: 0;
    overflow: hidden;
  }

  body[data-screen="game"] .main-grid {
    min-height: calc(100svh - 58px);
    height: calc(100svh - 58px);
    padding-top: 44px;
    gap: 4px;
    overflow: hidden;
  }

  body[data-screen="game"] .stage {
    position: relative;
    align-content: start;
    gap: 4px;
    min-height: 0;
    padding: 0;
    overflow: visible;
  }

  body[data-screen="game"] .game-top-actions {
    position: absolute;
    top: -38px;
    left: 0;
    z-index: 20;
  }

  body[data-screen="game"] .home-command {
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.72rem;
  }

  body[data-screen="game"] .show-title {
    width: min(232px, 72vw);
    min-height: 72px;
    margin: 0 auto 2px;
    padding: 8px 18px 9px;
  }

  body[data-screen="game"] .show-title span {
    font-size: 1.22rem;
  }

  body[data-screen="game"] .show-title strong {
    font-size: 1.46rem;
  }

  body[data-screen="game"] .show-title small {
    display: none;
  }

  body[data-screen="game"] .tv-rabbi-hero {
    position: absolute;
    left: -34px;
    top: 88px;
    z-index: 1;
    width: 128px;
    max-height: 180px;
    margin: 0;
    opacity: 0.92;
  }

  [dir="rtl"] body[data-screen="game"] .tv-rabbi-hero {
    left: -34px;
    right: auto;
  }

  body[data-screen="game"] .studio-floor,
  body[data-screen="game"] .tv-run-stats {
    display: none;
  }

  body[data-screen="game"] .score-strip {
    width: 100%;
    min-height: 32px;
    margin: 0 0 4px;
    padding: 4px 9px;
  }

  body[data-screen="game"] .score-strip span {
    font-size: 0.66rem;
  }

  body[data-screen="game"] #prizeLabel {
    font-size: 0.98rem;
  }

  body[data-screen="game"] .question-zone {
    width: 100%;
  }

  body[data-screen="game"] .question-zone::before {
    display: none;
  }

  body[data-screen="game"] .question-meta {
    gap: 4px;
    margin: 0 0 4px;
  }

  body[data-screen="game"] .question-meta span {
    padding: 3px 7px;
    font-size: 0.62rem;
  }

  body[data-screen="game"] #questionText {
    min-height: 86px;
    max-height: 128px;
    margin: 0 0 6px;
    padding: 12px 18px;
    overflow: auto;
    font-size: clamp(0.98rem, 4.4vw, 1.28rem);
    line-height: 1.12;
  }

  body[data-screen="game"] .answers {
    gap: 6px;
  }

  body[data-screen="game"] .answer {
    min-height: 50px;
    padding-top: 7px;
    padding-bottom: 7px;
    font-size: clamp(0.82rem, 3.8vw, 0.98rem);
    line-height: 1.12;
  }

  [dir="rtl"] body[data-screen="game"] .answer {
    padding-right: 62px;
    padding-left: 12px;
  }

  [dir="ltr"] body[data-screen="game"] .answer {
    padding-right: 12px;
    padding-left: 62px;
  }

  body[data-screen="game"] .answer::before {
    width: 38px;
    height: 38px;
    font-size: 1.12rem;
  }

  [dir="rtl"] body[data-screen="game"] .answer::before {
    right: 8px;
    left: auto;
  }

  [dir="ltr"] body[data-screen="game"] .answer::before {
    left: 8px;
    right: auto;
  }

  body[data-screen="game"] .side-rail {
    display: block;
    margin-top: 4px;
    padding-top: 0;
  }

  body[data-screen="game"] .prize-panel,
  body[data-screen="game"] .feedback-panel,
  body[data-screen="game"] .leaderboard-panel {
    display: none;
  }

  body[data-screen="game"] .lifelines {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: min(270px, 100%);
    margin: 0 auto;
    padding: 4px 6px;
  }

  body[data-screen="game"] .lifeline {
    width: 38px;
    height: 38px;
  }

  body[data-screen="game"] .tv-bottom-nav {
    min-height: 48px;
  }

  body[data-screen="game"] .tv-bottom-nav span {
    font-size: 1.08rem;
  }

  body[data-screen="game"] .tv-bottom-nav small {
    font-size: 0.62rem;
  }

  body[data-screen="game"] .tv-rabbi-hero.avatar-render {
    display: none;
  }
}

/* Character skins and avatar builder */
body:not([data-screen="skins"]) .skin-screen {
  display: none;
}

body[data-screen="skins"] {
  overflow: auto;
}

body[data-screen="skins"] .start-screen,
body[data-screen="skins"] .main-grid,
body[data-screen="skins"] .topbar {
  display: none;
}

body[data-screen="skins"] .game-shell {
  width: min(1540px, calc(100vw - 20px));
  min-height: calc(100svh - 20px);
  height: auto;
  overflow: hidden;
}

.avatar-render {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
}

.avatar-render svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 24px 22px rgba(0, 0, 0, 0.36));
}

.avatar-raster {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: 50% 100%;
  filter: drop-shadow(0 24px 22px rgba(0, 0, 0, 0.36));
}

.avatar-raster--mini {
  width: 38px;
  height: 38px;
  object-fit: cover;
  object-position: 50% 8%;
  border-radius: 50%;
  filter: none;
}

.avatar-raster--card {
  width: 122px;
  height: 176px;
}

.avatar-raster--preview {
  width: min(270px, 70vw);
  max-height: 330px;
}

.avatar-raster--spotlight {
  width: 118px;
}

.avatar-render--mini svg {
  width: 38px;
  height: 38px;
  filter: none;
}

.avatar-render--start {
  width: 100%;
}

.avatar-render--card svg {
  width: 122px;
  height: 176px;
}

.avatar-render--preview svg {
  width: min(270px, 70vw);
  max-height: 330px;
}

.avatar-render--spotlight svg {
  width: 118px;
  height: auto;
}

.avatar-svg {
  transform-origin: 50% 92%;
}

.avatar-motion-idle {
  animation: avatar-breathe 3.1s ease-in-out infinite;
}

.avatar-motion-thinking,
.avatar-motion-question_suspense {
  animation: avatar-think 1.8s ease-in-out infinite;
}

.avatar-motion-correct_answer,
.avatar-motion-victory,
.avatar-motion-level_up {
  animation: avatar-celebrate 0.9s ease-in-out infinite;
}

.avatar-motion-wrong_answer,
.avatar-motion-game_over {
  animation: avatar-worry 0.42s ease-in-out 4;
}

.avatar-motion-hint {
  animation: avatar-hint 1.4s ease-in-out infinite;
}

.avatar-effect {
  transform-origin: 50% 50%;
  animation: avatar-glow 2.8s ease-in-out infinite;
}

.avatar-effect--letters text {
  font-size: 28px;
  font-weight: 950;
  animation: avatar-letter-float 2.6s ease-in-out infinite;
}

.avatar-effect--letters text:nth-child(2) {
  animation-delay: -0.8s;
}

.avatar-effect--letters text:nth-child(3) {
  animation-delay: -1.4s;
}

.avatar-effect--confetti {
  animation: avatar-confetti 1.4s ease-in-out infinite;
}

@keyframes avatar-breathe {
  0%, 100% { transform: translateY(0) rotate(-0.4deg); }
  50% { transform: translateY(-5px) rotate(0.4deg); }
}

@keyframes avatar-think {
  0%, 100% { transform: translateY(0) rotate(0); }
  45% { transform: translateY(-4px) rotate(-1.2deg); }
}

@keyframes avatar-celebrate {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-13px) scale(1.035); }
}

@keyframes avatar-worry {
  0%, 100% { transform: translateX(0); }
  35% { transform: translateX(-4px) rotate(-1.5deg); }
  70% { transform: translateX(4px) rotate(1.5deg); }
}

@keyframes avatar-hint {
  0%, 100% { transform: translateY(-2px); filter: drop-shadow(0 0 0 rgba(248, 200, 75, 0)); }
  50% { transform: translateY(-9px); filter: drop-shadow(0 0 22px rgba(248, 200, 75, 0.72)); }
}

@keyframes avatar-glow {
  0%, 100% { opacity: 0.64; transform: scale(0.98); }
  50% { opacity: 0.98; transform: scale(1.05); }
}

@keyframes avatar-letter-float {
  0%, 100% { transform: translateY(0); opacity: 0.45; }
  50% { transform: translateY(-9px); opacity: 0.9; }
}

@keyframes avatar-confetti {
  0%, 100% { opacity: 0.45; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-8px); }
}

.skin-screen {
  position: relative;
  z-index: 4;
  display: grid;
  gap: 14px;
  min-height: calc(100svh - 52px);
  padding: 74px 8px 16px;
}

.skin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  background:
    linear-gradient(90deg, rgba(248, 200, 75, 0.14), transparent 26% 74%, rgba(105, 216, 255, 0.12)),
    rgba(3, 13, 39, 0.74);
  border: 1px solid rgba(248, 200, 75, 0.44);
  border-radius: 10px;
  box-shadow: inset 0 0 28px rgba(105, 216, 255, 0.08);
}

.skin-header h2 {
  margin: 0;
  color: #ffdf78;
  font-size: clamp(1.6rem, 2.6vw, 2.75rem);
  line-height: 1;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.55);
}

.skin-header p {
  margin: 6px 0 0;
  color: #dce8ff;
  font-weight: 850;
}

.skin-header-actions,
.skin-preview-actions,
.builder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skin-layout {
  display: grid;
  grid-template-columns: 210px minmax(360px, 1fr) minmax(310px, 0.72fr);
  grid-template-areas:
    "filters grid preview"
    "filters builder builder";
  gap: 14px;
  align-items: stretch;
}

.skin-filter-panel,
.skin-grid-panel,
.skin-preview-panel,
.avatar-builder-panel {
  position: relative;
  background:
    linear-gradient(135deg, rgba(105, 216, 255, 0.12), transparent 46%),
    linear-gradient(180deg, rgba(5, 22, 62, 0.9), rgba(1, 10, 31, 0.88));
  border: 1px solid rgba(248, 200, 75, 0.52);
  border-radius: 12px;
  box-shadow: inset 0 0 26px rgba(77, 158, 255, 0.12), 0 12px 30px rgba(0,0,0,.22);
  backdrop-filter: blur(8px);
}

.skin-filter-panel {
  grid-area: filters;
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 14px;
}

.skin-grid-panel {
  grid-area: grid;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.skin-preview-panel {
  grid-area: preview;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.avatar-builder-panel {
  grid-area: builder;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.skin-filter-block {
  display: grid;
  gap: 8px;
}

.skin-filter-block > span,
.builder-option-group h3 {
  margin: 0;
  color: #ffdf78;
  font-size: 0.86rem;
  font-weight: 950;
}

.skin-filter-list,
.builder-tabs {
  display: grid;
  gap: 7px;
}

.skin-filter-list button,
.builder-tabs button {
  min-height: 40px;
  padding: 0 12px;
  color: #fff2b4;
  background: rgba(3, 8, 31, 0.62);
  border: 1px solid rgba(105, 216, 255, 0.22);
  border-radius: 8px;
  font-weight: 900;
  text-align: start;
}

.skin-filter-list button.active,
.builder-tabs button.active {
  color: #071432;
  background: linear-gradient(180deg, #fff2b4, #f8c84b);
  border-color: #fff8d8;
}

.skin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(154px, 1fr));
  gap: 10px;
  max-height: min(58vh, 520px);
  overflow: auto;
  padding-inline-end: 2px;
}

.skin-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  min-height: 244px;
  padding: 10px;
  color: #fff2b4;
  background:
    radial-gradient(circle at 50% 18%, rgba(248, 200, 75, 0.18), transparent 56%),
    rgba(2, 9, 29, 0.74);
  border: 1px solid rgba(105, 216, 255, 0.24);
  border-radius: 10px;
  text-align: center;
  box-shadow: inset 0 0 18px rgba(105, 216, 255, 0.08);
}

.skin-card:hover:not(.locked),
.skin-card.active {
  border-color: rgba(248, 200, 75, 0.86);
  box-shadow: inset 0 0 22px rgba(248, 200, 75, 0.16), 0 0 22px rgba(248, 200, 75, 0.18);
  transform: translateY(-2px);
}

.skin-card.locked {
  opacity: 0.58;
}

.skin-card__badge {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  z-index: 2;
  padding: 4px 7px;
  color: #071432;
  background: linear-gradient(180deg, #fff2b4, #f8c84b);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 950;
}

.skin-card strong {
  color: #ffffff;
  font-size: 0.95rem;
  line-height: 1.1;
}

.skin-card small,
.skin-card em,
.skin-details span,
.skin-details small {
  color: #dce8ff;
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 850;
}

.skin-preview-stage {
  display: grid;
  place-items: center;
  min-height: 330px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 34%, rgba(248, 200, 75, 0.2), transparent 34%),
    radial-gradient(circle at 50% 70%, rgba(105, 216, 255, 0.16), transparent 54%),
    rgba(2, 9, 29, 0.62);
  border: 1px solid rgba(105, 216, 255, 0.24);
  border-radius: 10px;
}

.skin-details {
  display: grid;
  gap: 5px;
  min-height: 88px;
}

.skin-details strong {
  color: #ffdf78;
  font-size: 1.2rem;
}

.skin-details p {
  margin: 0;
  color: #ffffff;
  line-height: 1.35;
  font-weight: 820;
}

#skinUnlockBadge,
#avatarSaveStatus {
  color: #071432;
  background: linear-gradient(180deg, #fff2b4, #f8c84b);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.75rem;
  font-weight: 950;
}

#skinUnlockBadge.locked {
  color: #fff;
  background: linear-gradient(180deg, #f15c5c, #8f121d);
}

.builder-tabs {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.builder-tabs button {
  text-align: center;
  font-size: 0.78rem;
}

.builder-options {
  display: grid;
  gap: 12px;
  max-height: 280px;
  overflow: auto;
  padding-inline-end: 2px;
}

.builder-option-group {
  display: grid;
  gap: 8px;
}

.builder-option-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
}

.builder-option {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 8px;
  min-height: 62px;
  padding: 7px 8px;
  color: #ffffff;
  background: rgba(2, 9, 29, 0.72);
  border: 1px solid rgba(105, 216, 255, 0.2);
  border-radius: 8px;
  text-align: start;
}

.builder-option.active {
  border-color: rgba(248, 200, 75, 0.9);
  box-shadow: inset 0 0 18px rgba(248, 200, 75, 0.14);
}

.builder-option.locked {
  opacity: 0.52;
}

.option-swatch,
.option-symbol {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #071432;
  background: #f8c84b;
  border: 2px solid rgba(255, 242, 180, 0.8);
  border-radius: 50%;
  font-style: normal;
  font-weight: 950;
}

.option-swatch--split {
  background: linear-gradient(135deg, var(--swatch-a), var(--swatch-a) 48%, var(--swatch-b) 49%, var(--swatch-b));
}

.builder-option span {
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.builder-option small {
  color: #dce8ff;
  font-size: 0.66rem;
  font-weight: 800;
}

.empty-builder {
  margin: 0;
  color: #dce8ff;
  font-weight: 850;
}

body[data-screen="start"] .start-rabbi .avatar-render {
  width: 100%;
}

body[data-screen="game"] .tv-rabbi-hero.avatar-render {
  display: grid;
}

body[data-screen="game"] .tv-rabbi-hero.avatar-render svg {
  width: 100%;
  max-height: calc(100vh - 140px);
}

body[data-screen="game"] .host-spotlight .avatar-render {
  position: relative;
  z-index: 1;
  width: 118px;
}

@media (max-width: 1120px) {
  .skin-layout {
    grid-template-columns: 170px minmax(0, 1fr);
    grid-template-areas:
      "filters preview"
      "filters grid"
      "builder builder";
  }

  .skin-grid {
    max-height: 380px;
  }
}

@media (max-width: 760px) {
  body[data-screen="skins"] .game-shell {
    width: 100vw;
    min-height: 100svh;
    margin: 0;
    padding: 8px;
    border: 0;
    border-radius: 0;
    overflow: auto;
  }

  .skin-screen {
    min-height: auto;
    padding: 52px 0 12px;
  }

  .skin-header {
    align-items: stretch;
    flex-direction: column;
    padding: 10px;
  }

  .skin-header h2 {
    font-size: 1.55rem;
  }

  .skin-header p {
    font-size: 0.86rem;
  }

  .skin-header-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .skin-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "preview"
      "filters"
      "grid"
      "builder";
  }

  .skin-filter-panel {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .skin-filter-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .skin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }

  .skin-card {
    min-height: 214px;
  }

  .avatar-render--card svg {
    width: 104px;
    height: 150px;
  }

  .skin-preview-stage {
    min-height: 250px;
  }

  .avatar-render--preview svg {
    width: 210px;
    max-height: 250px;
  }

  .builder-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .builder-options {
    max-height: none;
  }

  .builder-option-row {
    grid-template-columns: 1fr;
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(115deg, rgba(180, 51, 255, 0.2), transparent 32%),
    linear-gradient(245deg, rgba(244, 189, 53, 0.18), transparent 34%),
    radial-gradient(circle at 50% 12%, rgba(24, 200, 255, 0.24), transparent 32rem),
    linear-gradient(180deg, #02040e 0%, #071a58 44%, #030617 100%);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

body::before {
  opacity: 0.48;
  background:
    repeating-linear-gradient(90deg, rgba(24, 200, 255, 0.13) 0 1px, transparent 1px 58px),
    repeating-linear-gradient(0deg, rgba(244, 189, 53, 0.08) 0 1px, transparent 1px 58px),
    linear-gradient(120deg, transparent 0 38%, rgba(24, 200, 255, 0.12) 44%, transparent 50% 100%);
  transform: perspective(800px) rotateX(58deg) translateY(18%);
  transform-origin: 50% 100%;
  animation: grid-drift 16s linear infinite;
}

body::after {
  opacity: 0.7;
  background:
    linear-gradient(108deg, transparent 0 18%, rgba(244, 189, 53, 0.09) 19% 20%, transparent 22% 100%),
    linear-gradient(252deg, transparent 0 23%, rgba(18, 200, 120, 0.08) 24% 25%, transparent 27% 100%),
    repeating-linear-gradient(135deg, transparent 0 34px, rgba(255,255,255,0.025) 35px 36px);
}

@keyframes grid-drift {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: 116px 58px, 58px 116px, 0 0; }
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
p {
  margin-top: 0;
}

.game-shell {
  position: relative;
  isolation: isolate;
  z-index: 1;
  width: min(1540px, calc(100vw - 20px));
  min-height: calc(100vh - 20px);
  margin: 10px auto;
  padding: 16px;
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(18, 200, 120, 0.08), transparent 28% 72%, rgba(244, 189, 53, 0.08)),
    linear-gradient(180deg, rgba(9, 28, 91, 0.88), rgba(3, 6, 23, 0.94)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 72px);
  border: 1px solid rgba(24, 200, 255, 0.38);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.studio-beams {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.show-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0.95;
  pointer-events: none;
}

.studio-beams span {
  position: absolute;
  top: -18%;
  width: 17%;
  height: 120%;
  background: linear-gradient(180deg, rgba(24, 200, 255, 0.2), rgba(244, 189, 53, 0.08), transparent 74%);
  filter: blur(12px);
  transform-origin: 50% 0;
  animation: beam-sweep 9s ease-in-out infinite;
}

.studio-beams span:nth-child(1) { left: 5%; transform: rotate(18deg); }
.studio-beams span:nth-child(2) { left: 28%; transform: rotate(-10deg); animation-delay: -2s; }
.studio-beams span:nth-child(3) { right: 24%; transform: rotate(10deg); animation-delay: -4s; }
.studio-beams span:nth-child(4) { right: 4%; transform: rotate(-18deg); animation-delay: -6s; }

@keyframes beam-sweep {
  0%, 100% { opacity: 0.35; transform: rotate(-18deg) translateX(-22px); }
  50% { opacity: 0.9; transform: rotate(18deg) translateX(22px); }
}

.topbar,
.toolbar,
.brand-lockup,
.host-row,
.score-strip,
.question-meta,
.lifelines,
.action-row,
.panel-title {
  display: flex;
  align-items: center;
}

.topbar {
  position: relative;
  z-index: 2;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px 16px;
  background: linear-gradient(90deg, rgba(5, 12, 38, 0.72), rgba(8, 28, 88, 0.45), rgba(5, 12, 38, 0.72));
  border: 1px solid rgba(105, 172, 255, 0.22);
  border-radius: var(--radius);
}

.brand-lockup {
  gap: 12px;
  min-width: 280px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: var(--gold);
  background:
    radial-gradient(circle, #102d8e 0 42%, #06123a 43% 100%);
  border: 2px solid var(--gold);
  border-radius: 50%;
  font-size: 1.7rem;
  font-weight: 950;
  box-shadow: 0 0 22px rgba(244, 189, 53, 0.45), inset 0 0 18px rgba(24, 200, 255, 0.34);
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 850;
}

h1 {
  margin-bottom: 0;
  font-size: 2rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.toolbar {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 3px;
  padding: 4px;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(24, 200, 255, 0.38);
  border-radius: var(--radius);
  box-shadow: inset 0 0 18px rgba(24, 200, 255, 0.08);
}

.difficulty-picker {
  grid-template-columns: repeat(5, minmax(54px, auto));
}

.seg {
  min-width: 48px;
  min-height: 38px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-weight: 850;
}

.seg.active {
  color: #06123a;
  background: linear-gradient(180deg, #ffe89b, var(--gold));
  box-shadow: 0 0 18px rgba(244, 189, 53, 0.45);
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 11px;
  color: var(--muted);
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(24, 200, 255, 0.38);
  border-radius: var(--radius);
}

.switch input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.switch span {
  position: relative;
  width: 44px;
  height: 24px;
  background: rgba(174, 189, 231, 0.28);
  border-radius: 999px;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 18px;
  height: 18px;
  background: var(--muted);
  border-radius: 50%;
  transition: transform 0.18s ease;
}

.switch input:checked + span {
  background: var(--magenta);
}

.switch input:checked + span::after {
  background: white;
  transform: translateX(20px);
}

[dir="rtl"] .switch input:checked + span::after {
  transform: translateX(-20px);
}

.icon-command,
.primary-action,
.secondary-action,
.admin-entry {
  border: 0;
  border-radius: var(--radius);
  font-weight: 900;
}

.icon-command {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--gold);
  background: rgba(2, 6, 23, 0.82);
  border: 1px solid rgba(244, 189, 53, 0.55);
  font-size: 1.35rem;
  box-shadow: 0 0 18px rgba(244, 189, 53, 0.25);
}

.session-dock {
  /* Pinned flush to the top edge (not a floating pill) — Tal request */
  position: fixed;
  top: 0;
  /* BUG-036: logical inset so the dock mirrors to the inline-start corner in RTL */
  inset-inline-end: 12px;
  z-index: 95;
  display: grid;
  justify-items: end;
  gap: 8px;
}

.session-toggle {
  display: grid;
  min-width: 138px;
  min-height: 46px;
  padding: 6px 14px;
  color: #06123a;
  text-align: start;
  background: linear-gradient(180deg, #ffe99a, var(--gold));
  border: 1px solid #fff0b5;
  border-radius: var(--radius);
  /* squared top so it reads as attached to the top edge, not a hovering pill */
  border-start-start-radius: 0;
  border-start-end-radius: 0;
  border-top: 0;
  font-weight: 950;
  box-shadow: 0 4px 14px rgba(2, 6, 20, 0.45);
}

.session-toggle small {
  color: rgba(6, 18, 58, 0.78);
  font-size: 0.72rem;
  font-weight: 900;
}

.session-panel {
  width: min(340px, calc(100vw - 28px));
  padding: 14px;
  color: var(--ink);
  background:
    linear-gradient(125deg, rgba(24, 200, 255, 0.12), transparent 46%),
    rgba(3, 8, 31, 0.95);
  border: 1px solid rgba(105, 172, 255, 0.38);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42), inset 0 0 28px rgba(24, 200, 255, 0.08);
}

.admin-launch {
  display: inline-grid;
  place-items: center;
  text-decoration: none;
}

body[data-screen="start"] .main-grid,
body[data-screen="game"] .start-screen,
body[data-screen="start"] .topbar,
body[data-screen="game"] .topbar {
  display: none;
}

.start-screen {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: calc(100vh - 150px);
  padding: 26px 18px 34px;
  text-align: center;
}

.start-screen::before {
  content: "";
  position: absolute;
  inset: 8% 10% 0;
  border: 2px solid rgba(244, 189, 53, 0.22);
  border-radius: 50%;
  transform: perspective(920px) rotateX(68deg);
  pointer-events: none;
}

.start-visual {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(140px, 190px);
  align-items: end;
  justify-content: center;
  gap: 24px;
  width: min(760px, 100%);
  margin-bottom: 14px;
}

.title-emblem {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 218px;
  padding: 24px 34px;
  overflow: hidden;
  text-align: center;
  background:
    linear-gradient(90deg, rgba(244, 189, 53, 0.14), transparent 18% 82%, rgba(244, 189, 53, 0.14)),
    linear-gradient(180deg, rgba(15, 48, 150, 0.94), rgba(3, 10, 35, 0.98));
  border: 2px solid rgba(244, 189, 53, 0.76);
  border-radius: var(--radius);
  clip-path: polygon(8% 0, 92% 0, 100% 50%, 92% 100%, 8% 100%, 0 50%);
  box-shadow: inset 0 0 42px rgba(24, 200, 255, 0.18), 0 0 34px rgba(244, 189, 53, 0.2);
}

.title-emblem::before {
  content: "";
  position: absolute;
  inset: 10px 16px;
  border: 1px solid rgba(24, 200, 255, 0.36);
  clip-path: polygon(8% 0, 92% 0, 100% 50%, 92% 100%, 8% 100%, 0 50%);
  pointer-events: none;
}

.title-emblem__ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(24, 200, 255, 0.32);
  pointer-events: none;
}

.ring-a {
  width: 220px;
  height: 90px;
  transform: rotate(12deg);
  animation: title-ring-a 8s linear infinite;
}

.ring-b {
  width: 240px;
  height: 84px;
  border-color: rgba(244, 189, 53, 0.34);
  transform: rotate(-18deg);
  animation: title-ring-b 11s linear infinite;
}

@keyframes title-ring-a { to { transform: rotate(372deg); } }
@keyframes title-ring-b { to { transform: rotate(-378deg); } }

.title-emblem p,
.title-emblem strong,
.title-emblem small {
  position: relative;
  z-index: 1;
  margin: 0;
}

.title-emblem p {
  color: var(--gold);
  font-size: 1.05rem;
  font-weight: 950;
}

.title-emblem strong {
  color: white;
  font-size: 2.55rem;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.72), 0 0 22px rgba(24, 200, 255, 0.34);
}

.title-emblem small {
  color: #dce8ff;
  font-size: 0.95rem;
  font-weight: 850;
}

.start-rabbi {
  position: relative;
  display: grid;
  place-items: center;
  width: 190px;
  aspect-ratio: 1;
  overflow: hidden;
  background:
    conic-gradient(from 0deg, rgba(24,200,255,0.12), rgba(244,189,53,0.18), rgba(36,99,199,0.14), rgba(24,200,255,0.12)),
    radial-gradient(circle, rgba(255,255,255,0.08), rgba(4,11,38,0.92) 64%);
  border: 1px solid rgba(24, 200, 255, 0.38);
  border-radius: 50%;
  box-shadow: 0 0 32px rgba(24, 200, 255, 0.24);
}

.start-rabbi__ring {
  position: absolute;
  inset: 11px;
  border: 1px solid rgba(244, 189, 53, 0.44);
  border-radius: 50%;
  animation: ring-pulse-flat 3s ease-in-out infinite;
  /* Rotating ring around the character is OFF by default (Tal request).
     Opt back in by adding class "fx-rings" to <body>. */
  display: none;
}
body.fx-rings .start-rabbi__ring { display: block; }
/* Also stop the animated ring around the in-game host by default */
.host-spotlight::before { animation: none; opacity: 0.28; }
body.fx-rings .host-spotlight::before { animation: ring-pulse-flat 3s ease-in-out infinite; opacity: 1; }
/* Sweeping studio light beams OFF by default (Tal: no strange rotating light) */
.studio-beams { display: none; }
body.fx-rings .studio-beams { display: block; }
/* Hide the rotating "atom" rings behind the title emblem (no strange light) */
.title-emblem__ring { display: none !important; }
body.fx-rings .title-emblem__ring { display: block !important; animation: revert; }

/* Home-screen mute toggle (sound is ON by default) */
.mute-toggle {
  position: fixed;
  top: 8px;
  inset-inline-start: 14px;
  z-index: 95;
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  /* matches the game's gold control buttons; turns navy when muted */
  border: 1px solid #fff0b5;
  background: linear-gradient(180deg, #ffe99a, var(--gold));
  color: #06123a;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(244, 189, 53, 0.32);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
body[data-screen="start"] .mute-toggle { display: inline-flex; }
.mute-toggle.is-muted {
  background: rgba(8, 18, 48, 0.82);
  border-color: rgba(160, 184, 230, 0.4);
  color: #aab8da;
  box-shadow: 0 4px 14px rgba(2, 6, 20, 0.45);
}
.mute-ic { width: 21px; height: 21px; pointer-events: none; display: block; }
.mute-ic--off { display: none; }
.mute-toggle.is-muted .mute-ic--on { display: none; }
.mute-toggle.is-muted .mute-ic--off { display: block; }

/* Android install — button shown only on Android, plus a one-time first-visit banner */
.install-action { display: none; }
body.is-android .install-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(60, 220, 130, 0.55);
  background: rgba(12, 40, 28, 0.7);
  color: #6cf0a8;
  font-weight: 850;
  font-size: 0.98rem;
  text-decoration: none;
}
.android-install-banner {
  position: fixed;
  inset-inline: 10px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 460px;
  margin: 0 auto;
  padding: 12px 14px;
  border-radius: 20px;
  border: 1px solid rgba(120, 150, 220, 0.28);
  background: linear-gradient(180deg, rgba(14, 30, 58, 0.99), rgba(8, 18, 42, 0.99));
  box-shadow: 0 18px 50px rgba(2, 6, 20, 0.7);
  animation: install-rise 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes install-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.android-install-banner[hidden] { display: none; }
.android-install-banner__icon {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 13px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}
.android-install-banner__body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.android-install-banner__title { color: #fff; font-weight: 900; font-size: 1.02rem; line-height: 1.2; }
.android-install-banner__sub { color: #aab8da; font-size: 0.82rem; }
.android-install-banner__cta {
  flex: none;
  padding: 11px 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe99a, var(--gold));
  color: #06123a;
  font-weight: 950;
  font-size: 0.96rem;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(244, 189, 53, 0.34);
}
.android-install-banner__close {
  position: absolute;
  top: 7px;
  inset-inline-end: 9px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.1);
  color: #cdd8ef;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
}

/* Language switch — intentionally low-emphasis (Tal request) */
.start-group--lang { opacity: 0.92; }
.start-group--lang > span { font-size: 0.78rem; opacity: 0.7; }
.start-group--lang .segmented {
  padding: 2px;
  gap: 2px;
  border-color: rgba(120, 150, 220, 0.22);
  box-shadow: none;
  background: rgba(2, 6, 23, 0.5);
}
.start-group--lang .seg {
  min-width: 0;
  min-height: 28px;
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 700;
}
.start-group--lang .seg.active {
  background: rgba(244, 189, 53, 0.22);
  color: var(--gold-soft, #ffe99a);
  box-shadow: none;
}

/* Home-screen blog link (subtle, non-intrusive) */
.blog-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(120, 150, 220, 0.32);
  background: rgba(10, 22, 48, 0.55);
  color: #cdd8ef;
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none;
}
.blog-link:hover { border-color: rgba(244, 189, 53, 0.5); color: #fff; }

/* Study area inside the profile/session panel (moved off the home screen) */
.study-area {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(120, 150, 220, 0.2);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.study-area__title { font-weight: 900; color: var(--gold, #f4bd35); font-size: 0.9rem; }
.study-area__empty { color: var(--muted, #aab8da); font-size: 0.82rem; margin: 0; line-height: 1.4; }

/* Discoverable blog link near the top of the home screen (Tal: blog was unreachable) */
.start-blog-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid rgba(120, 150, 220, 0.3);
  background: rgba(10, 22, 48, 0.55);
  color: #cdd8ef;
  font-weight: 700;
  font-size: 0.86rem;
  text-decoration: none;
}
.start-blog-link:hover { border-color: rgba(244, 189, 53, 0.5); color: #fff; }

/* Compact alternative-mode chips — Classic is the big "Start game" button;
   these 3 (family/learning/daily) start their mode on a single click (Tal). */
.solo-mode-play {
  width: 100%;
  margin: 10px 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 1.12rem;
}
.solo-mode-grid {
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.solo-mode-or {
  flex-basis: 100%;
  text-align: center;
  color: var(--muted, #aab8da);
  font-size: 0.8rem;
  margin: 2px 0;
}
.solo-mode-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid rgba(120, 150, 220, 0.32);
  background: rgba(10, 22, 48, 0.6);
  color: #dde6fb;
  font-weight: 850;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.solo-mode-chip b { font-style: normal; font-size: 1.05rem; line-height: 1; }
.solo-mode-chip:hover,
.solo-mode-chip:focus-visible {
  border-color: rgba(244, 189, 53, 0.55);
  color: #fff;
  background: rgba(16, 32, 64, 0.82);
}

/* Back-to-characters button (mobile skins flow) */
.skin-editor-back {
  display: none;
  align-items: center;
  gap: 4px;
  margin-inline-end: auto;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(244, 189, 53, 0.5);
  background: rgba(8, 18, 48, 0.72);
  color: var(--gold);
  font-weight: 800;
  font-size: 0.98rem;
  cursor: pointer;
}
/* On mobile: selecting a character collapses the grid and reveals the editor,
   so there's no long scroll past the whole grid to save/customize (Tal request). */
@media (max-width: 760px) {
  body.skin-editing .skin-grid-panel { display: none; }
  body[data-screen="skins"]:not(.skin-editing) .avatar-builder-panel { display: none; }
  body.skin-editing .skin-editor-back { display: inline-flex; }
}

.start-rabbi img {
  position: relative;
  z-index: 1;
  width: 158px;
  height: auto;
  transform-origin: 50% 92%;
  animation: host-breathe 2.9s ease-in-out infinite;
}

.start-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  width: min(760px, 100%);
  margin-bottom: 22px;
}

.start-copy h2 {
  margin: 0;
  color: white;
  font-size: 2.25rem;
  line-height: 1.1;
  letter-spacing: 0;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.75);
}

.start-controls {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  width: min(920px, 100%);
  margin: 0 auto 18px;
  padding: 18px;
  background:
    linear-gradient(90deg, rgba(24, 200, 255, 0.12), transparent 22% 78%, rgba(244, 189, 53, 0.1)),
    rgba(3, 8, 31, 0.64);
  border: 1px solid rgba(105, 172, 255, 0.28);
  border-radius: var(--radius);
  box-shadow: inset 0 0 34px rgba(24, 200, 255, 0.08);
}

.start-group {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.start-group > span {
  color: var(--gold);
  font-size: 0.86rem;
  font-weight: 900;
}

.player-hub {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(320px, 1.08fr);
  gap: 14px;
  width: min(920px, 100%);
  margin: 0 auto 18px;
}

.player-card {
  padding: 14px;
  text-align: start;
  background:
    linear-gradient(125deg, rgba(24, 200, 255, 0.12), transparent 44%),
    rgba(3, 8, 31, 0.72);
  border: 1px solid rgba(105, 172, 255, 0.3);
  border-radius: var(--radius);
  box-shadow: inset 0 0 28px rgba(24, 200, 255, 0.08);
}

.player-card .panel-title {
  margin-bottom: 10px;
}

.player-card .panel-title h2 {
  margin: 0;
  color: var(--gold);
  font-size: 1rem;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.auth-form input {
  min-height: 42px;
  width: 100%;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(2, 6, 23, 0.82);
  border: 1px solid rgba(105, 172, 255, 0.36);
  border-radius: var(--radius);
  outline: 0;
}

.auth-form input:focus {
  border-color: rgba(244, 189, 53, 0.72);
  box-shadow: 0 0 0 3px rgba(244, 189, 53, 0.12);
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.auth-actions .secondary-action {
  flex: 1 1 96px;
  min-height: 40px;
  padding: 0 12px;
}

.auth-status {
  min-height: 22px;
  margin: 10px 0 0;
  color: #dce8ff;
  font-size: 0.86rem;
  font-weight: 850;
}

.leaderboard-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leaderboard-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 7px 9px;
  background: rgba(3, 8, 31, 0.72);
  border: 1px solid rgba(105, 172, 255, 0.18);
  border-radius: 6px;
}

.leaderboard-list li.is-me {
  border-color: rgba(244, 189, 53, 0.58);
  box-shadow: inset 0 0 18px rgba(244, 189, 53, 0.12);
}

.leaderboard-list b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #06123a;
  background: linear-gradient(180deg, #ffe99a, var(--gold));
  border-radius: 50%;
  font-size: 0.78rem;
}

.leaderboard-list strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-list small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.leaderboard-list em {
  color: var(--gold);
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

/* BUG-040: demo / seeded leaderboard rows. The app emits <span class="demo-badge">
   and toggles `is-demo` on the <li>. margin-inline-start keeps the pill RTL-safe. */
.demo-badge {
  display: inline-block;
  margin-inline-start: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #2a1a00; /* dark ink on gold for AA contrast (no --ink-on-gold token exists) */
  background: linear-gradient(180deg, #ffe99a, var(--gold));
  border: 1px solid rgba(0, 0, 0, 0.18);
  vertical-align: middle;
}

.leaderboard-list li.is-demo {
  opacity: 0.72;
}

/* BUG-003: practice vs verified score badges (leaderboard JS labels rows). */
.score-badge {
  display: inline-block;
  margin-inline-start: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  vertical-align: middle;
}

.score-badge.verified {
  background: rgba(46, 160, 67, 0.22);
  color: #7ee2a0;
  border: 1px solid rgba(46, 160, 67, 0.5);
}

.score-badge.practice {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.start-stats {
  position: relative;
  z-index: 1;
  width: min(780px, 100%);
  min-height: 44px;
  margin-bottom: 18px;
  padding: 10px 18px;
  color: #e7efff;
  background: linear-gradient(180deg, rgba(13, 37, 112, 0.72), rgba(3, 8, 31, 0.72));
  border: 1px solid rgba(244, 189, 53, 0.34);
  border-radius: var(--radius);
  font-weight: 850;
  line-height: 1.35;
}

.start-actions {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.start-action {
  min-width: 220px;
  min-height: 58px;
  font-size: 1.08rem;
  box-shadow: 0 0 26px rgba(244, 189, 53, 0.24);
}

.public-scoreboard {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  width: min(920px, 100%);
  margin: 18px auto 0;
  padding: 14px;
  text-align: start;
  background:
    linear-gradient(125deg, rgba(24, 200, 255, 0.12), transparent 48%),
    rgba(3, 8, 31, 0.72);
  border: 1px solid rgba(105, 172, 255, 0.3);
  border-radius: var(--radius);
  box-shadow: inset 0 0 28px rgba(24, 200, 255, 0.08);
}

.public-scoreboard .panel-title {
  margin-bottom: 0;
}

.weekly-champions,
.monthly-champions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.weekly-champions article,
.monthly-champions article {
  min-height: 96px;
  padding: 12px;
  background:
    radial-gradient(circle at 50% 0, rgba(244, 189, 53, 0.2), transparent 58%),
    rgba(2, 6, 23, 0.76);
  border: 1px solid rgba(244, 189, 53, 0.28);
  border-radius: var(--radius);
}

.monthly-champions article {
  background:
    radial-gradient(circle at 50% 0, rgba(24, 200, 255, 0.18), transparent 58%),
    rgba(2, 6, 23, 0.76);
  border-color: rgba(24, 200, 255, 0.28);
}

.weekly-champions span,
.weekly-champions small,
.monthly-champions span,
.monthly-champions small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.weekly-champions strong,
.monthly-champions strong {
  display: block;
  min-height: 28px;
  margin: 7px 0 4px;
  overflow: hidden;
  color: var(--gold);
  font-size: 1.08rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-board {
  display: grid;
  gap: 6px;
}

.public-board-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1.25fr) 92px 86px 96px 100px;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 7px 9px;
  color: #e7efff;
  background: rgba(3, 8, 31, 0.72);
  border: 1px solid rgba(105, 172, 255, 0.18);
  border-radius: 6px;
  font-size: 0.86rem;
  font-weight: 850;
}

.public-board-row--head {
  color: #06123a;
  background: linear-gradient(180deg, #ffe99a, var(--gold));
  border-color: #fff0b5;
}

.public-board-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-player {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.public-player small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-board-row--head .public-player {
  display: block;
}

.public-board-row em {
  color: var(--gold);
  font-style: normal;
  font-weight: 950;
}

.public-board-row--head em {
  color: #06123a;
}

.board-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.board-pager .secondary-action {
  min-height: 38px;
  padding: 0 16px;
}

#boardPageLabel {
  min-width: 130px;
  color: var(--muted);
  text-align: center;
  font-weight: 900;
}

.admin-entry {
  display: inline-grid;
  place-items: center;
  min-height: 58px;
  padding: 0 20px;
  color: #dce8ff;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(24, 200, 255, 0.38);
  text-decoration: none;
}

.admin-page .topbar {
  margin-bottom: 16px;
}

.admin-shell {
  min-height: calc(100vh - 20px);
}

.admin-login,
.admin-dashboard {
  position: relative;
  z-index: 1;
}

.admin-login {
  display: grid;
  gap: 14px;
  width: min(620px, 100%);
  margin: 72px auto 0;
  padding: 22px;
  background:
    linear-gradient(90deg, rgba(24, 200, 255, 0.12), transparent 24% 76%, rgba(244, 189, 53, 0.1)),
    rgba(3, 8, 31, 0.78);
  border: 1px solid rgba(105, 172, 255, 0.32);
  border-radius: var(--radius);
  box-shadow: inset 0 0 34px rgba(24, 200, 255, 0.08);
}

.admin-login h2,
.admin-toolbar h2 {
  margin: 0;
  color: var(--gold);
  font-size: 1.4rem;
}

.admin-login p,
.admin-note {
  margin: 0;
  color: #dce8ff;
  line-height: 1.45;
}

.admin-note {
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-form {
  display: grid;
  gap: 12px;
}

.admin-form label {
  display: grid;
  gap: 6px;
  color: var(--gold);
  font-size: 0.86rem;
  font-weight: 900;
  text-align: start;
}

.admin-form input,
.admin-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: white;
  background: rgba(3, 8, 31, 0.82);
  border: 1px solid rgba(105, 172, 255, 0.34);
  border-radius: var(--radius);
  outline: none;
}

.admin-form textarea {
  resize: vertical;
  min-height: 150px;
  line-height: 1.5;
}

.admin-form input:focus,
.admin-form textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(244, 189, 53, 0.14);
}

.admin-dashboard {
  display: grid;
  gap: 16px;
}

.admin-toolbar,
.admin-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.admin-stat {
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 16px;
  background:
    radial-gradient(circle at 50% 0, rgba(24, 200, 255, 0.22), transparent 58%),
    linear-gradient(180deg, rgba(13, 37, 112, 0.88), rgba(3, 8, 31, 0.94));
  border: 1px solid rgba(105, 172, 255, 0.34);
  border-radius: var(--radius);
  box-shadow: inset 0 0 28px rgba(24, 200, 255, 0.08);
}

.admin-stat span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
}

.admin-stat strong {
  color: var(--gold);
  font-size: 2rem;
  line-height: 1;
}

.admin-panels {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px) minmax(320px, 440px);
  gap: 14px;
}

.admin-panel {
  min-width: 0;
}

.admin-panel--wide {
  grid-column: 1 / -1;
}

.admin-table {
  display: grid;
  gap: 6px;
  overflow: auto;
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(86px, 1.15fr) repeat(5, minmax(72px, 1fr));
  gap: 6px;
  min-width: 520px;
}

.admin-row span {
  min-height: 40px;
  display: grid;
  place-items: center;
  padding: 6px;
  color: #e7efff;
  background: rgba(3, 8, 31, 0.68);
  border: 1px solid rgba(105, 172, 255, 0.18);
  border-radius: 6px;
  font-weight: 850;
}

.admin-row--head span {
  color: #06123a;
  background: linear-gradient(180deg, #ffe99a, var(--gold));
  border-color: #fff0b5;
}

.admin-row--users {
  grid-template-columns: minmax(140px, 1.2fr) minmax(190px, 1.5fr) 90px 90px minmax(150px, 1fr) 176px;
  min-width: 880px;
}

.admin-row--scores {
  grid-template-columns: minmax(130px, 1.1fr) 90px 90px 90px 110px minmax(150px, 1fr) 100px;
  min-width: 860px;
}

.admin-row--questions {
  grid-template-columns: minmax(220px, 2fr) minmax(90px, 1fr) 90px 80px 140px;
  min-width: 720px;
}

.admin-row--audit {
  grid-template-columns: 170px minmax(140px, 1fr) 150px minmax(140px, 1fr);
  min-width: 640px;
}

.admin-row--questions .q-status {
  width: 100%;
  padding: 0.3rem 0.4rem;
  border-radius: 8px;
}

.audit-ok { color: #4caf6a; font-weight: 700; }
.audit-no { color: #d9534f; font-weight: 700; }

.admin-form--inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: flex-end;
}
.admin-form--inline label {
  flex: 1;
  min-width: 160px;
}

.admin-row .admin-mini-actions {
  min-height: 40px;
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 5px;
  background: rgba(3, 8, 31, 0.68);
  border: 1px solid rgba(105, 172, 255, 0.18);
  border-radius: 6px;
}

.admin-mini-actions button {
  min-height: 30px;
  padding: 0 9px;
  color: #dce8ff;
  background: rgba(2, 6, 23, 0.82);
  border: 1px solid rgba(105, 172, 255, 0.38);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 900;
}

.admin-mini-actions button[data-action="delete"],
.admin-mini-actions button[data-action="suspend"] {
  border-color: rgba(240, 68, 68, 0.55);
}

.admin-log {
  min-height: 146px;
  max-height: 260px;
  margin: 14px 0 0;
  padding: 12px;
  overflow: auto;
  color: #e7efff;
  background: rgba(2, 6, 23, 0.86);
  border: 1px solid rgba(105, 172, 255, 0.26);
  border-radius: var(--radius);
  white-space: pre-wrap;
  direction: ltr;
  text-align: left;
}

.main-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 400px);
  gap: 16px;
  padding-top: 16px;
}

.stage,
.panel {
  border-radius: var(--radius);
}

.stage {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto auto 1fr auto;
  min-height: 720px;
  padding: 18px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 16%, rgba(24, 200, 255, 0.3), transparent 38%),
    radial-gradient(ellipse at 50% 56%, rgba(180, 51, 255, 0.22), transparent 45%),
    linear-gradient(180deg, rgba(5, 12, 38, 0.94), rgba(8, 26, 86, 0.9) 48%, rgba(3, 6, 23, 0.98));
  border: 1px solid rgba(105, 172, 255, 0.32);
  box-shadow: inset 0 0 80px rgba(24, 200, 255, 0.11);
}

.game-top-actions {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 80;
  display: flex;
  justify-content: flex-start;
  margin: 0;
  pointer-events: none;
}

.home-command {
  min-height: 42px;
  padding: 0 18px;
  color: #dce8ff;
  background:
    linear-gradient(90deg, rgba(24, 200, 255, 0.14), transparent 80%),
    rgba(2, 6, 23, 0.78);
  border: 1px solid rgba(24, 200, 255, 0.42);
  border-radius: var(--radius);
  font-weight: 900;
  box-shadow: inset 0 0 18px rgba(24, 200, 255, 0.1), 0 0 16px rgba(24, 200, 255, 0.12);
  pointer-events: auto;
}

.home-command::before {
  content: "←";
  margin-inline-end: 8px;
  color: var(--gold);
  font-weight: 950;
}

[dir="rtl"] .home-command::before {
  content: "→";
}

.home-command:hover {
  color: white;
  border-color: rgba(244, 189, 53, 0.72);
  box-shadow: inset 0 0 20px rgba(244, 189, 53, 0.12), 0 0 20px rgba(244, 189, 53, 0.18);
}

.show-title {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  gap: 3px;
  width: min(520px, 100%);
  min-height: 92px;
  margin: 0 auto 14px;
  padding: 12px 36px;
  color: white;
  background:
    linear-gradient(90deg, rgba(244, 189, 53, 0.12), transparent 18% 82%, rgba(244, 189, 53, 0.12)),
    linear-gradient(180deg, rgba(13, 42, 132, 0.95), rgba(3, 10, 35, 0.98));
  border: 2px solid rgba(244, 189, 53, 0.64);
  border-radius: var(--radius);
  clip-path: polygon(8% 0, 92% 0, 100% 50%, 92% 100%, 8% 100%, 0 50%);
  box-shadow: inset 0 0 34px rgba(24, 200, 255, 0.18), 0 0 28px rgba(244, 189, 53, 0.16);
}

.show-title span {
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 950;
}

.show-title strong {
  font-size: 2rem;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.72);
}

.stage::before,
.stage::after {
  content: "";
  position: absolute;
  inset: 5% 12% auto;
  height: 56%;
  border: 2px solid rgba(244, 189, 53, 0.2);
  border-radius: 50%;
  transform: perspective(900px) rotateX(66deg);
  pointer-events: none;
}

.stage::after {
  inset: 15% 20% auto;
  height: 42%;
  border-color: rgba(24, 200, 255, 0.22);
  animation: ring-pulse 4s ease-in-out infinite;
}

@keyframes ring-pulse {
  0%, 100% { opacity: 0.45; transform: perspective(900px) rotateX(66deg) scale(1); }
  50% { opacity: 0.9; transform: perspective(900px) rotateX(66deg) scale(1.04); }
}

.millionaire-logo {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 190px;
  height: 190px;
  margin: 2px auto 10px;
}

.logo-orbit,
.logo-core {
  position: absolute;
  border-radius: 50%;
}

.logo-orbit {
  inset: 0;
  border: 2px solid rgba(24, 200, 255, 0.52);
  box-shadow: 0 0 26px rgba(24, 200, 255, 0.34);
}

.orbit-a {
  transform: rotate(0deg) scaleX(0.72);
  animation: orbit-a 8s linear infinite;
}

.orbit-b {
  inset: 12px;
  border-color: rgba(244, 189, 53, 0.66);
  transform: rotate(62deg) scaleX(0.72);
  animation: orbit-b 11s linear infinite;
}

.orbit-c {
  inset: 25px;
  border-color: rgba(180, 51, 255, 0.5);
  transform: rotate(-48deg) scaleX(0.72);
  animation: orbit-c 7s linear infinite;
}

.logo-core {
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  color: white;
  background:
    radial-gradient(circle at 50% 38%, #1745bd 0 28%, #071a58 54%, #020617 100%);
  border: 2px solid var(--gold);
  box-shadow: 0 0 38px rgba(244, 189, 53, 0.5), inset 0 0 22px rgba(24, 200, 255, 0.28);
  text-align: center;
}

.logo-core span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
}

.logo-core strong {
  color: var(--gold);
  font-size: 1.55rem;
  line-height: 1;
}

@keyframes orbit-a { to { transform: rotate(360deg) scaleX(0.72); } }
@keyframes orbit-b { to { transform: rotate(-298deg) scaleX(0.72); } }
@keyframes orbit-c { to { transform: rotate(312deg) scaleX(0.72); } }

.studio-floor {
  position: relative;
  z-index: 1;
  padding: 0 4px 8px;
}

.host-row {
  gap: 14px;
  align-items: stretch;
}

.host-spotlight {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 152px;
  min-height: 136px;
  overflow: hidden;
  background:
    conic-gradient(from 0deg, rgba(24,200,255,0.1), rgba(244,189,53,0.16), rgba(180,51,255,0.12), rgba(24,200,255,0.1)),
    radial-gradient(circle, rgba(255,255,255,0.08), rgba(4,11,38,0.92) 64%);
  border: 1px solid rgba(24, 200, 255, 0.38);
  border-radius: 50%;
  box-shadow: 0 0 30px rgba(24, 200, 255, 0.25);
}

.host-spotlight::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(244, 189, 53, 0.38);
  border-radius: 50%;
  animation: ring-pulse-flat 3s ease-in-out infinite;
}

@keyframes ring-pulse-flat {
  0%, 100% { opacity: 0.45; transform: scale(1); }
  50% { opacity: 0.95; transform: scale(1.06); }
}

#rabbiAvatar {
  position: relative;
  z-index: 1;
  width: 118px;
  height: auto;
  transform-origin: 50% 92%;
  animation: host-breathe 2.9s ease-in-out infinite;
}

body[data-mood="happy"] #rabbiAvatar {
  animation: host-bounce 0.72s ease-in-out 2;
}

body[data-mood="panic"] #rabbiAvatar {
  animation: host-wobble 0.42s ease-in-out 4;
}

body[data-mood="super"] #rabbiAvatar {
  animation: host-float 1.25s ease-in-out infinite;
}

@keyframes host-breathe {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-6px) rotate(1deg); }
}

@keyframes host-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-18px) scale(1.04); }
}

@keyframes host-wobble {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(5deg); }
  75% { transform: rotate(-5deg); }
}

@keyframes host-float {
  0%, 100% { transform: translateY(-4px); filter: drop-shadow(0 0 0 rgba(244,189,53,0)); }
  50% { transform: translateY(-13px); filter: drop-shadow(0 0 18px rgba(244,189,53,0.75)); }
}

.host-bubble {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-height: 122px;
  padding: 18px 22px;
  overflow: hidden;
  color: white;
  background:
    linear-gradient(90deg, rgba(24, 200, 255, 0.18), transparent 20% 80%, rgba(244, 189, 53, 0.14)),
    linear-gradient(180deg, #102c8e, #07143f);
  border: 1px solid rgba(24, 200, 255, 0.52);
  border-radius: var(--radius);
  clip-path: polygon(3% 0, 97% 0, 100% 50%, 97% 100%, 3% 100%, 0 50%);
  box-shadow: inset 0 0 28px rgba(24, 200, 255, 0.22), 0 0 20px rgba(24, 200, 255, 0.18);
}

.host-bubble p {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.45;
  font-weight: 850;
}

.score-strip {
  position: relative;
  z-index: 1;
  justify-content: space-between;
  gap: 12px;
  margin: 8px auto 14px;
  width: min(760px, 100%);
  min-height: 58px;
  padding: 10px 22px;
  background:
    linear-gradient(90deg, transparent, rgba(24, 200, 255, 0.16), transparent),
    linear-gradient(180deg, rgba(3, 8, 31, 0.96), rgba(10, 29, 91, 0.94));
  border: 1px solid rgba(244, 189, 53, 0.42);
  border-radius: var(--radius);
  clip-path: polygon(4% 0, 96% 0, 100% 50%, 96% 100%, 4% 100%, 0 50%);
}

.score-strip span,
.question-meta span,
.panel-title span,
#engineStatus {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
}

#prizeLabel {
  color: var(--gold);
  font-size: 1.9rem;
  text-shadow: 0 0 16px rgba(244, 189, 53, 0.55);
}

#runScoreLabel {
  min-width: 96px;
  text-align: end;
  color: #d6fff0;
}

.leaderboard-panel {
  align-self: start;
}

.leaderboard-panel .leaderboard-list {
  max-height: 230px;
  overflow: auto;
  padding-inline-end: 2px;
}

.question-zone {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  min-height: 330px;
  margin-top: auto;
}

.question-meta {
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.question-meta span {
  padding: 6px 11px;
  color: #dbe8ff;
  background: rgba(5, 12, 38, 0.86);
  border: 1px solid rgba(24, 200, 255, 0.34);
  border-radius: 999px;
}

#questionText {
  display: grid;
  place-items: center;
  min-height: 112px;
  margin: 0 auto 14px;
  width: min(920px, 100%);
  padding: 18px 48px;
  color: white;
  background:
    linear-gradient(90deg, rgba(244, 189, 53, 0.12), transparent 16% 84%, rgba(244, 189, 53, 0.12)),
    linear-gradient(180deg, #122f95, #07194e);
  border: 2px solid rgba(244, 189, 53, 0.72);
  border-radius: var(--radius);
  clip-path: polygon(5% 0, 95% 0, 100% 50%, 95% 100%, 5% 100%, 0 50%);
  font-size: 1.75rem;
  line-height: 1.18;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
  box-shadow: inset 0 0 34px rgba(24, 200, 255, 0.2), 0 0 26px rgba(244, 189, 53, 0.16);
  animation: question-rise 0.38s ease both;
}

@keyframes question-rise {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.answers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  width: min(980px, 100%);
  margin: 0 auto;
}

/* BUG-034: stack answers into a single column on very narrow phones (<=380px)
   so Hebrew/English option text is not truncated after the letter badge. */
@media (max-width: 380px) {
  .answers {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.answer {
  position: relative;
  min-height: 76px;
  padding: 13px 54px 13px 28px;
  overflow: hidden;
  color: white;
  background:
    linear-gradient(90deg, rgba(24, 200, 255, 0.15), transparent 24% 76%, rgba(244, 189, 53, 0.12)),
    linear-gradient(180deg, #102c8e, #06143f);
  border: 2px solid rgba(105, 172, 255, 0.68);
  border-radius: var(--radius);
  clip-path: polygon(6% 0, 94% 0, 100% 50%, 94% 100%, 6% 100%, 0 50%);
  text-align: inherit;
  font-size: 1.04rem;
  font-weight: 850;
  line-height: 1.25;
  text-shadow: 0 2px 8px rgba(0,0,0,0.62);
  box-shadow: inset 0 0 24px rgba(24, 200, 255, 0.18), 0 0 18px rgba(24, 200, 255, 0.12);
  animation: answer-in 0.34s ease both;
  animation-delay: var(--answer-delay, 0ms);
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

[dir="ltr"] .answer {
  padding: 13px 28px 13px 54px;
}

.answer::before {
  content: attr(data-letter);
  position: absolute;
  inset-inline-start: 17px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #08133e;
  background: linear-gradient(180deg, #ffe99a, var(--gold));
  border-radius: 50%;
  transform: translateY(-50%);
  font-size: 0.86rem;
  font-weight: 950;
  text-shadow: none;
  box-shadow: 0 0 16px rgba(244, 189, 53, 0.55);
}

.answer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0 42%, rgba(255,255,255,0.24) 49%, transparent 57% 100%);
  transform: translateX(-120%);
  transition: transform 0.5s ease;
  pointer-events: none;
}

[dir="ltr"] .answer::before {
  inset-inline-start: 17px;
}

.answer:hover:not(:disabled) {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: inset 0 0 28px rgba(244, 189, 53, 0.22), 0 0 26px rgba(244, 189, 53, 0.24);
}

.answer:hover:not(:disabled)::after {
  transform: translateX(120%);
}

.answer.correct {
  color: white;
  background: linear-gradient(180deg, #19d68b, #0c7b51);
  border-color: #bfffe3;
  box-shadow: 0 0 34px rgba(18, 200, 120, 0.58), inset 0 0 30px rgba(255,255,255,0.18);
  animation: answer-correct 0.75s ease-in-out 2;
}

.answer.wrong {
  color: white;
  background: linear-gradient(180deg, #f15c5c, #8f121d);
  border-color: #ffd1d1;
  box-shadow: 0 0 30px rgba(240, 68, 68, 0.5), inset 0 0 28px rgba(255,255,255,0.14);
  animation: answer-wrong 0.22s ease-in-out 3;
}

.answer.hidden-choice {
  visibility: hidden;
}

@keyframes answer-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes answer-correct {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}

@keyframes answer-wrong {
  0%, 100% { transform: translateX(0); }
  35% { transform: translateX(-5px); }
  70% { transform: translateX(5px); }
}

.lifelines {
  position: relative;
  z-index: 2;
  justify-content: center;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 20px;
}

.lifeline {
  position: relative;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  padding: 8px;
  color: white;
  background:
    radial-gradient(circle at 50% 34%, rgba(24, 200, 255, 0.36), transparent 42%),
    radial-gradient(circle, #11359d 0 48%, #06123a 49% 100%);
  border: 2px solid rgba(244, 189, 53, 0.78);
  border-radius: 50%;
  font-weight: 950;
  box-shadow: 0 0 22px rgba(24, 200, 255, 0.22), inset 0 0 20px rgba(24, 200, 255, 0.2);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.lifeline:hover:not(:disabled) {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 0 30px rgba(244, 189, 53, 0.4), inset 0 0 20px rgba(244, 189, 53, 0.24);
}

.lifeline__icon {
  display: grid;
  place-items: center;
  min-height: 32px;
  color: var(--gold);
  font-size: 1.25rem;
  line-height: 1;
  text-shadow: 0 0 12px rgba(244, 189, 53, 0.62);
}

.lifeline__label {
  max-width: 70px;
  color: #dce8ff;
  font-size: 0.72rem;
  line-height: 1.05;
  text-align: center;
}

.lifeline:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  filter: grayscale(0.55);
}

.lifeline:disabled::after {
  content: "";
  position: absolute;
  width: 82%;
  height: 4px;
  background: var(--danger);
  border-radius: 999px;
  transform: rotate(-28deg);
  box-shadow: 0 0 12px rgba(240, 68, 68, 0.65);
}

.action-row {
  position: relative;
  z-index: 2;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.primary-action,
.secondary-action {
  min-height: 48px;
  padding: 0 20px;
  color: white;
  border: 1px solid rgba(244, 189, 53, 0.54);
  clip-path: polygon(8% 0, 92% 0, 100% 50%, 92% 100%, 8% 100%, 0 50%);
}

.primary-action {
  background: linear-gradient(180deg, #1650d8, #071a58);
}

.secondary-action {
  /* BUG-047: darken top stop #b433ff -> #9c1fe0 so white text meets WCAG AA (>=4.5:1) */
  background: linear-gradient(180deg, #9c1fe0, #56128a);
  color: #fff;
}

.side-rail {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 14px;
}

.panel {
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(13, 37, 112, 0.88), rgba(3, 8, 31, 0.94));
  border: 1px solid rgba(105, 172, 255, 0.34);
  box-shadow: inset 0 0 28px rgba(24, 200, 255, 0.08);
}

.panel-title {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.panel-title h2 {
  margin: 0;
  color: var(--gold);
  font-size: 1rem;
}

.winnings-card {
  position: relative;
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding: 14px 12px;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0, rgba(244, 189, 53, 0.28), transparent 56%),
    linear-gradient(180deg, rgba(4, 12, 42, 0.98), rgba(10, 30, 90, 0.92));
  border: 1px solid rgba(244, 189, 53, 0.54);
  border-radius: var(--radius);
  box-shadow: inset 0 0 26px rgba(24, 200, 255, 0.12), 0 0 24px rgba(244, 189, 53, 0.14);
}

.winnings-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0 42%, rgba(255,255,255,0.18) 48%, transparent 55% 100%);
  transform: translateX(-130%);
  animation: winnings-shine 4.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes winnings-shine {
  0%, 68%, 100% { transform: translateX(-130%); }
  82% { transform: translateX(130%); }
}

.winnings-card span,
.winnings-card small {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-weight: 900;
}

.winnings-card span {
  font-size: 0.82rem;
}

.winnings-card strong {
  position: relative;
  z-index: 1;
  color: var(--gold);
  font-size: 2.18rem;
  line-height: 1;
  text-shadow: 0 0 18px rgba(244, 189, 53, 0.58);
}

.winnings-card small {
  font-size: 0.78rem;
}

.prize-ladder {
  display: grid;
  gap: 6px;
  max-height: 360px;
  margin: 0;
  padding: 4px 2px;
  list-style: none;
  overflow: auto;
  scroll-behavior: smooth;
  scroll-padding-block: 48%;
  scrollbar-color: rgba(244, 189, 53, 0.72) rgba(3, 8, 31, 0.5);
}

.prize-ladder li {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 5px 10px;
  overflow: hidden;
  color: #c8d8ff;
  background:
    linear-gradient(90deg, rgba(24, 200, 255, 0.06), transparent 62%),
    rgba(3, 8, 31, 0.78);
  border: 1px solid rgba(105, 172, 255, 0.16);
  border-radius: 6px;
  font-weight: 850;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.prize-ladder li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: rgba(105, 172, 255, 0.22);
}

.prize-ladder li span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #08133e;
  background: rgba(174, 189, 231, 0.74);
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 950;
}

.prize-ladder li strong {
  text-align: end;
  font-size: 0.98rem;
}

.prize-ladder li em {
  min-height: 22px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 950;
}

.prize-ladder li.safe {
  color: #ffffff;
  border-color: rgba(244, 189, 53, 0.42);
}

.prize-ladder li.earned {
  color: #eafff5;
  background:
    linear-gradient(90deg, rgba(18, 200, 120, 0.2), transparent 70%),
    rgba(3, 31, 24, 0.86);
  border-color: rgba(18, 200, 120, 0.34);
}

.prize-ladder li.earned::before {
  background: var(--success);
}

.prize-ladder li.earned span {
  background: linear-gradient(180deg, #d6fff0, #12c878);
  box-shadow: 0 0 14px rgba(18, 200, 120, 0.35);
}

.prize-ladder li.current-won {
  transform: scale(1.02);
  color: #052018;
  background: linear-gradient(180deg, #d6fff0, #12c878);
  border-color: #bfffe3;
  box-shadow: 0 0 22px rgba(18, 200, 120, 0.5), inset 0 0 24px rgba(255,255,255,0.18);
}

.prize-ladder li.current-won em {
  color: #052018;
}

.prize-ladder li.active {
  color: #06123a;
  background: linear-gradient(180deg, #ffe99a, var(--gold));
  border-color: #fff0b5;
  box-shadow: 0 0 22px rgba(244, 189, 53, 0.55), inset 0 0 22px rgba(255,255,255,0.2);
}

.prize-ladder li.active::before {
  background: #fff5c4;
}

.prize-ladder li.active span {
  background: #06123a;
  color: var(--gold);
}

.prize-ladder li.active em {
  color: #06123a;
}

.admin-bank {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 78px;
  padding: 12px;
  background: rgba(3, 8, 31, 0.7);
  border: 1px solid rgba(244, 189, 53, 0.35);
  border-radius: var(--radius);
}

.admin-bank__seal {
  position: relative;
  display: block;
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border: 2px solid var(--gold);
  border-radius: 6px;
  box-shadow: 0 0 18px rgba(244, 189, 53, 0.36);
}

.admin-bank__seal::before {
  content: "";
  position: absolute;
  left: 8px;
  top: -16px;
  width: 20px;
  height: 20px;
  border: 3px solid var(--gold);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
}

.admin-bank__seal::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 15px;
  width: 6px;
  height: 12px;
  background: var(--gold);
  border-radius: 999px;
}

.admin-bank strong {
  display: block;
  margin-bottom: 3px;
  color: white;
}

.admin-bank p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.3;
}

.source-search input {
  width: 100%;
  min-height: 42px;
  margin-top: 10px;
  padding: 0 12px;
  color: white;
  background: rgba(3, 8, 31, 0.82);
  border: 1px solid rgba(105, 172, 255, 0.34);
  border-radius: var(--radius);
}

.source-results {
  display: grid;
  gap: 8px;
  max-height: 210px;
  margin-top: 10px;
  overflow: auto;
}

.source-result {
  padding: 9px;
  color: #dbe8ff;
  background: rgba(3, 8, 31, 0.72);
  border: 1px solid rgba(105, 172, 255, 0.2);
  border-radius: 6px;
  font-size: 0.9rem;
  line-height: 1.35;
}

.source-result strong {
  display: block;
  margin-bottom: 2px;
  color: var(--gold);
}

#explanationText {
  margin-bottom: 0;
  color: #e7efff;
  line-height: 1.5;
}

.audience-bars {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.audience-row {
  display: grid;
  grid-template-columns: 36px 1fr 42px;
  align-items: center;
  gap: 8px;
  color: #e7efff;
  font-weight: 850;
}

.bar {
  height: 12px;
  background: rgba(174, 189, 231, 0.2);
  border-radius: 999px;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--electric), var(--gold));
  box-shadow: 0 0 14px rgba(24, 200, 255, 0.45);
}

body[data-question-state="loading"] .show-title {
  animation: logo-charge 0.7s ease-in-out infinite alternate;
}

body[data-question-state="correct"] .stage {
  box-shadow: inset 0 0 80px rgba(18, 200, 120, 0.18), 0 0 32px rgba(18, 200, 120, 0.24);
}

body[data-question-state="wrong"] .stage {
  box-shadow: inset 0 0 80px rgba(240, 68, 68, 0.18), 0 0 32px rgba(240, 68, 68, 0.24);
}

@keyframes logo-charge {
  from { filter: drop-shadow(0 0 8px rgba(24,200,255,0.3)); }
  to { filter: drop-shadow(0 0 24px rgba(244,189,53,0.68)); }
}

/* Premium Bible Quiz redesign layer */
:root {
  --parchment: #fff3d4;
  --parchment-ink: #26180b;
  --navy-deep: #020713;
  --navy: #07184b;
  --royal-blue: #133da2;
  --wine: #541735;
  --warm-gold: #f7c948;
  --soft-gold: #fff2b4;
  --stone: rgba(229, 217, 190, 0.1);
}

body {
  background:
    radial-gradient(circle at 18% 12%, rgba(247, 201, 72, 0.18), transparent 24rem),
    radial-gradient(circle at 78% 20%, rgba(120, 42, 120, 0.22), transparent 28rem),
    radial-gradient(circle at 50% 0%, rgba(36, 130, 255, 0.26), transparent 34rem),
    linear-gradient(180deg, #020713 0%, #07184b 45%, #120817 100%);
}

body::after {
  opacity: 0.9;
  background:
    linear-gradient(108deg, transparent 0 18%, rgba(247, 201, 72, 0.1) 19% 20%, transparent 22% 100%),
    linear-gradient(252deg, transparent 0 23%, rgba(105, 216, 255, 0.08) 24% 25%, transparent 27% 100%),
    repeating-linear-gradient(0deg, transparent 0 42px, rgba(255, 242, 180, 0.025) 43px 44px),
    repeating-linear-gradient(90deg, transparent 0 64px, var(--stone) 65px 66px);
}

.game-shell {
  background:
    radial-gradient(circle at 50% 16%, rgba(105, 216, 255, 0.18), transparent 28rem),
    radial-gradient(circle at 14% 86%, rgba(247, 201, 72, 0.13), transparent 22rem),
    linear-gradient(180deg, rgba(9, 25, 75, 0.9), rgba(3, 7, 21, 0.95)),
    repeating-linear-gradient(135deg, rgba(255, 242, 180, 0.045) 0 1px, transparent 1px 19px);
  border-color: rgba(247, 201, 72, 0.36);
}

.scripture-sparks {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.scripture-sparks span {
  position: absolute;
  color: rgba(255, 242, 180, 0.28);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.6rem, 3vw, 4rem);
  font-weight: 900;
  text-shadow: 0 0 18px rgba(247, 201, 72, 0.25);
  animation: scripture-float 9s ease-in-out infinite;
}

.scripture-sparks span:nth-child(1) { left: 8%; top: 16%; animation-delay: -1s; }
.scripture-sparks span:nth-child(2) { left: 82%; top: 13%; animation-delay: -3s; }
.scripture-sparks span:nth-child(3) { left: 14%; top: 68%; animation-delay: -5s; }
.scripture-sparks span:nth-child(4) { left: 88%; top: 66%; animation-delay: -2s; }
.scripture-sparks span:nth-child(5) { left: 42%; top: 8%; animation-delay: -6s; }
.scripture-sparks span:nth-child(6) { left: 56%; top: 78%; animation-delay: -4s; }

@keyframes scripture-float {
  0%, 100% { transform: translateY(0) rotate(-4deg); opacity: 0.16; }
  50% { transform: translateY(-22px) rotate(5deg); opacity: 0.42; }
}

.rabbi-audience {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 0;
  display: flex;
  gap: 18px;
  transform: translateX(-50%);
  opacity: 0.58;
  pointer-events: none;
}

.audience-rabbi {
  position: relative;
  width: 44px;
  height: 64px;
  border-radius: 24px 24px 10px 10px;
  background: linear-gradient(180deg, #173d8d, #050817);
  border: 1px solid rgba(247, 201, 72, 0.28);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
  animation: audience-nod 3.4s ease-in-out infinite;
}

.audience-rabbi::before {
  content: "";
  position: absolute;
  left: 9px;
  top: -20px;
  width: 26px;
  height: 30px;
  border-radius: 50%;
  background: #e7aa7f;
  box-shadow: inset 0 -9px 0 #f7f0e5;
}

.audience-rabbi::after {
  content: "";
  position: absolute;
  left: 12px;
  top: -27px;
  width: 20px;
  height: 10px;
  border-radius: 50% 50% 0 0;
  background: #123da2;
  border-top: 2px solid var(--warm-gold);
}

.audience-rabbi--young { animation-delay: -.8s; background: linear-gradient(180deg, #0c7769, #06121a); }
.audience-rabbi--scribe { animation-delay: -1.6s; background: linear-gradient(180deg, #541735, #090511); }
.audience-rabbi--cheer { animation-delay: -2.4s; background: linear-gradient(180deg, #8a5c12, #090511); }

@keyframes audience-nod {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.title-emblem,
.show-title {
  background:
    radial-gradient(circle at 50% 15%, rgba(255, 255, 255, 0.14), transparent 38%),
    linear-gradient(90deg, rgba(247, 201, 72, 0.17), transparent 18% 82%, rgba(247, 201, 72, 0.17)),
    linear-gradient(180deg, #1747b4, #05123a 72%, #020713);
  border-color: rgba(247, 201, 72, 0.86);
  box-shadow:
    inset 0 0 54px rgba(105, 216, 255, 0.18),
    0 0 42px rgba(247, 201, 72, 0.22),
    0 18px 50px rgba(0, 0, 0, 0.28);
}

.title-emblem strong,
.show-title strong {
  color: #fff;
  text-shadow:
    0 4px 18px rgba(0, 0, 0, 0.74),
    0 0 24px rgba(105, 216, 255, 0.42);
}

.start-rabbi,
.host-spotlight {
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 242, 180, 0.26), transparent 35%),
    conic-gradient(from 0deg, rgba(105,216,255,0.16), rgba(247,201,72,0.28), rgba(84,23,53,0.22), rgba(105,216,255,0.16)),
    radial-gradient(circle, rgba(255,255,255,0.1), rgba(3, 8, 31, 0.95) 66%);
  border-color: rgba(247, 201, 72, 0.58);
  box-shadow:
    0 0 36px rgba(105, 216, 255, 0.28),
    0 0 54px rgba(247, 201, 72, 0.16),
    inset 0 0 24px rgba(255, 242, 180, 0.1);
}

.start-rabbi {
  width: 230px;
  overflow: visible;
}

.start-rabbi::after,
.host-spotlight::after {
  content: "";
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  background: conic-gradient(from 160deg, transparent, rgba(247, 201, 72, 0.2), transparent, rgba(105, 216, 255, 0.16), transparent);
  animation: mascot-orbit 7s linear infinite;
  pointer-events: none;
}

.start-rabbi__halo,
.host-spotlight__halo {
  position: absolute;
  inset: -28px;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 48%, rgba(247, 201, 72, 0.13) 49% 52%, transparent 54%),
    radial-gradient(circle, transparent 58%, rgba(105, 216, 255, 0.12) 59% 61%, transparent 63%);
  animation: halo-breathe 3s ease-in-out infinite;
}

.start-rabbi img {
  width: 210px;
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.42));
}

.host-spotlight {
  flex-basis: 198px;
  min-height: 186px;
  overflow: visible;
}

#rabbiAvatar {
  width: 176px;
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.42));
}

@keyframes mascot-orbit {
  to { transform: rotate(360deg); }
}

@keyframes halo-breathe {
  0%, 100% { opacity: .5; transform: scale(.96); }
  50% { opacity: 1; transform: scale(1.04); }
}

body[data-mood="hint"] #rabbiAvatar {
  animation: host-hint 1.5s ease-in-out infinite;
}

body[data-mood="level"] #rabbiAvatar {
  animation: host-level 1.1s ease-in-out infinite;
}

@keyframes host-hint {
  0%, 100% { transform: translateY(-2px) rotate(-1deg); filter: drop-shadow(0 18px 18px rgba(0,0,0,.42)); }
  50% { transform: translateY(-11px) rotate(1deg); filter: drop-shadow(0 0 24px rgba(247,201,72,.72)); }
}

@keyframes host-level {
  0%, 100% { transform: translateY(-5px) scale(1); }
  50% { transform: translateY(-18px) scale(1.05); }
}

.host-bubble {
  background:
    linear-gradient(90deg, rgba(105, 216, 255, 0.2), transparent 20% 80%, rgba(247, 201, 72, 0.16)),
    radial-gradient(circle at 12% 20%, rgba(255, 242, 180, 0.08), transparent 32%),
    linear-gradient(180deg, #173d8d, #07143f 80%, #040817);
  border-color: rgba(247, 201, 72, 0.48);
  box-shadow:
    inset 0 0 34px rgba(105, 216, 255, 0.2),
    0 0 24px rgba(105, 216, 255, 0.18);
}

.stage {
  background:
    radial-gradient(ellipse at 50% 7%, rgba(247, 201, 72, 0.16), transparent 28%),
    radial-gradient(ellipse at 50% 22%, rgba(105, 216, 255, 0.26), transparent 42%),
    radial-gradient(ellipse at 78% 70%, rgba(84, 23, 53, 0.34), transparent 42%),
    linear-gradient(180deg, rgba(5, 12, 38, 0.96), rgba(8, 26, 86, 0.88) 48%, rgba(3, 6, 23, 0.98)),
    repeating-linear-gradient(90deg, rgba(255, 242, 180, 0.04) 0 1px, transparent 1px 52px);
  border-color: rgba(247, 201, 72, 0.34);
}

.stage::before {
  border-color: rgba(247, 201, 72, 0.32);
  box-shadow: 0 0 34px rgba(247, 201, 72, 0.16);
}

.score-strip {
  background:
    linear-gradient(90deg, transparent, rgba(247, 201, 72, 0.12), transparent),
    linear-gradient(180deg, rgba(4, 9, 30, 0.98), rgba(10, 29, 91, 0.96));
  border-color: rgba(255, 242, 180, 0.54);
}

#questionText {
  color: var(--parchment-ink);
  background:
    radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.52), transparent 42%),
    repeating-linear-gradient(0deg, rgba(120, 80, 20, 0.035) 0 2px, transparent 2px 22px),
    linear-gradient(180deg, #fff8e6, var(--parchment));
  border-color: rgba(247, 201, 72, 0.95);
  text-shadow: none;
  box-shadow:
    inset 0 0 28px rgba(120, 80, 20, 0.1),
    0 0 28px rgba(247, 201, 72, 0.18),
    0 18px 42px rgba(0, 0, 0, 0.22);
}

.question-meta span {
  color: var(--soft-gold);
  background: rgba(3, 8, 31, 0.8);
  border-color: rgba(247, 201, 72, 0.28);
}

.answer {
  background:
    linear-gradient(90deg, rgba(105, 216, 255, 0.16), transparent 28% 72%, rgba(247, 201, 72, 0.12)),
    linear-gradient(180deg, #1540a5, #07184b 74%, #030713);
  border-color: rgba(105, 216, 255, 0.64);
  box-shadow:
    inset 0 0 24px rgba(105, 216, 255, 0.18),
    0 10px 24px rgba(0, 0, 0, 0.2);
}

.answer::before,
.leaderboard-list b,
.prize-ladder li.active,
.session-toggle {
  background: linear-gradient(180deg, #fff2b4, var(--warm-gold));
}

.answer:hover:not(:disabled) {
  border-color: var(--warm-gold);
  background:
    linear-gradient(90deg, rgba(247, 201, 72, 0.18), transparent 30% 70%, rgba(105, 216, 255, 0.14)),
    linear-gradient(180deg, #2057d1, #09215f 74%, #040817);
}

.lifeline {
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 242, 180, 0.24), transparent 36%),
    radial-gradient(circle, #173d8d 0 48%, #030713 49% 100%);
  border-color: rgba(247, 201, 72, 0.88);
}

.lifeline__icon {
  color: var(--soft-gold);
}

.panel,
.public-scoreboard,
.start-controls {
  background:
    linear-gradient(135deg, rgba(105, 216, 255, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(12, 34, 100, 0.9), rgba(3, 8, 31, 0.94));
  border-color: rgba(247, 201, 72, 0.26);
}

.winnings-card,
.weekly-champions article,
.monthly-champions article {
  border-color: rgba(247, 201, 72, 0.44);
}

body[data-question-state="correct"] .stage {
  box-shadow:
    inset 0 0 88px rgba(18, 200, 120, 0.24),
    0 0 42px rgba(18, 200, 120, 0.28),
    0 0 80px rgba(247, 201, 72, 0.12);
}

body[data-question-state="wrong"] .stage {
  box-shadow:
    inset 0 0 88px rgba(240, 68, 68, 0.2),
    0 0 42px rgba(84, 23, 53, 0.34);
}

@media (max-width: 1120px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar {
    justify-content: flex-start;
  }

  .main-grid {
    grid-template-columns: 1fr;
  }

  .side-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
  }

  .feedback-panel {
    grid-column: 1 / -1;
  }

  .leaderboard-panel {
    grid-column: 1 / -1;
  }

  .admin-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-panels {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .game-shell {
    width: min(100vw - 10px, 720px);
    margin: 5px auto;
    padding: 9px;
  }

  h1 {
    font-size: 1.42rem;
  }

  .brand-lockup,
  .host-row {
    align-items: stretch;
  }

  .brand-mark {
    width: 46px;
    height: 46px;
  }

  .difficulty-picker {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(70px, 1fr));
    width: 100%;
  }

  .start-screen {
    min-height: calc(100vh - 120px);
    padding-inline: 4px;
  }

  .start-visual {
    grid-template-columns: 1fr;
    gap: 10px;
    justify-items: center;
  }

  .title-emblem {
    min-height: 164px;
    padding: 18px 26px;
    width: min(100%, 340px);
  }

  .title-emblem strong {
    font-size: 1.7rem;
  }

  .title-emblem p,
  .title-emblem small {
    font-size: 0.82rem;
  }

  .start-rabbi {
    width: 148px;
  }

  .start-rabbi img {
    width: 122px;
  }

  .show-title {
    min-height: 76px;
    padding: 10px 28px;
  }

  .show-title strong {
    font-size: 1.35rem;
  }

  .start-copy h2 {
    font-size: 1.45rem;
  }

  .start-controls {
    padding: 12px;
  }

  .player-hub {
    grid-template-columns: 1fr;
  }

  .weekly-champions,
  .monthly-champions {
    grid-template-columns: 1fr;
  }

  .public-board-row {
    grid-template-columns: 34px minmax(0, 1fr) 82px;
  }

  .public-board__level,
  .public-board__questions,
  .public-board__prize {
    display: none;
  }

  .board-pager {
    display: grid;
    grid-template-columns: 1fr;
  }

  .score-strip {
    flex-wrap: wrap;
    clip-path: none;
  }

  .start-actions,
  .admin-toolbar,
  .admin-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .start-action,
  .admin-entry,
  .admin-form .primary-action,
  .admin-form .secondary-action {
    width: 100%;
  }

  .admin-login {
    margin-top: 24px;
    padding: 16px;
  }

  .admin-stats-grid {
    grid-template-columns: 1fr;
  }

  .stage {
    min-height: auto;
    padding: 12px 8px;
  }

  .millionaire-logo {
    width: 140px;
    height: 140px;
  }

  .logo-core {
    width: 84px;
    height: 84px;
  }

  .logo-core strong {
    font-size: 1.2rem;
  }

  .host-row,
  .answers,
  .side-rail {
    grid-template-columns: 1fr;
  }

  .host-row {
    display: grid;
  }

  .host-spotlight {
    width: 126px;
    min-height: 126px;
    margin: 0 auto;
  }

  #rabbiAvatar {
    width: 98px;
  }

  .host-bubble {
    min-height: 96px;
    padding: 14px 18px;
    clip-path: polygon(5% 0, 95% 0, 100% 50%, 95% 100%, 5% 100%, 0 50%);
  }

  .host-bubble p {
    font-size: 0.98rem;
  }

  #questionText {
    min-height: 104px;
    padding: 16px 28px;
    font-size: 1.16rem;
    clip-path: polygon(7% 0, 93% 0, 100% 50%, 93% 100%, 7% 100%, 0 50%);
  }

  .answer {
    min-height: 72px;
    padding-inline-end: 44px;
    padding-inline-start: 44px;
    font-size: 0.96rem;
    clip-path: polygon(8% 0, 92% 0, 100% 50%, 92% 100%, 8% 100%, 0 50%);
  }

  .answer::before {
    width: 26px;
    height: 26px;
    inset-inline-start: 13px;
  }

  .lifeline {
    width: 72px;
    height: 72px;
  }

  .lifeline__icon {
    min-height: 24px;
    font-size: 1rem;
  }

  .lifeline__label {
    max-width: 58px;
    font-size: 0.64rem;
  }
}

@media (max-width: 760px) {
  .start-rabbi {
    width: 168px;
    overflow: visible;
  }

  .start-rabbi img {
    width: 154px;
  }

  .host-spotlight {
    width: 150px;
    min-height: 146px;
    overflow: visible;
  }

  #rabbiAvatar {
    width: 136px;
  }

  .rabbi-audience {
    display: none;
  }

  .scripture-sparks span {
    font-size: 1.35rem;
  }
}

/* Full TV-show game screen inspired by the supplied Bible Quiz concept */
body[data-screen="game"] {
  background:
    radial-gradient(circle at 20% 14%, rgba(255, 255, 255, 0.16), transparent 6rem),
    radial-gradient(circle at 78% 8%, rgba(255, 255, 255, 0.16), transparent 6rem),
    radial-gradient(circle at 50% -8%, rgba(48, 112, 230, 0.34), transparent 30rem),
    linear-gradient(180deg, #03102b 0%, #061e53 48%, #020817 100%);
}

body[data-screen="game"] .game-shell {
  width: 100vw;
  min-height: 100vh;
  margin: 0;
  padding: 18px 22px 92px;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 12% 38%, rgba(248, 200, 75, 0.14), transparent 18rem),
    radial-gradient(circle at 54% 28%, rgba(32, 95, 207, 0.24), transparent 32rem),
    linear-gradient(90deg, rgba(3, 10, 31, 0.9), rgba(4, 24, 72, 0.9) 48%, rgba(3, 9, 28, 0.96)),
    repeating-linear-gradient(90deg, rgba(255, 230, 150, 0.04) 0 1px, transparent 1px 82px);
}

body[data-screen="game"] .game-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 12% 35%, rgba(23, 107, 219, 0.92) 0 7rem, transparent 7.2rem),
    radial-gradient(circle at 21% 36%, rgba(255, 217, 122, 0.12), transparent 10rem),
    linear-gradient(120deg, transparent 0 9%, rgba(255, 255, 255, 0.07) 10% 11%, transparent 12% 100%),
    linear-gradient(244deg, transparent 0 14%, rgba(255, 255, 255, 0.07) 15% 16%, transparent 17% 100%);
  opacity: 0.75;
  pointer-events: none;
}

body[data-screen="game"] .topbar,
body[data-screen="game"] .studio-floor,
body[data-screen="game"] .game-top-actions {
  display: none;
}

body[data-screen="game"] .scripture-sparks span {
  color: rgba(248, 200, 75, 0.52);
  font-size: clamp(2.1rem, 4.2vw, 5.8rem);
  text-shadow: 0 0 20px rgba(248, 200, 75, 0.42);
}

body[data-screen="game"] .rabbi-audience {
  bottom: 24%;
  left: 22%;
  display: flex;
  gap: 24px;
  transform: translateX(-50%) scale(1.55);
  opacity: 0.46;
}

body[data-screen="game"] .main-grid {
  min-height: calc(100vh - 110px);
  display: grid;
  grid-template-columns: minmax(720px, 1fr) clamp(250px, 24vw, 320px);
  gap: 18px;
  padding: 0;
  direction: ltr;
}

[dir="rtl"] body[data-screen="game"] .stage,
[dir="rtl"] body[data-screen="game"] .side-rail,
[dir="rtl"] body[data-screen="game"] .tv-player-card,
[dir="rtl"] body[data-screen="game"] .tv-bottom-nav {
  direction: rtl;
}

[dir="ltr"] body[data-screen="game"] .stage,
[dir="ltr"] body[data-screen="game"] .side-rail,
[dir="ltr"] body[data-screen="game"] .tv-player-card,
[dir="ltr"] body[data-screen="game"] .tv-bottom-nav {
  direction: ltr;
}

.tv-player-card,
.tv-utility-strip,
.tv-bottom-nav {
  display: none;
}

body[data-screen="game"] .tv-player-card {
  position: fixed;
  top: 18px;
  left: 24px;
  z-index: 72;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  width: min(250px, calc(100vw - 48px));
  min-height: 94px;
  padding: 10px 14px;
  color: #fff8db;
  background:
    linear-gradient(135deg, rgba(255, 217, 122, 0.12), transparent 44%),
    rgba(3, 13, 39, 0.78);
  border: 1px solid rgba(248, 200, 75, 0.7);
  border-radius: 8px;
  box-shadow: inset 0 0 22px rgba(55, 151, 255, 0.16), 0 10px 30px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(10px);
}

body[data-screen="game"] .tv-player-card img {
  grid-row: 1 / 3;
  width: 64px;
  height: 64px;
  object-fit: cover;
  object-position: 50% 10%;
  border: 2px solid #f8c84b;
  border-radius: 50%;
  background: #071c4c;
}

body[data-screen="game"] .tv-player-card strong {
  display: block;
  overflow: hidden;
  color: #fff2b4;
  font-size: 1.14rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-screen="game"] .tv-player-card small {
  color: #f7f0dc;
  font-weight: 800;
}

body[data-screen="game"] #tvPlayerBank {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
  color: #fff2b4;
  font-weight: 950;
}

body[data-screen="game"] #tvPlayerBank::before {
  content: "●";
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  color: #071432;
  background: linear-gradient(180deg, #fff2b4, #f8c84b);
  border-radius: 50%;
}

body[data-screen="game"] .tv-utility-strip {
  position: fixed;
  top: 76px;
  right: 26px;
  z-index: 70;
  display: flex;
  gap: 18px;
}

body[data-screen="game"] .tv-utility-strip button {
  display: grid;
  gap: 5px;
  place-items: center;
  width: 62px;
  min-height: 70px;
  color: #fff2b4;
  background: transparent;
  border: 0;
  text-align: center;
  font-weight: 900;
}

body[data-screen="game"] .tv-utility-strip span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #061432;
  background:
    radial-gradient(circle at 35% 28%, #fff8d8, #f8c84b 58%, #926313 100%);
  border: 1px solid #fff2b4;
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(248, 200, 75, 0.36), inset 0 0 8px rgba(255,255,255,0.38);
  font-size: 1.35rem;
}

body[data-screen="game"] .tv-utility-strip small {
  color: #f8f1de;
  font-size: 0.8rem;
}

body[data-screen="game"] .stage {
  min-height: calc(100vh - 112px);
  padding: 22px clamp(10px, 1.5vw, 28px) 28px clamp(190px, 20vw, 340px);
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
}

body[data-screen="game"] .stage::before {
  inset: auto 12% 8%;
  height: 44%;
  border-color: rgba(248, 200, 75, 0.28);
}

body[data-screen="game"] .stage::after {
  inset: auto 22% 15%;
  height: 32%;
  border-color: rgba(74, 156, 255, 0.28);
}

.tv-rabbi-hero {
  display: none;
}

body[data-screen="game"] .tv-rabbi-hero {
  position: absolute;
  z-index: 2;
  left: clamp(-110px, -7vw, -34px);
  top: clamp(132px, 15vh, 230px);
  bottom: auto;
  display: block;
  width: clamp(430px, 43vw, 610px);
  max-height: calc(100vh - 140px);
  object-fit: contain;
  object-position: top left;
  filter:
    drop-shadow(0 28px 22px rgba(0, 0, 0, 0.48))
    drop-shadow(0 0 28px rgba(248, 200, 75, 0.18));
  transform-origin: 50% 90%;
  animation: tv-rabbi-breathe 3.8s ease-in-out infinite;
}

body[data-mood="happy"] .tv-rabbi-hero,
body[data-mood="level"] .tv-rabbi-hero {
  animation: tv-rabbi-celebrate 0.86s ease-in-out infinite;
}

body[data-mood="panic"] .tv-rabbi-hero {
  animation: tv-rabbi-worry 0.42s ease-in-out 4;
}

@keyframes tv-rabbi-breathe {
  0%, 100% { transform: translateY(0) rotate(-0.4deg); }
  50% { transform: translateY(-8px) rotate(0.4deg); }
}

@keyframes tv-rabbi-celebrate {
  0%, 100% { transform: translateY(-2px) scale(1); }
  50% { transform: translateY(-16px) scale(1.025); }
}

@keyframes tv-rabbi-worry {
  0%, 100% { transform: translateX(0) rotate(0); }
  35% { transform: translateX(-5px) rotate(-1.4deg); }
  70% { transform: translateX(5px) rotate(1.4deg); }
}

body[data-screen="game"] .show-title {
  width: min(470px, 100%);
  min-height: 210px;
  margin: 0 auto 12px;
  padding: 24px 34px 28px;
  clip-path: polygon(14% 0, 86% 0, 100% 28%, 92% 82%, 50% 100%, 8% 82%, 0 28%);
  background:
    linear-gradient(90deg, rgba(248, 200, 75, 0.36), transparent 16% 84%, rgba(248, 200, 75, 0.36)),
    radial-gradient(circle at 50% 30%, #123a8f 0 42%, #061b4f 64%, #020817 100%);
  border: 3px solid rgba(248, 200, 75, 0.92);
  box-shadow:
    inset 0 0 34px rgba(77, 158, 255, 0.28),
    inset 0 -12px 24px rgba(0, 0, 0, 0.36),
    0 0 28px rgba(248, 200, 75, 0.24);
}

body[data-screen="game"] .show-title::before,
body[data-screen="game"] .show-title::after {
  content: "";
  position: absolute;
  top: 92px;
  width: 118px;
  height: 36px;
  background: linear-gradient(180deg, #ffdc73, #b67818);
  clip-path: polygon(0 0, 100% 18%, 78% 50%, 100% 82%, 0 100%);
  z-index: -1;
}

body[data-screen="game"] .show-title::before {
  right: -78px;
}

body[data-screen="game"] .show-title::after {
  left: -78px;
  transform: scaleX(-1);
}

body[data-screen="game"] .show-title span {
  color: #f8c84b;
  font-size: clamp(2.3rem, 4.1vw, 4.9rem);
  line-height: 0.9;
  text-shadow:
    0 3px 0 #6d4610,
    0 8px 22px rgba(0, 0, 0, 0.72);
}

body[data-screen="game"] .show-title strong {
  color: #ffde7a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 4vw, 4.6rem);
  letter-spacing: 0;
  text-shadow:
    0 3px 0 #6d4610,
    0 8px 22px rgba(0, 0, 0, 0.72);
}

body[data-screen="game"] .show-title small {
  display: block;
  min-width: 280px;
  margin-top: 8px;
  padding: 8px 22px;
  color: #231607;
  background: linear-gradient(180deg, #ffea9d, #c88b20);
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 950;
}

body[data-screen="game"] .score-strip {
  width: min(520px, 100%);
  min-height: 42px;
  margin: 0 auto 8px;
  padding: 6px 16px;
  background: rgba(2, 10, 30, 0.58);
  border: 1px solid rgba(248, 200, 75, 0.36);
  border-radius: 999px;
  clip-path: none;
  backdrop-filter: blur(8px);
}

body[data-screen="game"] #prizeLabel {
  font-size: 1.3rem;
}

body[data-screen="game"] .question-zone {
  z-index: 4;
  width: min(650px, 100%);
  min-height: 0;
  margin: 0 auto;
}

body[data-screen="game"] .question-zone::before {
  content: "📖";
  position: absolute;
  top: 46px;
  left: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 80px;
  height: 70px;
  color: #061432;
  background:
    radial-gradient(circle at 50% 34%, #fff8d8, #f8c84b 64%, #9b6715 100%);
  border: 2px solid #fff2b4;
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(248, 200, 75, 0.42);
  transform: translateX(-50%);
  font-size: 2rem;
}

body[data-screen="game"] .question-meta {
  position: relative;
  z-index: 4;
  margin: 62px 0 0;
}

body[data-screen="game"] .question-meta span {
  color: #061432;
  background: rgba(255, 245, 218, 0.9);
  border-color: rgba(136, 91, 20, 0.34);
}

body[data-screen="game"] #questionText {
  min-height: 230px;
  width: min(620px, 100%);
  margin: -18px auto 18px;
  padding: 64px 46px 34px;
  color: #211507;
  clip-path: none;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.7), transparent 45%),
    repeating-linear-gradient(0deg, rgba(120, 80, 24, 0.045) 0 2px, transparent 2px 24px),
    linear-gradient(180deg, #fff8e3, #edd6a3);
  border: 3px solid #e2ad48;
  border-radius: 14px;
  font-family: Georgia, "Times New Roman", "Noto Serif Hebrew", serif;
  font-size: clamp(1.6rem, 2.2vw, 2.5rem);
  line-height: 1.12;
  overflow-wrap: anywhere;
  white-space: normal;
  text-shadow: none;
  box-shadow:
    inset 0 0 30px rgba(115, 76, 20, 0.14),
    0 16px 42px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(255, 244, 190, 0.58);
}

body[data-screen="game"] .answers {
  grid-template-columns: 1fr;
  gap: 14px;
  width: min(720px, 100%);
}

body[data-screen="game"] .answer {
  min-height: 78px;
  padding: 12px 38px 12px 100px;
  clip-path: none;
  color: #fff5d6;
  background:
    linear-gradient(90deg, rgba(248, 200, 75, 0.12), transparent 18% 82%, rgba(77, 158, 255, 0.1)),
    linear-gradient(180deg, #08285f, #03183f);
  border: 2px solid rgba(248, 200, 75, 0.92);
  border-radius: 999px;
  font-size: clamp(1.12rem, 1.6vw, 1.58rem);
  text-align: center;
  box-shadow:
    inset 0 0 24px rgba(77, 158, 255, 0.18),
    0 10px 22px rgba(0, 0, 0, 0.28);
}

[dir="ltr"] body[data-screen="game"] .answer {
  padding: 12px 38px 12px 100px;
}

body[data-screen="game"] .answer::before {
  inset-inline-start: auto;
  right: auto;
  left: 12px;
  width: 62px;
  height: 62px;
  color: #fff2b4;
  background:
    radial-gradient(circle at 35% 28%, #123875, #051738 62%, #020817 100%);
  border: 3px solid #f8c84b;
  font-size: 2rem;
}

body[data-screen="game"] .answer.selected {
  transform: translateY(-3px);
  color: #061432;
  background:
    linear-gradient(180deg, #fff2b4, #f8c84b 62%, #c8871c);
  border-color: #fff8d8;
  text-shadow: none;
  box-shadow: 0 0 30px rgba(248, 200, 75, 0.48), inset 0 0 18px rgba(255,255,255,0.34);
}

body[data-screen="game"] .answer.selected::before {
  color: #061432;
  background: #fff8d8;
}

.confirm-answer {
  display: none;
}

body[data-screen="game"] .confirm-answer {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr 54px;
  align-items: center;
  width: min(560px, 100%);
  min-height: 82px;
  margin: 18px auto 0;
  padding: 8px 14px 8px 32px;
  color: #171006;
  background:
    linear-gradient(180deg, #fff2b4, #f8c84b 60%, #c8871c);
  border: 3px solid #fff6c8;
  border-radius: 999px;
  box-shadow: 0 0 26px rgba(248, 200, 75, 0.48), inset 0 0 18px rgba(255,255,255,0.42);
  text-align: center;
  font-weight: 950;
}

body[data-screen="game"] .confirm-answer::after {
  content: "✓";
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #fff2b4;
  background: #062456;
  border-radius: 50%;
  font-size: 1.6rem;
}

body[data-screen="game"] .confirm-answer span {
  font-size: clamp(1.55rem, 2.8vw, 2.45rem);
  line-height: 1;
}

body[data-screen="game"] .confirm-answer small {
  grid-column: 1;
  color: #3b2608;
  font-size: 1rem;
}

body[data-screen="game"] .confirm-answer:disabled {
  opacity: 0.48;
  filter: grayscale(0.22);
  cursor: not-allowed;
}

body[data-screen="game"] .tv-run-stats {
  position: fixed;
  left: 24px;
  bottom: 106px;
  z-index: 68;
  display: grid;
  gap: 10px;
  width: 176px;
  padding: 14px 16px;
  background: rgba(3, 13, 39, 0.78);
  border: 1px solid rgba(248, 200, 75, 0.74);
  border-radius: 8px;
  box-shadow: inset 0 0 24px rgba(77, 158, 255, 0.14), 0 12px 32px rgba(0,0,0,.34);
  backdrop-filter: blur(10px);
}

body[data-screen="game"] .tv-run-stats article {
  display: grid;
  gap: 4px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(255, 242, 180, 0.25);
  text-align: center;
}

body[data-screen="game"] .tv-run-stats article:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

body[data-screen="game"] .tv-run-stats span {
  color: #fff2b4;
  font-size: 0.82rem;
  font-weight: 900;
}

body[data-screen="game"] .tv-run-stats strong {
  color: #ffdf78;
  font-size: 2rem;
  line-height: 1;
  text-shadow: 0 0 14px rgba(248, 200, 75, 0.48);
}

body[data-screen="game"] .side-rail {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  padding-top: 166px;
}

body[data-screen="game"] .panel,
body[data-screen="game"] .lifelines {
  background:
    linear-gradient(180deg, rgba(5, 22, 62, 0.9), rgba(1, 10, 31, 0.88));
  border: 1px solid rgba(248, 200, 75, 0.62);
  border-radius: 12px;
  box-shadow: inset 0 0 26px rgba(77, 158, 255, 0.14), 0 12px 30px rgba(0,0,0,.24);
  backdrop-filter: blur(8px);
}

body[data-screen="game"] .prize-panel {
  padding: 0;
  overflow: hidden;
}

body[data-screen="game"] .prize-panel .panel-title,
body[data-screen="game"] .winnings-card {
  display: none;
}

body[data-screen="game"] .prize-ladder {
  max-height: min(54vh, 610px);
  gap: 0;
  padding: 0;
  overflow-y: auto;
}

body[data-screen="game"] .prize-ladder li {
  grid-template-columns: 42px minmax(0, 1fr);
  min-height: 42px;
  padding: 6px 14px;
  color: #f1ecdc;
  background: rgba(2, 14, 42, 0.42);
  border: 0;
  border-bottom: 1px solid rgba(255, 242, 180, 0.16);
  border-radius: 0;
  font-size: 1.1rem;
}

body[data-screen="game"] .prize-ladder li::before {
  display: none;
}

body[data-screen="game"] .prize-ladder li span {
  width: auto;
  height: auto;
  color: inherit;
  background: transparent;
  border-radius: 0;
  font-size: 1.12rem;
}

body[data-screen="game"] .prize-ladder li strong {
  color: inherit;
  font-size: 1.28rem;
}

body[data-screen="game"] .prize-ladder li em {
  display: none;
}

body[data-screen="game"] .prize-ladder li.active {
  position: relative;
  margin-inline: -8px;
  color: #fff4ca;
  background:
    linear-gradient(90deg, #bd7b15, #e5a638 48%, #a96a0c);
  border: 1px solid #ffdf78;
  border-radius: 4px;
  box-shadow: 0 0 22px rgba(248, 200, 75, 0.42);
}

body[data-screen="game"] .prize-ladder li.active::after {
  content: "";
  position: absolute;
  inset-inline-start: -18px;
  top: 50%;
  width: 34px;
  height: 34px;
  background: linear-gradient(180deg, #ffdf78, #bd7b15);
  clip-path: polygon(0 50%, 50% 0, 100% 50%, 50% 100%);
  transform: translateY(-50%);
}

body[data-screen="game"] .lifelines {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 8px 12px;
}

body[data-screen="game"] .lifeline {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  width: 100%;
  height: auto;
  min-height: 66px;
  padding: 8px 2px;
  color: #fff2b4;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 242, 180, 0.16);
  border-radius: 0;
  direction: ltr;
  text-align: start;
  box-shadow: none;
}

body[data-screen="game"] .lifeline:last-child {
  border-bottom: 0;
}

body[data-screen="game"] .lifeline__icon {
  width: 48px;
  height: 48px;
  color: #fff2b4;
  border: 2px solid #f8c84b;
  border-radius: 50%;
  font-size: 1.05rem;
}

body[data-screen="game"] .lifeline__label {
  max-width: none;
  color: #ffe8a6;
  direction: rtl;
  font-size: 1.05rem;
  font-weight: 950;
  text-align: right;
}

body[data-screen="game"] .feedback-panel,
body[data-screen="game"] .leaderboard-panel {
  display: none;
}

body[data-screen="game"] .tv-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 76;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-height: 74px;
  background:
    linear-gradient(180deg, rgba(4, 18, 54, 0.9), rgba(2, 9, 29, 0.98));
  border-top: 1px solid rgba(248, 200, 75, 0.62);
  box-shadow: 0 -12px 28px rgba(0,0,0,.28);
}

body[data-screen="game"] .tv-bottom-nav button {
  display: grid;
  gap: 4px;
  place-items: center;
  color: #ffdf78;
  background: transparent;
  border: 0;
  border-inline-end: 1px solid rgba(255, 242, 180, 0.14);
  font-weight: 900;
}

body[data-screen="game"] .tv-bottom-nav span {
  font-size: 1.8rem;
  line-height: 1;
}

body[data-screen="game"] .tv-bottom-nav small {
  color: #fff2b4;
  font-size: 0.82rem;
}

@media (max-width: 900px) {
  body[data-screen="game"] .main-grid {
    grid-template-columns: 1fr;
    padding-top: 118px;
  }

  body[data-screen="game"] .tv-utility-strip {
    display: none;
  }

  body[data-screen="game"] .stage {
    min-height: auto;
    padding-left: clamp(210px, 32vw, 360px);
  }

  body[data-screen="game"] .tv-rabbi-hero {
    width: clamp(270px, 36vw, 390px);
  }

  body[data-screen="game"] .side-rail {
    grid-template-columns: 1fr;
    padding-top: 0;
  }

  body[data-screen="game"] .prize-ladder {
    max-height: 260px;
  }
}

@media (max-width: 760px) {
  body[data-screen="game"] .game-shell {
    padding: 8px 10px 74px;
  }

  body[data-screen="game"] .session-dock {
    top: 0;
    inset-inline-end: 10px; /* BUG-036: keep logical so RTL stays mirrored at this breakpoint */
  }

  body[data-screen="game"] .session-toggle {
    min-width: 104px;
    min-height: 42px;
    font-size: 0.82rem;
  }

  body[data-screen="game"] .tv-player-card {
    top: 10px;
    left: 10px;
    width: 170px;
    min-height: 66px;
    grid-template-columns: 44px minmax(0, 1fr);
    padding: 7px 8px;
  }

  body[data-screen="game"] .tv-player-card img {
    width: 44px;
    height: 44px;
  }

  body[data-screen="game"] .tv-player-card strong {
    font-size: 0.88rem;
  }

  body[data-screen="game"] #tvPlayerBank {
    font-size: 0.8rem;
  }

  body[data-screen="game"] .main-grid {
    min-height: auto;
    padding-top: 70px;
  }

  body[data-screen="game"] .stage {
    display: grid;
    min-height: auto;
    padding: 0;
  }

  body[data-screen="game"] .tv-rabbi-hero {
    position: relative;
    left: auto;
    bottom: auto;
    justify-self: center;
    width: min(250px, 68vw);
    max-height: 330px;
    margin: -16px auto -34px;
    pointer-events: none;
  }

  body[data-screen="game"] .show-title {
    width: min(310px, 100%);
    min-height: 130px;
    padding: 16px 22px 18px;
  }

  body[data-screen="game"] .show-title::before,
  body[data-screen="game"] .show-title::after {
    display: none;
  }

  body[data-screen="game"] .show-title span {
    font-size: 2rem;
  }

  body[data-screen="game"] .show-title strong {
    font-size: 2.1rem;
  }

  body[data-screen="game"] .show-title small {
    min-width: 0;
    padding: 6px 14px;
    font-size: 0.82rem;
  }

  body[data-screen="game"] .score-strip {
    width: 100%;
    min-height: 44px;
    margin-bottom: 10px;
  }

  body[data-screen="game"] .question-zone {
    width: 100%;
  }

  body[data-screen="game"] .question-zone::before {
    top: 38px;
    width: 58px;
    height: 54px;
    font-size: 1.45rem;
  }

  body[data-screen="game"] .question-meta {
    margin-top: 50px;
  }

  body[data-screen="game"] #questionText {
    min-height: 148px;
    padding: 52px 18px 24px;
    font-size: 1.42rem;
  }

  body[data-screen="game"] .answer {
    min-height: 66px;
    padding: 9px 20px 9px 76px;
    font-size: 1rem;
  }

  body[data-screen="game"] .answer::before {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }

  body[data-screen="game"] .confirm-answer {
    min-height: 68px;
    margin-top: 12px;
  }

  body[data-screen="game"] .confirm-answer span {
    font-size: 1.55rem;
  }

  body[data-screen="game"] .side-rail {
    margin-top: 12px;
  }

  body[data-screen="game"] .tv-run-stats {
    position: static;
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 12px;
    order: 4;
  }

  body[data-screen="game"] .tv-run-stats article {
    border-bottom: 0;
    border-inline-end: 1px solid rgba(255, 242, 180, 0.22);
    padding: 0;
  }

  body[data-screen="game"] .tv-run-stats article:last-child {
    border-inline-end: 0;
  }

  body[data-screen="game"] .tv-run-stats strong {
    font-size: 1.45rem;
  }

  body[data-screen="game"] .lifelines {
    grid-template-columns: 1fr;
  }

  body[data-screen="game"] .tv-bottom-nav {
    min-height: 62px;
  }

  body[data-screen="game"] .tv-bottom-nav span {
    font-size: 1.35rem;
  }
}

/* Final cascade guard for the unified TV-show cleanup. */
.session-toggle {
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 196px;
  padding: 6px 10px;
}

body[data-screen="game"] .confirm-answer,
body[data-screen="game"] .tv-player-card,
body[data-screen="game"] .tv-utility-strip {
  display: none !important;
}

body[data-screen="game"] .tv-bottom-nav {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body[data-screen="game"] .lifelines {
  display: grid;
  grid-template-columns: repeat(5, minmax(34px, 1fr));
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 8px;
}

body[data-screen="game"] .lifeline {
  grid-template-columns: 1fr;
  place-items: center;
  width: clamp(34px, 3.4vw, 44px);
  height: clamp(34px, 3.4vw, 44px);
  min-height: 0;
  margin: 0 auto;
  padding: 0;
  background:
    radial-gradient(circle at 35% 28%, #143875, #061738 62%, #020817 100%);
  border: 2px solid #f8c84b;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(248, 200, 75, 0.18), inset 0 0 10px rgba(77, 158, 255, 0.18);
}

body[data-screen="game"] .lifeline__icon {
  position: relative;
  width: 100%;
  height: 100%;
  border: 0;
  color: #fff2b4;
  font-size: 0.84rem;
}

body[data-screen="game"] .lifeline--fifty .lifeline__icon {
  font-size: clamp(0.54rem, 0.8vw, 0.68rem);
  letter-spacing: 0;
}

body[data-screen="game"] .lifeline__label {
  display: none !important;
}

body[data-screen="game"] .lifeline--rabbi .lifeline__icon::before {
  content: "";
  width: 22px;
  height: 12px;
  border: 2px solid #fff4c8;
  border-bottom: 0;
  border-radius: 24px 24px 3px 3px;
  background: linear-gradient(180deg, #69d8ff, #123875);
  box-shadow: 0 8px 0 -3px rgba(255, 242, 180, 0.92);
}

body[data-screen="game"] .lifeline--audience .lifeline__icon::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff2b4;
  box-shadow:
    -12px 4px 0 #fff2b4,
    12px 4px 0 #fff2b4,
    0 14px 0 3px rgba(255, 242, 180, 0.46),
    -12px 18px 0 1px rgba(255, 242, 180, 0.38),
    12px 18px 0 1px rgba(255, 242, 180, 0.38);
}

body[data-screen="game"] .lifeline--verse .lifeline__icon::before {
  content: "";
  width: 25px;
  height: 19px;
  border: 2px solid #fff2b4;
  border-radius: 4px;
  background:
    linear-gradient(90deg, transparent 48%, rgba(255, 242, 180, 0.72) 49% 51%, transparent 52%),
    linear-gradient(180deg, rgba(255, 242, 180, 0.18), rgba(255, 242, 180, 0.04));
  transform: perspective(80px) rotateX(10deg);
}

body[data-screen="game"] .lifeline--switch .lifeline__icon {
  font-size: 1.18rem;
}

[dir="rtl"] body[data-screen="game"] .answer {
  padding: 12px 100px 12px 38px;
}

[dir="rtl"] body[data-screen="game"] .answer::before {
  inset-inline-start: auto;
  inset-inline-end: auto;
  right: 12px;
  left: auto;
}

[dir="ltr"] body[data-screen="game"] .answer {
  padding: 12px 38px 12px 100px;
}

[dir="ltr"] body[data-screen="game"] .answer::before {
  inset-inline-start: auto;
  inset-inline-end: auto;
  left: 12px;
  right: auto;
}

@media (min-width: 761px) and (max-height: 1080px) {
  body[data-screen="game"] .game-shell {
    height: 100svh;
    min-height: 100svh;
    padding-bottom: 78px;
    overflow: hidden;
  }

  body[data-screen="game"] .main-grid {
    min-height: calc(100svh - 86px);
    height: calc(100svh - 86px);
    overflow: hidden;
  }

  body[data-screen="game"] .stage {
    min-height: 0;
    padding-top: 8px;
    padding-bottom: 0;
  }

  body[data-screen="game"] .show-title {
    width: min(390px, 100%);
    min-height: 142px;
    margin-bottom: 6px;
    padding: 15px 28px 18px;
  }

  body[data-screen="game"] .show-title::before,
  body[data-screen="game"] .show-title::after {
    top: 62px;
    width: 84px;
    height: 28px;
  }

  body[data-screen="game"] .show-title::before {
    right: -54px;
  }

  body[data-screen="game"] .show-title::after {
    left: -54px;
  }

  body[data-screen="game"] .show-title span {
    font-size: clamp(1.8rem, 3.1vw, 3.3rem);
  }

  body[data-screen="game"] .show-title strong {
    font-size: clamp(1.9rem, 3.1vw, 3.35rem);
  }

  body[data-screen="game"] .show-title small {
    min-width: 220px;
    margin-top: 5px;
    padding: 6px 16px;
    font-size: 0.85rem;
  }

  body[data-screen="game"] .tv-rabbi-hero {
    top: 128px;
    width: clamp(340px, 35vw, 470px);
    max-height: calc(100svh - 170px);
  }

  body[data-screen="game"] .score-strip {
    min-height: 36px;
    margin-bottom: 5px;
    padding: 4px 14px;
  }

  body[data-screen="game"] #prizeLabel {
    font-size: 1.12rem;
  }

  body[data-screen="game"] .question-zone::before {
    top: 26px;
    width: 58px;
    height: 52px;
    font-size: 1.42rem;
  }

  body[data-screen="game"] .question-meta {
    margin-top: 36px;
    margin-bottom: 6px;
  }

  body[data-screen="game"] .question-meta span {
    padding: 4px 9px;
    font-size: 0.72rem;
  }

  body[data-screen="game"] #questionText {
    min-height: 148px;
    margin: -10px auto 10px;
    padding: 44px 36px 22px;
    font-size: clamp(1.25rem, 1.85vw, 2rem);
  }

  body[data-screen="game"] .answers {
    gap: 8px;
  }

  body[data-screen="game"] .answer {
    min-height: 60px;
    font-size: clamp(1rem, 1.28vw, 1.28rem);
  }

  body[data-screen="game"] .answer::before {
    width: 48px;
    height: 48px;
    font-size: 1.55rem;
  }

  [dir="rtl"] body[data-screen="game"] .answer {
    padding: 9px 78px 9px 28px;
  }

  [dir="ltr"] body[data-screen="game"] .answer {
    padding: 9px 28px 9px 78px;
  }

  body[data-screen="game"] .side-rail {
    padding-top: 118px;
    gap: 8px;
  }

  body[data-screen="game"] .prize-ladder {
    max-height: calc(100svh - 248px);
  }

  body[data-screen="game"] .prize-ladder li {
    min-height: 34px;
    padding: 4px 12px;
  }

  body[data-screen="game"] .prize-ladder li span,
  body[data-screen="game"] .prize-ladder li strong {
    font-size: 1rem;
  }

  body[data-screen="game"] .tv-run-stats {
    bottom: 82px;
    width: 156px;
    padding: 10px 12px;
  }

  body[data-screen="game"] .tv-run-stats span {
    font-size: 0.72rem;
  }

  body[data-screen="game"] .tv-run-stats strong {
    font-size: 1.52rem;
  }
}

@media (max-width: 760px) {
  .session-toggle {
    grid-template-columns: 32px minmax(0, 1fr);
    min-width: 132px;
    min-height: 40px;
    padding: 4px 7px;
  }

  .session-bank {
    display: none;
  }

  body[data-screen="game"] {
    overflow: hidden;
  }

  body[data-screen="game"] .game-shell {
    width: 100vw;
    height: 100svh;
    min-height: 100svh;
    margin: 0;
    padding: 6px 8px 52px;
    border: 0;
    border-radius: 0;
    overflow: hidden;
  }

  body[data-screen="game"] .main-grid {
    min-height: calc(100svh - 58px);
    height: calc(100svh - 58px);
    padding-top: 44px;
    gap: 4px;
    overflow: hidden;
  }

  body[data-screen="game"] .stage {
    position: relative;
    align-content: start;
    gap: 4px;
    min-height: 0;
    padding: 0;
    overflow: visible;
  }

  body[data-screen="game"] .game-top-actions {
    position: absolute;
    top: -38px;
    left: 0;
    z-index: 20;
  }

  body[data-screen="game"] .home-command {
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.72rem;
  }

  body[data-screen="game"] .show-title {
    width: min(232px, 72vw);
    min-height: 72px;
    margin: 0 auto 2px;
    padding: 8px 18px 9px;
  }

  body[data-screen="game"] .show-title span {
    font-size: 1.22rem;
  }

  body[data-screen="game"] .show-title strong {
    font-size: 1.46rem;
  }

  body[data-screen="game"] .show-title small,
  body[data-screen="game"] .studio-floor,
  body[data-screen="game"] .tv-run-stats {
    display: none;
  }

  body[data-screen="game"] .tv-rabbi-hero {
    position: absolute;
    left: -34px;
    right: auto;
    top: 88px;
    z-index: 1;
    width: 128px;
    max-height: 180px;
    margin: 0;
    opacity: 0.92;
  }

  body[data-screen="game"] .score-strip {
    width: 100%;
    min-height: 32px;
    margin: 0 0 4px;
    padding: 4px 9px;
  }

  body[data-screen="game"] .score-strip span {
    font-size: 0.66rem;
  }

  body[data-screen="game"] #prizeLabel {
    font-size: 0.98rem;
  }

  body[data-screen="game"] .question-zone {
    width: 100%;
  }

  body[data-screen="game"] .question-zone::before {
    display: none;
  }

  body[data-screen="game"] .question-meta {
    gap: 4px;
    margin: 0 0 4px;
  }

  body[data-screen="game"] .question-meta span {
    padding: 3px 7px;
    font-size: 0.62rem;
  }

  body[data-screen="game"] #questionText {
    min-height: 86px;
    max-height: 128px;
    margin: 0 0 6px;
    padding: 12px 18px;
    overflow: auto;
    font-size: clamp(0.98rem, 4.4vw, 1.28rem);
    line-height: 1.12;
  }

  body[data-screen="game"] .answers {
    gap: 6px;
  }

  body[data-screen="game"] .answer {
    min-height: 50px;
    padding-top: 7px;
    padding-bottom: 7px;
    font-size: clamp(0.82rem, 3.8vw, 0.98rem);
    line-height: 1.12;
  }

  [dir="rtl"] body[data-screen="game"] .answer {
    padding-right: 62px;
    padding-left: 12px;
  }

  [dir="ltr"] body[data-screen="game"] .answer {
    padding-right: 12px;
    padding-left: 62px;
  }

  body[data-screen="game"] .answer::before {
    width: 38px;
    height: 38px;
    font-size: 1.12rem;
  }

  [dir="rtl"] body[data-screen="game"] .answer::before {
    right: 8px;
    left: auto;
  }

  [dir="ltr"] body[data-screen="game"] .answer::before {
    left: 8px;
    right: auto;
  }

  body[data-screen="game"] .side-rail {
    display: block;
    margin-top: 4px;
    padding-top: 0;
  }

  body[data-screen="game"] .prize-panel,
  body[data-screen="game"] .feedback-panel,
  body[data-screen="game"] .leaderboard-panel {
    display: none;
  }

  body[data-screen="game"] .lifelines {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: min(270px, 100%);
    margin: 0 auto;
    padding: 4px 6px;
  }

  body[data-screen="game"] .lifeline {
    width: 38px;
    height: 38px;
  }

  body[data-screen="game"] .tv-bottom-nav {
    min-height: 48px;
  }

  body[data-screen="game"] .tv-bottom-nav span {
    font-size: 1.08rem;
  }

  body[data-screen="game"] .tv-bottom-nav small {
    font-size: 0.62rem;
  }
}

@media (max-width: 760px) {
  body[data-screen="game"] .tv-rabbi-hero.avatar-render {
    display: none !important;
  }
}

/* Premium skin studio redesign */
body[data-screen="skins"] .session-dock,
body[data-screen="skins"] .topbar {
  display: none;
}

body[data-screen="skins"] .game-shell {
  width: min(1536px, calc(100vw - 16px));
  height: calc(100svh - 16px);
  min-height: 760px;
  padding: 8px;
  overflow: hidden;
  border-color: rgba(229, 158, 54, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 235, 161, 0.16), 0 20px 60px rgba(0, 0, 0, 0.42);
}

@media (min-width: 1081px) {
  body[data-screen="skins"] {
    overflow: hidden;
  }
}

body[data-screen="skins"] .skin-screen {
  display: grid;
  grid-template-rows: 92px minmax(0, 1fr) 74px;
  gap: 10px;
  min-height: 0;
  height: 100%;
  padding: 0;
  color: #fff7da;
}

.skin-studio-topbar,
.skin-bottom-nav {
  display: grid;
  align-items: center;
  background:
    linear-gradient(180deg, rgba(8, 25, 64, 0.96), rgba(2, 10, 31, 0.98)),
    radial-gradient(circle at 48% 0%, rgba(255, 205, 82, 0.14), transparent 42%);
  border: 1px solid rgba(216, 144, 42, 0.75);
  border-radius: 28px;
  box-shadow: inset 0 0 28px rgba(65, 147, 255, 0.12), 0 14px 32px rgba(0, 0, 0, 0.28);
}

.skin-studio-topbar {
  grid-template-columns: 58px minmax(250px, 1fr) minmax(300px, 0.95fr) 270px minmax(250px, auto);
  gap: 16px;
  padding: 9px 20px;
  direction: ltr !important;
}

.skin-menu-button,
.skin-account-button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #ffd56a;
  background: rgba(2, 9, 29, 0.72);
  border: 1px solid rgba(255, 199, 81, 0.52);
  border-radius: 50%;
  font-size: 1.55rem;
  font-weight: 950;
  box-shadow: inset 0 0 18px rgba(255, 207, 90, 0.1);
}

.skin-studio-logo {
  display: grid;
  grid-template-columns: 64px auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.skin-logo-rabbi {
  width: 64px;
  height: 64px;
  align-self: end;
}

.skin-studio-logo > div {
  position: relative;
  display: grid;
  justify-items: center;
  max-width: 250px;
  padding: 9px 28px 12px;
  background: linear-gradient(180deg, rgba(13, 42, 95, 0.96), rgba(3, 12, 36, 0.92));
  border: 1px solid rgba(255, 204, 89, 0.74);
  border-radius: 16px 16px 28px 28px;
  box-shadow: inset 0 0 24px rgba(102, 174, 255, 0.12);
}

.skin-studio-logo strong {
  color: #ffd56a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.58rem;
  line-height: 1;
}

.skin-studio-logo small {
  color: #ffe6a1;
  font-size: 1.08rem;
  font-weight: 950;
}

.skin-studio-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 54px;
  overflow: hidden;
  background: rgba(2, 8, 28, 0.78);
  border: 1px solid rgba(255, 210, 106, 0.36);
  border-radius: 20px;
}

.skin-studio-stats span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 10px;
  color: #fff4cc;
  border-inline-end: 1px solid rgba(255, 255, 255, 0.11);
  font-weight: 950;
}

.skin-studio-stats span:last-child {
  border-inline-end: 0;
}

.skin-studio-stats b {
  color: #ffc947;
  font-size: 1.2rem;
}

.skin-studio-stats em {
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skin-level-pill {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 16px;
  color: #fff0bd;
  background: rgba(2, 8, 28, 0.78);
  border: 1px solid rgba(255, 210, 106, 0.36);
  border-radius: 20px;
  font-weight: 950;
}

.skin-level-pill i {
  display: block;
  height: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 216, 115, 0.28);
  border-radius: 999px;
}

.skin-level-pill b {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #c47b22, #ffdd78);
  border-radius: inherit;
}

.skin-studio-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.skin-lang-switch {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 4px;
  background: rgba(2, 8, 28, 0.82);
  border: 1px solid rgba(255, 210, 106, 0.38);
  border-radius: 999px;
}

.skin-lang-switch .seg {
  min-width: 74px;
  min-height: 36px;
  color: #fff4cc;
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 950;
}

.skin-lang-switch .seg.active {
  color: #06132d;
  background: linear-gradient(180deg, #fff4c0, #d89126);
  box-shadow: 0 0 16px rgba(255, 201, 71, 0.34);
}

body[data-screen="skins"] .skin-layout {
  display: grid;
  grid-template-columns: minmax(520px, 0.84fr) minmax(650px, 1.16fr);
  grid-template-areas: "chooser builder";
  gap: 12px;
  min-height: 0;
  direction: ltr;
}

[dir="rtl"] body[data-screen="skins"] .skin-grid-panel,
[dir="rtl"] body[data-screen="skins"] .avatar-builder-panel,
[dir="rtl"] body[data-screen="skins"] .skin-bottom-nav,
[dir="rtl"] body[data-screen="skins"] .skin-studio-topbar {
  direction: rtl;
}

.skin-grid-panel,
.avatar-builder-panel {
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(45, 109, 211, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(3, 16, 47, 0.97), rgba(1, 8, 28, 0.98));
  border: 1px solid rgba(216, 144, 42, 0.8);
  border-radius: 24px;
  box-shadow: inset 0 0 30px rgba(63, 143, 255, 0.12), 0 16px 34px rgba(0, 0, 0, 0.26);
}

.skin-grid-panel {
  grid-area: chooser;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 18px;
}

.avatar-builder-panel {
  grid-area: builder;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 18px;
}

.skin-panel-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 42px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.skin-panel-heading h2 {
  margin: 0;
  color: #ffd56a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.9rem;
  line-height: 1;
  text-align: center;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
}

.skin-panel-heading h2::before,
.skin-panel-heading h2::after {
  content: "〰";
  display: inline-block;
  margin: 0 14px;
  color: #d8902a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
}

.skin-panel-heading small {
  color: #ffe8a6;
  font-family: inherit;
  font-size: 1.03rem;
}

.skin-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  direction: ltr;
}

.skin-filter-row--compact {
  min-height: 0;
}

.skin-filter-row button {
  min-height: 38px;
  padding: 0 18px;
  color: #fff1bf;
  background: rgba(5, 13, 37, 0.78);
  border: 1px solid rgba(255, 215, 116, 0.45);
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 950;
}

.skin-filter-row button.active {
  color: #06132d;
  background: linear-gradient(180deg, #fff1b8, #cf8424);
  border-color: #ffedae;
  box-shadow: 0 0 18px rgba(255, 201, 71, 0.38);
}

.skin-count-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 30px;
  color: #dce8ff;
  font-size: 0.86rem;
  font-weight: 900;
}

.skin-count-pill strong {
  color: #ffd56a;
  font-size: 1rem;
}

body[data-screen="skins"] .skin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  gap: 10px;
  max-height: none;
  min-height: 0;
  /* scroll through many characters instead of cramming/clipping them (Tal) */
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 6px 8px 2px;
  scroll-padding-block-end: 12px;
  scrollbar-width: thin;
  direction: ltr;
}
body[data-screen="skins"] .skin-grid::-webkit-scrollbar { width: 8px; }
body[data-screen="skins"] .skin-grid::-webkit-scrollbar-thumb { background: rgba(255,210,106,.45); border-radius: 8px; }
body[data-screen="skins"] .skin-grid::-webkit-scrollbar-track { background: rgba(255,255,255,.05); border-radius: 8px; }

body[data-screen="skins"] .skin-card {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  justify-items: center;
  gap: 5px;
  min-height: 0;
  padding: 6px 6px 12px;
  color: #fff4ce;
  background:
    radial-gradient(circle at 50% 16%, rgba(255, 206, 81, 0.14), transparent 46%),
    linear-gradient(180deg, rgba(7, 26, 67, 0.92), rgba(2, 10, 31, 0.96));
  border: 1px solid rgba(218, 145, 43, 0.78);
  border-radius: 12px;
  text-align: center;
  direction: rtl;
  box-shadow: inset 0 0 22px rgba(68, 149, 255, 0.12);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

body[data-screen="skins"] .skin-card:hover:not(.locked),
body[data-screen="skins"] .skin-card.active {
  border-color: rgba(255, 226, 128, 1);
  box-shadow: inset 0 0 24px rgba(255, 205, 82, 0.2), 0 0 22px rgba(255, 205, 82, 0.28);
  transform: translateY(-2px);
}

body[data-screen="skins"] .skin-card.locked {
  opacity: 0.74;
  filter: saturate(0.82);
}

body[data-screen="skins"] .skin-card__badge {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: #ffffff;
  background: linear-gradient(180deg, #77b944, #317f2c);
  border: 2px solid rgba(255, 248, 211, 0.85);
  border-radius: 50%;
  font-size: 1.02rem;
  line-height: 1;
  box-shadow: 0 0 14px rgba(255, 214, 103, 0.5);
}

body[data-screen="skins"] .skin-card.locked .skin-card__badge {
  color: #f6dba0;
  background: rgba(4, 9, 25, 0.72);
  border-color: rgba(255, 231, 172, 0.38);
}

.skin-card__art {
  position: relative;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: 9px;
}

body[data-screen="skins"] .avatar-render--card .avatar-raster-wrap {
  width: 100%;
  height: 100%;
}

body[data-screen="skins"] .avatar-render--card .avatar-raster {
  width: 100%;
  height: 100%;
  min-height: 212px;
  max-height: 244px;
  object-fit: cover;
  object-position: 50% 8%;
  filter: none;
}

body[data-screen="skins"] .skin-card strong {
  max-width: 100%;
  overflow: hidden;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

body[data-screen="skins"] .skin-card small,
body[data-screen="skins"] .skin-card em {
  color: #ffe0a1;
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 850;
}

/* ── Phase E: premium card art & preview polish ─────────────────── */
body[data-screen="skins"] .skin-card .skin-card__art {
  min-height: 148px;
  /* Subtle stage-floor spotlight cone behind each card portrait */
  background:
    radial-gradient(ellipse at 50% 100%, rgba(255, 215, 80, 0.12), transparent 56%),
    radial-gradient(ellipse at 50% 20%, rgba(105, 216, 255, 0.10), transparent 44%),
    linear-gradient(180deg, rgba(4, 12, 48, 0.92) 0%, rgba(1, 6, 18, 0.97) 100%);
}

body[data-screen="skins"] .skin-card .skin-card__art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(105, 216, 255, 0.06) 0%, transparent 40%);
  pointer-events: none;
  z-index: 1;
}

body[data-screen="skins"] .skin-card .skin-card__art::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(to top, rgba(2, 8, 26, 0.78), transparent);
  pointer-events: none;
  z-index: 2;
  border-radius: 0 0 9px 9px;
}

body[data-screen="skins"] .avatar-render--card svg {
  position: relative;
  z-index: 3;
  filter: drop-shadow(0 8px 7px rgba(0, 0, 0, 0.62));
}

body[data-screen="skins"] .skin-card.active .skin-card__art,
body[data-screen="skins"] .skin-card:hover:not(.locked) .skin-card__art {
  box-shadow:
    inset 0 0 0 2px rgba(255, 218, 96, 0.56),
    0 0 18px rgba(255, 205, 82, 0.32),
    inset 0 0 24px rgba(255, 215, 80, 0.08);
}

body[data-screen="skins"] .skin-card.active .skin-card__art {
  background:
    radial-gradient(ellipse at 50% 100%, rgba(255, 215, 80, 0.18), transparent 56%),
    radial-gradient(ellipse at 50% 20%, rgba(105, 216, 255, 0.13), transparent 44%),
    linear-gradient(180deg, rgba(6, 18, 60, 0.92) 0%, rgba(2, 8, 24, 0.97) 100%);
}

body[data-screen="skins"] .avatar-render--preview svg {
  width: min(290px, 88vw);
  max-height: 400px;
  filter:
    drop-shadow(0 24px 22px rgba(0, 0, 0, 0.56))
    drop-shadow(0 4px 6px rgba(0, 0, 0, 0.38));
}

/* Mini avatar: crisper rendering at small size */
.avatar-render--mini svg {
  filter: none;
  image-rendering: crisp-edges;
}
/* ─────────────────────────────────────────────────────────────────── */

.skin-unlock-note {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  color: #f6dfac;
  background: rgba(2, 8, 28, 0.72);
  border: 1px solid rgba(255, 210, 106, 0.32);
  border-radius: 12px;
  font-weight: 840;
}

.skin-unlock-note p {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skin-unlock-note span,
.skin-unlock-note b {
  color: #ffd56a;
}

.builder-workbench {
  display: grid;
  grid-template-columns: minmax(310px, 0.95fr) minmax(300px, 0.9fr) 154px;
  gap: 12px;
  min-height: 0;
  direction: ltr;
}

[dir="rtl"] .builder-controls,
[dir="rtl"] .skin-preview-column,
[dir="rtl"] .equipped-panel {
  direction: rtl;
}

.builder-controls {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
}

body[data-screen="skins"] .builder-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  min-height: 92px;
  overflow: hidden;
  direction: ltr;
  background: rgba(2, 9, 29, 0.74);
  border: 1px solid rgba(255, 210, 106, 0.36);
  border-radius: 16px;
}

body[data-screen="skins"] .builder-tabs button {
  display: grid;
  place-items: center;
  align-content: center;
  min-width: 0;
  min-height: 92px;
  padding: 6px 4px;
  color: #fff1be;
  background: transparent;
  border: 0;
  border-inline-end: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  direction: rtl;
}

body[data-screen="skins"] .builder-tabs button:last-child {
  border-inline-end: 0;
}

body[data-screen="skins"] .builder-tabs button b {
  color: #ffc947;
  font-size: 1.44rem;
  line-height: 1;
}

body[data-screen="skins"] .builder-tabs button.active {
  color: #fff7dc;
  background: radial-gradient(circle at 50% 18%, rgba(255, 222, 114, 0.28), rgba(7, 23, 57, 0.9) 70%);
  box-shadow: inset 0 0 22px rgba(255, 202, 71, 0.36);
}

body[data-screen="skins"] .builder-options {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding: 12px 4px 4px;
}

body[data-screen="skins"] .builder-option-group {
  display: grid;
  gap: 9px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

body[data-screen="skins"] .builder-option-group:last-child {
  border-bottom: 0;
}

body[data-screen="skins"] .builder-option-group h3 {
  margin: 0;
  color: #f7e6c0;
  font-size: 1rem;
  font-weight: 900;
}

body[data-screen="skins"] .builder-option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  direction: ltr;
}

body[data-screen="skins"] .builder-option {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 54px;
  min-height: 54px;
  padding: 6px;
  color: #fff3c2;
  background: rgba(2, 9, 29, 0.74);
  border: 1px solid rgba(255, 210, 106, 0.42);
  border-radius: 12px;
  text-align: center;
}

body[data-screen="skins"] .builder-option--tile {
  grid-template-columns: 36px minmax(64px, 1fr);
  grid-template-rows: auto auto;
  min-width: 116px;
  justify-items: start;
  column-gap: 8px;
  padding: 8px;
  direction: rtl;
}

body[data-screen="skins"] .builder-option.active {
  border-color: #fff0ae;
  box-shadow: inset 0 0 18px rgba(255, 203, 76, 0.2), 0 0 16px rgba(255, 203, 76, 0.24);
}

body[data-screen="skins"] .builder-option.locked {
  opacity: 0.52;
}

body[data-screen="skins"] .builder-option--swatch span,
body[data-screen="skins"] .builder-option--swatch small {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

body[data-screen="skins"] .builder-option--tile span {
  max-width: 100%;
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-screen="skins"] .builder-option--tile small {
  color: #dce8ff;
  font-size: 0.64rem;
  font-weight: 780;
}

body[data-screen="skins"] .option-swatch,
body[data-screen="skins"] .option-symbol {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #06132d;
  border: 1px solid rgba(255, 236, 177, 0.82);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18), 0 3px 12px rgba(0, 0, 0, 0.22);
}

body[data-screen="skins"] .builder-option--tile .option-symbol,
body[data-screen="skins"] .builder-option--tile .option-swatch {
  grid-row: 1 / 3;
}

.skin-preview-column {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-inline-start: 1px solid rgba(255, 255, 255, 0.1);
  border-inline-end: 1px solid rgba(255, 255, 255, 0.1);
}

body[data-screen="skins"] .skin-preview-stage {
  position: relative;
  display: grid;
  place-items: end center;
  min-height: 0;
  padding: 14px 8px 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 88%, rgba(255, 205, 82, 0.34), transparent 28%),
    radial-gradient(circle at 54% 18%, rgba(142, 201, 255, 0.28), transparent 24%),
    linear-gradient(180deg, rgba(7, 28, 74, 0.72), rgba(1, 6, 22, 0.96));
  border: 0;
  border-radius: 0;
}

body[data-screen="skins"] .skin-preview-stage::before,
body[data-screen="skins"] .skin-preview-stage::after {
  content: "";
  position: absolute;
  top: -30px;
  width: 72px;
  height: 75%;
  background: linear-gradient(180deg, rgba(152, 205, 255, 0.36), rgba(152, 205, 255, 0));
  filter: blur(8px);
  opacity: 0.78;
  transform-origin: top center;
}

body[data-screen="skins"] .skin-preview-stage::before {
  left: 23%;
  transform: rotate(12deg);
}

body[data-screen="skins"] .skin-preview-stage::after {
  right: 21%;
  transform: rotate(-12deg);
}

body[data-screen="skins"] .avatar-render--preview {
  position: relative;
  z-index: 1;
  width: min(330px, 100%);
  height: 100%;
  max-height: 100%;
  align-self: stretch;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

body[data-screen="skins"] .avatar-render--preview .avatar-raster-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

/* always fit the WHOLE figure inside the stage (no fixed height that overflows
   short screens — that was clipping the head / showing only the lower body) */
body[data-screen="skins"] .avatar-render--preview .avatar-raster {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: 50% 100%;
  filter: drop-shadow(0 28px 25px rgba(0, 0, 0, 0.44));
}

body[data-screen="skins"] .skin-details {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 10px 12px;
  background: rgba(2, 9, 29, 0.54);
}

body[data-screen="skins"] .skin-details strong {
  color: #ffd56a;
  font-size: 1.15rem;
  line-height: 1.1;
}

body[data-screen="skins"] .skin-details span,
body[data-screen="skins"] .skin-details small {
  color: #dce8ff;
  font-size: 0.76rem;
  font-weight: 840;
}

body[data-screen="skins"] .skin-details p {
  margin: 0;
  color: #fff8dd;
  font-size: 0.82rem;
  font-weight: 820;
  line-height: 1.25;
}

.equipped-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  min-height: 0;
  padding: 14px 10px;
}

.equipped-panel h3 {
  display: grid;
  gap: 2px;
  margin: 0;
  color: #ffd56a;
  font-size: 0.98rem;
  line-height: 1.2;
  text-align: center;
}

.equipped-panel h3 small {
  color: #ffe6a1;
  font-size: 0.74rem;
}

.equipped-list {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow: auto;
}

.equipped-item {
  display: grid;
  grid-template-columns: 42px 1fr 18px;
  align-items: center;
  gap: 8px;
  min-height: 70px;
  padding: 8px;
  color: #fff5d1;
  background: rgba(2, 9, 29, 0.72);
  border: 1px solid rgba(255, 210, 106, 0.42);
  border-radius: 12px;
}

.equipped-item strong,
.equipped-item small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.equipped-item strong {
  font-size: 0.82rem;
  font-weight: 950;
}

.equipped-item small {
  color: #dce8ff;
  font-size: 0.68rem;
  font-weight: 800;
}

.equipped-item b {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: #ffffff;
  background: linear-gradient(180deg, #77b944, #317f2c);
  border-radius: 50%;
  font-size: 0.75rem;
}

body[data-screen="skins"] .builder-actions {
  display: grid;
  grid-template-columns: 1fr 1.45fr 1fr auto;
  align-items: center;
  gap: 12px;
  direction: ltr;
}

[dir="rtl"] body[data-screen="skins"] .builder-actions button,
[dir="rtl"] body[data-screen="skins"] #avatarSaveStatus {
  direction: rtl;
}

body[data-screen="skins"] #selectSkin,
body[data-screen="skins"] #previewAnimation {
  display: none;
}

body[data-screen="skins"] .builder-actions button {
  min-height: 58px;
  border-radius: 16px;
  font-size: 1rem;
}

body[data-screen="skins"] .builder-actions .primary-action {
  color: #160d04;
  background: linear-gradient(180deg, #fff2b4, #d9912d 58%, #9f5a14);
  border-color: #ffefb6;
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.24), 0 0 16px rgba(255, 201, 71, 0.24);
}

body[data-screen="skins"] .builder-actions .secondary-action {
  color: #ffd56a;
  background: linear-gradient(180deg, rgba(18, 48, 103, 0.94), rgba(3, 12, 37, 0.98));
  border-color: rgba(255, 210, 106, 0.48);
  box-shadow: inset 0 0 18px rgba(73, 150, 255, 0.13);
}

body[data-screen="skins"] #avatarSaveStatus,
body[data-screen="skins"] #skinUnlockBadge {
  display: inline-grid;
  place-items: center;
  min-height: 30px;
  padding: 5px 10px;
  color: #06132d;
  background: linear-gradient(180deg, #fff2b4, #d9912d);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 950;
  white-space: nowrap;
}

body[data-screen="skins"] #skinUnlockBadge.locked {
  color: #fff;
  background: linear-gradient(180deg, #f15c5c, #8f121d);
}

.skin-bottom-nav {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-height: 74px;
  overflow: visible;
  direction: ltr !important;
}

[dir="rtl"] body[data-screen="skins"] .skin-studio-logo,
[dir="rtl"] body[data-screen="skins"] .skin-studio-actions,
[dir="rtl"] body[data-screen="skins"] .skin-bottom-nav button {
  direction: rtl;
}

.skin-bottom-nav button {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 70px;
  color: #fce6a6;
  background: transparent;
  border: 0;
  border-inline-end: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 900;
}

.skin-bottom-nav button:last-child {
  border-inline-end: 0;
}

.skin-bottom-nav button.active {
  position: relative;
  width: 92px;
  height: 92px;
  justify-self: center;
  margin-top: -28px;
  color: #06132d;
  background: linear-gradient(180deg, #fff2b4, #d9912d 62%, #8b4f16);
  border: 2px solid rgba(255, 239, 178, 0.9);
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(255, 201, 71, 0.44);
}

.skin-bottom-nav span {
  color: currentColor;
  font-size: 1.7rem;
  line-height: 1;
}

.skin-bottom-nav small {
  max-width: 100%;
  overflow: hidden;
  color: currentColor;
  font-size: 0.78rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar-raster-wrap {
  position: relative;
  display: inline-grid;
  place-items: center;
  max-width: 100%;
  transform-origin: 50% 92%;
}

.avatar-raster-wrap .avatar-raster {
  position: relative;
  z-index: 1;
}

.raster-effect {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 2;
}

.raster-effect--glow {
  background: radial-gradient(circle at 50% 42%, rgba(255, 220, 97, 0.34), transparent 54%);
  mix-blend-mode: screen;
  animation: avatar-glow 2.8s ease-in-out infinite;
}

.raster-effect--spotlight {
  background:
    linear-gradient(105deg, transparent 14%, rgba(137, 202, 255, 0.24) 42%, transparent 64%),
    radial-gradient(ellipse at 50% 96%, rgba(255, 205, 82, 0.28), transparent 36%);
  mix-blend-mode: screen;
}

.raster-effect--letters b {
  position: absolute;
  color: #ffc947;
  font-size: 1.7rem;
  font-style: normal;
  font-weight: 950;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  animation: avatar-letter-float 2.6s ease-in-out infinite;
}

.raster-effect--letters b:nth-child(1) {
  top: 18%;
  left: 18%;
}

.raster-effect--letters b:nth-child(2) {
  top: 36%;
  right: 12%;
  animation-delay: -0.8s;
}

.raster-effect--letters b:nth-child(3) {
  top: 8%;
  right: 28%;
  animation-delay: -1.4s;
}

.raster-effect--confetti b {
  position: absolute;
  width: 7px;
  height: 14px;
  background: #ffc947;
  border-radius: 2px;
  animation: avatar-confetti 1.4s ease-in-out infinite;
}

.raster-effect--confetti b:nth-child(1) { top: 18%; left: 22%; }
.raster-effect--confetti b:nth-child(2) { top: 26%; right: 18%; animation-delay: -0.4s; }
.raster-effect--confetti b:nth-child(3) { top: 8%; left: 52%; animation-delay: -0.8s; }
.raster-effect--confetti b:nth-child(4) { top: 42%; right: 36%; animation-delay: -1.1s; }

.raster-effect--sparkles b,
.raster-effect--scrolls b {
  position: absolute;
  display: block;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.42));
  animation: avatar-letter-float 2.4s ease-in-out infinite;
}

.raster-effect--sparkles b {
  width: 16px;
  height: 16px;
  background: #fff2b4;
  clip-path: polygon(50% 0, 62% 34%, 100% 50%, 62% 66%, 50% 100%, 38% 66%, 0 50%, 38% 34%);
}

.raster-effect--sparkles b:nth-child(1) { top: 18%; left: 18%; }
.raster-effect--sparkles b:nth-child(2) { top: 10%; right: 26%; animation-delay: -0.7s; }
.raster-effect--sparkles b:nth-child(3) { top: 42%; right: 14%; animation-delay: -1.2s; }

.raster-effect--scrolls b {
  width: 24px;
  height: 15px;
  background: #f4d79d;
  border: 1px solid rgba(255, 226, 128, 0.85);
  border-radius: 6px 2px 6px 2px;
}

.raster-effect--scrolls b:nth-child(1) { top: 20%; left: 16%; transform: rotate(-12deg); }
.raster-effect--scrolls b:nth-child(2) { top: 13%; right: 20%; transform: rotate(13deg); animation-delay: -0.6s; }
.raster-effect--scrolls b:nth-child(3) { top: 46%; right: 12%; transform: rotate(-8deg); animation-delay: -1.1s; }

body[data-screen="start"] .start-rabbi .avatar-raster-wrap {
  width: 100%;
}

body[data-screen="game"] .tv-rabbi-hero.avatar-render .avatar-raster-wrap,
body[data-screen="game"] .tv-rabbi-hero.avatar-render .avatar-raster {
  width: 100%;
  max-height: calc(100vh - 140px);
}

body[data-screen="game"] .host-spotlight .avatar-raster-wrap {
  width: 118px;
}

body[data-screen="game"] .host-spotlight .avatar-raster {
  width: 118px;
  max-height: 140px;
  object-fit: contain;
}

@media (max-width: 1320px) {
  body[data-screen="skins"] .skin-studio-topbar {
    grid-template-columns: 52px minmax(220px, 1fr) minmax(260px, 0.85fr) minmax(220px, 0.7fr);
  }

  .skin-level-pill {
    display: none;
  }

  body[data-screen="skins"] .skin-layout {
    grid-template-columns: minmax(460px, 0.82fr) minmax(560px, 1.18fr);
  }

  .builder-workbench {
    grid-template-columns: minmax(280px, 0.95fr) minmax(260px, 0.9fr) 142px;
  }
}

@media (max-width: 1080px) {
  body[data-screen="skins"] .game-shell {
    height: auto;
    min-height: 100svh;
    overflow: auto;
  }

  body[data-screen="skins"] .skin-screen {
    grid-template-rows: auto auto auto;
    height: auto;
  }

  body[data-screen="skins"] .skin-studio-topbar {
    grid-template-columns: 48px 1fr auto;
    border-radius: 20px;
  }

  .skin-studio-stats,
  .skin-level-pill {
    display: none;
  }

  body[data-screen="skins"] .skin-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "chooser"
      "builder";
  }

  body[data-screen="skins"] .skin-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .builder-workbench {
    grid-template-columns: minmax(300px, 1fr) minmax(280px, 0.95fr);
  }

  .equipped-panel {
    grid-column: 1 / -1;
    grid-template-rows: auto auto;
  }

  .equipped-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: visible;
  }
}

@media (max-width: 760px) {
  body[data-screen="skins"] .game-shell {
    width: 100vw;
    min-height: 100svh;
    padding: 8px;
    border: 0;
    border-radius: 0;
  }

  body[data-screen="skins"] .skin-screen {
    gap: 8px;
  }

  body[data-screen="skins"] .skin-studio-topbar {
    grid-template-columns: 42px 1fr 42px;
    gap: 8px;
    min-height: 64px;
    padding: 8px;
    border-radius: 18px;
  }

  .skin-studio-logo {
    grid-template-columns: 44px 1fr;
    gap: 6px;
  }

  .skin-logo-rabbi {
    width: 44px;
    height: 44px;
  }

  .skin-studio-logo > div {
    max-width: none;
    padding: 7px 10px;
    border-radius: 12px;
  }

  .skin-studio-logo strong {
    font-size: 1rem;
  }

  .skin-studio-logo small {
    font-size: 0.78rem;
  }

  .skin-studio-actions .skin-lang-switch {
    display: none;
  }

  .skin-menu-button,
  .skin-account-button {
    width: 38px;
    height: 38px;
    font-size: 1.15rem;
  }

  .skin-grid-panel,
  .avatar-builder-panel {
    padding: 12px;
    border-radius: 18px;
  }

  .skin-panel-heading h2 {
    font-size: 1.35rem;
  }

  .skin-panel-heading h2::before,
  .skin-panel-heading h2::after {
    display: none;
  }

  .skin-panel-heading small {
    display: none;
  }

  .skin-filter-row {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .skin-filter-row button {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 13px;
    font-size: 0.82rem;
  }

  body[data-screen="skins"] .skin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body[data-screen="skins"] .avatar-render--card .avatar-raster {
    min-height: 164px;
    max-height: 194px;
  }

  body[data-screen="skins"] .skin-card strong {
    font-size: 0.86rem;
  }

  .builder-workbench {
    grid-template-columns: 1fr;
  }

  body[data-screen="skins"] .builder-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: auto;
  }

  body[data-screen="skins"] .builder-tabs button {
    min-height: 64px;
    font-size: 0.7rem;
  }

  .skin-preview-column {
    min-height: 360px;
    border-inline: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  body[data-screen="skins"] .avatar-render--preview {
    width: min(260px, 100%);
  }

  .equipped-list {
    grid-template-columns: 1fr;
  }

  body[data-screen="skins"] .builder-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body[data-screen="skins"] .builder-actions button {
    min-height: 48px;
    font-size: 0.86rem;
  }

  body[data-screen="skins"] #avatarSaveStatus {
    grid-column: 1 / -1;
  }

  .skin-bottom-nav {
    min-height: 60px;
    border-radius: 20px;
  }

  .skin-bottom-nav button {
    min-height: 56px;
  }

  .skin-bottom-nav button.active {
    width: 72px;
    height: 72px;
    margin-top: -18px;
  }

  .skin-bottom-nav span {
    font-size: 1.22rem;
  }

  .skin-bottom-nav small {
    font-size: 0.58rem;
  }
}

/* ---- Mistake review: entry button, weakness hint, flashcard modal ---- */
.review-entry {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.6rem 0 0.2rem;
}
.review-entry-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
}
.review-entry-count {
  min-width: 1.5rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: var(--gold);
  color: #1a1206;
  font-weight: 700;
  font-size: 0.82rem;
  text-align: center;
}
.weakness-hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--gold);
  opacity: 0.92;
}
.review-modal[hidden] {
  display: none;
}
.review-modal {
  position: fixed;
  inset: 0;
  /* BUG-056: above transient show overlays such as .char-reaction-subtitle (1200). */
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(4px);
}

/* BUG-005: Settings panel */
.settings-body { display: flex; flex-direction: column; gap: 1.1rem; }
.settings-account { margin: 0; font-weight: 600; opacity: 0.9; }
.settings-section {
  border: 1px solid rgba(244, 189, 53, 0.22);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.03);
}
.settings-section h3 { margin: 0 0 0.5rem; font-size: 1rem; color: var(--gold); }
.settings-hint { margin: 0 0 0.7rem; font-size: 0.85rem; opacity: 0.78; line-height: 1.4; }
.settings-section.settings-danger { border-color: rgba(255, 99, 99, 0.45); }
.settings-section.settings-danger h3 { color: #ff9d9d; }
.settings-input {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 0.7rem;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.32);
  color: #f4f7ff;
  font: inherit;
}
.settings-delete {
  border-color: rgba(255, 99, 99, 0.6);
  color: #ffd9d9;
  background: linear-gradient(180deg, rgba(120, 16, 16, 0.55), rgba(70, 8, 8, 0.7));
}
.settings-delete:disabled, .settings-section button:disabled { opacity: 0.5; cursor: not-allowed; }
.settings-status { margin: 0; min-height: 1.2em; font-size: 0.9rem; color: var(--gold); }
.settings-legal {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  font-size: 0.85rem;
  opacity: 0.85;
}
.settings-legal a { color: var(--gold); text-decoration: underline; }

/* BUG-011 residual: visually-hidden live region for screen-reader announcements */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}
.review-modal-card {
  width: min(560px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--panel-strong);
  border: 2px solid var(--gold);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  padding: 1.4rem 1.4rem 1.6rem;
  color: #f4f7ff;
}
.review-modal-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}
.review-modal-head h2 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--gold);
  flex: 1;
}
.review-progress {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  opacity: 0.85;
}
.review-close {
  background: transparent;
  border: 1px solid rgba(244, 189, 53, 0.5);
  color: var(--gold);
  border-radius: 10px;
  padding: 0.25rem 0.7rem;
  cursor: pointer;
}

/* BUG-035: bump high-traffic controls to the 44x44px touch minimum on mobile
   (WCAG 2.5.5 / Apple HIG). Desktop density is preserved via the media query.
   Placed after the source rules these override (.seg ~1827, .home-command ~803,
   .board-pager ~2472, .review-close above) so later-in-source wins on ties. */
@media (max-width: 640px) {
  .seg {
    min-height: 44px;
  }
  .board-pager .secondary-action {
    min-height: 44px;
  }
  body[data-screen="game"] .home-command {
    min-height: 44px;
  }
  .review-close {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}
.review-card-body {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.2rem;
}
.review-question {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.5;
  font-weight: 600;
}
.review-answer {
  border-top: 1px solid rgba(244, 189, 53, 0.3);
  padding-top: 0.9rem;
}
.review-answer-text {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #8ef0a8;
}
.review-source {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.85;
  line-height: 1.5;
}
.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}
.review-actions button {
  min-width: 130px;
}
.review-gotit {
  background: linear-gradient(180deg, #9af2b1, #3fae63);
  color: #07210f;
}
body.review-open {
  overflow: hidden;
}

/* ---- Economy: toasts, progress header, achievements list ---- */
.toast-host {
  position: fixed;
  top: 1rem;
  inset-inline-end: 1rem;
  z-index: 1400;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
  max-width: min(360px, 90vw);
}
.toast {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.9rem;
  border-radius: 14px;
  background: var(--panel-strong);
  border: 1px solid var(--gold);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5);
  color: #f4f7ff;
  transform: translateY(-12px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.toast--in {
  transform: translateY(0);
  opacity: 1;
}
.toast-icon {
  font-size: 1.5rem;
  line-height: 1;
}
.toast-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.toast-text strong {
  color: var(--gold);
  font-size: 0.82rem;
}
.toast-text span {
  font-size: 0.95rem;
  font-weight: 600;
}
.progress-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(244, 189, 53, 0.3);
}
.progress-level {
  font-weight: 800;
  color: var(--gold);
  white-space: nowrap;
}
.progress-xp {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.progress-xp i {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}
.progress-xp i b {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffe89b, var(--gold));
  transition: width 0.4s ease;
}
.progress-xp em {
  font-size: 0.78rem;
  opacity: 0.85;
  font-style: normal;
}
.progress-coins {
  font-weight: 700;
  white-space: nowrap;
}
.achievements-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.achv-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.7rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.achv-row--earned {
  border-color: rgba(244, 189, 53, 0.55);
  background: rgba(244, 189, 53, 0.1);
}
.achv-row--locked {
  opacity: 0.6;
}
.achv-icon {
  font-size: 1.4rem;
  line-height: 1;
  width: 1.8rem;
  text-align: center;
}
.achv-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.achv-text strong {
  font-size: 0.95rem;
}
.achv-text span {
  font-size: 0.8rem;
  opacity: 0.82;
}
.achv-check {
  color: #8ef0a8;
  font-weight: 800;
  font-size: 1.1rem;
}

/* ---- PWA offline indicator ---- */
.offline-banner {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 1500;
  padding: calc(0.5rem + env(safe-area-inset-top, 0px)) 1rem 0.5rem;
  background: #7a1f1f;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
.offline-banner[hidden] {
  display: none;
}

/* ============================================================
   BUG-010: Visible keyboard focus indicator (WCAG 2.4.7).
   Global :focus-visible ring + a box-shadow ring for clip-path
   controls whose UA outline gets clipped. Appended last so it
   wins source order. :focus-visible means no ring on mouse click.
   ============================================================ */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* Suppress the legacy UA outline only when we supply our own ring. */
:focus:not(:focus-visible) {
  outline: none;
}

/* clip-path / answer / action / segmented / nav controls clip `outline`,
   so use a non-clipped box-shadow ring. The dark inner ring separates the
   gold ring from the button fill so it reads on dark stages and light panels. */
.answer:focus-visible,
.primary-action:focus-visible,
.secondary-action:focus-visible,
.home-command:focus-visible,
.seg:focus-visible,
.review-close:focus-visible,
.board-pager:focus-visible,
.session-toggle:focus-visible,
.tv-bottom-nav button:focus-visible,
.skin-bottom-nav button:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.6), 0 0 0 6px var(--gold);
}

/* ============================================================
   BUG-009: Reduced-motion support (WCAG 2.3.3 / vestibular safety).
   Collapses all animations/transitions app-wide when the OS
   "Reduce Motion" setting is on. The canvas show-engine pause is
   handled in JS separately; this is the CSS half only. Appended
   last so it overrides every earlier animation/transition.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   BUG-034: short-viewport scroll for the game screen.
   The game shell is locked to height:100svh + overflow:hidden
   (in the max-width:640px block), which clips the question + 4
   answers + nav on short screens (e.g. 320x568). On short
   viewports, relax the height/overflow so cut-off content can
   scroll instead of being permanently clipped. Tall viewports
   keep the original fitted layout untouched.
   ============================================================ */
@media (max-height: 640px) {
  body[data-screen="game"] {
    overflow: auto;
  }
  body[data-screen="game"] .game-shell {
    height: auto;
    min-height: 100svh;
    overflow: visible;
  }
  body[data-screen="game"] .main-grid {
    height: auto;
    min-height: auto;
    overflow: visible;
  }
}

/* leaderboard character + player-stats feature */
.leaderboard-list li .leader-avatar{background:none;border:0;padding:0;margin:0 6px;cursor:pointer;flex:0 0 auto;width:30px;height:44px;display:inline-flex;align-items:flex-end;justify-content:center}
.leaderboard-list li .leader-avatar img{width:100%;height:100%;object-fit:contain;object-position:bottom;filter:drop-shadow(0 3px 4px rgba(0,0,0,.55));transition:transform .15s}
.leaderboard-list li .leader-avatar:hover img{transform:scale(1.15)}
.player-stats-modal{position:fixed;inset:0;background:rgba(2,8,23,.74);display:none;align-items:center;justify-content:center;z-index:1200}
.player-stats-modal.open{display:flex}
.player-stats-modal .ps-card{position:relative;background:linear-gradient(160deg,#16224a,#0a1330);border:1px solid #2c3a63;border-radius:18px;padding:22px;max-width:430px;width:90%;box-shadow:0 24px 60px rgba(0,0,0,.55)}
.player-stats-modal .ps-close{position:absolute;top:8px;inset-inline-end:14px;background:none;border:0;color:#9fb0d6;font-size:26px;line-height:1;cursor:pointer}
.player-stats-modal .ps-body{display:flex;gap:18px;align-items:center}
.player-stats-modal .ps-avatar{flex:0 0 auto;width:120px;height:182px}
.player-stats-modal .ps-avatar img{width:100%;height:100%;object-fit:contain;object-position:bottom;filter:drop-shadow(0 8px 12px rgba(0,0,0,.5))}
.player-stats-modal .ps-info{flex:1}
.player-stats-modal .ps-info h3{margin:0 0 2px;color:#fff;font-size:18px}
.player-stats-modal .ps-skin{color:#9fb0d6;font-size:13px;margin-bottom:12px}
.player-stats-modal dl{margin:0;display:grid;grid-template-columns:1fr auto;gap:6px 14px}
.player-stats-modal dl>div{display:contents}
.player-stats-modal dt{color:#9fb0d6;font-size:13px}
.player-stats-modal dd{margin:0;color:#e8eefc;font-weight:700;text-align:start}

/* full-body image-gen skins: show the whole standing figure, not a bust crop */
.avatar-raster-wrap.is-fullbody .avatar-raster{object-fit:contain !important;object-position:50% 100% !important}
body[data-screen="skins"] .avatar-render--card .avatar-raster-wrap.is-fullbody .avatar-raster,
body[data-screen="skins"] .avatar-render--preview .avatar-raster-wrap.is-fullbody .avatar-raster{object-fit:contain !important;object-position:50% 100% !important}
.avatar-raster-wrap.is-fullbody.avatar-raster-wrap--mini .avatar-raster{object-fit:contain !important;object-position:50% 100% !important}

/* lifeline result toast — visible feedback for ask-rabbi / audience / switch / verse
   (those used to write to hidden elements, so only 50/50 appeared to work) */
.lifeline-toast{position:fixed;left:50%;top:78px;transform:translateX(-50%) translateY(-14px);z-index:1400;width:min(540px,92vw);box-sizing:border-box;background:linear-gradient(180deg,#1a2750,#0d1530);color:#eef3ff;border:1px solid #3a4a7e;border-radius:18px;padding:18px 22px 16px;box-shadow:0 24px 70px rgba(0,0,0,.55);opacity:0;pointer-events:none;transition:opacity .25s ease,transform .25s ease;text-align:center}
.lifeline-toast.show{opacity:1;transform:translateX(-50%) translateY(0);pointer-events:auto}
.lifeline-toast .lt-close{position:absolute;top:8px;inset-inline-start:12px;background:none;border:none;color:#9fb0d6;font-size:22px;line-height:1;cursor:pointer;padding:2px 6px}
.lifeline-toast .lt-close:hover{color:#fff}
.lifeline-toast strong{display:block;font-size:1.08rem;margin-bottom:10px;color:#ffd66b}
.lifeline-toast .lt-body p{margin:0;font-size:1.02rem;line-height:1.55}
.lifeline-toast .lt-aud{display:flex;flex-direction:column;gap:8px;margin-top:4px}
.lifeline-toast .lt-aud-row{display:flex;align-items:center;gap:10px}
.lifeline-toast .lt-aud-row>span{width:1.5em;font-weight:800;color:#9fb0d6;text-align:center}
.lifeline-toast .lt-aud-bar{flex:1;height:13px;background:rgba(255,255,255,.12);border-radius:7px;overflow:hidden}
.lifeline-toast .lt-aud-bar>span{display:block;height:100%;background:linear-gradient(90deg,#5b8cff,#9f6bff);border-radius:7px}
.lifeline-toast .lt-aud-row>strong{display:inline-block;margin:0;min-width:3.2em;text-align:end;color:#eef3ff;font-size:.95rem}

/* Customization builder: compact the option tiles so every label stays fully
   visible in the fixed-height panel — they were getting cut/swallowed at the
   scroll boundary and behind the action bar ("can't see the word after זקן"). */
body[data-screen="skins"] .builder-options{padding:12px 4px 18px;scroll-padding-block-end:18px}
body[data-screen="skins"] .builder-option-row{gap:8px}
body[data-screen="skins"] .builder-option--tile{grid-template-columns:28px minmax(56px,1fr);min-width:104px;min-height:44px;padding:5px 8px;column-gap:6px;row-gap:1px}
body[data-screen="skins"] .builder-option--tile .option-symbol,
body[data-screen="skins"] .builder-option--tile .option-swatch{width:27px;height:27px}
body[data-screen="skins"] .builder-option--tile span{font-size:.8rem;line-height:1.12;text-overflow:clip}
body[data-screen="skins"] .builder-option--tile small{font-size:.62rem;line-height:1}
/* subtle fade at the scroll edges so it's clear there's more to scroll */
body[data-screen="skins"] .builder-options{-webkit-mask-image:linear-gradient(180deg,transparent 0,#000 14px,#000 calc(100% - 14px),transparent 100%);mask-image:linear-gradient(180deg,transparent 0,#000 14px,#000 calc(100% - 14px),transparent 100%)}

/* clickable skin avatar in the public start-screen leaderboard (next to each name) */
.public-player{display:flex;align-items:center;gap:9px}
.public-player-text{display:grid;gap:2px;min-width:0}
.public-board-row--head .public-player{display:block}
/* framed medallion portrait so the full-body skin reads cleanly next to the name */
/* circular face medallion — same style as the "guest entry" session avatar (Tal) */
.leader-medallion,.public-leader-avatar{flex:0 0 auto;width:42px;height:42px;border-radius:50%;overflow:hidden;padding:0;margin:0;cursor:pointer;display:inline-flex;background:#071a58;border:2px solid rgba(255,210,106,.55);box-shadow:0 2px 7px rgba(0,0,0,.45);transition:transform .15s,box-shadow .15s,border-color .15s}
.leader-medallion img,.public-leader-avatar img{width:100%;height:100%;object-fit:cover;object-position:50% 8%;filter:none}
.public-leader-avatar:hover,.leader-medallion:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(0,0,0,.5);border-color:rgba(255,210,106,.9)}
/* whole leaderboard row is clickable -> that player's stats */
.public-board-row[data-pubrow]{cursor:pointer}
.public-board-row[data-pubrow]:hover{background:rgba(40,70,140,.5)}
/* champion cards (the big top-scores board) get the player's character too */
.weekly-champions article.champion-has-avatar,.monthly-champions article.champion-has-avatar{display:grid;grid-template-columns:auto 1fr;column-gap:10px;align-items:center;cursor:pointer}
.champion-has-avatar>.champion-medallion{grid-column:1;grid-row:1/4;align-self:center}
.champion-has-avatar>span,.champion-has-avatar>strong,.champion-has-avatar>small{grid-column:2;min-width:0}
.champion-medallion{width:54px;height:54px}
.champion-has-avatar:hover{background:rgba(40,70,140,.35)}

/* start screen: if the controls + modes are taller than the fixed stage (short
   viewports), let it scroll so the "start game" button is always reachable
   instead of being clipped by the overflow:hidden stage. */
body[data-screen="start"] .game-shell { overflow-y: auto; overflow-x: hidden; }
body[data-screen="start"] .game-shell::-webkit-scrollbar { width: 8px; }
body[data-screen="start"] .game-shell::-webkit-scrollbar-thumb { background: rgba(255,210,106,.4); border-radius: 8px; }

/* remove the floating ghost "audience" figures (Tal: don't show these) */
.rabbi-audience { display: none !important; }

/* audience-vote gauge: the % fills the answer button itself like a meter (Tal) */
.answer::before { z-index: 3; }
.answer .answer-label { position: relative; z-index: 2; display: block; }
.answer .aud-fill {
  position: absolute; inset-block: 0; inset-inline-start: 0; width: 0;
  background: linear-gradient(90deg, rgba(91,140,255,.62), rgba(150,118,255,.52));
  box-shadow: inset 0 0 22px rgba(150,118,255,.42);
  z-index: 0; pointer-events: none;
  transition: width 1.15s cubic-bezier(.2,.75,.2,1);
}
.answer.has-audience { border-color: rgba(160,128,255,.9); }
.answer .aud-pct {
  position: absolute; inset-inline-end: 16px; top: 50%; transform: translateY(-50%);
  z-index: 4; color: #f3f6ff; font-weight: 950; font-size: 0.96rem;
  text-shadow: 0 1px 5px rgba(0,0,0,.9); pointer-events: none;
}

/* ── Mobile/web: show the host presenter shrunk, pinned at the bottom-left ──
   (Tal request — desktop has the side host; on narrow viewports it was hidden) */
@media (max-width: 760px) {
  body[data-screen="game"] #activeHostHero.tv-rabbi-hero {
    display: block !important;
    position: fixed !important;
    left: 4px !important;
    right: auto !important;
    top: auto !important;
    bottom: calc(48px + env(safe-area-inset-bottom, 0px) + 4px) !important;
    width: 76px !important;
    min-width: 0 !important;
    max-width: 76px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 8;
    pointer-events: none;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.55));
  }
  body[data-screen="game"] #activeHostHero.tv-rabbi-hero .avatar-render,
  body[data-screen="game"] #activeHostHero.tv-rabbi-hero .avatar-raster-wrap,
  body[data-screen="game"] #activeHostHero.tv-rabbi-hero img {
    width: 76px !important;
    max-width: 76px !important;
    height: auto !important;
    inset: auto !important;
    position: static !important;
  }
}
