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

/* ---- Waxcomb: the hive board ---- */
.comb-frame { padding: 0; }
.comb-board {
  border-radius: 10px; padding: 22px 16px 26px;
  background:
    radial-gradient(120% 90% at 50% 6%, rgba(58, 44, 29, 0.5), rgba(20, 16, 11, 0) 55%),
    #17110c;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.rank-row { display: flex; align-items: center; gap: 12px; width: min(420px, 92%); }
.rank-name {
  font-family: "IM Fell English SC", "Cormorant Garamond", Georgia, serif;
  font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: #e3b754; white-space: nowrap;
}
.rank-bar { flex: 1; height: 6px; border-radius: 3px; background: rgba(227, 183, 84, 0.16); overflow: hidden; }
.rank-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #caa14a, #e3b754); border-radius: 3px; transition: width .4s ease; }
.entry {
  margin: 0; min-height: 34px; font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 26px; letter-spacing: .12em; text-transform: uppercase; color: #f6eed6; text-align: center;
}
.entry b { font-weight: 600; }
.entry b.c { color: #e3b754; }
.entry .ghost { color: rgba(246, 238, 214, 0.3); font-style: italic; text-transform: none; letter-spacing: 0; font-size: 19px; }
.word-toast {
  margin: -6px 0 0; min-height: 22px; font-family: "Cormorant Garamond", Georgia, serif; font-style: italic;
  font-size: 16px; color: rgba(246, 238, 214, 0.75); opacity: 0; transition: opacity .2s ease; text-align: center;
}
.word-toast.on { opacity: 1; }
.word-toast.good { color: #e3b754; }
.word-toast.bad { color: #c96b52; }
.word-toast.pan { color: #f2d18b; font-style: normal; letter-spacing: .08em; }

.comb { position: relative; width: 300px; height: 300px; margin: 4px 0; }
.cell {
  position: absolute; width: 96px; height: 110px; cursor: pointer; border: none;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: linear-gradient(180deg, #2c2114, #221812);
  color: #f6eed6; font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 34px; text-transform: uppercase; font-weight: 600;
  transition: transform .12s ease, filter .12s ease;
}
.cell:hover { filter: brightness(1.25); }
.cell:active { transform: scale(0.94); }
.cell.centre { background: linear-gradient(180deg, #e3b754, #caa14a); color: #2a1c12; }
/* two on top, two mid + centre, two below */
.cell:nth-child(1) { left: 51px;  top: 0; }
.cell:nth-child(2) { left: 153px; top: 0; }
.cell:nth-child(3) { left: 0;     top: 88px; }
.cell:nth-child(4) { left: 102px; top: 88px; }   /* the golden centre */
.cell:nth-child(5) { left: 204px; top: 88px; }
.cell:nth-child(6) { left: 51px;  top: 176px; }
.cell:nth-child(7) { left: 153px; top: 176px; }

.comb-actions { display: flex; gap: 10px; }
.found { width: min(520px, 94%); margin-top: 6px; }
.found-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: "IM Fell English SC", "Cormorant Garamond", Georgia, serif;
  font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: rgba(246, 238, 214, 0.65);
  border-bottom: 1px solid rgba(227, 183, 84, 0.25); padding-bottom: 6px; margin-bottom: 8px;
}
.found-share { background: none; border: none; color: #e3b754; font: inherit; cursor: pointer; text-decoration: underline; }
.found-list {
  list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px;
  font-family: "Cormorant Garamond", Georgia, serif; font-size: 17px; color: #f6eed6; min-height: 28px;
}
.found-list li.pan { color: #e3b754; }
.found-list li.pan::after { content: " ✦"; }
@media (max-width: 420px) {
  .comb { transform: scale(0.86); margin: -16px 0; }
}
