:root {
  color-scheme: dark;
  font-family: Georgia, "Times New Roman", "Yu Mincho", "Hiragino Mincho ProN", serif;
  background: #0d090e;
  color: #eee6dc;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 75% 10%, rgba(115, 34, 48, 0.28), transparent 32rem),
    linear-gradient(145deg, #100b11 0%, #1b1117 52%, #09070a 100%);
}

button {
  font: inherit;
}

.app-shell {
  width: min(92rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(0.75rem, 2vw, 1.5rem) 0 2rem;
}

.boot-message {
  color: #c6b9ac;
}

.startup-error {
  max-width: 44rem;
  color: #e3a2aa;
  font-family: system-ui, sans-serif;
  line-height: 1.7;
}

.hero {
  display: grid;
  gap: 1rem;
  padding-bottom: clamp(2.5rem, 6vw, 5rem);
  border-bottom: 1px solid rgba(215, 182, 137, 0.22);
}

.eyebrow,
.section-label {
  margin: 0;
  color: #c5a46f;
  font-family: system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
}

h1 {
  margin: 0;
  color: #f2e9dc;
  font-size: clamp(1.35rem, 2.5vw, 2.15rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.035em;
  text-shadow: 0 0 3rem rgba(159, 42, 57, 0.25);
}

.concept {
  max-width: 34rem;
  margin: 0;
  color: #cbbdb0;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.8;
}

.game-header {
  display: grid;
  grid-template-columns: minmax(13rem, 0.85fr) minmax(14rem, 1fr) minmax(28rem, 1.65fr) minmax(10rem, auto);
  align-items: center;
  gap: 1rem 1.5rem;
  min-height: 6.5rem;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(215, 182, 137, 0.24);
  background: rgba(20, 14, 19, 0.9);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.2);
}

.brand-lockup {
  display: grid;
  gap: 0.55rem;
}

.brand-lockup .eyebrow {
  font-size: 0.58rem;
  letter-spacing: 0.18em;
}

.player-identity {
  min-width: 0;
  padding-left: 1.25rem;
  border-left: 1px solid rgba(215, 182, 137, 0.2);
}

.player-identity h2 {
  font-size: 1.25rem;
}

.player-identity > p:last-child {
  margin: 0.45rem 0 0;
  color: #a99b90;
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
}

.player-identity strong {
  color: #e7d6bd;
  font-weight: 600;
}

.command-status {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: rgba(215, 182, 137, 0.18);
}

.command-status div {
  min-height: 3.8rem;
  padding: 0.65rem 0.8rem;
  background: rgba(14, 10, 14, 0.92);
}

.command-status dt {
  color: #8f8278;
  font-family: system-ui, sans-serif;
  font-size: 0.68rem;
}

.command-status dd {
  margin: 0.35rem 0 0;
  color: #eadac5;
  font-size: 0.85rem;
}

.header-utilities {
  display: grid;
  justify-items: end;
  gap: 0.5rem;
  max-width: 16rem;
}

.header-utilities .notice {
  min-height: 0;
  text-align: right;
}

.header-utilities .actions {
  justify-content: flex-end;
}

.header-utilities .actions button {
  min-height: 2.75rem;
  padding: 0.45rem 0.7rem;
  font-family: system-ui, sans-serif;
  font-size: 0.75rem;
}

.operational-layout {
  display: grid;
  grid-template-areas:
    "map decisions"
    "inspector decisions"
    "family decisions";
  grid-template-columns: minmax(32rem, 1.35fr) minmax(31rem, 1fr);
  align-items: start;
  gap: 1rem;
  margin-top: 1rem;
}

.operational-layout > .turn-card {
  grid-area: decisions;
  margin: 0;
}

.base-life-card {
  grid-area: inspector;
  display: grid;
  gap: 1rem;
  min-width: 0;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(215, 182, 137, 0.24);
  background: rgba(20, 14, 19, 0.88);
}

.base-life-heading,
.local-people-heading,
.local-person,
.world-progression-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.base-life-heading h2,
.base-life-card h3,
.base-life-card h4,
.base-life-card p {
  margin: 0;
}

.base-life-heading h2 { font-size: 1.25rem; }
.base-life-heading > p,
.base-life-card p,
.base-life-card dt,
.base-life-card dd {
  color: #b9aca2;
  font-family: system-ui, sans-serif;
  font-size: 0.76rem;
  line-height: 1.55;
}

.base-life-columns {
  display: grid;
  grid-template-columns: minmax(14rem, 0.8fr) minmax(18rem, 1.2fr);
  gap: 1rem;
}

.local-standing,
.local-people { display: grid; gap: 0.75rem; }
.local-standing dl { display: grid; gap: 0.35rem; margin: 0; }
.local-standing dl div { display: flex; justify-content: space-between; gap: 0.75rem; }
.local-standing dd { margin: 0; color: #eadac5; text-align: right; }
.local-people-list { display: grid; gap: 0.5rem; }
.local-person { padding: 0.7rem; border: 1px solid rgba(215, 182, 137, 0.16); background: rgba(14, 10, 14, 0.5); }
.local-person h4 { color: #eadac5; font-size: 0.9rem; }
.local-person .unavailable-reason { color: #d99aa3; }
.approach-button,
.approach-controls button,
.world-progression button,
.world-progression select {
  min-height: 44px;
  border: 1px solid rgba(215, 182, 137, 0.38);
  background: #70414b;
  color: #fff7e8;
  cursor: pointer;
}
.approach-button { flex: 0 0 auto; padding: 0.55rem 0.75rem; }
.approach-button:disabled { cursor: not-allowed; opacity: 0.45; }
.approach-controls { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.approach-controls button { padding: 0.5rem 0.75rem; background: transparent; }
.policy-note { margin-top: -0.35rem !important; }

.world-progression {
  display: grid;
  gap: 1rem;
  padding: 1.15rem;
  border: 1px solid rgba(197, 164, 111, 0.38);
  background: linear-gradient(135deg, rgba(48, 71, 76, 0.42), rgba(20, 14, 19, 0.94));
}
.world-progression ol { display: grid; gap: 0.6rem; margin: 0; padding-left: 1.4rem; }
.world-progression li { animation: world-step-in 500ms ease both; color: #eadac5; }
.world-progression label { display: flex; align-items: center; gap: 0.5rem; font-family: system-ui, sans-serif; font-size: 0.78rem; }
.world-progression select,
.world-progression button { padding: 0.5rem 0.7rem; }
@keyframes world-step-in { from { opacity: 0; transform: translateX(-0.75rem); } to { opacity: 1; transform: none; } }

.family-tree-card {
  grid-area: family;
  display: grid;
  gap: 0.75rem;
  min-width: 0;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(215, 182, 137, 0.24);
  background: rgba(20, 14, 19, 0.88);
}

.family-tree-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.family-tree-heading h2,
.family-tree-card h3,
.family-tree-card p {
  margin: 0;
}

.family-tree-heading h2 {
  color: #eadac5;
  font-size: 1.25rem;
  font-weight: 500;
}

.family-tree-heading > p,
.family-tree-card li {
  color: #b9aca2;
  font-family: system-ui, sans-serif;
  font-size: 0.76rem;
}

.family-couple {
  padding: 0.75rem;
  border-left: 3px solid #b98762;
  background: rgba(112, 65, 75, 0.2);
  color: #f0d4a4;
}

.family-tree-card section {
  display: grid;
  gap: 0.35rem;
}

.family-tree-card h3 {
  color: #d9c9b6;
  font-size: 0.85rem;
}

.family-tree-card ul {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  padding-left: 1.2rem;
}

.imperial-map-card {
  grid-area: map;
  display: grid;
  gap: 1rem;
  min-width: 0;
  padding: 1.15rem;
  border: 1px solid rgba(215, 182, 137, 0.24);
  background: rgba(20, 14, 19, 0.88);
  box-shadow: 0 1.5rem 5rem rgba(0, 0, 0, 0.22);
}

.map-heading,
.map-inspector-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.map-heading h2,
.map-inspector h3 {
  margin: 0.3rem 0 0;
  color: #eadac5;
  font-weight: 500;
}

.map-heading h2 {
  font-size: 1.45rem;
}

.map-scale,
.map-distance {
  margin: 0;
  color: #9d9086;
  font-family: system-ui, sans-serif;
  font-size: 0.72rem;
}

.map-stage {
  position: relative;
  min-height: clamp(20rem, 27vw, 23rem);
  overflow: hidden;
  border: 1px solid rgba(215, 182, 137, 0.28);
  background: #10191c;
  isolation: isolate;
}

.imperial-map {
  display: block;
  width: 100%;
  height: 100%;
  min-height: clamp(20rem, 27vw, 23rem);
}

.map-coast-shadow {
  fill: rgba(10, 8, 10, 0.7);
}

.map-region {
  stroke: rgba(228, 205, 169, 0.52);
  stroke-width: 3;
  transition: filter 160ms ease, stroke 160ms ease;
}

.map-region.is-current {
  stroke: #e4c083;
  stroke-width: 5;
}

.map-region.is-selected {
  filter: brightness(1.13) saturate(1.08) drop-shadow(0 0 9px rgba(221, 186, 126, 0.42));
}

.map-border {
  fill: none;
  stroke: rgba(171, 67, 75, 0.9);
  stroke-width: 6;
  stroke-dasharray: 10 8;
}

.map-road {
  fill: none;
  stroke: rgba(220, 192, 145, 0.52);
  stroke-width: 3;
  stroke-dasharray: 8 5;
}

.map-road--major {
  stroke: rgba(232, 207, 166, 0.76);
  stroke-width: 5;
  stroke-dasharray: none;
}

.map-river {
  fill: none;
  stroke: rgba(89, 150, 164, 0.72);
  stroke-width: 7;
}

.map-mountains path {
  fill: none;
  stroke: rgba(225, 211, 187, 0.32);
  stroke-width: 5;
}

.map-forts {
  fill: rgba(232, 213, 181, 0.66);
  stroke: rgba(36, 25, 29, 0.9);
  stroke-width: 2;
}

.map-water-label,
.map-road-label {
  fill: rgba(224, 211, 193, 0.28);
  font-family: Georgia, serif;
  font-size: 18px;
  letter-spacing: 0.22em;
}

.map-road-label {
  font-size: 13px;
}

.map-region-pin {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 0.15rem;
  min-width: 9rem;
  min-height: 2.75rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(231, 214, 187, 0.58);
  background: rgba(20, 14, 19, 0.88);
  color: #ecdfcd;
  cursor: pointer;
  text-align: left;
  transform: translate(-50%, -50%);
  box-shadow: 0 0.6rem 1.4rem rgba(0, 0, 0, 0.4);
}

.map-region-pin--0 {
  left: 31%;
  top: 59%;
}

.map-region-pin--1 {
  left: 70%;
  top: 33%;
}

.map-region-pin[aria-pressed="true"] {
  border-color: #e0bd85;
  background: rgba(98, 42, 47, 0.92);
}

.map-region-pin.is-current::before {
  content: "";
  position: absolute;
  inset: -0.5rem;
  z-index: -1;
  border: 1px solid rgba(224, 189, 133, 0.72);
  border-radius: 50%;
  animation: map-beacon 2.4s ease-out infinite;
}

.map-region-pin:focus-visible {
  outline: 3px solid #f0c989;
  outline-offset: 3px;
}

.map-pin-kicker {
  color: #cfaa72;
  font-family: system-ui, sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.map-region-pin strong {
  font-size: 0.9rem;
  font-weight: 500;
}

.map-army-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.map-army-token {
  position: absolute;
  display: block;
  max-width: 9rem;
  padding: 0.3rem 0.45rem;
  border: 1px solid rgba(221, 190, 137, 0.75);
  border-radius: 999px;
  background: rgba(27, 22, 20, 0.9);
  color: #f0d8ae;
  font: 700 0.62rem/1.2 system-ui, sans-serif;
  text-align: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 0.3rem 0.8rem rgba(0, 0, 0, 0.45);
}

.map-army-token.is-recent {
  animation: army-arrival 700ms ease-out both;
}

@keyframes army-arrival {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.75); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.map-legend {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  padding: 0.45rem 0.6rem;
  background: rgba(10, 8, 10, 0.74);
  color: #b8aca1;
  font-family: system-ui, sans-serif;
  font-size: 0.62rem;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.legend-swatch,
.legend-line,
.legend-border {
  display: inline-block;
  width: 1.1rem;
  height: 0.45rem;
}

.legend-swatch--current {
  border: 2px solid #e0bd85;
  background: #756447;
}

.legend-line {
  height: 0;
  border-top: 3px solid rgba(232, 207, 166, 0.9);
}

.legend-border {
  height: 0;
  border-top: 3px dashed #ab434b;
}

.map-inspector {
  grid-area: inspector;
  display: grid;
  gap: 0.7rem;
  min-height: 10.2rem;
  padding: 1rem;
  border: 1px solid rgba(215, 182, 137, 0.16);
  background: rgba(14, 10, 14, 0.62);
}

.map-inspector h3 {
  font-size: 1.15rem;
}

.map-distance {
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(215, 182, 137, 0.22);
}

.map-terrain {
  margin: 0;
  color: #a99b90;
  font-family: system-ui, sans-serif;
  font-size: 0.76rem;
}

.map-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: rgba(215, 182, 137, 0.16);
}

.map-facts div {
  padding: 0.65rem 0.75rem;
  background: rgba(20, 14, 19, 0.94);
}

.map-facts dt {
  color: #8f8278;
  font-family: system-ui, sans-serif;
  font-size: 0.66rem;
}

.map-facts dd {
  margin: 0.35rem 0 0;
  color: #ded0bf;
  font-size: 0.8rem;
}

.map-facts dd strong {
  display: block;
  color: #f0d49f;
  font-size: 1.05rem;
}

.map-facts dd span {
  display: block;
  margin-top: 0.15rem;
  color: #91857c;
  font-family: system-ui, sans-serif;
  font-size: 0.62rem;
}

@keyframes map-beacon {
  from {
    opacity: 0.85;
    transform: scale(0.82);
  }
  to {
    opacity: 0;
    transform: scale(1.28);
  }
}

.status-card,
.turn-card {
  display: grid;
  gap: 1.75rem;
  margin: 2rem 0;
  padding: clamp(1.3rem, 4vw, 2.4rem);
  border: 1px solid rgba(215, 182, 137, 0.22);
  border-radius: 0.35rem;
  background: rgba(31, 21, 27, 0.76);
  box-shadow: 0 1.5rem 5rem rgba(0, 0, 0, 0.22);
}

.turn-card {
  background: rgba(20, 14, 19, 0.82);
}

.operational-layout .turn-card {
  gap: 1rem;
  padding: 1.15rem;
}

.operational-layout .delegation-summary {
  grid-template-columns: 1fr;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
}

.operational-layout .delegation-summary > p {
  font-size: 0.7rem;
}

.app-shell[data-phase="completed"] .operational-layout {
  grid-template-columns: 1fr;
}

.app-shell[data-phase="completed"] .imperial-map-card {
  display: none;
}

.app-shell[data-phase="completed"] .map-inspector {
  display: none;
}

.turn-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.turn-number,
.decision-slot,
.selection {
  margin: 0;
  color: #9d9086;
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
}

.decision-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.delegation-summary {
  display: grid;
  grid-template-columns: minmax(12rem, 0.8fr) minmax(18rem, 1.4fr);
  gap: 1rem 2rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid rgba(197, 164, 111, 0.24);
  background: rgba(197, 164, 111, 0.055);
}

.delegation-summary h3 {
  margin: 0.35rem 0 0;
  color: #eadac5;
  font-size: 1.05rem;
  font-weight: 500;
}

.delegation-summary dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
}

.delegation-summary dt {
  color: #8f8278;
  font-family: system-ui, sans-serif;
  font-size: 0.7rem;
}

.delegation-summary dd {
  margin: 0.3rem 0 0;
  color: #d7cab9;
  font-size: 0.9rem;
}

.delegation-summary > p {
  grid-column: 1 / -1;
  margin: 0;
  color: #9d9086;
  font-family: system-ui, sans-serif;
  font-size: 0.76rem;
}

.decision-grid article {
  display: grid;
  align-content: start;
  gap: 0.9rem;
  min-height: 12rem;
  padding: 1.25rem;
  border: 1px solid rgba(215, 182, 137, 0.16);
  background: #141016;
}

.decision-grid h3,
.monthly-report h3 {
  margin: 0;
  color: #eadac5;
  font-size: 1.15rem;
  font-weight: 500;
}

.choice-list {
  display: grid;
  gap: 0.6rem;
}

.choice-button,
.advance-button,
.event-choice-button {
  min-height: 2.8rem;
  padding: 0.7rem 1rem;
  border: 1px solid #806a50;
  border-radius: 0.2rem;
  background: transparent;
  color: #e9ddcc;
  cursor: pointer;
  text-align: left;
}

.choice-button {
  display: grid;
  gap: 0.3rem;
}

.choice-label {
  color: #f0e2d1;
}

.choice-description {
  color: #9d9086;
  font-family: system-ui, sans-serif;
  font-size: 0.72rem;
  line-height: 1.45;
}

.choice-button[aria-pressed="true"] {
  border-color: #d1a66d;
  background: rgba(157, 52, 68, 0.35);
}

.choice-button:focus-visible,
.advance-button:focus-visible,
.event-choice-button:focus-visible {
  outline: 2px solid #e0bd85;
  outline-offset: 2px;
}

.advance-button {
  width: 100%;
  background: #9d3444;
  text-align: center;
}

.choice-button:disabled,
.advance-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.event-decision {
  display: grid;
  gap: 1rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid rgba(196, 82, 97, 0.48);
  border-left: 3px solid #b23c4e;
  background: linear-gradient(135deg, rgba(105, 31, 43, 0.22), rgba(24, 15, 21, 0.9));
}

.event-decision h3 {
  margin: 0;
  color: #f0dfca;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  font-weight: 500;
}

.event-code {
  margin: -0.65rem 0 0;
  color: #8f8278;
  font-family: system-ui, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}

.event-body {
  max-width: 48rem;
  margin: 0;
  color: #cfc0b2;
  line-height: 1.9;
}

.event-chronicle {
  padding: 0.75rem 0.9rem;
  border-left: 2px solid #b28a55;
  background: rgba(178, 138, 85, 0.08);
}

.event-chronicle h3 { font-size: 0.9rem; }
.event-chronicle ul { margin: 0.45rem 0 0; padding-left: 1.2rem; color: #cfc0b2; }

.event-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.event-choice-button {
  background: rgba(157, 52, 68, 0.16);
  text-align: center;
}

.monthly-report {
  padding: 1.2rem;
  border-left: 3px solid #b28a55;
  background: rgba(178, 138, 85, 0.07);
}

.campaign-summary {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid rgba(197, 164, 111, 0.34);
  border-top: 3px solid #b28a55;
  background:
    linear-gradient(145deg, rgba(178, 138, 85, 0.1), rgba(19, 13, 18, 0.94));
}

.campaign-summary-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.campaign-summary-heading h3 {
  margin: 0.35rem 0 0;
  color: #f0dfca;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 500;
}

.campaign-summary-heading > p {
  max-width: 28rem;
  margin: 0;
  color: #9d9086;
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
  line-height: 1.6;
  text-align: right;
}

.summary-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: rgba(215, 182, 137, 0.18);
}

.summary-metrics div {
  padding: 0.9rem;
  background: rgba(18, 13, 18, 0.92);
}

.summary-metrics dt {
  color: #8f8278;
  font-family: system-ui, sans-serif;
  font-size: 0.7rem;
}

.summary-metrics dd {
  margin: 0.35rem 0 0;
  color: #eadac5;
  font-size: 1.15rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.summary-section {
  padding: 1rem;
  border: 1px solid rgba(215, 182, 137, 0.13);
  background: rgba(14, 10, 14, 0.46);
}

.summary-section h4 {
  margin: 0;
  color: #bfa983;
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.summary-section ul,
.summary-section ol {
  margin: 0.8rem 0 0;
  padding-left: 1.25rem;
  color: #cbbdb0;
  line-height: 1.75;
}

.summary-timeline ol {
  display: grid;
  gap: 0.55rem;
}

.monthly-report ul {
  margin: 0.8rem 0 0;
  padding-left: 1.25rem;
  color: #cbbdb0;
  line-height: 1.8;
}

.monthly-report h4 {
  margin: 0;
  color: #bfa983;
  font-family: system-ui, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.report-section {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(215, 182, 137, 0.12);
}

.report-highlights {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(215, 182, 137, 0.28);
  background: rgba(157, 52, 68, 0.12);
}

.report-highlights ul {
  color: #eadac5;
}

h2 {
  margin: 0.3rem 0 0;
  font-size: 1.8rem;
  font-weight: 500;
}

.state-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: rgba(215, 182, 137, 0.18);
}

.state-grid div {
  min-height: 6rem;
  padding: 1rem;
  background: #171016;
}

.state-grid dt {
  color: #9d9086;
  font-family: system-ui, sans-serif;
  font-size: 0.75rem;
}

.state-grid dd {
  margin: 0.7rem 0 0;
  color: #eadac5;
  font-size: 1rem;
}

.notice {
  min-height: 1.5em;
  margin: 0;
  color: #bfb1a6;
  font-family: system-ui, sans-serif;
  font-size: 0.88rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.actions button {
  min-height: 2.8rem;
  padding: 0.7rem 1.1rem;
  border: 1px solid #b28a55;
  border-radius: 0.2rem;
  background: #9d3444;
  color: #fff8ed;
  cursor: pointer;
}

.actions button:hover,
.actions button:focus-visible {
  background: #b23c4e;
  outline: 2px solid #e0bd85;
  outline-offset: 2px;
}

.actions .secondary {
  background: transparent;
  color: #d8cbbb;
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  color: #82776f;
  font-family: system-ui, sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
}

.campaign-setup {
  width: min(100% - 2rem, 72rem);
  margin: 4rem auto;
}

.setup-heading,
.character-select {
  padding: clamp(1.25rem, 3vw, 2.5rem);
  border: 1px solid rgba(215, 182, 137, 0.25);
  background: rgba(24, 20, 24, 0.94);
}

.setup-heading h1,
.setup-heading h2 {
  margin: 0.25rem 0;
}

.character-select {
  margin-top: 1rem;
}

.character-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.character-card {
  display: grid;
  gap: 0.45rem;
  padding: 1.1rem;
  border: 1px solid rgba(215, 182, 137, 0.3);
  background: #211b21;
  color: #eee4d8;
  text-align: left;
  cursor: pointer;
}

.character-card strong {
  color: #f0d4a4;
  font-size: 1.25rem;
}

.character-card:hover,
.character-card:focus-visible {
  border-color: #d8b678;
  outline: 2px solid rgba(216, 182, 120, 0.45);
  outline-offset: 2px;
}

.family-policy {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(215, 182, 137, 0.22);
  background: rgba(36, 28, 32, 0.72);
}

.family-policy h3,
.family-policy p {
  margin: 0.2rem 0;
}

.policy-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.policy-choices button {
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(215, 182, 137, 0.35);
  background: #2d252b;
  color: #e9ded2;
  cursor: pointer;
}

.policy-choices button[aria-pressed="true"] {
  border-color: #d8b678;
  background: #70414b;
  color: #fff7e8;
}

@media (max-width: 760px) {
  .game-header {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .player-identity {
    padding: 0.8rem 0 0;
    border-top: 1px solid rgba(215, 182, 137, 0.2);
    border-left: 0;
  }

  .command-status {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .header-utilities {
    justify-items: stretch;
    max-width: none;
  }

  .header-utilities .notice {
    text-align: left;
  }

  .header-utilities .actions {
    justify-content: flex-start;
  }

  .operational-layout {
    grid-template-areas:
      "map"
      "decisions"
      "inspector"
      "family";
    grid-template-columns: 1fr;
  }

  .map-stage,
  .imperial-map {
    min-height: 16rem;
  }

  .map-region-pin {
    min-width: 7.25rem;
    padding: 0.45rem 0.55rem;
  }

  .map-region-pin strong {
    font-size: 0.76rem;
  }

  .map-legend {
    left: 0.5rem;
    right: auto;
    bottom: 0.5rem;
  }

  .map-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .choice-description {
    font-size: 0.85rem;
  }

  .state-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .decision-grid {
    grid-template-columns: 1fr;
  }

  .delegation-summary {
    grid-template-columns: 1fr;
  }

  .family-policy {
    grid-template-columns: 1fr;
  }

  .base-life-columns { grid-template-columns: 1fr; }

  .delegation-summary dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .event-choices {
    grid-template-columns: 1fr;
  }

  .campaign-summary-heading {
    align-items: start;
    flex-direction: column;
  }

  .campaign-summary-heading > p {
    text-align: left;
  }

  .summary-metrics,
  .summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 440px) {
  .app-shell {
    width: min(100% - 1rem, 92rem);
  }

  .game-header,
  .imperial-map-card,
  .operational-layout .turn-card {
    padding: 0.85rem;
  }

  .map-heading,
  .map-inspector-heading,
  .base-life-heading,
  .local-person,
  .world-progression-controls {
    align-items: start;
    flex-direction: column;
  }

  .map-stage,
  .imperial-map {
    min-height: 14rem;
  }

  .map-facts div,
  .delegation-summary dd {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .map-facts div {
    padding: 0.55rem;
  }

  .map-facts dd {
    font-size: 0.72rem;
  }

  .map-region-pin--0 {
    left: 29%;
    top: 61%;
  }

  .map-region-pin--1 {
    left: 69%;
    top: 31%;
  }

  .state-grid {
    grid-template-columns: 1fr;
  }

  .map-region-pin {
    min-width: 6.6rem;
  }
}

@media (max-width: 1180px) and (min-width: 961px) {
  .game-header {
    grid-template-columns: 1fr 1fr;
  }

  .header-utilities {
    max-width: none;
  }

  .operational-layout {
    grid-template-columns: minmax(28rem, 1.2fr) minmax(27rem, 1fr);
  }
}

@media (max-width: 960px) and (min-width: 761px) {
  .game-header {
    grid-template-columns: 1fr 1fr;
  }

  .header-utilities {
    max-width: none;
  }

  .operational-layout {
    grid-template-areas:
      "map"
      "decisions"
      "inspector"
      "family";
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .map-region-pin.is-current::before {
    animation: none;
  }
  .map-army-token.is-recent {
    animation: none;
  }
  .world-progression li { animation: none; }
}

/* M1.2.1 UX shell: map-first main screen, R/A/B dock and second-level drawers. */
.app-shell:has(.command-main) {
  width: min(92rem, calc(100% - 1rem));
  padding: 0.5rem 0;
}

.compact-game-header {
  grid-template-areas:
    "brand identity status notice"
    "nav nav nav nav";
  grid-template-columns: minmax(11rem, auto) minmax(12rem, 1fr) minmax(25rem, 1.4fr) minmax(12rem, 1fr);
  gap: 0.45rem 1rem;
  min-height: 0;
  padding: 0.6rem 0.8rem;
}
.compact-game-header .brand-lockup { grid-area: brand; gap: 0.25rem; }
.compact-game-header .brand-lockup h1 { font-size: 1.15rem; }
.compact-game-header .player-identity { grid-area: identity; padding-left: 0.8rem; }
.compact-game-header .command-status { grid-area: status; }
.compact-game-header .command-status div { min-height: 2.7rem; padding: 0.42rem 0.55rem; }
.compact-game-header .command-status dd { margin-top: 0.15rem; font-size: 0.76rem; }
.compact-game-header > .notice { grid-area: notice; margin: 0; font-size: 0.72rem; text-align: right; }

.main-navigation {
  grid-area: nav;
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
}
.main-navigation button,
.location-brief button,
.brief-heading button,
.approach-shortcut button,
.menu-actions button,
.drawer-close,
.region-drawer-detail button {
  min-height: 44px;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(215, 182, 137, 0.3);
  background: rgba(35, 26, 31, 0.86);
  color: #e9ddcc;
  cursor: pointer;
}
.main-navigation button { min-height: 36px; padding-block: 0.3rem; font: 0.72rem system-ui, sans-serif; }

.command-main {
  position: relative;
  height: calc(100dvh - 15rem - env(safe-area-inset-bottom));
  min-height: 27rem;
  margin-top: 0.5rem;
}
.map-primary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 21rem);
  gap: 0.65rem;
  height: 100%;
}
.map-primary {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
}
.map-primary > .imperial-map-card,
.map-primary > .map-inspector { grid-area: auto; }
.map-primary .imperial-map-card {
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  padding: 0.75rem;
}
.map-primary .map-stage,
.map-primary .imperial-map {
  min-height: 0;
  height: 100%;
}
.map-primary .map-inspector {
  min-height: 0;
  padding: 0.65rem 0.8rem;
}
.map-primary .map-terrain { display: none; }
.map-primary .map-facts div { padding: 0.45rem 0.55rem; }

.main-brief {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.65rem;
  min-height: 0;
}
.main-brief > section {
  padding: 0.85rem;
  border: 1px solid rgba(215, 182, 137, 0.22);
  background: rgba(20, 14, 19, 0.88);
}
.location-brief,
.change-brief { display: grid; gap: 0.65rem; }
.location-brief h2,
.change-brief h2 { margin: 0; color: #eadac5; font-size: 1rem; }
.location-brief p,
.change-brief li,
.ongoing-brief { color: #b9aca2; font: 0.75rem/1.5 system-ui, sans-serif; }
.location-brief p { margin: 0; }
.brief-heading { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.brief-heading button { min-height: 36px; padding: 0.3rem 0.5rem; font-size: 0.7rem; }
.change-brief ul { display: grid; gap: 0.55rem; margin: 0; padding-left: 1.1rem; }
.ongoing-brief { display: grid; gap: 0.35rem; }
.ongoing-brief strong { color: #eadac5; }

.turn-dock {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 0;
  display: grid;
  grid-template-columns: 6.5rem minmax(11rem, 1fr) minmax(11rem, 1fr) minmax(11rem, 1fr) minmax(15rem, 1.1fr);
  align-items: stretch;
  gap: 0.45rem;
  width: min(92rem, calc(100% - 1rem));
  min-height: 5.4rem;
  padding: 0.55rem 0.65rem calc(0.55rem + env(safe-area-inset-bottom));
  border: 1px solid rgba(215, 182, 137, 0.38);
  border-bottom: 0;
  background: rgba(14, 10, 14, 0.97);
  box-shadow: 0 -1rem 3rem rgba(0, 0, 0, 0.45);
  transform: translateX(-50%);
}
.dock-turn,
.dock-advance { display: grid; align-content: center; gap: 0.25rem; }
.dock-turn span,
.dock-turn strong,
.dock-advance p { margin: 0; font: 0.72rem system-ui, sans-serif; }
.dock-turn strong { color: #d6b77f; }
.dock-advance p { color: #aaa098; }
.dock-slot {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem;
  min-height: 50px;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(215, 182, 137, 0.3);
  background: rgba(35, 26, 31, 0.9);
  color: #cbbeb1;
  cursor: pointer;
  text-align: left;
}
.dock-slot strong { color: #f0dfca; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dock-slot em { color: #d5ad73; font: normal 0.7rem system-ui, sans-serif; }
.dock-slot:disabled { opacity: 0.5; cursor: not-allowed; }
.turn-dock .advance-button { min-height: 50px; }

.drawer-layer,
.required-modal-layer {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  justify-items: end;
  background: rgba(4, 3, 5, 0.68);
}
.detail-drawer {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(38rem, 100%);
  height: 100dvh;
  min-height: 0;
  max-height: 100dvh;
  overflow: hidden;
  border-left: 1px solid rgba(215, 182, 137, 0.35);
  background: #171016;
  box-shadow: -1.5rem 0 4rem rgba(0, 0, 0, 0.5);
}
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(215, 182, 137, 0.2);
}
.drawer-header h2 { margin: 0.2rem 0 0; font-size: 1.35rem; }
.drawer-close { width: 44px; padding: 0; font-size: 1.4rem; }
.drawer-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
}
.drawer-scroll > section { display: grid; gap: 1rem; }
.drawer-lead,
.drawer-empty,
.approach-shortcut p,
.menu-actions + p,
.region-drawer-detail p { margin: 0; color: #b9aca2; font: 0.8rem/1.6 system-ui, sans-serif; }
.drawer-choice-list .choice-button { min-height: 58px; }
.approach-shortcut,
.region-drawer-detail { display: grid; gap: 0.75rem; padding: 1rem; border: 1px solid rgba(215, 182, 137, 0.2); }
.approach-shortcut h3,
.region-drawer-detail h3 { margin: 0; }
.drawer-scroll .base-life-card,
.drawer-scroll .family-tree-card { grid-area: auto; }
.drawer-scroll .base-life-card { padding: 1rem; }
.drawer-scroll .family-tree-card { margin-top: 0; }
.menu-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.menu-speed { display: grid; gap: 0.5rem; color: #b9aca2; font: 0.8rem system-ui, sans-serif; }
.menu-speed select { min-height: 44px; }
.region-drawer-detail dl { display: grid; gap: 1px; margin: 0; background: rgba(215, 182, 137, 0.16); }
.region-drawer-detail dl div { padding: 0.65rem; background: #211820; }
.region-drawer-detail dt { color: #8f8278; font: 0.7rem system-ui, sans-serif; }
.region-drawer-detail dd { margin: 0.3rem 0 0; color: #eadac5; }

.required-modal-layer {
  z-index: 300;
  place-items: center;
  padding: 1rem;
  background: rgba(2, 1, 3, 0.82);
}
.required-modal-layer .event-decision {
  width: min(42rem, 100%);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  background: #21141b;
  box-shadow: 0 2rem 7rem rgba(0, 0, 0, 0.72);
}
.required-modal-layer .event-decision h2 { margin: 0; color: #f0dfca; font-size: 1.6rem; }
.event-choice-button { display: grid; gap: 0.35rem; width: 100%; }
.event-choice-button strong { color: #fff0dc; }
.event-choice-button span { color: #c6ae8c; font: 0.75rem/1.45 system-ui, sans-serif; }
.modal-requirement { margin: 0; color: #a99b90; font: 0.72rem system-ui, sans-serif; }

.command-main .world-progression {
  position: absolute;
  z-index: 50;
  inset: 1rem;
  align-content: center;
  overflow-y: auto;
  background: rgba(14, 24, 27, 0.97);
  box-shadow: 0 1rem 4rem rgba(0, 0, 0, 0.6);
}

@media (max-width: 960px) {
  .compact-game-header {
    grid-template-areas: "brand identity" "status notice" "nav nav";
    grid-template-columns: 1fr 1fr;
  }
  .command-main { height: auto; min-height: calc(100dvh - 13rem); }
  .map-primary-layout { grid-template-columns: 1fr; height: auto; }
  .map-primary { min-height: 32rem; }
  .main-brief { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; }
  .ongoing-brief { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); }
  .turn-dock { grid-template-columns: 5rem 1fr 1fr 1fr minmax(12rem, 1fr); }
}

@media (max-width: 600px) {
  .brief-heading button { min-height: 44px; }
  .app-shell:has(.command-main) { width: calc(100% - 0.5rem); padding-top: 0.25rem; padding-bottom: calc(8.4rem + env(safe-area-inset-bottom)); }
  .compact-game-header {
    grid-template-areas: "brand identity" "status status" "notice notice" "nav nav";
    gap: 0.35rem;
    padding: 0.45rem;
  }
  .compact-game-header .brand-lockup h1 { font-size: 1rem; }
  .compact-game-header .brand-lockup .eyebrow { font-size: 0.5rem; }
  .compact-game-header .player-identity { padding-left: 0.45rem; }
  .compact-game-header .player-identity > p:last-child { font-size: 0.68rem; }
  .compact-game-header .command-status div { min-height: 2.35rem; padding: 0.3rem; }
  .compact-game-header .command-status dt { font-size: 0.58rem; }
  .compact-game-header .command-status dd { font-size: 0.66rem; }
  .compact-game-header > .notice { min-height: 1rem; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .main-navigation { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; }
  .main-navigation button { min-width: 0; min-height: 44px; padding-inline: 0.1rem; font-size: 0.62rem; }
  .command-main { margin-top: 0.25rem; min-height: 26rem; }
  .map-primary { min-height: 24rem; }
  .map-primary .imperial-map-card { padding: 0.45rem; }
  .map-primary .map-heading { align-items: center; flex-direction: row; }
  .map-primary .map-heading h2 { font-size: 1rem; }
  .map-primary .map-heading .section-label,
  .map-primary .map-scale { display: none; }
  .map-primary .map-stage,
  .map-primary .imperial-map { min-height: 15rem; height: 15rem; }
  .map-primary .map-inspector { display: none; }
  .main-brief { grid-template-columns: 1fr; }
  .main-brief > section { padding: 0.65rem; }
  .ongoing-brief { grid-column: auto; grid-template-columns: 1fr; }
  .turn-dock {
    grid-template-areas: "relationship private public" "turn turn advance";
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
    width: calc(100% - 0.5rem);
    min-height: 0;
    padding: 0.4rem 0.4rem calc(0.4rem + env(safe-area-inset-bottom));
  }
  .dock-turn { grid-area: turn; grid-template-columns: auto 1fr; align-items: center; }
  .dock-slot[data-open-drawer="people"] { grid-area: relationship; }
  .dock-slot[data-open-drawer="private"] { grid-area: private; }
  .dock-slot[data-open-drawer="public"] { grid-area: public; }
  .dock-advance { grid-area: advance; grid-template-columns: minmax(0, 1fr); }
  .dock-advance p { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .dock-slot { grid-template-columns: 1fr auto; min-height: 48px; padding: 0.4rem 0.5rem; }
  .dock-slot span { grid-column: 1 / -1; font: 0.65rem system-ui, sans-serif; }
  .dock-slot strong { font-size: 0.76rem; }
  .dock-slot em { font-size: 0.62rem; }
  .turn-dock .advance-button { min-height: 48px; padding: 0.45rem; font-size: 0.78rem; }
  .detail-drawer { width: 100%; border-left: 0; }
  .drawer-scroll { padding: 0.75rem 0.6rem calc(8rem + env(safe-area-inset-bottom)); }
  .base-life-heading,
  .local-person { align-items: start; flex-direction: column; }
  .local-person .approach-button { width: 100%; }
  .command-main .world-progression { inset: 0.25rem; }
}

@media (max-width: 340px) {
  .main-navigation { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .map-primary { min-height: 22rem; }
  .map-primary .map-stage,
  .map-primary .imperial-map { min-height: 13rem; height: 13rem; }
  .dock-turn strong { font-size: 0.65rem; }
}

@media (prefers-reduced-motion: reduce) {
  .detail-drawer,
  .required-modal-layer .event-decision { scroll-behavior: auto; }
}

/* M1.2.2: time-allocation dock, bottom sheets and shared character portraits. */
.navigation-more { display: none; }

.map-primary { grid-template-rows: minmax(0, 1fr); }
.map-primary > .imperial-map-card { grid-area: 1 / 1; }

.turn-dock {
  grid-template-columns: 8.5rem minmax(10rem, 0.95fr) minmax(11rem, 1fr) minmax(14rem, 1.18fr) minmax(13rem, 1fr);
}
.dock-heading {
  color: #f0dfca;
  font-weight: 700 !important;
}
.dock-slot span b {
  display: inline-grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.2rem;
  border: 1px solid rgba(215, 182, 137, 0.45);
  border-radius: 50%;
  color: #e1bd83;
  font-size: 0.7rem;
}
.dock-slot-optional { border-color: rgba(215, 182, 137, 0.46); }

.drawer-layer {
  align-items: end;
  justify-items: center;
}
.detail-drawer {
  width: min(72rem, calc(100% - 1rem));
  height: auto;
  max-height: 70dvh;
  border: 1px solid rgba(215, 182, 137, 0.35);
  border-bottom: 0;
  border-radius: 1.1rem 1.1rem 0 0;
  box-shadow: 0 -1.5rem 5rem rgba(0, 0, 0, 0.58);
  animation: bottom-sheet-enter 220ms ease-out;
  transform-origin: bottom center;
}
@keyframes bottom-sheet-enter {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.drawer-header {
  position: sticky;
  z-index: 2;
  top: 0;
  min-height: 4.6rem;
  padding-top: 1.1rem;
  background: #171016;
}
.sheet-handle {
  position: absolute;
  top: 0.45rem;
  left: 50%;
  width: 3.4rem;
  height: 0.25rem;
  border-radius: 99px;
  background: rgba(221, 196, 161, 0.45);
  transform: translateX(-50%);
}
.drawer-close { flex: 0 0 44px; width: 44px; border-radius: 50%; font-size: 1.6rem; line-height: 1; }
.drawer-scroll { padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }

.details-menu {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}
.details-menu button {
  min-height: 52px;
  border: 1px solid rgba(215, 182, 137, 0.3);
  background: rgba(35, 26, 31, 0.86);
  color: #e9ddcc;
  cursor: pointer;
}

.local-people-list {
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.8rem;
}
.local-person {
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: stretch;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.65rem;
}
.local-person > div:not(.character-portrait) { display: grid; align-content: start; gap: 0.25rem; }
.local-person .approach-button { width: 100%; }
.current-approach {
  padding: 0.65rem 0.75rem;
  border-left: 3px solid #bd8a58;
  background: rgba(157, 52, 68, 0.1);
}
.character-portrait {
  position: relative;
  aspect-ratio: 3 / 4;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(215, 182, 137, 0.22);
  background: linear-gradient(160deg, #392a31, #120e13 70%);
}
.character-portrait img,
.character-portrait-fallback {
  display: block;
  width: 100%;
  height: 100%;
}
.character-portrait img { object-fit: cover; object-position: center 24%; }
.character-portrait-fallback { position: relative; overflow: hidden; }
.portrait-silhouette-head,
.portrait-silhouette-body {
  position: absolute;
  left: 50%;
  border: 1px solid rgba(226, 199, 161, 0.25);
  background: linear-gradient(145deg, #7c6870, #30262d);
  transform: translateX(-50%);
}
.portrait-silhouette-head {
  top: 18%;
  width: 34%;
  aspect-ratio: 0.82;
  border-radius: 48% 48% 44% 44%;
}
.portrait-silhouette-body {
  bottom: -12%;
  width: 78%;
  height: 55%;
  border-radius: 48% 48% 0 0;
}

.report-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
  color: #d9c5aa;
  cursor: pointer;
}
.report-section summary small { color: #9d9086; font: 0.72rem system-ui, sans-serif; }
.report-section:not([open]) ul { display: none; }

@media (min-width: 841px) and (max-width: 960px) {
  .command-main { height: calc(100dvh - 18rem - env(safe-area-inset-bottom)); min-height: 24rem; }
  .map-primary-layout { grid-template-columns: minmax(0, 1fr) minmax(16rem, 18rem); height: 100%; }
  .map-primary { min-height: 0; }
  .main-brief { display: grid; grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr) auto; }
  .ongoing-brief { grid-column: auto; grid-template-columns: 1fr; }
  .turn-dock { grid-template-columns: 6.5rem minmax(8rem, 0.9fr) minmax(9rem, 1fr) minmax(11rem, 1.15fr) minmax(10rem, 1fr); }
}

@media (max-width: 840px) {
  .map-primary-layout { grid-template-columns: 1fr; height: auto; }
  .command-main { height: auto; }
}

@media (max-width: 600px) {
  .app-shell:has(.command-main) { padding-bottom: calc(7.1rem + env(safe-area-inset-bottom)); }
  .turn-dock {
    grid-template-areas: "public private relationship" "turn turn advance";
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: 0;
  }
  .dock-slot[data-open-drawer="public"] { grid-area: public; }
  .dock-slot[data-open-drawer="private"] { grid-area: private; }
  .dock-slot[data-open-drawer="people"] { grid-area: relationship; }
  .dock-heading { display: none; }
  .dock-turn,
  .dock-advance { min-width: 0; }
  .dock-advance .advance-button { width: 100%; min-width: 0; }
  .dock-slot { min-width: 0; min-height: 44px; overflow: hidden; padding: 0.3rem 0.38rem; line-height: 1.1; }
  .dock-slot em { display: none; }
  .detail-drawer { width: 100%; max-height: 82dvh; border-inline: 0; }
  .drawer-scroll { padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
  .local-people-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
  .local-person { align-items: stretch; padding: 0.5rem; }
  .local-person > div:not(.character-portrait) { width: 100%; }
  .details-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 440px) {
  .compact-game-header {
    grid-template-areas: "brand identity" "status status" "notice nav";
    max-height: 8.75rem;
    overflow: hidden;
  }
  .compact-game-header .command-status { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .compact-game-header .command-status > div:nth-child(3) { display: none; }
  .compact-game-header .main-navigation > button:not(.navigation-more) { display: none; }
  .compact-game-header .main-navigation { display: block; }
  .compact-game-header .navigation-more { display: block; width: 100%; min-height: 44px; }
  .compact-game-header > .notice { align-self: center; }
}

@media (max-width: 340px) {
  .app-shell:has(.command-main) { padding-bottom: calc(6.7rem + env(safe-area-inset-bottom)); }
  .command-main { min-height: 20rem; }
  .map-primary { min-height: 19rem; }
  .map-primary .map-stage,
  .map-primary .imperial-map { min-height: 11.5rem; height: 11.5rem; }
  .main-brief { margin-bottom: 0.5rem; }
  .turn-dock { gap: 0.2rem; width: 100%; padding: 0.25rem 0.25rem calc(0.25rem + env(safe-area-inset-bottom)); }
  .dock-slot { min-height: 44px; padding: 0.22rem 0.28rem; }
  .dock-slot span { font-size: 0.58rem; }
  .dock-slot span b { width: 1rem; height: 1rem; font-size: 0.58rem; }
  .dock-slot strong { font-size: 0.66rem; }
  .dock-slot em { display: none; }
  .dock-turn span[data-dock="turn"] { display: none; }
  .dock-turn strong { font-size: 0.62rem; }
  .turn-dock .advance-button { min-height: 44px; font-size: 0.72rem; }
  .local-people-list { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .detail-drawer { animation: none; }
}

/* M1.2.3: completion feedback, compact people cards and imperial world map. */
.map-view,
.map-view > .imperial-map-card {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.map-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
}
.map-heading-actions button {
  min-height: 44px;
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(215, 182, 137, 0.32);
  background: rgba(35, 26, 31, 0.9);
  color: #eadac5;
  cursor: pointer;
}

.world-map-stage { background: #07161c; }
.imperial-world-map { min-height: 0; }
.world-map-area {
  stroke: rgba(231, 211, 178, 0.48);
  stroke-width: 3;
  transition: filter 160ms ease, stroke 160ms ease;
}
.world-map-area--imperial { fill: #65434b; }
.world-map-area--allied { fill: #746343; }
.world-map-area--hostile { fill: #592f33; }
.world-map-area--unknown { fill: #4d5250; }
.world-map-area.is-current {
  stroke: #f2c56d;
  stroke-width: 8;
  filter: drop-shadow(0 0 12px rgba(242, 197, 109, 0.6));
}
.world-map-area.is-selected:not(.is-current) {
  stroke: #e5d5bc;
  stroke-width: 6;
  filter: brightness(1.14);
}
.world-map-roads path {
  fill: none;
  stroke: rgba(239, 207, 145, 0.75);
  stroke-width: 4;
}
.world-map-sea-routes path {
  fill: none;
  stroke: rgba(177, 207, 201, 0.48);
  stroke-width: 3;
  stroke-dasharray: 10 9;
}
.world-city {
  fill: #e8c980;
  stroke: #2a1920;
  stroke-width: 3;
}
.world-city--capital path { fill: none; stroke: #f3d794; stroke-width: 4; }
.world-city--capital circle { fill: rgba(70, 35, 43, 0.88); stroke: #f3d794; stroke-width: 3; }
.world-map-area-label,
.world-map-capital-label,
.world-map-water-label {
  fill: rgba(241, 224, 193, 0.78);
  font-family: system-ui, sans-serif;
  font-size: 17px;
  font-weight: 700;
  paint-order: stroke;
  stroke: rgba(18, 12, 15, 0.85);
  stroke-width: 4px;
}
.world-map-water-label {
  fill: rgba(174, 204, 201, 0.38);
  font-family: Georgia, serif;
  font-size: 23px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.2em;
}
.world-map-capital-label { fill: #f1d59c; font-size: 16px; }
.world-area-button {
  position: absolute;
  z-index: 4;
  min-width: 44px;
  min-height: 44px;
  padding: 0.32rem 0.55rem;
  border: 1px solid rgba(232, 211, 176, 0.55);
  border-radius: 999px;
  background: rgba(19, 15, 18, 0.84);
  color: #eadcc7;
  font: 0.68rem system-ui, sans-serif;
  white-space: nowrap;
  cursor: pointer;
  transform: translate(-50%, -50%);
}
.world-area-button.is-current {
  border: 3px solid #f3c96f;
  color: #fff0c8;
  box-shadow: 0 0 0 4px rgba(243, 201, 111, 0.16), 0 0 18px rgba(243, 201, 111, 0.42);
}
.world-area-button.is-current::before { content: "現在地 · "; font-weight: 800; }
.world-area-button[aria-pressed="true"] { outline: 2px solid rgba(244, 226, 194, 0.76); outline-offset: 2px; }
.world-army-marker {
  position: absolute;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(239, 214, 164, 0.72);
  border-radius: 50%;
  background: #512c36;
  color: #f4d894;
  transform: translate(-50%, -50%);
}
.world-army-marker.is-recent { box-shadow: 0 0 0 5px rgba(224, 174, 95, 0.2); }
.world-map-legend {
  position: absolute;
  z-index: 3;
  right: 0.55rem;
  bottom: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem 0.7rem;
  max-width: calc(100% - 1rem);
  padding: 0.35rem 0.5rem;
  background: rgba(7, 11, 14, 0.76);
  color: #c5b8a7;
  font: 0.64rem system-ui, sans-serif;
}
.world-map-legend span { display: inline-flex; align-items: center; gap: 0.25rem; }
.world-legend { width: 0.8rem; height: 0.8rem; border: 1px solid rgba(240, 222, 191, 0.55); }
.world-legend.imperial { background: #65434b; }
.world-legend.allied { background: #746343; }
.world-legend.hostile { background: #592f33; }
.world-legend.unknown { background: #4d5250; }

.dock-toast {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.45rem);
  width: min(36rem, calc(100vw - 1rem));
  margin: 0;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(232, 199, 137, 0.5);
  background: rgba(27, 19, 24, 0.98);
  color: #f1dfc7;
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.4);
  font: 0.8rem system-ui, sans-serif;
  text-align: center;
  transform: translateX(-50%);
}
.dock-slot { position: relative; }
.dock-slot small[data-dock-recommended] {
  color: #e1bd83;
  font: 0.61rem system-ui, sans-serif;
  white-space: nowrap;
}
.dock-slot.is-complete > span::before { content: "✓ "; color: #d9c078; font-weight: 800; }
.dock-slot.is-next {
  border-color: #d8b678;
  box-shadow: inset 0 0 0 1px rgba(216, 182, 120, 0.35), 0 0 16px rgba(216, 182, 120, 0.14);
}
.optional-badge {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.1rem 0.3rem;
  border: 1px solid rgba(215, 182, 137, 0.36);
  border-radius: 99px;
  color: #cdb791;
  font: 0.58rem system-ui, sans-serif;
}
.person-card-badges { display: flex !important; flex-wrap: wrap; gap: 0.3rem; }
.person-badge {
  padding: 0.14rem 0.38rem;
  border-radius: 99px;
  font: 0.62rem system-ui, sans-serif;
}
.person-badge-current { background: #745538; color: #ffe2a4; }
.person-badge-unavailable { background: #49383e; color: #d4c8c4; }
.local-person.is-current-target { border-color: rgba(226, 184, 111, 0.65); }
.local-person.is-unavailable { opacity: 0.68; }

@media (max-width: 600px) {
  .world-map-legend { display: none; }
  .world-map-area-label--minor,
  .world-map-water-label--minor { display: none; }
  .world-map-area-label { font-size: 21px; }
  .world-area-button[data-priority="minor"] {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
  }
  .world-area-button[data-priority="minor"]::after {
    width: 0.55rem;
    height: 0.55rem;
    border: 1px solid rgba(235, 212, 172, 0.72);
    border-radius: 50%;
    background: rgba(71, 53, 55, 0.9);
    content: "";
  }
  .world-area-button[data-priority="minor"]:focus-visible::after {
    outline: 2px solid #f1ca83;
    outline-offset: 3px;
  }
  .world-area-button[data-priority="minor"] span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .dock-slot small[data-dock-recommended] { display: none; }
}

@media (max-width: 340px) {
  .compact-game-header {
    grid-template-areas: "brand identity" "status status" "nav nav";
    max-height: 8.75rem;
  }
  .compact-game-header > .notice { display: none; }
  .world-map-area-label--minor,
  .world-map-capital-label { display: none; }
  .world-map-area-label--major,
  .world-map-area-label--current { font-size: 23px; }
  .world-map-water-label--major { font-size: 24px; }
  .world-area-button { font-size: 0.58rem; }
  .world-area-button.is-current { min-width: 70px; }
  .map-heading-actions .map-scale { display: none; }
  .map-heading-actions button { min-height: 44px; padding-inline: 0.45rem; font-size: 0.65rem; }
  .turn-dock {
    grid-template-rows: 48px 44px;
    min-height: 0;
  }
  .dock-slot {
    height: 48px;
    min-height: 48px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 1rem 1rem;
    align-content: center;
    gap: 0.08rem;
    padding: 0.1rem 0.25rem;
  }
  .dock-slot > span {
    grid-column: 1;
    overflow: hidden;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .dock-slot strong {
    overflow: hidden;
    font-size: 0;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .dock-slot strong::after { content: attr(data-compact-label); font-size: 0.66rem; }
  .dock-slot-optional > span { padding-right: 1.65rem; }
  .optional-badge {
    position: absolute;
    top: 0.18rem;
    right: 0.2rem;
    margin: 0;
    font-size: 0.48rem;
    padding: 0.03rem 0.18rem;
  }
  .local-people-list { grid-template-columns: 1fr; }
  .local-person {
    grid-template-areas: "portrait details" "portrait action";
    grid-template-columns: 5.1rem minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: stretch;
    min-height: 7.4rem;
    gap: 0.4rem 0.55rem;
    padding: 0.45rem;
  }
  .local-person > .character-portrait { grid-area: portrait; width: 5.1rem; height: 6.8rem; align-self: start; }
  .local-person > .local-person-details { grid-area: details; min-width: 0; }
  .local-person > .approach-button { grid-area: action; min-height: 44px; padding: 0.35rem; font-size: 0.7rem; }
  .local-person h4 { font-size: 0.82rem; }
  .local-person p { font-size: 0.67rem; line-height: 1.35; }
  .person-badge { font-size: 0.55rem; }
}

@media (prefers-reduced-motion: reduce) {
  .world-map-area,
  .world-area-button { transition: none; }
}

/* M1.3: geographic imperial map and public legion information layer. */
.imperial-world-map-card {
  background: #24373a;
  color: #e9dfc9;
}
.world-map-heading { gap: 0.75rem; }
.world-map-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}
.world-map-modes {
  display: flex;
  gap: 0.2rem;
  padding: 0.18rem;
  border: 1px solid rgba(234, 219, 185, 0.3);
  border-radius: 0.35rem;
  background: rgba(18, 33, 36, 0.82);
}
.world-map-modes button {
  min-width: 3.2rem;
  min-height: 36px;
  padding: 0.25rem 0.5rem;
  border: 0;
  background: transparent;
  color: #c7c9bd;
  font: 0.7rem system-ui, sans-serif;
}
.world-map-modes button[aria-pressed="true"] {
  background: #76503d;
  color: #fff0cc;
  box-shadow: inset 0 0 0 1px rgba(246, 216, 150, 0.55);
}
.world-map-stage { background: #416a72; }
.imperial-world-map { display: block; width: 100%; height: 100%; }
.world-land {
  stroke: rgba(69, 59, 46, 0.7);
  stroke-width: 3;
}
.world-land--temperate,
.world-land--islands { fill: url(#world-land-temperate); }
.world-land--arid { fill: url(#world-land-arid); }
.world-terrain-deserts path { fill: url(#world-desert-dots); stroke: rgba(119, 88, 55, 0.15); }
.world-terrain-forests path { fill: rgba(55, 91, 61, 0.35); stroke: rgba(42, 71, 47, 0.45); stroke-width: 2; }
.world-terrain-mountains path {
  fill: none;
  stroke: rgba(91, 78, 63, 0.72);
  stroke-width: 8;
  stroke-linejoin: round;
}
.world-terrain-rivers path {
  fill: none;
  stroke: rgba(72, 121, 132, 0.74);
  stroke-width: 4;
}
.world-terrain-escarpments path {
  fill: none;
  stroke: rgba(93, 76, 57, 0.52);
  stroke-width: 4;
  stroke-dasharray: 3 7;
}
.world-terrain-passes circle { fill: #d3bd89; stroke: #695941; stroke-width: 2; }
.world-terrain-passes path { stroke: #5f4f3b; stroke-width: 3; }
.world-map-affiliation {
  fill-opacity: 0.07;
  stroke: none;
  transition: fill-opacity 160ms ease;
}
.world-map-affiliation--imperial { fill: #7c2335; }
.world-map-affiliation--allied { fill: #a07b27; }
.world-map-affiliation--hostile { fill: #7c1e1e; }
.world-map-affiliation--unknown { fill: #555b58; }
[data-world-map-mode="faction"] .world-map-affiliation { fill-opacity: 0.28; }
[data-world-map-mode="legion"] .world-map-affiliation { fill-opacity: 0.04; }
.world-map-borders path,
.world-map-imperial-border path {
  fill: none;
  pointer-events: none;
}
.world-map-borders path {
  stroke: rgba(83, 67, 50, 0.64);
  stroke-width: 3;
  stroke-dasharray: 9 7;
}
.world-map-imperial-border path {
  stroke: rgba(116, 34, 49, 0.92);
  stroke-width: 5;
  stroke-dasharray: 13 7;
}
[data-world-map-mode="faction"] .world-map-imperial-border path {
  stroke: #7e1f35;
  stroke-width: 8;
}
.world-map-roads path {
  fill: none;
  stroke: rgba(235, 202, 123, 0.82);
  stroke-width: 4;
  stroke-linecap: round;
}
.world-map-sea-routes path {
  fill: none;
  stroke: rgba(224, 238, 222, 0.62);
  stroke-width: 3;
  stroke-dasharray: 10 9;
}
[data-world-map-mode="faction"] .world-map-roads,
[data-world-map-mode="faction"] .world-map-sea-routes { opacity: 0.45; }
[data-world-map-mode="legion"] .world-map-roads { stroke-width: 5; }
.world-map-region-hit {
  fill: transparent;
  stroke: transparent;
  stroke-width: 4;
  cursor: pointer;
  pointer-events: all;
  transition: fill 150ms ease, stroke 150ms ease, filter 150ms ease;
}
.world-map-region-hit:hover { fill: rgba(255, 246, 211, 0.1); stroke: rgba(255, 239, 198, 0.52); }
.world-map-region-hit:focus-visible { outline: none; stroke: #fff0b7; stroke-width: 8; }
.world-map-region-hit.is-selected { stroke: #f4e2ac; stroke-width: 7; filter: drop-shadow(0 0 7px rgba(255, 232, 168, 0.5)); }
.world-map-region-hit.is-current { stroke: #f4c45f; stroke-width: 9; filter: drop-shadow(0 0 10px rgba(242, 188, 72, 0.7)); }
.world-city { fill: #6f2636; stroke: #f4d68e; stroke-width: 3; }
.world-city path { fill: none; stroke: #f4d68e; stroke-width: 3; }
.world-city--capital path { fill: none; stroke: #f6d98f; stroke-width: 4; }
.world-city--capital circle { fill: rgba(105, 37, 50, 0.9); stroke: #f6d98f; stroke-width: 3; }
.world-map-area-label,
.world-map-capital-label,
.world-map-water-label,
.world-map-culture-label {
  fill: rgba(47, 43, 35, 0.8);
  font-family: system-ui, sans-serif;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: 0.035em;
  paint-order: stroke;
  stroke: rgba(221, 212, 179, 0.78);
  stroke-width: 4px;
  pointer-events: none;
}
.world-map-water-label {
  fill: rgba(224, 239, 235, 0.5);
  font-family: Georgia, serif;
  font-size: 23px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.2em;
  stroke: rgba(39, 79, 87, 0.35);
}
.world-map-culture-label { fill: rgba(70, 63, 50, 0.38); font-size: 25px; letter-spacing: 0.16em; }
.world-map-capital-label { fill: #6f2636; font-size: 17px; stroke: rgba(241, 216, 159, 0.9); }
.world-map-area-label.is-selected { fill: #3c251c; font-size: 19px; }
.world-map-area-label.is-current { fill: #6c321f; font-size: 19px; }
.world-current-marker circle {
  fill: rgba(105, 49, 31, 0.18);
  stroke: #ffd879;
  stroke-width: 7;
}
.world-current-marker path { fill: none; stroke: #5f2d1f; stroke-width: 5; stroke-linecap: round; }
.world-current-marker text {
  fill: #57301e;
  font: 800 18px system-ui, sans-serif;
  paint-order: stroke;
  stroke: #f7df9a;
  stroke-width: 5px;
}
.world-map-armies { position: absolute; inset: 0; pointer-events: none; }
.world-legion-marker {
  position: absolute;
  z-index: 7;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid #d2a85d;
  border-radius: 0.28rem;
  background: #70263a;
  color: #ffe3a2;
  box-shadow: 0 2px 7px rgba(29, 20, 15, 0.45);
  font: 800 0.68rem Georgia, serif;
  pointer-events: auto;
  cursor: pointer;
  transform: translate(-50%, -50%);
}
.world-legion-marker::before {
  position: absolute;
  top: -7px;
  width: 14px;
  height: 8px;
  border: 1px solid #d2a85d;
  background: #70263a;
  content: "";
}
.world-legion-marker.is-player-formation { border: 4px solid #ffd56b; box-shadow: 0 0 0 4px rgba(255, 213, 107, 0.28), 0 0 18px rgba(255, 213, 107, 0.58); }
.world-legion-marker.is-engaged { background: #9c2525; }
.world-legion-marker.is-moving { border-style: dashed; }
.world-legion-marker.is-recent { animation: legion-recent 1.8s ease-in-out 2; }
.world-legion-marker--cluster { border-radius: 50%; font-family: system-ui, sans-serif; }
[data-world-map-mode="faction"] .world-legion-marker:not(.is-player-formation) { opacity: 0.72; }
[data-world-map-mode="legion"] .world-legion-marker { transform: translate(-50%, -50%) scale(1.08); }
@keyframes legion-recent { 50% { box-shadow: 0 0 0 8px rgba(226, 169, 76, 0.28), 0 0 22px rgba(226, 169, 76, 0.55); } }
.world-map-legend { background: rgba(27, 48, 50, 0.84); color: #eee1c5; }
.world-legend.terrain { background: #a9aa89; }
.world-legend.border { border: 2px dashed #8a2a3b; background: transparent; }
.world-legend.road { background: #e5c47d; }
.world-legend.legion { background: #70263a; }
.legion-drawer-detail,
.legion-cluster-list { display: grid; gap: 0.8rem; }
.legion-drawer-detail h3 { margin: 0; }
.legion-short-label { margin: 0; color: #e0bd72; font: 800 1rem Georgia, serif; }
.legion-drawer-detail dl { display: grid; gap: 1px; margin: 0; background: rgba(215, 182, 137, 0.16); }
.legion-drawer-detail dl div { padding: 0.65rem; background: #211820; }
.legion-drawer-detail dt { color: #8f8278; font: 0.7rem system-ui, sans-serif; }
.legion-drawer-detail dd { margin: 0.3rem 0 0; color: #eadac5; }
.legion-drawer-detail > p:last-child { color: #b9aca2; font: 0.8rem/1.6 system-ui, sans-serif; }
.legion-cluster-list > div { display: grid; gap: 0.5rem; }
.legion-cluster-choice { min-height: 44px; text-align: left; }

@media (max-width: 600px) {
  .app-shell:has(.command-main) { padding-bottom: calc(6.9rem + env(safe-area-inset-bottom)); }
  .map-primary { min-height: 0; }
  .map-view,
  .map-view > .imperial-map-card { height: auto; }
  .world-map-heading { align-items: center; }
  .world-map-controls { gap: 0; }
  .world-map-controls .map-scale { display: none; }
  .world-map-modes button { min-width: 2.85rem; min-height: 44px; padding-inline: 0.35rem; font-size: 0.65rem; }
  .world-map-area-label,
  .world-map-culture-label,
  .world-map-city-label,
  .world-city[data-priority="minor"] { display: none; }
  .world-map-area-label.is-selected:not(.is-current) { display: block; font-size: 22px; }
  .world-map-water-label--minor { display: none; }
  .world-map-water-label--major { font-size: 23px; }
  .world-map-capital-label { display: block; font-size: 19px; }
  .world-current-marker text { font-size: 21px; }
  .world-map-legend { display: none; }
  .world-legion-marker.is-player-formation { margin: 1rem 0 0 1.9rem; }
  .turn-dock {
    grid-template-areas: "public private relationship" "turn turn advance";
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: 48px 44px;
    height: calc(104px + env(safe-area-inset-bottom));
    min-height: 104px;
    max-height: calc(110px + env(safe-area-inset-bottom));
    gap: 0.2rem;
    padding: 0.25rem 0.3rem calc(0.25rem + env(safe-area-inset-bottom));
    overflow: visible;
  }
  .dock-slot[data-open-drawer="public"] { grid-area: public; }
  .dock-slot[data-open-drawer="private"] { grid-area: private; }
  .dock-slot[data-open-drawer="people"] { grid-area: relationship; }
  .dock-slot {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 1rem 1rem;
    align-content: center;
    height: 48px;
    min-height: 48px;
    gap: 0.08rem;
    padding: 0.1rem 0.3rem;
  }
  .dock-slot > span { grid-column: 1; overflow: hidden; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
  .dock-slot strong { overflow: hidden; font-size: 0.69rem; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
  .dock-slot strong::after { content: none; }
  .dock-turn { grid-area: turn; grid-template-columns: auto minmax(0, 1fr); min-height: 44px; }
  .dock-turn span[data-dock="turn"] { display: none; }
  .dock-turn strong { font-size: 0.68rem; }
  .dock-advance { grid-area: advance; min-height: 44px; }
  .dock-advance .advance-button { min-height: 44px; }
  .dock-advance p { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .optional-badge { font-size: 0.48rem; padding: 0.03rem 0.18rem; }
}

@media (max-width: 440px) {
  .compact-game-header {
    grid-template-areas: "brand identity" "status status" "nav nav";
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: 42px 42px 44px;
    align-items: stretch;
    height: 140px;
    max-height: 140px;
    gap: 2px 0.35rem;
    padding: 0.35rem 0.45rem;
    overflow: visible;
  }
  .compact-game-header .brand-lockup,
  .compact-game-header .player-identity { min-width: 0; align-self: center; overflow: hidden; }
  .compact-game-header .brand-lockup h1,
  .compact-game-header .player-identity p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .compact-game-header .command-status { grid-template-columns: repeat(3, minmax(0, 1fr)); height: 42px; }
  .compact-game-header .command-status > div { min-height: 42px; padding: 0.2rem 0.3rem; }
  .compact-game-header .command-status > div:nth-child(3) { display: none; }
  .compact-game-header > .notice { display: none; }
  .compact-game-header .main-navigation { display: block; height: 44px; overflow: visible; }
  .compact-game-header .main-navigation > button:not(.navigation-more) { display: none; }
  .compact-game-header .navigation-more { display: block; width: 100%; height: 44px; min-height: 44px; }
  .map-primary .map-heading .section-label,
  .map-primary .map-heading .map-scale { display: none; }
}

@media (max-width: 340px) {
  .map-primary .map-stage,
  .map-primary .imperial-map { min-height: 11.5rem; height: 11.5rem; }
  .world-map-heading h2 { font-size: 0.95rem; }
  .world-map-modes button { min-width: 2.45rem; padding-inline: 0.2rem; font-size: 0.6rem; }
  .world-map-capital-label { font-size: 20px; }
  .world-map-area-label.is-selected:not(.is-current) { font-size: 20px; }
  .world-current-marker text { font-size: 22px; }
  .world-legion-marker { width: 44px; height: 44px; font-size: 0.62rem; }
  .world-legion-marker.is-player-formation { margin: 0.9rem 0 0 1.65rem; }
  .dock-slot strong { font-size: 0.64rem; }
}

@media (prefers-reduced-motion: reduce) {
  .world-map-affiliation,
  .world-map-region-hit { transition: none; }
  .world-legion-marker.is-recent { animation: none; }
}

/* M1.4: in-world imperial campaign map, public sites and restrained ink symbols. */
.antique-map-card {
  border-color: #8b6847;
  background: #4a3326;
  color: #ead9b6;
  box-shadow: 0 1rem 2.8rem rgba(10, 6, 4, 0.32), inset 0 0 0 1px rgba(233, 208, 159, 0.12);
}
.antique-map-card .world-map-heading {
  color: #ead9b6;
  font-family: Georgia, "Times New Roman", serif;
}
.antique-map-card .world-map-heading h2 { color: #f1dfbd; letter-spacing: 0.05em; }
.antique-map-card .world-map-heading .section-label,
.antique-map-card .map-scale { color: #c5ab7e; }
.antique-map-card .world-map-stage {
  border: 2px solid #765239;
  background: #82918b;
  box-shadow: inset 0 0 2.5rem rgba(60, 35, 22, 0.36);
}
.antique-map-card .world-map-modes {
  gap: 0;
  padding: 0;
  border: 1px solid #7b5b3e;
  border-radius: 0.16rem 0.16rem 0 0;
  background: #c9b17f;
  box-shadow: 0 2px 0 #4f3425, inset 0 0 0 1px rgba(248, 226, 180, 0.4);
}
.antique-map-card .world-map-modes button {
  position: relative;
  min-width: 3.25rem;
  border-right: 1px solid rgba(94, 63, 39, 0.42);
  color: #4d3425;
  font-family: Georgia, "Yu Mincho", serif;
  letter-spacing: 0.05em;
}
.antique-map-card .world-map-modes button:last-child { border-right: 0; }
.antique-map-card .world-map-modes button[aria-pressed="true"] {
  background: #8f6448;
  color: #fff0cc;
  box-shadow: inset 0 -3px 0 #d3b26f;
}
.antique-map-card .world-map-modes button:focus-visible {
  outline: 3px solid #fff0b8;
  outline-offset: 2px;
}
.world-land {
  stroke: #49372a;
  stroke-width: 2.2;
}
.world-coast-ink {
  fill: none;
  stroke: rgba(44, 31, 23, 0.68);
  stroke-width: 5;
  stroke-linejoin: round;
  pointer-events: none;
}
.world-land--temperate,
.world-land--islands { fill: url(#world-land-temperate); }
.world-land--arid { fill: url(#world-land-arid); }
.world-paper-fibers { opacity: 0.82; mix-blend-mode: multiply; }
.world-paper-grain { opacity: 0.65; mix-blend-mode: multiply; }
.world-paper-vignette { mix-blend-mode: multiply; }
.world-map-frame {
  fill: none;
  stroke: rgba(72, 46, 30, 0.82);
  stroke-width: 3;
  stroke-dasharray: 2 2;
}
.world-map-affiliation { fill-opacity: 0.035; }
[data-world-map-mode="faction"] .world-map-affiliation { fill-opacity: 0.2; }
[data-world-map-mode="legion"] .world-map-affiliation { fill-opacity: 0.025; }
.world-map-borders path {
  stroke: rgba(76, 56, 39, 0.58);
  stroke-width: 2.2;
  stroke-dasharray: 5 6;
}
.world-map-imperial-border path {
  stroke: rgba(112, 38, 42, 0.84);
  stroke-width: 3.2;
  stroke-dasharray: 12 5 2 5;
}
[data-world-map-mode="faction"] .world-map-imperial-border path {
  stroke: #762f37;
  stroke-width: 4.6;
}
.world-map-roads path {
  stroke: rgba(91, 58, 35, 0.74);
  stroke-width: 2.4;
  stroke-dasharray: none;
}
.world-map-roads .world-road--major { stroke-width: 3.4; }
.world-map-roads .world-road--minor { stroke-width: 2; stroke-dasharray: 4 3; }
[data-world-map-mode="legion"] .world-map-roads { stroke-width: 3.6; }
.world-map-sea-routes path {
  stroke: rgba(235, 223, 193, 0.52);
  stroke-width: 2;
  stroke-dasharray: 3 7;
}
.world-desert-wash { fill: rgba(184, 145, 82, 0.16); stroke: none; }
.world-dune path { fill: none; stroke: rgba(104, 72, 42, 0.55); stroke-width: 1.8; }
.world-dune circle { fill: rgba(89, 58, 35, 0.46); }
.world-tree path:first-child { fill: rgba(73, 91, 58, 0.36); stroke: #45533b; stroke-width: 1.4; }
.world-tree--dense path:first-child { fill: rgba(52, 79, 50, 0.45); }
.world-tree-trunk { fill: none; stroke: #574634; stroke-width: 1.5; }
.world-mountain-outline { fill: rgba(112, 92, 68, 0.16); stroke: #5e4b38; stroke-width: 2; }
.world-mountain-hatch { fill: none; stroke: rgba(78, 57, 41, 0.65); stroke-width: 1.3; }
.world-mountain--hill { opacity: 0.65; }
.world-terrain-rivers path {
  fill: none;
  stroke: rgba(83, 111, 112, 0.76);
  stroke-linecap: round;
}
.world-terrain-rivers .world-river--major { stroke-width: 3; }
.world-terrain-rivers .world-river--minor { stroke-width: 1.8; }
.world-terrain-escarpments path { stroke: rgba(92, 65, 43, 0.43); stroke-width: 2.2; stroke-dasharray: 2 6; }
.world-terrain-passes circle { fill: #c5a86f; stroke: #58442f; stroke-width: 1.5; }
.world-terrain-passes path { stroke: #58442f; stroke-width: 2; }
.world-map-region-hit { stroke-width: 2; }
.world-map-region-hit:hover { fill: rgba(228, 201, 143, 0.12); stroke: rgba(87, 59, 38, 0.72); }
.world-map-region-hit:focus-visible {
  outline: none;
  stroke: #fff2c2;
  stroke-width: 5;
  filter: drop-shadow(0 0 3px #4e3324);
}
.world-map-region-hit.is-selected {
  fill: rgba(171, 124, 70, 0.1);
  stroke: rgba(109, 69, 37, 0.92);
  stroke-width: 3;
  filter: none;
}
.world-map-region-hit.is-current {
  fill: rgba(171, 124, 70, 0.04);
  stroke: rgba(93, 60, 36, 0.42);
  stroke-width: 2;
  filter: none;
}
.world-map-region-hit.is-current.is-selected { stroke: rgba(102, 65, 36, 0.86); stroke-width: 3; }
.world-map-area-label,
.world-map-capital-label,
.world-map-water-label,
.world-map-culture-label {
  fill: rgba(61, 43, 30, 0.78);
  font-family: Georgia, "Yu Mincho", serif;
  font-weight: 600;
  paint-order: stroke;
  stroke: rgba(220, 202, 161, 0.52);
  stroke-width: 2.5px;
}
.world-map-area-label { font-size: 16px; letter-spacing: 0.06em; }
.world-map-water-label {
  fill: rgba(235, 226, 202, 0.48);
  font-size: 24px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.23em;
  stroke: rgba(65, 84, 80, 0.28);
  stroke-width: 2px;
}
.world-map-culture-label { fill: rgba(65, 47, 34, 0.34); font-size: 23px; letter-spacing: 0.18em; }
.world-map-area-label.is-selected,
.world-map-area-label.is-current { fill: #654127; font-size: 17px; }
.world-current-marker circle { fill: rgba(239, 207, 137, 0.12); stroke: #c99e50; }
.world-current-ring-outer { stroke-width: 3.5 !important; }
.world-current-ring-inner { stroke-width: 1.5 !important; stroke-dasharray: 3 2; }
.world-current-marker path { fill: #70412d; stroke: #e0bc6d; stroke-width: 2; }
.world-current-marker text {
  fill: #5a3623;
  font: 700 16px Georgia, "Yu Mincho", serif;
  paint-order: stroke;
  stroke: rgba(226, 207, 164, 0.92);
  stroke-width: 4px;
}
.world-map-cartouche path { fill: rgba(220, 197, 150, 0.7); stroke: #65472f; stroke-width: 2; }
.world-map-cartouche text { fill: #563923; font: 700 14px Georgia, serif; letter-spacing: 0.1em; }
.world-map-cartouche .world-map-scribe { font: 11px "Yu Mincho", serif; letter-spacing: 0.06em; }
.world-map-compass circle { fill: rgba(218, 197, 156, 0.28); stroke: rgba(78, 54, 37, 0.76); stroke-width: 2; }
.world-map-compass path { fill: rgba(86, 57, 38, 0.58); stroke: #5e402c; stroke-width: 1; }
.world-map-compass text,
.world-map-scale-ornament text { fill: #563a27; font: 12px Georgia, serif; }
.world-map-scale-ornament path { fill: none; stroke: #5a3d2a; stroke-width: 2; }
.world-map-sites,
.world-map-armies { position: absolute; inset: 0; pointer-events: none; }
.world-site-marker {
  position: absolute;
  z-index: 8;
  display: grid;
  grid-template-columns: 24px auto;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.25rem;
  border: 0;
  background: transparent;
  color: #4c3322;
  font: 700 0.62rem Georgia, "Yu Mincho", serif;
  text-align: left;
  pointer-events: auto;
  cursor: pointer;
  transform: translate(-22px, -22px);
}
[data-world-map-mode="legion"] .world-site-marker { z-index: 6; opacity: 0.78; }
.world-site-symbol {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid #60402b;
  border-radius: 50%;
  background: rgba(212, 187, 136, 0.92);
  color: #6e2935;
  box-shadow: 0 0 0 2px rgba(231, 213, 171, 0.5);
  font: 800 0.75rem Georgia, serif;
}
.world-site-label {
  max-width: 7.5rem;
  padding: 0.08rem 0.2rem;
  background: rgba(217, 198, 157, 0.72);
  text-shadow: 0 1px rgba(255, 244, 212, 0.6);
  white-space: nowrap;
}
.world-site-marker--imperial_capital .world-site-symbol {
  border-style: double;
  border-width: 3px;
  background: #6f2d38;
  color: #f1d38c;
}
.world-site-marker.is-current-base .world-site-symbol {
  outline: 3px double #d6ad5f;
  outline-offset: 2px;
}
.world-site-marker.is-selected .world-site-symbol { box-shadow: 0 0 0 4px rgba(104, 61, 34, 0.46); }
.world-site-marker:focus-visible { outline: 3px solid #fff3c2; outline-offset: 1px; border-radius: 0.25rem; }
.world-legion-marker {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f2d697;
  box-shadow: none;
  isolation: isolate;
  font-size: 0.58rem;
}
.world-legion-marker::before {
  top: 9px;
  left: 10px;
  z-index: -1;
  width: 25px;
  height: 23px;
  border: 1.5px solid #b99452;
  border-radius: 1px 1px 4px 1px;
  background: #6d2635;
  box-shadow: none;
  clip-path: polygon(0 0, 100% 0, 82% 50%, 100% 100%, 0 100%);
}
.world-legion-marker::after {
  position: absolute;
  top: 6px;
  left: 9px;
  z-index: -2;
  width: 1.5px;
  height: 34px;
  background: #5f432c;
  content: "";
}
.world-legion-marker.is-player-formation {
  border: 0;
  box-shadow: inset 0 0 0 2px #e0b963;
  border-radius: 50%;
}
.world-legion-marker.is-engaged::before { background: #8f2228; }
.world-legion-marker.is-moving::before { border-style: dashed; }
.world-legion-marker--cluster {
  border: 2px double #68422e;
  border-radius: 50%;
  background: rgba(207, 178, 119, 0.94);
  color: #5d2731;
  font-size: 0.72rem;
}
.world-legion-marker--cluster::before,
.world-legion-marker--cluster::after { display: none; }
[data-world-map-mode="faction"] .world-legion-marker:not(.is-player-formation) { opacity: 0.48; }
[data-world-map-mode="legion"] .world-legion-marker { transform: translate(-50%, -50%) scale(1.04); }
.world-map-legend {
  right: 0.55rem;
  bottom: 0.55rem;
  left: auto;
  gap: 0.45rem;
  padding: 0.34rem 0.48rem;
  border: 1px solid rgba(91, 59, 37, 0.72);
  border-radius: 0;
  background: rgba(214, 193, 150, 0.88);
  color: #4e3423;
  font-family: Georgia, "Yu Mincho", serif;
  box-shadow: inset 0 0 0 1px rgba(250, 233, 196, 0.42);
}
.world-map-legend strong { color: #6e2935; font-size: 0.62rem; letter-spacing: 0.12em; }
.world-legend.site { border: 1px solid #65442d; border-radius: 50%; background: #cfb780; }
.world-legend.border { border-color: #772f37; }
.world-legend.road { background: #745036; }
.world-legend.legion { background: #6d2635; }
.site-drawer-detail,
.site-drawer-detail dl { display: grid; gap: 0.8rem; }
.site-drawer-detail h3 { margin: 0; color: #eadac5; font: 500 1.35rem Georgia, "Yu Mincho", serif; }
.site-type-label { margin: -0.45rem 0 0; color: #d4b97d; font: 700 0.78rem system-ui, sans-serif; }
.site-drawer-detail dl { gap: 1px; margin: 0; background: rgba(215, 182, 137, 0.16); }
.site-drawer-detail dl div { padding: 0.65rem; background: #211820; }
.site-drawer-detail dt { color: #8f8278; font: 0.7rem system-ui, sans-serif; }
.site-drawer-detail dd { margin: 0.3rem 0 0; color: #eadac5; }
.site-drawer-detail > p:last-child { color: #b9aca2; font: 0.8rem/1.6 system-ui, sans-serif; }

@media (max-width: 600px) {
  .antique-map-card .world-map-stage { box-shadow: inset 0 0 1.2rem rgba(60, 35, 22, 0.28); }
  .world-map-landmasses { filter: none; }
  .world-paper-grain { display: none; }
  .world-map-cartouche,
  .world-map-scale-ornament,
  .world-map-compass { opacity: 0.7; }
  .world-site-label { display: none; }
  .world-site-marker--imperial_capital .world-site-label,
  .world-site-marker.is-current-base .world-site-label,
  .world-site-marker.is-selected .world-site-label { display: block; max-width: 5.5rem; font-size: 0.56rem; }
  .world-site-marker { grid-template-columns: 20px auto; padding: 0; }
  .world-site-symbol { width: 19px; height: 19px; font-size: 0.64rem; }
  .world-map-legend { display: none; }
  .world-legion-marker.is-player-formation { margin: 0; }
}

@media (max-width: 340px) {
  .world-map-cartouche { display: none; }
  .world-map-compass { transform: translate(1130px, 585px) scale(0.8); }
  .world-map-area-label.is-current { display: none; }
  .world-site-marker.is-current-base .world-site-label { max-width: 4.8rem; }
  .world-current-marker text { font-size: 19px; }
  .world-legion-marker { width: 44px; height: 44px; font-size: 0.56rem; }
}

@media (prefers-reduced-motion: reduce) {
  .world-site-marker,
  .world-legion-marker { transition: none; animation: none; }
}

/* M1.5: high-resolution historical-atlas basemap with independent overlays. */
.antique-map-card .world-map-stage {
  display: grid;
  place-items: stretch;
  min-height: 0;
  overflow: hidden;
  background: #2b403f;
  box-shadow: inset 0 0 1.2rem rgba(33, 20, 13, 0.28);
}

.world-map-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #304b4d;
}

.world-map-canvas > .imperial-world-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.world-map-basemap {
  pointer-events: none;
  image-rendering: auto;
}

.world-map-affiliation { fill-opacity: 0.018; }
[data-world-map-mode="faction"] .world-map-affiliation { fill-opacity: 0.16; }
[data-world-map-mode="legion"] .world-map-affiliation { fill-opacity: 0.01; }

.world-map-borders path {
  stroke: rgba(75, 48, 31, 0.54);
  stroke-width: 1.7;
  stroke-dasharray: 5 6;
}

.world-map-imperial-border path {
  stroke: rgba(112, 35, 43, 0.8);
  stroke-width: 2.7;
  stroke-dasharray: 11 5 2 5;
}

[data-world-map-mode="faction"] .world-map-imperial-border path {
  stroke: rgba(116, 35, 46, 0.96);
  stroke-width: 4;
}

.world-map-roads path {
  stroke: rgba(92, 58, 35, 0.72);
  stroke-width: 2.1;
  filter: drop-shadow(0 0.7px rgba(234, 210, 158, 0.5));
}

.world-map-roads .world-road--major { stroke-width: 3; }
.world-map-roads .world-road--minor { stroke-width: 1.7; stroke-dasharray: 4 3; }
.world-map-sea-routes path { stroke: rgba(232, 225, 202, 0.5); stroke-width: 1.7; stroke-dasharray: 3 7; }

.world-map-region-hit:hover {
  fill: rgba(222, 194, 137, 0.1);
  stroke: rgba(80, 50, 31, 0.7);
  stroke-width: 2;
}

.world-map-region-hit:focus-visible {
  fill: rgba(239, 218, 169, 0.12);
  stroke: #fff0b7;
  stroke-width: 5;
  filter: drop-shadow(0 0 3px rgba(40, 24, 15, 0.85));
}

.world-map-region-hit.is-selected {
  fill: rgba(180, 128, 74, 0.1);
  stroke: rgba(103, 64, 38, 0.9);
  stroke-width: 2.4;
  filter: none;
}

.world-map-region-hit.is-current,
.world-map-region-hit.is-current.is-selected {
  fill: rgba(170, 119, 66, 0.035);
  stroke: rgba(104, 66, 38, 0.58);
  stroke-width: 1.8;
  filter: none;
}

.world-map-area-label,
.world-map-water-label,
.world-map-culture-label {
  font-family: Georgia, "Yu Mincho", "Hiragino Mincho ProN", serif;
  paint-order: stroke;
  pointer-events: none;
}

.world-map-area-label {
  fill: rgba(52, 35, 24, 0.8);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.07em;
  stroke: rgba(231, 216, 181, 0.64);
  stroke-width: 2.7px;
}

.world-map-water-label {
  fill: rgba(229, 222, 199, 0.48);
  font-size: 22px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.24em;
  stroke: rgba(40, 67, 71, 0.42);
  stroke-width: 2px;
}

.world-map-culture-label {
  fill: rgba(61, 43, 29, 0.36);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.19em;
  stroke: rgba(229, 213, 176, 0.3);
  stroke-width: 2px;
}

.world-map-area-label.is-selected,
.world-map-area-label.is-current { fill: #4c2d1c; font-size: 16px; }

.world-site-label {
  max-width: 7.5rem;
  padding: 0.06rem 0.18rem;
  background: transparent;
  color: #4a2f20;
  font-family: Georgia, "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-weight: 700;
  paint-order: stroke;
  text-shadow:
    -1px -1px rgba(229, 213, 174, 0.84),
    1px -1px rgba(229, 213, 174, 0.84),
    -1px 1px rgba(229, 213, 174, 0.84),
    1px 1px rgba(229, 213, 174, 0.84);
}

.world-site-symbol {
  background: rgba(207, 184, 137, 0.88);
  box-shadow: 0 0 0 1px rgba(238, 221, 184, 0.5);
}

.world-site-marker.is-current-base .world-site-symbol {
  outline: 2px double #d9b561;
  outline-offset: 2px;
}

.world-current-marker circle { fill: rgba(232, 201, 133, 0.04); stroke: #d2aa58; }
.world-current-ring-outer { stroke-width: 3 !important; }
.world-current-ring-inner { stroke-width: 1.2 !important; }
.world-current-marker text {
  fill: #4d2e1e;
  font: 700 15px Georgia, "Yu Mincho", serif;
  stroke: rgba(232, 216, 177, 0.94);
  stroke-width: 3.5px;
}

.world-map-cartouche { opacity: 0.78; }
.world-map-cartouche path { fill: rgba(211, 187, 140, 0.6); }
.world-map-compass,
.world-map-scale-ornament { opacity: 0.62; }
.world-map-frame { stroke: rgba(62, 39, 26, 0.56); stroke-width: 2; }

@media (max-width: 600px) {
  .map-primary .world-map-stage {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 1200 / 680;
  }

  .map-primary .world-map-canvas,
  .map-primary .imperial-world-map {
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .world-map-cartouche,
  .world-map-scale-ornament,
  .world-map-compass { display: none; }

  .world-map-water-label--major { font-size: 21px; }
  .world-site-label { text-shadow: -1px 0 rgba(230, 214, 176, 0.92), 1px 0 rgba(230, 214, 176, 0.92); }
}

@media (max-width: 340px) {
  .world-map-water-label--major { font-size: 19px; }
  .world-current-marker text { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .world-map-region-hit,
  .world-legion-marker,
  .world-site-marker { transition: none; animation: none; }
}

/* M1.6: geography-aligned map modes, calibration overlay and mobile viewport. */
.imperial-world-map-card[data-world-map-mode="standard"] .world-map-affiliation {
  fill-opacity: 0;
}

.imperial-world-map-card[data-world-map-mode="standard"] .world-map-borders,
.imperial-world-map-card[data-world-map-mode="standard"] .world-map-imperial-border {
  opacity: 0;
}

.imperial-world-map-card[data-world-map-mode="standard"] .world-map-roads .world-road--minor {
  opacity: 0;
}

.imperial-world-map-card[data-world-map-mode="standard"] .world-map-roads .world-road--major {
  opacity: 0.82;
}

.imperial-world-map-card[data-world-map-mode="standard"] .world-map-sea-routes {
  opacity: 0.64;
}

.imperial-world-map-card[data-world-map-mode="standard"] .world-map-armies {
  visibility: hidden;
}

.imperial-world-map-card[data-world-map-mode="standard"] .world-map-area-label--minor,
.imperial-world-map-card[data-world-map-mode="standard"] .world-map-culture-label--minor,
.imperial-world-map-card[data-world-map-mode="standard"] .world-map-water-label--minor {
  display: none;
}

.imperial-world-map-card[data-world-map-mode="faction"] .world-map-affiliation {
  fill-opacity: 0.21;
}

.imperial-world-map-card[data-world-map-mode="faction"] .world-map-borders,
.imperial-world-map-card[data-world-map-mode="faction"] .world-map-imperial-border {
  opacity: 1;
}

.imperial-world-map-card[data-world-map-mode="faction"] .world-map-roads,
.imperial-world-map-card[data-world-map-mode="faction"] .world-map-sea-routes {
  opacity: 0;
}

.imperial-world-map-card[data-world-map-mode="faction"] .world-map-armies {
  visibility: hidden;
}

.imperial-world-map-card[data-world-map-mode="faction"] .world-site-marker:not(.is-current-base):not(.is-selected) {
  opacity: 0.58;
}

.imperial-world-map-card[data-world-map-mode="legion"] .world-map-affiliation {
  fill-opacity: 0;
}

.imperial-world-map-card[data-world-map-mode="legion"] .world-map-borders {
  opacity: 0.12;
}

.imperial-world-map-card[data-world-map-mode="legion"] .world-map-imperial-border {
  opacity: 1;
}

.imperial-world-map-card[data-world-map-mode="legion"] .world-map-roads {
  opacity: 0.92;
}

.imperial-world-map-card[data-world-map-mode="legion"] .world-map-roads .world-road--major {
  stroke-width: 3.7;
}

.imperial-world-map-card[data-world-map-mode="legion"] .world-map-roads .world-road--minor {
  opacity: 0.58;
}

.imperial-world-map-card[data-world-map-mode="legion"] .world-map-sea-routes {
  opacity: 0;
}

.imperial-world-map-card[data-world-map-mode="legion"] .world-map-armies {
  visibility: visible;
}

.imperial-world-map-card[data-world-map-mode="legion"] .world-site-marker:not(.world-site-marker--legion_fort):not(.world-site-marker--naval_port):not(.world-site-marker--mountain_gate):not(.world-site-marker--strait_fortress):not(.is-current-base):not(.is-selected) {
  opacity: 0.38;
}

.imperial-world-map-card[data-world-map-mode="legion"] .world-site-marker:not(.world-site-marker--legion_fort):not(.world-site-marker--naval_port):not(.world-site-marker--mountain_gate):not(.world-site-marker--strait_fortress):not(.is-current-base):not(.is-selected) .world-site-label {
  display: none;
}

/* Development-only geography calibration. The controller may use either hook. */
.world-map-calibration-layer { display: none; pointer-events: none; }

.imperial-world-map-card.is-calibrating .world-map-calibration-layer,
.imperial-world-map-card[data-world-map-calibration="true"] .world-map-calibration-layer {
  display: inline;
}

.world-map-calibration-grid path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.24);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

.world-map-calibration-grid text,
.world-map-calibration-version,
.world-map-calibration-id,
.world-map-calibration-point text {
  fill: #fff7a8;
  stroke: rgba(12, 13, 18, 0.95);
  stroke-width: 3px;
  paint-order: stroke;
  font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.world-map-calibration-area {
  fill: rgba(0, 217, 255, 0.06);
  stroke: #00d9ff;
  stroke-width: 2;
  stroke-dasharray: 7 4;
}

.world-map-calibration-point path,
.world-map-calibration-point circle {
  fill: rgba(255, 240, 90, 0.32);
  stroke: #fff05a;
  stroke-width: 2;
}

.world-map-calibration-point--legion circle { stroke: #ff58c8; }

.imperial-world-map-card.is-calibrating .world-map-affiliation,
.imperial-world-map-card[data-world-map-calibration="true"] .world-map-affiliation {
  fill-opacity: 0.25 !important;
  stroke: #e54f89;
  stroke-width: 2;
  stroke-dasharray: 5 3;
}

.imperial-world-map-card.is-calibrating .world-map-region-hit,
.imperial-world-map-card[data-world-map-calibration="true"] .world-map-region-hit {
  fill: rgba(0, 229, 255, 0.08) !important;
  stroke: #00d9ff !important;
  stroke-width: 2.5 !important;
  stroke-dasharray: 8 4;
  filter: none !important;
}

.imperial-world-map-card.is-calibrating .world-map-borders,
.imperial-world-map-card.is-calibrating .world-map-imperial-border,
.imperial-world-map-card.is-calibrating .world-map-roads,
.imperial-world-map-card.is-calibrating .world-map-sea-routes,
.imperial-world-map-card.is-calibrating .world-map-armies,
.imperial-world-map-card[data-world-map-calibration="true"] .world-map-borders,
.imperial-world-map-card[data-world-map-calibration="true"] .world-map-imperial-border,
.imperial-world-map-card[data-world-map-calibration="true"] .world-map-roads,
.imperial-world-map-card[data-world-map-calibration="true"] .world-map-sea-routes,
.imperial-world-map-card[data-world-map-calibration="true"] .world-map-armies {
  visibility: visible !important;
  opacity: 1 !important;
}

.imperial-world-map-card.is-calibrating .world-map-borders path,
.imperial-world-map-card[data-world-map-calibration="true"] .world-map-borders path {
  stroke: #ff4fd8;
  stroke-width: 3;
}

.imperial-world-map-card.is-calibrating .world-map-imperial-border path,
.imperial-world-map-card[data-world-map-calibration="true"] .world-map-imperial-border path {
  stroke: #ffec4f;
  stroke-width: 4;
}

.imperial-world-map-card.is-calibrating .world-map-roads path,
.imperial-world-map-card[data-world-map-calibration="true"] .world-map-roads path {
  stroke: #ff8a2b;
  stroke-width: 3;
  opacity: 1;
}

.imperial-world-map-card.is-calibrating .world-map-sea-routes path,
.imperial-world-map-card[data-world-map-calibration="true"] .world-map-sea-routes path {
  stroke: #35f4ff;
  stroke-width: 3;
  opacity: 1;
}

.world-map-calibration-label,
.world-map-coordinate-label,
[data-world-map-coordinate-label] {
  display: none;
  padding: 0.08rem 0.18rem;
  border: 1px solid #ffe85a;
  background: rgba(12, 13, 18, 0.86);
  color: #fff29a;
  font: 700 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0;
  paint-order: stroke;
  stroke: rgba(12, 13, 18, 0.92);
  stroke-width: 3px;
  text-shadow: none;
  pointer-events: none;
}

.world-map-calibration-point,
[data-world-map-calibration-point] {
  display: none;
  z-index: 20;
  width: 10px;
  height: 10px;
  border: 2px solid #171319;
  border-radius: 50%;
  background: #fff05a;
  box-shadow: 0 0 0 2px #ff3bc8;
  pointer-events: none;
}

.imperial-world-map-card.is-calibrating :is(.world-map-calibration-label, .world-map-coordinate-label, [data-world-map-coordinate-label]),
.imperial-world-map-card[data-world-map-calibration="true"] :is(.world-map-calibration-label, .world-map-coordinate-label, [data-world-map-coordinate-label]),
.imperial-world-map-card.is-calibrating :is(.world-map-calibration-point, [data-world-map-calibration-point]),
.imperial-world-map-card[data-world-map-calibration="true"] :is(.world-map-calibration-point, [data-world-map-calibration-point]) {
  display: block;
}

/* The expanded map is a full-screen surface at every viewport width. */
.imperial-world-map-card:is(.is-expanded, [data-world-map-expanded="true"]) {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100vw;
  max-width: none;
  height: 100dvh;
  min-height: 0;
  max-height: none;
  padding:
    max(0.45rem, env(safe-area-inset-top))
    max(0.45rem, env(safe-area-inset-right))
    max(0.45rem, env(safe-area-inset-bottom))
    max(0.45rem, env(safe-area-inset-left));
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #1d2c2e;
  box-shadow: none;
}

.imperial-world-map-card:is(.is-expanded, [data-world-map-expanded="true"]) .world-map-heading {
  position: relative;
  z-index: 3;
  align-self: start;
  min-height: 44px;
  padding: 0.2rem 0;
}

.imperial-world-map-card:is(.is-expanded, [data-world-map-expanded="true"]) .world-map-stage {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: contain;
}

.imperial-world-map-card:is(.is-expanded, [data-world-map-expanded="true"]) .world-map-canvas {
  position: relative;
  inset: auto;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 680;
  transform:
    translate3d(var(--world-map-pan-x, 0px), var(--world-map-pan-y, 0px), 0)
    scale(var(--world-map-zoom, 1));
  transform-origin: center;
  will-change: transform;
}

.imperial-world-map-card:is(.is-expanded, [data-world-map-expanded="true"]) .imperial-world-map {
  width: 100%;
  height: 100%;
}

.imperial-world-map-card:is(.is-expanded, [data-world-map-expanded="true"])
  :is(
    [data-world-map-expand],
    [data-world-map-close-expanded],
    [data-world-map-zoom-in],
    [data-world-map-zoom-out],
    [data-world-map-reset-view],
    .world-map-expand-button,
    .world-map-expanded-close,
    .world-map-zoom-control
  ) {
  min-width: 44px;
  min-height: 44px;
}

.imperial-world-map-card:is(.is-expanded, [data-world-map-expanded="true"])
  :is(.world-map-expanded-close, [data-world-map-close-expanded]) {
  position: relative;
  z-index: 4;
}

@media (min-width: 601px) and (max-width: 840px) {
  .map-primary-layout,
  .map-primary,
  .map-view,
  .imperial-world-map-card { min-width: 0; max-width: 100%; }

  .map-primary .world-map-stage {
    width: 100%;
    min-height: 20rem;
    height: clamp(20rem, 54vw, 26rem);
  }

  .main-brief { min-width: 0; }
}

@media (max-width: 600px) {
  .app-shell:has(.command-main) {
    max-width: 100%;
    padding-bottom: calc(7.25rem + env(safe-area-inset-bottom));
    overflow-x: clip;
  }

  .command-main,
  .map-primary-layout,
  .map-primary,
  .map-view,
  .imperial-world-map-card,
  .main-brief {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .map-primary-layout {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .map-primary .imperial-world-map-card {
    padding: 0.4rem;
  }

  .map-primary .world-map-stage {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 1200 / 680;
    overflow: visible;
  }

  .map-primary .world-map-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    min-width: 0;
    height: 100%;
    transform: none;
  }

  .map-primary .imperial-world-map {
    width: 100%;
    min-width: 0;
    height: 100%;
    min-height: 0;
  }

  .main-brief {
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 0.5rem;
  }

  .imperial-world-map-card[data-world-map-mode="standard"] .world-map-area-label,
  .imperial-world-map-card[data-world-map-mode="standard"] .world-map-culture-label,
  .imperial-world-map-card[data-world-map-mode="standard"] .world-map-water-label--minor {
    display: none;
  }

  .imperial-world-map-card[data-world-map-mode="standard"] .world-map-area-label.is-current,
  .imperial-world-map-card[data-world-map-mode="standard"] .world-map-area-label.is-selected,
  .imperial-world-map-card[data-world-map-mode="standard"] .world-map-water-label--major {
    display: block;
  }

  .imperial-world-map-card[data-world-map-mode="standard"] .world-site-label {
    display: none;
  }

  .imperial-world-map-card[data-world-map-mode="standard"] .world-site-marker--capital .world-site-label,
  .imperial-world-map-card[data-world-map-mode="standard"] .world-site-marker--imperial_capital .world-site-label,
  .imperial-world-map-card[data-world-map-mode="standard"] .world-site-marker--provincial_capital .world-site-label,
  .imperial-world-map-card[data-world-map-mode="standard"] .world-site-marker--naval_port .world-site-label,
  .imperial-world-map-card[data-world-map-mode="standard"] .world-site-marker--trade_city .world-site-label,
  .imperial-world-map-card[data-world-map-mode="standard"] .world-site-marker.is-current-base .world-site-label,
  .imperial-world-map-card[data-world-map-mode="standard"] .world-site-marker.is-selected .world-site-label {
    display: block;
    max-width: 5.6rem;
    overflow: hidden;
    font-size: 0.56rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .imperial-world-map-card[data-world-map-mode="faction"] .world-map-area-label--minor:not(.is-selected):not(.is-current),
  .imperial-world-map-card[data-world-map-mode="legion"] .world-map-area-label--minor:not(.is-selected):not(.is-current) {
    display: none;
  }

  .turn-dock {
    bottom: 0;
    height: calc(104px + env(safe-area-inset-bottom));
    min-height: 104px;
    max-height: calc(110px + env(safe-area-inset-bottom));
  }

}

@media (max-width: 400px) {
  .world-map-heading {
    min-width: 0;
    gap: 0.35rem;
  }

  .world-map-controls { min-width: 0; }
  .world-map-modes { flex: 0 0 auto; }
  .world-map-modes button { min-width: 2.65rem; padding-inline: 0.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .imperial-world-map-card .world-map-affiliation,
  .imperial-world-map-card .world-map-borders,
  .imperial-world-map-card .world-map-imperial-border,
  .imperial-world-map-card .world-map-roads,
  .imperial-world-map-card .world-map-sea-routes,
  .imperial-world-map-card .world-map-armies { transition: none; }
}

/* M1.6.1: full-map mobile viewport and unified current-location marker. */
.world-map-expand-button,
.world-map-expanded-controls button {
  min-height: 44px;
  border: 1px solid rgba(211, 183, 126, 0.58);
  border-radius: 0.3rem;
  background: rgba(57, 38, 28, 0.82);
  color: #f0dba8;
  font: 700 0.72rem Georgia, "Yu Mincho", serif;
}

.world-map-expand-button { display: none; padding-inline: 0.65rem; }
.world-map-expanded-controls { display: flex; align-items: center; gap: 0.3rem; }
.world-map-expanded-controls[hidden] { display: none; }
.world-map-expanded-controls button { min-width: 44px; padding-inline: 0.55rem; }
.world-map-expanded-controls [data-world-map-reset-view] { min-width: 5rem; }
.world-map-expanded-controls button:focus-visible,
.world-map-expand-button:focus-visible {
  outline: 3px solid #fff1b6;
  outline-offset: 2px;
}

html.world-map-expanded-open { overflow: hidden; }

.world-site-marker--current-location .world-site-symbol {
  position: relative;
  outline: 2px solid #f0cd75;
  outline-offset: 2px;
  box-shadow:
    0 0 0 5px rgba(96, 57, 31, 0.78),
    0 0 0 7px rgba(238, 202, 112, 0.72);
}

.world-current-direction {
  position: absolute;
  top: -13px;
  left: 50%;
  color: #6f2d38;
  font-size: 0.58rem;
  line-height: 1;
  text-shadow: 0 1px #f1d99c;
  transform: translateX(-50%);
}

.world-site-marker--current-location .world-site-label {
  max-width: 10.5rem;
  font-weight: 800;
}

@media (max-width: 600px) {
  .world-map-expand-button { display: inline-flex; align-items: center; justify-content: center; }

  .imperial-world-map-card:is(.is-expanded, [data-world-map-expanded="true"]) .world-map-expand-button {
    display: none;
  }

  .imperial-world-map-card:is(.is-expanded, [data-world-map-expanded="true"]) .world-map-controls {
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .imperial-world-map-card:is(.is-expanded, [data-world-map-expanded="true"]) .world-map-heading > div:first-child {
    flex: 0 0 5.2rem;
    min-width: 5.2rem;
  }

  .imperial-world-map-card:is(.is-expanded, [data-world-map-expanded="true"]) .world-map-heading h2 {
    font-size: 0.92rem;
    white-space: nowrap;
  }

  .imperial-world-map-card:is(.is-expanded, [data-world-map-expanded="true"]) .world-map-expanded-controls {
    display: flex;
  }

  .imperial-world-map-card:is(.is-expanded, [data-world-map-expanded="true"]) .world-site-marker--current-location .world-site-label,
  .imperial-world-map-card[data-world-map-mode="standard"] .world-site-marker--current-location .world-site-label {
    max-width: 8.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .imperial-world-map-card .world-map-canvas { transition: none; }
}

/* M1.6.2: unambiguous 44px map targets and portrait expanded-map fitting. */
.world-site-marker {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  place-items: center;
  grid-template-columns: 1fr;
  overflow: visible;
  transform: scale(var(--world-map-inverse-zoom, 1)) translate(-50%, -50%);
  transform-origin: 0 0;
}

.world-site-label {
  position: absolute;
  top: 50%;
  left: calc(100% - 2px);
  z-index: 3;
  pointer-events: none;
  transform: translateY(calc(-50% + var(--world-site-label-shift-y, 0px)));
}

.world-site-marker.is-label-left .world-site-label {
  right: calc(100% - 2px);
  left: auto;
  text-align: right;
}

.imperial-world-map-card .world-site-marker.is-current-base {
  z-index: 9;
}

.imperial-world-map-card .world-site-label.is-map-label-constrained {
  width: max-content;
  max-width: var(--world-site-label-max-width, 7.5rem);
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.imperial-world-map-card .world-site-label.is-map-label-measuring {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.world-site-symbol,
.world-legion-glyph {
  position: relative;
  z-index: 2;
}

.world-legion-marker {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  transform: scale(var(--world-map-inverse-zoom, 1)) translate(-50%, -50%);
  transform-origin: 0 0;
}

[data-world-map-mode="legion"] .world-legion-marker {
  transform: scale(var(--world-map-inverse-zoom, 1)) translate(-50%, -50%);
}

.world-marker-leader {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  height: 1px;
  border-top: 1px solid rgba(78, 48, 30, 0.64);
  pointer-events: none;
  transform-origin: 0 50%;
}

.imperial-world-map-card[data-world-map-mode="standard"] .world-map-borders {
  opacity: 0.14;
}

.imperial-world-map-card[data-world-map-mode="standard"] .world-map-imperial-border {
  opacity: 0.19;
}

.imperial-world-map-card[data-world-map-mode="standard"] .world-map-borders path {
  stroke: rgba(74, 48, 32, 0.36);
  stroke-width: 1.35;
}

.imperial-world-map-card[data-world-map-mode="standard"] .world-map-imperial-border path {
  stroke: rgba(105, 43, 45, 0.44);
  stroke-width: 1.8;
}

.imperial-world-map-card[data-world-map-mode="faction"] .world-map-borders path {
  stroke: rgba(72, 45, 29, 0.78);
  stroke-width: 2.1;
}

.imperial-world-map-card[data-world-map-mode="faction"] .world-map-imperial-border path {
  stroke: rgba(112, 35, 45, 0.9);
  stroke-width: 3.2;
}

@media (max-width: 600px) {
  .imperial-world-map-card:is(.is-expanded, [data-world-map-expanded="true"]) .world-map-stage {
    position: relative;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    place-items: center;
  }

  .imperial-world-map-card:is(.is-expanded, [data-world-map-expanded="true"]) .world-map-canvas {
    grid-area: 1 / 1;
  }

  .imperial-world-map-card:is(.is-expanded, [data-world-map-expanded="true"])[data-world-map-fit="contain"] .world-map-legend {
    display: flex;
    right: 50%;
    bottom: 0.5rem;
    max-width: calc(100% - 1rem);
    transform: translateX(50%);
  }

  .imperial-world-map-card:is(.is-expanded, [data-world-map-expanded="true"]):not([data-world-map-fit="contain"]) .world-map-legend {
    display: none;
  }
}

/* M1.6.3: bounded geographic markers and portrait-map information bands. */
.world-marker-leader {
  height: 2px;
  border-top: 2px solid rgba(83, 45, 25, 0.86);
  filter: drop-shadow(0 0 1px rgba(246, 224, 170, 0.86));
}

.world-marker-leader::after {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(83, 45, 25, 0.92);
  border-radius: 50%;
  background: #ead59d;
  content: "";
}

.world-map-border-halos,
.world-map-faction-mark {
  display: none;
  pointer-events: none;
}

.imperial-world-map-card[data-world-map-mode="faction"] .world-map-border-halos {
  display: inline;
}

.imperial-world-map-card[data-world-map-mode="faction"] .world-map-border-halos path {
  fill: none;
  stroke: rgba(239, 219, 165, 0.68);
  stroke-width: 4.6;
  vector-effect: non-scaling-stroke;
}

.imperial-world-map-card[data-world-map-mode="faction"] .world-map-affiliation {
  fill-opacity: 0.3;
}

.imperial-world-map-card[data-world-map-mode="faction"] .world-map-affiliation.is-current {
  fill-opacity: 0.43;
  stroke: rgba(250, 221, 133, 0.88);
  stroke-width: 2;
}

.imperial-world-map-card[data-world-map-mode="faction"] .world-map-affiliation.is-selected:not(.is-current) {
  stroke: rgba(85, 48, 27, 0.78);
  stroke-width: 1.5;
}

.imperial-world-map-card[data-world-map-mode="faction"] .world-map-faction-mark {
  display: inline;
  fill: #3d271c;
  stroke: rgba(244, 224, 174, 0.8);
  stroke-width: 2px;
  paint-order: stroke;
  font: 700 15px/1 Georgia, "Yu Mincho", serif;
}

.imperial-world-map-card[data-world-map-mode="faction"] .world-map-faction-mark--imperial { fill: #791f35; }
.imperial-world-map-card[data-world-map-mode="faction"] .world-map-faction-mark--allied { fill: #8b681a; }
.imperial-world-map-card[data-world-map-mode="faction"] .world-map-faction-mark--hostile { fill: #8e2025; }
.imperial-world-map-card[data-world-map-mode="faction"] .world-map-faction-mark--unknown { fill: #4d5753; }
.imperial-world-map-card[data-world-map-mode="faction"] .world-map-faction-mark.is-current { font-size: 19px; }

.world-map-expanded-context,
.world-map-expanded-mode-info {
  display: none;
}

@media (max-width: 600px) {
  .imperial-world-map-card[data-world-map-mode="faction"] .world-map-affiliation {
    fill-opacity: 0.4;
  }

  .imperial-world-map-card[data-world-map-mode="faction"] .world-map-affiliation.is-current {
    fill-opacity: 0.52;
  }

  .imperial-world-map-card[data-world-map-mode="faction"] .world-map-borders path {
    stroke-width: 2.35;
  }

  .imperial-world-map-card[data-world-map-mode="faction"] .world-map-imperial-border path {
    stroke-width: 3.3;
  }

  .imperial-world-map-card[data-world-map-mode="faction"] .world-map-faction-mark--minor:not(.is-current):not(.is-selected) {
    display: none;
  }
}

@media (orientation: portrait) and (max-width: 900px) {
  .imperial-world-map-card:is(.is-expanded, [data-world-map-expanded="true"])[data-world-map-fit="contain"] .world-map-expanded-context,
  .imperial-world-map-card:is(.is-expanded, [data-world-map-expanded="true"])[data-world-map-fit="contain"] .world-map-expanded-mode-info {
    position: absolute;
    left: max(0.5rem, env(safe-area-inset-left));
    right: max(0.5rem, env(safe-area-inset-right));
    z-index: 18;
    display: block;
    border: 1px solid rgba(96, 59, 32, 0.38);
    border-radius: 0.55rem;
    background: rgba(231, 211, 164, 0.94);
    color: #302016;
    box-shadow: 0 0.25rem 0.8rem rgba(35, 23, 16, 0.18);
  }

  .imperial-world-map-card:is(.is-expanded, [data-world-map-expanded="true"])[data-world-map-fit="contain"] .world-map-expanded-context {
    top: 0.55rem;
    padding: 0.4rem 0.6rem;
    pointer-events: none;
  }

  .world-map-expanded-context p {
    margin: 0;
    overflow: hidden;
    font-size: 0.72rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .imperial-world-map-card:is(.is-expanded, [data-world-map-expanded="true"])[data-world-map-fit="contain"] .world-map-expanded-mode-info {
    bottom: max(0.55rem, env(safe-area-inset-bottom));
    max-height: min(24dvh, 12rem);
    padding: 0.45rem;
    overflow: hidden;
  }

  .world-map-expanded-mode-info h3 {
    margin: 0 0 0.35rem;
    font: 700 0.76rem/1.25 Georgia, "Yu Mincho", serif;
  }

  .world-map-expanded-info-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.3rem;
    max-height: calc(min(24dvh, 12rem) - 2.25rem);
    overflow: auto;
    overscroll-behavior: contain;
  }

  .world-map-expanded-info-item,
  .world-map-expanded-faction-item {
    min-width: 0;
    min-height: 44px;
    border: 1px solid rgba(91, 55, 32, 0.34);
    border-radius: 0.4rem;
    background: rgba(255, 247, 217, 0.56);
    color: inherit;
  }

  .world-map-expanded-info-item {
    display: grid;
    align-content: center;
    justify-items: start;
    padding: 0.28rem 0.4rem;
    text-align: left;
  }

  .world-map-expanded-info-item strong,
  .world-map-expanded-info-item small {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .world-map-expanded-info-item strong { font-size: 0.68rem; }
  .world-map-expanded-info-item small { font-size: 0.58rem; opacity: 0.8; }
  .world-map-expanded-info-item.is-current { border-color: #a56e1d; box-shadow: inset 0 0 0 1px #d2a84b; }
  .world-map-expanded-info-item:focus-visible { outline: 3px solid #332018; outline-offset: 1px; }

  .world-map-expanded-faction-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.45rem;
    font-size: 0.68rem;
  }

  .world-map-expanded-faction-item b { font-size: 1rem; }
  .world-map-expanded-faction-item--imperial b { color: #791f35; }
  .world-map-expanded-faction-item--allied b { color: #8b681a; }
  .world-map-expanded-faction-item--hostile b { color: #8e2025; }
  .world-map-expanded-faction-item--unknown b { color: #4d5753; }

  .imperial-world-map-card:is(.is-expanded, [data-world-map-expanded="true"])[data-world-map-fit="contain"] .world-map-legend {
    display: none;
  }
}

/* M2.2.1 — the current local hub is the primary play surface. */
.local-hub-main {
  height: auto;
  min-height: 0;
  overflow: visible;
}

.local-hub-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.85fr);
  grid-template-areas:
    "scene people"
    "situations people"
    "facilities ongoing"
    "facilities changes";
  gap: 0.8rem;
}

.local-hub-scene {
  grid-area: scene;
  position: relative;
  min-height: clamp(17.5rem, 32vh, 23.75rem);
  overflow: hidden;
  border: 1px solid rgba(215, 182, 137, 0.34);
  background: linear-gradient(145deg, #3c3435, #181317 70%);
  box-shadow: 0 1rem 2.8rem rgba(0, 0, 0, 0.28);
  isolation: isolate;
}

.local-hub-scene::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(12, 8, 11, 0.88) 0, rgba(12, 8, 11, 0.4) 48%, rgba(12, 8, 11, 0.08) 76%), linear-gradient(0deg, rgba(10, 7, 9, 0.58), transparent 60%);
  content: "";
  pointer-events: none;
}

.local-hub-scene > img,
.local-hub-scene-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.local-hub-scene-fallback {
  background:
    linear-gradient(155deg, transparent 44%, rgba(183, 142, 91, 0.24) 45% 53%, transparent 54%),
    linear-gradient(25deg, #1d171b, #60494a 52%, #92735b);
}

.local-hub-scene-copy {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: end;
  gap: 0.3rem;
  width: min(31rem, 72%);
  min-height: inherit;
  padding: 1.15rem;
  text-shadow: 0 2px 12px #000;
}

.local-hub-scene-copy h2,
.local-hub-scene-copy p { margin: 0; }
.local-hub-scene-copy h2 { color: #fff0cf; font-size: clamp(1.45rem, 2.7vw, 2.35rem); }
.local-hub-scene-copy > p:not(.section-label) { color: #e6d7c3; font-family: system-ui, sans-serif; font-size: 0.82rem; }
.local-hub-organization { font-weight: 700; }

.local-hub-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
}
.local-hub-tags li {
  padding: 0.24rem 0.48rem;
  border: 1px solid rgba(235, 200, 139, 0.55);
  border-radius: 999px;
  background: rgba(32, 21, 25, 0.7);
  color: #f1dbb3;
  font: 700 0.68rem/1.25 system-ui, sans-serif;
}

.world-map-launch {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 3;
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(233, 200, 142, 0.68);
  background: rgba(45, 28, 33, 0.9);
  color: #fff0ce;
}

.local-hub-situations,
.local-hub-facilities,
.local-hub-people,
.local-hub-ongoing,
.local-hub-changes {
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid rgba(215, 182, 137, 0.2);
  background: rgba(20, 14, 19, 0.84);
}
.local-hub-situations { grid-area: situations; }
.local-hub-people { grid-area: people; }
.local-hub-facilities { grid-area: facilities; }
.local-hub-ongoing { grid-area: ongoing; }
.local-hub-changes { grid-area: changes; }

.local-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
}
.local-section-heading h2,
.local-section-heading p { margin: 0; }
.local-section-heading h2 { color: #eadac5; font-size: 1rem; }
.local-section-heading button {
  min-height: 44px;
  border: 1px solid rgba(215, 182, 137, 0.3);
  background: transparent;
  color: #dfc89f;
}

.local-hub-situations ul,
.local-hub-ongoing ul { margin: 0; padding: 0; list-style: none; }
.local-hub-situations li {
  padding: 0.26rem 0 0.26rem 0.8rem;
  border-left: 2px solid #a86f5b;
  color: #d5c7b8;
  font: 0.76rem/1.42 system-ui, sans-serif;
}

.facility-icon-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.42rem;
}
.facility-icon-button {
  display: grid;
  grid-template-rows: 2rem auto;
  place-items: center;
  gap: 0.25rem;
  min-width: 0;
  min-height: 72px;
  padding: 0.42rem 0.3rem;
  border: 1px solid rgba(212, 174, 119, 0.27);
  background: rgba(40, 27, 31, 0.66);
  color: #eadac5;
  text-align: center;
}
.facility-icon-button > span:last-child { display: grid; min-width: 0; gap: 0.08rem; }
.facility-icon-button strong,
.facility-icon-button small { overflow-wrap: anywhere; }
.facility-icon-button strong { font-size: 0.72rem; }
.facility-icon-button small {
  display: -webkit-box;
  overflow: hidden;
  color: #aa9c91;
  font: 0.61rem/1.25 system-ui, sans-serif;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}
.facility-notice { color: #e0bd85; font: 700 0.6rem/1.2 system-ui, sans-serif; }
.facility-symbol { color: #d6ad69; font: 1.45rem/1 Georgia, serif; text-align: center; }

.hub-people-list {
  display: grid;
  gap: 0.5rem;
}
.hub-person-card {
  display: grid;
  grid-template-columns: 4.4rem minmax(0, 1fr);
  gap: 0.7rem;
  min-width: 0;
  min-height: 104px;
  padding: 0.55rem;
  border: 1px solid rgba(215, 182, 137, 0.25);
  background: rgba(11, 8, 11, 0.58);
  color: #eadac5;
  text-align: left;
}
.hub-person-portrait { display: grid; place-items: center; overflow: hidden; background: #30262b; color: #a9927c; font-size: 0.62rem; aspect-ratio: 3 / 4; }
.hub-person-portrait img { width: 100%; height: 100%; object-fit: cover; }
.hub-person-card > span:last-child { display: grid; align-content: center; gap: 0.13rem; min-width: 0; }
.hub-person-card strong { overflow-wrap: anywhere; color: #f0dfca; font-size: 0.92rem; }
.hub-person-card small,
.hub-person-card em { color: #b9aca2; font: normal 0.65rem/1.25 system-ui, sans-serif; overflow-wrap: anywhere; }
.meeting-state { width: max-content; margin-top: 0.15rem; padding: 0.15rem 0.35rem; border: 1px solid currentColor; font: 700 0.6rem/1 system-ui, sans-serif; }
.meeting-state.is-available { color: #d7b879; }
.meeting-state.is-unavailable { color: #bd8a8f; }

.local-hub-ongoing li { display: flex; justify-content: space-between; gap: 0.65rem; padding: 0.36rem 0; border-bottom: 1px solid rgba(215, 182, 137, 0.1); }
.local-hub-ongoing li:last-child { border-bottom: 0; }
.local-hub-ongoing strong { color: #dfcfbc; font-size: 0.73rem; overflow-wrap: anywhere; }
.local-hub-ongoing span { color: #9f9085; font: 0.65rem/1.3 system-ui, sans-serif; white-space: nowrap; }
.local-hub-changes > summary { min-height: 44px; color: #dcc8ac; cursor: pointer; font-weight: 700; line-height: 44px; }
.local-hub-changes ul { margin: 0.3rem 0; padding-left: 1.2rem; color: #bcaea2; font: 0.7rem/1.4 system-ui, sans-serif; }
.local-hub-empty { grid-column: 1 / -1; margin: 0; color: #b9aca2; font: 0.75rem/1.45 system-ui, sans-serif; }
.facility-detail h3 { overflow-wrap: anywhere; }

.world-map-strategy-layer:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 75;
  display: block;
  background: #100d10;
}
.world-map-strategy-layer > .map-view:not([hidden]) { width: 100%; height: 100%; }
.world-map-strategy-layer .imperial-map-card { height: 100%; overflow: auto; }
.world-map-strategy-layer .imperial-world-map-card:is(.is-expanded, [data-world-map-expanded="true"]) {
  display: grid;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

@media (max-width: 900px) {
  .local-hub-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "scene" "situations" "people" "facilities" "ongoing" "changes";
  }
  .local-hub-scene { min-height: clamp(10rem, 24vw, 17.5rem); }
  .hub-people-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .app-shell:has(.local-hub-main) { padding-bottom: calc(7.2rem + env(safe-area-inset-bottom)); }
  .local-hub-layout { gap: 0.45rem; }
  .local-hub-main { margin-top: 0.25rem; }
  .local-hub-scene { min-height: clamp(10rem, 48vw, 13.125rem); }
  .local-hub-scene-copy { width: 78%; min-height: inherit; padding: 0.7rem; }
  .local-hub-scene-copy h2 { font-size: 1.35rem; }
  .local-hub-scene-copy > p:not(.section-label) { font-size: 0.72rem; }
  .local-hub-tags li { font-size: 0.6rem; }
  .world-map-launch { right: 0.45rem; bottom: 0.45rem; padding: 0.42rem 0.55rem; font-size: 0.7rem; }
  .local-hub-situations,
  .local-hub-facilities,
  .local-hub-people,
  .local-hub-ongoing,
  .local-hub-changes { padding: 0.58rem; }
  .facility-icon-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .facility-icon-button { min-height: 68px; padding: 0.35rem 0.2rem; }
  .facility-icon-button small { display: none; }
  .hub-people-list { grid-template-columns: 1fr; }
}

@media (max-width: 340px) {
  .local-hub-scene { min-height: 7.8rem; }
  .local-hub-scene-copy { width: 82%; padding: 0.5rem; }
  .local-hub-scene-copy h2 { font-size: 1.02rem; }
  .local-hub-scene-copy .section-label,
  .local-hub-organization { display: none; }
  .local-hub-tags { gap: 0.2rem; }
  .local-hub-tags li { padding: 0.15rem 0.3rem; }
  .world-map-launch { min-height: 44px; max-width: 6.2rem; line-height: 1.1; }
  .facility-icon-list { gap: 0.25rem; }
  .facility-icon-button { min-height: 62px; padding: 0.25rem 0.12rem; }
  .facility-symbol { font-size: 1.25rem; }
  .facility-icon-button strong { font-size: 0.65rem; }
}

/* M2.2.2: concise, consequence-oriented important-event decisions. */
.event-identity { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem 0.65rem; }
.event-identity > * { margin: 0; }
.event-kind {
  padding: 0.18rem 0.42rem;
  border: 1px solid rgba(224, 189, 133, 0.5);
  color: #e0bd85;
  font: 700 0.68rem/1.2 system-ui, sans-serif;
}
.event-summary {
  margin: 0;
  padding: 0.65rem 0.75rem;
  border-left: 3px solid #c28b61;
  background: rgba(172, 87, 75, 0.12);
  color: #fff0dc;
  font: 700 0.92rem/1.45 system-ui, sans-serif;
}
.event-impact-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.event-impact-tags li {
  padding: 0.24rem 0.45rem;
  border: 1px solid rgba(202, 167, 116, 0.38);
  border-radius: 999px;
  color: #d7c3a5;
  font: 700 0.67rem/1.2 system-ui, sans-serif;
}
.event-choice-button { text-align: left; }
.event-choice-guidance { display: grid; gap: 0.16rem; }
.event-choice-guidance > span { display: block; }

@media (max-width: 600px) {
  .required-modal-layer { padding: 0.4rem; }
  .required-modal-layer .event-decision { max-height: calc(100dvh - 0.8rem); gap: 0.65rem; padding: 0.85rem; }
  .required-modal-layer .event-decision h2 { font-size: 1.25rem; }
  .event-summary { padding: 0.5rem 0.6rem; font-size: 0.82rem; }
  .event-body { font-size: 0.78rem; line-height: 1.5; }
  .event-choice-button { min-height: 44px; padding: 0.6rem 0.7rem; }
  .event-choice-guidance > span { font-size: 0.68rem; line-height: 1.35; }
}

/* M2.3.1: official transfer, preparation, travel and arrival. */
.transfer-order-surface {
  width: min(68rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  padding: clamp(1rem, 2.5vw, 2rem);
  border: 1px solid rgba(222, 183, 117, 0.55);
  background:
    linear-gradient(rgba(34, 20, 18, 0.96), rgba(20, 13, 15, 0.98)),
    repeating-linear-gradient(0deg, rgba(229, 196, 137, 0.025) 0 1px, transparent 1px 5px);
  box-shadow: 0 1.5rem 5rem rgba(0, 0, 0, 0.7), inset 0 0 5rem rgba(122, 54, 40, 0.18);
}
.transfer-order { display: grid; gap: 0.85rem; max-width: 60rem; margin: 0 auto; }
.transfer-order-heading,
.travel-heading,
.transfer-preparation-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.transfer-order-kicker,
.travel-kicker { margin: 0.25rem 0 0; color: #e2c28c; font: 700 0.78rem/1.3 system-ui, sans-serif; }
.transfer-order-seal {
  display: grid;
  flex: 0 0 3rem;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border: 2px solid #9e563f;
  border-radius: 50%;
  color: #d49b71;
  font-weight: 700;
  transform: rotate(-8deg);
}
.transfer-order h1 { overflow-wrap: anywhere; font-size: clamp(1.45rem, 3vw, 2.2rem); line-height: 1.15; }
.transfer-route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(2.5rem, 0.55fr) minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem;
  border-block: 1px solid rgba(218, 180, 119, 0.25);
}
.transfer-route > div { min-width: 0; }
.transfer-route > div:last-child { text-align: right; }
.transfer-route span:not(.transfer-route-line) { display: block; color: #9f9083; font: 0.72rem/1.3 system-ui, sans-serif; }
.transfer-route strong { display: block; margin-top: 0.2rem; overflow-wrap: anywhere; color: #fff0d6; font-size: clamp(0.92rem, 2vw, 1.2rem); line-height: 1.35; }
.transfer-route-line { position: relative; height: 1px; background: linear-gradient(90deg, #73503d, #d0a368); }
.transfer-route-line::after { position: absolute; right: 0; top: 50%; width: 0.55rem; height: 0.55rem; border-top: 1px solid #d0a368; border-right: 1px solid #d0a368; content: ""; transform: translateY(-50%) rotate(45deg); }
.transfer-decision-summary { margin: 0; color: #f4dfc1; font: 700 0.98rem/1.5 system-ui, sans-serif; }
.transfer-map-launch,
.travel-advance button,
.arrival-continue {
  min-height: 44px;
  border: 1px solid #be9560;
  background: linear-gradient(#6c2e31, #421b20);
  color: #fff0d8;
  font-weight: 700;
  cursor: pointer;
}
.transfer-map-launch { width: 100%; padding: 0.7rem; }
.transfer-map-note { margin: -0.45rem 0 0; color: #ad9d8b; font: 0.72rem/1.45 system-ui, sans-serif; }
.transfer-choice-section { display: grid; gap: 0.5rem; padding-block: 0.15rem; }
.transfer-choice-section h2 { margin: 0.15rem 0 0; color: #f0dfca; font-size: 1.05rem; }
.transfer-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.55rem; }
.transfer-choice-button { min-width: 0; min-height: 8.5rem; padding: 0.75rem; overflow-wrap: anywhere; }
.transfer-choice-button .event-choice-guidance > span { font-size: 0.75rem; }
.transfer-order-facts,
.travel-facts,
.arrival-summary dl,
.transfer-preparation dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; background: rgba(202, 165, 106, 0.16); }
.transfer-order-facts div,
.travel-facts div,
.arrival-summary dl div,
.transfer-preparation dl div { min-width: 0; padding: 0.65rem; background: rgba(20, 13, 15, 0.92); }
.transfer-order-facts dt,
.travel-facts dt,
.arrival-summary dt,
.transfer-preparation dt { color: #9f8c7b; font: 0.69rem/1.3 system-ui, sans-serif; }
.transfer-order-facts dd,
.travel-facts dd,
.arrival-summary dd,
.transfer-preparation dd { margin: 0.25rem 0 0; overflow-wrap: anywhere; color: #ead8bd; line-height: 1.4; }
.transfer-action-error { margin: 0; padding: 0.7rem; border-left: 3px solid #b85b5b; color: #ffd2d2; background: rgba(126, 37, 43, 0.2); }

.transfer-preparation {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 0.6rem;
  padding: clamp(0.75rem, 2vw, 1rem);
  border: 1px solid rgba(211, 172, 106, 0.35);
  border-left: 4px solid #a85c43;
  background: linear-gradient(120deg, rgba(79, 34, 34, 0.62), rgba(28, 19, 22, 0.96));
}
.transfer-preparation h2 { margin: 0.15rem 0 0; font-size: 1.15rem; }
.transfer-preparation-heading > span { color: #d7bd98; font: 700 0.75rem/1.3 system-ui, sans-serif; }
.transfer-preparation > p { margin: 0; color: #d6c3aa; font: 0.79rem/1.5 system-ui, sans-serif; }
.transfer-preparation-note { color: #aa9989 !important; }

.travel-frontend {
  display: grid;
  gap: clamp(0.8rem, 2vw, 1.25rem);
  width: min(58rem, 100%);
  min-height: min(42rem, calc(100dvh - 10rem));
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid rgba(204, 170, 112, 0.3);
  background:
    radial-gradient(circle at 75% 20%, rgba(151, 94, 55, 0.17), transparent 18rem),
    linear-gradient(150deg, rgba(44, 29, 26, 0.98), rgba(16, 12, 16, 0.99));
}
.travel-heading h1 { margin-top: 0.35rem; line-height: 1.2; }
.travel-document-mark { color: rgba(210, 174, 111, 0.55); font-size: 2rem; letter-spacing: 0.18em; }
.travel-phase { margin: 0; color: #e1c595; font-weight: 700; }
.travel-road { display: grid; grid-template-columns: 0.8rem 1fr 0.8rem; align-items: center; padding-inline: 0.75rem; }
.travel-road span { width: 0.8rem; height: 0.8rem; border: 2px solid #d0a268; border-radius: 50%; }
.travel-road i { height: 0.28rem; background: repeating-linear-gradient(90deg, #886044 0 1rem, transparent 1rem 1.45rem); }
.travel-policy-state { padding: 0.8rem; border-left: 3px solid #876142; background: rgba(220, 183, 121, 0.06); }
.travel-policy-state h2 { margin: 0; font-size: 1rem; }
.travel-policy-state p { margin: 0.45rem 0 0; color: #c9b69d; line-height: 1.55; }
.travel-suspended { color: #e3c38d !important; }
.travel-advance { display: grid; grid-template-columns: 1fr minmax(11rem, 16rem); align-items: center; gap: 1rem; margin-top: auto; }
.travel-advance p { margin: 0; color: #b8a99a; font: 0.76rem/1.5 system-ui, sans-serif; }

.arrival-frontend { display: grid; gap: 0.8rem; width: min(58rem, 100%); margin: 0 auto; }
.arrival-scene { position: relative; min-height: clamp(14rem, 38vw, 24rem); overflow: hidden; border: 1px solid rgba(213, 177, 115, 0.32); background: #211719; }
.arrival-scene img,
.arrival-scene > [data-arrival="scene-fallback"] { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: linear-gradient(135deg, #4c3834, #171417); }
.arrival-scene-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 8, 10, 0.88), rgba(10, 8, 10, 0.16) 72%); }
.arrival-scene-copy { position: relative; z-index: 1; display: grid; align-content: end; width: min(80%, 34rem); min-height: inherit; padding: clamp(1rem, 4vw, 2.5rem); }
.arrival-scene-copy > p { margin: 0.25rem 0; color: #dbc19b; }
.arrival-scene-copy h1 { margin-top: 0.3rem; overflow-wrap: anywhere; font-size: clamp(1.8rem, 5vw, 3.25rem); line-height: 1; }
.arrival-summary,
.arrival-people { padding: 0.85rem; border: 1px solid rgba(208, 171, 111, 0.22); background: rgba(25, 17, 20, 0.9); }
.arrival-summary h2,
.arrival-people h2 { margin: 0 0 0.65rem; font-size: 1.05rem; }
.arrival-people ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.35rem; margin: 0; padding-left: 1.2rem; }
.arrival-note { margin: 0; color: #bdae9c; line-height: 1.5; }
.arrival-continue { justify-self: end; min-width: 12rem; padding: 0.65rem 1rem; }

.transfer-map-context {
  position: fixed;
  z-index: 41;
  top: max(0.5rem, env(safe-area-inset-top));
  left: 50%;
  display: grid;
  gap: 0.15rem;
  width: min(34rem, calc(100% - 1rem));
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(216, 180, 117, 0.6);
  background: rgba(25, 15, 18, 0.96);
  color: #ead8bc;
  transform: translateX(-50%);
  pointer-events: none;
}
.transfer-map-context strong { overflow-wrap: anywhere; color: #fff0d5; }
.transfer-map-context span,
.transfer-map-context small { color: #c3af94; font: 0.72rem/1.35 system-ui, sans-serif; }
.transfer-map-preview { max-width: 52rem; margin: 1rem auto; padding: 1rem; }
.transfer-map-instruction { padding: 0.65rem; border-left: 3px solid #a85c43; background: rgba(119, 52, 44, 0.18); }
.transfer-map-preview .is-transfer-destination { color: #f0c987; font-weight: 700; }

:is(.transfer-map-launch, .travel-advance button, .arrival-continue, .transfer-choice-button):focus-visible {
  outline: 3px solid #f0c987;
  outline-offset: 3px;
}

@media (min-width: 900px) {
  .arrival-frontend {
    grid-template-columns: minmax(0, 1.35fr) minmax(20rem, 0.65fr);
    width: min(74rem, 100%);
    align-items: start;
  }
  .arrival-scene { grid-row: 1 / 6; min-height: min(34rem, calc(100dvh - 9rem)); }
  .arrival-summary,
  .arrival-people,
  .arrival-note,
  .arrival-continue { grid-column: 2; }
  .arrival-summary dl div:last-child { grid-column: 1 / -1; }
  .arrival-people ul { grid-template-columns: 1fr; }
  .arrival-continue { justify-self: stretch; width: 100%; }
}

@media (max-width: 600px) {
  .transfer-order-surface { width: calc(100vw - 0.6rem); max-height: calc(100dvh - 0.6rem); padding: 0.75rem; }
  .transfer-order { gap: 0.55rem; }
  .transfer-order h1 { font-size: 1.32rem; }
  .transfer-order-seal { width: 2.35rem; height: 2.35rem; flex-basis: 2.35rem; font-size: 0.75rem; }
  .transfer-route { padding: 0.45rem 0; }
  .transfer-route strong { font-size: 0.85rem; }
  .transfer-decision-summary { font-size: 0.82rem; line-height: 1.35; }
  .transfer-map-launch { padding: 0.52rem; font-size: 0.78rem; }
  .transfer-map-note { font-size: 0.75rem; }
  .transfer-choice-section h2 { font-size: 0.88rem; }
  .transfer-choices { grid-template-columns: 1fr; }
  .transfer-choice-button { min-height: 44px; }
  .transfer-order-facts,
  .travel-facts,
  .arrival-summary dl,
  .transfer-preparation dl { grid-template-columns: 1fr; }
  .transfer-preparation { margin-inline: 0; }
  .travel-frontend { min-height: calc(100dvh - 8.5rem); padding: 0.8rem; }
  .travel-heading h1 { font-size: 1.35rem; }
  .travel-document-mark { display: none; }
  .travel-advance { grid-template-columns: 1fr; }
  .travel-advance button { width: 100%; min-height: 48px; }
  .arrival-scene { min-height: 12rem; }
  .arrival-scene-copy { width: 88%; padding: 0.85rem; }
  .arrival-people ul { grid-template-columns: 1fr; }
  .arrival-continue { justify-self: stretch; width: 100%; min-height: 48px; }
}

@media (max-width: 340px) {
  .transfer-order-surface { width: calc(100vw - 0.25rem); max-height: calc(100dvh - 0.25rem); padding: 0.55rem; }
  .transfer-order { gap: 0.45rem; }
  .transfer-order .section-label { font-size: 0.57rem; }
  .transfer-order h1 { font-size: 1.12rem; }
  .transfer-route { grid-template-columns: minmax(0, 1fr) 1.8rem minmax(0, 1fr); }
  .transfer-route strong { font-size: 0.76rem; }
  .transfer-decision-summary { font-size: 0.75rem; }
  .transfer-map-launch { font-size: 0.72rem; }
  .travel-frontend { padding: 0.55rem; }
}

@media (prefers-reduced-motion: reduce) {
  .transfer-order-seal { transform: none; }
}
