* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #07131e;
  color: #e6e6e5;
  font:
    16px/1.5 Inter,
    system-ui,
    sans-serif;
}
header,
main,
footer {
  width: min(1100px, 94%);
  margin: auto;
}
header,
footer,
nav,
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
header {
  padding: 18px 0;
  border-bottom: 1px solid #416979;
}
.wordmark {
  font:
    bold 17px Georgia,
    serif;
  letter-spacing: 0.15em;
  color: #efdeb2;
  text-decoration: none;
}
.wordmark span {
  color: #e3a85e;
}
nav {
  gap: 4px;
}
button,
select {
  border: 1px solid #60716a;
  background: #182b2b;
  color: #f5ead3;
  border-radius: 3px;
  font: inherit;
  padding: 0.55rem 0.85rem;
  cursor: pointer;
}
button:hover,
button:focus-visible,
select:focus-visible {
  border-color: #f5bd69;
  background: #31443a;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
nav button {
  background: none;
  border-color: transparent;
  font-size: 0.88rem;
}
button.primary {
  background: #e4b66f;
  border-color: #edc98b;
  color: #1e2826;
  font-weight: 700;
}
main {
  padding: 24px 0;
}
footer {
  border-top: 1px solid #46524a;
  padding: 14px 0;
  color: #9aada2;
  font-size: 0.75rem;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: Georgia, serif;
  font-weight: normal;
}
h1 {
  font-size: clamp(3.6rem, 9vw, 7.5rem);
  line-height: 0.91;
  letter-spacing: -0.065em;
}
h2 {
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}
h3 {
  font-size: 1.45rem;
}
.kicker {
  text-transform: uppercase;
  font: bold 0.68rem/1.4 monospace;
  letter-spacing: 0.18em;
  color: #e1b574;
  margin: 0 0 0.65rem;
}
.title {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: end;
  padding: clamp(22px, 5vw, 64px);
  background:
    linear-gradient(90deg, #071718e8, transparent 75%),
    linear-gradient(0deg, #0c1719b8, transparent 60%),
    url("../key-art/lowwater-the-last-address.webp") center top / auto 200% no-repeat;
  border: 1px solid #657067;
  image-rendering: auto;
}
.title p {
  max-width: 435px;
  margin: 1rem 0 1.4rem;
}
.subtitle {
  font: italic 1.7rem Georgia;
  color: #eed4a5;
  margin-top: 9px;
}
.bar {
  margin: 16px 0;
}
.stack {
  display: grid;
  gap: 12px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.panel,
.card {
  background: #152627;
  border: 1px solid #485a50;
  padding: 16px;
}
.card {
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
}
.card p,
.muted {
  color: #aec0b2;
  font-size: 0.88rem;
}
.canvas {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  background: #112527;
  border: 1px solid #697361;
}
canvas {
  image-rendering: pixelated;
}
.hud {
  border-image: url("art/panel.png") 5 fill / 6px / 0 stretch;
  padding: 18px;
  display: grid;
  gap: 12px;
}
.controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.status {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.unit {
  padding: 7px;
  border-left: 2px solid #435e56;
}
.unit.active {
  border-color: #ffcc80;
  color: #ffcc80;
}
.unit small {
  display: block;
  font: 12px/1.5 monospace;
}
.meter {
  height: 6px;
  background: #34403b;
  margin: 5px 0;
}
.meter i {
  display: block;
  height: 100%;
  background: #80ae93;
}
.log {
  color: #edce98;
  min-height: 1.5em;
}
.notes {
  max-width: 78ch;
}
.place {
  flex-direction: column;
  align-items: start;
}
.place canvas {
  align-self: center;
  max-width: 100%;
  height: auto;
}
.portrait {
  flex: none;
  width: 56px;
  height: 56px;
}
.look {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
}
.look label {
  display: grid;
  gap: 5px;
}
.look canvas {
  background: #203332;
  border: 1px solid #59736b;
}
.space {
  margin-top: 16px;
}
details {
  border-bottom: 1px solid #46554e;
  padding: 12px 0;
}
summary {
  cursor: pointer;
  color: #e9c98c;
}
a {
  color: #efc388;
}
.title .controls {
  margin-top: 12px;
}
@media (max-width: 650px) {
  header {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 12px 0;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .crew {
    grid-template-columns: 1fr;
  }
  nav button {
    padding: 5px 8px;
  }
  .title {
    min-height: 410px;
  }
  .status {
    gap: 3px;
  }
  .unit {
    padding: 4px;
  }
  .row {
    flex-wrap: wrap;
  }
  .hud {
    padding: 12px;
  }
  .controls button {
    font-size: 0.88rem;
  }
  .card {
    padding: 9px;
  }
  .portrait {
    width: 45px;
    height: 45px;
  }
  footer {
    align-items: start;
  }
}

/* Cover-matched gothic floodplain presentation */
:root { --water-cyan:#74def1; --deepwater:#07131e; --weathered-silver:#c1cbd0; }
.title { min-height:560px; border-color:#2b7183; box-shadow:inset 0 0 120px #06131bd9; }
.title>div { position:relative; z-index:1; padding:18px; max-width:520px; border-left:2px solid #4fbdd0; background:#02121bb9; }
.title h1 { text-shadow:0 2px 14px #000; color:#e5ebee; }
.title .subtitle { color:#7ee6fa; font-style:normal; letter-spacing:.13em; text-transform:uppercase; }
.title p { max-width:490px; color:#dae7e9; text-shadow:0 2px 8px #07131d; }
.story-scene { min-height:430px; display:flex; align-items:flex-end; border:1px solid #36677a; background-size:cover; background-repeat:no-repeat; background-position:center; margin:16px 0 24px; padding:clamp(18px,4vw,42px); }
.story-scene--drawdown {background-image:linear-gradient(90deg,#04131ff3,#06232bd4 55%,#07121c36),url("../key-art/lowwater-the-last-address.webp");background-position:center 60%;}
.story-scene--cedar-crossing {background-image:linear-gradient(90deg,#04141ff4,#102c35df 60%,#061a2466),url("../key-art/lowwater-the-last-address.webp");background-position:70% 45%;}
.story-scene--bellworks {background-image:linear-gradient(90deg,#07121be9,#152e3cd9 54%,#06121b66),url("../key-art/lowwater-the-last-address.webp");background-position:95% 30%;}
.story-scene__content { max-width:660px; padding:25px; background:#061824dd; border:1px solid #4b82969c; backdrop-filter:blur(6px); }
.story-scene__content .story-lede { font-size:clamp(15px,1.7vw,19px); line-height:1.75; color:#f3f3e9; margin:16px 0; }
.story-scene__content blockquote { margin:22px 0; padding:8px 0 8px 22px; border-left:2px solid var(--water-cyan); color:#83d9e9; font:italic 19px/1.6 Georgia,serif; }
.story-objective {color:#d6e3e8; margin-bottom:18px;}
.evidence-ledger { margin:22px 0; padding:20px; background:#0c1f2b; border:1px solid #3b6371; }
.evidence { padding:14px 0; border-bottom:1px solid #345260; }
.evidence strong {display:block;color:#c9dce1;margin:8px 0;}
.evidence p {font-size:13px;color:#a8c7cf;margin:0;}
@media(max-width:650px){.title{min-height:450px;background-position:61% center}.title>div{padding:14px}.story-scene{min-height:320px;padding:12px}.story-scene__content{padding:15px}.story-scene__content blockquote{font-size:16px}.title .subtitle{letter-spacing:.06em;}}

.ending-dilemma { padding:20px; background:#061a26; border:1px solid #3e8495; display:grid; gap:12px; }
.ending-dilemma h3 { font-size:clamp(21px,2.5vw,30px); color:#e9e4dc; }
.ending-dilemma>p { color:#c0d3da; }
.ending-option { padding:13px 17px; border-left:3px solid #6dd5e6; background:#112b37; }
.ending-option strong { color:#e6e5df; }
.ending-option p { font-size:14px; margin-top:7px; color:#c5d4d8; }

/* Original floodworld equipment art, displayed with readable gear names. */
.armory { margin: 26px 0 10px; }
.armory-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; }
.weapon-tile { display: flex; gap: 12px; align-items: center; min-width: 0; }
.weapon-tile .weapon-icon { flex: 0 0 76px; width: 76px; height: 76px; }
.weapon-tile strong { display: block; font-size: 0.9rem; line-height: 1.3; }
.weapon-tile .muted { margin: 5px 0 0; font-size: 0.74rem; line-height: 1.35; }
@media (max-width: 840px) { .armory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .armory-grid { grid-template-columns: 1fr; } }


/* Character cast: editorial identity and clear combat interactions. */
.character-showcase { display:grid; grid-template-columns:minmax(160px,250px) 1fr; gap:clamp(18px,4vw,36px); align-items:start; }
.character-showcase__portrait { background:linear-gradient(140deg,#102c38,#050f18); border:1px solid #3a798d; padding:18px; display:grid; gap:12px; justify-items:center; }
.character-showcase__portrait canvas { display:block; max-width:100%; width:192px; height:auto; border:0; background:transparent; }
.character-showcase__portrait small { font-size:12px; color:#b9e4eb; text-align:center; }
.character-showcase__info { display:grid; gap:12px; min-width:0; }
.character-showcase__info label { display:grid; gap:5px; color:#e6e6df; font-weight:700; }
.character-showcase__info select { max-width:360px; background:#0b2230; border-color:#3a8293; }
.character-showcase__info h3 { margin:10px 0 0; color:#90e6ee; }
.character-equipment { display:flex; flex-wrap:wrap; gap:14px; align-items:center; background:#091d2a; border:1px solid #356277; padding:11px; }
.character-equipment p { font-size:13px; margin:3px 0; color:#c2dce3; }
.skill-list { list-style:none; padding:0; margin:0; display:grid; gap:9px; }
.skill-list li { background:#0d2833; border-left:3px solid #4ebcce; padding:9px 13px; display:grid; gap:3px; }
.skill-list strong { color:#e8f2f2; }
.skill-list small { color:#89dce8; font-size:11px; text-transform:uppercase; letter-spacing:.06em; }
.skill-list span { color:#cfdddd; font-size:13px; }
.unit__head { display:flex; align-items:center; gap:7px; }
.unit__head .portrait { flex:none; width:40px; height:40px; border:1px solid #478193; background:#0b2430; }
.unit .meter { margin-top:9px; }
.skill-guide { color:#accbd5; font-size:12px; line-height:1.5; padding:9px 12px; margin:0; border:1px solid #2b566b; background:#0c202b; }
.hud .controls button { min-height:42px; border-color:#4b8796; background:#102d3b; color:#e8f5fa; }
.hud .controls button:hover:not(:disabled), .hud .controls button:focus-visible { background:#1c5265; border-color:#89e9ef; }
.hud .controls button:disabled { opacity:.45; }
.card .portrait { border:1px solid #4b8593; background:#0b2631; }
@media(max-width:720px) {
  .character-showcase { grid-template-columns:1fr; }
  .character-showcase__portrait { max-width:280px; }
  .unit__head { flex-direction:column; align-items:flex-start; }
  .unit__head .portrait { width:36px; height:36px; }
  .hud .controls button { flex:1 1 135px; }
}

/* Unified party visuals; wardrobe/Outfitter has been retired. */
.unit__head { display:flex; align-items:center; gap:7px; }
.unit__head canvas { flex:none; width:40px; height:40px; border:1px solid #407987; background:#0a1a22; }
.crew .portrait { border:1px solid #407987; background:#0a1a22; }
.skill-guide { margin:14px 0 0; font-size:.83rem; color:#c5d7dc; line-height:1.55; }

/* Nonintrusive checkpoint confirmation for keyboard and assistive technology. */
.save-feedback { display:inline-flex; align-items:center; color:#9be8e9; font-size:.875rem; padding:.5rem .2rem; }

/* Optional Lowwater scouting battles use their own 12-enemy sprite atlas. */
.scout-panel {
  flex: 1 0 100%; margin-top: 16px; padding: 17px 20px;
  border: 1px solid #31657b; border-left: 4px solid #61cfe1;
  background: linear-gradient(135deg, #071e2b, #08131e);
}
.scout-panel h3 { margin: 0 0 10px; color: #ccebee; font-size: 1.18rem; }
.scout-panel p { margin: 0 0 6px; max-width: 760px; line-height: 1.6; }
.scout-panel .scout-report { color: #a3eecb; font-weight: 700; }
.controls > button[disabled] { opacity: .52; cursor: default; }
