/* Cinderfall - Manu Arcade No. XIII
   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. */

/* The gold gauges (level + best) lean warmer than the oxblood ones. */
.gauge-glyph.gold { color: var(--gold-deep); }

/* The well is a tall pane. Give the frame a width budget so it does not
   collapse around the canvas; the renderer sizes the canvas from this width
   (well columns + the hold/next rail) and the viewport height. */
.board-frame {
  width: min(480px, 96vw);
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}
#board {
  display: block;
  touch-action: none;        /* we handle swipe ourselves; stop the page scrolling */
  cursor: pointer;
  border-radius: 6px;
  max-width: 100%;
}

/* Instruction caption floats just below the well until the first move. */
.hint-overlay {
  position: absolute;
  left: 50%;
  bottom: -26px;
  transform: translateX(-50%);
  margin: 0;
  width: max-content;
  max-width: 96vw;
  text-align: center;
  font-family: var(--hand);
  font-style: italic;
  font-size: clamp(12px, 3.1vw, 16px);
  color: var(--ink-light);
  pointer-events: none;
  opacity: 1;
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.hint-overlay.gone {
  opacity: 0;
  transform: translateX(-50%) translateY(8px);
}

/* The seal "lose" treatment, mirroring the sibling games: the warm oxblood
   wax cools to ash when the hearth goes cold. */
.seal-face { line-height: 1; transition: transform .3s var(--ease); }
.seal.lose { background: radial-gradient(circle at 38% 32%, #6b5a48, #3a2e22 60%, #1a1410 100%); }
.seal:active .seal-face { transform: rotate(-90deg); }

/* On-screen control pad: a warm parchment cluster for touch + click play.
   Hidden on pointer-fine (mouse/keyboard) screens, shown on touch. */
.pad {
  display: none;
  width: min(480px, 96vw);
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 4px;
  -webkit-user-select: none;
  user-select: none;
}
.pad-btn {
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid rgba(122, 104, 80, .4);
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(0, 0, 0, .04)), var(--parchment-deep);
  color: var(--ink-soft);
  border-radius: 10px;
  padding: 14px 0;
  font-size: 22px;
  font-family: var(--display);
  line-height: 1;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 246, 224, .4), 0 2px 5px rgba(58, 46, 34, .22);
  transition: transform .08s var(--ease), filter .12s var(--ease), background .12s var(--ease);
  touch-action: manipulation;
}
.pad-btn.pressed,
.pad-btn:active {
  transform: translateY(1px) scale(.97);
  filter: brightness(1.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(0, 0, 0, .02)), var(--parchment-warm);
}
.pad-wide {
  grid-column: span 2;
  font-family: var(--caps);
  font-size: 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.pad-drop {
  grid-column: span 3;
  color: var(--parchment);
  border-color: var(--oxblood);
  background: linear-gradient(180deg, var(--oxblood-bright), var(--oxblood));
  box-shadow: inset 0 1px 0 rgba(227, 183, 84, .3), 0 2px 6px rgba(61, 15, 18, .3);
}
.pad-drop.pressed,
.pad-drop:active { background: linear-gradient(180deg, var(--oxblood), var(--oxblood-deep)); }

/* Show the pad on touch-first devices, where keyboard play is unavailable. */
@media (hover: none) and (pointer: coarse) {
  .pad { display: grid; }
  .hint-overlay { display: none; }
}

@media (max-width: 420px) {
  .hud { gap: 9px; }
  .gauge { font-size: clamp(18px, 5vw, 24px); }
}
