/* Arena Town — cozy painted home · town4e (measured hotspot map) */
:root {
  --bg: #1a120c;
  --parchment: #f3e2c0;
  --parchment-dark: #e0c892;
  --wood: #6b4226;
  --wood-dark: #3e2616;
  --leather: #8b5a2b;
  --brass: #c9a24a;
  --brass-bright: #efd48a;
  --ink: #2a1c12;
  --ink-soft: #5a4030;
  --sky: #87b7d8;
  --meadow: #5d8f4a;
  --good: #3d9a5f;
  --danger: #b44a4a;
  --gem: #5ec8e8;
  --gold: #e8c04a;
  --coin: #d4a84a;
  --muted: #5a4030;
  --shadow: 0 10px 28px rgba(40, 20, 8, 0.45);
  --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  font-family: var(--sans);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button { font: inherit; cursor: pointer; }
button:disabled { opacity: 0.45; cursor: not-allowed; }
a { color: inherit; text-decoration: none; }

.town-home .home {
  position: relative;
  width: 100%;
  height: 100dvh;
  height: 100vh;
  overflow: hidden;
}

/* ---- Scene (painted village; phone pans horizontally) ---- */
.scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #5a8a42;
  touch-action: pan-x;
}
.scene-pan {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
}
.scene-art {
  position: absolute;
  inset: 0;
  display: block;
}
.scene-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  user-select: none;
  pointer-events: none;
}
/* Phone portrait: wide pan fills height, spill horizontally */
@media (orientation: portrait) and (max-width: 699px) {
  .scene {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .scene::-webkit-scrollbar { display: none; }
  /* town4e: pan box is locked to the art's exact 16:9 from its REAL rendered height
     (was max(100%, 100vh*16/9) with the vh line overriding dvh — any mismatch between
     100vh and the scene's actual height made object-fit:cover crop and drift the pins). */
  .scene-pan {
    height: 100%;
    width: auto;
    aspect-ratio: 16 / 9;
    min-width: 100%;
    position: relative;
  }
  .scene-art, .scene-shade, .clouds, .map-stage {
    position: absolute;
    inset: 0;
  }
  .scene-art img {
    object-fit: cover;
    object-position: center center;
  }
}
@media (orientation: landscape), (min-width: 700px) {
  .scene-pan { width: 100%; height: 100%; }
  .scene-art img { object-position: center 42%; }
}
.scene-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 40% at 50% 0%, rgba(255, 236, 190, 0.25), transparent 60%),
    linear-gradient(180deg, transparent 70%, rgba(40, 24, 10, 0.18) 100%);
}
.clouds span {
  position: absolute;
  top: 6%;
  width: 28vw;
  height: 8vw;
  max-width: 220px;
  max-height: 60px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  filter: blur(8px);
  animation: drift 48s linear infinite;
  pointer-events: none;
}
.clouds span:nth-child(1) { left: -20%; animation-duration: 52s; }
.clouds span:nth-child(2) { left: 30%; top: 10%; width: 18vw; animation-duration: 64s; animation-delay: -20s; opacity: 0.5; }
.clouds span:nth-child(3) { left: 60%; top: 4%; width: 22vw; animation-duration: 58s; animation-delay: -35s; }
@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(120vw); }
}

.map-stage {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.first-hint {
  position: absolute;
  left: 50%;
  bottom: 18%;
  transform: translateX(-50%);
  z-index: 6;
  margin: 0;
  padding: 10px 16px;
  max-width: min(90vw, 320px);
  text-align: center;
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--parchment);
  border: 2px solid var(--brass);
  border-radius: 999px;
  box-shadow: var(--shadow);
  pointer-events: none;
  animation: hint-bob 2.2s ease-in-out infinite;
}
.first-hint[hidden] { display: none !important; }
@keyframes hint-bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-6px); }
}

/* ---- Hotspots (town4d LOCK) — invisible hit targets on painted scene ---- */
/* Cutout stickers / pin-art / parchment ribbon cards RETIRED for home map. */
.pin {
  position: absolute;
  z-index: 3;
  width: 64px;
  height: 64px;
  min-width: 56px;
  min-height: 56px;
  transform: translate(-50%, -50%);
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  color: #f3e6c8;
  filter: none;
  transition: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.pin.prod { width: 64px; height: 64px; }
.pin.feature { width: 72px; height: 72px; z-index: 4; }
.pin.capacity,
.pin.army,
.pin.trade { width: 64px; height: 64px; }
.pin:hover, .pin:focus-visible, .pin:active {
  transform: translate(-50%, -50%);
  outline: none;
  z-index: 8;
  filter: none;
}
.pin .pin-hit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: transparent;
  pointer-events: none;
}
/* Optional name: text-shadow only — no white/parchment plate */
.pin .pin-name {
  position: relative;
  z-index: 2;
  margin-top: 42%;
  padding: 0;
  max-width: 96px;
  font-family: var(--serif);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
  text-align: center;
  color: #f7ecd4;
  background: transparent;
  border: none;
  box-shadow: none;
  text-shadow:
    0 1px 2px #1a1208,
    0 0 6px rgba(26, 18, 8, 0.9),
    0 0 1px #1a1208;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
}
.pin .pin-name small {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.9;
}
.pin:hover .pin-name,
.pin:focus-visible .pin-name,
.pin:active .pin-name,
.pin.hint .pin-name,
.pin.locked .pin-name {
  opacity: 1;
}
.pin.locked .pin-locked-label {
  color: #f0d9a8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
}
/* Locked gate: tiny dark translucent tag ONLY while pressing/hovering */
.pin .pin-lock-tag {
  position: absolute;
  top: calc(100% - 4px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  padding: 2px 6px;
  max-width: 160px;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  color: #f0e0c0;
  background: rgba(18, 12, 8, 0.72);
  border-radius: 4px;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
}
.pin.locked:hover .pin-lock-tag,
.pin.locked:focus-visible .pin-lock-tag,
.pin.locked:active .pin-lock-tag {
  opacity: 1;
}
.pin.locked { filter: none; opacity: 1; }
.pin.stub { opacity: 1; filter: none; }
.pin.hint .pin-hit {
  box-shadow: 0 0 0 2px rgba(201, 162, 74, 0.35);
  animation: hotspot-hint 1.6s ease-in-out infinite;
}
@keyframes hotspot-hint {
  0%, 100% { box-shadow: 0 0 0 2px rgba(201, 162, 74, 0.2); }
  50% { box-shadow: 0 0 0 3px rgba(201, 162, 74, 0.55); }
}

/* Legacy cutout bits kept inert (DOM no longer emits them) */
.pin .pin-glow,
.pin .smoke,
.pin .pin-art,
.pin .pin-ribbon { display: none !important; }

@media (max-width: 420px) {
  .pin.feature { width: 68px; height: 68px; }
  .pin.prod { width: 60px; height: 60px; }
  .pin .pin-name { font-size: 0.68rem; }
}

/* QA only: ?hotspotDebug=1 */
body.hotspot-debug .pin .pin-hit,
body.hotspot-debug .hunt-landmark .hunt-hit {
  background: rgba(201, 162, 74, 0.18);
  outline: 1px dashed rgba(201, 162, 74, 0.65);
}
/* town4e: exact hotspot point (QA only) */
body.hotspot-debug .pin::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: #e01818;
  box-shadow: 0 0 0 2px #fff;
  pointer-events: none;
  z-index: 5;
}
body.hotspot-debug .pin .pin-name,
body.hotspot-debug .hunt-landmark .hunt-label {
  opacity: 0.85;
}

/* ---- Top HUD ---- */
.top-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  padding-top: max(10px, env(safe-area-inset-top));
  background: linear-gradient(180deg, rgba(40, 24, 10, 0.55), transparent);
  pointer-events: none;
}
.top-hud > * { pointer-events: auto; }
.menu-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 2px solid var(--brass);
  background: linear-gradient(180deg, #f3e2c0, #d9bf8e);
  color: var(--ink);
  font-size: 1.2rem;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}
.brand-mini {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  color: #fff8e8;
  text-shadow: 0 1px 4px rgba(0,0,0,0.55);
  margin-right: 4px;
}
.brand-title {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
}
.brand-sub {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
  justify-content: flex-end;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1.5px solid var(--brass);
  background: linear-gradient(180deg, #f7ebcf, #e2c992);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.pill i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.pill.gems i { background: radial-gradient(circle at 30% 30%, #b8f0ff, #2a9cc8); box-shadow: 0 0 6px #5ec8e8; }
.pill.gold i { background: radial-gradient(circle at 30% 30%, #ffe9a0, #c99620); }
.pill.coin i { background: radial-gradient(circle at 30% 30%, #f0d080, #a87828); }
.pill.pouch {
  cursor: pointer;
  font-family: inherit;
}
.pill.pouch i {
  border-radius: 4px;
  background: linear-gradient(180deg, #a07040, #6b4226);
}

.pouch-panel {
  position: absolute;
  top: 64px;
  right: 12px;
  z-index: 21;
  width: min(280px, calc(100vw - 24px));
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(165deg, #f3e2c0, #d9bf8e);
  border: 2px solid var(--brass);
  box-shadow: var(--shadow);
}
.pouch-panel[hidden] { display: none !important; }
.pouch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.sack {
  padding: 8px 6px;
  border-radius: 10px;
  background: rgba(107, 66, 38, 0.12);
  border: 1px solid rgba(107, 66, 38, 0.25);
  text-align: center;
}
.sack span {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.sack strong {
  font-size: 1rem;
  color: var(--wood-dark);
}

/* ---- Menu ---- */
.menu-fly {
  position: absolute;
  top: 60px;
  left: 12px;
  z-index: 22;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 160px;
  padding: 10px;
  border-radius: 14px;
  background: linear-gradient(165deg, #f3e2c0, #d4b888);
  border: 2px solid var(--brass);
  box-shadow: var(--shadow);
}
.menu-fly[hidden] { display: none !important; }
.menu-fly a, .menu-fly .dev-toggle {
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  background: transparent;
  border: none;
  text-align: left;
}
.menu-fly a:hover, .menu-fly a.active {
  background: rgba(107, 66, 38, 0.15);
}
.menu-fly a.active { color: var(--wood); }
.dev-toggle {
  margin-top: 4px;
  border-top: 1px dashed rgba(107, 66, 38, 0.35) !important;
  border-radius: 0 0 8px 8px !important;
  color: var(--ink-soft) !important;
  font-size: 0.78rem !important;
  cursor: pointer;
}
.dev-drawer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 6px;
}
.dev-drawer[hidden] { display: none !important; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 2px solid var(--brass);
  background: linear-gradient(180deg, #f3e2c0, #d9bf8e);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9rem;
}
.btn.sm { padding: 7px 11px; font-size: 0.78rem; }
.btn.wood {
  background: linear-gradient(180deg, #8b5a2b, #6b4226);
  color: #f7ebcf;
  border-color: #3e2616;
}
.btn.wood.danger { background: linear-gradient(180deg, #a05050, #7a3030); }
.btn.good {
  background: linear-gradient(180deg, #6aba7a, #3d9a5f);
  color: #fff;
  border-color: #2a6b42;
}
.btn.primary {
  background: linear-gradient(180deg, #efd48a, #c9a24a);
  color: var(--ink);
}

/* ---- Event medallions ---- */
.event-medals {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 18;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.medal {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2.5px solid var(--brass-bright);
  background: var(--m, #5a4a3a);
  padding: 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35), inset 0 0 0 2px rgba(255,255,255,0.15);
}
.medal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.medal .fb {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}
.medal.live {
  box-shadow: 0 0 0 3px #5ec8e8, 0 4px 12px rgba(0,0,0,0.35);
  animation: medal-pulse 1.4s ease-in-out infinite;
}
@keyframes medal-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
@media (max-width: 520px) {
  .event-medals {
    top: auto;
    bottom: 14px;
    right: 50%;
    transform: translateX(50%);
    flex-direction: row;
  }
  .medal { width: 44px; height: 44px; }
}

/* ---- Overlay / rooms ---- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(30, 18, 8, 0.62);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.overlay[hidden] { display: none !important; }
.overlay-card {
  width: min(640px, 100%);
  max-height: min(92dvh, 780px);
  overflow: auto;
  padding: 18px 16px 22px;
  border-radius: 18px 18px 0 0;
  position: relative;
  background: linear-gradient(165deg, #f7ebcf 0%, #e6cfa0 100%);
  border: 2px solid var(--brass);
  border-bottom: none;
  color: var(--ink);
  box-shadow: var(--shadow);
}
.overlay-card.store-scene {
  width: 100%;
  max-width: 100%;
  max-height: 100dvh;
  height: 100dvh;
  border-radius: 0;
  border: none;
  padding: 0;
  background: #2a1c12;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.overlay-card.store-scene #overlayBody {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.overlay-x {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 5;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 2px solid var(--brass);
  background: var(--parchment);
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
  box-shadow: var(--shadow);
}
.overlay-card h2, .overlay-card .room-title {
  margin: 0 40px 6px 0;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--wood-dark);
  letter-spacing: 0.02em;
}
.overlay-card .blurb {
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.4;
}
.room-cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.room-plate {
  width: 100%;
  max-height: 160px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--brass);
  margin: 0 0 12px;
  background: #3e2616;
}
.room-plate img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.room-plate.no-art { display: none; }

/* Healer seats */
.seat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.seat-card {
  padding: 10px;
  border-radius: 12px;
  border: 2px solid var(--brass);
  background: rgba(255, 250, 235, 0.7);
  text-align: center;
}
.seat-card strong { display: block; font-size: 0.82rem; }
.seat-card span { font-size: 0.68rem; color: var(--ink-soft); }

.clerk-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.clerk-bust {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--brass);
  background: #c9a24a;
  flex-shrink: 0;
}
.clerk-bust img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.speech, .bubble {
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff8e8;
  border: 1.5px solid var(--brass);
  margin-bottom: 12px;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--ink);
}
.mission-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mission-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--brass);
  background: #fff8e8;
  font-size: 0.85rem;
}
.mission-list a { font-weight: 700; color: var(--wood); }

.prod-yield {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

/* ---- Store scene (full-bleed) ---- */
.store-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: #2a1c12;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}
.store-stage .store-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  pointer-events: none;
}
.store-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 56px 8px 14px;
}
.store-top .room-title {
  margin: 0;
  color: #fff8e8;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}
.store-top .blurb {
  color: #f3e2c0;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  margin: 4px 0 0;
  font-size: 0.82rem;
}
.shopkeep-stand {
  position: absolute;
  z-index: 3;
  right: 6%;
  top: 18%;
  width: min(28vw, 160px);
  text-align: center;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,0.5));
}
.shopkeep-stand .sk-art {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 0;
  overflow: visible;
  border: none;
  background: transparent;
  position: relative;
  filter: drop-shadow(0 10px 14px rgba(0,0,0,0.45));
}
.shopkeep-stand.bare .sk-art {
  border: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  overflow: visible !important;
}
.shopkeep-stand.bare .sk-art img {
  object-fit: contain;
  object-position: bottom center;
  border-radius: 0;
}
.shopkeep-stand.bare .sk-fb {
  border-radius: 50%;
  width: 70%;
  aspect-ratio: 1;
  margin: 10% auto 0;
}
.shopkeep-stand .sk-art img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.shopkeep-stand .sk-fb {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.4rem;
  color: #fff8e8;
}
.shopkeep-stand .sk-name {
  margin-top: 6px;
  padding: 4px 8px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--ink);
  background: var(--parchment);
  border: 1.5px solid var(--brass);
  border-radius: 6px;
  display: inline-block;
}
.shopkeep-stand .sk-bubble {
  margin-top: 8px;
  padding: 8px 10px;
  font-size: 0.72rem;
  line-height: 1.3;
  color: var(--ink);
  background: #fff8e8;
  border: 1.5px solid var(--brass);
  border-radius: 10px;
  text-align: left;
}

.store-wares {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, rgba(40, 24, 10, 0.75) 28%);
}
.shelf-tabs, .shelf-tabs.hanging {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-bottom: 10px;
  align-items: flex-start;
}
.shelf-tabs button {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.shelf-tabs button .sign,
.shelf-tabs.hanging button {
  display: inline-block;
  min-width: 72px;
  padding: 8px 12px 10px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.95rem;
  color: #f8ecd0;
  background: linear-gradient(180deg, #6b4226, #3e2616);
  border: 2px solid var(--brass);
  border-radius: 4px 4px 8px 8px;
  box-shadow: 0 4px 0 #2a180c, 0 8px 12px rgba(0,0,0,0.35);
  transform: rotate(-1deg);
  position: relative;
}
.shelf-tabs button .sign::before,
.shelf-tabs.hanging button::before {
  content: "";
  position: absolute;
  top: -10px; left: 50%;
  width: 2px; height: 10px;
  background: #c9a24a;
  transform: translateX(-50%);
  box-shadow: -12px 0 0 #c9a24a, 12px 0 0 #c9a24a;
}
.shelf-tabs button.active .sign,
.shelf-tabs.hanging button.active,
.shelf-tabs button.active {
  background: linear-gradient(180deg, #8a5a30, #5a3a1a);
  color: #fff4d0;
  transform: rotate(1deg) scale(1.05);
}

.ware-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.ware {
  flex: 0 0 auto;
  width: 108px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 6px 10px;
  border: none;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(243, 226, 192, 0.15), transparent 40%),
    linear-gradient(180deg, #8b5a2b, #5a3518);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 4px 10px rgba(0,0,0,0.35);
  color: #fff8e8;
  position: relative;
}
.ware:disabled { opacity: 0.5; }
.ware .ware-ico {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: #f3e2c0;
  border: 2px solid var(--brass);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}
.ware .ware-ico img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ware .ware-ico .fb { position: absolute; font-size: 1.3rem; }
.ware .ware-name {
  font-family: var(--serif);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.15;
  min-height: 2.1em;
}
.ware .price-tag {
  margin-top: 2px;
  padding: 3px 8px;
  border-radius: 4px;
  background: #f7ebcf;
  color: var(--ink);
  border: 1.5px solid var(--brass);
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: 0 2px 0 #3e2616;
  transform: rotate(-2deg);
}
.ware .price-tag .strike {
  text-decoration: line-through;
  opacity: 0.55;
  font-weight: 600;
  margin-right: 4px;
}
.ware .tip-bubble {
  display: none;
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  width: 160px;
  padding: 8px;
  border-radius: 8px;
  background: #fff8e8;
  color: var(--ink);
  border: 1.5px solid var(--brass);
  font-size: 0.68rem;
  line-height: 1.3;
  z-index: 5;
  pointer-events: none;
}
.ware:hover .tip-bubble, .ware:focus-visible .tip-bubble { display: block; }

@media (min-width: 720px) {
  .overlay { align-items: center; padding: 16px; }
  .overlay-card:not(.store-scene) {
    border-radius: 18px;
    border: 2px solid var(--brass);
    max-height: min(88vh, 720px);
  }
  .overlay-card.store-scene {
    width: min(960px, 100%);
    height: min(860px, 92vh);
    max-height: 92vh;
    border-radius: 18px;
    border: 2px solid var(--brass);
  }
  .shopkeep-stand { width: 150px; top: 16%; right: 8%; }
  .ware { width: 120px; }
}

/* legacy bottom toast overridden below */
.toast[hidden] { display: none !important; }
.toast.err { border-color: var(--danger); color: var(--danger); }

.chrome .c-tr, .chrome .c-bl { display: none; }


/* Hotspot mode RESTORED town4d — painted scene + invisible hit regions (cutouts retired) */


/* ===== Shared slim world bar (matches Adventures) ===== */
.slim-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  padding-top: max(8px, env(safe-area-inset-top));
  background: linear-gradient(180deg, rgba(42, 28, 14, 0.72), transparent);
  pointer-events: none;
}
.slim-bar > * { pointer-events: auto; }

.back-town {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: linear-gradient(180deg, #f3e2c0, #d4b070);
  border: 2px solid var(--brass);
  color: var(--ink);
  font-size: 1.15rem;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(0,0,0,0.35);
}
.back-town.home-mark {
  cursor: default;
  box-shadow: 0 0 0 3px rgba(201, 162, 74, 0.35), 0 3px 10px rgba(0,0,0,0.35);
}

.coin-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: 2px;
  flex: 1;
  justify-content: flex-start;
}
.coin-pills .pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1.5px solid var(--brass);
  background: linear-gradient(180deg, #f7ebcf, #e2c992);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.coin-pills .pill i,
.coin-pills .pill [class^="ico-"] {
  width: 14px; height: 14px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.coin-pills .pill.gems .ico-gem,
.coin-pills .pill.gems i { background: radial-gradient(circle at 30% 30%, #b8f0ff, #2a9cc8); box-shadow: 0 0 6px #5ec8e8; }
.coin-pills .pill.gold .ico-gold,
.coin-pills .pill.gold i { background: radial-gradient(circle at 30% 30%, #ffe9a0, #c99620); }
.coin-pills .pill.coin .ico-coin,
.coin-pills .pill.coin i { background: radial-gradient(circle at 30% 30%, #f0d080, #a87828); }

.pouch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--brass);
  background: linear-gradient(180deg, #8b5a2b, #5a3518);
  color: #f7ebcf;
  font-weight: 700;
  font-size: 0.8rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.pouch-btn .pouch-icon {
  width: 16px; height: 16px;
  border-radius: 4px;
  background: linear-gradient(180deg, #c49048, #6b4226);
  border: 1px solid #efd48a;
}
.pouch-btn[aria-expanded="true"] {
  box-shadow: 0 0 0 2px rgba(239, 212, 138, 0.45);
}

.menu-wrap { position: relative; flex-shrink: 0; }
.slim-bar .menu-btn {
  width: 40px; height: 40px;
  border-radius: 12px;
  border: 2px solid var(--brass);
  background: linear-gradient(180deg, #f3e2c0, #d9bf8e);
  color: var(--ink);
  font-size: 1.15rem;
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}
.page-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 168px;
  padding: 8px;
  border-radius: 14px;
  background: linear-gradient(165deg, #f3e2c0, #d4b888);
  border: 2px solid var(--brass);
  box-shadow: var(--shadow);
}
.page-menu[hidden] { display: none !important; }
.page-menu a, .page-menu .dev-toggle {
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink);
  background: transparent;
  border: none;
  text-align: left;
  text-decoration: none;
}
.page-menu a:hover, .page-menu a.active {
  background: rgba(107, 66, 38, 0.15);
}
.page-menu a.active { color: var(--wood); }
.page-menu .dev-toggle {
  margin-top: 4px;
  border-top: 1px dashed rgba(107, 66, 38, 0.35);
  border-radius: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  cursor: pointer;
}

.soft-pouch {
  position: absolute;
  top: 58px;
  left: 10px;
  right: 10px;
  z-index: 28;
  max-width: 420px;
  margin: 0 auto;
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(165deg, #f3e2c0, #d9bf8e);
  border: 2px solid var(--brass);
  box-shadow: var(--shadow);
}
.soft-pouch[hidden] { display: none !important; }
.pouch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.pouch-row strong { color: var(--wood-dark); font-size: 0.95rem; margin-left: 4px; }

/* Toast — top, short, plain */
.toast {
  position: fixed;
  left: 50%;
  top: max(12px, env(safe-area-inset-top));
  bottom: auto;
  transform: translateX(-50%);
  z-index: 90;
  padding: 10px 16px;
  border-radius: 12px;
  background: linear-gradient(180deg, #5a3e28, #3a2818);
  border: 2px solid #c49048;
  box-shadow: var(--shadow);
  font-family: var(--serif);
  font-size: 0.92rem;
  color: #f8ecd0;
  max-width: min(90vw, 380px);
  text-align: center;
  pointer-events: none;
}
.toast[hidden] { display: none !important; }
.toast.err {
  background: linear-gradient(180deg, #6a2828, #3a1414);
  border-color: #c44848;
  color: #f8d0d0;
}

/* Store slim bar inside scene */
.store-slim {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  padding-top: max(10px, env(safe-area-inset-top));
  background: linear-gradient(180deg, rgba(20,12,6,0.65), transparent);
}
.store-slim .back-town {
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}
.store-slim .store-title {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff8e8;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
  margin-right: auto;
}
.store-slim .coin-pills .pill {
  padding: 4px 8px;
  font-size: 0.75rem;
}


.store-stage {
  position: relative !important;
  flex: 1 1 auto !important;
  min-height: 100% !important;
  height: 100% !important;
  background-color: #2a1c12;
  background-size: cover !important;
  background-position: center top !important;
}
.store-stage .store-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: 0;
  pointer-events: none;
}
.store-slim { z-index: 5; }
.shopkeep-stand { z-index: 3; }
.store-wares { z-index: 4; }
.overlay-card.store-scene #overlayBody,
.overlay-card.store-scene .overlay-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  overflow: hidden;
}

/* town2c: shopkeep as figure behind counter — no portrait card */
.shopkeep-stand.bare .sk-art {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
  aspect-ratio: auto;
  height: auto;
  filter: drop-shadow(0 12px 16px rgba(0,0,0,0.5));
}
.shopkeep-stand.bare .sk-art img {
  position: relative !important;
  width: 100%;
  height: auto !important;
  max-height: 42vh;
  object-fit: contain !important;
  object-position: bottom center;
  border-radius: 0 !important;
}
.shopkeep-stand.bare .sk-fb {
  display: none; /* hide initials badge when we have art; img onerror can show via JS later */
}
.shopkeep-stand.bare .sk-name {
  margin-top: 4px;
  background: rgba(243,226,192,0.92);
}
.shopkeep-stand.bare .sk-bubble {
  max-width: 160px;
  margin: 0 auto 6px;
}


/* ===== Store town2c — shelves + counter shopkeep ===== */
.store-stage.shop-v2 {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.store-stage.shop-v2 .store-bg {
  object-position: center 30%;
}
.store-shelves {
  position: absolute;
  z-index: 4;
  left: 4%;
  right: 4%;
  top: max(52px, calc(8px + env(safe-area-inset-top)));
  bottom: 42%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.store-shelves > * { pointer-events: auto; }
.store-shelves .shelf-tabs {
  flex-shrink: 0;
  justify-content: center;
}
.shelf-rack {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 14px 10px;
  align-content: start;
  padding: 18px 10px 12px;
  background:
    linear-gradient(180deg, rgba(62, 38, 18, 0.55), rgba(42, 24, 10, 0.72)),
    repeating-linear-gradient(
      180deg,
      transparent 0 86px,
      rgba(90, 55, 25, 0.95) 86px 94px,
      rgba(120, 78, 36, 0.55) 94px 98px
    );
  border: 3px solid #5a3a1a;
  border-radius: 10px;
  box-shadow: inset 0 0 0 2px rgba(201, 162, 74, 0.35), 0 10px 24px rgba(0,0,0,0.4);
  -webkit-overflow-scrolling: touch;
}
.shelf-item {
  position: relative;
  appearance: none;
  border: none;
  background: transparent;
  padding: 0 0 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #f8ecd0;
  cursor: pointer;
  filter: drop-shadow(0 6px 6px rgba(0,0,0,0.45));
  transition: transform 0.12s ease;
}
.shelf-item:hover, .shelf-item:focus-visible {
  transform: translateY(-4px) scale(1.05);
  outline: none;
  z-index: 2;
}
.shelf-item:disabled { opacity: 0.45; filter: grayscale(0.4); }
.shelf-item .shelf-ico {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 70%, rgba(243,226,192,0.35), transparent 70%);
  border-radius: 8px;
}
.shelf-item .shelf-ico img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  position: relative;
  z-index: 1;
}
.shelf-item .shelf-ico .fb {
  position: absolute;
  font-size: 1.4rem;
  opacity: 0.5;
}
.shelf-item .shelf-tag {
  position: absolute;
  top: -6px;
  right: 0;
  z-index: 3;
  padding: 2px 7px;
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--ink);
  background: linear-gradient(180deg, #f7ebcf, #e0c892);
  border: 1.5px solid var(--brass);
  border-radius: 3px;
  box-shadow: 0 2px 0 #3e2616, 0 3px 6px rgba(0,0,0,0.35);
  transform: rotate(4deg);
  max-width: 72px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shelf-item .shelf-label {
  font-family: var(--serif);
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.15;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  max-width: 78px;
}

/* Counter + shopkeep behind it */
.store-counter-zone {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  pointer-events: none;
}
.store-counter-zone .shopkeep-stand.behind-counter {
  position: absolute;
  left: 50%;
  bottom: 38%;
  transform: translateX(-50%);
  width: min(42vw, 200px);
  margin: 0;
  top: auto;
  right: auto;
  text-align: center;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,0.5));
  z-index: 1;
}
.store-counter-zone .shopkeep-stand.behind-counter .sk-art {
  border: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  overflow: hidden;
  aspect-ratio: auto;
  height: auto;
  max-height: 28vh;
}
.store-counter-zone .shopkeep-stand.behind-counter .sk-art img {
  position: relative !important;
  width: 100%;
  height: auto !important;
  max-height: 28vh;
  object-fit: contain;
  object-position: bottom center;
}
.store-counter-zone .shopkeep-stand.behind-counter .sk-bubble {
  position: absolute;
  left: calc(100% - 8px);
  top: 8%;
  width: min(42vw, 160px);
  margin: 0;
  padding: 8px 10px;
  font-size: 0.78rem;
  line-height: 1.25;
  background: #fff8e8;
  color: var(--ink);
  border: 2px solid var(--brass);
  border-radius: 12px 12px 12px 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
  z-index: 3;
  text-align: left;
}
@media (max-width: 420px) {
  .store-counter-zone .shopkeep-stand.behind-counter .sk-bubble {
    left: auto;
    right: calc(100% - 8px);
    border-radius: 12px 12px 4px 12px;
    width: min(46vw, 150px);
    font-size: 0.72rem;
  }
}
.store-counter-zone .counter-face {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 44%;
  z-index: 2;
  background:
    linear-gradient(180deg, #8b5a2b 0%, #6b4226 18%, #4a2e16 55%, #3e2616 100%);
  border-top: 4px solid #c9a24a;
  box-shadow:
    inset 0 8px 0 rgba(255, 220, 150, 0.15),
    inset 0 -10px 20px rgba(0,0,0,0.35),
    0 -6px 18px rgba(0,0,0,0.35);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 8px;
}
.store-counter-zone .counter-face::before {
  content: "";
  position: absolute;
  left: 6%;
  right: 6%;
  top: 22%;
  height: 52%;
  border: 2px solid rgba(201, 162, 74, 0.35);
  border-radius: 6px;
  background: repeating-linear-gradient(
    90deg,
    rgba(90, 50, 20, 0.35) 0 48px,
    rgba(120, 70, 30, 0.25) 48px 96px
  );
  pointer-events: none;
}
.store-counter-zone .sk-name-plate {
  position: relative;
  z-index: 1;
  padding: 4px 14px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  background: linear-gradient(180deg, #f7ebcf, #e0c892);
  border: 2px solid var(--brass);
  border-radius: 8px;
  box-shadow: 0 3px 0 #2a180c;
}

/* Detail parchment popover */
.store-detail {
  position: absolute;
  z-index: 12;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  width: min(92vw, 320px);
  padding: 16px 16px 14px;
  background: linear-gradient(180deg, #f7ebcf, #e6cfa0);
  border: 3px solid var(--brass);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.55);
  color: var(--ink);
  text-align: center;
  pointer-events: auto;
}
.store-detail .detail-x {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #5a3a1a;
  color: #f8ecd0;
  font-size: 1.2rem;
  line-height: 1;
}
.store-detail .detail-ico {
  width: 88px;
  height: 88px;
  margin: 4px auto 8px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.35);
  border-radius: 12px;
  border: 2px solid rgba(201, 162, 74, 0.55);
}
.store-detail .detail-ico img {
  width: 78px;
  height: 78px;
  object-fit: contain;
}
.store-detail h3 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 1.25rem;
}
.store-detail .detail-one {
  margin: 0 0 8px;
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.35;
}
.store-detail .detail-price {
  margin: 0 0 12px;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--wood-dark);
}
.store-detail .detail-price .strike {
  text-decoration: line-through;
  opacity: 0.55;
  font-weight: 600;
  margin-right: 6px;
}
.store-detail .detail-buy {
  width: 100%;
  padding: 12px 16px;
  font-size: 1.05rem;
  font-weight: 800;
}
.store-detail .detail-buy:disabled {
  opacity: 0.5;
}

@media (min-width: 720px) {
  .store-shelves {
    left: 8%;
    right: 28%;
    bottom: 38%;
  }
  .store-counter-zone .shopkeep-stand.behind-counter {
    left: 72%;
    width: min(22vw, 220px);
    bottom: 36%;
  }
  .store-counter-zone .shopkeep-stand.behind-counter .sk-bubble {
    left: auto;
    right: calc(100% + 4px);
    border-radius: 12px 12px 4px 12px;
    width: 180px;
  }
  .shelf-rack {
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  }
}

/* Hide legacy bottom ware strip when shop-v2 is active */
.store-stage.shop-v2 .store-wares { display: none !important; }

.overlay-card.store-scene > .overlay-x { display: none !important; }

/* Cover baked-in empty parchment slots at bottom of room_store.png */
.store-stage.shop-v2 .store-bg {
  object-fit: cover;
  object-position: center 18%;
  transform: scale(1.08);
  transform-origin: center top;
}
.store-counter-zone {
  height: 46%;
}
.store-counter-zone .counter-face {
  height: 52%;
  background:
    linear-gradient(180deg, #9a6834 0%, #6b4226 14%, #4a2e16 50%, #2a180c 100%);
}
.store-counter-zone .shopkeep-stand.behind-counter {
  bottom: 42%;
}
.store-counter-zone .shopkeep-stand.behind-counter .sk-bubble {
  max-width: 160px;
  white-space: normal;
  overflow: visible;
}
.store-shelves {
  bottom: 44%;
}

/* Bubble above head on phone to avoid edge clip */

@media (orientation: portrait) and (max-width: 699px) {
  .store-counter-zone .shopkeep-stand.behind-counter .sk-bubble {
    left: 50%;
    right: auto;
    top: -8%;
    transform: translateX(-50%);
    width: min(70vw, 220px);
    border-radius: 12px;
    text-align: center;
  }
}


/* ===== town4d — hotspot map + chain gates 5/10 + production + Ruler + Hunt ===== */
.ruler-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px 3px 6px;
  background: linear-gradient(180deg, #f0d9a8, #d4b87a);
  border: 1px solid #8a6a3a;
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 2px 6px rgba(40,20,8,0.35);
  color: #2a1c12;
  font-size: 0.72rem;
  max-width: 42vw;
  flex-shrink: 1;
  min-width: 0;
}
.ruler-tag {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: #5a3a18;
}
.ruler-pill strong { font-size: 0.85rem; }
.ruler-bar {
  display: inline-block;
  width: 52px;
  height: 8px;
  border-radius: 4px;
  background: rgba(60, 40, 20, 0.35);
  overflow: hidden;
  border: 1px solid rgba(90, 60, 30, 0.45);
  flex-shrink: 0;
}
.ruler-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #c9a24a, #efd48a);
  border-radius: 4px;
  transition: width 0.25s ease;
}
.ruler-xp {
  font-size: 0.62rem;
  color: #5a4030;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 420px) {
  .ruler-xp { display: none; }
  .ruler-bar { width: 36px; }
}

/* town4e: badge dot sits ON the hotspot point (was top-right corner of the 64px hit box ≈ +21px,-21px off-center) */
.pin-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  right: auto;
  transform: translate(-50%, -50%);
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 11px;
  background: #2f7a3a;
  color: #fff8e8;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: 0 0 0 2px rgba(255, 236, 180, 0.55), 0 2px 8px rgba(20, 40, 10, 0.45);
  pointer-events: none;
}
.pin.upgrading .pin-badge {
  background: #8a6a2a;
  box-shadow: 0 0 0 2px rgba(201, 162, 74, 0.5), 0 2px 6px rgba(40, 20, 8, 0.4);
}
.pin.upgrading .pin-hit {
  outline: 2px dashed rgba(201, 162, 74, 0.7);
  outline-offset: -2px;
}

/* Needs your attention vs quiet map sites */
.pin.needs-you .pin-hit {
  background: rgba(80, 160, 70, 0.22);
  box-shadow: 0 0 0 2px rgba(120, 200, 90, 0.55), 0 0 14px rgba(90, 180, 70, 0.45);
  animation: needs-you-pulse 1.5s ease-in-out infinite;
}
.pin.needs-you .pin-name,
.pin.needs-you .pin-attention-name {
  opacity: 1;
  color: #f3f0c8;
  text-shadow: 0 1px 3px rgba(0,0,0,0.75), 0 0 8px rgba(80, 140, 50, 0.55);
}
@keyframes needs-you-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(120, 200, 90, 0.4), 0 0 10px rgba(90, 180, 70, 0.3); }
  50% { box-shadow: 0 0 0 3px rgba(150, 220, 110, 0.75), 0 0 18px rgba(110, 200, 90, 0.55); }
}
.pin.quiet .pin-hit {
  background: transparent;
  box-shadow: none;
  animation: none;
}
.pin.locked .pin-hit,
.pin.stub .pin-hit {
  animation: none;
  box-shadow: none;
  background: transparent;
}

.stor-bar {
  position: relative;
  height: 22px;
  margin: 8px 0;
  border-radius: 6px;
  background: rgba(60, 40, 20, 0.2);
  border: 1px solid rgba(90, 60, 30, 0.35);
  overflow: hidden;
}
.stor-fill {
  height: 100%;
  background: linear-gradient(90deg, #5d8f4a, #8fbf6a);
  transition: width 0.2s ease;
}
.stor-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
}
.prod-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 6px;
}
.speed-line {
  font-size: 0.78rem;
  color: #5a3a1a;
  margin: 0.35rem 0 0.15rem;
}
.speed-line strong { color: #2a5c38; }
.speed-line em { color: #8a4a12; font-style: normal; font-weight: 600; }
.cost-line, .silo-line {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 4px 0 0;
}
.blurb.warn {
  color: #8a3a2a;
  font-weight: 600;
}

.trade-list {
  list-style: none;
  margin: 8px 0;
  padding: 0;
  max-height: 40vh;
  overflow: auto;
}
.trade-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 6px;
  border-bottom: 1px solid rgba(90, 60, 30, 0.2);
  font-size: 0.82rem;
}
.trade-row em { color: var(--muted); font-style: normal; font-size: 0.72rem; }

.hunt-landmark {
  position: absolute;
  left: 50%;
  top: 6%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 72px;
  height: 56px;
  min-width: 56px;
  min-height: 48px;
  border: none;
  background: transparent !important;
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  filter: none;
}
.hunt-landmark .hunt-hit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: transparent;
  pointer-events: none;
}
.hunt-landmark.live .hunt-hit {
  /* soft sky glow when live — no storm PNG */
  box-shadow: 0 0 18px 6px rgba(120, 90, 220, 0.22);
}
.hunt-landmark.live { opacity: 1; }
.hunt-landmark.dormant { opacity: 1; }
.hunt-label {
  position: relative;
  z-index: 2;
  font-family: var(--serif);
  font-size: 0.7rem;
  font-weight: 700;
  color: #f3e2c0;
  text-shadow: 0 1px 3px #1a120c, 0 0 6px rgba(26,18,12,0.85);
  background: transparent;
  padding: 0;
  border-radius: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
}
.hunt-landmark:hover .hunt-label,
.hunt-landmark:focus-visible .hunt-label,
.hunt-landmark:active .hunt-label,
.hunt-landmark.live .hunt-label {
  opacity: 1;
}
.hunt-countdown {
  position: relative;
  z-index: 2;
  white-space: nowrap;
  font-size: 0.58rem;
  line-height: 1.2;
  color: #f7df9f;
  text-shadow: 0 1px 3px #1a120c;
  background: transparent;
  padding: 0;
  border-radius: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
}
.hunt-landmark:hover .hunt-countdown,
.hunt-landmark:focus-visible .hunt-countdown,
.hunt-landmark:active .hunt-countdown,
.hunt-landmark.live .hunt-countdown {
  opacity: 1;
  color: #fff3c2;
}
/* Storm PNG cards retired until painted into master scene */
.storm-cloud,
.storm-art { display: none !important; }
.hunt-status {
  color: #6d4524;
}
@keyframes stormPulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.07); filter: brightness(1.18); }
}
.hunt-panel-art {
  margin: 8px 0 12px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--brass);
  background: #1a120c;
  max-height: 220px;
}
.hunt-panel-art img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: top center;
}
.hunt-panel-art.no-art {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hunt-panel-art.no-art::after { content: "Hunt poster"; color: #c9a24a; }

@media (max-width: 699px) {
  .slim-bar { flex-wrap: wrap; row-gap: 4px; }
  .ruler-pill { order: 5; max-width: 100%; flex: 1 1 auto; }
}


/* ===== Always-on soft strip + clear upgrade ready/not ===== */
.soft-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  max-width: min(100%, 420px);
  padding: 3px 6px;
  background: rgba(28, 18, 10, 0.45);
  border: 1px solid rgba(201, 162, 74, 0.35);
  border-radius: 10px;
  pointer-events: auto;
}
.soft-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px 2px 4px;
  border-radius: 8px;
  background: rgba(255, 244, 214, 0.12);
  color: #f3e6c8;
  font-size: 0.68rem;
  line-height: 1.1;
}
.soft-chip em {
  font-style: normal;
  opacity: 0.8;
  font-size: 0.62rem;
}
.soft-chip strong {
  font-size: 0.78rem;
  color: #fff6d8;
  min-width: 1.1em;
}
.soft-chip.craft { opacity: 0.92; }
.soft-ico {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
  flex-shrink: 0;
}
.soft-ico.wood { background: #6b4226; }
.soft-ico.planks { background: #a87840; }
.soft-ico.ore { background: #6a6a78; }
.soft-ico.iron { background: #8a8a98; }
.soft-ico.grain { background: #c9a24a; }
.soft-ico.flour { background: #e8d4a8; }
@media (max-width: 420px) {
  .soft-strip { max-width: 58vw; }
  .soft-chip em { display: none; }
  .soft-chip { padding: 2px 5px; }
}
.pouch-hint {
  margin: 6px 8px 4px;
  font-size: 0.68rem;
  color: #6b5030;
}

.upgrade-box {
  margin: 10px 0 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(90, 60, 30, 0.35);
  background: rgba(255, 248, 230, 0.55);
}
.upgrade-box.ready {
  border-color: rgba(60, 120, 50, 0.55);
  background: rgba(210, 235, 190, 0.55);
}
.upgrade-box.blocked {
  border-color: rgba(140, 70, 40, 0.45);
  background: rgba(255, 230, 210, 0.5);
}
.upgrade-box.maxed {
  opacity: 0.75;
}
.upgrade-status {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.95rem;
  color: #2a1c12;
}
.upgrade-box.ready .upgrade-status { color: #1e5a28; }
.upgrade-box.blocked .upgrade-status { color: #7a3018; }
.cost-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}
.cost-chip {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  gap: 0 8px;
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid rgba(60, 40, 20, 0.25);
  background: rgba(255, 255, 255, 0.55);
  font-size: 0.72rem;
  color: #2a1c12;
  min-width: 96px;
}
.cost-chip .cc-name {
  grid-column: 1 / -1;
  font-weight: 700;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.75;
}
.cost-chip .cc-amt strong { font-size: 0.9rem; }
.cost-chip .cc-flag {
  grid-column: 1 / -1;
  font-size: 0.62rem;
  font-weight: 700;
}
.cost-chip.ok {
  border-color: rgba(50, 120, 50, 0.45);
  background: rgba(220, 245, 210, 0.75);
}
.cost-chip.ok .cc-flag { color: #1e6a28; }
.cost-chip.short {
  border-color: rgba(160, 50, 30, 0.45);
  background: rgba(255, 220, 210, 0.8);
}
.cost-chip.short .cc-flag { color: #8a2810; }
.cost-line.quiet {
  opacity: 0.7;
  font-size: 0.72rem;
}

/* town4f: quiet sites show no badge (display:flex was overriding [hidden]) */
.pin-badge[hidden] { display: none !important; }

/* storage_v1 — toast that carries a fix-it jump button + storage panel chips */
.toast.has-fix { pointer-events: auto; padding: 12px 16px 10px; max-width: min(92vw, 400px); }
.toast.has-fix .toast-msg { font-weight: 700; }
.toast.has-fix .fixit-btn { margin-top: 8px; }
.stor-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.stor-chip { padding: 3px 9px; border-radius: 999px; background: rgba(90, 62, 40, .14); border: 1px solid rgba(120, 80, 40, .35); font-size: .86rem; font-weight: 600; }
.stor-what { margin: 2px 0 6px; }

/* nightwatch_v1: moon on buildings filling past 4h overnight · Night Watch tag on the town bar · panel note */
.pin-moon {
  position: absolute; top: 50%; left: 50%; transform: translate(6px, -26px);
  font-size: 0.95rem; line-height: 1; z-index: 4; pointer-events: none;
  filter: drop-shadow(0 0 3px rgba(255, 240, 190, 0.9)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}
.pin-moon[hidden] { display: none !important; }
.night-tag {
  display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px;
  background: rgba(28, 34, 66, 0.86); color: #f4e9c8; border: 1px solid rgba(214, 196, 140, 0.7);
  font-size: 0.72rem; font-weight: 700; white-space: nowrap; align-self: center;
}
.night-tag[hidden] { display: none !important; }
.cl-moon { white-space: nowrap; color: #3b3f73; font-weight: 700; }

/* ===== townpan1 (Brandon 2026-10-02): the map lives BELOW the HUD and only pans left/right =====
   town.js measures the HUD (incl. safe-area) into --hud-h. The scene starts under it, the painting's full
   height fits the scene, and horizontal pan is clamped to the painting (pan box clips its own overflow, so
   drifting clouds / edge labels can never widen the scroll area = no green strip). If the painting is
   narrower than the screen (short landscape) it is centered on a blurred copy of itself. */
.town-home .scene-backdrop {
  position: absolute; left: 0; right: 0; top: var(--hud-h, 64px); bottom: 0; z-index: 0;
  background: #2a1c0e center / cover no-repeat;
  filter: blur(14px) brightness(0.62) saturate(0.9);
  transform: scale(1.08);
  pointer-events: none;
}
.town-home .scene {
  top: var(--hud-h, 64px);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-x;
  background: transparent;
}
.town-home .scene::-webkit-scrollbar { display: none; }
.town-home .scene-pan {
  position: relative;
  height: 100%;
  width: auto;
  min-width: 0;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  overflow: hidden;
}
.town-home .scene-art, .town-home .scene-shade, .town-home .clouds, .town-home .map-stage { position: absolute; inset: 0; }
.town-home .scene-art img { object-fit: cover; object-position: center center; }
/* HUD: solid compact bar (the map no longer sits behind it) */
.town-home .slim-bar {
  background: linear-gradient(180deg, rgba(52, 34, 18, 0.97), rgba(36, 23, 12, 0.94));
  border-bottom: 2px solid rgba(201, 162, 74, 0.7);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
  padding: 4px 8px;
  padding-top: max(4px, env(safe-area-inset-top));
  gap: 6px;
  row-gap: 3px;
}
.town-home .slim-bar .back-town, .town-home .slim-bar .avatar-chip, .town-home .slim-bar .menu-btn { width: 34px; height: 34px; }
.town-home .slim-bar .pouch-btn { padding: 4px 9px; }
.town-home .coin-pills { gap: 4px; }
.town-home .coin-pills .pill { padding: 3px 8px; }
/* events never under the HUD: the side column lives between the HUD and the bottom and scrolls if tall */
@media (orientation: landscape), (min-width: 700px) {
  .town-home .event-medals {
    top: calc(var(--hud-h, 64px) + 8px) !important; bottom: 8px; transform: none !important;
    overflow-y: auto; overflow-x: hidden; scrollbar-width: none; padding: 2px 2px 26px; gap: 22px;
  }
  .town-home .event-medals::-webkit-scrollbar { display: none; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .town-home .slim-bar { flex-wrap: nowrap; }
  .town-home .slim-bar .avatar-name { display: none; }
  .town-home .coin-pills { flex: 0 0 auto; flex-wrap: nowrap; }
  .town-home .soft-strip { flex-wrap: nowrap; max-width: none; flex: 0 1 auto; }
  .town-home .soft-chip em { display: none; }
  .town-home .ruler-pill { order: 0; flex: 0 1 auto; }
  .town-home .ruler-pill .ruler-xp { display: none; }
  .town-home .event-medals { gap: 18px; }
  .town-home .event-medals .medal { width: 38px; height: 38px; }
}
/* townpan1 phone portrait HUD: 3 slim rows (portrait | coins | settings | menu), (basics | Bags), (Ruler) */
@media (orientation: portrait) and (max-width: 699px) {
  .town-home .slim-bar { flex-wrap: wrap; }
  .town-home .slim-bar .back-town { order: 1; }
  .town-home .slim-bar .avatar-chip { order: 2; }
  .town-home .coin-pills { order: 3; flex: 1 0 auto; flex-wrap: nowrap; }
  .town-home .slim-bar .settings-wrap { order: 4; }
  .town-home .slim-bar .menu-wrap { order: 5; }
  .town-home .soft-strip { order: 6; flex: 1 1 calc(100% - 84px); flex-wrap: nowrap; overflow: hidden; max-width: none; min-width: 0; justify-content: space-between; padding: 2px 5px; }
  .town-home .soft-chip em { display: none; }
  .town-home .slim-bar .pouch-btn { order: 7; padding: 3px 9px; }
  .town-home .ruler-pill { order: 8; flex: 1 1 55%; max-width: 100%; padding: 1px 8px 1px 6px; }
  .town-home .slim-bar .night-tag { order: 9; flex: 0 0 auto; padding-top: 1px; padding-bottom: 1px; }
  /* big numbers (4-5 digits) must not push the HUD to more rows */
  .town-home .slim-bar { gap: 5px; row-gap: 3px; }
  .town-home .slim-bar .back-town, .town-home .slim-bar .avatar-chip { width: 30px; height: 30px; }
  .town-home .coin-pills { flex: 1 1 auto; min-width: 0; gap: 3px; }
  .town-home .coin-pills .pill { padding: 2px 6px 2px 3px; gap: 3px; font-size: 0.76rem; min-width: 0; }
  .town-home .coin-pills .pill .cur-hud { width: 18px !important; height: 18px !important; min-width: 18px; }
  .town-home .coin-pills .pill .cur-hud > .cur-ico { width: 18px; height: 18px; }
  .town-home .soft-strip { gap: 3px; }
  .town-home .soft-chip { padding: 1px 3px; gap: 2px; font-size: 0.64rem; }
  .town-home .soft-chip strong { font-size: 0.72rem; }
  .town-home .slim-bar .pouch-btn { font-size: 0.72rem; padding: 3px 7px; gap: 4px; }
  .town-home .slim-bar .pouch-btn .pouch-icon { width: 13px; height: 13px; }
}
.town-home .slim-bar .settings-btn { width: 34px; height: 34px; }
@media (orientation: landscape), (min-width: 700px) { .town-home .event-medals { gap: 34px !important; } }

/* night1 (Brandon 10:31-10:32 PM): Store shows where the free things are */
.pin .pin-count { position: absolute; top: -6px; right: -6px; z-index: 6; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: #c62828; color: #fff; font: 800 .8rem/22px system-ui, sans-serif; text-align: center; box-shadow: 0 0 0 2px #fff4dc, 0 2px 6px rgba(0,0,0,.45); pointer-events: none; }
.pin .pin-count[hidden] { display: none; }
.store-shelves .shelf-tabs button { position: relative; }
.store-shelves .shelf-tabs .tab-dot { position: absolute; top: 2px; right: 0; z-index: 3; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: #c62828; color: #fff; font: 800 .74rem/20px system-ui, sans-serif; text-align: center; box-shadow: 0 0 0 2px #fff4dc; pointer-events: none; }
.store-shelves .shelf-more { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); z-index: 5; min-height: 34px; padding: 4px 14px;
  border-radius: 17px; border: 2px solid #c49048; background: linear-gradient(180deg, #f3e2c0, #d9bf8e); color: #2a1a0c; font-weight: 800; font-size: .9rem;
  box-shadow: 0 -14px 18px -4px rgba(20,12,6,.55), 0 3px 8px rgba(0,0,0,.45); cursor: pointer; animation: shelfBob 1.6s ease-in-out infinite; }
.store-shelves .shelf-more[hidden] { display: none; }
@keyframes shelfBob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 3px); } }
@media (prefers-reduced-motion: reduce) { .store-shelves .shelf-more { animation: none; } }
/* night1: short portrait phones: the shelves take the room the empty counter used (more baskets in view, still one contained scroll) */
@media (orientation: portrait) and (max-width: 699px) and (max-height: 760px) {
  body .store-stage.shop-v2:has(.shop-pane) .store-shelves { bottom: 29%; }
}
/* night2 (Brandon 10:52 PM): the shopkeeper stays in view on phones: he peeks over the counter under the shelves */
@media (max-width: 719px) {
  body .store-stage.shop-v2:has(.shop-pane) .store-shelves { bottom: 29%; }
  body .store-stage.shop-v2:has(.shop-pane) .store-counter-zone { z-index: 7; pointer-events: none; height: 32%; }
  body .store-stage.shop-v2:has(.shop-pane) .store-counter-zone .counter-face { height: 46%; }
  body .store-stage.shop-v2:has(.shop-pane) .store-counter-zone .shopkeep-stand.behind-counter { bottom: 40%; width: 110px; }
  body .store-stage.shop-v2:has(.shop-pane) .store-counter-zone .shopkeep-stand.behind-counter .sk-art,
  body .store-stage.shop-v2:has(.shop-pane) .store-counter-zone .shopkeep-stand.behind-counter .sk-art img { max-height: 14vh; }
}
.pin .pin-name > .pin-count { top: -13px; right: -26px; }
.pin .pin-name { overflow: visible; }

/* storefix1: storage-full Show me, one-time storage beat, readable lock card, upgrade perk line */
.pin .sf-finger { position: absolute; left: 50%; top: -6px; transform: translate(-50%, -100%); font-size: 40px; line-height: 1; z-index: 60; pointer-events: none; animation: sfBob .9s ease-in-out infinite; filter: drop-shadow(0 3px 4px rgba(0,0,0,.6)); }
@keyframes sfBob { 0%,100% { margin-top: 0; } 50% { margin-top: 10px; } }
.pin.sf-pulse .pin-hit { box-shadow: 0 0 0 4px #ffd56a, 0 0 24px 8px rgba(255,213,106,.75); border-radius: 14px; animation: sfGlow 1.1s ease-in-out infinite; }
@keyframes sfGlow { 50% { box-shadow: 0 0 0 3px #ffd56a, 0 0 8px 2px rgba(255,213,106,.4); } }
.sf-show { margin-top: 8px; }
.sf-beat-wrap, .lock-card-wrap { position: fixed; inset: 0; z-index: 99996; background: rgba(10,6,2,.5); display: flex; align-items: center; justify-content: center; padding: 18px; }
.sf-beat, .lock-card { position: relative; width: min(380px, 100%); background: linear-gradient(#fbf1d8, #efdcae); color: #3a2410; border: 2px solid #b8862f; border-radius: 16px; padding: 16px 18px; box-shadow: 0 10px 30px rgba(0,0,0,.55); font-size: 16px; line-height: 1.4; }
.sf-who { font-weight: 700; color: #7a4f12; font-size: 14px; margin-bottom: 4px; }
.sf-acts { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.sf-point { outline: 3px solid #ffd56a; outline-offset: 3px; border-radius: 10px; animation: sfGlow 1.1s ease-in-out infinite; position: relative; z-index: 99997; }
.lock-card h3 { margin: 0 0 6px; font-size: 20px; }
.lock-card p { margin: 6px 0; }
.lock-card .lc-need b { color: #8a2a12; }
.lock-card .lock-x { position: absolute; right: 10px; top: 8px; border: 0; background: none; font-size: 18px; cursor: pointer; color: #5a3a14; }
.uc-perk { font-size: 15px; margin: 2px 0 6px; color: #f3dfae; }
.uc-perk b { color: #ffd56a; }
