:root {
  --parchment: #f4e8d0;
  --parchment-deep: #e8d4b0;
  --ink: #2a1f14;
  --ink-muted: #5c4a38;
  --ember: #c45c26;
  --ember-bright: #e87830;
  --moss: #3d5c3a;
  --moss-deep: #2a3f28;
  --blood: #8b2e2e;
  --gold: #b8860b;
  --shadow: rgba(20, 12, 6, 0.35);
  --radius: 10px;
  --font-display: "Cinzel", "Palatino Linotype", serif;
  --font-body: "Lora", Georgia, serif;
}

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

html {
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, rgba(196, 92, 38, 0.18), transparent 55%),
    linear-gradient(165deg, #1a1410 0%, #2d2218 40%, #1f1812 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  z-index: 0;
}

.app {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
  min-height: 100vh;
}

.top-hud {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background: rgba(244, 232, 208, 0.08);
  border: 1px solid rgba(244, 232, 208, 0.12);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
}

.hud-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.hud-center {
  text-align: center;
}

.hud-right {
  text-align: right;
  align-items: flex-end;
}

.hud-label {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(244, 232, 208, 0.55);
}

.hud-label-secondary {
  margin-top: 0.35rem;
}

.hud-value {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--parchment);
}

.game-title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 4vw, 1.35rem);
  color: var(--parchment);
  letter-spacing: 0.06em;
}

.game-tag {
  font-size: 0.7rem;
  font-style: italic;
  color: rgba(244, 232, 208, 0.5);
  letter-spacing: 0.04em;
}

.screen {
  display: none;
  animation: fadeIn 0.4s ease;
}

.screen.active {
  display: block;
}

.screen.camp-merchant-overlay.active {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 0.75rem;
  background: rgba(10, 6, 8, 0.94);
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.parchment-card {
  position: relative;
  background: linear-gradient(145deg, var(--parchment) 0%, var(--parchment-deep) 100%);
  border: 2px solid rgba(42, 31, 20, 0.2);
  border-radius: 14px;
  padding: 2rem 1.75rem;
  box-shadow:
    0 20px 50px var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.parchment-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(42, 31, 20, 0.12);
  border-radius: 8px;
  pointer-events: none;
}

.ember-glow {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(232, 120, 48, 0.45), transparent 70%);
  pointer-events: none;
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

.epigraph {
  font-style: italic;
  text-align: center;
  color: var(--ink-muted);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.screen-heading {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 5vw, 1.75rem);
  text-align: center;
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.intro-text {
  text-align: center;
  line-height: 1.65;
  color: var(--ink-muted);
  margin-bottom: 1.25rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.party-preview {
  list-style: none;
  margin: 0 auto 1.5rem;
  max-width: 22rem;
  font-size: 0.9rem;
  line-height: 1.8;
}

.party-preview .role {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ember);
  display: inline-block;
  min-width: 4.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

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

.btn-primary {
  background: linear-gradient(180deg, var(--ember-bright), var(--ember));
  color: #fff8f0;
  box-shadow: 0 4px 14px rgba(196, 92, 38, 0.45);
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  display: flex;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196, 92, 38, 0.55);
}

.btn-ghost {
  background: transparent;
  color: var(--parchment);
  border: 1px solid rgba(244, 232, 208, 0.25);
}

.btn-ghost:hover {
  background: rgba(244, 232, 208, 0.08);
}

.title-card {
  text-align: center;
}

.challenge-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 1rem auto 1.1rem;
  max-width: 22rem;
  padding: 0.65rem 0.75rem;
  text-align: left;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(204, 100, 72, 0.35);
  border-radius: 8px;
  cursor: pointer;
}

.challenge-toggle input {
  margin-top: 0.2rem;
  accent-color: var(--ember-bright);
  flex-shrink: 0;
}

.challenge-toggle-label {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.78rem;
  color: var(--parchment);
  line-height: 1.35;
}

.challenge-toggle-label strong {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f0b088;
}

.challenge-toggle-desc {
  font-size: 0.7rem;
  color: rgba(244, 232, 208, 0.65);
}

.split-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1rem;
  min-height: 420px;
}

@media (max-width: 700px) {
  .split-layout {
    grid-template-columns: 1fr;
  }
}

.party-panel,
.recipe-panel {
  background: rgba(244, 232, 208, 0.06);
  border: 1px solid rgba(244, 232, 208, 0.1);
  border-radius: var(--radius);
  padding: 1rem;
}

.panel-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--parchment);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(244, 232, 208, 0.12);
}

.party-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.member-card {
  background: rgba(20, 14, 10, 0.35);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  font-size: 0.8rem;
}

.member-card .name {
  font-family: var(--font-display);
  font-size: 0.72rem;
  color: var(--parchment);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.member-card .hp-label {
  font-size: 0.65rem;
  opacity: 0.85;
  font-family: var(--font-body);
}

.member-card .hp-bar {
  height: 6px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 3px;
  margin-top: 0.35rem;
  overflow: hidden;
}

.member-card .hp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--moss), #6b9e64);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.member-card.low .hp-fill {
  background: linear-gradient(90deg, var(--blood), #c44);
}

.member-card.fallen {
  opacity: 0.55;
}

.member-card.fallen .hp-fill {
  background: rgba(80, 72, 68, 0.6);
}

.camp-party-list {
  margin-bottom: 1rem;
}

.camp-layout .recipe-list {
  max-height: 220px;
}

.satchel h4 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(244, 232, 208, 0.55);
  margin-bottom: 0.5rem;
}

.ingredient-bag {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.75rem;
}

.ingredient-bag.empty-hint {
  color: rgba(244, 232, 208, 0.4);
  font-style: italic;
}

.ingredient-chip {
  background: rgba(244, 232, 208, 0.12);
  border: 1px solid rgba(244, 232, 208, 0.18);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  color: var(--parchment);
}

.main-panel {
  background: linear-gradient(160deg, rgba(61, 92, 58, 0.25), rgba(20, 14, 10, 0.5));
  border: 1px solid rgba(244, 232, 208, 0.1);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.floor-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

#floorName {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--parchment);
}

.hunger-warn {
  font-size: 0.75rem;
  color: var(--ember-bright);
  animation: rumble 1.5s ease-in-out infinite;
}

.hunger-warn.hidden {
  display: none;
}

@keyframes rumble {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.flavor-line {
  font-style: italic;
  color: rgba(244, 232, 208, 0.7);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.floor-monsters-heading {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(244, 232, 208, 0.55);
  margin-bottom: 0.5rem;
}

.floor-monsters {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.floor-monster-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  background: rgba(244, 232, 208, 0.09);
  border: 1px solid rgba(244, 232, 208, 0.16);
  border-radius: var(--radius);
  text-align: left;
  color: inherit;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}

.floor-monster-card.defeated {
  opacity: 0.72;
}

.floor-monster-card.searched {
  opacity: 0.5;
}

.floor-monster-card.elite {
  background: rgba(184, 134, 11, 0.12);
  border-color: rgba(204, 164, 60, 0.35);
}

.floor-monster-card.elite:not(.defeated):hover {
  border-color: rgba(232, 180, 60, 0.5);
}

.elite-badge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.4rem;
  font-family: var(--font-display);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  vertical-align: middle;
  color: #f0d890;
  background: rgba(184, 134, 11, 0.35);
  border: 1px solid rgba(204, 164, 60, 0.5);
  border-radius: 4px;
}

.floor-monster-card.wizard {
  background: rgba(72, 40, 120, 0.18);
  border-color: rgba(160, 100, 220, 0.35);
}

.wizard-badge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.4rem;
  font-family: var(--font-display);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  vertical-align: middle;
  color: #d8b8f0;
  background: rgba(88, 48, 140, 0.4);
  border: 1px solid rgba(160, 100, 220, 0.5);
  border-radius: 4px;
}

.floor-monster-card.ghost {
  background: rgba(48, 88, 140, 0.14);
  border-color: rgba(120, 180, 240, 0.35);
}

.ghost-badge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.4rem;
  font-family: var(--font-display);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  vertical-align: middle;
  color: #b8e0ff;
  background: rgba(48, 96, 160, 0.4);
  border: 1px solid rgba(120, 180, 240, 0.5);
  border-radius: 4px;
}

.floor-monster-card.boss {
  background: rgba(140, 24, 40, 0.2);
  border-color: rgba(220, 72, 72, 0.45);
}

.floor-monster-card.boss:not(.defeated):hover {
  border-color: rgba(255, 120, 96, 0.55);
}

.boss-badge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.4rem;
  font-family: var(--font-display);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  vertical-align: middle;
  color: #ffb0a0;
  background: rgba(160, 32, 48, 0.45);
  border: 1px solid rgba(220, 72, 72, 0.55);
  border-radius: 4px;
}

.monster-dmg {
  display: block;
  font-size: 0.72rem;
  color: rgba(255, 160, 140, 0.85);
  margin-top: 0.15rem;
}

#descendMontageScreen.screen:not(.active) {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
}

#descendMontageScreen.screen.active {
  animation: none;
}

.descend-comic-card {
  max-width: min(760px, 96vw);
  margin: 0 auto;
  padding: 1.25rem 1rem 1.5rem;
  background: linear-gradient(180deg, rgba(36, 24, 16, 0.95), rgba(20, 12, 8, 0.98));
  border: 2px solid rgba(204, 164, 60, 0.35);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.descend-comic-eyebrow {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(240, 216, 144, 0.7);
  margin: 0 0 0.35rem;
}

.descend-comic-title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 3.5vw, 1.35rem);
  color: #f0d890;
  margin: 0 0 1rem;
  letter-spacing: 0.04em;
}

.descend-comic-page-wrap {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  aspect-ratio: 720 / 520;
  background: linear-gradient(180deg, rgba(44, 32, 24, 0.95), rgba(24, 16, 12, 0.98));
  border: 3px solid rgba(48, 32, 20, 0.9);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(204, 164, 60, 0.25);
}

.descend-comic-page {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  animation: comic-page-in 0.55s ease-out both;
}

.descend-comic-captions {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 3.5% 2%;
  padding: 2.5% 2%;
  pointer-events: none;
  z-index: 2;
}

.comic-cap {
  align-self: end;
  justify-self: stretch;
  margin: 0;
  padding: 0.35rem 0.45rem;
  font-size: clamp(0.58rem, 1.8vw, 0.72rem);
  line-height: 1.25;
  color: var(--parchment);
  background: rgba(12, 8, 6, 0.9);
  border: 1px solid rgba(204, 164, 60, 0.55);
  border-radius: 4px;
  text-align: left;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  z-index: 2;
  animation: comic-cap-in 0.35s ease-out both;
}

.comic-cap span {
  display: block;
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f0d890;
  margin-bottom: 0.1rem;
}

.comic-cap--aldric { animation-delay: 0.12s; }
.comic-cap--elara { animation-delay: 0.22s; }
.comic-cap--finn { animation-delay: 0.32s; }
.comic-cap--orin { animation-delay: 0.42s; }

.descend-comic-continue {
  margin-top: 1.1rem;
  min-width: 12rem;
}

@keyframes comic-page-in {
  from {
    opacity: 0.92;
    transform: scale(0.99);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes comic-cap-in {
  from {
    opacity: 0.85;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#descendWalkScreen.screen:not(.active) {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
}

#descendWalkScreen.screen.active {
  animation: none;
}

.descend-walk-card {
  max-width: min(760px, 96vw);
  margin: 0 auto;
  padding: 1.25rem 1rem 1.5rem;
  background: linear-gradient(180deg, rgba(36, 24, 16, 0.95), rgba(20, 12, 8, 0.98));
  border: 2px solid rgba(204, 164, 60, 0.35);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.descend-walk-eyebrow {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(240, 216, 144, 0.7);
  margin: 0 0 0.35rem;
}

.descend-walk-title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 3.5vw, 1.35rem);
  color: #f0d890;
  margin: 0 0 1rem;
  letter-spacing: 0.04em;
}

.descend-walk-scene {
  position: relative;
  width: 100%;
  max-width: 720px;
  height: 200px;
  margin: 0 auto;
  overflow: hidden;
  border: 3px solid rgba(48, 32, 20, 0.9);
  border-radius: 6px;
  background: #120c10;
  box-shadow: inset 0 0 0 1px rgba(204, 164, 60, 0.25);
}

.descend-walk-pan {
  position: absolute;
  inset: 0;
  width: 200%;
  height: 100%;
  animation: walk-pan 14s linear infinite;
}

.descend-walk-floor {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.descend-walk-party {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  z-index: 2;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.55));
}

.walk-sprite {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  animation: walk-bob 0.55s ease-in-out infinite;
}

.walk-sprite--0 { animation-delay: 0s; }
.walk-sprite--1 { animation-delay: 0.08s; }
.walk-sprite--2 { animation-delay: 0.16s; }
.walk-sprite--3 { animation-delay: 0.24s; }

.descend-walk-caption {
  margin: 0.85rem 0 0;
  font-size: 0.82rem;
  font-style: italic;
  color: rgba(244, 232, 208, 0.75);
}

.descend-walk-continue {
  margin-top: 1rem;
  min-width: 10rem;
}

@keyframes walk-pan {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes walk-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.descend-wrap {
  margin-bottom: 0.85rem;
}

.descend-wrap.hidden {
  display: none;
}

.descend-btn {
  width: 100%;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

.floor-cleared-note {
  margin: 0 0 0.65rem !important;
  font-size: 0.82rem;
}

.monster-action-btn {
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  border: 1px solid rgba(244, 232, 208, 0.25);
  background: rgba(244, 232, 208, 0.12);
  color: var(--parchment);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.monster-action-btn:hover {
  background: rgba(232, 120, 48, 0.28);
  border-color: var(--ember);
}

.monster-action-btn.search-btn {
  background: rgba(92, 120, 168, 0.25);
  border-color: rgba(140, 170, 220, 0.35);
}

.monster-action-btn.search-btn:hover {
  background: rgba(92, 120, 168, 0.42);
  border-color: rgba(160, 190, 240, 0.55);
}

.monster-searched-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(244, 232, 208, 0.4);
}

.floor-monster-card .monster-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  flex-shrink: 0;
}

.pixel-icon {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  border: none;
  background: none;
  box-shadow: none;
}

.pixel-icon--monster {
  width: 2.25rem;
  height: 2.25rem;
}

.pixel-icon--path {
  width: 2.5rem;
  height: 2.5rem;
}

.pixel-icon--chip {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-block;
  vertical-align: -0.25rem;
  margin-right: 0.2rem;
}

.pixel-icon--party {
  width: 1.5rem;
  height: 1.5rem;
  display: inline-block;
  vertical-align: -0.3rem;
  margin-right: 0.25rem;
}

.pixel-icon--inline {
  width: 1.35rem;
  height: 1.35rem;
  display: inline-block;
  vertical-align: -0.28rem;
  margin-right: 0.2rem;
}

.pixel-icon--recipe {
  width: 1.1rem;
  height: 1.1rem;
  display: inline-block;
  vertical-align: -0.2rem;
  margin-right: 0.1rem;
}

.pixel-icon--loot {
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto 0.35rem;
}

.pixel-icon--camp-flame {
  width: 2.5rem;
  height: 2.5rem;
}

.pixel-icon--camp-pot {
  width: 3rem;
  height: 3rem;
}

.name-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.ingredient-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.floor-monster-card .monster-info h4 {
  font-family: var(--font-display);
  font-size: 0.82rem;
  color: var(--parchment);
  margin-bottom: 0.15rem;
}

.floor-monster-card .monster-hp {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(244, 232, 208, 0.75);
  font-variant-numeric: tabular-nums;
}

.floor-monster-card .monster-hp.low {
  color: var(--ember-bright);
}

.path-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.path-grid::before {
  content: "Other paths";
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(244, 232, 208, 0.45);
  margin-bottom: 0.15rem;
  grid-column: 1 / -1;
}

.path-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  background: rgba(244, 232, 208, 0.07);
  border: 1px solid rgba(244, 232, 208, 0.14);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  color: inherit;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.path-card:hover:not(:disabled) {
  background: rgba(244, 232, 208, 0.14);
  border-color: rgba(232, 120, 48, 0.4);
  transform: translateX(4px);
}

.path-card.path-used,
.path-card:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.path-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
}

.path-info h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--parchment);
  margin-bottom: 0.2rem;
}

.path-info p {
  font-size: 0.8rem;
  color: rgba(244, 232, 208, 0.55);
}

.path-risk {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.risk-low { background: rgba(61, 92, 58, 0.5); color: #b8d4b4; }
.risk-mid { background: rgba(184, 134, 11, 0.35); color: #f0d890; }
.risk-high { background: rgba(139, 46, 46, 0.45); color: #f0a0a0; }

.battle-stage {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 440px;
}

.battle-stage.search-mode {
  background:
    radial-gradient(ellipse 80% 40% at 50% 18%, rgba(60, 28, 28, 0.35), transparent),
    radial-gradient(ellipse 60% 30% at 50% 85%, rgba(0, 0, 0, 0.45), transparent);
  border-radius: var(--radius);
  padding: 0.75rem 0.5rem 0.5rem;
}

.battle-stage.search-mode .enemy-side.dead {
  position: relative;
  padding-bottom: 0.5rem;
}

.battle-stage.search-mode .enemy-side.dead::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.15rem;
  width: 7rem;
  height: 1.25rem;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(80, 20, 20, 0.55) 0%, transparent 72%);
  pointer-events: none;
}

.battle-stage.search-mode .enemy-side.dead .combat-emoji {
  animation: none;
}

.battle-stage.search-mode .enemy-side.dead .combat-emoji .pixel-icon,
.battle-stage.search-mode .enemy-side.dead .combat-emoji.pixel-icon {
  transform: rotate(95deg) translate(18px, 8px) scale(0.92);
  filter: grayscale(0.55) brightness(0.72) drop-shadow(0 4px 10px rgba(0, 0, 0, 0.55));
  opacity: 0.82;
}

.battle-stage.search-mode .enemy-side.dead h3 {
  color: rgba(200, 170, 150, 0.65);
  text-decoration: line-through;
  text-decoration-color: rgba(139, 46, 46, 0.7);
}

.battle-stage.search-mode .enemy-side.dead .hp-text {
  color: rgba(160, 120, 120, 0.75);
}

.battle-stage.search-mode .enemy-side.dead .hp-fill {
  width: 0 !important;
  background: #3a2020;
}

.battle-stage.search-mode .enemy-side.dead .combat-desc {
  color: rgba(180, 120, 120, 0.55);
}

.slain-badge.hidden {
  display: none;
}

.battle-stage.search-mode .enemy-side.dead .slain-badge {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.2rem 0.65rem;
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c89090;
  background: rgba(80, 28, 28, 0.45);
  border: 1px solid rgba(139, 46, 46, 0.5);
  border-radius: 4px;
}

.battle-stage.search-mode .battle-member.active {
  border-color: rgba(244, 232, 208, 0.12);
  box-shadow: none;
  background: rgba(20, 14, 10, 0.4);
}

.battle-stage.search-mode .fighter-card.search-banner {
  background: rgba(80, 48, 28, 0.25);
  border: 1px solid rgba(184, 134, 11, 0.25);
  font-style: italic;
}

.combatant {
  text-align: center;
}

.combat-emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4rem;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
  animation: bob 2s ease-in-out infinite;
}

.combat-emoji .pixel-icon,
.combat-emoji.pixel-icon {
  width: 4rem;
  height: 4rem;
}

.combat-emoji--alpha {
  filter: drop-shadow(0 0 10px rgba(255, 200, 64, 0.55)) drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
  animation: bob 2s ease-in-out infinite, alpha-eye-glow 1.8s ease-in-out infinite;
}

@keyframes alpha-eye-glow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(255, 200, 64, 0.45)) drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4)); }
  50% { filter: drop-shadow(0 0 16px rgba(255, 220, 96, 0.75)) drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4)); }
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.combatant h3 {
  font-family: var(--font-display);
  color: var(--parchment);
  margin: 0.5rem 0;
}

.hp-bar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  max-width: 280px;
  margin: 0 auto;
}

.hp-text {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--parchment);
  font-variant-numeric: tabular-nums;
}

.enemy-hp-wrap .hp-text {
  color: #f0a0a0;
}

.hp-bar {
  height: 10px;
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 5px;
  overflow: hidden;
}

.hp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blood), #e05555);
  border-radius: 5px;
  transition: width 0.25s ease;
}

.enemy-hp .hp-fill {
  background: linear-gradient(90deg, #6a3030, var(--blood));
}

.combat-desc {
  font-size: 0.85rem;
  font-style: italic;
  color: rgba(244, 232, 208, 0.55);
  margin-top: 0.5rem;
}

.battle-log {
  flex: 1;
  min-height: 100px;
  max-height: 140px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  line-height: 1.6;
  color: rgba(244, 232, 208, 0.8);
}

.battle-log p {
  margin-bottom: 0.25rem;
}

.battle-log .damage { color: #f08080; }
.battle-log .heal { color: #90c890; }
.battle-log .cook-line { color: var(--gold); font-style: italic; }

.fighter-card {
  background: rgba(244, 232, 208, 0.08);
  border-radius: var(--radius);
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: var(--parchment);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.battle-party {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-top: 0.25rem;
}

@media (max-width: 600px) {
  .battle-party {
    grid-template-columns: repeat(2, 1fr);
  }
}

.battle-member {
  position: relative;
  display: flex;
  flex-direction: column;
  background: rgba(20, 14, 10, 0.4);
  border: 1px solid rgba(244, 232, 208, 0.12);
  border-radius: 8px;
  padding: 0.5rem 0.4rem 0.35rem;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
  overflow: visible;
}

.heal-bubble {
  position: absolute;
  left: 50%;
  bottom: 58%;
  margin-left: var(--heal-drift, 0px);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  color: #7ed67a;
  text-shadow:
    0 0 6px rgba(120, 220, 110, 0.85),
    0 1px 0 rgba(40, 100, 36, 0.5);
  pointer-events: none;
  user-select: none;
  z-index: 3;
  animation: heal-float 1s ease-out forwards;
}

@keyframes heal-float {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(0.5);
  }
  18% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-42px) scale(1.05);
  }
}

.battle-member.active {
  border-color: var(--ember-bright);
  box-shadow: 0 0 10px rgba(232, 120, 48, 0.35);
  background: rgba(196, 92, 38, 0.15);
}

.battle-member.fallen {
  opacity: 0.4;
  filter: grayscale(1);
}

.battle-member.heal-selectable {
  border-color: rgba(158, 184, 232, 0.45);
  box-shadow: 0 0 10px rgba(158, 184, 232, 0.2);
}

.battle-member.heal-selectable:hover {
  border-color: #9eb8e8;
  box-shadow: 0 0 12px rgba(158, 184, 232, 0.4);
}

.battle-member.active.heal-selectable {
  border-color: #9eb8e8;
  box-shadow: 0 0 12px rgba(158, 184, 232, 0.45);
  background: rgba(88, 108, 160, 0.2);
}

.battle-member-portrait.heal-target-portrait {
  pointer-events: auto;
  cursor: pointer;
}

.battle-member-portrait {
  display: block;
  width: 100%;
  height: auto;
  max-height: 104px;
  margin-top: 0.45rem;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  border: none;
  background: none;
  box-shadow: none;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.battle-member.active .battle-member-portrait {
  filter: drop-shadow(0 0 6px rgba(232, 120, 48, 0.35));
}

.battle-member-name {
  display: block;
  font-family: var(--font-display);
  font-size: 0.62rem;
  color: var(--parchment);
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}

.battle-member-mp {
  display: block;
  font-size: 0.62rem;
  color: #9eb8e8;
  margin-bottom: 0.2rem;
}

.battle-member-hp {
  display: block;
  font-size: 0.68rem;
  color: rgba(244, 232, 208, 0.7);
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.3rem;
}

.battle-member.low .battle-member-hp {
  color: var(--ember-bright);
}

.battle-member .hp-bar {
  height: 5px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 3px;
  overflow: hidden;
}

.orin-pouch {
  position: absolute;
  right: 0.1rem;
  bottom: 0.15rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
  padding: 0.12rem 0.18rem;
  background: rgba(16, 24, 40, 0.82);
  border: 1px solid rgba(120, 200, 255, 0.4);
  border-radius: 5px;
  box-shadow: 0 0 8px rgba(120, 200, 255, 0.2);
  z-index: 2;
  pointer-events: none;
}

.orin-pouch-icon {
  width: 22px;
  height: 22px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.orin-pouch-count {
  font-size: 0.55rem;
  font-family: var(--font-display);
  color: rgba(200, 232, 255, 0.95);
  line-height: 1;
}

.action-btn--holy {
  border-color: rgba(120, 200, 255, 0.55);
  color: #c8ecff;
  background: rgba(40, 72, 120, 0.35);
}

.action-btn--holy:hover:not(:disabled) {
  border-color: rgba(180, 230, 255, 0.75);
  background: rgba(56, 96, 152, 0.45);
}

.battle-member .hp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--moss), #6b9e64);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.battle-member.low .hp-fill {
  background: linear-gradient(90deg, var(--blood), #c44);
}

.action-btn {
  flex: 1 1 120px;
  max-width: 160px;
  padding: 0.65rem 0.75rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(244, 232, 208, 0.1);
  border: 1px solid rgba(244, 232, 208, 0.2);
  border-radius: 6px;
  color: var(--parchment);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.action-btn:hover:not(:disabled) {
  background: rgba(232, 120, 48, 0.25);
  border-color: var(--ember);
}

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

.butcher-card {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}

.butcher-gold {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: #f0d890;
  margin: 0.5rem 0 1rem;
}

.loot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin: 1.5rem 0;
}

.loot-item {
  background: none;
  border: none;
  padding: 0.5rem;
  min-width: 100px;
  animation: lootPop 0.5s ease backwards;
}

.loot-item:nth-child(2) { animation-delay: 0.1s; }
.loot-item:nth-child(3) { animation-delay: 0.2s; }

@keyframes lootPop {
  from { opacity: 0; transform: scale(0.8) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.loot-item .pixel-icon--loot {
  display: block;
}
.loot-item .label { font-size: 0.8rem; color: var(--ink-muted); }

.camp-layout {
  min-height: 400px;
}

.campfire-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center bottom, rgba(196, 92, 38, 0.2), transparent 60%);
  border: 1px solid rgba(244, 232, 208, 0.1);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.fire-pot {
  position: relative;
  margin-bottom: 1rem;
}

.fire-pot .flame {
  display: inline-block;
  animation: flicker 0.8s ease-in-out infinite alternate;
}

.fire-pot .pot {
  display: block;
  margin-top: -0.5rem;
}

@keyframes flicker {
  from { transform: scale(1) rotate(-2deg); }
  to { transform: scale(1.08) rotate(2deg); }
}

.cook-quip {
  font-style: italic;
  color: rgba(244, 232, 208, 0.75);
  max-width: 28rem;
  line-height: 1.55;
  margin-bottom: 1rem;
  min-height: 3rem;
}

.camp-revive {
  width: 100%;
  max-width: 280px;
  margin-bottom: 1rem;
  padding: 0.75rem 0.85rem;
  background: rgba(20, 14, 10, 0.35);
  border: 1px solid rgba(158, 184, 232, 0.2);
  border-radius: var(--radius);
}

.camp-revive.hidden {
  display: none;
}

.camp-revive-heading {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9eb8e8;
  margin: 0 0 0.5rem;
}

.revive-note,
.revive-status {
  font-size: 0.78rem;
  color: rgba(244, 232, 208, 0.65);
  line-height: 1.45;
  margin-bottom: 0.5rem;
}

.revive-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.revive-btn {
  width: 100%;
  font-size: 0.78rem;
}

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

.cooking-result {
  background: rgba(244, 232, 208, 0.1);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
  max-width: 320px;
}

.cooking-result.hidden { display: none; }

.cooking-result .dish-name {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.cooking-result .dish-effect {
  font-size: 0.85rem;
  color: rgba(244, 232, 208, 0.7);
}

.merchant-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: min(720px, 96vw);
  margin: 0 auto;
  padding: 0.75rem 1rem 1.5rem;
}

.merchant-top-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.merchant-back {
  justify-self: start;
  font-size: 0.78rem;
}

.merchant-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f0d890;
  margin: 0;
  text-align: center;
}

.merchant-shop-gold {
  justify-self: end;
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--parchment);
  margin: 0;
}

.merchant-scene-wrap {
  position: relative;
  width: 100%;
  max-width: min(640px, 92vw);
  aspect-ratio: 384 / 256;
  border: 2px solid rgba(204, 164, 60, 0.35);
  border-radius: var(--radius);
  overflow: hidden;
  background: #1a1620;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.merchant-scene-bg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.merchant-wares {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ware-slot {
  position: absolute;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.ware-slot:hover:not(:disabled) {
  border-color: rgba(240, 216, 144, 0.65);
  background: rgba(40, 32, 48, 0.35);
  box-shadow: 0 0 12px rgba(240, 200, 96, 0.25);
}

.ware-slot--disabled,
.ware-slot:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ware-slot--npc {
  left: 30%;
  top: 22%;
  width: 40%;
  height: 42%;
}

.ware-label--npc {
  margin-top: auto;
}

.ware-slot--spore {
  left: 50%;
  top: 54%;
  width: 22%;
  height: 34%;
  transform: translateX(-50%);
}

.ware-slot--caveshroom {
  left: 24%;
  top: 54%;
  width: 22%;
  height: 34%;
}

.ware-label {
  font-size: 0.6rem;
  line-height: 1.2;
  text-align: center;
  color: rgba(244, 232, 208, 0.95);
  max-width: 100%;
  padding: 0.15rem 0.25rem;
  background: rgba(12, 10, 16, 0.72);
  border-radius: 4px;
  border: 1px solid rgba(204, 164, 60, 0.35);
}

.merchant-catalog {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  padding: 0.6rem 0.65rem 0.65rem;
  background: rgba(14, 10, 18, 0.94);
  border-radius: inherit;
}

.merchant-catalog.hidden {
  display: none;
}

.merchant-catalog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.merchant-catalog-title {
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f0d890;
  margin: 0;
}

.merchant-catalog-close {
  min-width: 2rem;
  padding: 0.15rem 0.4rem;
  font-size: 1.1rem;
  line-height: 1;
}

.merchant-catalog-note {
  font-size: 0.68rem;
  color: rgba(244, 232, 208, 0.55);
  margin: 0 0 0.4rem;
  line-height: 1.35;
}

.merchant-catalog-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-right: 0.15rem;
}

.merchant-stock-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.4rem;
  background: rgba(32, 24, 40, 0.65);
  border: 1px solid rgba(204, 164, 60, 0.25);
  border-radius: 6px;
}

.merchant-stock-item--locked {
  opacity: 0.45;
}

.merchant-stock-item--poor .merchant-stock-meta {
  color: rgba(220, 120, 100, 0.85);
}

.merchant-stock-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.merchant-stock-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.merchant-stock-badge {
  font-size: 0.58rem;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  color: #b8f0c8;
  background: rgba(48, 120, 72, 0.35);
  border: 1px solid rgba(120, 200, 140, 0.45);
  line-height: 1.3;
  white-space: nowrap;
}

.merchant-stock-badge--out {
  color: rgba(244, 232, 208, 0.45);
  background: rgba(48, 40, 56, 0.5);
  border-color: rgba(120, 100, 80, 0.25);
}

.merchant-stock-name {
  font-size: 0.8rem;
  color: var(--parchment);
  line-height: 1.2;
}

.merchant-stock-meta {
  font-size: 0.62rem;
  color: rgba(244, 232, 208, 0.55);
}

.merchant-buy-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  min-width: 3.4rem;
  padding: 0.35rem 0.55rem;
  white-space: nowrap;
}

.merchant-buy-price {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  color: #f0d890;
  line-height: 1.1;
}

.merchant-buy-label {
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
  opacity: 0.9;
}

.merchant-stock-item--poor .merchant-buy-price {
  color: rgba(220, 120, 100, 0.9);
}

.pixel-icon--stock {
  width: 42px;
  height: 42px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.merchant-shop-quip {
  margin: 0.85rem 0 0;
  font-size: 0.88rem;
  font-style: italic;
  color: rgba(244, 232, 208, 0.72);
  text-align: center;
  line-height: 1.5;
  max-width: min(640px, 92vw);
}

.camp-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  max-width: 280px;
}

.recipe-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 340px;
  overflow-y: auto;
}

.recipe-card {
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
  font-size: 0.78rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.recipe-card.available {
  background: rgba(61, 92, 58, 0.35);
  border-color: rgba(107, 158, 100, 0.35);
  color: #d4e8d0;
}

.recipe-card.locked {
  background: rgba(0, 0, 0, 0.2);
  color: rgba(244, 232, 208, 0.35);
  cursor: default;
}

.recipe-card.needs-ingredients {
  background: rgba(0, 0, 0, 0.15);
  border-color: rgba(244, 232, 208, 0.12);
  color: rgba(244, 232, 208, 0.55);
  cursor: pointer;
}

.recipe-card.needs-ingredients.selected {
  border-color: rgba(232, 160, 80, 0.55);
  color: rgba(244, 232, 208, 0.78);
}

.recipe-card .recipe-floor {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(232, 180, 120, 0.85);
}

.recipe-card.selected {
  border-color: var(--ember-bright);
  box-shadow: 0 0 12px rgba(232, 120, 48, 0.3);
}

.recipe-card .recipe-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  margin-bottom: 0.2rem;
}

.recipe-card .recipe-heal {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #9fd49a;
  white-space: nowrap;
}

.recipe-card.locked .recipe-heal {
  color: rgba(159, 212, 154, 0.45);
}

.recipe-card .recipe-req {
  font-size: 0.68rem;
  opacity: 0.8;
}

.end-card {
  max-width: 440px;
  margin: 0 auto;
  text-align: center;
}

.end-card.victory .screen-heading {
  color: var(--gold);
}

.end-stats {
  display: grid;
  gap: 0.5rem;
  margin: 1.25rem 0 1.5rem;
  text-align: left;
  max-width: 240px;
  margin-left: auto;
  margin-right: auto;
}

.end-stats div {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--ink-muted);
  border-bottom: 1px solid rgba(42, 31, 20, 0.12);
  padding-bottom: 0.35rem;
}

.end-stats strong {
  color: var(--ink);
  font-family: var(--font-display);
}

.home-link {
  display: block;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
  text-decoration: none;
}

.home-link:hover {
  color: var(--ember);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
