/* A small saved-result acknowledgement, not a win celebration. */
.two-hit-acknowledgement {
  color: #684024;
  font-size: clamp(12px, 2.8vw, 16px);
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
  animation: two-hit-emphasis 1.1s ease-out both;
}
.two-hit-acknowledgement[hidden] { display: none; }
.two-hit-acknowledgement.is-static { animation: none; }
@keyframes two-hit-emphasis {
  0% { opacity: 0; transform: translateY(2px); }
  18%, 85% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .two-hit-acknowledgement { animation: none; }
}
/* game-layout.css — compact responsive play layout. Loaded after page themes;
   the independently styled appearance picker still loads last.
   #gameApp prefix out-ranks theme-scoped container/masthead sizing so every
   appearance shares one hierarchy while keeping its own materials. */

#gameApp.app-container, body[data-theme] #gameApp.app-container { max-width: 1140px; gap: 10px; padding: 10px clamp(10px, 2.4vw, 24px) 28px; }

/* ---------- Masthead + utilities ---------- */
#gameApp .masthead { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; }
#gameApp .game-help-nav { gap: 10px 12px; }
#gameApp .battle-sound-controls { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
#gameApp .game-help-nav .sound-toggle { min-height: 44px; min-width: 98px; padding: 8px 12px; font-size: .9rem; border-radius: 14px; }
#gameApp .account-launcher {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; max-width: 100%; padding: 8px 16px;
  border: 3px solid #ffe38c; border-radius: 16px;
  background: #fff9ee; color: #6f2eb3;
  font-weight: 900; font-size: .95rem; line-height: 1.15;
  box-shadow: 0 4px 0 #b63578;
}
#gameApp .account-launcher:hover { background: #fff1d1; }
#gameApp .account-launcher:focus-visible { outline: 4px solid #21385b; outline-offset: 4px; }
#gameApp .account-launcher-icon { width: 20px; height: 20px; flex: none; }
#gameApp .account-launcher-identity { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; }
#gameApp .account-launcher-avatar {
  box-sizing: border-box; width: 28px; height: 28px; margin: 0;
  border: 1px solid currentColor; border-radius: 50%; box-shadow: none;
  background: #21385b; color: #fff6dc; font-size: .65rem; text-shadow: none;
}
#gameApp .account-launcher-identity [hidden] { display: none; }
#gameApp #communityAccountLabel { overflow-wrap: anywhere; }
#gameApp .account-cue {
  display: inline-flex; align-items: center; min-height: 22px;
  padding: 2px 8px; border-radius: 999px;
  background: #a51939; color: #fff8ed; font-size: .74rem; font-weight: 900; white-space: nowrap;
}
#gameApp .account-warning {
  margin: 0; padding: 10px 14px; border: 2px solid currentColor; border-radius: 12px;
  background: #fff1ef; color: #921a34; font-size: .95rem; font-weight: 750;
  line-height: 1.4; overflow-wrap: anywhere; white-space: normal;
}
body[data-theme="egyptian"] #gameApp .account-warning { background: #fff1cb; color: #713923; }
body[data-theme="caveman"] #gameApp .account-warning { background: #fff2c8; color: #542e22; }
body[data-theme="egyptian"] #gameApp .account-launcher {
  background: linear-gradient(#fff0c7, #dfb870); border: 2px solid #f2d48d; color: #193d4b;
  border-radius: 16px 4px 16px 4px; box-shadow: inset 0 1px 0 #fff9e1, 0 4px 0 #6a471d;
}
body[data-theme="egyptian"] #gameApp .account-launcher:focus-visible { outline-color: #0a5577; }
body[data-theme="egyptian"] #gameApp .account-cue { background: #8e3f28; color: #fff0cc; }
body[data-theme="caveman"] #gameApp .account-launcher {
  background: linear-gradient(#4b624c, #2b493b); border: 2px solid #9b8151; color: #f9e9c4;
  border-radius: 6px 11px 7px 9px; box-shadow: 0 4px 0 #172c23, inset 0 1px #a4ae83a8;
}
body[data-theme="caveman"] #gameApp .account-launcher:focus-visible { outline: 3px solid #fff1ad; }
body[data-theme="caveman"] #gameApp .account-cue { background: #edbd9b; color: #542e22; }
#gameApp .game-help-link { min-height: 44px; }

/* Shop disclosure: opaque paint keeps scenery and saved skins from changing
   contrast. This text stays outside replaced catalog/status nodes. */
#shopCoinValue {
  margin: 0; padding: 1px 10px; min-width: 0; max-width: 100%;
  border: 1px solid #dbc9c8; border-radius: 8px;
  background: #fff8ed; color: #3b1f36;
  font-size: .9rem; font-weight: 600; line-height: 1.4;
  white-space: normal; overflow-wrap: anywhere; text-shadow: none;
  user-select: text;
}
@media (forced-colors: active) {
  #shopCoinValue {
    background: Canvas; color: CanvasText; border-color: CanvasText;
  }
}

/* ---------- Compact content-sized Map ---------- */
#gameApp #mapButton.map-button {
  grid-column: auto; justify-self: end; width: auto; max-width: 100%;
  min-height: 48px; gap: 9px; padding: 6px 12px;
}
#gameApp #mapButton .map-button-copy { flex: 0 1 auto; gap: 0; }
#gameApp #mapButton .map-button-copy small { white-space: nowrap; line-height: 1.25; }
#gameApp #mapButton .map-progress-ring { width: 30px; height: 30px; }

/* ---------- Actionable feedback and secondary controls ---------- */
#gameApp .controls-section { gap: 12px; }
#gameApp .game-status:not(.sr-only) {
  padding: 8px 12px; min-width: 0;
  border-radius: 12px; background: rgba(111, 46, 179, .08);
  border: 1px solid rgba(111, 46, 179, .18); color: var(--purple-dark);
  font-size: .95rem; font-weight: 750; line-height: 1.35;
  overflow-wrap: anywhere; white-space: normal; font-family: inherit;
}
#gameApp .action-panel > .selection-tracker {
  margin-left: 0; background: rgba(111, 46, 179, .14); color: inherit; border: 0; padding: 3px 9px;
  grid-column: 1 / 3; grid-row: 2; justify-self: center; align-self: start;
  min-width: 0; max-width: 100%; flex-wrap: wrap; justify-content: center;
  white-space: normal; overflow-wrap: anywhere;
}
body[data-theme="egyptian"] #gameApp .game-status:not(.sr-only) { background: #082c4714; border-color: #9b703966; color: #123e54; }
body[data-theme="egyptian"] #gameApp .action-panel > .selection-tracker { background: #082b47; color: #ffde8b; border-radius: 5px; }
body[data-theme="caveman"] #gameApp .game-status:not(.sr-only) { background: #142d2699; border-color: #607b66; color: #ffe6ad; }
body[data-theme="caveman"] #gameApp .action-panel > .selection-tracker { background: #142d26; color: #ffe0a0; border: 1px solid #b1935f; }
#gameApp .bet-feedback { overflow-wrap: anywhere; }

/* Each secondary control belongs to its primary columns. On phones PLAY
   spans the panel, so Selected follows Clear/Quick Pick before PLAY. */
#gameApp .action-panel .draw-speed-controls {
  grid-column: 3; grid-row: 2; display: flex; flex-direction: column; align-items: center;
  align-self: start; gap: 8px; padding: 0 2px; min-width: 0;
}
#gameApp .turbo-toggle {
  flex: 0 1 auto; min-width: 0; min-height: 44px; max-width: 100%; padding: 8px 14px;
  border: 2px solid #e8c16a; border-radius: 14px;
  background: linear-gradient(#fff7df, #f3d99c); color: #55301e;
  box-shadow: inset 0 2px #fff9e8, 0 3px #663b24;
  font: 700 1rem/1.3 var(--fx-display, system-ui); overflow-wrap: anywhere;
}
#gameApp .turbo-toggle[aria-pressed="true"] { background: linear-gradient(#157c80, #07585f); color: #fff8df; }
#gameApp .turbo-toggle:focus-visible { outline: 3px solid #fff4c1; outline-offset: 3px; }
#gameApp .turbo-toggle:disabled { opacity: .75; cursor: not-allowed; }
#gameApp .turbo-status { min-width: 0; max-width: 100%; color: inherit; font-size: .85rem; line-height: 1.4; overflow-wrap: anywhere; text-align: center; }
@media (max-width: 500px) {
  #gameApp .action-panel .btn-play { grid-row: 3; }
  #gameApp .action-panel .draw-speed-controls { grid-column: 1 / -1; grid-row: 4; }
}
@media (forced-colors: active) {
  #gameApp .turbo-toggle { background: ButtonFace; color: ButtonText; border-color: ButtonText; box-shadow: none; }
  #gameApp .turbo-toggle[aria-pressed="true"] { background: Highlight; color: HighlightText; }
  #gameApp .turbo-toggle:focus-visible { outline-color: Highlight; }
}

/* ---------- Board: bounded, targets >= 44px ---------- */
#gameApp .board-section { min-width: 0; }
#gameApp .number-grid { width: 100%; margin-inline: auto; }
#gameApp #numberGrid button { min-height: 44px; min-width: 44px; }

/* ---------- Results: compact upright, stable 20-ball space ---------- */
#gameApp .results-section { gap: 12px; min-width: 0; }
#gameApp .section-title { font-size: 1.3rem; }
#gameApp .drawn-balls-container,
body[data-theme] #gameApp .drawn-balls-container {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(4, 42px);
  grid-auto-rows: 42px;
  justify-items: center; align-items: center; align-content: start;
  gap: 6px;
  min-height: 0;
  padding: 10px;
  box-sizing: border-box;
}
body[data-theme] #gameApp .drawn-balls-container::before { position: absolute; inset: 0; margin: auto; height: fit-content; }
#gameApp .drawn-balls-container .draw-ball,
body[data-theme] #gameApp .drawn-balls-container .draw-ball { width: 40px; height: 40px; flex: none; font-size: 1rem; margin: 0; }
#gameApp .results-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
/* Separate artwork, labels and mutable totals. Hits keeps the same text rows
   without artwork; full labels/large totals grow vertically, never shrink over
   one another. Theme files retain ownership of each card's paint. */
#gameApp .stat-box {
  display: grid; grid-template-rows: 32px auto 1fr; justify-items: center; align-items: start;
  gap: 6px; padding: 8px 4px; min-width: 0; text-align: center;
}
#gameApp .stat-resource-icon {
  grid-row: 1; display: block; width: 32px; height: 32px; max-width: 100%; object-fit: contain;
}
#gameApp .stat-title {
  grid-row: 2; width: 100%; min-width: 0; min-height: 2.5em;
  font-size: .78rem; line-height: 1.25; overflow-wrap: anywhere;
}
#gameApp .stat-value {
  grid-row: 3; width: 100%; min-width: 0;
  font-size: 1.45rem; line-height: 1.2; overflow-wrap: anywhere;
}
#gameApp .results-section .section-title { min-height: 2.5em; line-height: 1.25; }
#gameApp .results-message { font-size: 1.05rem; line-height: 1.3; min-height: 3.9em; overflow-wrap: anywhere; }

/* ---------- Chat: composer before history, normal flow ---------- */
#gameApp #communityChatSection .community-chat-form { margin-bottom: 8px; }
#gameApp .side-rail, #gameApp .play-column, #gameApp .secondary-column {
  display: flex; flex-direction: column; gap: 16px; min-width: 0;
}

/* ---------- Footer utilities ---------- */
#gameApp .footer-section { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }
#gameApp .footer-access-actions { display: flex; flex-wrap: wrap; flex-basis: 100%; gap: 12px; min-width: 0; max-width: 100%; }
#gameApp .footer-section .btn-pin { flex: 1 1 320px; width: auto; min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
#gameApp .footer-section .pin-instructions {
  flex-basis: 100%; min-width: 0; max-width: 100%; margin: 0;
  font-size: 1rem; line-height: 1.5; font-weight: 600;
  white-space: normal; overflow-wrap: anywhere; text-shadow: none; user-select: text;
}
/* Keep the initially empty live region mounted; guidance stays until page close. */
#gameApp .footer-section .pin-instructions:not(:empty) {
  padding: 12px 16px; border: 2px solid #dbc9c8; border-radius: 12px;
  background: #fff8ed; color: #3b1f36;
}
body[data-theme="egyptian"] #gameApp .pin-instructions:not(:empty) { background: #fff0cc; color: #1c3541; border-color: #b67f42; }
body[data-theme="caveman"] #gameApp .pin-instructions:not(:empty) { background: #f2e3c1; color: #28382e; border-color: #607b66; }
#gameApp .footer-section .btn-pin:focus-visible { outline: 4px solid #21385b; outline-offset: 4px; }
@media (forced-colors: active) {
  #gameApp .footer-section .pin-instructions:not(:empty) { background: Canvas; color: CanvasText; border-color: CanvasText; }
  #gameApp .footer-section .btn-pin:focus-visible { outline-color: Highlight; }
}
#gameApp .footer-section .source-credit { flex-basis: 100%; margin: 4px auto 0; }

/* ---------- Account dialog: flatten the old card ---------- */
.community-account-dialog { width: min(460px, calc(100% - 24px)); }
body .community-account-dialog .community-account-body,
body[data-theme] .community-account-dialog .community-account-body {
  background: transparent; border: 0; box-shadow: none; padding: 0; outline: 0;
}
body[data-theme] .community-account-dialog .community-account-body::before { content: none; }
.community-account-dialog .community-actions { flex-wrap: wrap; justify-content: flex-start; }
.community-account-dialog .community-actions .community-button { min-height: 44px; }
.community-account-dialog .community-strip-top { flex-wrap: wrap; }

/* ---------- Restrained masthead at every width ---------- */
#gameApp .brand, body[data-theme] #gameApp .brand { padding: 4px 0; max-width: 100%; min-width: 0; }
#gameApp .brand h1, body[data-theme] #gameApp .brand h1 {
  font-size: clamp(1.9rem, 8vw, 2.6rem); margin: 2px 0; max-width: 100%; overflow-wrap: anywhere;
}
#gameApp .brand-kicker, #gameApp .brand-subtitle,
body[data-theme] #gameApp .brand-kicker, body[data-theme] #gameApp .brand-subtitle { font-size: .66rem; }
body[data-theme] #gameApp .brand::after { margin: 5px auto 0; height: 8px; }
body[data-theme="egyptian"] #gameApp .brand { padding-top: 4px; }
body[data-theme="egyptian"] #gameApp .brand::before { width: 64px; top: -2px; opacity: .55; }
body[data-theme="caveman"] #gameApp .brand h1 { -webkit-text-stroke-width: 1px; filter: drop-shadow(0 3px 0 #341f16) drop-shadow(0 6px 5px #0b1e18); }
body[data-theme="caveman"] #gameApp .brand-kicker,
body[data-theme="caveman"] #gameApp .brand-subtitle { padding: 2px 8px; }

/* ---------- 44px utility targets in the header ---------- */
#gameApp .header, body[data-theme] #gameApp .header { gap: 10px; padding: 10px 12px; }
#gameApp .btn-get-coins, #gameApp .btn-bonus, #gameApp .btn-bonus-mini { min-height: 44px; }
#gameApp .btn-bonus, #gameApp .bonus-countdown {
  max-width: 100%; white-space: normal; overflow-wrap: anywhere; text-align: center;
}
#gameApp .btn-get-coins { padding-inline: 12px; }
#gameApp .balance-pill { min-height: 36px; }

/* ---------- 44px stakes/actions, compact controls ---------- */
#gameApp .controls-section, body[data-theme] #gameApp .controls-section { gap: 8px; padding: 8px 14px; }
#gameApp .btn-bet { min-height: 44px; padding-block: 6px; }
#gameApp .custom-bet-option { min-height: 44px; }
#gameApp .bet-label { padding-top: 10px; }
#gameApp .btn-action { min-height: 48px; padding-block: 6px; }
#gameApp .btn-play { min-height: 48px; padding: 4px; font-size: 1.4rem; }
#gameApp .bet-panel { gap: 8px 10px; }

/* ---------- Board frames: compact geometry for every theme ---------- */
#gameApp .board-section, body[data-theme] #gameApp .board-section { padding: 12px; }
body[data-theme="egyptian"] #gameApp .board-section { padding: 20px 12px 12px; }
body[data-theme="caveman"] #gameApp .board-section { padding: 34px 12px 14px; }
body[data-theme="caveman"] #gameApp .board-section::before { top: 10px; }
body[data-theme="caveman"] #gameApp .board-section::after { top: 12px; }
body[data-theme="caveman"] #gameApp .number-grid { padding: 8px; }
#gameApp .number-grid { gap: 6px; }
body[data-theme] #gameApp .results-section { padding: 16px 14px; gap: 10px; }

/* ---------- Desktop two-column ---------- */
@media (min-width: 1025px) {
  #gameApp .masthead { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px 20px; }
  #gameApp .brand, body[data-theme] #gameApp .brand { text-align: left; flex: 0 0 auto; }
  body[data-theme] #gameApp .brand::after { margin-left: 0; width: min(220px, 100%); }
  body[data-theme="egyptian"] #gameApp .brand { padding-left: 74px; }
  body[data-theme="egyptian"] #gameApp .brand::before { left: 0; top: 50%; transform: translateY(-50%); opacity: .9; }
  body[data-theme="caveman"] #gameApp .brand h1 { margin-left: 0; }
  #gameApp .game-help-nav { justify-content: flex-end; flex: 1 1 0; }

  #gameApp .header { grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr) minmax(0, 1.4fr) auto; padding-block: 8px; }
  #gameApp .wallet { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  #gameApp .wallet .balance-pill, #gameApp .wallet .brick-pill { grid-column: 1; justify-content: center; }
  #gameApp .wallet .btn-get-coins { grid-column: 2; grid-row: 1 / 3; }

  #gameApp .main-content {
    display: grid;
    grid-template-columns: minmax(520px, 560px) minmax(310px, 350px);
    justify-content: center;
    grid-template-rows: max-content 1fr auto;
    align-items: start;
    gap: 14px 20px;
  }
  #gameApp .play-column { grid-column: 1; grid-row: 1; gap: 10px; }
  #gameApp .side-rail { grid-column: 2; grid-row: 1 / 3; gap: 14px; }
  #gameApp .secondary-column { grid-column: 1; grid-row: 2; gap: 14px; }
  #gameApp .footer-section { grid-column: 1 / -1; grid-row: 3; }
  #gameApp .bet-panel { justify-content: flex-start; }
}

/* ---------- Tablet / phone single column ---------- */
@media (max-width: 1024px) {
  #gameApp.app-container, body[data-theme] #gameApp.app-container { max-width: 720px; }
  #gameApp .main-content { display: flex; flex-direction: column; gap: 14px; }
  #gameApp #mapButton.map-button { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 600px) {
  #gameApp .results-stats { gap: 6px; }
  #gameApp .footer-section .btn-pin { flex-basis: 100%; }
}
@media (max-width: 360px) {
  #gameApp .drawn-balls-container, body[data-theme] #gameApp .drawn-balls-container { gap: 5px 3px; padding: 8px 4px; }
  #gameApp .drawn-balls-container .draw-ball, body[data-theme] #gameApp .drawn-balls-container .draw-ball { width: 38px; height: 38px; }
  #gameApp #numberGrid button { min-width: 0; }
}

/* ---------- Locked Chat (signed-out): greyed, inert history + composer ---------- */
#gameApp #communityChatSection.is-chat-locked { position: relative; }
#gameApp #communityChatSection.is-chat-locked #communityChatContent {
  opacity: .5; filter: grayscale(1); pointer-events: none; user-select: none;
  min-width: 0; overflow: visible;
}
#gameApp #communityChatSection.is-chat-locked #communityChatContent :is(input, textarea, select, button, a) { cursor: not-allowed; }
#gameApp #communityChatSection.is-chat-locked #communityChatList { display: none; }
#gameApp #communityChatLock {
  display: grid; justify-items: start; gap: 10px; margin: 0 0 10px; padding: 12px 14px;
  min-width: 0; border: 3px solid #4a2842; border-radius: 14px;
  background: #fff8ed; color: #3b1f36; opacity: 1; filter: none;
}
#gameApp #communityChatLockCopy {
  margin: 0; color: inherit; font-size: .95rem; font-weight: 750; line-height: 1.4;
  overflow-wrap: anywhere; white-space: normal;
}
#gameApp #communityChatLock #communityChatSignIn.community-button {
  min-height: 44px; max-width: 100%; padding: 8px 16px; white-space: normal; overflow-wrap: anywhere;
  background: #6f2eb3; color: #fff8ed; border: 3px solid #3b1f36; box-shadow: 0 3px 0 #3b1f36;
}
#gameApp #communityChatLock #communityChatSignIn[aria-disabled="true"] { cursor: not-allowed; }
#gameApp #communityChatLock #communityChatSignIn.community-button:focus-visible {
  outline: 4px solid #21385b; outline-offset: 3px; box-shadow: 0 0 0 3px #fff8ed;
}
body[data-theme="egyptian"] #gameApp #communityChatLock { background: #fff0cc; color: #1c3541; border-color: #082c47; }
body[data-theme="egyptian"] #gameApp #communityChatLock #communityChatSignIn.community-button {
  background: #082c47; color: #fff0c6; border-color: #082c47; box-shadow: 0 3px 0 #0a2e3c;
}
body[data-theme="egyptian"] #gameApp #communityChatLock #communityChatSignIn.community-button:focus-visible { outline-color: #0a5577; }
body[data-theme="caveman"] #gameApp #communityChatLock { background: #f2e3c1; color: #28382e; border-color: #1d2e2b; }
body[data-theme="caveman"] #gameApp #communityChatLock #communityChatSignIn.community-button {
  background: #203e34; color: #fff1ad; border-color: #1d2e2b; box-shadow: 0 3px 0 #0e1d18;
}
body[data-theme="caveman"] #gameApp #communityChatLock #communityChatSignIn.community-button:focus-visible { outline: 3px solid #1d2e2b; box-shadow: 0 0 0 6px #fff1ad; }
body[data-theme="candy"][data-board-skin]:not([data-board-skin="default"]) #gameApp #communityChatLock { border-color: var(--bs-ink); }
body[data-theme="candy"][data-board-skin]:not([data-board-skin="default"]) #gameApp #communityChatLock #communityChatSignIn.community-button {
  background: var(--bs-ink); color: var(--skin-cream); border-color: var(--bs-ink); box-shadow: 0 3px 0 var(--bs-pick-edge);
}
body[data-theme="candy"][data-board-skin]:not([data-board-skin="default"]) #gameApp #communityChatLock #communityChatSignIn.community-button:focus-visible { outline-color: var(--bs-ink); }

#gameApp #communityChatPlaceholders { display: grid; gap: 8px; margin: 8px 0 0; min-width: 0; }
#gameApp .chat-placeholder {
  display: grid; gap: 6px; padding: 10px 12px; min-width: 0;
  border: 2px dashed #8a7a86; border-radius: 12px; background: rgba(74, 40, 66, .1);
}
#gameApp .chat-placeholder span { display: block; height: 10px; border-radius: 999px; background: #8a7a86; max-width: 100%; }
#gameApp .chat-placeholder span:first-child { width: 35%; }
#gameApp .chat-placeholder span:nth-child(2) { width: 85%; }
#gameApp .chat-placeholder span:nth-child(n+3) { width: 60%; }
body[data-theme="caveman"] #gameApp .chat-placeholder { border-color: #a9ad98; background: rgba(255,255,255,.08); }
body[data-theme="caveman"] #gameApp .chat-placeholder span { background: #a9ad98; }

@media (max-width: 360px) {
  #gameApp #communityChatLock { padding: 10px; }
  #gameApp #communityChatLock #communityChatSignIn.community-button { width: 100%; }
}
@media (forced-colors: active) {
  #gameApp #communityChatSection.is-chat-locked #communityChatContent { opacity: 1; filter: none; color: GrayText; }
  body #gameApp #communityChatLock { forced-color-adjust: none; background: Canvas !important; color: CanvasText !important; border-color: CanvasText !important; }
  body #gameApp #communityChatLock #communityChatSignIn.community-button,
  body[data-theme] #gameApp #communityChatLock #communityChatSignIn.community-button,
  body[data-theme][data-board-skin] #gameApp #communityChatLock #communityChatSignIn.community-button {
    forced-color-adjust: none; background: ButtonFace !important; color: ButtonText !important; border: 3px solid ButtonText !important; box-shadow: none !important;
  }
  body #gameApp #communityChatLock #communityChatSignIn.community-button:focus-visible { outline: 4px solid Highlight !important; outline-offset: 3px; box-shadow: none !important; }
  #gameApp .chat-placeholder { border: 2px dashed GrayText; background: transparent; }
  #gameApp .chat-placeholder span { forced-color-adjust: none; background: GrayText; }
}

/* ---------- Combo meter: compact strip above the board (values written by game.js) ---------- */
#gameApp .combo-meter {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px;
  margin: 0 0 8px; padding: 5px 10px; min-width: 0;
  border: 2px solid #c99b17; border-radius: 12px;
  background: linear-gradient(#fff6dc, #f6e1a8); color: #4a2512;
  box-shadow: inset 0 1px #fffbe9, 0 2px 0 #6e3f1c;
}
#gameApp .combo-meter-label { font: 800 .8rem/1.2 var(--fx-display, system-ui); letter-spacing: .08em; text-transform: uppercase; color: #7a3d12; }
#gameApp .combo-meter-values { display: inline-flex; flex-wrap: wrap; gap: 2px 12px; font-size: .86rem; font-weight: 700; line-height: 1.3; }
#gameApp .combo-meter-values b { display: inline-block; min-width: 2.2em; padding: 0 6px; border-radius: 999px; background: #5b2a12; color: #ffe08a; text-align: center; font-variant-numeric: tabular-nums; }
#gameApp .combo-meter-label { display: inline-flex; align-items: center; gap: 4px; }
#gameApp .streak-flame { display: inline-flex; width: 28px; height: 36px; flex: 0 0 28px; line-height: 1; transform-origin: 50% 90%; pointer-events: none; }
#gameApp .streak-flame-art { display: block; width: 100%; height: 100%; overflow: visible; }
#gameApp .streak-flame-body { transform-origin: 24px 59px; animation: streak-fire-sway 2.3s ease-in-out infinite; }
#gameApp .streak-flame-core { transform-origin: 24px 58px; animation: streak-fire-core 1.4s ease-in-out infinite alternate; }
#gameApp .streak-flame-heart { animation: streak-fire-light 1.8s ease-in-out infinite alternate; }
#gameApp .streak-ember { animation: streak-fire-ember 2.6s ease-out infinite; }
#gameApp .streak-ember-two { animation-delay: -1.3s; }
@keyframes streak-fire-sway {
  0%, 100% { transform: rotate(-2deg) scale(1, 1); }
  35% { transform: rotate(2deg) scale(.96, 1.035); }
  70% { transform: rotate(-1deg) scale(1.02, .98); }
}
@keyframes streak-fire-core {
  from { transform: scale(.94, .96); }
  to { transform: scale(1.04, 1.06); }
}
@keyframes streak-fire-light { from { opacity: .7; } to { opacity: 1; } }
@keyframes streak-fire-ember {
  0%, 100% { opacity: 0; transform: translate(0, 5px); }
  25% { opacity: .85; }
  80% { opacity: 0; transform: translate(2px, -5px); }
}
@media (prefers-reduced-motion: reduce) {
  #gameApp .streak-flame-art * { animation: none !important; }
}
.fx-reduced-motion #gameApp .streak-flame-art * { animation: none !important; }
.fx-paused #gameApp .streak-flame-art * { animation-play-state: paused !important; }
#gameApp .streak-info {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 28px;
  width: 28px; height: 28px; padding: 0; border: 1px solid #986121; border-radius: 50%;
  background: #fff6dc; color: #643512; font: 800 16px/1 Georgia, serif; cursor: pointer;
}
#gameApp .streak-info:hover { background: #ffe08a; }
#gameApp .streak-info:focus-visible { outline: 3px solid #86420f; outline-offset: 2px; }
#gameApp .streak-help {
  position: fixed; inset: 0; margin: auto;
  width: min(360px, calc(100vw - 32px)); max-height: calc(100dvh - 48px);
  box-sizing: border-box; overflow-y: auto; padding: 16px; border: 2px solid #c99b17;
  border-radius: 14px; background: #fff6dc; color: #4a2512;
  box-shadow: 0 8px 30px #321a1260; font: 500 14px/1.5 system-ui, sans-serif;
}
#gameApp .streak-help-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#gameApp .streak-help-heading strong { font-size: 17px; }
#gameApp .streak-help p { margin: 10px 0 0; }
@media (max-width: 600px) {
  #gameApp .combo-meter { gap: 6px 8px; }
  #gameApp .combo-meter-values { flex: 1; justify-content: flex-end; font-size: .78rem; gap: 3px 8px; }
}
@media (min-width: 601px) { #gameApp .combo-meter-values { margin-left: auto; } }
@media (forced-colors: active) {
  #gameApp .combo-meter { background: Canvas; color: CanvasText; border-color: CanvasText; box-shadow: none; }
  #gameApp .combo-meter-values b { forced-color-adjust: none; background: Canvas; color: CanvasText; border: 1px solid CanvasText; }
}

/* Round streak meter: five chunky gold sockets */
#gameApp .combo-track { display: contents; }
#gameApp .combo-count { flex: 0 0 auto; white-space: nowrap; font: 800 .74rem/1.25 system-ui, sans-serif; font-variant-numeric: tabular-nums; }
#gameApp .combo-steps { display: flex; gap: 4px; flex: 0 1 auto; min-width: 0; }
#gameApp .combo-step { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; min-width: 30px; }
#gameApp .combo-step i { display: block; width: 26px; height: 10px; border-radius: 4px; border: 2px solid #8a5a1c; background: #e9cf8e; box-shadow: inset 0 2px #c9a55c; transition: background-color .25s; }
#gameApp .combo-step.is-filled i { background: linear-gradient(#ffe27a, #f0a21b); border-color: #6e3f1c; box-shadow: inset 0 1px #fff4bf; }
#gameApp .combo-step small { font: 700 .66rem/1 system-ui, sans-serif; color: #6b3a14; font-variant-numeric: tabular-nums; }
#gameApp .combo-countdown { flex: 1 1 10em; min-width: 0; font-size: .8rem; font-weight: 700; line-height: 1.25; color: #5b2a12; overflow-wrap: anywhere; }
#gameApp .combo-meter.is-capped .combo-countdown { color: #8a3b0a; }
#gameApp .combo-meter.is-reset-preview .combo-countdown { color: #9a2a14; }
#gameApp .combo-celebrate { position: static; margin-left: auto; padding: 1px 8px; border-radius: 999px; background: #5b2a12; color: #ffe08a; font: 800 .74rem/1.4 var(--fx-display, system-ui); pointer-events: none; }
#gameApp .combo-step.is-threshold i { border-top-width: 3px; }
#gameApp .combo-step.is-filled i::after { content: "✓"; display: block; text-align: center; font: 900 10px/9px system-ui; color: #4a2512; }
#gameApp .combo-meter.is-celebrating .combo-celebrate { animation: combo-tier-pop 1.6s ease-out both; }
#gameApp .combo-meter.is-celebrating .combo-step.is-filled:last-of-type i,
#gameApp .combo-meter.is-celebrating .combo-step.is-filled i { animation: combo-tier-glint .7s ease-out 2; }
@keyframes combo-tier-pop { 0% { opacity: 0; transform: translateY(4px) scale(.8); } 20%, 80% { opacity: 1; transform: none; } 100% { opacity: 1; transform: none; } }
@keyframes combo-tier-glint { 50% { transform: scaleY(1.35); } }
@media (prefers-reduced-motion: reduce) { #gameApp .combo-meter .combo-celebrate, #gameApp .combo-step i { animation: none !important; transition: none !important; } }
.fx-reduced-motion #gameApp .combo-meter *, .fx-paused #gameApp .combo-meter .combo-track * { animation: none !important; }
.fx-reduced-motion #gameApp .combo-step i, .fx-paused #gameApp .combo-step i { transition: none !important; }
@media (max-width: 360px) { #gameApp .combo-step { min-width: 24px; } #gameApp .combo-step i { width: 20px; } }
@media (forced-colors: active) { #gameApp .combo-step.is-filled i { forced-color-adjust: none; background: Highlight; border-color: CanvasText; } }
