/* Finn's Harbor — full-bleed 2D open-world canvas & minimal translucent game HUD.
   Uses Deep Blue tokens from static/css/tokens.css only (no raw colour values). */

.harbor-view-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#mapScreen.is-harbor {
  overflow: hidden;
  max-width: none;
  padding: 0;
}

body[data-view="journey"] #mapScreen.is-harbor {
  display: flex;
  flex-direction: column;
}

.journey-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.journey-harbor-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-4);
  font-size: 0.9rem;
}

.harbor-stage-body {
  display: flex;
  flex-direction: column;
  max-width: none !important;
  width: 100%;
  height: 100%;
  min-height: 100%;
  padding: 0;
}

.game-stage .stage-play:has(.harbor-stage-body) {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.harbor-root {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 420px;
  overflow: hidden;
  background: var(--harbor-sea-deep);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.harbor-root:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: -2px;
}

.harbor-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* ---------- Minimal floating top HUD ---------- */
.harbor-hud-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.harbor-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.harbor-top-left,
.harbor-top-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
}

.harbor-zone-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--harbor-hud-border);
  background: var(--harbor-hud-bg);
  color: var(--text-1);
  font-family: var(--font-display);
  font-size: var(--fs-13);
  font-weight: 800;
  letter-spacing: var(--tracking-head);
}

.harbor-counters {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.harbor-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--harbor-hud-border);
  background: var(--harbor-hud-bg);
  color: var(--gold);
  font-family: var(--font-num);
  font-size: var(--fs-12);
  font-weight: 700;
}

.harbor-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--harbor-hud-border);
  background: var(--harbor-hud-bg);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: var(--fs-13);
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--motion-fast) var(--ease-out);
}

.harbor-pill-btn:hover {
  transform: translateY(var(--lift));
  border-color: var(--link);
}

.harbor-pill-btn:active {
  transform: scale(var(--press));
}

.harbor-pill-btn:focus-visible,
.harbor-act-btn:focus-visible,
.harbor-dash-btn:focus-visible,
.harbor-reset-btn:focus-visible,
.harbor-btn:focus-visible,
.harbor-pack-close:focus-visible,
.harbor-fish-close:focus-visible,
.harbor-style-btn:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.harbor-controls-hint {
  position: absolute;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  z-index: 3;
  margin: 0;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--harbor-hud-border);
  background: var(--harbor-hud-bg);
  color: var(--text-2);
  font-family: var(--font-ui);
  font-size: var(--fs-12);
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity var(--motion-slow) var(--ease-out);
}

.harbor-controls-hint.is-faded {
  opacity: 0;
}

.harbor-banner {
  position: absolute;
  top: 112px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  max-width: calc(100% - 24px);
  padding: 8px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--gold);
  background: var(--harbor-hud-bg);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: var(--fs-13);
  font-weight: 800;
  text-align: center;
  pointer-events: none;
}

/* ---------- Bottom-right tactile action controls ---------- */
.harbor-action-dock {
  position: absolute;
  right: 14px;
  bottom: 18px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
}

.harbor-dash-btn[hidden],
.harbor-reset-btn[hidden] {
  display: none;
}

@media (max-width: 1023px) {
  .harbor-pill-icon[data-harbor-full] {
    display: none;
  }
  #mapScreen.is-harbor .harbor-action-dock {
    bottom: 26px;
  }
  #mapScreen.is-harbor .harbor-controls-hint {
    bottom: 92px;
  }
}

.harbor-act-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 112px;
  min-height: 54px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--play);
  color: var(--on-bright);
  box-shadow: var(--play-glow);
  font-family: var(--font-display);
  font-size: var(--fs-15);
  font-weight: 800;
  cursor: pointer;
  transition: transform var(--motion-fast) var(--ease-out);
}

.harbor-act-btn.is-ready {
  background: var(--gold);
}

.harbor-act-btn:active,
.harbor-dash-btn:active,
.harbor-reset-btn:active {
  transform: scale(var(--press));
}

.harbor-dash-btn,
.harbor-reset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 48px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--harbor-hud-border);
  background: var(--harbor-hud-bg);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: var(--fs-13);
  font-weight: 700;
  cursor: pointer;
}

/* ---------- Villager dialogue card ---------- */
.harbor-dialogue {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 14px;
  z-index: 6;
  max-width: 520px;
  margin-inline: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-18);
  border: 1px solid var(--border-card);
  background: var(--surface-solid);
  box-shadow: var(--shadow-raised);
  color: var(--text-1);
}

.harbor-dialogue-avatar {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: var(--r-12);
  background: var(--gold-bg);
  color: var(--gold);
  display: grid;
  place-items: center;
}

.harbor-dialogue-body {
  flex: 1 1 auto;
  min-width: 0;
}

.harbor-dialogue-head {
  margin: 0 0 4px;
  font-size: var(--fs-13);
  color: var(--gold);
}

.harbor-dialogue-head span {
  color: var(--text-3);
  font-weight: 600;
  margin-left: 6px;
}

.harbor-dialogue-text {
  margin: 0 0 12px;
  color: var(--text-body);
  font-size: var(--fs-14);
  line-height: 1.45;
}

.harbor-dialogue-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.harbor-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--r-12);
  border: 1px solid var(--border-card);
  background: var(--surface-soft);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: var(--fs-14);
  font-weight: 700;
  cursor: pointer;
}

.harbor-btn-primary {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--text-1);
}

.harbor-btn-play {
  background: var(--play);
  border-color: transparent;
  color: var(--on-bright);
  box-shadow: var(--play-glow);
}

.harbor-btn-coach {
  background: var(--mint-bg);
  border-color: var(--mint);
  color: var(--mint);
}

/* ---------- Fishing timing HUD ---------- */
.harbor-fishing-hud {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 14px;
  z-index: 6;
  max-width: 420px;
  margin-inline: auto;
  padding: 14px 16px;
  border-radius: var(--r-18);
  border: 1px solid var(--border-card);
  background: var(--surface-solid);
  box-shadow: var(--shadow-raised);
  color: var(--text-1);
}

.harbor-fish-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.harbor-fish-top .num {
  margin-left: auto;
  color: var(--mint);
  font-family: var(--font-num);
  font-weight: 700;
}

.harbor-fish-close,
.harbor-pack-close {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--r-12);
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-1);
  cursor: pointer;
}

.harbor-fish-msg {
  margin: 6px 0 10px;
  color: var(--text-body);
  font-size: var(--fs-14);
}

.harbor-fish-track {
  position: relative;
  height: 24px;
  margin-bottom: 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-card);
  background: var(--bg);
  overflow: hidden;
}

.harbor-fish-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  background: var(--mint-bg);
  border-left: 2px solid var(--mint);
  border-right: 2px solid var(--mint);
}

.harbor-fish-cursor {
  position: absolute;
  top: 2px;
  bottom: 2px;
  width: 8px;
  margin-left: -4px;
  border-radius: var(--r-pill);
  background: var(--gold);
}

.harbor-fish-btn {
  width: 100%;
}

/* ---------- Island Pack modal drawer ---------- */
.harbor-pack-sheet {
  position: absolute;
  inset: 12px;
  z-index: 8;
  max-width: 480px;
  margin: auto;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-18);
  border: 1px solid var(--border-card);
  background: var(--surface-solid);
  box-shadow: var(--shadow-raised);
  color: var(--text-1);
  overflow: hidden;
}

.harbor-pack-sheet[hidden],
.harbor-dialogue[hidden],
.harbor-fishing-hud[hidden],
.harbor-banner[hidden],
.harbor-reset-btn[hidden] {
  display: none !important;
}

.harbor-pack-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--divider);
}

.harbor-pack-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-16);
  font-weight: 800;
}

.harbor-pack-body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.harbor-pack-sec h3 {
  margin: 0 0 8px;
  color: var(--text-2);
  font-size: var(--fs-12);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.harbor-pack-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.harbor-pack-stats > div {
  padding: 10px 6px;
  border-radius: var(--r-12);
  border: 1px solid var(--border);
  background: var(--surface-soft);
  text-align: center;
}

.harbor-pack-stats .num {
  display: block;
  color: var(--gold);
  font-family: var(--font-num);
  font-size: var(--fs-15);
  font-weight: 700;
}

.harbor-pack-stats small {
  color: var(--text-3);
  font-size: var(--fs-11);
}

.harbor-style-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.harbor-style-btn {
  min-height: 56px;
  padding: 8px;
  border-radius: var(--r-12);
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-1);
  text-align: left;
  cursor: pointer;
}

.harbor-style-btn.is-on {
  border-color: var(--gold);
  background: var(--gold-bg);
}

.harbor-style-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.harbor-style-btn strong,
.harbor-fish-card strong {
  display: block;
  font-size: var(--fs-13);
}

.harbor-style-btn small,
.harbor-fish-card small {
  color: var(--text-3);
  font-size: var(--fs-11);
}

.harbor-fish-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.harbor-fish-card {
  padding: 10px;
  border-radius: var(--r-12);
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.harbor-fish-card.is-caught {
  border-color: var(--mint);
  background: var(--mint-bg);
}

.harbor-fish-badge {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--lilac);
  font-size: var(--fs-11);
  font-weight: 700;
}

.harbor-pack-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.harbor-pack-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-12);
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-2);
}

.harbor-pack-row.is-done {
  border-color: var(--mint);
  color: var(--text-1);
}

.harbor-pack-row small {
  display: block;
  color: var(--text-3);
  font-size: var(--fs-12);
}

/* Classic lessons return banner */
.harbor-classic-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: var(--r-14);
  border: 1px solid var(--border-card);
  background: var(--surface);
}

.harbor-classic-bar strong {
  display: block;
  color: var(--text-1);
  font-size: var(--fs-14);
}

.harbor-classic-bar small {
  color: var(--text-2);
  font-size: var(--fs-12);
}

@media (max-width: 520px) {
  .harbor-controls-hint {
    font-size: var(--fs-11);
    bottom: 78px;
  }
  .harbor-top-bar {
    top: 8px;
    left: 8px;
    right: 8px;
  }
  .harbor-pack-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .harbor-style-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .harbor-pill-btn,
  .harbor-act-btn,
  .harbor-controls-hint,
  .dash-action-btn,
  .dash-combo-badge {
    transition: none;
  }
  .harbor-pill-btn:hover,
  .harbor-pill-btn:active,
  .harbor-act-btn:active,
  .dash-action-btn:active {
    transform: none;
  }
}

/* =====================================================================
   Game 2: Harbor Dash — full-bleed arcade overlay, HUD & End-of-Run card
   ===================================================================== */

.harbor-pill-dash {
  background: var(--play);
  border-color: transparent;
  color: var(--on-bright);
  box-shadow: var(--play-glow);
  font-family: var(--font-display);
  font-weight: 800;
}

.harbor-pill-dash:hover {
  border-color: transparent;
}

.harbor-dash-host {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  flex-direction: column;
  background: var(--harbor-sea-deep);
}

.harbor-dash-host[hidden] {
  display: none !important;
}

.harbor-dash-pack-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.harbor-dash-pack-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.harbor-dash-pack-cta {
  width: 100%;
}

.dash-root {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.dash-top-hud {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.dash-hud-left,
.dash-hud-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
}

.dash-hud-right {
  justify-content: flex-end;
}

.dash-score-pill,
.dash-timer-pill,
.dash-hearts-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--harbor-hud-border);
  background: var(--harbor-hud-bg);
  color: var(--text-1);
}

.dash-score-val {
  color: var(--gold);
  font-family: var(--font-num);
  font-size: var(--fs-16);
  font-weight: 700;
}

.dash-combo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 24px;
  padding: 0 7px;
  border-radius: var(--r-pill);
  background: var(--surface-soft);
  color: var(--text-2);
  font-family: var(--font-num);
  font-size: var(--fs-12);
  font-weight: 700;
  transition: transform var(--motion-fast) var(--ease-out);
}

.dash-combo-badge.is-hot {
  background: var(--gold-bg);
  color: var(--gold);
}

.dash-combo-badge.is-max {
  background: var(--play);
  color: var(--on-bright);
}

.dash-timer-pill {
  font-family: var(--font-num);
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--text-1);
}

.dash-timer-pill.is-chill {
  border-color: var(--mint);
  color: var(--mint);
}

.dash-timer-pill.is-low {
  border-color: var(--coral);
  color: var(--coral);
}

.dash-hearts-pill {
  gap: 4px;
  padding: 0 10px;
}

.dash-heart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: var(--r-pill);
  border: 1px solid var(--coral);
  background: var(--coral-bg);
  color: var(--coral);
}

.dash-heart.is-empty {
  border-color: var(--border);
  background: var(--surface-soft);
  color: var(--text-3);
  opacity: 0.45;
}

.dash-shield-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  color: var(--mint);
}

.dash-pace-btn.is-chill-on {
  border-color: var(--mint);
  color: var(--mint);
}

.dash-active-buffs {
  position: absolute;
  top: 62px;
  left: 10px;
  right: 10px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}

.dash-buff {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--harbor-hud-border);
  background: var(--harbor-hud-bg);
  font-family: var(--font-ui);
  font-size: var(--fs-12);
  font-weight: 700;
  color: var(--text-1);
}

.dash-buff.is-shield {
  border-color: var(--mint);
  color: var(--mint);
}

.dash-buff.is-magnet {
  border-color: var(--gold);
  color: var(--gold);
}

.dash-buff.is-turbo {
  border-color: var(--play-from);
  color: var(--play-from);
}

.dash-buff.is-twist {
  border-color: var(--coral);
  color: var(--coral);
}

.dash-twist-banner {
  top: 96px;
}

.dash-controls-dock {
  position: absolute;
  right: 16px;
  bottom: 20px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-action-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  padding: 5px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--harbor-hud-bg);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform var(--motion-fast) var(--ease-out);
}

.dash-action-btn:active {
  transform: scale(var(--press));
}

.dash-action-btn:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

.dash-action-ring {
  position: absolute;
  inset: 0;
  border-radius: var(--r-pill);
  background: conic-gradient(var(--gold) var(--dash-deg, 360deg), var(--border) 0deg);
}

.dash-action-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--surface-solid);
  color: var(--text-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-family: var(--font-display);
  font-size: var(--fs-12);
  font-weight: 800;
}

.dash-action-btn.is-ready .dash-action-inner {
  background: var(--play);
  color: var(--on-bright);
  box-shadow: var(--play-glow);
}

.dash-action-btn.is-dashing .dash-action-inner {
  background: var(--gold);
  color: var(--on-bright);
}

.dash-finish-btn[hidden] {
  display: none !important;
}

/* ---------- End-of-Run Summary Card ---------- */
.dash-end-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow-y: auto;
  background: var(--scrim);
}

.dash-end-overlay[hidden] {
  display: none !important;
}

.dash-end-card {
  width: 100%;
  max-width: 420px;
  padding: 20px;
  border-radius: var(--r-22);
  border: 1px solid var(--border-card);
  background: var(--surface-solid);
  box-shadow: var(--shadow-raised);
  color: var(--text-1);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dash-end-kicker {
  display: block;
  color: var(--link);
  font-size: var(--fs-12);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dash-end-title {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: var(--fs-20);
  font-weight: 800;
  letter-spacing: var(--tracking-head);
}

.dash-end-score-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-end-big {
  font-family: var(--font-num);
  font-size: 32px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.dash-end-badge {
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--mint-bg);
  border: 1px solid var(--mint);
  color: var(--mint);
  font-size: var(--fs-12);
  font-weight: 800;
}

.dash-end-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.dash-end-stats > div {
  padding: 10px 8px;
  border-radius: var(--r-12);
  border: 1px solid var(--border);
  background: var(--surface-soft);
  text-align: center;
}

.dash-end-stats .num {
  display: block;
  color: var(--text-1);
  font-family: var(--font-num);
  font-size: var(--fs-16);
  font-weight: 700;
}

.dash-end-stats small {
  color: var(--text-3);
  font-size: var(--fs-11);
}

.dash-end-milestones {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dash-ms-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--gold);
  background: var(--gold-bg);
  color: var(--gold);
  font-size: var(--fs-12);
  font-weight: 700;
}

.dash-ms-chip.is-cosmetic {
  border-color: var(--mint);
  background: var(--mint-bg);
  color: var(--mint);
}

.dash-end-note {
  margin: 0;
  color: var(--text-2);
  font-size: var(--fs-12);
  line-height: 1.4;
}

.dash-end-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 520px) {
  .dash-top-hud {
    top: 8px;
    left: 8px;
    right: 8px;
    gap: 6px;
  }
  .dash-score-pill,
  .dash-timer-pill,
  .dash-hearts-pill {
    min-height: 44px;
    padding: 0 9px;
  }
  .dash-score-val {
    font-size: var(--fs-14);
  }
  .dash-back-btn span {
    display: none;
  }
  .dash-controls-dock {
    right: 12px;
    bottom: 22px;
  }
  .dash-action-btn {
    width: 72px;
    height: 72px;
  }
  .dash-hint {
    bottom: 102px;
    font-size: var(--fs-11);
    max-width: calc(100% - 20px);
    white-space: normal;
    text-align: center;
  }
  .dash-end-actions {
    grid-template-columns: 1fr;
  }
}

/* =====================================================================
   Game 3: Pocket Harbor — Cozy Spatial Island & Harbor Builder
   ===================================================================== */

.harbor-pill-build {
  background: var(--mint);
  border-color: transparent;
  color: var(--on-bright);
  font-family: var(--font-display);
  font-weight: 800;
}

.harbor-pill-build:hover {
  border-color: transparent;
}

.harbor-pocket-host {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  flex-direction: column;
  background: var(--harbor-sea-deep);
}

.harbor-pocket-host[hidden] {
  display: none !important;
}

.pocket-root {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.pocket-top-hud {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.pocket-hud-left,
.pocket-hud-right {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
  min-width: 0;
}

.pocket-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  padding: 0 11px;
  border-radius: var(--r-pill);
  border: 1px solid var(--harbor-hud-border);
  background: var(--harbor-hud-bg);
  color: var(--text-1);
  font-family: var(--font-num);
  font-size: var(--fs-13);
  font-weight: 700;
  white-space: nowrap;
}

.pocket-harmony-pill {
  color: var(--gold);
}

.pocket-shells-pill {
  color: var(--mint);
}

.pocket-shells-pill small {
  color: var(--text-2);
  font-family: var(--font-ui);
  font-size: var(--fs-11);
  font-weight: 600;
}

.pocket-combo-tag {
  padding: 2px 7px;
  border-radius: var(--r-pill);
  background: var(--surface-soft);
  color: var(--text-2);
  font-size: var(--fs-11);
}

.pocket-combo-tag.is-lit {
  background: var(--mint-bg);
  color: var(--mint);
}

.pocket-banner {
  top: 62px;
}

/* ---------- Bottom Finn Feedback + Thumb-Friendly Palette Dock ---------- */
.pocket-bottom-stack {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 6;
  max-width: 860px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.pocket-feedback-bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: var(--r-14);
  border: 1px solid var(--harbor-hud-border);
  background: var(--harbor-hud-bg);
  color: var(--text-1);
}

.pocket-finn-img {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.pocket-feedback-text {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: var(--text-body);
  font-family: var(--font-ui);
  font-size: var(--fs-12);
  line-height: 1.35;
}

.pocket-save-pill {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: var(--surface-soft);
  color: var(--text-2);
  font-size: var(--fs-11);
  font-weight: 700;
}

.pocket-dock-panel {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: var(--r-18);
  border: 1px solid var(--border-card);
  background: var(--surface-solid);
  box-shadow: var(--shadow-raised);
}

.pocket-tools-row {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.pocket-tools-row::-webkit-scrollbar {
  display: none;
}

.pocket-tool-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 12px;
  border-radius: var(--r-12);
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: var(--fs-13);
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--motion-fast) var(--ease-out);
}

.pocket-tool-btn.is-active {
  background: var(--blue);
  border-color: var(--link);
  color: var(--text-1);
}

.pocket-tool-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.pocket-tool-btn:focus-visible,
.pocket-piece-btn:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.pocket-palette {
  display: flex;
  align-items: stretch;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.pocket-piece-btn {
  flex: 1 0 74px;
  min-width: 74px;
  min-height: 68px;
  padding: 6px 4px;
  border-radius: var(--r-12);
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  transition: transform var(--motion-fast) var(--ease-out), border-color var(--motion-fast) var(--ease-out);
}

.pocket-piece-btn:hover {
  transform: translateY(var(--lift));
  border-color: var(--link);
}

.pocket-piece-btn:active {
  transform: scale(var(--press));
}

.pocket-piece-btn.is-selected {
  border-color: var(--gold);
  background: var(--gold-bg);
}

.pocket-piece-btn.is-costly {
  opacity: 0.58;
}

.pocket-thumb {
  width: 32px;
  height: 32px;
  display: block;
  background-image: url('/static/art/harbor/pocket.webp');
  background-repeat: no-repeat;
  background-size: 800% 200%;
}

.pocket-thumb.is-cottage { background-position: 0% 0%; }
.pocket-thumb.is-pier { background-position: 14.2857% 0%; }
.pocket-thumb.is-cafe { background-position: 28.5714% 0%; }
.pocket-thumb.is-garden { background-position: 42.8571% 0%; }
.pocket-thumb.is-windmill { background-position: 57.1429% 0%; }
.pocket-thumb.is-market { background-position: 71.4286% 0%; }
.pocket-thumb.is-path { background-position: 85.7143% 0%; }
.pocket-thumb.is-lighthouse { background-position: 100% 0%; }

.pocket-piece-name {
  font-family: var(--font-ui);
  font-size: var(--fs-11);
  font-weight: 700;
  line-height: 1.1;
}

.pocket-piece-cost {
  font-family: var(--font-num);
  font-size: var(--fs-11);
  font-weight: 700;
  color: var(--gold);
}

.pocket-bp-reward {
  color: var(--gold) !important;
  font-weight: 700;
}

.pocket-combo-num {
  color: var(--mint);
  font-family: var(--font-num);
  font-size: var(--fs-13);
  font-weight: 700;
}

.pocket-sheet-note {
  margin: 8px 0 0;
  color: var(--text-2);
  font-size: var(--fs-12);
  line-height: 1.45;
}

@media (max-width: 520px) {
  .pocket-top-hud {
    top: 8px;
    left: 8px;
    right: 8px;
    gap: 4px;
  }
  .pocket-hud-left,
  .pocket-hud-right {
    gap: 4px;
  }
  .pocket-back-btn span,
  .pocket-shells-pill small,
  .pocket-combo-tag,
  .pocket-save-pill {
    display: none;
  }
  .pocket-stat-pill {
    padding: 0 9px;
    font-size: var(--fs-12);
  }
  .pocket-bottom-stack {
    left: 6px;
    right: 6px;
    bottom: 24px;
  }
  .pocket-dock-panel {
    padding: 6px;
  }
  .pocket-toolbar {
    gap: 4px;
    overflow: visible;
  }
  .pocket-tool-btn {
    flex: 1 1 auto;
    justify-content: center;
    padding: 0 8px;
    gap: 4px;
    font-size: var(--fs-12);
  }
  .pocket-tool-btn[data-pocket-undo] {
    flex: 0 0 44px;
    width: 44px;
    padding: 0;
  }
  .pocket-tool-btn[data-pocket-undo] span {
    display: none;
  }
  .pocket-tool-btn[data-pocket-clear] {
    flex: 0 0 auto;
    min-width: 50px;
    padding: 0 9px;
  }
  .pocket-piece-btn {
    flex: 0 0 68px;
    min-width: 68px;
    min-height: 64px;
  }
  .harbor-pill-build span,
  .harbor-pill-dash span {
    font-size: var(--fs-12);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pocket-tool-btn,
  .pocket-piece-btn {
    transition: none;
  }
  .pocket-piece-btn:hover,
  .pocket-piece-btn:active {
    transform: none;
  }
}

/* =====================================================================
   Game 4: Finn's Night Market — Cozy Dusk-Lit Harbor Food & Craft Stall
   ===================================================================== */

.harbor-pill-market {
  background: var(--gold);
  border-color: transparent;
  color: var(--on-bright);
  font-family: var(--font-display);
  font-weight: 800;
}

.harbor-pill-market:hover {
  border-color: transparent;
}

.harbor-market-host {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  flex-direction: column;
  background: var(--harbor-market-sky-top);
}

.harbor-market-host[hidden] {
  display: none !important;
}

.market-root {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--harbor-market-sky-top);
}

.market-top-hud {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.market-hud-left,
.market-hud-right {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
  min-width: 0;
}

.market-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  padding: 0 11px;
  border-radius: var(--r-pill);
  border: 1px solid var(--harbor-hud-border);
  background: var(--harbor-hud-bg);
  color: var(--text-1);
  font-family: var(--font-num);
  font-size: var(--fs-13);
  font-weight: 700;
  white-space: nowrap;
}

.market-stat-pill[hidden],
.market-close-btn[hidden],
.market-prep-overlay[hidden],
.market-serve-dock[hidden],
.market-ledger-overlay[hidden] {
  display: none !important;
}

.market-coins-pill {
  color: var(--gold);
}

.market-coins-pill small {
  color: var(--text-2);
  font-family: var(--font-ui);
  font-size: var(--fs-11);
  font-weight: 600;
}

.market-timer-pill.is-chill {
  border-color: var(--mint);
  color: var(--mint);
}

.market-timer-pill.is-low {
  border-color: var(--coral);
  color: var(--coral);
}

.market-pace-btn.is-chill-on {
  border-color: var(--mint);
  color: var(--mint);
}

.market-banner {
  top: 62px;
  z-index: 8;
}

/* Sprite thumbnails from static/art/harbor/market.webp (8x2 grid) */
.market-thumb {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: block;
  background-image: url('/static/art/harbor/market.webp');
  background-repeat: no-repeat;
  background-size: 800% 200%;
}

.market-thumb.is-chowder { background-position: 0% 0%; }
.market-thumb.is-tart { background-position: 14.2857% 0%; }
.market-thumb.is-tea { background-position: 28.5714% 0%; }
.market-thumb.is-charm { background-position: 42.8571% 0%; }
.market-thumb.is-warm_lanterns { background-position: 57.1429% 0%; }
.market-thumb.is-fast_kettle { background-position: 71.4286% 0%; }
.market-thumb.is-fresh_cooler { background-position: 85.7143% 0%; }

/* ---------- Prep & Stocking Overlay ---------- */
.market-prep-overlay {
  position: absolute;
  inset: 60px 10px 10px;
  z-index: 6;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 4px 0 16px;
}

.market-prep-card {
  width: 100%;
  max-width: 720px;
  padding: 16px;
  border-radius: var(--r-22);
  border: 1px solid var(--border-card);
  background: var(--surface);
  box-shadow: var(--shadow-raised);
  color: var(--text-1);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.market-prep-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.market-prep-title {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: var(--fs-20);
  font-weight: 800;
  letter-spacing: var(--tracking-head);
}

.market-forecast-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--gold);
  background: var(--gold-bg);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: var(--fs-13);
  font-weight: 800;
}

.market-forecast-hint {
  margin: 0;
  color: var(--text-body);
  font-size: var(--fs-13);
  line-height: 1.4;
}

.market-prep-note {
  margin: 0;
  padding: 8px 12px;
  border-radius: var(--r-12);
  border: 1px solid var(--mint);
  background: var(--mint-bg);
  color: var(--mint);
  font-size: var(--fs-12);
  font-weight: 700;
}

.market-items-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.market-item-row {
  padding: 10px;
  border-radius: var(--r-14);
  border: 1px solid var(--border);
  background: var(--surface-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.market-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.market-item-info {
  flex: 1 1 auto;
  min-width: 0;
}

.market-item-info strong {
  display: block;
  font-size: var(--fs-13);
  color: var(--text-1);
}

.market-item-info small {
  display: block;
  font-size: var(--fs-11);
  color: var(--text-3);
}

.market-price-tag {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--tag-bg);
  color: var(--lilac);
  font-size: var(--fs-11);
  font-weight: 700;
}

.market-price-tag.is-fair,
.market-price-tag.is-friendly,
.market-price-tag.is-bargain {
  background: var(--mint-bg);
  color: var(--mint);
}

.market-price-tag.is-steep,
.market-price-tag.is-very-steep {
  background: var(--coral-bg);
  color: var(--coral);
}

.market-item-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.market-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 3px 4px;
  border-radius: var(--r-12);
  border: 1px solid var(--border);
  background: var(--bg);
}

.market-step-lbl {
  font-size: var(--fs-11);
  color: var(--text-3);
  padding-left: 4px;
}

.market-step-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: var(--r-12);
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-1);
  font-family: var(--font-num);
  font-size: var(--fs-16);
  font-weight: 700;
  cursor: pointer;
}

.market-step-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.market-step-val {
  min-width: 26px;
  text-align: center;
  font-family: var(--font-num);
  font-size: var(--fs-13);
  font-weight: 700;
  color: var(--gold);
}

.market-prep-sec {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.market-prep-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.market-prep-sec h3 {
  margin: 0;
  color: var(--text-2);
  font-size: var(--fs-12);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.market-prep-sec-head small {
  color: var(--gold);
  font-size: var(--fs-12);
  font-weight: 700;
}

.market-upg-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.market-upg-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 6px 8px;
  border-radius: var(--r-12);
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-1);
  text-align: left;
  cursor: pointer;
}

.market-upg-btn.is-owned {
  border-color: var(--mint);
  background: var(--mint-bg);
}

.market-upg-btn.is-ready {
  border-color: var(--gold);
}

.market-upg-btn:disabled {
  opacity: 0.65;
  cursor: default;
}

.market-upg-text strong {
  display: block;
  font-size: var(--fs-12);
}

.market-upg-text small {
  display: block;
  font-size: var(--fs-11);
  color: var(--text-2);
}

.market-pred-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.market-pred-btn {
  min-height: 44px;
  padding: 6px 10px;
  border-radius: var(--r-12);
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-2);
  font-family: var(--font-ui);
  font-size: var(--fs-12);
  font-weight: 700;
  cursor: pointer;
}

.market-pred-btn.is-on {
  border-color: var(--link);
  background: var(--blue-bg);
  color: var(--text-1);
}

.market-prep-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
}

/* ---------- Live Shift Serve Dock ---------- */
.market-serve-dock {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 12px;
  z-index: 6;
  max-width: 720px;
  margin-inline: auto;
  padding: 8px;
  border-radius: var(--r-18);
  border: 1px solid var(--border-card);
  background: var(--surface-solid);
  box-shadow: var(--shadow-raised);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.market-serve-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 4px;
}

.market-serve-status {
  color: var(--text-body);
  font-size: var(--fs-12);
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-serve-sales {
  flex: 0 0 auto;
  color: var(--gold);
  font-family: var(--font-num);
  font-size: var(--fs-12);
  font-weight: 700;
}

.market-serve-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.market-serve-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 82px;
  padding: 6px 4px;
  border-radius: var(--r-14);
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-1);
  cursor: pointer;
  transition: transform var(--motion-fast) var(--ease-out), border-color var(--motion-fast) var(--ease-out);
}

.market-serve-btn:hover:not(:disabled) {
  transform: translateY(var(--lift));
  border-color: var(--link);
}

.market-serve-btn:active:not(:disabled) {
  transform: scale(var(--press));
}

.market-serve-btn.is-wanted {
  border-color: var(--gold);
  background: var(--gold-bg);
}

.market-serve-btn.is-empty,
.market-serve-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.market-serve-key {
  position: absolute;
  top: 4px;
  left: 6px;
  color: var(--text-3);
  font-family: var(--font-num);
  font-size: var(--fs-11);
  font-weight: 700;
}

.market-serve-name {
  font-family: var(--font-ui);
  font-size: var(--fs-12);
  font-weight: 700;
  line-height: 1.1;
}

.market-serve-meta-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-num);
  font-size: var(--fs-11);
  color: var(--text-2);
}

.market-serve-meta-row strong {
  color: var(--gold);
}

.market-step-btn:focus-visible,
.market-upg-btn:focus-visible,
.market-pred-btn:focus-visible,
.market-serve-btn:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

/* ---------- Evening Ledger Reveal Card ---------- */
.market-ledger-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 14px;
  background: var(--scrim);
  overflow-y: auto;
}

.market-ledger-card {
  width: 100%;
  max-width: 460px;
  padding: 18px;
  border-radius: var(--r-22);
  border: 1px solid var(--border-card);
  background: var(--surface-solid);
  box-shadow: var(--shadow-raised);
  color: var(--text-1);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.market-ledger-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.market-ledger-finn {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.market-ledger-title-wrap {
  flex: 1 1 auto;
  min-width: 0;
}

.market-stars-strip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.market-star {
  color: var(--text-3);
  opacity: 0.4;
}

.market-star.is-lit {
  color: var(--gold);
  opacity: 1;
}

.market-net-row {
  align-items: center;
}

.dash-end-big.is-neg {
  color: var(--coral);
}

.market-net-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.market-net-meta strong {
  font-size: var(--fs-13);
  color: var(--text-2);
}

.dash-end-badge.is-soft {
  background: var(--tag-bg);
  border-color: var(--lilac);
  color: var(--lilac);
}

.market-why-box {
  padding: 10px 12px;
  border-radius: var(--r-14);
  border: 1px solid var(--border-card);
  background: var(--surface-soft);
}

.market-why-box strong {
  display: block;
  margin-bottom: 4px;
  color: var(--link);
  font-size: var(--fs-12);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.market-why-box p {
  margin: 0;
  color: var(--text-body);
  font-size: var(--fs-13);
  line-height: 1.45;
}

@media (max-width: 640px) {
  .market-items-grid {
    grid-template-columns: 1fr;
  }
  .market-upg-grid,
  .market-pred-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .market-top-hud {
    top: 8px;
    left: 6px;
    right: 6px;
    gap: 4px;
  }
  .market-hud-left,
  .market-hud-right {
    gap: 4px;
  }
  .market-back-btn span,
  .market-coins-pill small,
  .market-close-btn span,
  .market-pace-btn span {
    display: none;
  }
  .market-back-btn,
  .market-close-btn,
  .market-pace-btn {
    min-width: 44px;
    padding: 0;
  }
  .market-stat-pill {
    min-height: 36px;
    padding: 0 7px;
    gap: 4px;
    font-size: var(--fs-12);
  }
  .market-goals-btn {
    min-width: 44px;
    padding: 0 8px;
    gap: 4px;
    font-size: var(--fs-12);
  }
  .market-prep-overlay {
    inset: 56px 6px 8px;
  }
  .market-prep-card {
    padding: 12px;
  }
  .market-item-controls {
    grid-template-columns: 1fr;
  }
  .market-prep-actions {
    grid-template-columns: 1fr;
  }
  .market-serve-dock {
    left: 6px;
    right: 6px;
    bottom: 34px;
    padding: 6px;
  }
  .market-serve-grid {
    gap: 4px;
  }
  .market-serve-btn {
    min-height: 78px;
    padding: 4px 2px;
  }
  .market-serve-key {
    display: none;
  }
  .harbor-pill-market span {
    font-size: var(--fs-12);
  }
}

@media (prefers-reduced-motion: reduce) {
  .market-serve-btn {
    transition: none;
  }
  .market-serve-btn:hover:not(:disabled),
  .market-serve-btn:active:not(:disabled) {
    transform: none;
  }
}

/* ==========================================================================
   4-Level Harbor Campaign, Active Objective Pill, Difficulty & Quests Board
   ========================================================================== */

.harbor-pill-levels {
  border-color: var(--gold);
  background: var(--harbor-hud-bg);
  color: var(--gold);
}

.harbor-pill-quests {
  position: relative;
  border-color: var(--mint);
  background: var(--harbor-hud-bg);
  color: var(--mint);
}

.harbor-pill-sub {
  font-size: var(--fs-11);
  color: var(--text-1);
}

.harbor-quest-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--gold);
  color: var(--on-bright);
  font-size: var(--fs-11);
  font-weight: 800;
}

.harbor-quest-dot[hidden] {
  display: none;
}

.harbor-obj-strip {
  position: absolute;
  top: 62px;
  left: 10px;
  right: 10px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.harbor-hud-overlay .harbor-obj-strip {
  position: static;
}

.harbor-obj-strip[hidden],
.harbor-objective-pill[hidden] {
  display: none;
}

.harbor-objective-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  max-width: 100%;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--gold);
  background: var(--harbor-hud-bg);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: var(--fs-13);
  font-weight: 700;
  box-shadow: var(--shadow-raised);
  cursor: pointer;
  transition: transform var(--motion-fast) var(--ease-out), border-color var(--motion-fast) var(--ease-out);
}

div.harbor-objective-pill {
  cursor: default;
}

.harbor-objective-pill svg {
  flex: 0 0 auto;
  color: var(--gold);
}

.harbor-objective-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.harbor-objective-pill:hover {
  border-color: var(--link);
}

.harbor-objective-pill:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.harbor-objective-pill.is-met {
  border-color: var(--mint);
  background: var(--mint-bg);
  color: var(--text-1);
}

.harbor-objective-pill.is-met svg {
  color: var(--mint);
}

.harbor-obj-diff {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-card);
  background: var(--surface-soft);
  color: var(--text-2);
  font-size: var(--fs-11);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.harbor-obj-diff[data-diff-tier="cozy"] {
  border-color: var(--mint);
  color: var(--mint);
}

.harbor-obj-diff[data-diff-tier="hard"] {
  border-color: var(--coral);
  color: var(--coral);
}

/* ---------- 3-Tier Difficulty Switcher ---------- */
.harbor-diff-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 4px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-card);
  background: var(--surface-soft);
}

.harbor-diff-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-2);
  font-family: var(--font-ui);
  font-size: var(--fs-13);
  font-weight: 800;
  cursor: pointer;
  transition: transform var(--motion-fast) var(--ease-out), background var(--motion-fast) var(--ease-out);
}

.harbor-diff-btn:hover {
  color: var(--text-1);
}

.harbor-diff-btn:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.harbor-diff-btn.is-cozy.is-on {
  background: var(--mint-bg);
  border-color: var(--mint);
  color: var(--mint);
}

.harbor-diff-btn.is-normal.is-on {
  background: var(--blue);
  border-color: var(--link);
  color: var(--text-1);
}

.harbor-diff-btn.is-hard.is-on {
  background: var(--coral-bg);
  border-color: var(--coral);
  color: var(--coral);
}

.harbor-diff-switch.is-compact {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  background: var(--harbor-hud-bg);
  border-color: var(--harbor-hud-border);
}

.harbor-diff-switch.is-compact .harbor-diff-btn {
  min-height: 44px;
  min-width: 48px;
  padding: 0 8px;
  font-size: var(--fs-12);
}

/* ---------- Campaign Levels (1-4) Drawer ---------- */
.camp-levels-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.camp-level-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: var(--r-14);
  border: 1px solid var(--border-card);
  background: var(--surface-soft);
}

.camp-level-card.is-next {
  border-color: var(--gold);
  background: var(--gold-bg);
}

.camp-level-card.is-done {
  border-color: var(--mint);
}

.camp-level-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.camp-level-num {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--link);
  font-family: var(--font-num);
  font-size: var(--fs-12);
  font-weight: 800;
  text-transform: uppercase;
}

.camp-level-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.camp-hard-medal {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  border: 1px solid var(--coral);
  background: var(--coral-bg);
  color: var(--coral);
  font-size: var(--fs-11);
  font-weight: 800;
}

.camp-stars-row {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.camp-star {
  display: inline-flex;
  color: var(--text-3);
  opacity: 0.45;
}

.camp-star.is-lit {
  color: var(--gold);
  opacity: 1;
}

.camp-level-title {
  color: var(--text-1);
  font-family: var(--font-display);
  font-size: var(--fs-16);
  font-weight: 800;
}

.camp-level-goal {
  margin: 0;
  color: var(--text-2);
  font-size: var(--fs-12);
  line-height: 1.4;
}

.camp-level-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

.camp-level-status {
  color: var(--text-3);
  font-size: var(--fs-12);
  font-weight: 700;
}

.camp-level-card.is-done .camp-level-status {
  color: var(--mint);
}

.camp-level-card.is-next .camp-level-status {
  color: var(--gold);
}

.camp-launch-btn {
  min-height: 44px;
  padding: 0 16px;
}

/* ---------- Harbor Side Missions / Quests Drawer ---------- */
.quest-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quest-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: var(--r-14);
  border: 1px solid var(--border-card);
  background: var(--surface-soft);
}

.quest-card.is-claimable {
  border-color: var(--gold);
  background: var(--gold-bg);
}

.quest-card.is-claimed {
  border-color: var(--mint);
  opacity: 0.85;
}

.quest-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.quest-card-info strong {
  display: block;
  color: var(--text-1);
  font-size: var(--fs-14);
  font-weight: 800;
}

.quest-card-info small {
  display: block;
  margin-top: 2px;
  color: var(--text-2);
  font-size: var(--fs-12);
  line-height: 1.35;
}

.quest-prog-tag {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-card);
  background: var(--surface);
  color: var(--text-2);
  font-size: var(--fs-12);
  font-weight: 800;
}

.quest-done-tag {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--mint);
  background: var(--mint-bg);
  color: var(--mint);
  font-size: var(--fs-12);
  font-weight: 800;
}

.quest-claim-btn {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 14px;
}

.quest-bar-track {
  width: 100%;
  height: 7px;
  border-radius: var(--r-pill);
  background: var(--surface);
  overflow: hidden;
}

.quest-bar-fill {
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--gold);
  transition: width var(--motion-med) var(--ease-out);
}

.quest-card.is-claimed .quest-bar-fill {
  background: var(--mint);
}

.quest-rewards-line {
  color: var(--link);
  font-size: var(--fs-12);
  font-weight: 700;
}

/* ---------- Unified Level Complete Celebration Modal ---------- */
.camp-complete-card {
  gap: 14px;
}

.camp-complete-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.camp-complete-finn {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: var(--r-14);
  border: 1.5px solid var(--gold);
  background: var(--gold-bg);
  object-fit: contain;
}

.camp-complete-summary {
  margin: 0;
  color: var(--text-body);
  font-size: var(--fs-14);
  line-height: 1.45;
}

.camp-modal-stats {
  grid-template-columns: repeat(3, 1fr);
}

.camp-complete-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.camp-next-btn,
.dash-next-level-btn {
  width: 100%;
  min-height: 48px;
  font-size: var(--fs-15);
}

.dash-end-stars {
  margin-top: 4px;
}

.dash-ms-chip.is-hard {
  border-color: var(--coral);
  background: var(--coral-bg);
  color: var(--coral);
}

@media (max-width: 640px) {
  .dash-diff-wrap,
  .pocket-diff-wrap,
  .market-diff-wrap {
    display: none;
  }
}

@media (max-width: 520px) {
  .harbor-hud-overlay {
    top: 8px;
    left: 6px;
    right: 6px;
    gap: 6px;
  }
  .harbor-top-bar {
    gap: 4px;
    align-items: center;
  }
  .harbor-top-left .harbor-counters {
    display: none;
  }
  .harbor-zone-pill {
    max-width: 118px;
    padding: 4px 9px;
    font-size: var(--fs-12);
  }
  .harbor-zone-pill span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .harbor-top-right {
    flex-wrap: nowrap;
    gap: 4px;
  }
  .harbor-top-right .harbor-pill-btn {
    padding: 0 9px;
    gap: 4px;
    font-size: var(--fs-12);
  }
  .harbor-top-right .harbor-pill-classic {
    display: none;
  }
  .harbor-obj-strip {
    top: 58px;
    left: 6px;
    right: 6px;
  }
  .harbor-objective-pill {
    font-size: var(--fs-12);
    padding: 4px 10px;
    gap: 6px;
  }
  .harbor-banner {
    top: 112px;
  }
  .harbor-pill-sub {
    display: none;
  }
}

@media (max-width: 380px) {
  .harbor-zone-pill {
    max-width: 92px;
    padding: 4px 7px;
  }
  .harbor-top-right .harbor-pill-btn {
    padding: 0 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .harbor-objective-pill,
  .harbor-diff-btn,
  .quest-bar-fill,
  .dash-boss-fill,
  .pocket-event-pill,
  .harbor-badge-btn {
    transition: none;
  }
}

/* ---------- PR 2: Equipable Title Badges, Boss Wave Bars & Coastal Event Pill ---------- */
.harbor-title-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  max-width: 160px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--gold);
  background: var(--surface-solid);
  color: var(--gold);
  font-size: var(--fs-12);
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: var(--shadow-raised);
  cursor: pointer;
}

.harbor-title-badge-pill[hidden] {
  display: none;
}

.harbor-badge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.harbor-badge-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--r-12);
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-2);
  font-family: var(--font-ui);
  font-size: var(--fs-12);
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--motion-fast) var(--ease-out), border-color var(--motion-fast) var(--ease-out);
}

.harbor-badge-btn:hover:not(:disabled) {
  transform: translateY(var(--lift));
  border-color: var(--gold);
  color: var(--text-1);
}

.harbor-badge-btn.is-equipped,
.harbor-badge-btn.is-on {
  border-color: var(--gold);
  background: var(--gold-bg);
  color: var(--gold);
}

.harbor-badge-btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.harbor-badge-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Compact Boss Wave HUD bar (Harbor Dash King Crab + Night Market Storm Ferry Rush) */
.dash-boss-bar {
  position: absolute;
  top: 102px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  width: min(320px, calc(100% - 24px));
  padding: 8px 12px;
  border-radius: var(--r-14);
  border: 1.5px solid var(--coral);
  background: var(--surface-solid);
  box-shadow: var(--shadow-raised);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dash-boss-bar[hidden] {
  display: none;
}

.market-boss-bar {
  border-color: var(--gold);
}

.dash-boss-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: var(--fs-12);
  color: var(--text-1);
}

.dash-boss-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--coral);
  font-weight: 800;
}

.market-boss-bar .dash-boss-title {
  color: var(--gold);
}

.dash-boss-timer {
  font-family: var(--font-num);
  font-size: var(--fs-12);
  font-weight: 700;
  color: var(--gold);
}

.dash-boss-track {
  width: 100%;
  height: 7px;
  border-radius: var(--r-pill);
  background: var(--surface-soft);
  overflow: hidden;
}

.dash-boss-fill {
  height: 100%;
  width: 100%;
  border-radius: var(--r-pill);
  background: var(--play);
  transition: width var(--motion-fast) var(--ease-out);
}

.market-boss-bar .dash-boss-fill {
  background: var(--gold);
}

/* Pocket Harbor Interactive Coastal Event Pill */
.pocket-event-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  max-width: min(320px, calc(100vw - 24px));
  padding: 6px 14px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--gold);
  background: var(--surface-solid);
  color: var(--gold);
  font-family: var(--font-ui);
  font-size: var(--fs-12);
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-raised);
  transition: transform var(--motion-fast) var(--ease-out), border-color var(--motion-fast) var(--ease-out);
}

.pocket-event-pill[hidden] {
  display: none;
}

.pocket-event-pill:hover {
  transform: translateY(var(--lift));
}

.pocket-event-pill.is-storm {
  border-color: var(--coral);
  color: var(--coral);
}

@media (max-width: 520px) {
  .harbor-title-badge-pill {
    max-width: 118px;
    padding: 6px 10px;
    font-size: var(--fs-12);
  }
  .dash-boss-bar {
    top: 96px;
    padding: 6px 10px;
  }
  .harbor-badge-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .harbor-title-badge-pill {
    display: none;
  }
}

/* ==========================================================================
   Learning-by-Decisions PR 1 — Universal Aha! Reveal & Coach Bridge
   ========================================================================== */

.harbor-aha-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: var(--r-14);
  border: 1px solid var(--border-card);
  background: var(--surface-soft);
  text-align: left;
}

.harbor-aha-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.harbor-aha-proof {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--gold-bg);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-num);
  font-size: var(--fs-12);
  font-weight: 800;
  white-space: nowrap;
}

.harbor-aha-why {
  margin: 0;
  font-size: var(--fs-13);
  line-height: 1.4;
  color: var(--text-1);
}

.harbor-aha-disclaimer {
  margin: 0;
  font-size: var(--fs-11);
  color: var(--text-3);
}

.harbor-btn-coach {
  border-color: var(--link);
  background: var(--blue);
  color: var(--text-1);
}

.harbor-btn-coach:hover:not(:disabled) {
  background: var(--blue-hover);
  border-color: var(--link);
}

/* ==========================================================================
   Pocket Harbor — Cash Flow, Diversification, Sail Day & Storm Reserve
   ========================================================================== */

.pocket-reserve-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: var(--r-pill);
  background: var(--surface-soft);
  color: var(--text-3);
}

.pocket-reserve-tag.is-ready {
  background: var(--mint-bg);
  color: var(--mint);
}

.pocket-shells-pill.is-reserve-ready {
  border-color: var(--mint);
}

.pocket-flow-pill {
  gap: 6px;
}

.pocket-flow-pill.is-pos {
  border-color: var(--mint);
  color: var(--mint);
}

.pocket-flow-pill.is-neg {
  border-color: var(--coral);
  color: var(--coral);
}

.pocket-div-tag {
  padding: 2px 7px;
  border-radius: var(--r-pill);
  background: var(--surface-soft);
  color: var(--text-2);
  font-size: var(--fs-11);
  font-weight: 800;
}

.pocket-div-tag.is-diverse {
  background: var(--mint-bg);
  color: var(--mint);
}

.pocket-sail-btn {
  min-height: 44px;
  background: var(--play);
  border-color: var(--play-from);
  color: var(--on-bright);
  font-weight: 800;
}

.pocket-sail-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.pocket-shock-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  max-width: min(320px, calc(100vw - 24px));
  padding: 5px 12px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--coral);
  background: var(--surface-solid);
  color: var(--coral);
  font-size: var(--fs-12);
  font-weight: 800;
  box-shadow: var(--shadow-raised);
}

.pocket-shock-pill[hidden] {
  display: none;
}

.pocket-piece-btn {
  position: relative;
}

.pocket-piece-flow {
  position: absolute;
  top: 4px;
  right: 4px;
  padding: 1px 5px;
  border-radius: var(--r-pill);
  font-family: var(--font-num);
  font-size: var(--fs-11);
  font-weight: 800;
  line-height: 1.25;
}

.pocket-piece-flow.is-income {
  background: var(--mint-bg);
  color: var(--mint);
}

.pocket-piece-flow.is-upkeep {
  background: var(--coral-bg);
  color: var(--coral);
}

.pocket-piece-flow.is-neutral {
  background: var(--surface-soft);
  color: var(--text-3);
}

.pocket-reveal-card {
  position: absolute;
  left: 50%;
  top: 108px;
  transform: translateX(-50%);
  z-index: 16;
  width: min(560px, calc(100% - 20px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--r-18);
  border: 1.5px solid var(--gold);
  background: var(--surface-solid);
  box-shadow: var(--shadow-raised);
  pointer-events: auto;
}

.pocket-reveal-card[hidden] {
  display: none;
}

.pocket-reveal-card.is-mint {
  border-color: var(--mint);
}

.pocket-reveal-card.is-mint .harbor-aha-proof {
  background: var(--mint-bg);
  border-color: var(--mint);
  color: var(--mint);
}

.pocket-reveal-card.is-coral {
  border-color: var(--coral);
}

.pocket-reveal-card.is-coral .harbor-aha-proof {
  background: var(--coral-bg);
  border-color: var(--coral);
  color: var(--coral);
}

.pocket-reveal-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.pocket-reveal-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.pocket-reveal-why {
  margin: 0;
  font-size: var(--fs-13);
  line-height: 1.38;
  color: var(--text-1);
}

.pocket-reveal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pocket-reveal-coach {
  min-height: 44px;
  padding: 8px 14px;
  font-size: var(--fs-13);
}

.pocket-reveal-close {
  min-width: 44px;
  min-height: 44px;
}

/* ==========================================================================
   Night Market — Visual Stall Pips, Upgrade Payback Rings, Live Price Nudges
   ========================================================================== */

.market-item-title-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.market-shelf-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: var(--r-pill);
  font-size: var(--fs-11);
  font-weight: 700;
}

.market-shelf-chip.is-perish {
  background: var(--coral-bg);
  color: var(--coral);
}

.market-shelf-chip.is-keeps {
  background: var(--mint-bg);
  color: var(--mint);
}

.market-pip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.market-pip-stack {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.market-pip {
  width: 7px;
  height: 7px;
  border-radius: var(--r-pill);
  display: inline-block;
}

.market-pip.is-cost {
  background: var(--text-3);
}

.market-pip.is-profit {
  background: var(--gold);
}

.market-pip-row .is-profit-txt {
  color: var(--gold);
  font-weight: 800;
}

.market-payback-ring {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: var(--r-pill);
  padding: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(var(--gold) var(--pb-deg, 0deg), var(--border) 0deg);
}

.market-payback-ring.is-paid {
  background: conic-gradient(var(--mint) 360deg, var(--mint) 0deg);
}

.market-payback-ring .market-thumb {
  width: 34px;
  height: 34px;
  border-radius: var(--r-pill);
  background-color: var(--surface-solid);
}

.market-upg-btn.is-low-cash {
  border-color: var(--coral);
}

.market-liq-warn {
  display: block;
  font-style: normal;
  font-size: var(--fs-11);
  font-weight: 700;
  color: var(--coral);
}

.market-cal-sec {
  gap: 8px;
}

.market-conf-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.market-conf-lbl {
  font-size: var(--fs-12);
  color: var(--text-2);
  font-weight: 700;
  margin-right: 4px;
}

.market-conf-btn {
  min-width: 58px;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-1);
  font-family: var(--font-num);
  font-size: var(--fs-13);
  font-weight: 800;
  cursor: pointer;
}

.market-conf-btn.is-on {
  border-color: var(--gold);
  background: var(--gold-bg);
  color: var(--gold);
}

.market-serve-slot {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.market-nudge-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.market-nudge-btn {
  min-height: 44px;
  padding: 4px 2px;
  border-radius: var(--r-12);
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text-1);
  font-family: var(--font-num);
  font-size: var(--fs-12);
  font-weight: 800;
  cursor: pointer;
}

.market-nudge-btn:hover:not(:disabled) {
  border-color: var(--link);
  color: var(--link);
}

.market-nudge-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.dash-end-badge.is-mint {
  background: var(--mint-bg);
  border-color: var(--mint);
  color: var(--mint);
}

.dash-end-badge.is-coral {
  background: var(--coral-bg);
  border-color: var(--coral);
  color: var(--coral);
}

.dash-ms-chip.is-review {
  border-color: var(--link);
  color: var(--link);
}

@media (max-width: 560px) {
  .pocket-top-hud {
    gap: 6px;
  }
  .pocket-hud-left,
  .pocket-hud-right {
    gap: 5px;
    flex-wrap: wrap;
  }
  .pocket-stat-pill {
    padding: 5px 8px;
    font-size: var(--fs-12);
  }
  .pocket-sail-btn {
    padding: 6px 10px;
    font-size: var(--fs-12);
  }
  .pocket-reveal-card {
    top: 122px;
    padding: 9px 10px;
  }
  .market-upg-grid {
    grid-template-columns: 1fr;
  }
  .market-item-controls {
    grid-template-columns: 1fr;
  }
  .market-stepper {
    padding: 2px 4px;
  }
}

@media (max-width: 460px) {
  .market-serve-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pocket-event-pill,
  .pocket-sail-btn,
  .market-nudge-btn,
  .market-conf-btn,
  .dash-charm-btn,
  .dash-vault-pill,
  .dash-compare-fill {
    transition: none;
    animation: none;
  }
}

/* ---------- Harbor Dash Learning-by-Decisions (PR 2: Compounding vs. Risk + Charm Fee Drag) ---------- */
.dash-top-stack {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  pointer-events: none;
}

.dash-top-stack .dash-top-hud,
.dash-top-stack .dash-active-buffs,
.dash-top-stack .dash-boss-bar,
.dash-top-stack .dash-twist-banner {
  position: static;
  top: auto;
  left: auto;
  right: auto;
  transform: none;
}

.dash-top-stack .dash-boss-bar,
.dash-top-stack .dash-twist-banner {
  align-self: center;
}

.dash-finance-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}

.dash-vault-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--harbor-hud-border);
  background: var(--harbor-hud-bg);
  color: var(--text-1);
  font-size: var(--fs-12);
  font-weight: 700;
  transition: transform var(--motion-fast) var(--ease-out), border-color var(--motion-fast) var(--ease-out);
}

.dash-vault-pill[hidden] {
  display: none !important;
}

.dash-vault-lbl {
  color: var(--text-3);
  font-size: var(--fs-11);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dash-vault-val {
  font-family: var(--font-num);
  font-size: var(--fs-13);
  font-weight: 800;
}

.dash-vault-pill.is-safe {
  border-color: var(--mint);
  color: var(--mint);
}

.dash-vault-pill.is-safe .dash-vault-lbl {
  color: var(--mint);
}

.dash-vault-pill.is-safe.is-pulse {
  animation: dash-safe-pulse 420ms var(--ease-out);
}

@keyframes dash-safe-pulse {
  0% { transform: scale(1); }
  45% { transform: scale(1.09); border-color: var(--gold); }
  100% { transform: scale(1); }
}

.dash-vault-pill.is-bag.has-haul {
  border-color: var(--gold);
  color: var(--gold);
}

.dash-vault-pill.is-bag.is-hot {
  background: var(--gold-bg);
}

.dash-mult-chip {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: var(--r-pill);
  background: var(--surface-soft);
  color: var(--text-2);
  font-family: var(--font-num);
  font-size: var(--fs-11);
  font-weight: 800;
}

.dash-mult-chip.is-hot {
  background: var(--gold-bg);
  color: var(--gold);
}

.dash-mult-chip.is-max {
  background: var(--play);
  color: var(--on-bright);
}

.dash-vault-pill.is-fee {
  border-color: var(--coral);
  background: var(--harbor-hud-bg);
  color: var(--coral);
}

.dash-vault-pill.is-fee .dash-vault-lbl {
  color: var(--coral);
}

.dash-next-level-btn[hidden] {
  display: none !important;
}

.dash-obj-pill {
  position: static;
  transform: none;
  min-height: 30px;
  padding: 3px 10px;
}

/* ---------- Paused Pre-Run Harbor Charm Pick Overlay ---------- */
.dash-charm-overlay {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: grid;
  place-items: center;
  padding: 14px;
  overflow-y: auto;
  background: var(--scrim);
}

.dash-charm-overlay[hidden] {
  display: none !important;
}

.dash-charm-card {
  width: 100%;
  max-width: 680px;
  padding: 18px;
  border-radius: var(--r-22);
  border: 1.5px solid var(--border-card);
  background: var(--surface-solid);
  box-shadow: var(--shadow-raised);
  color: var(--text-1);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dash-charm-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.dash-charm-paused {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--mint);
  background: var(--mint-bg);
  color: var(--mint);
  font-size: var(--fs-11);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dash-charm-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-20);
  font-weight: 800;
  letter-spacing: var(--tracking-head);
  color: var(--text-1);
}

.dash-charm-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dash-charm-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  min-height: 164px;
  padding: 14px 10px;
  border-radius: var(--r-18);
  border: 1.5px solid var(--border-card);
  background: var(--surface-soft);
  color: var(--text-1);
  cursor: pointer;
  transition: transform var(--motion-fast) var(--ease-out), border-color var(--motion-fast) var(--ease-out), background var(--motion-fast) var(--ease-out);
}

.dash-charm-key {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 22px;
  height: 22px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--navy);
  color: var(--text-3);
  font-size: var(--fs-11);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dash-charm-btn:hover {
  transform: translateY(-2px);
  border-color: var(--link);
  background: var(--surface);
}

.dash-charm-btn:active {
  transform: scale(0.98);
}

.dash-charm-btn:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.dash-charm-btn.is-mint:hover {
  border-color: var(--mint);
}

.dash-charm-btn.is-gold:hover {
  border-color: var(--gold);
}

.dash-charm-btn.is-coral:hover {
  border-color: var(--coral);
}

.dash-charm-thumb {
  width: 54px;
  height: 54px;
  border-radius: var(--r-14);
  border: 1px solid var(--border);
  background-color: var(--navy);
  background-image: url('/static/art/harbor/dash.webp');
  background-size: 800% 200%;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

.dash-charm-thumb.is-buoy {
  background-position: 14.2857% 100%;
}

.dash-charm-thumb.is-sail {
  background-position: 100% 0%;
}

.dash-charm-thumb.is-magnet {
  background-position: 0% 100%;
}

.dash-charm-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.dash-charm-name {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-display);
  font-size: var(--fs-15);
  font-weight: 800;
  color: var(--text-1);
}

.dash-charm-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}

.dash-charm-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-family: var(--font-num);
  font-size: var(--fs-11);
  font-weight: 800;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-1);
}

.dash-charm-pill.is-mint {
  border-color: var(--mint);
  background: var(--mint-bg);
  color: var(--mint);
}

.dash-charm-pill.is-gold {
  border-color: var(--gold);
  background: var(--gold-bg);
  color: var(--gold);
}

.dash-charm-pill.is-coral {
  border-color: var(--coral);
  background: var(--coral-bg);
  color: var(--coral);
}

.dash-charm-tag {
  font-size: var(--fs-12);
  color: var(--text-2);
  font-weight: 600;
}

.dash-charm-foot {
  margin: 0;
  text-align: center;
  font-size: var(--fs-12);
  color: var(--text-2);
}

/* ---------- End-of-Run 2-Bar Kept vs. Lost Comparison ---------- */
.dash-compare-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: var(--r-14);
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.dash-compare-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dash-compare-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: var(--fs-12);
  font-weight: 700;
}

.dash-compare-name {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-2);
}

.dash-compare-name.is-kept,
.dash-compare-labels .is-kept {
  color: var(--gold);
}

.dash-compare-name.is-lost,
.dash-compare-labels .is-lost {
  color: var(--coral);
}

.dash-compare-track {
  width: 100%;
  height: 10px;
  border-radius: var(--r-pill);
  background: var(--navy);
  overflow: hidden;
  border: 1px solid var(--border);
}

.dash-compare-fill {
  height: 100%;
  border-radius: var(--r-pill);
  transition: width var(--motion-med) var(--ease-out);
}

.dash-compare-fill.is-kept {
  background: var(--gold);
}

.dash-compare-fill.is-lost {
  background: var(--coral);
}

.dash-compare-detail {
  color: var(--text-3);
  font-family: var(--font-num);
  font-size: var(--fs-11);
  text-align: right;
}

/* ==========================================================================
   Learning-by-Decisions PR 3 — Level 1 Island Decisions & Mastery Quests
   ========================================================================== */

.harbor-decision-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  max-width: 100%;
}

.harbor-dec-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--harbor-hud-border);
  background: var(--harbor-hud-bg);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: var(--fs-12);
  font-weight: 700;
  white-space: nowrap;
}

button.harbor-dec-pill {
  min-height: 44px;
  cursor: pointer;
  transition: transform var(--motion-fast) var(--ease-out), border-color var(--motion-fast) var(--ease-out);
}

button.harbor-dec-pill:hover {
  transform: translateY(var(--lift));
  border-color: var(--link);
}

button.harbor-dec-pill:active {
  transform: scale(var(--press));
}

button.harbor-dec-pill:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.harbor-dec-pill[hidden] {
  display: none;
}

.harbor-dec-pill.is-coins {
  color: var(--gold);
  border-color: var(--gold);
}

.harbor-dec-pill.is-coins small {
  color: var(--text-2);
  font-weight: 600;
}

.harbor-dec-pill.is-coins.is-leaking {
  color: var(--coral);
  border-color: var(--coral);
  background: var(--surface-solid);
}

.harbor-dec-pill.is-barnacle,
.harbor-dec-pill.is-debt,
.harbor-dec-pill.is-coral {
  color: var(--coral);
  border-color: var(--coral);
  background: var(--surface-solid);
}

.harbor-dec-pill.is-mint {
  color: var(--mint);
  border-color: var(--mint);
  background: var(--surface-solid);
}

.harbor-island-reveal {
  top: auto;
  bottom: 84px;
  z-index: 18;
}

.harbor-reveal-title {
  font-family: var(--font-display);
  font-size: var(--fs-14);
  font-weight: 800;
  color: var(--text-1);
}

.harbor-reveal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.harbor-reveal-btn {
  min-height: 44px;
}

.harbor-choice-card {
  width: min(620px, calc(100% - 20px));
}

.harbor-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.harbor-choice-btn {
  min-height: 148px;
}

.harbor-choice-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.harbor-choice-thumb {
  width: 54px;
  height: 54px;
  border-radius: var(--r-14);
  border: 1px solid var(--border);
  background-color: var(--navy);
  background-repeat: no-repeat;
  flex-shrink: 0;
}

.harbor-choice-thumb.is-tank {
  background-image: url('/static/art/harbor/dash.webp');
  background-size: 800% 200%;
  background-position: 14.2857% 100%;
}

.harbor-choice-thumb.is-crab {
  background-image: url('/static/art/harbor/dash.webp');
  background-size: 800% 200%;
  background-position: 0% 0%;
}

.harbor-choice-thumb.is-duck {
  background-image: url('/static/art/harbor/actors.webp');
  background-size: 800% 300%;
  background-position: 57.1429% 50%;
}

.harbor-choice-thumb.is-plank {
  background-image: url('/static/art/harbor/actors.webp');
  background-size: 800% 300%;
  background-position: 85.7143% 50%;
}

.harbor-choice-foot-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.harbor-choice-foot-actions .harbor-btn {
  min-height: 44px;
}

.harbor-loan-meter {
  width: 100%;
  height: 12px;
  border-radius: var(--r-pill);
  background: var(--navy);
  border: 1px solid var(--border);
  overflow: hidden;
}

.harbor-loan-meter-fill {
  height: 100%;
  background: var(--mint);
  border-radius: var(--r-pill);
  transition: width var(--motion-med) var(--ease-out);
}

.quest-title-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.quest-level-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  font-family: var(--font-num);
  font-size: var(--fs-11);
  font-weight: 800;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--link);
}

.quest-level-chip.is-island {
  border-color: var(--mint);
  background: var(--mint-bg);
  color: var(--mint);
}

.quest-level-chip.is-dash {
  border-color: var(--play-from);
  color: var(--play-from);
}

.quest-level-chip.is-pocket {
  border-color: var(--link);
  color: var(--link);
}

.quest-level-chip.is-market {
  border-color: var(--gold);
  background: var(--gold-bg);
  color: var(--gold);
}

.quest-level-chip.is-campaign {
  border-color: var(--lilac);
  color: var(--lilac);
}

@media (max-width: 600px) {
  .harbor-choice-grid {
    grid-template-columns: 1fr;
  }
  .harbor-choice-btn {
    flex-direction: row;
    text-align: left;
    min-height: 76px;
    padding: 10px 12px;
    gap: 12px;
  }
  .harbor-choice-thumb {
    width: 48px;
    height: 48px;
  }
  .harbor-decision-strip {
    gap: 4px;
  }
  .harbor-dec-pill {
    font-size: var(--fs-11);
    padding: 4px 8px;
  }
  .harbor-island-reveal {
    bottom: 76px;
    width: calc(100% - 16px);
  }
}

@media (prefers-reduced-motion: reduce) {
  button.harbor-dec-pill,
  .harbor-loan-meter-fill {
    transition: none;
  }
}

@media (max-width: 600px) {
  .dash-top-stack {
    top: 8px;
    left: 8px;
    right: 8px;
    gap: 5px;
  }
  .dash-finance-strip {
    gap: 4px;
  }
  .dash-vault-pill {
    padding: 2px 8px;
    min-height: 26px;
    font-size: var(--fs-11);
  }
  .dash-charm-card {
    padding: 14px;
    gap: 10px;
  }
  .dash-charm-title {
    font-size: var(--fs-18);
  }
  .dash-charm-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .dash-charm-btn {
    flex-direction: row;
    text-align: left;
    min-height: 76px;
    padding: 10px 12px;
    gap: 12px;
  }
  .dash-charm-key {
    display: none;
  }
  .dash-charm-body {
    align-items: flex-start;
  }
  .dash-charm-badges {
    justify-content: flex-start;
  }
  .dash-charm-thumb {
    width: 48px;
    height: 48px;
  }
}

/* ==========================================================================
   PR 1 Polish — Handcrafted "Kenney Toybox at Dusk" HUD, Chrome & 4-Game Hub
   Uses Deep Blue & --harbor-* tokens from static/css/tokens.css only.
   ========================================================================== */

/* Desktop breathing room: expand full-bleed Harbor canvas across right rail */
@media (min-width: 1024px) {
  body[data-view="journey"]:has(#mapScreen.is-harbor) .arcade-shell {
    grid-template-columns: var(--side-col) minmax(0, 1fr);
  }
  body[data-view="journey"]:has(#mapScreen.is-harbor) .right-panel {
    display: none;
  }
}

/* Unified 3-Slot Handcrafted Game HUD (kills multi-row pill soup) */
.harbor-hud-clean {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 6;
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) minmax(0, auto);
  align-items: start;
  gap: 10px;
  pointer-events: none;
}

.harbor-hud-left,
.harbor-hud-center,
.harbor-hud-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  pointer-events: none;
}

.harbor-hud-left {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.harbor-hud-center {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.harbor-hud-right {
  justify-content: flex-end;
}

.harbor-hud-left > *,
.harbor-hud-center > *,
.harbor-hud-right > * {
  pointer-events: auto;
}

/* Top-left handcrafted Player Status Plaque */
.harbor-status-plaque {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 6px 14px 6px 10px;
  border-radius: var(--r-14);
  border: 3px solid var(--harbor-outline);
  background: var(--harbor-plaque-bg);
  box-shadow: inset 0 1px 0 var(--harbor-plaque-hi), var(--harbor-plaque-shadow);
  color: var(--text-1);
}

.harbor-status-plaque.is-leaking {
  border-color: var(--coral);
}

.harbor-status-coin {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-12);
  border: 2px solid var(--harbor-outline);
  background: var(--gold-bg);
  color: var(--gold);
  flex-shrink: 0;
}

.harbor-status-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.harbor-status-val {
  color: var(--gold);
  font-family: var(--font-num);
  font-size: var(--fs-15);
  font-weight: 800;
}

.harbor-status-zone {
  color: var(--text-2);
  font-family: var(--font-ui);
  font-size: var(--fs-11);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 132px;
}

/* Dash & Pocket compact unified status plaques */
.dash-status-plaque,
.pocket-status-plaque {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  padding: 6px 12px;
}

.dash-plaque-row,
.pocket-plaque-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dash-hearts-inline {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.dash-plaque-sub,
.pocket-plaque-sub {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-11);
  color: var(--text-2);
  font-weight: 700;
}

.dash-sub-safe {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--mint);
}

.dash-sub-bag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--gold);
}

.dash-sub-fee {
  color: var(--coral);
  font-family: var(--font-num);
}

.pocket-plaque-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-13);
}

.pocket-plaque-item.is-gold {
  color: var(--gold);
}

.pocket-plaque-item.is-mint {
  color: var(--mint);
}

/* Active event chip — ONLY visible during active leak / squall / debt */
.harbor-event-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--r-14);
  border: 3px solid var(--harbor-outline);
  background: var(--harbor-plaque-bg);
  box-shadow: inset 0 1px 0 var(--harbor-plaque-hi), var(--harbor-btn-depth);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: var(--fs-12);
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--motion-fast) var(--ease-out);
}

.harbor-event-chip[hidden] {
  display: none;
}

.harbor-event-chip.is-coral {
  border-color: var(--coral);
  color: var(--coral);
}

.harbor-event-chip.is-mint {
  border-color: var(--mint);
  color: var(--mint);
}

/* Top-center bold Current Goal Plaque */
.harbor-goal-plaque {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  max-width: min(440px, 100%);
  padding: 6px 14px;
  border-radius: var(--r-14);
  border: 3px solid var(--harbor-outline);
  background: var(--harbor-goal-bg);
  box-shadow: inset 0 1px 0 var(--harbor-plaque-hi), inset 0 0 0 1px var(--gold-border), var(--harbor-plaque-shadow);
  color: var(--text-1);
  font-family: var(--font-display);
  font-size: var(--fs-13);
  font-weight: 800;
  letter-spacing: var(--tracking-head);
  cursor: pointer;
  transition: transform var(--motion-fast) var(--ease-out), border-color var(--motion-fast) var(--ease-out);
}

.harbor-goal-plaque[hidden] {
  display: none;
}

.harbor-goal-plaque:hover {
  transform: translateY(var(--lift));
  border-color: var(--gold);
}

.harbor-goal-plaque:active {
  transform: translateY(2px);
}

.harbor-goal-plaque:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.harbor-goal-ico {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: var(--r-pill);
  background: var(--gold-bg);
  color: var(--gold);
  flex-shrink: 0;
}

.harbor-goal-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.harbor-goal-diff {
  flex-shrink: 0;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  border: 2px solid var(--harbor-outline);
  background: var(--surface-soft);
  color: var(--text-2);
  font-family: var(--font-ui);
  font-size: var(--fs-11);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.harbor-goal-diff[data-diff-tier="cozy"] {
  color: var(--mint);
}

.harbor-goal-diff[data-diff-tier="hard"] {
  color: var(--coral);
}

/* Crisp WCAG AA met-state (dark teal fill + bright mint accent + white text) */
.harbor-goal-plaque.is-met,
.harbor-objective-pill.is-met {
  background: var(--harbor-goal-met-bg);
  border-color: var(--mint);
  color: var(--text-1);
}

.harbor-goal-plaque.is-met .harbor-goal-ico {
  background: var(--mint-bg);
  color: var(--mint);
}

/* Top-right chunky tactile square/compact icon buttons (>= 44px) */
.harbor-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 46px;
  padding: 0 12px;
  border-radius: var(--r-14);
  border: 3px solid var(--harbor-outline);
  background: var(--harbor-btn-bg);
  box-shadow: inset 0 1px 0 var(--harbor-plaque-hi), var(--harbor-btn-depth);
  color: var(--text-1);
  font-family: var(--font-display);
  font-size: var(--fs-12);
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--motion-fast) var(--ease-out), background var(--motion-fast) var(--ease-out);
}

.harbor-icon-btn.is-square {
  width: 46px;
  padding: 0;
}

.harbor-icon-btn[hidden] {
  display: none !important;
}

.harbor-icon-btn:hover {
  background: var(--harbor-btn-bg-hover);
  transform: translateY(var(--lift));
}

.harbor-icon-btn:active {
  transform: translateY(2px);
}

.harbor-icon-btn:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.harbor-icon-btn.is-chill-on {
  border-color: var(--mint);
  color: var(--mint);
}

.harbor-badge-dot {
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  border: 2px solid var(--harbor-outline);
  background: var(--play);
  color: var(--on-bright);
  font-family: var(--font-num);
  font-size: var(--fs-11);
  font-weight: 800;
}

.harbor-badge-dot[hidden] {
  display: none;
}

.harbor-timer-plaque {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 46px;
  padding: 0 12px;
  border-radius: var(--r-14);
  border: 3px solid var(--harbor-outline);
  background: var(--harbor-plaque-bg);
  box-shadow: inset 0 1px 0 var(--harbor-plaque-hi), var(--harbor-btn-depth);
  color: var(--text-1);
  font-family: var(--font-num);
  font-size: var(--fs-13);
  font-weight: 800;
}

.harbor-timer-plaque[hidden] {
  display: none;
}

.harbor-timer-plaque.is-chill {
  border-color: var(--mint);
  color: var(--mint);
}

.harbor-timer-plaque.is-low {
  border-color: var(--coral);
  color: var(--coral);
}

/* Tactile Toybox depth on game panels, modals, sheets, and buttons */
.harbor-pack-sheet,
.harbor-dialogue,
.harbor-fishing-hud,
.dash-charm-card,
.dash-end-card,
.market-prep-card,
.market-ledger-card,
.pocket-dock-panel,
.pocket-reveal-card {
  border: 3px solid var(--harbor-outline);
  box-shadow: inset 0 1px 0 var(--harbor-plaque-hi), var(--harbor-modal-shadow);
}

.harbor-btn {
  border: 3px solid var(--harbor-outline);
  background: var(--harbor-btn-bg);
  box-shadow: inset 0 1px 0 var(--harbor-plaque-hi), var(--harbor-btn-depth);
  font-family: var(--font-display);
  font-weight: 800;
  transition: transform var(--motion-fast) var(--ease-out), background var(--motion-fast) var(--ease-out);
}

.harbor-btn:hover {
  background: var(--harbor-btn-bg-hover);
  transform: translateY(var(--lift));
}

.harbor-btn:active {
  transform: translateY(2px);
}

.harbor-btn-primary {
  background: var(--blue);
  border-color: var(--harbor-outline);
  color: var(--text-1);
}

.harbor-btn-primary:hover {
  background: var(--blue-hover);
}

.harbor-btn-play,
.harbor-act-btn {
  border: 3px solid var(--harbor-outline);
  background: var(--play);
  color: var(--on-bright);
  box-shadow: inset 0 2px 0 var(--harbor-plaque-hi), var(--harbor-play-depth);
}

.harbor-act-btn.is-ready {
  background: var(--gold);
  box-shadow: inset 0 2px 0 var(--harbor-plaque-hi), var(--harbor-gold-depth);
}

.harbor-dash-btn,
.harbor-reset-btn {
  border: 3px solid var(--harbor-outline);
  background: var(--harbor-btn-bg);
  box-shadow: inset 0 1px 0 var(--harbor-plaque-hi), var(--harbor-btn-depth);
}

.harbor-banner {
  top: 72px;
  border: 3px solid var(--harbor-outline);
  background: var(--harbor-plaque-bg);
  box-shadow: var(--harbor-plaque-shadow);
}

/* Sidebar Play Now card handcrafted upgrade */
.today-game {
  border: 3px solid var(--harbor-outline);
  background: var(--harbor-plaque-bg);
  box-shadow: inset 0 1px 0 var(--harbor-plaque-hi), var(--harbor-plaque-shadow);
}

.today-game .btn-play {
  border: 3px solid var(--harbor-outline);
  box-shadow: inset 0 1px 0 var(--harbor-plaque-hi), var(--harbor-play-depth);
}

/* Pack drawer quick action rows */
.harbor-pack-quick-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.harbor-pack-quick-row .harbor-btn {
  font-size: var(--fs-12);
  padding: 0 10px;
}

/* Upgraded 4-Game Hub Selector Cards */
.camp-diff-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.camp-diff-head h3 {
  margin: 0;
}

.camp-progress-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  border: 2px solid var(--harbor-outline);
  background: var(--gold-bg);
  color: var(--gold);
  font-size: var(--fs-12);
  font-weight: 800;
}

.camp-level-card {
  gap: 8px;
  padding: 14px;
  border-radius: var(--r-18);
  border: 3px solid var(--harbor-outline);
  background: var(--harbor-plaque-bg);
  box-shadow: inset 0 1px 0 var(--harbor-plaque-hi), var(--harbor-btn-depth);
  justify-content: space-between;
}

@media (min-width: 781px) {
  .harbor-pack-sheet[data-harbor-levels-sheet] {
    max-width: 780px;
    width: min(780px, calc(100% - 36px));
    max-height: min(760px, calc(100% - 28px));
  }
  .harbor-pack-sheet[data-harbor-levels-sheet] .camp-levels-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

.camp-level-card.is-next {
  border-color: var(--gold);
  background: var(--harbor-goal-bg);
}

.camp-level-card.is-done {
  border-color: var(--mint);
}

.camp-level-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.camp-level-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.camp-level-art {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: var(--r-14);
  border: 3px solid var(--harbor-outline);
  background-color: var(--navy);
  background-repeat: no-repeat;
  box-shadow: inset 0 1px 0 var(--harbor-plaque-hi);
}

.camp-level-art.is-island {
  background-image: url('/static/art/harbor/actors.webp');
  background-size: 800% 300%;
  background-position: 0% 0%;
}

.camp-level-art.is-dash {
  background-image: url('/static/art/harbor/dash.webp');
  background-size: 800% 200%;
  background-position: 85.7143% 100%;
}

.camp-level-art.is-pocket {
  background-image: url('/static/art/harbor/pocket.webp');
  background-size: 800% 200%;
  background-position: 100% 0%;
}

.camp-level-art.is-market {
  background-image: url('/static/art/harbor/market.webp');
  background-size: 800% 200%;
  background-position: 100% 0%;
}

.camp-level-skill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--tag-bg);
  color: var(--lilac);
  font-size: var(--fs-11);
  font-weight: 700;
}

.camp-level-summary {
  margin: 0;
  color: var(--text-body);
  font-size: var(--fs-13);
  line-height: 1.4;
}

.camp-level-goal {
  margin: 0;
  color: var(--text-2);
  font-size: var(--fs-12);
  line-height: 1.35;
}

.camp-level-goal span {
  color: var(--gold);
  font-weight: 800;
}

/* Night Market Dusk Toybox warmth */
.market-prep-overlay {
  inset: 70px 10px 10px;
}

.market-prep-card {
  background: var(--harbor-plaque-bg);
}

.market-item-card,
.market-upgrade-row {
  border: 2px solid var(--harbor-outline);
  background: var(--surface-solid);
}

.dash-active-buffs {
  position: absolute;
  top: 70px;
  left: 12px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: none;
}

.pocket-sail-btn {
  min-height: 46px;
  padding: 0 14px;
  font-size: var(--fs-13);
}

/* ---------- Active Combat Controls (Level 1 & Level 2) + Boss HP Bar HUD ---------- */
.harbor-combat-cluster {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.harbor-arcade-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  min-width: 66px;
  min-height: 66px;
  padding: 5px;
  border: 3px solid var(--harbor-outline);
  border-radius: var(--r-pill);
  background: var(--harbor-plaque-bg);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform var(--motion-fast) var(--ease-out), box-shadow var(--motion-fast) var(--ease-out);
}

.harbor-arcade-btn:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
}

.harbor-arcade-btn:hover {
  transform: translateY(var(--lift));
}

.harbor-arcade-btn:active,
.harbor-arcade-btn.is-swinging,
.harbor-arcade-btn.is-active {
  transform: translateY(3px) scale(0.96);
}

.harbor-arcade-ring {
  position: absolute;
  inset: 0;
  border-radius: var(--r-pill);
}

.harbor-dash-arcade-btn {
  box-shadow: var(--harbor-dash-arcade-depth);
}

.harbor-dash-arcade-btn .harbor-arcade-ring {
  background: conic-gradient(var(--link) var(--dash-deg, 360deg), var(--surface-soft) 0deg);
}

.harbor-attack-btn {
  box-shadow: var(--harbor-attack-depth);
}

.harbor-attack-btn .harbor-arcade-ring {
  background: conic-gradient(var(--gold) var(--atk-deg, 360deg), var(--surface-soft) 0deg);
}

.harbor-arcade-face {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: var(--r-pill);
  border: 2px solid var(--harbor-outline);
  background: var(--surface-solid);
  color: var(--text-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-family: var(--font-display);
  font-size: var(--fs-11);
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 2px 0 var(--harbor-plaque-hi);
}

.harbor-dash-arcade-btn.is-ready .harbor-arcade-face {
  background: var(--harbor-dash-arcade-bg);
  color: var(--on-bright);
}

.harbor-dash-arcade-btn.is-active .harbor-arcade-face {
  background: var(--gold);
  color: var(--on-bright);
}

.harbor-attack-btn.is-ready .harbor-arcade-face {
  background: var(--harbor-attack-bg);
  color: var(--on-bright);
}

.harbor-attack-btn.is-swinging .harbor-arcade-face {
  background: var(--harbor-attack-bg-active);
  color: var(--on-bright);
}

.harbor-arcade-lbl {
  letter-spacing: 0.01em;
}

.harbor-act-btn[hidden] {
  display: none !important;
}

/* Level 2 Harbor Dash tactile Attack + Dash cluster */
.dash-controls-dock {
  right: 16px;
  bottom: 18px;
  gap: 10px;
}

.dash-action-btn {
  width: 74px;
  height: 74px;
  min-width: 74px;
  min-height: 74px;
  padding: 5px;
  border: 3px solid var(--harbor-outline);
  background: var(--harbor-plaque-bg);
}

.dash-dodge-btn {
  box-shadow: var(--harbor-dash-arcade-depth);
}

.dash-dodge-btn .dash-action-ring {
  background: conic-gradient(var(--link) var(--dash-deg, 360deg), var(--surface-soft) 0deg);
}

.dash-dodge-btn.is-ready .dash-action-inner {
  background: var(--harbor-dash-arcade-bg);
  color: var(--on-bright);
  box-shadow: inset 0 2px 0 var(--harbor-plaque-hi);
}

.dash-dodge-btn.is-dashing .dash-action-inner {
  background: var(--gold);
  color: var(--on-bright);
}

.dash-attack-btn {
  box-shadow: var(--harbor-attack-depth);
}

.dash-attack-ring {
  background: conic-gradient(var(--gold) var(--atk-deg, 360deg), var(--surface-soft) 0deg);
}

.dash-action-inner {
  border: 2px solid var(--harbor-outline);
  box-shadow: inset 0 2px 0 var(--harbor-plaque-hi);
}

.dash-attack-btn.is-ready .dash-attack-inner {
  background: var(--harbor-attack-bg);
  color: var(--on-bright);
  box-shadow: inset 0 2px 0 var(--harbor-plaque-hi);
}

.dash-attack-btn.is-swinging .dash-attack-inner {
  background: var(--harbor-attack-bg-active);
  color: var(--on-bright);
}

.dash-action-btn:hover {
  transform: translateY(var(--lift));
}

.dash-action-btn:active,
.dash-action-btn.is-swinging,
.dash-action-btn.is-dashing {
  transform: translateY(3px) scale(0.96);
}

/* Level 2 Boss HP Bar inside the clean 3-slot handcrafted HUD */
.harbor-hud-clean .dash-boss-bar {
  position: static;
  top: auto;
  left: auto;
  transform: none;
  width: min(360px, 100%);
  padding: 7px 12px 9px;
  border-radius: var(--r-14);
  border: 3px solid var(--harbor-outline);
  background: var(--harbor-plaque-bg);
  box-shadow: inset 0 1px 0 var(--harbor-plaque-hi), var(--harbor-plaque-shadow);
  gap: 6px;
}

.harbor-hud-clean .dash-boss-bar.is-vulnerable {
  border-color: var(--mint);
  background: var(--harbor-goal-met-bg);
}

.harbor-hud-clean .dash-boss-bar.is-charging {
  border-color: var(--coral);
}

.dash-boss-state {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  border: 2px solid var(--harbor-outline);
  background: var(--coral-bg);
  color: var(--coral);
  font-family: var(--font-display);
  font-size: var(--fs-11);
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.dash-boss-bar.is-vulnerable .dash-boss-state {
  background: var(--mint);
  color: var(--on-bright);
}

.dash-boss-hp {
  font-family: var(--font-num);
  font-size: var(--fs-12);
  font-weight: 800;
  color: var(--gold);
  white-space: nowrap;
}

.harbor-hud-clean .dash-boss-track {
  position: relative;
  height: 11px;
  border-radius: var(--r-pill);
  border: 2px solid var(--harbor-outline);
  background: var(--navy);
  overflow: hidden;
}

.harbor-hud-clean .dash-boss-fill {
  height: 100%;
  background: var(--harbor-boss-hp-bg);
  transition: width var(--motion-fast) var(--ease-out);
}

.harbor-hud-clean .dash-boss-bar.is-vulnerable .dash-boss-fill {
  background: var(--harbor-boss-vuln-bg);
}

.dash-boss-pips {
  position: absolute;
  inset: 0;
  display: flex;
  pointer-events: none;
}

.dash-boss-pip {
  flex: 1 1 0;
  border-right: 2px solid var(--harbor-outline);
}

.dash-boss-pip:last-child {
  border-right: 0;
}

/* Responsive HUD polish: crisp mobile layout at 360px & 390px with >= 44px tap targets */
@media (max-width: 780px) {
  .harbor-hud-clean {
    top: 8px;
    left: 8px;
    right: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
  }
  .harbor-hud-center {
    grid-column: 1 / -1;
    order: 3;
    width: 100%;
  }
  .harbor-goal-plaque {
    width: 100%;
    max-width: none;
    min-height: 44px;
    padding: 4px 12px;
    font-size: var(--fs-12);
  }
  .harbor-hud-clean .dash-boss-bar {
    width: 100%;
    padding: 6px 10px 8px;
  }
  .dash-hud-clean .harbor-hud-left {
    flex-wrap: nowrap;
    gap: 4px;
    min-width: 0;
  }
  .dash-hud-clean .harbor-hud-right {
    gap: 4px;
  }
  .dash-hud-clean .dash-status-plaque {
    padding: 3px 6px;
    gap: 1px;
    min-width: 0;
  }
  .dash-hud-clean .dash-plaque-row {
    gap: 4px;
  }
  .dash-hud-clean .dash-score-val {
    font-size: var(--fs-13);
  }
  .dash-hud-clean .dash-combo-badge {
    padding: 1px 4px;
    font-size: var(--fs-11);
  }
  .dash-hud-clean .dash-hearts-inline {
    gap: 1px;
  }
  .dash-hud-clean .dash-plaque-sub {
    gap: 5px;
    font-size: var(--fs-11);
  }
  .dash-hud-clean .harbor-timer-plaque {
    padding: 0 6px;
    gap: 3px;
    font-size: var(--fs-11);
  }
  .dash-root .harbor-banner {
    top: 138px;
  }
  .harbor-action-dock {
    right: 10px;
    bottom: 14px;
    gap: 8px;
  }
  .harbor-arcade-btn {
    width: 58px;
    height: 58px;
    min-width: 58px;
    min-height: 58px;
  }
  .dash-controls-dock {
    right: 10px;
    bottom: 14px;
    gap: 8px;
  }
  .dash-action-btn {
    width: 66px;
    height: 66px;
    min-width: 66px;
    min-height: 66px;
  }
  .harbor-combat-cluster {
    gap: 8px;
  }
  .harbor-status-plaque {
    min-height: 44px;
    padding: 4px 10px 4px 8px;
    gap: 7px;
  }
  .harbor-status-coin {
    width: 28px;
    height: 28px;
  }
  .harbor-status-zone {
    max-width: 96px;
  }
  .harbor-icon-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 0 10px;
  }
  .harbor-icon-btn.is-square {
    width: 44px;
    padding: 0;
  }
  .harbor-icon-lbl {
    display: none;
  }
  .harbor-timer-plaque {
    min-height: 44px;
    padding: 0 9px;
    font-size: var(--fs-12);
  }
  .pocket-sail-btn {
    min-height: 44px;
    padding: 0 10px;
    font-size: var(--fs-12);
  }
  .harbor-banner {
    top: 108px;
  }
  .market-prep-overlay {
    inset: 106px 8px 8px;
  }
  .harbor-pack-quick-row {
    grid-template-columns: 1fr;
  }
  .harbor-hint-keys {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .harbor-icon-btn,
  .harbor-goal-plaque,
  .harbor-event-chip,
  .harbor-btn,
  .harbor-act-btn,
  .harbor-arcade-btn,
  .dash-action-btn,
  .harbor-hud-clean .dash-boss-fill {
    transition: none;
  }
  .harbor-icon-btn:hover,
  .harbor-icon-btn:active,
  .harbor-goal-plaque:hover,
  .harbor-goal-plaque:active,
  .harbor-btn:hover,
  .harbor-btn:active,
  .harbor-arcade-btn:hover,
  .harbor-arcade-btn:active,
  .harbor-arcade-btn.is-swinging,
  .harbor-arcade-btn.is-active,
  .dash-action-btn:hover,
  .dash-action-btn:active,
  .dash-action-btn.is-swinging,
  .dash-action-btn.is-dashing {
    transform: none;
  }
}

/* ==========================================================================
   PR 3: Shared Interactive Tutorial Banner, Spotlight Ring & Visual Guide
   (100% Deep Blue tokens from static/css/tokens.css; zero raw hex/rgb)
   ========================================================================== */

.harbor-help-btn {
  color: var(--link);
}

.harbor-help-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* Compact non-blocking coach banner positioned below the top HUD */
.harbor-tut-banner {
  position: absolute;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 26;
  width: min(468px, calc(100% - 24px));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-18);
  border: 2px solid var(--gold);
  background: var(--surface-solid);
  box-shadow: var(--shadow-raised);
  pointer-events: auto;
  transition: border-color var(--motion-fast) var(--ease-out);
}

.harbor-tut-banner[hidden] {
  display: none;
}

.harbor-tut-banner.is-celebrating {
  border-color: var(--mint);
}

.harbor-tut-avatar {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: var(--r-pill);
  border: 2px solid var(--gold-rim);
  background: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.harbor-tut-avatar img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
}

.harbor-tut-tick {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 20px;
  height: 20px;
  border-radius: var(--r-pill);
  background: var(--mint);
  color: var(--on-bright);
  border: 2px solid var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.harbor-tut-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.harbor-tut-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.harbor-tut-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.harbor-tut-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--border-card);
}

.harbor-tut-dot.is-now {
  width: 16px;
  background: var(--gold);
}

.harbor-tut-dot.is-done {
  background: var(--mint);
}

.harbor-tut-count {
  color: var(--gold);
  font-family: var(--font-num);
  font-size: var(--fs-11);
  font-weight: 800;
}

.harbor-tut-banner.is-celebrating .harbor-tut-count {
  color: var(--mint);
}

.harbor-tut-done-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  background: var(--mint-bg);
  border: 1px solid var(--mint);
  color: var(--mint);
  font-family: var(--font-display);
  font-size: var(--fs-11);
  font-weight: 800;
}

.harbor-tut-prompt {
  margin: 0;
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: var(--fs-14);
  font-weight: 800;
  line-height: 1.25;
}

.harbor-tut-skip {
  flex: 0 0 auto;
  min-width: 56px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--r-12);
  border: 1px solid var(--border-card);
  background: var(--surface-soft);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: var(--fs-13);
  font-weight: 800;
  cursor: pointer;
  transition: transform var(--motion-fast) var(--ease-out), border-color var(--motion-fast) var(--ease-out);
}

.harbor-tut-skip:hover {
  transform: translateY(var(--lift));
  border-color: var(--link);
}

.harbor-tut-skip:active {
  transform: scale(var(--press));
}

.harbor-tut-skip:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

/* Visual Spotlight / Pulsing Pointer Ring for DOM HUD elements */
@keyframes harbor-tut-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.92;
  }
  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}

.harbor-tut-spotlight {
  position: absolute;
  z-index: 25;
  pointer-events: none;
  border-radius: var(--r-14);
  border: 3px solid var(--gold);
  box-shadow: 0 0 0 4px var(--gold-bg);
  animation: harbor-tut-pulse 1.35s var(--ease-out) infinite;
}

.harbor-tut-spotlight.is-round {
  border-radius: var(--r-pill);
}

.harbor-tut-spotlight[hidden] {
  display: none;
}

/* Keep Dash top HUD clickable above the paused Charm Picker scrim (below guide modal z:45 & end modal) */
.dash-hud-clean {
  z-index: 12;
}

.dash-charm-overlay {
  padding-top: 72px;
}

/* Give Dash charm picker & Market prep overlay room below the tutorial banner */
[data-tut-active="true"] .dash-charm-overlay {
  padding-top: var(--harbor-tut-clear, 146px);
}

[data-tut-active="true"] .market-prep-overlay {
  top: var(--harbor-tut-clear, 140px);
}

/* Consequence banners and reveal cards sit under the coach, not underneath it. */
[data-tut-active="true"] > .harbor-banner,
[data-tut-active="true"] > .pocket-reveal-card {
  top: var(--harbor-tut-clear, 168px);
}

/* Island coach stays on the island. Subgames bring their own tutorial. */
.harbor-root:has(.harbor-dash-host:not([hidden])) > .harbor-tut-banner,
.harbor-root:has(.harbor-dash-host:not([hidden])) > .harbor-tut-spotlight,
.harbor-root:has(.harbor-pocket-host:not([hidden])) > .harbor-tut-banner,
.harbor-root:has(.harbor-pocket-host:not([hidden])) > .harbor-tut-spotlight,
.harbor-root:has(.harbor-market-host:not([hidden])) > .harbor-tut-banner,
.harbor-root:has(.harbor-market-host:not([hidden])) > .harbor-tut-spotlight {
  display: none !important;
}

/* ---------- Visual How-to-Play Guide Modal ---------- */
.harbor-guide-overlay {
  position: absolute;
  inset: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: var(--scrim);
}

.harbor-guide-overlay[hidden] {
  display: none;
}

.harbor-guide-card {
  width: min(440px, 100%);
  max-height: calc(100% - 12px);
  overflow-y: auto;
  padding: 18px;
  border-radius: var(--r-22);
  border: 2px solid var(--border-card);
  background: var(--surface-solid);
  box-shadow: var(--shadow-raised);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.harbor-guide-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.harbor-guide-finn-wrap {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: var(--r-pill);
  border: 2px solid var(--gold-rim);
  background: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.harbor-guide-finn {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}

.harbor-guide-title-wrap {
  flex: 1 1 auto;
  min-width: 0;
}

.harbor-guide-title {
  margin: 2px 0 0;
  color: var(--text-1);
  font-family: var(--font-display);
  font-size: var(--fs-20);
  font-weight: 800;
  letter-spacing: var(--tracking-head);
}

.harbor-guide-close {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-12);
  border: 1px solid var(--border-card);
  background: var(--surface-soft);
  color: var(--text-1);
  cursor: pointer;
}

.harbor-guide-close:hover {
  border-color: var(--link);
}

.harbor-guide-close:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.harbor-guide-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.harbor-guide-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-14);
  border: 1px solid var(--border-card);
  background: var(--surface-soft);
}

.harbor-guide-ico {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: var(--r-12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-bg);
  color: var(--link);
}

.harbor-guide-row.is-gold .harbor-guide-ico {
  background: var(--gold-bg);
  color: var(--gold);
}

.harbor-guide-row.is-mint .harbor-guide-ico {
  background: var(--mint-bg);
  color: var(--mint);
}

.harbor-guide-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.harbor-guide-lbl {
  color: var(--text-1);
  font-family: var(--font-display);
  font-size: var(--fs-13);
  font-weight: 800;
}

.harbor-guide-txt {
  margin: 0;
  color: var(--text-body);
  font-family: var(--font-ui);
  font-size: var(--fs-13);
  line-height: 1.35;
}

.harbor-guide-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.harbor-guide-replay {
  flex: 1 1 180px;
  min-height: 46px;
}

.harbor-guide-ok {
  flex: 0 1 auto;
  min-width: 96px;
  min-height: 46px;
}

/* Mobile 360px & 390px HUD wrap guarantee (zero horizontal overflow, all >= 44px) */
@media (max-width: 780px) {
  .harbor-tut-banner {
    top: 112px;
    width: calc(100% - 16px);
  }
  .dash-root .harbor-tut-banner,
  .pocket-root .harbor-tut-banner,
  .market-root .harbor-tut-banner {
    top: 116px;
  }
  [data-tut-active="true"] .dash-charm-overlay {
    padding-top: var(--harbor-tut-clear, 186px);
  }
  [data-tut-active="true"] .market-prep-overlay {
    top: var(--harbor-tut-clear, 184px);
  }
}

@media (max-width: 520px) {
  .harbor-hud-clean {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }
  .harbor-hud-clean .harbor-hud-left {
    flex: 1 1 auto;
    min-width: 0;
    gap: 4px;
  }
  .harbor-hud-clean .harbor-hud-right {
    flex: 0 1 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
  }
  .harbor-hud-clean .harbor-hud-center {
    flex: 1 0 100%;
    order: 3;
    width: 100%;
  }
  .harbor-root > .harbor-hud-clean .harbor-status-plaque {
    padding: 3px 7px 3px 6px;
    gap: 5px;
  }
  .harbor-root > .harbor-hud-clean .harbor-status-coin {
    width: 24px;
    height: 24px;
  }
  .harbor-root > .harbor-hud-clean .harbor-status-zone {
    max-width: 64px;
  }
  .harbor-tut-banner {
    padding: 7px 8px;
    gap: 8px;
  }
  .harbor-tut-avatar {
    width: 36px;
    height: 36px;
  }
  .harbor-tut-avatar img {
    width: 30px;
    height: 30px;
  }
  .harbor-tut-prompt {
    font-size: var(--fs-13);
  }
  .harbor-guide-card {
    padding: 14px;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .harbor-tut-spotlight {
    animation: none;
    outline: 2px solid var(--link);
    outline-offset: 2px;
  }
  .harbor-tut-banner,
  .harbor-tut-skip {
    transition: none;
  }
  .harbor-tut-skip:hover,
  .harbor-tut-skip:active {
    transform: none;
  }
}

/* ============================================================================
   Night Market (Rebuilt Single-Composition Stage UI)
   ============================================================================ */

.nm-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--harbor-market-sky-top);
  font-family: var(--font-ui);
  color: var(--text-1);
}

.nm-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: manipulation;
}

.nm-stage .harbor-tut-banner {
  top: 62px;
  max-width: 640px;
}

.nm-hud {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.nm-hud-left,
.nm-hud-right {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  pointer-events: auto;
}

.nm-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--harbor-hud-border);
  background: var(--harbor-hud-bg);
  color: var(--text-1);
  font-size: var(--fs-13);
  font-weight: 700;
  white-space: nowrap;
}

.nm-pill[hidden],
.nm-hud-btn[hidden],
.nm-dot[hidden],
.nm-boss-bar[hidden],
.nm-toast[hidden],
.nm-dock[hidden],
.nm-modal-backdrop[hidden],
.nm-sheet-backdrop[hidden] {
  display: none !important;
}

.nm-coins-pill {
  color: var(--gold);
  border-color: var(--gold);
}

.nm-pill-sub {
  font-family: var(--font-ui);
  font-size: var(--fs-11);
  font-weight: 600;
  color: var(--text-2);
}

.nm-goal-pill {
  color: var(--text-1);
}

.nm-goal-pill svg {
  color: var(--mint);
  flex-shrink: 0;
}

.nm-timer-pill {
  color: var(--text-1);
}

.nm-timer-pill.is-chill {
  color: var(--mint);
  border-color: var(--mint);
}

.nm-timer-pill.is-low {
  color: var(--coral);
  border-color: var(--coral);
}

.nm-hud-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--harbor-hud-border);
  background: var(--harbor-hud-bg);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: var(--fs-13);
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--motion-fast) var(--ease-out), border-color var(--motion-fast) var(--ease-out);
}

.nm-hud-btn.is-icon {
  padding: 0;
  width: 44px;
}

.nm-hud-btn:hover {
  transform: translateY(var(--lift));
  border-color: var(--link);
}

.nm-hud-btn:active {
  transform: scale(var(--press));
}

.nm-hud-btn:focus-visible,
.nm-item-card:focus-visible,
.nm-step-btn:focus-visible,
.nm-choice-btn:focus-visible,
.nm-serve-btn:focus-visible,
.nm-prices-toggle:focus-visible,
.nm-nudge-btn:focus-visible,
.nm-sec-btn:focus-visible,
.nm-coach-btn:focus-visible,
.nm-upg-row:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.nm-finish-btn {
  border-color: var(--gold);
  color: var(--gold);
}

.nm-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--gold);
}

.nm-stage .harbor-help-btn {
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--r-pill);
}

.nm-boss-bar {
  position: absolute;
  top: 62px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  width: min(360px, calc(100% - 20px));
  padding: 6px 12px;
  border-radius: var(--r-14);
  border: 1px solid var(--coral);
  background: var(--surface-solid);
  box-shadow: var(--shadow-raised);
}

.nm-boss-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: var(--fs-12);
  color: var(--coral);
  margin-bottom: 4px;
}

.nm-boss-track {
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--surface-soft);
  overflow: hidden;
}

.nm-boss-fill {
  height: 100%;
  width: 0%;
  background: var(--coral);
  border-radius: var(--r-pill);
  transition: width var(--motion) var(--ease-out);
}

.nm-toast {
  position: absolute;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 11;
  max-width: min(520px, calc(100% - 24px));
  padding: 8px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--gold);
  background: var(--surface-solid);
  color: var(--text-1);
  font-size: var(--fs-13);
  font-weight: 700;
  text-align: center;
  box-shadow: var(--shadow-raised);
  pointer-events: none;
}

[data-tut-active="true"].nm-stage .nm-toast {
  top: 122px;
}

/* ---------- Bottom Action Dock (Prep, Forecast, Live) ---------- */

.nm-dock {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 9;
  width: min(680px, calc(100% - 20px));
  padding: 12px;
  border-radius: var(--r-18);
  border: 1px solid var(--border-card);
  background: var(--surface);
  box-shadow: var(--shadow-raised);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nm-dock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.nm-weather-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-12);
  color: var(--text-body);
  line-height: 1.3;
}

.nm-weather-chip svg {
  color: var(--gold);
  flex-shrink: 0;
}

.nm-weather-chip strong {
  color: var(--text-1);
}

.nm-cost-chip {
  font-size: var(--fs-12);
  font-weight: 700;
  color: var(--gold);
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--gold-bg);
}

.nm-item-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.nm-item-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 76px;
  padding: 8px 6px 6px;
  border-radius: var(--r-14);
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-1);
  cursor: pointer;
  transition: transform var(--motion-fast) var(--ease-out), border-color var(--motion-fast) var(--ease-out), background var(--motion-fast) var(--ease-out);
}

.nm-item-card:hover {
  transform: translateY(var(--lift));
  border-color: var(--link);
}

.nm-item-card.is-selected {
  border-color: var(--gold);
  background: var(--gold-bg);
}

.nm-item-card .market-thumb {
  width: 34px;
  height: 34px;
}

.nm-item-qty {
  position: absolute;
  top: 5px;
  right: 6px;
  font-size: var(--fs-11);
  font-weight: 700;
  color: var(--text-2);
}

.nm-item-card.has-stock .nm-item-qty {
  color: var(--gold);
}

.nm-item-name {
  font-size: var(--fs-12);
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.2;
}

.nm-item-price {
  font-size: var(--fs-11);
  font-weight: 700;
  color: var(--text-2);
}

.nm-inspector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border-radius: var(--r-14);
  border: 1px solid var(--border);
  background: var(--surface-solid);
}

.nm-inspector-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: var(--fs-13);
}

.nm-inspector-info strong {
  color: var(--text-1);
}

.nm-meta-sep {
  font-size: var(--fs-12);
  color: var(--text-2);
}

.nm-demand-badge {
  font-size: var(--fs-11);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-pill);
}

.nm-demand-badge.is-mint {
  background: var(--mint-bg);
  color: var(--mint);
}

.nm-demand-badge.is-gold {
  background: var(--gold-bg);
  color: var(--gold);
}

.nm-demand-badge.is-coral {
  background: var(--coral-bg);
  color: var(--coral);
}

.nm-inspector-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nm-stepper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nm-step-lbl {
  font-size: var(--fs-12);
  font-weight: 700;
  color: var(--text-2);
}

.nm-step-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--r-12);
  border: 1px solid var(--border-card);
  background: var(--surface-soft);
  color: var(--text-1);
  font-family: var(--font-num);
  font-size: var(--fs-16);
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--motion-fast) var(--ease-out), border-color var(--motion-fast) var(--ease-out);
}

.nm-step-btn:hover:not(:disabled) {
  transform: translateY(var(--lift));
  border-color: var(--link);
}

.nm-step-btn:active:not(:disabled) {
  transform: scale(var(--press));
}

.nm-step-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.nm-step-val {
  min-width: 28px;
  text-align: center;
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--text-1);
}

.nm-dock-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nm-practice-note {
  font-size: var(--fs-12);
  color: var(--text-2);
}

.nm-open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: var(--r-pill);
  border: none;
  background: var(--play);
  color: var(--on-bright);
  font-family: var(--font-ui);
  font-size: var(--fs-14);
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--play-glow);
  transition: transform var(--motion-fast) var(--ease-out);
}

.nm-open-btn:hover:not(:disabled) {
  transform: translateY(var(--lift));
}

.nm-open-btn:active:not(:disabled) {
  transform: scale(var(--press));
}

.nm-open-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

/* ---------- Forecast Call Sheet (Beat 2) ---------- */

.nm-forecast-title {
  font-size: var(--fs-16);
  font-weight: 800;
  letter-spacing: var(--tracking-head);
  color: var(--text-1);
}

.nm-choice-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nm-choice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.nm-choice-lbl {
  font-size: var(--fs-12);
  font-weight: 700;
  color: var(--text-2);
}

.nm-choice-hint {
  font-size: var(--fs-12);
  color: var(--link);
}

.nm-choice-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.nm-choice-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 46px;
  padding: 6px 8px;
  border-radius: var(--r-12);
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: var(--fs-12);
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: transform var(--motion-fast) var(--ease-out), border-color var(--motion-fast) var(--ease-out), background var(--motion-fast) var(--ease-out);
}

.nm-choice-btn:hover {
  transform: translateY(var(--lift));
  border-color: var(--link);
}

.nm-choice-btn.is-on {
  border-color: var(--gold);
  background: var(--gold-bg);
  color: var(--gold);
}

.nm-conf-btn strong {
  font-size: var(--fs-14);
}

.nm-conf-btn span {
  font-size: var(--fs-11);
  font-weight: 600;
  color: var(--text-2);
}

.nm-conf-btn.is-on span {
  color: var(--text-1);
}

.nm-forecast-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nm-sec-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-card);
  background: var(--surface-soft);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: var(--fs-13);
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--motion-fast) var(--ease-out), border-color var(--motion-fast) var(--ease-out);
}

.nm-sec-btn:hover {
  transform: translateY(var(--lift));
  border-color: var(--link);
}

/* ---------- Live Shift Serve Dock ---------- */

.nm-live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nm-live-status {
  margin: 0;
  font-size: var(--fs-13);
  font-weight: 600;
  color: var(--text-body);
  line-height: 1.35;
}

.nm-prices-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-card);
  background: var(--surface-soft);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: var(--fs-12);
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}

.nm-prices-toggle.is-open {
  border-color: var(--link);
  background: var(--blue-bg);
  color: var(--link);
}

.nm-prices-toggle.is-alert {
  border-color: var(--coral);
  background: var(--coral-bg);
  color: var(--coral);
}

.nm-nudge-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  border-radius: var(--r-12);
  border: 1px solid var(--border);
  background: var(--surface-solid);
}

.nm-nudge-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.nm-nudge-name {
  font-size: var(--fs-11);
  font-weight: 700;
  color: var(--text-2);
}

.nm-nudge-ctrl {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-12);
}

.nm-nudge-btn {
  min-width: 38px;
  min-height: 44px;
  padding: 0 6px;
  border-radius: var(--r-12);
  border: 1px solid var(--border-card);
  background: var(--surface-soft);
  color: var(--text-1);
  font-family: var(--font-num);
  font-size: var(--fs-11);
  font-weight: 700;
  cursor: pointer;
}

.nm-nudge-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.nm-serve-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.nm-serve-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 82px;
  padding: 8px 6px 6px;
  border-radius: var(--r-14);
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-1);
  cursor: pointer;
  transition: transform var(--motion-fast) var(--ease-out), border-color var(--motion-fast) var(--ease-out), background var(--motion-fast) var(--ease-out);
}

.nm-serve-btn:hover:not(:disabled) {
  transform: translateY(var(--lift));
  border-color: var(--link);
}

.nm-serve-btn:active:not(:disabled) {
  transform: scale(var(--press));
}

.nm-serve-btn.is-wanted {
  border-color: var(--gold);
  background: var(--gold-bg);
}

.nm-serve-btn.is-empty,
.nm-serve-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.nm-serve-btn .market-thumb {
  width: 36px;
  height: 36px;
}

.nm-serve-key {
  position: absolute;
  top: 5px;
  left: 6px;
  font-size: var(--fs-11);
  font-weight: 700;
  color: var(--text-3);
}

.nm-wanted-tag {
  position: absolute;
  top: 5px;
  right: 5px;
  padding: 1px 6px;
  border-radius: var(--r-pill);
  background: var(--gold);
  color: var(--on-bright);
  font-size: var(--fs-11);
  font-weight: 800;
}

.nm-serve-name {
  font-size: var(--fs-12);
  font-weight: 700;
  color: var(--text-1);
}

.nm-serve-meta {
  font-size: var(--fs-11);
  font-weight: 700;
  color: var(--text-2);
}

/* ---------- Shop & Pace Drawer ---------- */

.nm-sheet-backdrop,
.nm-modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--scrim);
}

.nm-sheet {
  width: min(460px, 100%);
  max-height: calc(100% - 16px);
  overflow-y: auto;
  border-radius: var(--r-18);
  border: 1px solid var(--border-card);
  background: var(--surface-solid);
  box-shadow: var(--shadow-raised);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nm-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nm-sheet-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
}

.nm-sheet-title-wrap h2 {
  margin: 0;
  font-size: var(--fs-16);
  font-weight: 800;
  color: var(--text-1);
}

.nm-sheet-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nm-shop-sec {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nm-shop-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: var(--fs-12);
  color: var(--text-2);
}

.nm-shop-sec-head h3 {
  margin: 0;
  font-size: var(--fs-13);
  font-weight: 800;
  color: var(--text-1);
}

.nm-upg-list,
.nm-mile-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nm-upg-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 10px;
  border-radius: var(--r-14);
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-1);
  text-align: left;
  cursor: pointer;
}

.nm-upg-row.is-ready {
  border-color: var(--gold);
}

.nm-upg-row.is-owned {
  border-color: var(--mint);
  background: var(--mint-bg);
}

.nm-upg-row:disabled {
  cursor: default;
}

.nm-upg-row .market-thumb {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.nm-upg-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nm-upg-copy strong {
  font-size: var(--fs-13);
  color: var(--text-1);
}

.nm-upg-copy small {
  font-size: var(--fs-12);
  color: var(--text-2);
}

.nm-upg-meta {
  font-size: var(--fs-11);
  font-weight: 700;
  color: var(--mint);
}

.nm-upg-warn {
  font-size: var(--fs-11);
  font-weight: 700;
  color: var(--coral);
}

.nm-upg-badge {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--gold-bg);
  color: var(--gold);
  font-size: var(--fs-12);
  font-weight: 700;
}

.nm-upg-row.is-owned .nm-upg-badge {
  background: var(--mint-bg);
  color: var(--mint);
}

.nm-pace-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-radius: var(--r-14);
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.nm-pace-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nm-pace-copy strong {
  font-size: var(--fs-13);
}

.nm-pace-copy small {
  font-size: var(--fs-12);
  color: var(--text-2);
}

.nm-diff-box .camp-diff-switch {
  width: 100%;
  justify-content: space-between;
}

.nm-mile-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-12);
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.nm-mile-row.is-done {
  border-color: var(--mint);
  background: var(--mint-bg);
}

.nm-mile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--r-pill);
  background: var(--surface-solid);
  color: var(--gold);
  flex-shrink: 0;
}

.nm-mile-row.is-done .nm-mile-icon {
  color: var(--mint);
}

.nm-mile-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.nm-mile-copy strong {
  font-size: var(--fs-13);
}

.nm-mile-copy small {
  font-size: var(--fs-12);
  color: var(--text-2);
}

/* ---------- Evening Ledger Reveal ---------- */

.nm-ledger-card {
  width: min(520px, 100%);
  max-height: calc(100% - 16px);
  overflow-y: auto;
  border-radius: var(--r-22);
  border: 1px solid var(--border-card);
  background: var(--surface-solid);
  box-shadow: var(--shadow-raised);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nm-ledger-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nm-ledger-finn {
  width: 60px;
  height: 60px;
  object-fit: contain;
  flex-shrink: 0;
}

.nm-ledger-title {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nm-ledger-kicker {
  font-size: var(--fs-12);
  font-weight: 700;
  color: var(--gold);
}

.nm-ledger-title h2 {
  margin: 0;
  font-size: var(--fs-20);
  font-weight: 800;
  letter-spacing: var(--tracking-head);
}

.nm-ledger-stars {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nm-ledger-goal {
  font-size: var(--fs-12);
  color: var(--text-2);
}

.nm-ledger-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.nm-stat-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  border-radius: var(--r-14);
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.nm-stat-box span {
  font-size: var(--fs-11);
  font-weight: 700;
  color: var(--text-2);
}

.nm-stat-box strong {
  font-size: var(--fs-20);
  font-weight: 700;
  color: var(--text-1);
}

.nm-stat-box small {
  font-size: var(--fs-11);
  color: var(--text-2);
}

.nm-stat-box.is-mint {
  border-color: var(--mint);
  background: var(--mint-bg);
}

.nm-stat-box.is-mint strong {
  color: var(--mint);
}

.nm-stat-box.is-coral {
  border-color: var(--coral);
  background: var(--coral-bg);
}

.nm-stat-box.is-coral strong {
  color: var(--coral);
}

.nm-why-box {
  padding: 12px;
  border-radius: var(--r-14);
  border: 1px solid var(--border-card);
  background: var(--blue-bg);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nm-why-box strong {
  font-size: var(--fs-12);
  color: var(--link);
}

.nm-why-box p {
  margin: 0;
  font-size: var(--fs-13);
  color: var(--text-1);
  line-height: 1.45;
}

.nm-cal-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-14);
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.nm-cal-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nm-cal-copy strong {
  font-size: var(--fs-12);
  color: var(--text-1);
}

.nm-cal-copy span {
  font-size: var(--fs-12);
  color: var(--text-2);
}

.nm-cal-pts {
  font-size: var(--fs-15);
  font-weight: 700;
  white-space: nowrap;
}

.nm-cal-pts.is-mint { color: var(--mint); }
.nm-cal-pts.is-gold { color: var(--gold); }
.nm-cal-pts.is-coral { color: var(--coral); }

.nm-reward-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--r-12);
  background: var(--gold-bg);
  color: var(--gold);
  font-size: var(--fs-13);
  font-weight: 700;
}

.nm-disclaimer {
  margin: 0;
  font-size: var(--fs-11);
  color: var(--text-3);
  text-align: center;
}

.nm-ledger-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nm-ledger-primary {
  flex: 1 1 160px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  border: none;
  background: var(--play);
  color: var(--on-bright);
  font-family: var(--font-ui);
  font-size: var(--fs-14);
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--play-glow);
}

.nm-coach-btn {
  flex: 1 1 170px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--blue);
  background: var(--blue);
  color: var(--text-1);
  font-family: var(--font-ui);
  font-size: var(--fs-13);
  font-weight: 700;
  cursor: pointer;
}

/* ---------- Mobile 360px - 560px Framing ---------- */

@media (max-width: 600px) {
  .nm-hide-xs {
    display: none;
  }
  .nm-hud {
    top: 8px;
    left: 8px;
    right: 8px;
    gap: 5px;
  }
  .nm-pill {
    padding: 0 8px;
    font-size: var(--fs-12);
    gap: 4px;
  }
  .nm-goal-pill {
    display: none;
  }
  .nm-hud-btn {
    padding: 0 8px;
    font-size: var(--fs-12);
  }
  .nm-stage .harbor-tut-banner {
    top: 58px;
    width: calc(100% - 16px);
  }
  .nm-dock {
    width: calc(100% - 16px);
    bottom: 8px;
    padding: 10px;
    gap: 8px;
  }
  .nm-item-grid,
  .nm-serve-grid {
    gap: 6px;
  }
  .nm-item-card {
    min-height: 68px;
    padding: 6px 4px 5px;
  }
  .nm-item-card .market-thumb {
    width: 30px;
    height: 30px;
  }
  .nm-inspector {
    padding: 7px 8px;
    gap: 6px;
  }
  .nm-inspector-controls {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 6px;
  }
  .nm-stepper {
    gap: 4px;
  }
  .nm-step-val {
    min-width: 22px;
    font-size: var(--fs-13);
  }
  .nm-dock-cta {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .nm-practice-note {
    text-align: center;
  }
  .nm-open-btn {
    width: 100%;
  }
  .nm-nudge-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nm-serve-btn {
    min-height: 74px;
    padding: 6px 4px 5px;
  }
  .nm-serve-btn .market-thumb {
    width: 30px;
    height: 30px;
  }
  .nm-serve-key {
    display: none;
  }
  .nm-modal-backdrop {
    padding: 10px;
  }
  .nm-ledger-card {
    padding: 14px;
    gap: 10px;
  }
  .nm-ledger-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  .nm-stat-tile {
    padding: 8px 4px;
  }
  .nm-stat-val {
    font-size: var(--fs-16);
  }
  .nm-ledger-actions {
    flex-direction: column;
    gap: 6px;
  }
  .nm-ledger-actions button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nm-hud-btn,
  .nm-item-card,
  .nm-step-btn,
  .nm-open-btn,
  .nm-choice-btn,
  .nm-sec-btn,
  .nm-serve-btn,
  .nm-boss-fill,
  .nm-world-tag,
  .nm-conf-pill,
  .nm-plaza-cta {
    transition: none;
  }
  .nm-hud-btn:hover,
  .nm-hud-btn:active,
  .nm-item-card:hover,
  .nm-step-btn:hover,
  .nm-step-btn:active,
  .nm-open-btn:hover,
  .nm-open-btn:active,
  .nm-choice-btn:hover,
  .nm-sec-btn:hover,
  .nm-serve-btn:hover,
  .nm-serve-btn:active,
  .nm-world-tag:hover,
  .nm-world-tag:active,
  .nm-conf-pill:hover,
  .nm-plaza-cta:hover,
  .nm-plaza-cta:active {
    transform: none;
  }
}

/* Walkable Night Market Plaza overlays (Deep Blue tokens only) */
.nm-world-tags {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
}

.nm-world-tag {
  position: absolute;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: var(--r-14);
  border: 1.5px solid var(--border-card);
  background: var(--pane);
  color: var(--text-1);
  box-shadow: var(--shadow-raised);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 150ms ease-out, border-color 150ms ease-out, background 150ms ease-out;
}

.nm-world-tag strong {
  font-family: var(--font-display);
  font-size: var(--fs-13);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-1);
}

.nm-world-tag span {
  font-size: var(--fs-11);
  font-weight: 700;
  color: var(--gold);
  line-height: 1.15;
}

.nm-world-tag:hover {
  border-color: var(--link);
  transform: translateY(-2px);
}

.nm-world-tag.is-active {
  border-color: var(--gold);
  background: var(--surface);
  transform: translateY(-3px);
}

.nm-world-tag.is-active strong {
  color: var(--gold);
}

.nm-pill-sep {
  color: var(--text-3);
  margin: 0 2px;
}

.nm-dock-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--r-12);
  border: 1px solid var(--gold-rim);
  background: var(--surface-soft);
  color: var(--gold);
  font-size: var(--fs-12);
  font-weight: 700;
  line-height: 1.3;
}

.nm-dock-kicker strong {
  color: var(--gold);
  font-weight: 800;
}

.nm-plaza-dock {
  max-width: 720px;
  gap: 10px;
}

.nm-plaza-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nm-plaza-readout {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.nm-plaza-readout strong {
  font-family: var(--font-display);
  font-size: var(--fs-15);
  font-weight: 800;
  color: var(--text-1);
  line-height: 1.2;
}

.nm-plaza-readout span {
  font-size: var(--fs-13);
  color: var(--text-2);
  line-height: 1.3;
}

.nm-plaza-cta {
  flex: 0 0 auto;
  min-height: 46px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: var(--r-14);
  font-family: var(--font-display);
  font-size: var(--fs-14);
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 150ms ease-out, opacity 150ms ease-out;
}

.nm-plaza-cta:disabled {
  opacity: 0.48;
  cursor: default;
}

.nm-conf-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.nm-conf-pill {
  min-height: 44px;
  padding: 6px 8px;
  border-radius: var(--r-12);
  border: 1.5px solid var(--border-card);
  background: var(--surface-soft);
  color: var(--text-1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: var(--fs-13);
  font-weight: 700;
  cursor: pointer;
  transition: transform 150ms ease-out, border-color 150ms ease-out, background 150ms ease-out;
}

.nm-conf-pill small {
  font-size: var(--fs-11);
  color: var(--text-2);
  font-weight: 600;
}

.nm-conf-pill.is-on {
  border-color: var(--gold);
  background: var(--surface);
  color: var(--gold);
}

.nm-conf-pill.is-on small {
  color: var(--text-1);
}

@media (max-width: 600px) {
  .nm-world-tag {
    padding: 5px 8px;
    min-height: 44px;
  }
  .nm-world-tag strong {
    font-size: var(--fs-11);
  }
  .nm-world-tag span {
    font-size: var(--fs-11);
  }
  .nm-dock-kicker {
    font-size: var(--fs-11);
    padding: 4px 8px;
  }
  .nm-plaza-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .nm-plaza-readout strong {
    font-size: var(--fs-14);
  }
  .nm-plaza-readout span {
    font-size: var(--fs-12);
  }
  .nm-plaza-cta {
    width: 100%;
  }
}




