@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=UnifrakturMaguntia&display=swap");

:root {
  --brass: #c4a574;
  --brass-bright: #e8d5a3;
  --brass-dark: #8b6914;
  --brass-shadow: #3d2a0e;
  --leather: #2a1810;
  --leather-deep: #140c08;
  --leather-soft: #3a2418;
  --parchment: #e8d5b0;
  --parchment-dark: #cbb892;
  --ink: #1a1208;
  --ink-soft: #3a2e1e;
  --oxblood: #6b1e23;
  --oxblood-bright: #9a2c33;
  --verdigris: #4a7c6f;
  --lamp: #e8a84a;
  --lamp-glow: rgba(232, 168, 74, 0.45);
  --ruhmkorff: #c8f0e8;
  --bio: #5ce0b8;
  --abyss: #0a1e2e;
  --danger: #c43a12;
  --frame: 14px;
  --radius: 4px;
  --header-h: 64px;
  --font-title: "Cinzel", "Palatino Linotype", Palatino, serif;
  --font-body: "Cormorant Garamond", "Palatino Linotype", Palatino, Georgia, serif;
  --font-runic: "UnifrakturMaguntia", "Cinzel", serif;
  --shadow-deep: 0 18px 50px rgba(0, 0, 0, 0.55);
}

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

html,
body {
  margin: 0;
  height: 100%;
  background: var(--leather-deep);
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.45;
}

body {
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(196, 165, 116, 0.12), transparent 50%),
    radial-gradient(800px 500px at 100% 100%, rgba(10, 30, 46, 0.55), transparent 50%),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.015) 0 1px,
      transparent 1px 3px
    ),
    var(--leather-deep);
}

button,
input,
select {
  font-family: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
  display: block;
}

.hidden {
  display: none !important;
}

#app {
  min-height: 100%;
}

/* ========== BOOT / TITLE ========== */
.screen-full {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 48px;
  position: relative;
}

#screen-title {
  background:
    linear-gradient(180deg, rgba(20, 12, 8, 0.35), rgba(10, 8, 6, 0.78)),
    url("../assets/images/environments/snaefellsjokull_summit.jpg") center 40% / cover no-repeat,
    radial-gradient(ellipse at 50% 70%, #3a2418 0%, #140c08 55%, #070504 100%);
  overflow: hidden;
}

#screen-title::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 108%, #c43a12 0%, transparent 42%),
    linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
  opacity: 0.55;
  pointer-events: none;
}

.volcano-silhouette {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 140%;
  height: 42%;
  background: polygon;
  clip-path: polygon(0% 100%, 0% 70%, 18% 62%, 32% 40%, 41% 48%, 50% 18%, 58% 46%, 68% 36%, 82% 58%, 100% 66%, 100% 100%);
  background: linear-gradient(180deg, #1a120c, #050302);
  opacity: 0.95;
  pointer-events: none;
}

.ember {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--lamp);
  box-shadow: 0 0 8px var(--lamp);
  animation: rise 7s linear infinite;
  pointer-events: none;
}

@keyframes rise {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translateY(-70vh) scale(0.4); opacity: 0; }
}

.title-plate {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 820px;
  padding: 36px 42px 28px;
  border: 2px solid var(--brass);
  box-shadow:
    0 0 0 6px var(--brass-shadow),
    0 0 0 8px var(--brass-dark),
    var(--shadow-deep),
    inset 0 0 40px rgba(0, 0, 0, 0.35);
  background:
    linear-gradient(180deg, rgba(58, 36, 24, 0.92), rgba(20, 12, 8, 0.94));
}

.title-plate h1 {
  font-family: var(--font-title);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: clamp(1.35rem, 3.4vw, 2.35rem);
  color: var(--brass-bright);
  margin: 0 0 8px;
  text-shadow: 0 2px 0 var(--brass-shadow), 0 0 24px rgba(232, 168, 74, 0.25);
}

.title-plate .subtitle {
  font-family: var(--font-runic);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  color: var(--parchment);
  margin: 0 0 6px;
}

.title-plate .after {
  font-style: italic;
  color: var(--brass);
  margin: 0 0 22px;
  letter-spacing: 0.08em;
}

.title-quote {
  font-style: italic;
  color: var(--parchment-dark);
  margin: 0;
  font-size: 1.05rem;
}

.title-quote cite {
  display: block;
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--brass);
  font-style: normal;
}

.ornament {
  color: var(--brass);
  letter-spacing: 0.4em;
  margin: 10px 0 18px;
  font-size: 0.9rem;
}

.menu-col {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 28px;
  width: min(420px, 92vw);
}

.btn {
  appearance: none;
  border: 1px solid var(--brass-dark);
  background:
    linear-gradient(180deg, #6a4a22 0%, #3d2a10 48%, #2a1c0c 100%);
  color: var(--brass-bright);
  font-family: var(--font-title);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.82rem;
  padding: 12px 18px;
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 180, 0.35),
    0 3px 0 var(--brass-shadow);
  transition: transform 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease;
}

.btn:hover,
.btn:focus-visible {
  filter: brightness(1.12);
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 180, 0.5),
    0 3px 0 var(--brass-shadow),
    0 0 16px var(--lamp-glow);
}

.btn:active {
  transform: translateY(2px);
  box-shadow: inset 0 1px 0 rgba(255, 230, 180, 0.2);
}

.btn.primary {
  background: linear-gradient(180deg, #8a3a28 0%, #5a1c18 50%, #3a1010 100%);
  border-color: #c4a574;
}

.btn.ghost {
  background: transparent;
  box-shadow: none;
  color: var(--parchment-dark);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.4);
}

.lang-switch {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 5;
  display: flex;
  gap: 6px;
}

.lang-switch button {
  min-width: 48px;
}

.boot-log {
  font-family: var(--font-title);
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: var(--brass);
  text-transform: uppercase;
}

/* ========== GAME CHROME ========== */
#screen-game {
  min-height: 100%;
  display: grid;
  grid-template-rows: var(--header-h) 1fr;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background:
    linear-gradient(180deg, #4a3420, #24160e);
  border-bottom: 2px solid var(--brass);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  position: relative;
  z-index: 4;
}

.brand {
  font-family: var(--font-title);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass-bright);
}

.meta-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.pill {
  border: 1px solid var(--brass-dark);
  background: rgba(0, 0, 0, 0.28);
  padding: 4px 10px;
  font-size: 0.78rem;
  color: var(--parchment);
  letter-spacing: 0.04em;
}

.pill strong {
  color: var(--lamp);
  font-weight: 600;
  font-family: var(--font-title);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  margin-right: 6px;
}

.top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.icon-btn {
  padding: 8px 10px;
  font-size: 0.68rem;
}

.layout {
  display: grid;
  grid-template-columns: 250px 1fr 280px;
  min-height: calc(100vh - var(--header-h));
}

.panel {
  background: linear-gradient(180deg, rgba(42, 24, 16, 0.95), rgba(16, 10, 8, 0.96));
  border-right: 1px solid var(--brass-shadow);
  padding: 14px 12px 18px;
  overflow: auto;
}

.panel.right {
  border-right: none;
  border-left: 1px solid var(--brass-shadow);
}

.panel h2 {
  font-family: var(--font-title);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 12px;
  border-bottom: 1px solid var(--brass-dark);
  padding-bottom: 6px;
}

.member {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 8px;
  padding: 8px;
  margin-bottom: 10px;
  border: 1px solid rgba(196, 165, 116, 0.25);
  background: rgba(0, 0, 0, 0.22);
}

.member.locked {
  opacity: 0.45;
  filter: grayscale(0.7);
}

.portrait {
  width: 56px;
  height: 70px;
  object-fit: cover;
  background:
    linear-gradient(180deg, #3a2a20, #1a100c);
  border: 1px solid var(--brass-dark);
}

.portrait.fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-size: 1.2rem;
  color: var(--brass);
}

.member h3 {
  margin: 0 0 4px;
  font-size: 0.92rem;
  color: var(--brass-bright);
  font-family: var(--font-title);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bar {
  height: 8px;
  background: #140c08;
  border: 1px solid #3a2a18;
  position: relative;
}

.bar > span {
  display: block;
  height: 100%;
  width: 50%;
  background: linear-gradient(90deg, #6b1e23, #c43a12);
}

.bar.morale > span {
  background: linear-gradient(90deg, #2a4a3a, var(--verdigris));
}

.bar.fatigue > span {
  background: linear-gradient(90deg, #3a3a10, var(--lamp));
}

.bar-label {
  font-size: 0.68rem;
  color: var(--parchment-dark);
  display: flex;
  justify-content: space-between;
}

/* Viewport */
.viewport {
  display: grid;
  grid-template-rows: minmax(240px, 52vh) 1fr;
  min-width: 0;
  background: #0a0806;
}

.cinematic {
  position: relative;
  margin: 12px 12px 0;
  border: 2px solid var(--brass);
  box-shadow:
    0 0 0 4px var(--brass-shadow),
    inset 0 0 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  background: #0a1e2e;
  min-height: 220px;
}

.cinematic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 220px;
  max-height: 52vh;
}

.cinematic-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  background:
    radial-gradient(circle at 30% 20%, rgba(200, 240, 232, 0.08), transparent 40%),
    radial-gradient(circle at 70% 80%, rgba(196, 58, 18, 0.18), transparent 45%),
    linear-gradient(180deg, #1a2430, #0a0c10);
}

.cinematic-fallback .place {
  font-family: var(--font-title);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass-bright);
  font-size: 0.95rem;
}

.cinematic-fallback p {
  max-width: 46ch;
  color: var(--parchment-dark);
  font-style: italic;
}

.lamp-flicker {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  background: radial-gradient(circle at 18% 80%, rgba(200, 240, 232, 0.12), transparent 32%);
  animation: flicker 3.8s ease-in-out infinite;
}

@keyframes flicker {
  0%, 100% { opacity: 0.55; }
  40% { opacity: 0.85; }
  52% { opacity: 0.4; }
  60% { opacity: 0.8; }
}

.subtitle-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 14px 12px;
  background: linear-gradient(180deg, transparent, rgba(10, 8, 6, 0.88));
  font-style: italic;
  color: var(--parchment);
  min-height: 2.2em;
  text-align: center;
  text-shadow: 0 1px 2px #000;
}

.subtitle-bar.off {
  display: none;
}

.dialogue {
  margin: 12px;
  padding: 16px 18px 14px;
  background:
    linear-gradient(180deg, #efe0c0, #d7c396);
  color: var(--ink);
  border: 1px solid var(--brass-dark);
  box-shadow: var(--shadow-deep);
  position: relative;
  min-height: 180px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
}

.dialogue::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(139, 105, 20, 0.35);
  pointer-events: none;
}

.speaker {
  font-family: var(--font-title);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--oxblood);
}

.dialogue-text {
  font-size: 1.15rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.choice {
  text-align: left;
  background: rgba(26, 18, 8, 0.06);
  border: 1px solid rgba(107, 30, 35, 0.35);
  color: var(--ink);
  padding: 8px 12px;
  font-size: 1.02rem;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.choice:hover,
.choice:focus-visible {
  background: rgba(107, 30, 35, 0.12);
  border-color: var(--oxblood);
  outline: none;
}

.choice .idx {
  font-family: var(--font-title);
  color: var(--oxblood);
  margin-right: 8px;
  font-size: 0.78rem;
}

.choice .impact {
  display: block;
  font-size: 0.78rem;
  color: #5a4030;
  font-style: italic;
  margin-top: 2px;
}

.hint {
  font-size: 0.72rem;
  color: #6a5640;
  margin: 4px 0 0;
}

/* Survival gauges */
.gauges {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gauge {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 8px;
  align-items: center;
}

.gauge label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-title);
  color: var(--brass);
}

.gauge .val {
  font-size: 0.75rem;
  color: var(--lamp);
}

.track {
  grid-column: 1 / -1;
  height: 10px;
  background: #100804;
  border: 1px solid #3a2a18;
}

.track > i {
  display: block;
  height: 100%;
  width: 70%;
  background: linear-gradient(90deg, var(--verdigris), var(--bio));
}

.track.light > i {
  background: linear-gradient(90deg, #2a5a50, var(--ruhmkorff));
}

.track.heat > i {
  background: linear-gradient(90deg, #5a2010, var(--danger));
}

.track.pressure > i {
  background: linear-gradient(90deg, #1a3040, #6a90b0);
}

.audio-box,
.quick-nav {
  margin-top: 16px;
}

.sliders label {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px;
  align-items: center;
  font-size: 0.8rem;
  margin-bottom: 6px;
  color: var(--parchment-dark);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--brass);
}

.quick-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--parchment-dark);
  margin: 8px 0;
}

/* Modals */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 4, 2, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  padding: 20px;
}

.modal {
  width: min(760px, 96vw);
  max-height: 88vh;
  overflow: auto;
  background: linear-gradient(180deg, #3a2418, #1a100c);
  border: 2px solid var(--brass);
  box-shadow: 0 0 0 6px var(--brass-shadow), var(--shadow-deep);
  padding: 18px 20px 20px;
}

.modal h2 {
  font-family: var(--font-title);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-bright);
  font-size: 0.95rem;
  margin: 0 0 12px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.grid-inv {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.slot {
  aspect-ratio: 1;
  border: 1px solid var(--brass-dark);
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brass);
  font-size: 0.7rem;
  text-align: center;
  padding: 4px;
}

.slot.filled {
  background: rgba(196, 165, 116, 0.12);
}

.slots-save {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.slot-save {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--brass-dark);
  background: rgba(0, 0, 0, 0.25);
}

.journal-pages {
  background: var(--parchment);
  color: var(--ink);
  padding: 16px 18px;
  min-height: 200px;
  font-size: 1.05rem;
}

.journal-pages article {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #b8a070;
}
.journal-pages p {
  white-space: pre-wrap;
}
.ending-banner {
  font-family: var(--font-title);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--oxblood);
  font-size: 0.85rem;
  margin: 0 0 8px;
}
.ending-banner.rewritten {
  color: #5a1c18;
  border-left: 3px solid var(--oxblood);
  padding-left: 8px;
  font-style: italic;
  letter-spacing: 0.08em;
}
.inspect-img {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  border: 1px solid var(--brass-dark);
  margin-bottom: 8px;
}
.map-route {
  list-style: none;
  margin: 0;
  padding: 0;
}
.map-route li {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border-bottom: 1px solid rgba(196, 165, 116, 0.15);
  font-size: 0.95rem;
  color: var(--parchment-dark);
}
.map-route li .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3a2a18;
  border: 1px solid var(--brass-dark);
}
.map-route li.visited { color: var(--parchment); }
.map-route li.visited .dot { background: var(--brass); }
.map-route li.here {
  color: var(--brass-bright);
  background: rgba(196, 165, 116, 0.08);
}
.map-route li.here .dot {
  background: var(--lamp);
  box-shadow: 0 0 8px var(--lamp-glow);
}
.dialogue {
  min-height: 240px;
}

.journal-pages h3 {
  margin: 0 0 4px;
  font-family: var(--font-title);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: #1a100c;
  border: 1px solid var(--brass);
  color: var(--brass-bright);
  padding: 8px 14px;
  z-index: 50;
  font-family: var(--font-title);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Combat shell */
.combat-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.combat-log {
  background: #0e0a08;
  border: 1px solid var(--brass-shadow);
  min-height: 120px;
  padding: 10px;
  font-size: 0.9rem;
  color: var(--parchment-dark);
}

.combat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.runes {
  font-family: var(--font-runic);
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  line-height: 1.6;
  color: var(--oxblood);
  background: rgba(255, 255, 255, 0.18);
  padding: 10px;
  margin: 8px 0;
}

/* Responsive */
@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 200px 1fr 220px;
  }
}

@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .panel.right,
  .panel {
    border: none;
    border-top: 1px solid var(--brass-shadow);
  }
  .topbar {
    grid-template-columns: 1fr;
    height: auto;
    padding: 8px;
  }
  .brand {
    display: none;
  }
  .viewport {
    grid-template-rows: minmax(180px, 36vh) 1fr;
  }
  .grid-inv {
    grid-template-columns: repeat(4, 1fr);
  }
}

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

body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  animation: none !important;
  transition: none !important;
}

/* Survival warnings */
.warn,
#survival-warn {
  font-size: 0.78rem;
  color: #e8a84a;
  min-height: 1.2em;
  margin: 8px 0 0;
  font-style: italic;
}
.warn-crit {
  color: #e07050;
}
.track.critical {
  border-color: #c43a12;
  box-shadow: 0 0 8px rgba(196, 58, 18, 0.45);
}

/* Inventory inspect */
.inv-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
  align-items: start;
}
.slot {
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}
.slot.selected {
  border-color: var(--lamp);
  box-shadow: 0 0 10px var(--lamp-glow);
}
.slot.combine {
  border-color: var(--verdigris);
}
.slot.equipped {
  outline: 1px dashed var(--brass);
}
.slot em {
  display: block;
  font-size: 0.58rem;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lamp);
}
.inspect-pane {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--brass-dark);
  padding: 12px;
}
.inspect-pane h3 {
  margin: 0 0 8px;
  font-family: var(--font-title);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--brass-bright);
}
.inspect-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.inv-msg {
  color: var(--lamp);
  font-style: italic;
}
.muted {
  color: var(--parchment-dark);
  font-size: 0.85rem;
}

/* Combat */
.modal.wide {
  width: min(980px, 96vw);
}
.combat-ui {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.combat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}
.unit-card {
  text-align: left;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--brass-dark);
  color: var(--parchment);
  padding: 10px;
  font-size: 0.9rem;
}
.unit-card.current {
  border-color: var(--lamp);
  box-shadow: 0 0 12px var(--lamp-glow);
}
.unit-card.targetable {
  border-color: var(--bio);
  cursor: pointer;
  animation: pulse-target 1.2s ease-in-out infinite;
}
.unit-card.dead {
  opacity: 0.35;
  filter: grayscale(0.8);
}
@keyframes pulse-target {
  0%, 100% { box-shadow: 0 0 0 transparent; }
  50% { box-shadow: 0 0 12px rgba(92, 224, 184, 0.45); }
}
.combat-log h3 {
  font-family: var(--font-title);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 6px;
}
.combat-log {
  max-height: 160px;
  overflow: auto;
}
.combat-result {
  font-family: var(--font-title);
  letter-spacing: 0.08em;
  color: var(--brass-bright);
}
.combat-actions small {
  opacity: 0.7;
  margin-left: 4px;
}

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