/* Wardlight game-specific styling. The shell chrome lives in palette.css.
   The play surface is a DARK almanac map (so warm ward glows and cool shades
   read clearly), framed by the shared parchment board-frame. The shop tray is
   a row of DOM buttons below the map. No em dashes in on-screen copy. */

.gauge-glyph.gold { color: var(--gold-deep); }

/* The board frame holds a dark canvas; give it a deeper inner bevel. */
.board-frame {
  width: 100%;
  max-width: 760px;
}
.board-frame canvas {
  background: #110c08;
  cursor: pointer;
}

/* Floating hint over the canvas, fades once play begins. */
.hint-overlay {
  position: absolute;
  left: 50%;
  bottom: clamp(14px, 3vw, 22px);
  transform: translateX(-50%);
  margin: 0;
  padding: 7px 14px;
  max-width: 88%;
  text-align: center;
  font-family: var(--hand);
  font-style: italic;
  font-size: clamp(12px, 2.4vw, 15px);
  color: var(--cream);
  background: rgba(26, 20, 16, 0.62);
  border: 1px solid rgba(200, 156, 58, 0.4);
  border-radius: 8px;
  pointer-events: none;
  transition: opacity 0.5s var(--ease);
}
.hint-overlay.gone { opacity: 0; }

/* ---- Ward shop tray ------------------------------------------------------ */
.tray {
  display: flex;
  gap: clamp(7px, 1.4vw, 12px);
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 760px;
}

.ward-btn {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  grid-template-areas:
    "icon name"
    "icon meta";
  align-items: center;
  gap: 1px 9px;
  flex: 1 1 150px;
  min-width: 130px;
  padding: 9px 12px;
  text-align: left;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.05)), var(--parchment-deep);
  border: 1px solid rgba(122, 104, 80, 0.4);
  border-radius: 9px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 2px 6px rgba(58, 46, 34, 0.18);
  color: var(--ink);
  transition: transform 0.12s var(--ease), border-color 0.18s var(--ease),
    background 0.18s var(--ease), box-shadow 0.18s var(--ease), opacity 0.18s var(--ease);
}
.ward-btn:hover { transform: translateY(-1px); border-color: rgba(90, 26, 31, 0.5); }
.ward-btn:active { transform: translateY(0) scale(0.98); }

.ward-btn[aria-pressed="true"] {
  border-color: var(--oxblood);
  background: linear-gradient(180deg, rgba(217, 148, 65, 0.22), rgba(217, 148, 65, 0.05)), var(--parchment-warm);
  box-shadow: inset 0 0 0 1px rgba(200, 156, 58, 0.55), 0 4px 12px rgba(90, 26, 31, 0.28);
}

/* Greyed when the player cannot afford this ward. */
.ward-btn.unaffordable {
  opacity: 0.5;
  filter: saturate(0.7);
}

.ward-icon {
  grid-area: icon;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 17px;
  color: var(--cream);
}
.ward-icon.taper  { background: radial-gradient(circle at 38% 30%, #f4d27a, #d99441 60%, #9c5a1e); color: #2a1a08; }
.ward-icon.beacon { background: radial-gradient(circle at 38% 30%, #ffe9a8, #e3b754 55%, #9c7826); color: #2a1f08; }
.ward-icon.frost  { background: radial-gradient(circle at 38% 30%, #cfeaff, #6fb0d6 55%, #3a6d8c); color: #08202c; }
.ward-icon.send   { background: radial-gradient(circle at 38% 30%, #d9b4b6, #7a2228 60%, #3d0f12); color: var(--gold-bright); }

.ward-name {
  grid-area: name;
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.05;
}
.ward-cost {
  position: absolute;
  top: 8px;
  right: 11px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-variant-numeric: tabular-nums;
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  color: var(--oxblood);
}
.ward-cost .dot { color: var(--gold-deep); font-size: 9px; }
.ward-role {
  grid-area: meta;
  font-family: var(--caps);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 10px;
  color: var(--ink-light);
}

/* The "Sound the Horn" button reads as an action, not a buy. */
.ward-btn.send {
  flex: 1 1 140px;
  background: linear-gradient(180deg, rgba(122, 34, 40, 0.14), rgba(122, 34, 40, 0.03)), var(--parchment-deep);
}
.ward-btn.send .ward-name { color: var(--oxblood); }
.ward-btn.send[disabled] { opacity: 0.45; cursor: default; transform: none; }
.ward-btn.send.ready { animation: horn-pulse 1.8s var(--ease) infinite; }

@keyframes horn-pulse {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 2px 6px rgba(58, 46, 34, 0.18); }
  50% { box-shadow: inset 0 0 0 1px rgba(200, 156, 58, 0.6), 0 4px 14px rgba(90, 26, 31, 0.3); }
}

@media (prefers-reduced-motion: reduce) {
  .ward-btn.send.ready { animation: none; }
}

@media (max-width: 460px) {
  .ward-btn { flex: 1 1 46%; min-width: 0; padding: 8px 10px; }
  .ward-name { font-size: 15px; }
}

/* ---- Reckon's scales: the DOM duel board ---- */
.duel-frame { padding: 0; }
.duel {
  min-height: 380px; border-radius: 10px; padding: 26px 18px 34px;
  background:
    radial-gradient(120% 90% at 50% 8%, rgba(58, 44, 29, 0.55), rgba(20, 16, 11, 0) 55%),
    #17110c;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px;
}
.duel-cat {
  margin: 0; font-family: "IM Fell English SC", "Cormorant Garamond", Georgia, serif;
  font-size: clamp(15px, 2.6vw, 19px); letter-spacing: .14em; text-transform: uppercase;
  color: #e3b754; text-align: center;
}
.duel-row { display: flex; align-items: stretch; gap: 14px; width: 100%; max-width: 640px; }
.duel-or {
  align-self: center; font-family: "Cormorant Garamond", Georgia, serif; font-style: italic;
  color: rgba(246, 238, 214, 0.55); font-size: 18px; padding: 0 2px;
}
.duel-card {
  flex: 1; min-width: 0; min-height: 190px; padding: 18px 14px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: linear-gradient(180deg, #241b11, #1b1410);
  border: 1px solid rgba(227, 183, 84, 0.35); border-radius: 12px;
  color: #f6eed6; font-family: "Cormorant Garamond", Georgia, serif;
  transition: transform .14s ease, border-color .14s ease, box-shadow .2s ease;
}
.duel-card:hover:not(:disabled) { transform: translateY(-2px); border-color: rgba(227, 183, 84, 0.7); }
.duel-card:disabled { cursor: default; }
.duel-label { font-size: clamp(20px, 3.6vw, 27px); line-height: 1.15; text-wrap: balance; }
.duel-value {
  font-size: clamp(15px, 2.4vw, 18px); color: #e3b754; min-height: 1.3em;
  opacity: 0; transform: translateY(4px); transition: opacity .3s ease .12s, transform .3s ease .12s;
  font-variant-numeric: tabular-nums;
}
.is-revealed .duel-value { opacity: 1; transform: none; }
.duel-card.is-right {
  border-color: #e3b754;
  box-shadow: 0 0 0 1px rgba(227, 183, 84, 0.6), 0 0 26px rgba(227, 183, 84, 0.25), inset 0 0 18px rgba(227, 183, 84, 0.08);
}
.duel-card.is-wrong {
  border-color: rgba(176, 64, 58, 0.9);
  box-shadow: 0 0 0 1px rgba(176, 64, 58, 0.6), 0 0 22px rgba(176, 64, 58, 0.22);
  animation: reckon-shake .4s ease;
}
.duel-card.is-dim { opacity: .62; }
.duel-row.enter .duel-card { animation: reckon-enter .3s ease backwards; }
.duel-row.enter .duel-card:last-of-type { animation-delay: .07s; }
@keyframes reckon-enter { from { opacity: 0; transform: translateY(8px); } }
@keyframes reckon-shake { 0%,100% { transform: none; } 25% { transform: translateX(-5px); } 60% { transform: translateX(4px); } }
@media (max-width: 560px) {
  .duel-row { flex-direction: column; }
  .duel-or { padding: 2px 0; }
  .duel-card { min-height: 130px; }
}
@media (prefers-reduced-motion: reduce) {
  .duel-card, .duel-value { transition: none; }
  .duel-row.enter .duel-card, .duel-card.is-wrong { animation: none; }
}
