/* ==========================================================================
   Solitaire Grove — game surface
   Cards, piles, board, game chrome, game page
   ========================================================================== */

/* ---------- Game masthead ---------- */
.game-masthead {
  padding-bottom: 20px;
}
.game-masthead__top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.game-masthead h1 {
  margin: 4px 0 6px;
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
}
.game-masthead__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--ink-faint);
  font-size: 0.82rem;
}
.game-masthead__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.6; }
.game-masthead__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.variant-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.variant-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--dur) var(--ease);
}
.variant-tab:hover { border-color: var(--gold); color: var(--ink); }
.variant-tab.is-active { background: var(--pine); border-color: var(--pine); color: var(--cream); }

/* ---------- Game shell ---------- */
.game-shell {
  margin-top: 4px;
}
.game-stage {
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, var(--felt-1), var(--felt-2));
  border: 1px solid rgba(228, 207, 156, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 24px 60px rgba(10, 44, 33, 0.22);
  overflow: hidden;
  position: relative;
}
.game-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/assets/img/felt.svg");
  background-size: 420px;
  opacity: 0.35;
  mix-blend-mode: soft-light;
  pointer-events: none;
}
.game-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(247, 240, 227, 0.09), transparent 55%),
    radial-gradient(ellipse at 50% 120%, rgba(0, 0, 0, 0.35), transparent 60%);
  pointer-events: none;
}

.game-topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(247, 240, 227, 0.12);
  background: rgba(7, 31, 24, 0.28);
}
.game-topbar__group { display: flex; align-items: center; gap: 4px; }
.game-topbar__title {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  margin-right: auto;
  padding-left: 6px;
}
.game-topbar__title strong { font-family: var(--font-display); font-size: 0.98rem; font-weight: 560; color: var(--cream); }
.game-topbar__title span { font-size: 0.66rem; letter-spacing: 0.09em; text-transform: uppercase; color: rgba(247, 240, 227, 0.55); }

.game-hud {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 6px;
}
.hud-item { text-align: center; min-width: 52px; }
.hud-item strong {
  display: block;
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
  font-size: 1.02rem;
  font-weight: 650;
  color: var(--cream);
  line-height: 1.15;
}
.hud-item span {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(247, 240, 227, 0.5);
}
.hud-item--score strong { color: var(--gold-soft); }

.game-board-wrap {
  position: relative;
  z-index: 1;
  padding: clamp(12px, 2.2vw, 26px);
  display: flex;
  justify-content: center;
}

.game-board {
  position: relative;
  width: 100%;
  touch-action: none;
}

.board-scaler {
  position: relative;
  margin: 0 auto;
  width: calc(var(--cw) * var(--bw, 7));
  height: calc(var(--cw) * var(--bh, 6));
}

/* ---------- Piles ---------- */
.pile {
  position: absolute;
  width: var(--cw);
  height: calc(var(--cw) * 1.5);
  border-radius: var(--card-radius);
}
.pile--tableau { height: auto; min-height: calc(var(--cw) * 1.5); }

.card-slot {
  position: absolute;
  inset: 0;
  border-radius: var(--card-radius);
  border: 1.5px dashed rgba(247, 240, 227, 0.26);
  background: rgba(247, 240, 227, 0.045);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(247, 240, 227, 0.2);
}
.card-slot .icon { width: 42%; height: 42%; }
.card-slot--foundation .icon { width: 44%; height: 44%; opacity: 0.85; }
.card-slot--stock { border-style: solid; border-color: rgba(247, 240, 227, 0.16); }
.card-slot--waste { border-style: dashed; }
.suit-ghost {
  font-size: calc(var(--cw) * 0.34);
  line-height: 1;
  color: rgba(247, 240, 227, 0.34);
  font-family: Georgia, "Times New Roman", serif;
}
.suit-ghost.is-red { color: rgba(226, 142, 112, 0.42); }
.suit-ghost--faint { opacity: 0.6; }
.suit-ghost--faint .icon { width: calc(var(--cw) * 0.24); height: calc(var(--cw) * 0.24); }
.card-slot__label {
  position: absolute;
  bottom: 1px;
  left: 0; right: 0;
  text-align: center;
  font-size: calc(var(--cw) * 0.085);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(247, 240, 227, 0.35);
  pointer-events: none;
}

.pile__hit {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* ---------- Cards ---------- */
.card {
  position: absolute;
  width: var(--cw);
  height: calc(var(--cw) * 1.5);
  border-radius: var(--card-radius);
  background: #fffdf6;
  box-shadow:
    0 1px 1px rgba(8, 24, 18, 0.28),
    0 3px 7px rgba(8, 24, 18, 0.18);
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  will-change: transform;
  transition: box-shadow 140ms var(--ease), outline-color 140ms var(--ease);
  outline: 2px solid transparent;
  outline-offset: 0;
  overflow: hidden;
  transform: translateZ(0);
}
.card--face img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  -webkit-user-drag: none;
}
.card--back {
  background-color: var(--pine);
  background-image: var(--card-back, url("/assets/cards/back-grove.svg"));
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.card--back::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: calc(var(--card-radius) - 2px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  pointer-events: none;
}
.card.is-draggable { cursor: grab; }
.card.is-draggable:active { cursor: grabbing; }
.card.is-selected {
  outline-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(200, 162, 83, 0.45), 0 10px 24px rgba(0, 0, 0, 0.28);
  z-index: 40 !important;
}
.card.is-hint { animation: hint-pulse 1.1s var(--ease) infinite; z-index: 45 !important; }
.card.is-drag-source { visibility: hidden; }
.card.is-settling { transition: left 180ms var(--ease), top 180ms var(--ease), transform 180ms var(--ease); }
.card.is-invalid { animation: shake 320ms var(--ease); }
.card.is-new { animation: deal-in 260ms var(--ease) both; }
.card--tableau-top { box-shadow: 0 1px 1px rgba(8, 24, 18, 0.3), 0 4px 10px rgba(8, 24, 18, 0.2); }

@keyframes hint-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(200, 162, 83, 0.9), 0 8px 22px rgba(0, 0, 0, 0.3); }
  50% { box-shadow: 0 0 0 6px rgba(200, 162, 83, 0.15), 0 8px 22px rgba(0, 0, 0, 0.3); }
}
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}
@keyframes deal-in {
  from { opacity: 0; transform: translateY(-14px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

/* dragged cards live above everything */
.drag-layer {
  position: fixed;
  inset: 0;
  z-index: 150;
  pointer-events: none;
}
.drag-layer .card {
  position: absolute;
  margin: 0;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.35);
  transform: none;
}
.drag-layer .card.is-top-grab { box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42); }

/* Drop target feedback */
.pile.is-drop-target .card-slot,
.pile.is-drop-target > .card:last-child {
  outline: 2px solid rgba(228, 207, 156, 0.85);
  outline-offset: 2px;
}
.pile.is-drop-target-empty .card-slot { background: rgba(228, 207, 156, 0.16); }

/* ---------- Bottom bar / actions ---------- */
.game-bottombar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  border-top: 1px solid rgba(247, 240, 227, 0.12);
  background: rgba(7, 31, 24, 0.32);
  color: rgba(247, 240, 227, 0.7);
  font-size: 0.72rem;
  min-height: 44px;
}
.game-bottombar__info { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.game-bottombar__info span { display: inline-flex; align-items: center; gap: 6px; }
.game-bottombar .icon { width: 14px; height: 14px; opacity: 0.7; }
.game-bottombar__actions { display: flex; gap: 4px; }

/* ---------- Stats strip ---------- */
.game-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.stat-card {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}
.stat-card__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.stat-card__label .icon { width: 13px; height: 13px; color: var(--gold); }
.stat-card__value {
  margin-top: 3px;
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
  font-size: 1.22rem;
  font-weight: 650;
  color: var(--ink);
  line-height: 1.2;
}
.stat-card__value small { font-size: 0.72rem; font-weight: 500; color: var(--ink-faint); margin-left: 2px; }
.stat-card--accent { background: linear-gradient(160deg, #fbf4e6, #f4e8d2); border-color: var(--gold-soft); }

/* ---------- Game page content ---------- */
.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: clamp(24px, 4vw, 52px);
  align-items: start;
  padding-top: clamp(28px, 4vw, 52px);
}
.game-content h2 { margin-top: 1.9em; }
.game-content h2:first-child { margin-top: 0; }
.game-content h3 { margin-top: 1.5em; }
.game-content p, .game-content li { color: var(--ink-soft); }
.game-content .callout {
  margin: 26px 0;
  padding: 20px 22px;
  border-left: 3px solid var(--gold);
  background: var(--paper);
  border-radius: 0 12px 12px 0;
  border-top: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-soft);
}
.game-content .callout strong { color: var(--ink); }
.game-content .steps { counter-reset: step; list-style: none; padding: 0; }
.game-content .steps li {
  position: relative;
  padding-left: 46px;
  margin: 16px 0;
}
.game-content .steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: -2px;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--parchment);
  border: 1px solid var(--line);
  color: var(--pine);
  font-weight: 700;
  font-size: 0.82rem;
}
.game-sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--header-h) + 18px); }
.sidebar-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.sidebar-card h3 { margin-bottom: 8px; font-size: 1.1rem; }
.sidebar-card p { font-size: 0.86rem; color: var(--muted); }
.sidebar-card .btn { margin-top: 8px; }
.sidebar-list { list-style: none; padding: 0; margin: 8px 0 0; }
.sidebar-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 0.86rem; color: var(--muted); }
.sidebar-list li:last-child { border-bottom: 0; }
.sidebar-list strong { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.sidebar-card--dark { background: linear-gradient(160deg, var(--pine), var(--pine-deep)); border-color: rgba(228, 207, 156, 0.2); color: var(--cream); }
.sidebar-card--dark h3 { color: var(--cream); }
.sidebar-card--dark p { color: rgba(247, 240, 227, 0.72); }
.sidebar-card--dark .sidebar-list li {
  color: rgba(247, 240, 227, 0.7);
  border-bottom-color: rgba(247, 240, 227, 0.14);
}
.sidebar-card--dark .sidebar-list strong { color: var(--cream); }
.sidebar-list--light li {
  color: rgba(247, 240, 227, 0.7);
  border-bottom-color: rgba(247, 240, 227, 0.14);
}
.sidebar-list--light strong { color: var(--cream); }

.recommend-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.recommend-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  text-decoration: none;
  color: var(--ink);
  transition: border-color var(--dur), transform var(--dur);
}
.recommend-card:hover { border-color: var(--gold); transform: translateY(-2px); color: var(--ink); }
.recommend-card__fan { display: flex; flex: none; }
.recommend-card__fan .mini-card {
  width: 34px; height: 51px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background-size: cover;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}
.recommend-card__fan .mini-card + .mini-card { margin-left: -10px; }
.recommend-card__name { font-family: var(--font-display); font-size: 0.95rem; font-weight: 560; line-height: 1.2; }
.recommend-card__cat { font-size: 0.68rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- Settings modal ---------- */
.settings-section + .settings-section { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line-soft); }
.settings-section h4 { margin-bottom: 14px; font-family: var(--font-ui); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.swatch-row { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch {
  width: 58px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 9px;
  padding: 4px;
  cursor: pointer;
  transition: border-color var(--dur), transform var(--dur);
}
.swatch:hover { transform: translateY(-2px); }
.swatch.is-active { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(200, 162, 83, 0.3); }
.swatch__img { display: block; width: 100%; aspect-ratio: 2 / 3; border-radius: 5px; background-size: cover; background-position: center; }
.swatch__name { margin-top: 5px; font-size: 0.7rem; text-align: center; color: var(--ink-soft); line-height: 1.25; }
.settings-option { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 0; }
.settings-option__text { font-size: 0.94rem; line-height: 1.4; }
.settings-option__text small { display: block; margin-top: 2px; color: var(--ink-faint); font-size: 0.8rem; line-height: 1.45; }
/* A preference that cannot apply right now (e.g. Larger cards in fullscreen). */
.settings-option.is-muted { opacity: 0.62; }
.settings-option.is-muted .switch { cursor: not-allowed; }
.switch input:disabled + .switch__track { opacity: 0.65; }
.switch input:disabled ~ * { cursor: not-allowed; }

/* ---------- Keyboard hint ---------- */
kbd {
  display: inline-block;
  min-width: 20px;
  padding: 1px 5px;
  border-radius: 5px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  background: var(--paper);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  color: var(--ink-soft);
}

/* ---------- Board themes ---------- */
.game-stage[data-table="grove"] { --felt-1: #164e3a; --felt-2: #0a2c21; }
.game-stage[data-table="moss"] { --felt-1: #3f5c3a; --felt-2: #1d2f1b; }
.game-stage[data-table="midnight"] { --felt-1: #1d3350; --felt-2: #0b1626; }
.game-stage[data-table="clay"] { --felt-1: #6b3a2c; --felt-2: #341911; }
.game-stage[data-table="slate"] { --felt-1: #3b4a4d; --felt-2: #182326; }
.game-stage[data-table="sand"] { --felt-1: #8a7146; --felt-2: #4a3a1f; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .game-layout { grid-template-columns: 1fr; }
  .game-sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .game-sidebar > * { flex: 1 1 260px; }
  .recommend-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .game-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .game-topbar { flex-wrap: wrap; }
  .game-topbar__title { display: none; }
  .game-hud { gap: 12px; padding: 0; }
  .toolbar-btn { min-width: 50px; height: 50px; }
  .toolbar-btn .icon { width: 19px; height: 19px; }
  .toolbar-btn span { display: none; }
  .game-hud { margin-left: auto; }
}
@media (max-width: 640px) {
  .game-masthead__actions .btn span { display: none; }
  .game-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-board-wrap { padding: 8px; }
  .game-bottombar { padding: 8px 12px; }
  .game-bottombar__info { display: none; }
  .recommend-grid { grid-template-columns: 1fr; }
  .game-layout { padding-top: 22px; }
}

/* ---------- Pairing boards (pyramid / golf / tri-peaks) ---------- */
.card.is-covered { filter: brightness(0.88) saturate(0.9); }
.card.is-free { cursor: pointer; }
.card.is-free-card:hover { outline: 1px solid rgba(228, 207, 156, 0.55); outline-offset: -1px; }
.pile.is-hint-pile .card { animation: hint-pulse 1.1s var(--ease) infinite; z-index: 60 !important; }
.pile--slot { height: calc(var(--cw) * 1.5); }


/* ---------- Compact mobile game chrome ---------- */
@media (max-width: 640px) {
  .game-topbar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 6px 8px;
    gap: 8px;
    scrollbar-width: none;
  }
  .game-topbar::-webkit-scrollbar { display: none; }
  .game-topbar__group { gap: 0; }
  /* Fullscreen stays available on phones — it is the one control players
     need in landscape. Help/restart can live in the rules and menu. */
  .game-topbar [data-action="help"],
  .game-topbar [data-action="restart"] { display: none; }
  .toolbar-btn { min-width: 44px; height: 44px; }
  .game-hud { gap: 10px; margin-left: 0; flex: none; }
  .game-hud .hud-item { min-width: 44px; }
  .game-hud .hud-item--score { display: none; }
  .game-board-wrap { padding: 8px 6px; }
  .game-bottombar { justify-content: flex-end; }
  .game-masthead { padding-bottom: 12px; }
  .game-masthead__meta { font-size: 0.74rem; }
  .variant-tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; scrollbar-width: none; }
  .variant-tabs::-webkit-scrollbar { display: none; }
  .variant-tab { flex: none; }
}

.card:focus-visible,
.card-slot:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  z-index: 90 !important;
}


/* ---------- Fullscreen: only the table, not the whole site ----------
   Every game surface gets the same treatment: the stage becomes a fixed,
   viewport-sized layer (native Fullscreen API where available, this class
   otherwise — see js/core/fullscreen.js), with the table chrome pinned to the
   top/bottom and the board taking the rest. */
.game-stage.is-fullscreen,
.game-stage:fullscreen,
.game-stage:-webkit-full-screen,
.yz-stage.is-fullscreen,
.wg-stage.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 500;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  border-radius: 0;
  border: 0;
}
.game-stage.is-fullscreen,
.game-stage:fullscreen,
.game-stage:-webkit-full-screen {
  background: linear-gradient(165deg, var(--felt-1), var(--felt-2));
}
/* Stage shells that are not built on .game-stage. */
.yz-stage.is-fullscreen,
.wg-stage.is-fullscreen {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--cream);
}
/* The CSS fullscreen fallback has to stop the page itself from scrolling. */
html.sg-fs-lock,
html.sg-fs-lock body {
  overflow: hidden !important;
  height: 100%;
  overscroll-behavior: none;
}

.game-stage.is-fullscreen,
.game-stage:fullscreen,
.game-stage:-webkit-full-screen {
  display: flex;
  flex-direction: column;
}
.game-stage.is-fullscreen::before,
.game-stage:fullscreen::before,
.game-stage:-webkit-full-screen::before {
  background-size: 520px;
  opacity: 0.4;
}
.game-stage.is-fullscreen .game-topbar,
.game-stage:fullscreen .game-topbar,
.game-stage:-webkit-full-screen .game-topbar {
  flex: none;
  min-height: 58px;
  padding: 4px 18px;
}
.game-stage.is-fullscreen .game-board-wrap,
.game-stage:fullscreen .game-board-wrap,
.game-stage:-webkit-full-screen .game-board-wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
}
.game-stage.is-fullscreen .board-scaler,
.game-stage:fullscreen .board-scaler,
.game-stage:-webkit-full-screen .board-scaler {
  margin: 0 auto;
}
.game-stage.is-fullscreen .game-bottombar,
.game-stage:fullscreen .game-bottombar,
.game-stage:-webkit-full-screen .game-bottombar {
  flex: none;
  min-height: 48px;
  padding: 8px 20px;
}
/* keep text labels on the fullscreen toolbar where there is room */
.game-stage.is-fullscreen .toolbar-btn span,
.game-stage:fullscreen .toolbar-btn span,
.game-stage:-webkit-full-screen .toolbar-btn span { display: inline; }
.game-stage.is-fullscreen .toolbar-btn,
.game-stage:fullscreen .toolbar-btn,
.game-stage:-webkit-full-screen .toolbar-btn { min-width: 58px; height: 48px; }
@media (max-width: 900px) {
  .game-stage.is-fullscreen .toolbar-btn span,
  .game-stage:fullscreen .toolbar-btn span,
  .game-stage:-webkit-full-screen .toolbar-btn span { display: none; }
  .game-stage.is-fullscreen .toolbar-btn,
  .game-stage:fullscreen .toolbar-btn,
  .game-stage:-webkit-full-screen .toolbar-btn { min-width: 46px; height: 46px; }
  .game-stage.is-fullscreen .game-topbar,
  .game-stage:fullscreen .game-topbar,
  .game-stage:-webkit-full-screen .game-topbar { padding: 4px 8px; }
}

/* Editorial aside on game pages */
.table-note {
  margin: 18px 0 0;
  padding: 14px 18px;
  border-left: 2px solid var(--gold);
  background: var(--paper);
  border-radius: 0 10px 10px 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.65;
}


/* Settings layout: readable swatches and section labels */
.modal .swatch-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.modal .swatch { width: 100%; padding: 7px 5px; }
.modal .swatch__img { width: 78px; margin: 0 auto; }
.modal .swatch__name { font-size: 0.7rem; min-height: 2.4em; display: flex; align-items: center; justify-content: center; }
.settings-page .swatch-row--large { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.settings-page .swatch-row--large .swatch { width: 100%; padding: 5px; }
@media (max-width: 760px) {
  .modal .swatch-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .settings-page .swatch-row--large { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
