/* Star Witch: Road to Dawnstar — dark fantasy UI */

:root {
  --bg-deep: #0c0e14;
  --bg-surface: #141824;
  --bg-elevated: #1a2030;
  --text: #e8e6e3;
  --text-muted: #8a919c;
  --accent: #c9a227;
  --accent-dim: #8a7020;
  --border: rgba(201, 162, 39, 0.22);
  --danger: #c44c4c;
  --success: #5a9e6f;
  --glow: rgba(201, 162, 39, 0.08);
  --font-display: "Crimson Pro", "Georgia", serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --radius: 10px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
  line-height: 1.55;
  color: var(--text);
  background-color: var(--bg-deep);
  background-image:
    linear-gradient(180deg, rgba(6, 10, 18, 0.72) 0%, rgba(5, 8, 14, 0.8) 100%),
    radial-gradient(ellipse 140% 90% at 50% 45%, transparent 55%, rgba(2, 4, 8, 0.52) 100%),
    url("images/title-bg-main-page.png");
  background-size: auto, auto, cover;
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-position: center center, center center, center 30%;
  background-attachment: fixed, fixed, fixed;
}

#app {
  max-width: 42rem;
  margin: 0 auto;
  padding: clamp(1rem, 4vw, 1.75rem);
  min-height: 100dvh;
}

h1,
h2,
h3,
.game-title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.25;
}

h1,
.game-title {
  font-size: clamp(1.65rem, 5vw, 2.15rem);
  color: var(--accent);
  text-shadow: 0 0 40px rgba(201, 162, 39, 0.2);
  margin: 0 0 0.5rem;
}

h2 {
  font-size: clamp(1.15rem, 3.5vw, 1.4rem);
  margin: 0 0 1rem;
  color: var(--text);
}

h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
  color: var(--accent-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-body);
  font-weight: 600;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0 0 1.5rem;
}

.title-journal-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(201, 162, 39, 0.34);
  background:
    radial-gradient(ellipse 90% 130% at 50% -15%, rgba(201, 162, 39, 0.08), transparent 46%),
    linear-gradient(160deg, rgba(20, 24, 36, 0.96) 0%, rgba(14, 18, 28, 0.99) 65%, rgba(10, 14, 22, 0.98) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(201, 162, 39, 0.08),
    inset 0 -32px 52px rgba(0, 0, 0, 0.28),
    var(--shadow);
  animation: titleBorderFlicker 6.5s ease-in-out infinite;
}

.title-screen {
  position: relative;
  isolation: isolate;
  min-height: clamp(31rem, 78vh, 46rem);
  border-radius: 14px;
  overflow: hidden;
  padding: clamp(0.75rem, 2vw, 1.1rem);
}

.title-content {
  position: relative;
  z-index: 5;
}

.title-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.title-bg-sky,
.title-bg-mid,
.title-bg-road,
.title-bg-vignette {
  position: absolute;
  inset: 0;
}

.fog-layer {
  position: absolute;
  inset: -6% -10%;
  pointer-events: none;
  z-index: 1;
  filter: blur(14px);
  will-change: transform, opacity;
}

.fog-layer-one {
  background:
    radial-gradient(ellipse 42% 18% at 35% 76%, rgba(176, 190, 214, 0.13), transparent 68%),
    radial-gradient(ellipse 52% 20% at 70% 80%, rgba(146, 166, 198, 0.11), transparent 70%),
    radial-gradient(ellipse 46% 17% at 52% 68%, rgba(132, 148, 172, 0.08), transparent 72%);
  opacity: 0.46;
  animation: fogDriftOne 34s ease-in-out infinite alternate;
}

.fog-layer-two {
  background:
    radial-gradient(ellipse 58% 22% at 52% 86%, rgba(154, 172, 206, 0.1), transparent 72%),
    radial-gradient(ellipse 40% 16% at 82% 74%, rgba(174, 196, 220, 0.08), transparent 70%),
    radial-gradient(ellipse 36% 14% at 18% 72%, rgba(156, 176, 206, 0.08), transparent 70%);
  opacity: 0.34;
  animation: fogDriftTwo 44s ease-in-out infinite alternate;
}

.title-bg-photo {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(180deg, rgba(6, 10, 18, 0.34) 0%, rgba(5, 8, 14, 0.46) 100%),
    url("images/title-bg-planet-road.png");
  background-position: center 30%;
  background-size: cover;
  background-repeat: no-repeat;
  filter: saturate(0.9) contrast(1.03) brightness(0.72);
}

.title-bg-sky {
  background:
    radial-gradient(circle at 67% 18%, rgba(114, 156, 232, 0.3) 0 9%, rgba(55, 78, 130, 0.2) 16%, transparent 29%),
    radial-gradient(circle at 18% 21%, rgba(188, 205, 238, 0.12) 0 0.9px, transparent 1.5px),
    radial-gradient(circle at 24% 13%, rgba(178, 199, 236, 0.12) 0 1.2px, transparent 2px),
    radial-gradient(circle at 40% 26%, rgba(196, 210, 238, 0.1) 0 1px, transparent 1.8px),
    radial-gradient(circle at 58% 12%, rgba(190, 206, 238, 0.13) 0 1.2px, transparent 2.1px),
    radial-gradient(circle at 72% 28%, rgba(195, 214, 246, 0.11) 0 1.1px, transparent 2px),
    radial-gradient(circle at 84% 18%, rgba(177, 197, 236, 0.11) 0 1px, transparent 1.8px),
    radial-gradient(ellipse at 50% -10%, rgba(70, 106, 168, 0.28), transparent 56%),
    linear-gradient(180deg, #070d1a 0%, #080f1f 40%, #081221 63%, #07101d 100%);
  opacity: 0.24;
  animation: titleSkyDrift 28s linear infinite;
}

.title-bg-mid {
  background:
    radial-gradient(ellipse 70% 20% at 50% 69%, rgba(124, 255, 220, 0.08), transparent 76%),
    radial-gradient(ellipse 80% 25% at 50% 72%, rgba(170, 196, 255, 0.08), transparent 78%),
    linear-gradient(
      180deg,
      transparent 0 53%,
      rgba(11, 17, 27, 0.2) 56%,
      rgba(8, 13, 20, 0.86) 70%
    ),
    linear-gradient(
      180deg,
      transparent 0 56%,
      rgba(10, 14, 24, 0.96) 57% 63%,
      transparent 64% 100%
    );
  clip-path: inset(52% 0 0 0);
  opacity: 0.54;
}

.title-bg-mid::before,
.title-bg-mid::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
}

.title-bg-mid::before {
  height: 43%;
  background: linear-gradient(
    180deg,
    transparent 0 16%,
    rgba(6, 12, 18, 0.94) 17%
  );
  clip-path: polygon(
    0 100%,
    0 62%,
    6% 55%,
    13% 60%,
    21% 52%,
    29% 60%,
    37% 49%,
    46% 58%,
    54% 46%,
    63% 58%,
    71% 50%,
    81% 61%,
    90% 53%,
    100% 63%,
    100% 100%
  );
  opacity: 0.9;
}

.title-bg-mid::after {
  height: 36%;
  background: radial-gradient(ellipse 80% 35% at 50% 25%, rgba(150, 170, 215, 0.08), transparent 70%);
  filter: blur(6px);
  animation: titleFogShift 18s ease-in-out infinite alternate;
}

.title-bg-road {
  background:
    radial-gradient(ellipse 110% 65% at 50% 100%, rgba(9, 12, 20, 0.92) 16%, rgba(7, 10, 16, 0.98) 72%),
    linear-gradient(180deg, transparent 0 53%, rgba(10, 13, 18, 0.8) 58%, rgba(8, 10, 14, 0.96) 100%);
  opacity: 0.4;
}

.title-bg-road::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2%;
  width: min(95%, 52rem);
  height: 60%;
  transform: translateX(-50%);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0) 0 14%, rgba(0, 0, 0, 0.28) 22%, rgba(0, 0, 0, 0.62) 100%),
    radial-gradient(ellipse at 50% 15%, rgba(133, 154, 194, 0.18) 0 16%, rgba(66, 82, 112, 0.16) 30%, transparent 60%),
    linear-gradient(180deg, rgba(31, 37, 48, 0.75), rgba(18, 21, 31, 0.92));
  clip-path: polygon(48% 0, 52% 0, 90% 100%, 10% 100%);
  filter: blur(0.3px);
  opacity: 0.95;
}

.title-bg-vignette {
  background:
    radial-gradient(ellipse 130% 90% at 50% 40%, transparent 52%, rgba(2, 4, 8, 0.34) 100%),
    linear-gradient(90deg, rgba(3, 6, 12, 0.28) 0%, transparent 13%, transparent 87%, rgba(3, 6, 12, 0.3) 100%);
}

.title-journal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.title-journal-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 130% 95% at 50% 48%, transparent 48%, rgba(4, 6, 12, 0.44) 100%);
}

.title-brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(185, 159, 92, 0.82);
}

.title-main {
  margin: 0.1rem 0 0.35rem;
  font-size: clamp(1.9rem, 5.2vw, 2.4rem);
  letter-spacing: 0.04em;
  color: transparent;
  background: linear-gradient(180deg, #f0ddb1 0%, #c9a227 38%, #8a7020 100%);
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 0 20px rgba(201, 162, 39, 0.18);
}

.title-note {
  margin: 0 0 1.05rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.93rem;
  line-height: 1.45;
  color: rgba(180, 176, 164, 0.86);
}

.title-begin-btn {
  position: relative;
  isolation: isolate;
  box-shadow: 0 0 0 rgba(201, 162, 39, 0);
  animation: titleBeginPulse 3.1s ease-in-out infinite;
}

.title-begin-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(201, 162, 39, 0.24);
}

.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1rem, 3vw, 1.35rem);
  box-shadow: var(--shadow);
}

.panel + .panel {
  margin-top: 1rem;
}

.lead {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0.55rem 1.15rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.btn:hover:not(:disabled) {
  background: #222838;
  border-color: var(--accent-dim);
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Centered toast stack: avoids notch/safe-area clipping on mobile; stays above journey UI */
.popup-host {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  pointer-events: none;
  padding: max(1rem, env(safe-area-inset-top, 0px)) max(1rem, env(safe-area-inset-right, 0px))
    max(1rem, env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}

.popup-msg {
  max-width: min(86vw, 26rem);
  width: max-content;
  background: rgba(14, 18, 28, 0.94);
  border: 1px solid rgba(201, 162, 39, 0.28);
  border-radius: 8px;
  color: var(--text);
  padding: 0.5rem 0.72rem;
  font-size: 0.85rem;
  line-height: 1.3;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
  transform: translateY(-6px);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
  -webkit-font-smoothing: antialiased;
}

.popup-msg.show {
  transform: translateY(0);
  opacity: 1;
}

.popup-damage {
  border-color: rgba(196, 114, 94, 0.44);
}

.popup-death,
.popup-gameover {
  border-color: rgba(196, 76, 76, 0.62);
}

.btn-primary {
  background: linear-gradient(180deg, #3d3520 0%, #2a2418 100%);
  border-color: var(--accent-dim);
  color: var(--accent);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #4a4028 0%, #322a1c 100%);
  border-color: var(--accent);
}

@keyframes titleBeginPulse {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(201, 162, 39, 0);
  }
  50% {
    box-shadow: 0 0 16px rgba(201, 162, 39, 0.22);
  }
}

@keyframes titleBorderFlicker {
  0%,
  100% {
    border-color: rgba(201, 162, 39, 0.31);
  }
  46% {
    border-color: rgba(201, 162, 39, 0.4);
  }
  52% {
    border-color: rgba(201, 162, 39, 0.26);
  }
}

@keyframes titleSkyDrift {
  0% {
    background-position:
      center center,
      0 0,
      0 0,
      0 0,
      0 0,
      0 0,
      0 0,
      center center,
      center center;
  }
  100% {
    background-position:
      center center,
      12px 4px,
      -10px 8px,
      7px 6px,
      -8px 5px,
      11px 3px,
      -9px 7px,
      center center,
      center center;
  }
}

@keyframes titleFogShift {
  0% {
    transform: translateX(-2.5%);
    opacity: 0.52;
  }
  100% {
    transform: translateX(2.5%);
    opacity: 0.68;
  }
}

@keyframes fogDriftOne {
  0% {
    transform: translateX(-2.6%) translateY(0.8%) scale(1.02);
    opacity: 0.38;
  }
  50% {
    opacity: 0.48;
  }
  100% {
    transform: translateX(2.4%) translateY(-0.4%) scale(1.06);
    opacity: 0.42;
  }
}

@keyframes fogDriftTwo {
  0% {
    transform: translateX(2.1%) translateY(0.2%) scale(1.03);
    opacity: 0.26;
  }
  50% {
    opacity: 0.34;
  }
  100% {
    transform: translateX(-2.3%) translateY(-0.8%) scale(1.08);
    opacity: 0.3;
  }
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.party-name-actions {
  justify-content: space-between;
  align-items: center;
}

.btn-block {
  width: 100%;
}

.difficulty-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

@media (max-width: 380px) {
  .difficulty-grid {
    grid-template-columns: 1fr;
  }
}

.difficulty-grid .btn {
  flex-direction: column;
  min-height: 52px;
}

.difficulty-grid .btn small {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

input[type="text"] {
  width: 100%;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  font: inherit;
  color: var(--text);
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 6px;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.15);
}

.party-fields {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.field-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin: 0.5rem 0 0;
}

.hud-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.65rem;
  font-size: 0.88rem;
}

.hud-item {
  background: var(--bg-deep);
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.hud-item strong {
  display: block;
  color: var(--accent);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.2rem;
}

.party-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.party-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.party-list li:last-child {
  border-bottom: none;
}

.party-list .dead {
  opacity: 0.55;
  text-decoration: line-through;
}

.party-list .tag {
  font-size: 0.75rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: rgba(196, 76, 76, 0.2);
  color: #e08080;
}

.party-list .hp {
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

.event-log {
  font-family: var(--font-display);
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
  white-space: pre-wrap;
}

.event-log .line {
  margin-bottom: 0.65rem;
}

.event-log .line:last-child {
  margin-bottom: 0;
}

.meta-line {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

.shop-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.shop-items .btn {
  justify-content: space-between;
  text-align: left;
}

.shop-item-main {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.shop-item-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.25;
}

.shop-items .price {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.shop-suggested-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0 0 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius);
  background: rgba(201, 162, 39, 0.06);
  border: 1px solid rgba(201, 162, 39, 0.18);
}

.shop-suggested-row .btn {
  align-self: flex-start;
}

.shop-suggested-hint {
  margin: 0 !important;
  line-height: 1.4;
}

.end-summary {
  text-align: center;
}

.end-summary.win h2 {
  color: var(--success);
}

.end-summary.loss h2 {
  color: var(--danger);
}

footer.note {
  margin-top: 2rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* --- Version 2: journey layout, HP bars, log, choices ------------------------ */

#app {
  max-width: 56rem;
}

.panel-compact {
  padding: 0.75rem 1rem;
}

.panel-compact h3 {
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
}

.journey-header {
  text-align: center;
  border-style: solid;
}

.journey-brand {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--accent);
  font-weight: 600;
}

.journey-live-day strong {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.journey-layout {
  display: grid;
  /* Three children: .journey-main | .journey-party-column | .journey-sidebar — placement by breakpoint */
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: start;
}

@media (min-width: 821px) and (max-width: 1199px) {
  .journey-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    grid-template-rows: auto auto;
  }

  .journey-main {
    grid-column: 1;
    grid-row: 1;
  }

  .journey-party-column {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
  }

  .journey-sidebar {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 820px) {
  .journey-sidebar {
    position: static;
    top: auto;
  }

  .title-screen {
    min-height: clamp(30rem, 86vh, 42rem);
    padding: 0.75rem;
  }

  .title-bg-sky {
    background:
      radial-gradient(circle at 62% 11%, rgba(114, 156, 232, 0.34) 0 11%, rgba(55, 78, 130, 0.22) 19%, transparent 33%),
      radial-gradient(circle at 18% 21%, rgba(188, 205, 238, 0.12) 0 0.9px, transparent 1.5px),
      radial-gradient(circle at 24% 13%, rgba(178, 199, 236, 0.12) 0 1.2px, transparent 2px),
      radial-gradient(circle at 40% 26%, rgba(196, 210, 238, 0.1) 0 1px, transparent 1.8px),
      radial-gradient(circle at 58% 12%, rgba(190, 206, 238, 0.13) 0 1.2px, transparent 2.1px),
      radial-gradient(circle at 72% 28%, rgba(195, 214, 246, 0.11) 0 1.1px, transparent 2px),
      radial-gradient(circle at 84% 18%, rgba(177, 197, 236, 0.11) 0 1px, transparent 1.8px),
      radial-gradient(ellipse at 50% -16%, rgba(70, 106, 168, 0.3), transparent 58%),
      linear-gradient(180deg, #070d1a 0%, #080f1f 40%, #081221 63%, #07101d 100%);
    opacity: 0.22;
  }

  .title-bg-photo {
    background-position: center 22%;
    filter: saturate(0.88) contrast(1.03) brightness(0.68);
  }

  .fog-layer {
    inset: -8% -14%;
    filter: blur(12px);
  }

  .fog-layer-one {
    opacity: 0.42;
  }

  .fog-layer-two {
    opacity: 0.3;
  }

  .title-bg-road::before {
    width: min(108%, 44rem);
    height: 62%;
    clip-path: polygon(47% 0, 53% 0, 92% 100%, 8% 100%);
  }

  .title-note {
    font-size: 0.88rem;
  }
}

.journey-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  position: sticky;
  top: 0.5rem;
}

.journey-sidebar.single {
  position: static;
  max-width: 28rem;
  margin: 0 auto 1rem;
}

.journey-main {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.journey-party-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* Desktop 16:9: rail fits viewport; Travel | Supplies; party capped; journal scrolls inside */
@media (min-width: 1200px) {
  #app {
    max-width: min(100rem, 96vw);
    padding-inline: clamp(1rem, 2.5vw, 2.25rem);
    padding-block: clamp(0.65rem, 1.5vw, 1.25rem);
  }

  .journey-layout {
    grid-template-columns: minmax(0, 1.55fr) minmax(200px, 300px) minmax(300px, min(420px, 1fr));
    gap: 1rem 1.25rem;
    align-items: stretch;
    min-height: calc(100dvh - 3rem);
  }

  .journey-main {
    grid-column: 1;
    max-width: min(52rem, 100%);
    align-self: stretch;
    min-height: calc(100dvh - 3rem);
  }

  .journey-main::after {
    content: "";
    flex: 1 1 auto;
    min-height: 0;
  }

  .journey-party-column {
    grid-column: 2;
    align-self: stretch;
    --journey-rail-h: calc(100dvh - 3rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    height: var(--journey-rail-h);
    max-height: var(--journey-rail-h);
    position: sticky;
    top: max(0.5rem, env(safe-area-inset-top, 0px));
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(201, 162, 39, 0.3) transparent;
  }

  .journey-party-column .party-panel {
    flex: 1 1 auto;
    min-height: 0;
    margin-bottom: 0;
  }

  .journey-sidebar {
    grid-column: 3;
    --journey-rail-h: calc(100dvh - 3rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    height: var(--journey-rail-h);
    max-height: var(--journey-rail-h);
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto minmax(5.5rem, 1fr);
    gap: 0.5rem 0.65rem;
    overflow: hidden;
    position: sticky;
    top: max(0.5rem, env(safe-area-inset-top, 0px));
    align-self: start;
    padding-right: 0;
    flex-direction: unset;
  }

  .journey-sidebar .hud-main {
    grid-column: 1 / -1;
    grid-row: 1;
    margin-bottom: 0;
    padding: 0.55rem 0.75rem;
  }

  .journey-sidebar .hud-main h3 {
    font-size: 0.82rem;
    margin-bottom: 0.3rem;
  }

  .journey-sidebar .progress-panel {
    grid-column: 1;
    grid-row: 2;
  }

  .journey-sidebar .inventory-panel {
    grid-column: 2;
    grid-row: 2;
  }

  .journey-sidebar .game-log-panel {
    grid-column: 1 / -1;
    grid-row: 3;
    min-height: 0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .journey-sidebar .game-log-panel .game-log-scroll {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
  }

  .journey-sidebar .panel-compact {
    padding: 0.5rem 0.65rem;
  }

  .journey-sidebar .panel-compact h3 {
    font-size: 0.76rem;
    margin-bottom: 0.22rem;
  }

  .journey-sidebar .progress-regions {
    font-size: 0.8rem;
    margin: 0 0 0.45rem;
  }

  .journey-sidebar .progress-block {
    margin-bottom: 0.45rem;
  }

  .journey-sidebar .hud-day-line {
    font-size: 0.92rem;
  }

  .journey-sidebar .hud-traveled-line {
    font-size: 0.8rem;
    margin-bottom: 0.35rem;
  }

  .journey-sidebar .hud-grid {
    gap: 0.35rem 0.5rem;
  }

  .journey-sidebar .hud-item {
    font-size: 0.82rem;
  }

  .title-screen {
    max-width: 48rem;
    margin-inline: auto;
  }

  .hunt-game-panel {
    max-width: min(56rem, 100%);
    margin-inline: auto;
  }
}

.hud-main {
  margin-bottom: 0;
}

.inv-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.88rem;
}

.inv-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.inv-list li:last-child {
  border-bottom: none;
}

.inv-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.progress-regions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  justify-content: center;
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
  line-height: 1.35;
}

.current-region {
  color: var(--accent);
  font-weight: 600;
}

.region-arrow {
  color: var(--accent-dim);
  opacity: 0.85;
}

.next-region {
  color: var(--text-muted);
}

.progress-block {
  margin-bottom: 0.65rem;
}

.progress-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.28rem;
}

.progress-count {
  font-variant-numeric: tabular-nums;
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0;
}

.progress-track {
  height: 10px;
  background: var(--bg-deep);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.progress-fill {
  height: 100%;
  min-width: 0;
  border-radius: 5px;
  transition: width 0.25s ease;
}

.progress-fill-journey {
  background: linear-gradient(90deg, #4a6285, var(--accent-dim));
}

.progress-fill-region {
  background: linear-gradient(90deg, #4a8058, #6abe7a);
}

.moves-left-line {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
}

.hud-day-line {
  font-size: 1.02rem;
  margin: 0 0 0.35rem;
}

.hud-traveled-line {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
}

.event-day-line {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent-dim);
  text-transform: uppercase;
  margin-bottom: 0.35rem !important;
}

.hud-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
}

.inv-actions {
  margin-top: 0.5rem;
}

.btn-small {
  min-height: 40px;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}

.party-list-enhanced {
  list-style: none;
  margin: 0;
  padding: 0;
}

.party-row {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.party-row:last-child {
  border-bottom: none;
}

.party-row.dead {
  opacity: 0.65;
  border-left: 3px solid var(--danger);
  padding-left: 0.5rem;
  margin-left: -0.25rem;
}

.party-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.party-name-line {
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.35;
  margin-bottom: 0.2rem;
}

.party-trait-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-bottom: 0.35rem;
}

.party-row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.25rem;
}

.party-row-head .party-name-line {
  flex: 1 1 12rem;
  margin-bottom: 0;
}

.party-hp-inline {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.88em;
}

.trait-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.5rem 0.2rem 0.4rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.trait-badge .trait-icon {
  font-size: 0.95rem;
  line-height: 1;
  opacity: 0.95;
}

.trait-badge-name {
  white-space: nowrap;
}

.trait-tier {
  margin-left: 0.15rem;
  font-size: 0.7rem;
  color: var(--accent);
  opacity: 0.9;
}

.trait-badge--none {
  border-style: dashed;
  color: var(--text-muted);
}

.trait-badge--hunter {
  background: rgba(90, 130, 85, 0.22);
  border-color: rgba(120, 170, 110, 0.35);
  color: #c4e0bf;
}

.trait-badge--tough {
  background: rgba(140, 95, 75, 0.25);
  border-color: rgba(180, 120, 90, 0.4);
  color: #e0c4b0;
}

.trait-badge--medic {
  background: rgba(75, 120, 140, 0.22);
  border-color: rgba(100, 160, 185, 0.38);
  color: #b8dce8;
}

.trait-badge--scout {
  background: rgba(95, 110, 75, 0.28);
  border-color: rgba(130, 150, 100, 0.4);
  color: #d4e0b8;
}

.trait-badge--lucky {
  background: rgba(130, 110, 60, 0.26);
  border-color: rgba(200, 170, 90, 0.45);
  color: #f0d9a0;
}

.trait-badge--mule {
  background: rgba(110, 95, 75, 0.28);
  border-color: rgba(150, 130, 100, 0.4);
  color: #dcc8a8;
}

.trait-badge--faithful {
  background: rgba(100, 75, 120, 0.24);
  border-color: rgba(150, 110, 170, 0.38);
  color: #dcc8e8;
}

.trait-badge--coldblooded {
  background: rgba(75, 110, 140, 0.24);
  border-color: rgba(110, 150, 190, 0.4);
  color: #b8d8f0;
}

.trait-badge--pathfinder {
  background: rgba(60, 100, 95, 0.3);
  border-color: rgba(90, 160, 150, 0.45);
  color: #a8f0e0;
}

.trait-badge--starseer {
  background: rgba(80, 70, 130, 0.28);
  border-color: rgba(130, 110, 200, 0.42);
  color: #d0c8ff;
}

.title-meta-record {
  text-align: center;
  font-size: 0.85rem;
  margin: 0.5rem 0 0;
  color: var(--text-muted);
}

.end-meta-record {
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.end-unlock-flash {
  color: var(--accent);
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius);
  background: rgba(201, 162, 39, 0.08);
  border: 1px solid rgba(201, 162, 39, 0.22);
}

.hp-track {
  height: 6px;
  background: var(--bg-deep);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hp-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #5a9e6f, #7eb88a);
  border-radius: 4px;
  transition: width 0.2s ease;
}

.party-row.dead .hp-fill {
  width: 0 !important;
  background: var(--danger);
}

.party-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.party-trait {
  font-size: 0.74rem;
  color: var(--accent-dim);
  margin: 0.15rem 0 0.35rem;
  line-height: 1.35;
}

.end-report {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.end-stat {
  margin: 0.4rem 0;
  font-size: 0.95rem;
}

.end-stat-loss {
  color: var(--danger);
}

.game-log-panel .game-log-scroll {
  max-height: 11rem;
  overflow-y: auto;
  font-size: 0.82rem;
  line-height: 1.45;
  padding-right: 0.25rem;
}

.log-line {
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.log-line:first-child {
  color: var(--text);
}

.event-card {
  min-height: 8rem;
  border-color: rgba(201, 162, 39, 0.28);
}

.event-card.event-card--setpiece {
  border-left: 4px solid var(--accent);
  box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0.12);
}

.event-card.event-card--setpiece::before {
  content: "Set-piece";
  display: block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dim);
  margin: 0 0 0.5rem;
  opacity: 0.9;
}

.event-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0.02em;
}

.event-id-debug {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

.event-id-debug code {
  color: var(--accent-dim);
  font-size: inherit;
}

.choice-hint {
  margin: 0 0 0.5rem;
  font-style: italic;
}

.continue-btn {
  min-height: 52px;
  font-size: 1rem;
}

.event-text-wrap {
  margin: 0;
}

.event-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.55;
  margin: 0 0 0.75rem;
}

.choice-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.choice-btn {
  text-align: left;
  justify-content: flex-start;
  min-height: 52px;
  font-size: 1rem;
  padding: 0.65rem 1rem;
}

.journey-actions {
  margin-top: 0;
  /* Later .panel siblings paint above unpositioned elements; keep actions reachable after modal/potion flow. */
  position: relative;
  z-index: 4;
}

.journey-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.journey-actions-grid .btn {
  width: 100%;
}

.checkpoint-panel {
  border-color: rgba(90, 158, 111, 0.35);
  background: linear-gradient(165deg, var(--bg-surface) 0%, rgba(26, 40, 48, 0.65) 100%);
}

.checkpoint-panel h2 {
  color: var(--success);
}

.checkpoint-actions {
  flex-direction: column;
  align-items: stretch;
  margin-top: 0.75rem;
}

.checkpoint-actions .btn {
  justify-content: center;
  text-align: center;
}

.checkpoint-price-note {
  color: var(--accent-dim);
}

.final-score-line {
  margin: 1rem 0 0.35rem;
  font-size: 1.05rem;
}

.score-hint {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
}

.shop-footer-btns {
  margin-top: 0.75rem;
}

.potion-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
  background: rgba(4, 8, 14, 0.55);
}

.potion-overlay .potion-modal {
  margin-top: 0;
  max-width: 22rem;
  width: 100%;
}

.potion-modal {
  margin-top: 1rem;
  border-style: dashed;
}

.debug-panel {
  margin-top: 1rem;
  border-color: rgba(196, 76, 76, 0.35);
}

.debug-panel input[type="text"] {
  width: 100%;
  margin-top: 0.35rem;
}

/* --- Hunt minigame ------------------------------------------------------------- */

.hunt-game-screen {
  max-width: 100%;
}

.hunt-game-panel.hunt-game-panel {
  border-color: rgba(60, 52, 40, 0.55);
  background: linear-gradient(180deg, rgba(22, 24, 28, 0.95) 0%, rgba(14, 16, 20, 0.98) 100%);
}

.hunt-game-intro {
  margin-bottom: 0.75rem;
}

.hunt-hud {
  margin-bottom: 0.75rem;
}

.hunt-timer-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.hunt-timer-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-dim);
  min-width: 2.5rem;
}

.hunt-timer-track {
  flex: 1;
  height: 10px;
  background: var(--bg-deep);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hunt-timer-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #4a8058, var(--accent));
  border-radius: 6px;
  will-change: width;
}

.hunt-timer-text {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  min-width: 2.5rem;
  text-align: right;
  color: var(--accent);
}

.hunt-hits-line {
  margin: 0;
  font-size: 0.95rem;
}

.hunt-hint {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
}

.hunt-track-ground {
  position: relative;
  min-height: 170px;
  border: 1px solid rgba(90, 82, 66, 0.45);
  border-radius: var(--radius);
  margin-top: 0.25rem;
  background:
    radial-gradient(ellipse 100% 65% at 50% 100%, rgba(38, 42, 32, 0.84) 0%, transparent 58%),
    linear-gradient(180deg, rgba(24, 26, 30, 0.96), rgba(16, 18, 24, 0.98));
  overflow: hidden;
}

.hunt-track-ground::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.015) 0,
    rgba(255, 255, 255, 0.015) 2px,
    transparent 2px,
    transparent 8px
  );
  opacity: 0.7;
  pointer-events: none;
}

.hunt-track-status {
  margin: 0.6rem 0 0;
}

.track-btn {
  position: absolute;
  width: 76px;
  height: 20px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  z-index: 2;
}

.track-step {
  position: absolute;
  width: 10px;
  height: 6px;
  border-radius: 999px;
  background: rgba(168, 174, 182, 0.62);
  box-shadow: 0 0 0 1px rgba(50, 56, 66, 0.55), 0 1px 4px rgba(0, 0, 0, 0.45);
}

.track-btn:hover .track-step,
.track-btn:focus-visible .track-step {
  background: rgba(220, 200, 150, 0.82);
}

.track-btn-picked .track-step {
  background: rgba(182, 242, 140, 0.9);
}

.hunt-arena {
  position: relative;
  width: 100%;
  min-height: 280px;
  min-width: 260px;
  border: 1px solid rgba(80, 70, 55, 0.45);
  border-radius: var(--radius);
  overflow: hidden;
  touch-action: none;
  isolation: isolate;
}

/* Dark forest floor + treeline; vignette + grain for vintage arcade feel */
.hunt-arena-vintage {
  background:
    radial-gradient(ellipse 120% 90% at 50% 100%, rgba(28, 32, 26, 0.92) 0%, transparent 55%),
    linear-gradient(180deg, rgba(18, 22, 28, 0.97) 0%, rgba(12, 14, 18, 1) 42%, rgba(8, 10, 12, 1) 100%),
    linear-gradient(90deg, rgba(15, 18, 22, 0.4) 0%, transparent 35%, transparent 65%, rgba(15, 18, 22, 0.45) 100%);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.65);
}

.hunt-arena-vintage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 75% 60% at 50% 45%, transparent 30%, rgba(0, 0, 0, 0.55) 100%);
  z-index: 1;
}

.hunt-arena-vintage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  z-index: 2;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.hunt-sprite {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  cursor: default;
  touch-action: manipulation;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.75));
  user-select: none;
  -webkit-user-select: none;
}

.hunt-sprite:focus {
  outline: 2px solid rgba(201, 162, 39, 0.45);
  outline-offset: 2px;
}

.hunt-sprite-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  pointer-events: none;
}

.hunt-sprite-shadow-beast .hunt-sprite-img {
  filter: brightness(0.32) contrast(1.15) saturate(0.5)
    drop-shadow(0 0 10px rgba(140, 100, 180, 0.35));
}

.hunt-sprite-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  color: rgba(200, 190, 170, 0.45);
  background: rgba(20, 22, 26, 0.85);
  border: 1px dashed rgba(120, 110, 95, 0.4);
  border-radius: 4px;
}

.hunt-player {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f0e4c4 0%, #b08f44 62%, #5a431f 100%);
  border: 1px solid rgba(240, 220, 180, 0.55);
  box-shadow: 0 0 14px rgba(201, 162, 39, 0.3);
  transform: translate(-50%, -50%);
  z-index: 5;
  pointer-events: none;
}

.hunt-power-ring {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 2px solid rgba(145, 185, 255, 0.45);
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  z-index: 5;
  pointer-events: none;
  transition: transform 0.04s linear, opacity 0.04s linear, border-color 0.04s linear, box-shadow 0.04s linear;
}

.hunt-power-text {
  position: absolute;
  transform: translate(-50%, -50%);
  color: #cde4ff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 7px rgba(0, 0, 0, 0.85);
  pointer-events: none;
  z-index: 8;
  opacity: 0;
  transition: opacity 0.04s linear, transform 0.04s linear;
}

.hunt-aim-line {
  position: absolute;
  height: 2px;
  transform-origin: 0 50%;
  background: linear-gradient(90deg, rgba(201, 162, 39, 0.95), rgba(120, 200, 255, 0.9));
  box-shadow: 0 0 8px rgba(160, 220, 255, 0.45);
  border-radius: 2px;
  z-index: 6;
  pointer-events: none;
  display: none;
}

.hunt-arrow {
  position: absolute;
  width: 22px;
  height: 3px;
  background: linear-gradient(90deg, rgba(160, 130, 88, 0.92), rgba(230, 220, 205, 0.96));
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(255, 232, 190, 0.34);
  transform: translate(-50%, -50%);
  z-index: 7;
  pointer-events: none;
}

.hunt-arrow::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 50%;
  width: 0;
  height: 0;
  transform: translateY(-50%);
  border-left: 5px solid rgba(235, 222, 205, 0.95);
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
}

.hunt-hit-feedback {
  position: absolute;
  transform: translate(-50%, -50%);
  color: #b6f08f;
  font-weight: 700;
  font-size: 0.9rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
  z-index: 9;
  pointer-events: none;
  animation: hunt-hit-pop 0.4s ease-out forwards;
}

@keyframes hunt-hit-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -35%) scale(0.92);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -165%) scale(1.05);
  }
}

/* Route fork (branching paths) */
.route-choice-panel .lead {
  margin-bottom: 0.75rem;
}

.route-choice-options {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 1rem 0 0.5rem;
}

.route-option-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 0.35rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(26, 32, 48, 0.95), rgba(18, 22, 32, 0.98));
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.route-option-btn:hover {
  border-color: rgba(201, 162, 39, 0.45);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.route-option-btn:active {
  transform: translateY(1px);
}

.route-opt-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.route-opt-desc {
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--text);
  opacity: 0.95;
}

.route-opt-blurb {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.route-opt-risk {
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent-dim);
}

.route-choice-note {
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.route-future-hint {
  font-size: 0.8rem;
  font-style: italic;
  color: rgba(138, 145, 156, 0.85);
}

.hud-route-line {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px dashed rgba(201, 162, 39, 0.15);
  font-size: 0.88rem;
  color: rgba(200, 195, 185, 0.92);
}

.hud-route-beat {
  font-size: 0.82rem;
  font-style: italic;
  color: rgba(160, 170, 185, 0.95);
}

.end-route-block {
  margin-bottom: 1rem;
}

.end-route-block .end-stat {
  margin-bottom: 0.35rem;
}

.end-route-list {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
  line-height: 1.5;
  color: var(--text-muted);
}
