/* 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; }
}
