/* Flood — Manu Arcade No. XXIV
   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. */

:root {
  /* Six manuscript pigments, matching the canvas renderer's base colours so the
     swatches read as the same inks the board floods with. */
  --flood-1: #2f6d8c;  /* lapis */
  --flood-2: #2f7d5f;  /* verdigris */
  --flood-3: #a3302c;  /* vermilion */
  --flood-4: #5a3a86;  /* violet */
  --flood-5: #b9742e;  /* sienna */
  --flood-6: #c2a02f;  /* gold ochre */
}

/* Board-size selector mirrors the toggle look as a segmented group. */
.sizes { display: inline-flex; gap: 6px; }
.size {
  font-family: var(--caps); text-transform: uppercase; letter-spacing: .12em;
  font-size: 12px; color: var(--ink-light); background: transparent;
  border: 1px solid rgba(122,104,80,.35); padding: 6px 10px; cursor: pointer;
  border-radius: 6px;
  transition: color .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
}
.size:hover { color: var(--oxblood); border-color: rgba(90,26,31,.4); }
.size[aria-pressed="true"] {
  color: var(--parchment); background: var(--oxblood); border-color: var(--oxblood);
}

/* The "moves / limit" gauge keeps a soft slash between the two figures. */
.gauge-sep { color: var(--ink-light); margin: 0 1px; font-weight: 400; }
.gauge-glyph.gold { color: var(--gold-deep); }

/* The framed board is a square pane. Give the frame an explicit width so it does
   not collapse around the canvas (the renderer sizes the canvas from this). */
.board-frame {
  width: min(520px, 94vw);
  display: flex;
  justify-content: center;
}
#board {
  display: block;
  touch-action: manipulation;
  cursor: pointer;
  border-radius: 6px;
  max-width: 100%;
}

/* Instruction caption floats over the board until the first spill. */
.hint-overlay {
  position: absolute;
  left: 50%;
  bottom: clamp(12px, 5%, 26px);
  transform: translateX(-50%);
  margin: 0;
  width: max-content;
  max-width: 90%;
  text-align: center;
  font-family: var(--hand);
  font-style: italic;
  font-size: clamp(13px, 3.4vw, 16px);
  color: var(--parchment);
  text-shadow: 0 1px 2px rgba(26,20,16,.7), 0 0 12px rgba(61,15,18,.4);
  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 pigment picker: six tappable swatches under the board. */
.picker {
  display: flex;
  gap: clamp(8px, 2.2vw, 14px);
  flex-wrap: wrap;
  justify-content: center;
  max-width: min(520px, 94vw);
}
.swatch {
  --swatch: #888;
  position: relative;
  width: clamp(46px, 13vw, 64px);
  height: clamp(46px, 13vw, 64px);
  border-radius: 12px;
  border: 2px solid rgba(40,30,20,.35);
  cursor: pointer;
  padding: 0;
  background:
    linear-gradient(180deg, rgba(255,247,224,.34), rgba(255,247,224,0) 52%),
    radial-gradient(120% 120% at 30% 22%, color-mix(in srgb, var(--swatch) 78%, white), var(--swatch) 60%, color-mix(in srgb, var(--swatch) 70%, black) 100%);
  box-shadow: inset 0 1px 0 rgba(255,247,224,.3), 0 4px 10px rgba(58,46,34,.3);
  transition: transform .12s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease), filter .18s var(--ease);
  display: grid;
  place-items: center;
}
.swatch:hover { transform: translateY(-3px) scale(1.04); filter: brightness(1.08); }
.swatch:active { transform: translateY(0) scale(.94); }

.swatch-key {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(18px, 4.6vw, 24px);
  color: rgba(255,247,224,.92);
  text-shadow: 0 1px 2px rgba(26,20,16,.55);
  pointer-events: none;
  user-select: none;
}

/* The pigment you already own gets a gilded ring and dims (flooding it is a
   wasted move). It is still pickable but reads as the "current" wash. */
.swatch.current {
  border-color: var(--gold-bright);
  box-shadow: inset 0 1px 0 rgba(255,247,224,.3), 0 0 0 2px rgba(227,183,84,.6), 0 4px 12px rgba(58,46,34,.34);
  filter: brightness(.84) saturate(.9);
  cursor: default;
}
.swatch.current:hover { transform: none; filter: brightness(.86) saturate(.9); }

/* Seal flourishes mirror the sibling games. */
.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.lose { background: radial-gradient(circle at 38% 32%, #6b5a48, #3a2e22 60%, #1a1410 100%); }
.seal:active .seal-face { transform: rotate(90deg); }

@media (max-width: 420px) {
  .hud { gap: 10px; }
  .sizes { gap: 4px; }
  .size { padding: 6px 8px; letter-spacing: .08em; }
  .picker { gap: 8px; }
}
