/* Mahjong Solitaire: Manu Arcade No. XIV
   Game-specific styling only. The shell (masthead, hud, seal, toggles,
   board-frame, overlay, colophon) comes from ../_shared/palette.css.
   No em dashes in any on-screen copy by house style. */

/* Helper row: Hint / Undo / Shuffle, styled as small ledger buttons. */
.tools {
  display: flex;
  gap: clamp(8px, 2vw, 14px);
  flex-wrap: wrap;
  justify-content: center;
}
.tool {
  font-family: var(--caps);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
  color: var(--ink-soft);
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(0,0,0,.03)), var(--parchment-warm);
  border: 1px solid rgba(122,104,80,.4);
  padding: 8px 14px;
  cursor: pointer;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 2px 5px rgba(58,46,34,.18);
  transition: color .18s var(--ease), background .18s var(--ease),
              border-color .18s var(--ease), transform .12s var(--ease);
}
.tool:hover { color: var(--oxblood); border-color: rgba(90,26,31,.45); }
.tool:active:not(:disabled) { transform: translateY(1px) scale(.98); }
.tool:disabled { opacity: .42; cursor: default; }
.tool-glyph { font-size: 1.15em; color: var(--oxblood); transform: translateY(-1px); }
.tool-count {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15em;
  color: var(--gold-deep);
  letter-spacing: 0;
}
/* A brief gilded flash when a helper is used. */
.tool.flash {
  animation: tool-flash .5s var(--ease);
}
@keyframes tool-flash {
  0% { background: var(--gold-bright); color: var(--oxblood-deep); }
  100% { background: var(--parchment-warm); }
}

/* The framed board holds the stacked tiles. Wider than the square games. */
.board-frame {
  width: min(820px, 96vw);
  display: flex;
  justify-content: center;
}
#board {
  display: block;
  touch-action: manipulation;
  cursor: pointer;
  border-radius: 6px;
  max-width: 100%;
  /* A faint candle-glow vignette behind the canvas pixels. */
  background:
    radial-gradient(120% 80% at 50% 18%, rgba(227,183,84,.10), rgba(227,183,84,0) 60%),
    linear-gradient(180deg, #1b1410 0%, #221a12 54%, #2a2015 100%);
}

/* Instruction caption floats over the board until the first match. */
.hint-overlay {
  position: absolute;
  left: 50%;
  bottom: clamp(12px, 5%, 26px);
  transform: translateX(-50%);
  margin: 0;
  width: max-content;
  max-width: 88%;
  text-align: center;
  font-family: var(--hand);
  font-style: italic;
  font-size: clamp(13px, 3.4vw, 17px);
  color: var(--gold-bright);
  text-shadow: 0 1px 0 rgba(0,0,0,.55), 0 0 14px rgba(227,183,84,.35);
  pointer-events: none;
  opacity: 1;
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.hint-overlay.gone {
  opacity: 0;
  transform: translateX(-50%) translateY(8px);
}

/* Seal flourishes: a gilded face on a win, a tactile spin on deal. */
.seal-face { line-height: 1; transition: transform .3s var(--ease); }
.seal.won { background: radial-gradient(circle at 38% 32%, var(--gold-bright), var(--gold) 55%, var(--gold-deep) 100%); }
.seal:active .seal-face { transform: rotate(90deg); }

@media (max-width: 460px) {
  .hud { gap: 10px; }
  .tools { gap: 7px; }
  .tool { padding: 7px 10px; letter-spacing: .08em; }
}
