/* ============================================================
   Bridlewood — screens/w2.css
   Styles owned by screens/wilds.js + screens/home.js only.
   Tokens per design_handoff_bridlewood/README.md; app.css owns
   the shell (tab bar, sheets, pills, state blocks).
   ============================================================ */

/* ==== WILDS ==== */

.wx-head {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 22px 12px;
}
.wx-title {
  font-family: 'Newsreader', serif;
  font-size: 27px;
  font-weight: 600;
  color: var(--forest-ink);
  line-height: 1.05;
}
.wx-sub {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 500;
  margin-top: 2px;
}

/* region trail */
.wx-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 18px 22px;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-deep) 100%);
}

.wx-card {
  position: relative;
  display: block;
  width: 100%;
  height: 92px;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 12px;
  text-align: left;
  box-shadow: var(--shadow-region);
  transition: transform .12s;
}
.wx-card:active { transform: scale(0.98); }
.wx-card.locked { box-shadow: none; }

.wx-art { position: absolute; inset: 0; }
.wx-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20, 22, 16, 0.62) 0%, rgba(20, 22, 16, 0.28) 52%, transparent 78%);
}
.wx-lockveil { position: absolute; inset: 0; background: rgba(36, 33, 26, 0.5); }

.wx-card-in {
  position: relative;
  height: 100%;
  padding: 15px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.wx-card-main { min-width: 0; }
.wx-card-name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'Newsreader', serif;
  font-size: 18px;
  font-weight: 600;
  color: #FBF6EC;
  line-height: 1.1;
  white-space: nowrap;
}
.wx-moon-chip {
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #2A2047;
  background: #C9B8F0;
  padding: 2px 7px;
  border-radius: 10px;
}
.wx-card-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: rgba(255, 246, 236, 0.85);
  font-weight: 500;
  margin-top: 4px;
  white-space: nowrap;
}
.wx-act {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 18px;
  white-space: nowrap;
}
.wx-act.hunt { color: #23261F; background: var(--sage-pale); }
.wx-act.hunt-moon { color: #2A2047; background: #C9B8F0; }
.wx-act.unlock {
  font-size: 11px;
  color: #E7DEC9;
  background: rgba(20, 18, 12, 0.4);
  padding: 8px 13px;
}

/* --- encounter overlay (dark stage — charcoal, never #000) --- */

.wx-enc {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  /* --wx-scene is set inline per region (plain gradient placeholders until
     Alice draws real scenery); charcoal stage is the fallback. */
  background: var(--wx-scene, radial-gradient(120% 70% at 50% 20%, #2E312A 0%, #23251F 55%, #1D1F1A 100%));
  animation: bwFade .2s ease;
}

.wx-enc-top {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: calc(18px + env(safe-area-inset-top)) 20px 0;
}
.wx-enc-region {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 246, 236, 0.78);
}
.wx-timer {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 246, 236, 0.42);
  margin-top: 3px;
  min-height: 14px;
  font-variant-numeric: tabular-nums;
}
.wx-enc-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(12, 10, 7, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FBF6EC;
}

/* creature stage */
.wx-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  text-align: center;
}
.wx-medal-wrap { position: relative; animation: wxBob 3.4s ease-in-out infinite; }
.wx-halo {
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 250, 238, 0.18), transparent 70%);
}
.wx-halo.glow {
  inset: -30px;
  background: radial-gradient(circle, rgba(201, 184, 240, 0.4), transparent 70%);
  animation: wxGlow 2.4s ease-in-out infinite;
}
.wx-medal {
  position: relative;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  border: 5px solid rgba(251, 246, 236, 0.82);
  box-shadow: 0 16px 34px -12px rgba(0, 0, 0, 0.55);
}
.wx-medal.shake { animation: wxShake .5s ease; }
.wx-horn {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%) rotate(8deg);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
}
.wx-shimmer {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, rgba(232, 222, 250, 0.32), rgba(40, 30, 60, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  color: #E8DEFA;
}
.wx-stage-icon { color: rgba(251, 246, 236, 0.8); }
.wx-stage-text {
  margin-top: 28px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
  max-width: 22em;
}
.wx-rarity {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.wx-stage-title {
  font-family: 'Newsreader', serif;
  font-size: 27px;
  font-weight: 600;
  color: #FBF6EC;
  line-height: 1.14;
  margin-top: 3px;
}
.wx-stage-sub {
  font-size: 13px;
  color: rgba(255, 246, 236, 0.9);
  font-weight: 500;
  margin-top: 4px;
  line-height: 1.45;
}

/* action panel (paper, slides up) */
.wx-panel {
  flex-shrink: 0;
  background: var(--paper);
  border-radius: 26px 26px 0 0;
  padding: 20px 20px calc(24px + env(safe-area-inset-bottom));
  animation: wxSheet .34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.wx-stat-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.wx-stat-label { font-size: 13px; font-weight: 700; color: var(--forest-ink); }
.wx-stat-val { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--sage-ink); }

.wx-segs { display: flex; gap: 3px; margin-bottom: 11px; }
.wx-seg { flex: 1; height: 10px; border-radius: 2px; background: var(--off-bg); }
.wx-seg.on { background: var(--sage-ink); }
.wx-segs.inline { flex: 1; margin-bottom: 0; gap: 2.5px; min-width: 0; }
.wx-segs.inline .wx-seg { height: 8px; }

.wx-hidden-note { font-size: 11.5px; color: var(--text-faint); margin-bottom: 5px; }
.wx-attempts { font-size: 11.5px; font-weight: 600; min-height: 15px; color: var(--text-faint); }
.wx-attempts.miss { color: var(--miss); }

.wx-btn-rope {
  display: block;
  width: 100%;
  margin-top: 13px;
  text-align: center;
  background: var(--forest);
  color: var(--paper-text);
  font-size: 15px;
  font-weight: 600;
  padding: 14px;
  border-radius: 14px;
  transition: transform .1s;
}
.wx-btn-rope:active { transform: scale(0.96); }
.wx-btn-rope[disabled] { opacity: 0.55; }

.wx-shoo {
  display: block;
  margin: 10px auto 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-faint);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.wx-row { display: flex; gap: 9px; margin-top: 15px; }
.wx-btn-ghost {
  flex: 1;
  text-align: center;
  background: var(--btn2-bg);
  border: 1px solid var(--btn2-border);
  color: var(--btn2-ink);
  font-size: 14px;
  font-weight: 600;
  padding: 13px;
  border-radius: 13px;
  transition: transform .1s;
}
.wx-btn-ghost:active { transform: scale(0.96); }
.wx-btn-go {
  flex: 1;
  text-align: center;
  background: var(--forest);
  color: var(--paper-text);
  font-size: 14px;
  font-weight: 600;
  padding: 13px;
  border-radius: 13px;
  transition: transform .1s;
}
.wx-btn-go:active { transform: scale(0.96); }
.wx-btn-moon {
  flex: 1.4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: #4A3A6E;
  color: #EBE3FA;
  font-size: 14.5px;
  font-weight: 600;
  padding: 14px;
  border-radius: 14px;
  transition: transform .1s;
}
.wx-btn-moon:active { transform: scale(0.96); }
.wx-btn-moon[disabled] { opacity: 0.55; }
.wx-btn-dis {
  flex: 1;
  text-align: center;
  background: var(--off-bg);
  color: var(--muted-2);
  font-size: 14px;
  font-weight: 600;
  padding: 13px;
  border-radius: 13px;
  cursor: not-allowed;
}

.wx-body { text-align: center; font-size: 13.5px; color: var(--ink-3); line-height: 1.5; }
.wx-body-sub { text-align: center; font-size: 12px; color: var(--text-faint); margin-top: 4px; }

.wx-caught-head { text-align: center; margin-bottom: 13px; }
.wx-caught-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage-ink);
}
.wx-caught-name {
  font-family: 'Newsreader', serif;
  font-size: 21px;
  font-weight: 600;
  color: var(--forest-ink);
  margin-top: 2px;
  overflow-wrap: anywhere;
}
.wx-caught-note { font-size: 12px; color: var(--text-mid); margin-top: 2px; }
.wx-rar-badge {
  display: inline-block;
  margin-top: 7px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 10px;
  text-transform: uppercase;
}

.wx-full { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.wx-full .lbl { font-size: 12px; font-weight: 600; color: var(--ink-3); width: 56px; flex-shrink: 0; }
.wx-full .val { font-size: 12px; font-weight: 700; color: var(--forest-ink); width: 34px; text-align: right; flex-shrink: 0; }

.wx-food {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--text-soft);
}
.wx-food b { color: var(--forest-ink); }
.wx-ill { text-align: center; font-size: 12px; font-weight: 600; color: var(--clay); margin-top: 8px; }
.wx-seedline { text-align: center; font-size: 12px; color: var(--sage-ink); font-weight: 600; margin-top: 6px; }

/* unlock confirm card */
.wx-ask {
  position: absolute;
  left: 24px;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--paper);
  border-radius: 22px;
  padding: 24px;
  text-align: center;
  animation: wxPop .3s ease both;
}
.wx-ask-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--btn2-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  color: var(--olive);
}
.wx-ask-title {
  font-family: 'Newsreader', serif;
  font-size: 21px;
  font-weight: 600;
  color: var(--forest-ink);
}
.wx-ask-body { font-size: 13.5px; color: var(--text-soft); line-height: 1.5; margin-top: 6px; }

@keyframes wxBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes wxGlow { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@keyframes wxShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-9px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(4px); }
}
@keyframes wxPop {
  0% { transform: translateY(-50%) scale(0.6); opacity: 0; }
  60% { transform: translateY(-50%) scale(1.08); }
  100% { transform: translateY(-50%) scale(1); opacity: 1; }
}
@keyframes wxSheet { from { transform: translateY(36px); } to { transform: translateY(0); } }

/* ==== HOME ==== */

.hx-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 12px 16px 20px;
}

.hx-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 4px 0;
}
.hx-id { min-width: 0; }
.hx-greet { font-size: 13px; color: var(--muted); font-weight: 500; }
.hx-yard-row { display: flex; align-items: center; gap: 7px; min-width: 0; }
.hx-yard {
  font-family: 'Newsreader', serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--forest-ink);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hx-pencil {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--card);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: transform .1s;
}
.hx-pencil:active { transform: scale(0.92); }

/* vet alert (clay) */
.hx-vet {
  flex-shrink: 0;
  width: 100%;
  text-align: left;
  margin-top: 14px;
  background: var(--clay-bg);
  border: 1px solid var(--clay-border);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform .12s;
}
.hx-vet:active { transform: scale(0.98); }
.hx-vet-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--clay-chip);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clay-strong);
  flex-shrink: 0;
}
.hx-vet-head { font-size: 13.5px; font-weight: 700; color: var(--clay-head); }
.hx-vet-sub { font-size: 11.5px; color: var(--clay-ink); margin-top: 1px; }
.hx-vet-cta { font-size: 12px; font-weight: 700; color: var(--clay-strong); white-space: nowrap; }

/* tasks carousel */
.hx-carousel {
  display: flex;
  gap: 11px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin-top: 13px;
}
.hx-taskcard {
  flex: 0 0 100%;
  scroll-snap-align: center;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 15px 16px;
}
.hx-taskcard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}
.hx-taskcard-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--olive);
}
.hx-taskcard-title.week { color: var(--sage-ink); }
.hx-taskcard-count { font-size: 11.5px; color: var(--sage-faint); font-weight: 700; }

.hx-bar {
  height: 7px;
  border-radius: 5px;
  background: var(--line);
  overflow: hidden;
  margin-bottom: 13px;
}
.hx-bar-fill {
  height: 100%;
  border-radius: 5px;
  background: var(--sage);
  transition: width .4s;
}
.hx-bar-fill.gold { background: var(--gold); }

.hx-task { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.hx-tick {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: 2px solid var(--dash);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #FFF;
}
.hx-tick.done { border: none; background: var(--sage); }
.hx-tick.done.gold { background: var(--gold); }
.hx-task-label { font-size: 13.5px; flex: 1; color: var(--text-mid); min-width: 0; }
.hx-task-label.done { color: var(--ink-3); }
.hx-task-prog { font-size: 11.5px; font-weight: 700; color: var(--sage-faint); white-space: nowrap; }
.hx-task-reward { font-size: 12px; font-weight: 700; color: var(--reward-ink); }
.hx-task-reward.done { color: var(--sage-faint); }
.hx-taskfoot { font-size: 11px; color: var(--muted-2); margin-top: 4px; }
.hx-taskfoot .star { color: var(--gold); }
.hx-empty { font-size: 12.5px; color: var(--muted-2); padding: 6px 0 2px; }

.hx-dots { display: flex; justify-content: center; gap: 6px; margin-top: 9px; }
.hx-dot {
  width: 7px;
  height: 7px;
  border-radius: 4px;
  background: var(--stone);
  transition: all .25s;
}
.hx-dot.on { width: 18px; background: var(--forest-text); }

/* glance grid */
.hx-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  margin-top: 14px;
}
.hx-tile {
  text-align: left;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 17px;
  padding: 14px;
  transition: transform .12s;
}
.hx-tile:active { transform: scale(0.97); }
.hx-tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.hx-tile-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--meadow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--meadow-ink);
}
.hx-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.hx-badge.clay { color: var(--clay); background: var(--clay-bg); }
.hx-badge.sage { color: var(--sage-ink); background: var(--meadow); }
.hx-badge.gold { color: var(--amber-ink); background: var(--amber-bg); }
.hx-badge.mute { color: var(--muted); background: var(--seg-bg); }
.hx-tile-name { font-size: 14.5px; font-weight: 700; color: var(--forest-ink); }
.hx-tile-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==== WILDS: breed browser sheet (Alice's design, 16 Jul) ==== */

.wx-breeds-body { padding: 14px 20px calc(26px + env(safe-area-inset-bottom)); max-height: 72vh; }
.wx-breeds-title {
  font-family: 'Newsreader', serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--forest-ink);
  margin-top: 10px;
}
.wx-breeds-sub { font-size: 12.5px; color: var(--muted); margin: 3px 0 14px; }

.wx-breed {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 11px 13px;
  margin-bottom: 9px;
}
.wx-breed-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.wx-breed-name { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.wx-colours {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: 7px;
}
.wx-colour {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
}
.wx-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.wx-dot.r-common { background: #9CA88E; }
.wx-dot.r-uncommon { background: #5C7350; } /* rarity = brand, stays literal */
.wx-dot.r-rare { background: #C5A662; }
.wx-dot.r-very-rare { background: #6B53A6; }

.wx-fantasy-head {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--moon);
  margin: 14px 0 8px;
}
.wx-breed-fantasy { border-color: var(--moon-border); background: var(--moon-bg); }
.wx-fantasy-note { font-size: 12px; color: var(--moon); margin-top: 5px; font-style: italic; }
