/* Question mise en avant. Text uses --bs-body-color so it stays readable
   on both light and dark themes; visual prominence comes from the heavy
   weight and the 1.75rem size, not from a hard-coded red that was hard to
   read on either background. */
.question {
    font-family: var(--arc-font); font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    text-align: center;
    color: var(--bs-body-color);
    padding: 1rem;
    margin-bottom: 1.5rem;
    min-height: 135px;
}

/* Boutons */
.option-btn {
    font-family: var(--arc-font); font-weight: 800;
    position: relative;
    flex: 1;
    min-height: 145px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e60000;
    border-radius: 10px;
    font-size: 1.5rem;
    color: #fff;
    background-color: #d14848ff;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.option-btn-with-letter {
  padding: 15px 15px 15px 35px;
}

.option-btn:hover {
    background-color: #b30000;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(230, 0, 0, 0.3);
}

.option-letters {
    position: absolute;
    top: 35px;
    left: -20px;
    background-color: #fff;
    color: #f30;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

/* Score et progression */
.stats {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--bs-body-color);
}

/* Start screen spécifique */
.main-screen {
    color: #fff;
    text-align: center;
}

/* Titres */
.main-screen .main-screen-title {
    font-family: var(--arc-font); font-weight: 900;
    font-size: 3rem;
    margin-bottom: 1rem;
    color: rgb(247, 76, 76);
}

.main-screen h2 {
    font-family: var(--arc-font); font-weight: 800;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #f87777ff;
}

/* Game screen spécifique */
.game-screen {
    color: #fff;
    text-align: center;
}

.game-screen h2 {
    font-family: var(--arc-font); font-weight: 800;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #f87777ff;
}

/* Bouton Start */
.start-button {
    font-family: var(--arc-font); font-weight: 900;
    font-size: 1.5rem;
    color: #fff;
    background-color: rgb(247, 76, 76);
    border: 0;
    border-radius: 12px;
    padding: 1rem 2rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.start-button:hover {
    background-color: #d14848ff;
}

@media (max-width: 480px) {
  .game-screen h2 {
    font-size: 1.5rem;
  }
}

/* ============ Blackjack Savoyard (pure Live Component) ============
   Chalet card table in CSS (felt + larch rim), cards with Gemini court
   figures and back (public/game/blackjack/img). New cards slide in (ids
   carry the hand number, so only new cards animate), the hole card flips. */
.bj-table {
  --bj-card-w: 84px;
  --bj-card-h: 118px;
  position: relative;
  padding: 0.9rem 1rem 1.1rem;
  border: 12px solid #9b6431;
  border-radius: 44px;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(255, 255, 255, 0.09), transparent 60%),
    radial-gradient(ellipse at 50% 50%, #2e7a4e 0%, #1f6140 55%, #164b30 100%);
  box-shadow:
    inset 0 0 0 3px #e9d3a1,
    inset 0 10px 30px rgba(0, 0, 0, 0.35),
    0 0 0 3px var(--arc-edge),
    6px 8px 0 3px var(--arc-edge);
  color: #fdf7e8;
  overflow: hidden;
}

/* Printed cream arc, like a real felt. */
.bj-table::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 50%;
  height: 30%;
  border: 3px solid rgba(240, 225, 185, 0.45);
  border-bottom: 0;
  border-left-color: transparent;
  border-right-color: transparent;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  pointer-events: none;
}

.bj-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.bj-pill {
  background: var(--arc-night, #14111f);
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  white-space: nowrap;
}

.bj-pill.is-score {
  background: var(--arc-gold, #f2c230);
  color: #14111f;
}

.bj-recap {
  display: flex;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bj-dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.35);
}

.bj-dot.is-current { border-color: var(--arc-gold, #f2c230); }
.bj-dot.is-win,
.bj-dot.is-dealer_bust { background: #7fd67f; border-color: #7fd67f; }
.bj-dot.is-blackjack { background: var(--arc-gold, #f2c230); border-color: #fff4c2; }
.bj-dot.is-push { background: #d8d2c4; border-color: #d8d2c4; }
.bj-dot.is-lose,
.bj-dot.is-bust,
.bj-dot.is-dealer_blackjack { background: #e0505f; border-color: #e0505f; }

.bj-zone {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bj-zone.is-dealer {
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-top: 0.4rem;
}

.bj-dealer {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bj-portrait {
  width: 104px;
  height: auto;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.35));
}

.bj-name {
  font-size: 0.95rem;
  font-weight: 700;
  margin: -0.4rem 0 0;
  background: #c8102e;
  color: #fff;
  padding: 0.1rem 0.7rem;
  border-radius: 6px;
}

.bj-zone.is-dealer .bj-total {
  flex-basis: 100%;
  text-align: center;
}

.bj-hand {
  display: flex;
  justify-content: center;
  min-height: var(--bj-card-h);
  padding-left: calc(var(--bj-card-w) * 0.3);
}

.bj-total {
  margin: 0.35rem 0 0;
  font-weight: 600;
  font-size: 1.05rem;
}

.bj-tag {
  margin-left: 0.4rem;
  background: var(--arc-gold, #f2c230);
  color: #14111f;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 4px;
  padding: 0.05rem 0.4rem;
}

/* Cards overlap a little, like on a real table. */
.bj-card {
  position: relative;
  flex: 0 0 auto;
  width: var(--bj-card-w);
  height: var(--bj-card-h);
  margin-left: calc(var(--bj-card-w) * -0.3);
  background: #fffdf6;
  border: 1px solid #c9bfa8;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  animation: bj-deal 0.38s cubic-bezier(0.2, 0.8, 0.3, 1.1) both;
  animation-delay: calc(var(--i, 0) * 0.22s);
}

.bj-card.is-red { color: #c8102e; }
.bj-card.is-black { color: #1d1b26; }

.bj-card.is-back {
  background: #a3232c url("/game/blackjack/img/back.webp?v=1") center / cover no-repeat;
  border-color: #6d1219;
}

.bj-card.is-flip { animation-name: bj-flip; animation-duration: 0.45s; }

.bj-idx {
  position: absolute;
  top: 4px;
  left: 6px;
  font-size: 1.05rem;
  line-height: 1;
  text-align: center;
}

.bj-idx span {
  display: block;
  font-size: 0.85rem;
}

.bj-idx-b {
  top: auto;
  left: auto;
  bottom: 4px;
  right: 6px;
  transform: rotate(180deg);
}

.bj-pip {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.3rem;
}

.bj-pip.is-ace { font-size: 3.4rem; }

.bj-face {
  position: absolute;
  left: 14%;
  right: 14%;
  top: 14%;
  bottom: 10%;
  width: 72%;
  height: 76%;
  object-fit: contain;
  object-position: bottom;
}

.bj-banner {
  position: relative;
  z-index: 2;
  min-height: 2.6rem;
  margin: 0.5rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-size: 1.15rem;
}

.bj-banner.is-shown {
  width: fit-content;
  max-width: 100%;
  padding: 0.3rem 1rem;
  border-radius: 999px;
  border: 2px solid var(--arc-edge);
  background: #fdf7e8;
  color: #14111f;
  box-shadow: 3px 3px 0 var(--arc-edge);
  animation: bj-pop 0.35s ease-out both;
  animation-delay: 0.3s;
}

.bj-banner.is-good { background: #e5f6dc; }
.bj-banner.is-bad { background: #fde3e5; }

.bj-delta {
  font-weight: 800;
  font-size: 1.25rem;
}

.bj-banner.is-good .bj-delta { color: #2f8a3a; }
.bj-banner.is-bad .bj-delta { color: #c8102e; }

.bj-actions {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.bj-btn {
  min-width: 8rem;
  padding: 0.6rem 1.2rem;
  font-weight: 800;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #14111f;
  background: #fdf7e8;
  border: 2px solid var(--arc-edge);
  border-radius: 12px;
  box-shadow: 4px 4px 0 var(--arc-edge);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.bj-btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--arc-edge); }
.bj-btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--arc-edge); }
.bj-btn:focus-visible { outline: 3px solid var(--arc-gold, #f2c230); outline-offset: 2px; }
.bj-btn.is-gold { background: var(--arc-gold, #f2c230); }
.bj-btn.is-red { background: #c8102e; color: #fff; }

.bj-help {
  position: relative;
  z-index: 1;
  margin: 0.7rem auto 0;
  max-width: 34rem;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(253, 247, 232, 0.85);
}

@keyframes bj-deal {
  from { opacity: 0; transform: translate(120px, -90px) rotate(18deg); }
  to { opacity: 1; transform: none; }
}

@keyframes bj-flip {
  0% { transform: rotateY(90deg); }
  100% { transform: rotateY(0); }
}

@keyframes bj-pop {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 575.98px) {
  .bj-table {
    --bj-card-w: 62px;
    --bj-card-h: 88px;
    border-width: 8px;
    border-radius: 28px;
    padding: 0.7rem 0.5rem 0.9rem;
  }
  .bj-portrait { width: 78px; }
  .bj-pip { font-size: 1.8rem; }
  .bj-pip.is-ace { font-size: 2.6rem; }
  .bj-idx { font-size: 0.85rem; left: 4px; }
  .bj-idx-b { right: 4px; }
  .bj-btn { min-width: 0; flex: 1 1 0; padding: 0.55rem 0.6rem; font-size: 0.95rem; }
  .bj-pill { font-size: 0.85rem; padding: 0.2rem 0.6rem; }
  .bj-dot { width: 0.6rem; height: 0.6rem; }
}

/* Mobile: réduire le texte des questions et boutons pour mieux remplir l'écran */
@media (max-width: 767.98px) {
  .question {
    font-size: 1rem;
    padding: 0.5rem;
    min-height: 80px;
    margin-bottom: 0.75rem;
  }

  .option-btn {
    font-size: 1rem;
    min-height: 90px;
    padding: 10px;
  }

  .main-screen {
    padding-top: 2.5rem;
  }

  .main-screen .main-screen-title {
    font-size: 2rem;
  }

  .main-screen h2 {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
  }

  .start-button {
    font-size: 1.15rem;
    padding: 0.75rem 1.25rem;
  }
}

/* End-of-game signup CTA for anonymous players. Uses the score they just
   earned as the hook ("you got X points, save them!") instead of generic
   login/register buttons. Primary action (Register) is bold red, secondary
   (Login) is an inline text link. */
.end-cta {
  background: var(--bs-tertiary-bg);
  border-radius: 14px;
  padding: 1.5rem 1.25rem;
  margin: 0 auto 2rem;
  max-width: 520px;
  text-align: center;
  border: 2px solid var(--bs-danger);
}

.end-cta-message {
  font-size: 1.05rem;
  line-height: 1.45;
  margin: 0 0 1.25rem;
}

.end-cta-message strong {
  font-family: var(--arc-font); font-weight: 800;
  color: var(--arc-red-text);
  font-size: 1.4rem;
  letter-spacing: 0.02em;
}

.end-cta-primary {
  display: inline-block;
  background: var(--bs-danger);
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  padding: 0.85rem 1.5rem;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.35);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.end-cta-primary:hover,
.end-cta-primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(220, 53, 69, 0.45);
  color: #fff;
  text-decoration: none;
  outline: none;
}

.end-cta-secondary {
  font-size: 0.95rem;
  color: var(--bs-secondary-color);
  margin: 1rem 0 0;
}

.end-cta-secondary a {
  color: var(--arc-red-text);
  font-weight: 600;
  text-decoration: none;
}

.end-cta-secondary a:hover {
  text-decoration: underline;
}

/* Rebus — image puzzle layout. Cards arranged inline with "+" separators.
   The prompt itself reuses the global .question class so the text scale matches
   every other game (Proverb, Quiz, Postal Code, …). */
.rebus-round {
  text-align: center;
}

.rebus-images {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1rem;
  margin: 0 auto 1.5rem;
  padding: 1rem;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  max-width: 720px;
}

.rebus-images img {
  max-height: 140px;
  max-width: 32%;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 0.25rem;
}

.rebus-plus {
  font-family: var(--arc-font); font-weight: 800;
  font-size: 2rem;
  color: var(--arc-red-text);
  line-height: 1;
}

.rebus-category {
  margin-bottom: 1.25rem;
  font-size: 1.15rem;
}

.rebus-form {
  max-width: 480px;
  margin: 0 auto;
}

.rebus-input {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  margin-bottom: 1rem;
}

.rebus-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.rebus-skip {
  font-size: 1.15rem;
  color: var(--bs-secondary-color);
  background: none;
  border: 0;
  padding: 0.4rem 1rem;
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.rebus-skip:hover {
  color: var(--bs-body-color);
}

/* Anagramme Savoie — scrambled letter display + answer form. Shares the
   .rebus-skip style for consistency. */
.word-scramble-round {
  text-align: center;
}

.word-scramble-category {
  margin-bottom: 1.25rem;
  font-size: 1.15rem;
}

.word-scramble-scrambled {
  font-family: var(--arc-font); font-weight: 800;
  font-size: 2.5rem;
  letter-spacing: 0.25em;
  color: var(--arc-red-text);
  background: var(--bs-body-bg);
  border: 2px dashed var(--bs-border-color);
  border-radius: 12px;
  padding: 1.25rem 1rem;
  margin: 0 auto 1.5rem;
  max-width: 720px;
  text-align: center;
  word-break: break-word;
}

.word-scramble-form {
  max-width: 480px;
  margin: 0 auto;
}

.word-scramble-input {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  margin-bottom: 1rem;
}

.word-scramble-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

@media (max-width: 575.98px) {
  .word-scramble-scrambled {
    font-size: 1.6rem;
    letter-spacing: 0.15em;
    padding: 0.85rem 0.5rem;
  }
}

@media (max-width: 575.98px) {
  .rebus-images {
    gap: 0.4rem 0.6rem;
    padding: 0.75rem;
  }
  .rebus-images img {
    max-height: 90px;
  }
  .rebus-plus {
    font-size: 1.5rem;
  }
}

/* ============ Le Bûcher du Chalet (Phaser hybrid, falling-block puzzle) ============ */
.bucher-frame {
  text-align: center;
}

.bucher-canvas {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: #3a2a1c;
  border-radius: 12px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.bucher-howto {
  max-width: 800px;
  margin: 0.75rem auto 0;
  text-align: left;
}

.bucher-goal,
.bucher-how {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

/* ============ La Désalpe du Beaufortain (Phaser hybrid, rhythm) ============ */
.desalpe-frame {
  text-align: center;
}

.desalpe-canvas {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: #9fd0ef;
  border-radius: 12px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.desalpe-howto {
  max-width: 800px;
  margin: 0.75rem auto 0;
  text-align: left;
}

.desalpe-daily {
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.desalpe-daily.is-full {
  color: var(--arc-red, #c8102e);
}

.desalpe-goal,
.desalpe-how {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

/* ============ Marmotte Savoyarde (Phaser hybrid, photo safari) ============ */
.catch-marmot-frame {
  text-align: center;
}

.catch-marmot-canvas {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: #9fd0ef;
  border-radius: 12px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: crosshair;
}

.catch-marmot-howto {
  max-width: 800px;
  margin: 0.75rem auto 0;
  text-align: left;
}

.catch-marmot-goal,
.catch-marmot-how {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

/* ================= Biathlon 92 (Phaser hybrid) ================= */
.biathlon-frame {
  text-align: center;
}

.biathlon-canvas {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: #cfe6f7;
  border-radius: 12px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.biathlon-controls {
  font-size: 0.95rem;
}

.biathlon-touch-controls {
  display: none;
  margin: 1rem auto 1.5rem;
  max-width: 800px;
  padding: 0 0.75rem;
  justify-content: space-between;
  align-items: center;
}

@media (pointer: coarse), (max-width: 767.98px) {
  .biathlon-touch-controls {
    display: flex;
  }
}

.bi-btn {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 3px solid var(--arc-edge, #14111f);
  background: #13386b;
  color: #fff;
  font-size: 1.8rem;
  font-weight: bold;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 4px 4px 0 var(--arc-edge, #14111f);
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.bi-btn-fire {
  background: #c8102e;
}

.bi-btn.is-pressed {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--arc-edge, #14111f);
}

/* ============ Curling de Pralognan (Phaser hybrid) ============ */
.curling-frame {
  text-align: center;
}

.curling-canvas {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: #1d1830;
  border-radius: 12px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.curling-howto {
  max-width: 800px;
  margin: 0.75rem auto 0;
  text-align: left;
}

.curling-goal,
.curling-how {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.curling-touch-controls {
  display: none;
  margin: 1rem auto 0.5rem;
  max-width: 800px;
  padding: 0 0.75rem;
  justify-content: center;
  align-items: center;
}

@media (pointer: coarse), (max-width: 767.98px) {
  .curling-touch-controls {
    display: flex;
  }
}

.cu-btn {
  min-width: 84px;
  height: 84px;
  padding: 0 1rem;
  border-radius: 42px;
  border: 3px solid var(--arc-edge, #14111f);
  background: #13386b;
  color: #fff;
  font-size: 1.8rem;
  font-weight: bold;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 4px 4px 0 var(--arc-edge, #14111f);
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.cu-btn-main {
  background: #c8102e;
  min-width: 150px;
  font-size: 1.3rem;
}

.cu-btn.is-pressed {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--arc-edge, #14111f);
}

/* "How to play" text by input type, same test as the in-canvas hints
   (pointer: coarse or narrow screen → touch wording). */
.howto-coarse {
  display: none;
}

@media (pointer: coarse), (max-width: 767.98px) {
  .howto-fine {
    display: none;
  }

  .howto-coarse {
    display: inline;
  }
}

/* ============ Raclette Express (Phaser hybrid) ============ */
.raclette-frame {
  text-align: center;
}

.raclette-canvas {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: #3b2416;
  border-radius: 12px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: crosshair;
}

.raclette-howto {
  max-width: 800px;
  margin: 0.75rem auto 0;
  text-align: left;
}

.raclette-goal,
.raclette-how {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

/* ============ Descente des Arcs (Phaser hybrid) ============ */
.vtt-frame {
  text-align: center;
}

.vtt-canvas {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: #5aa6e8;
  border-radius: 12px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: pointer;
}

.vtt-howto {
  max-width: 800px;
  margin: 0.75rem auto 0;
  text-align: left;
}

.vtt-goal,
.vtt-how {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

/* ============ Régate d'Aiguebelette (Phaser hybrid) ============ */
.aviron-frame {
  text-align: center;
}

.aviron-canvas {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: #4f8fc9;
  border-radius: 12px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: pointer;
}

.aviron-howto {
  max-width: 800px;
  margin: 0.75rem auto 0;
  text-align: left;
}

.aviron-goal,
.aviron-how {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

/* ============ Montée du Galibier (Phaser hybrid) ============ */
.galibier-frame {
  text-align: center;
}

.galibier-canvas {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: #8fc3e8;
  border-radius: 12px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: pointer;
}

.galibier-howto {
  max-width: 800px;
  margin: 0.75rem auto 0;
  text-align: left;
}

.galibier-goal,
.galibier-how {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

/* ============ Bob de La Plagne (Phaser hybrid) ============ */
.bobsleigh-frame {
  text-align: center;
}

.bobsleigh-canvas {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: #bcd9ef;
  border-radius: 12px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: pointer;
}

.bobsleigh-howto {
  max-width: 800px;
  margin: 0.75rem auto 0;
  text-align: left;
}

.bobsleigh-goal,
.bobsleigh-how {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

/* ============ La Grande Évasion des Éléphants (Phaser hybrid) ============ */
.elephants-frame {
  text-align: center;
}

.elephants-canvas {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: #9cd0ef;
  border-radius: 12px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: pointer;
}

.elephants-howto {
  max-width: 800px;
  margin: 0.75rem auto 0;
  text-align: left;
}

.elephants-goal,
.elephants-how {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

/* ============ Parapente au Revard (Phaser hybrid) ============ */
.parapente-frame {
  text-align: center;
}

.parapente-canvas {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: #8ec5ea;
  border-radius: 12px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: pointer;
}

.parapente-howto {
  max-width: 800px;
  margin: 0.75rem auto 0;
  text-align: left;
}

.parapente-goal,
.parapente-how {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

/* ============ Le Flipper de la Vanoise (Phaser hybrid) ============ */
.flipper-frame {
  text-align: center;
}

.flipper-canvas {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: #0f1630;
  border-radius: 12px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: pointer;
}

.flipper-howto {
  max-width: 800px;
  margin: 0.75rem auto 0;
  text-align: left;
}

.flipper-goal,
.flipper-how {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

/* ============ La Tournée de Noël (Phaser hybrid) ============ */
.noel-frame {
  text-align: center;
}

.noel-canvas {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: #10183a;
  border-radius: 12px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: pointer;
}

.noel-howto {
  max-width: 800px;
  margin: 0.75rem auto 0;
  text-align: left;
}

.noel-goal,
.noel-how {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

/* ============ La Pile de Beaufort (Phaser hybrid) ============ */
.beaufort-frame {
  text-align: center;
}

.beaufort-canvas {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: #2a2230;
  border-radius: 12px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: pointer;
}

.beaufort-howto {
  max-width: 800px;
  margin: 0.75rem auto 0;
  text-align: left;
}

.beaufort-goal,
.beaufort-how {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

/* ============ Pêche au lac du Bourget (Phaser hybrid) ============ */
.peche-frame {
  text-align: center;
}

.peche-canvas {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: #7cc3e8;
  border-radius: 12px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: pointer;
}

.peche-howto {
  max-width: 800px;
  margin: 0.75rem auto 0;
  text-align: left;
}

.peche-goal,
.peche-how {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

/* ============ Tremplin du Praz (Phaser hybrid) ============ */
.tremplin-frame {
  text-align: center;
}

.tremplin-canvas {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: #6fb3ea;
  border-radius: 12px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: pointer;
}

.tremplin-howto {
  max-width: 800px;
  margin: 0.75rem auto 0;
  text-align: left;
}

.tremplin-goal,
.tremplin-how {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

/* ============ Via Ferrata du Diable (Phaser hybrid) ============ */
.via-ferrata-frame {
  text-align: center;
}

.via-ferrata-canvas {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: #2b2438;
  border-radius: 12px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.via-ferrata-howto {
  max-width: 800px;
  margin: 0.75rem auto 0;
  text-align: left;
}

.via-ferrata-goal,
.via-ferrata-how {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.via-ferrata-touch-controls {
  display: none;
  margin: 1rem auto 0.5rem;
  max-width: 800px;
  padding: 0 0.75rem;
  justify-content: space-between;
  gap: 1rem;
}

@media (pointer: coarse), (max-width: 767.98px) {
  .via-ferrata-touch-controls {
    display: flex;
  }
}

.vf-btn {
  flex: 1;
  max-width: 180px;
  height: 84px;
  border-radius: 42px;
  border: 3px solid var(--arc-edge, #14111f);
  background: #c8102e;
  color: #fff;
  font-size: 2rem;
  font-weight: bold;
  line-height: 1;
  box-shadow: 4px 4px 0 var(--arc-edge, #14111f);
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.vf-btn.is-pressed {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--arc-edge, #14111f);
}

/* ============ Challes Sky Rush — planeur (Phaser hybrid) ============ */
.planeur-frame {
  text-align: center;
}

.planeur-canvas {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: #9fd0f0;
  border-radius: 12px;
  overflow: hidden;
  touch-action: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.planeur-controls {
  font-size: 0.95rem;
}

/* ===================== Slalom (Phaser hybrid) ===================== */
.slalom-frame {
  text-align: center;
}

.slalom-canvas {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  background: #dff1fb;
  border-radius: 12px;
  overflow: hidden;
  touch-action: none;
}

.slalom-controls {
  font-size: 0.95rem;
}

.slalom-touch-controls {
  display: none;
  margin: 1rem auto 1.5rem;
  max-width: 800px;
  padding: 0 0.75rem;
  justify-content: space-between;
  align-items: center;
}

@media (pointer: coarse), (max-width: 767.98px) {
  .slalom-touch-controls {
    display: flex;
  }
}

.sl-btn {
  pointer-events: auto;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid rgba(19, 56, 107, 0.6);
  background: rgba(19, 56, 107, 0.55);
  color: #fff;
  font-size: 1.7rem;
  font-weight: bold;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background-color 0.05s ease, transform 0.05s ease;
}

.sl-btn:active,
.sl-btn.is-pressed {
  background: rgba(220, 53, 69, 0.85);
  transform: scale(0.95);
}

/* ========================================================================
   ARCADE MODERNE — game pages (redesign step 6). Visual only: no change to
   game logic, live actions or anti-cheat. Tokens come from app.css.
   ======================================================================== */

/* The game board = an arcade cabinet: ink edge, red hard shadow. */
.game-board > .card {
    border: 3px solid var(--arc-edge);
    border-radius: 16px;
    box-shadow: 7px 7px 0 var(--arc-red);
}
.game-board .thumbnail-game {
    border: 3px solid var(--arc-edge);
    box-shadow: 6px 6px 0 var(--arc-edge);
}

/* Start / end screens: readable on the card surface in both themes
   (was white text + pink titles on a light card). */
.main-screen,
.game-screen {
    color: var(--bs-body-color);
}
.main-screen .main-screen-title {
    /* Game titles are long SEO strings: Rubik, not the pixel font. */
    font-family: var(--arc-font);
    font-weight: 900;
    font-size: clamp(1.7rem, 3.4vw, 2.6rem);
    line-height: 1.15;
    /* Clean ink (light) / white (dark): the red offset shadow behind the
       letters was dropped site-wide, it looked smeared. */
    color: var(--bs-emphasis-color);
    text-shadow: none;
}
.main-screen h2,
.game-screen h2 {
    color: var(--bs-body-color);
    font-weight: 700;
    font-size: 1.35rem;
    line-height: 1.4;
}

/* PRESS START. */
.start-button {
    background: var(--arc-red);
    color: #fff;
    border: 3px solid var(--arc-edge);
    border-radius: 10px;
    box-shadow: 5px 5px 0 var(--arc-edge);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: transform 0.08s, box-shadow 0.08s, background-color 0.15s;
}
.start-button:hover {
    background: var(--arc-red-hover);
    transform: translate(2px, 2px);
    box-shadow: 3px 3px 0 var(--arc-edge);
}
.start-button:active {
    transform: translate(5px, 5px);
    box-shadow: none;
}
.start-button:focus-visible {
    outline: 3px solid var(--arc-focus);
    outline-offset: 3px;
}

/* Answer buttons: chunky arcade keys. */
.option-btn {
    background: var(--arc-red);
    color: #fff;
    border: 3px solid var(--arc-edge);
    border-radius: 12px;
    box-shadow: 5px 5px 0 var(--arc-edge);
    transition: transform 0.08s, box-shadow 0.08s, background-color 0.15s;
}
.option-btn:hover {
    background: var(--arc-red-hover);
    transform: translate(2px, 2px);
    box-shadow: 3px 3px 0 var(--arc-edge);
}
.option-btn:active {
    transform: translate(5px, 5px);
    box-shadow: none;
}
.option-btn:focus-visible {
    outline: 3px solid var(--arc-focus);
    outline-offset: 3px;
}
.option-letters {
    background: var(--arc-gold);
    color: var(--arc-night);
    border: 3px solid var(--arc-edge);
    border-radius: 10px;
    box-shadow: 3px 3px 0 var(--arc-edge);
    font-weight: 800;
}

/* Score line. */
.stats {
    font-variant-numeric: tabular-nums;
}

/* Anonymous end-of-game CTA. */
.end-cta {
    border: 3px solid var(--arc-edge);
    box-shadow: 6px 6px 0 var(--arc-red);
}
.end-cta-message strong {
    color: var(--bs-link-color);
}
.end-cta-primary {
    background: var(--arc-red);
    border: 2px solid var(--arc-edge);
    border-radius: 8px;
    box-shadow: 4px 4px 0 var(--arc-edge);
}
.end-cta-primary:hover,
.end-cta-primary:focus-visible {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 var(--arc-edge);
}
.end-cta-secondary a {
    color: var(--bs-link-color);
}

/* Rebus / word scramble boards. */
.rebus-images,
.word-scramble-scrambled {
    border: 3px solid var(--arc-edge);
    border-radius: 12px;
    box-shadow: 5px 5px 0 var(--arc-edge);
}
.rebus-plus,
.word-scramble-scrambled {
    color: var(--bs-link-color);
}

/* Flex item holding the game: without min-width:0 it can't shrink below
   its content, so a Phaser canvas (800 px intrinsic) could push the page
   wider than a phone screen. */
.game-main {
    min-width: 0;
}

/* Arcade canvases (Slalom, Catch Marmot, Challes Sky Rush). */
.slalom-canvas,
.planeur-canvas,
.biathlon-canvas,
.curling-canvas,
.via-ferrata-canvas,
.raclette-canvas,
.vtt-canvas,
.tremplin-canvas,
.beaufort-canvas,
.peche-canvas,
.aviron-canvas,
.galibier-canvas,
.noel-canvas,
.bobsleigh-canvas,
.elephants-canvas,
.flipper-canvas,
.catch-marmot-canvas,
.desalpe-canvas,
.bucher-canvas,
.parapente-canvas {
    border: 3px solid var(--arc-edge);
    border-radius: 12px;
    box-shadow: 6px 6px 0 var(--arc-edge);
}

/* ===================== Fullscreen play (Phaser arcade games) =====================
   fullscreen_controller.js puts .game-fs on .game-board (native Fullscreen API,
   or "pseudo" fixed overlay on iPhone) and .game-fs-lock on <html>. Hooks in
   the game template: .fs-stage (frame) > .fs-canvas (Phaser parent), .fs-touch
   (on-screen buttons), .fs-hide (instructions), .fs-toggle + .fs-rotate-hint
   (partial). */
.fs-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.75rem auto 0;
    padding: 0.35rem 0.8rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bs-body-color);
    background: var(--bs-tertiary-bg);
    border: 2px solid var(--arc-edge);
    border-radius: 8px;
    box-shadow: 3px 3px 0 var(--arc-edge);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.fs-toggle .fs-icon-exit,
.fs-toggle .fs-label-exit,
.fs-rotate-hint,
.fs-install-tip {
    display: none;
}

.fs-ios-browser .fs-install-tip {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.75rem;
    font-weight: 500;
}

html.game-fs-lock,
html.game-fs-lock body {
    overflow: hidden;
    overscroll-behavior: none;
}

.game-board.game-fs {
    position: fixed;
    inset: 0;
    z-index: 1090;
    width: 100%;
    max-width: none;
    height: 100%;
    margin: 0;
    padding: 0 !important;
    background: var(--arc-night);
}

.game-board.game-fs > :not(.card),
.game-fs .game-thumb {
    display: none !important;
}

.game-board.game-fs > .card {
    height: 100%;
    min-height: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.game-fs .fs-stage {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    background: var(--arc-night);
}

/* !important on height: the Phaser controllers set an inline width-based
   height; in fullscreen the box is the viewport and Scale.FIT letterboxes. */
.game-fs .fs-canvas {
    width: 100%;
    max-width: none;
    height: 100% !important;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

/* Phaser centres with margins: an inline canvas would also inherit the
   frame's text-align:center and drift off-centre. */
.game-fs .fs-canvas canvas {
    display: block;
}

/* Instructions under the canvas: the game is already explained in-canvas. */
.game-fs .fs-hide {
    display: none !important;
}

/* Thumbs: buttons float in the bottom corners (in the letterbox side bars
   on a landscape phone). */
.game-fs .fs-touch {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(16px + env(safe-area-inset-bottom));
    margin: 0;
    max-width: none;
    padding: 0 calc(16px + env(safe-area-inset-right)) 0 calc(16px + env(safe-area-inset-left));
    pointer-events: none;
}

.game-fs .fs-touch button {
    pointer-events: auto;
}

@media (orientation: landscape) {
    .game-fs .fs-touch .sl-btn {
        width: 84px;
        height: 84px;
    }
}

/* Biathlon: ◀ ▶ under the thumbs, 🎯 stacked above ▶ (right thumb) instead
   of bottom-centre over the track. */
.game-fs .biathlon-touch-controls .bi-btn-fire {
    position: absolute;
    right: calc(16px + env(safe-area-inset-right));
    bottom: 100px;
}

/* Via ferrata: wide pills → thumb-sized round buttons in the side bars. */
.game-fs .via-ferrata-touch-controls .vf-btn {
    flex: none;
    width: 84px;
}

/* Curling: single action (the canvas tap does it too) → right thumb. */
.game-fs .curling-touch-controls {
    justify-content: flex-end;
}

.game-fs .curling-touch-controls .cu-btn-main {
    min-width: 88px;
    padding: 0 0.5rem;
    font-size: 0.9rem;
}

.game-fs .fs-toggle {
    position: absolute;
    top: calc(10px + env(safe-area-inset-top));
    right: calc(10px + env(safe-area-inset-right));
    z-index: 2;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    justify-content: center;
    color: #fff;
    background: rgba(20, 17, 31, 0.6);
    border-color: #4a4166;
    border-radius: 50%;
    box-shadow: none;
}

.game-fs .fs-toggle .fs-icon-enter,
.game-fs .fs-toggle .fs-label-enter {
    display: none;
}

.game-fs .fs-toggle .fs-icon-exit {
    display: inline;
}

/* Exit label stays the accessible name, visually hidden on the round button. */
.game-fs .fs-toggle .fs-label-exit {
    display: inline;
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

@media (orientation: portrait) and (pointer: coarse) {
    .game-fs .fs-rotate-hint {
        display: block;
        position: absolute;
        top: calc(10px + env(safe-area-inset-top));
        left: calc(10px + env(safe-area-inset-left));
        right: calc(60px + env(safe-area-inset-right));
        margin: 0;
        padding: 0.45rem 0.8rem;
        font-size: 0.85rem;
        line-height: 1.25;
        text-align: center;
        font-weight: 600;
        color: var(--arc-night);
        background: var(--arc-gold);
        border-radius: 999px;
    }
}

/* Start screen: short name as the title, the description as a lighter pitch,
   airy rhythm (title / pitch / records / start), centred against the poster. */
.main-screen .start-title {
    font-size: clamp(2rem, 4.2vw, 3rem);
    margin-bottom: 1rem;
}
.main-screen:has(.start-title) .game-records {
    margin: 2rem 0 2.25rem;
}
@media (min-width: 992px) {
    .game-main:has(.start-title) {
        align-self: stretch;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .game-main:has(.start-title) > .main-screen {
        padding-bottom: 0 !important;
    }
    .main-screen:has(.start-title) .start-title {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}
.main-screen h2.start-pitch {
    max-width: 34em;
    margin: 0 auto;
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--bs-secondary-color);
}

/* Records (start + end screens): own record, 30 days, all time. Paper
   chips like the quick links; the value in bold, the holder underneath. */
.game-records {
    margin: 1.25rem 0 1.5rem;
}
.game-records-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.game-records {
    text-align: center;
}
.game-records-list {
    justify-content: center;
}
.game-record {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 8.5rem;
    padding: 0.45rem 0.85rem;
    background: var(--bs-tertiary-bg);
    border: 2px solid var(--arc-edge);
    border-radius: 8px;
    box-shadow: 3px 3px 0 var(--arc-edge);
    line-height: 1.25;
}
.game-record-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--bs-secondary-color);
}
.game-record-value {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--bs-emphasis-color);
}
.game-record-holder {
    font-size: 0.8rem;
    color: var(--bs-secondary-color);
    overflow-wrap: anywhere;
}
.game-record-all {
    border-color: var(--arc-gold);
    box-shadow: 3px 3px 0 var(--arc-edge);
}
.game-records-none,
.game-records-login {
    margin: 0.5rem 0 0;
    font-weight: 700;
}
.game-records-login a {
    color: var(--bs-link-color);
}
/* End screen: title from the result, the score as the hero (count-up),
   the gap to beat, then the records. */
.end-hero {
    padding: 2.5rem 0.5rem 0.5rem;
}
@media (min-width: 992px) {
    .end-hero {
        padding-top: 3rem;
    }
}
/* Reviews under the game (games/_reviews_block.html.twig): quote cards in a
   row (stacked on mobile), folded form. */
.game-reviews {
    padding: 1.25rem 1.5rem;
    background: var(--bs-tertiary-bg);
    border: 2px solid var(--arc-edge);
    border-radius: 12px;
    box-shadow: 4px 4px 0 var(--arc-edge);
}
.game-reviews-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.game-review-quote {
    margin: 0;
    padding: 0.6rem 0.85rem;
    border-left: 3px solid var(--arc-gold);
    background: var(--bs-body-bg);
    border-radius: 0 8px 8px 0;
}
.game-review-quote p {
    margin: 0 0 0.25rem;
}
.game-review-quote footer {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--bs-secondary-color);
}
.game-review-form > summary {
    display: inline-block;
    list-style: none;
}
.game-review-form > summary::-webkit-details-marker {
    display: none;
}
.game-review-form[open] > summary {
    display: none;
}
.end-review-link {
    text-align: center;
    font-weight: 700;
}
.end-trophy {
    color: var(--arc-red);
    margin-bottom: 0.5rem;
}
.end-trophy-all,
.end-trophy-month {
    color: var(--arc-gold);
    filter: drop-shadow(2px 2px 0 var(--arc-edge));
}
.main-screen .end-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin-bottom: 0.75rem;
}
.end-score {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    min-width: 12rem;
    padding: 0.75rem 1.75rem 0.9rem;
    background: var(--bs-tertiary-bg);
    border: 3px solid var(--arc-edge);
    border-radius: 12px;
    box-shadow: 5px 5px 0 var(--arc-edge);
}
.end-score-label {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
}
.end-score-value {
    font-size: clamp(3rem, 7vw, 4.25rem);
    font-weight: 900;
    line-height: 1;
    color: var(--bs-emphasis-color);
    font-variant-numeric: tabular-nums;
}
.end-score-unit {
    font-size: 0.4em;
    font-weight: 800;
    color: var(--bs-secondary-color);
}
.end-score-detail {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--bs-secondary-color);
}
.end-score .record-gap {
    margin-top: 0.25rem;
    padding: 0.15rem 0.7rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--arc-night);
    background: var(--arc-gold);
    border-radius: 999px;
}

/* Start screen quick links (mobile/tablet, d-lg-none): the page menu is
   below the fold there. Paper chips like the site's outline buttons. */
.start-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1.75rem;
}
.start-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 44px;
    padding: 0.4rem 0.9rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--bs-body-color);
    text-decoration: none;
    background: var(--bs-tertiary-bg);
    border: 2px solid var(--arc-edge);
    border-radius: 8px;
    box-shadow: 3px 3px 0 var(--arc-edge);
}
.start-links a:hover,
.start-links a:focus-visible {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 var(--arc-edge);
}

/* Favorite pill on the start / end screens (logged-in players). */
.favorite-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.75rem 0.5rem 0;
    padding: 0.35rem 0.9rem;
    font-family: var(--arc-font);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--bs-body-color);
    background: var(--bs-body-bg);
    border: 2px solid var(--arc-edge);
    border-radius: 999px;
    box-shadow: 3px 3px 0 var(--arc-edge);
    cursor: pointer;
}
.favorite-pill [data-favorite-target="star"] {
    font-size: 1.1rem;
    line-height: 1;
    color: var(--arc-gold);
    -webkit-text-stroke: 1px var(--arc-edge);
}
.favorite-pill.is-favorited {
    background: var(--arc-gold);
    color: var(--arc-night);
}
.favorite-pill.is-favorited [data-favorite-target="star"] {
    color: var(--arc-night);
    -webkit-text-stroke: 0;
}
.favorite-pill:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 var(--arc-edge);
}
.favorite-pill:focus-visible {
    outline: 3px solid var(--arc-focus);
    outline-offset: 2px;
}
.game-fav {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 2;
}
/* The star alone, round (like the catalogue cards); the label stays as the
   button's aria-label for screen readers. */
.game-fav .favorite-pill {
    margin: 0;
    width: 42px;
    height: 42px;
    padding: 0;
    justify-content: center;
}
.game-fav .favorite-pill [data-favorite-target="label"] {
    display: none;
}
.game-fav .favorite-pill [data-favorite-target="star"] {
    font-size: 1.4rem;
}
/* Phones: below the fixed focus bar (55px) that tops the game card. */
@media (max-width: 767.98px) {
    .game-fav {
        top: calc(55px + 0.6rem);
    }
}
