:root {
  color-scheme: dark;
  --bg: #131b1c;
  --panel: #1b2726;
  --panel-deep: #182221;
  --map: #294944;
  --ink: #f0e2c9;
  --muted: #b6b5a2;
  --faint: #889990;
  --gold: #dfab70;
  --gold-pale: #f3cb96;
  --line: #56695d75;
  --danger: #ffae99;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", Arial, sans-serif;
  --shadow: 0 18px 54px #050c0b40;
}
*, *::before, *::after { box-sizing: border-box; }
html { min-width: 290px; }
body {
  margin: 0;
  background: radial-gradient(ellipse at 30% 0, #233533 0, transparent 56%), var(--bg);
  color: var(--ink);
  font: 1rem/1.5 var(--sans);
}
button, input, select { font: inherit; }
button, a, input, select { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .56; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--gold-pale);
  outline-offset: 3px;
}
a { color: inherit; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.12; }
h2 { font-size: 1.48rem; }
h3 { font-size: 1.2rem; }
strong, b { font-weight: 650; }
input, select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 45px;
  padding: .58rem .75rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #101a18;
  color: var(--ink);
}
input::placeholder { color: #a4a89b; opacity: 1; }
input:hover, select:hover { border-color: #9caa9585; }
select:disabled { opacity: .82; }
label { display: block; color: var(--muted); font-size: .79rem; font-weight: 650; }
.eyebrow {
  color: var(--gold-pale);
  font: 700 .7rem/1.4 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eyebrow > span { margin-right: .25em; }
.icon { display: inline-block; line-height: 1; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.noscript { margin: 2rem auto; text-align: center; }
.masthead {
  border-bottom: 1px solid #acbaa22b;
  background: #172321d9;
}
.masthead-inner {
  max-width: 1512px;
  min-height: 65px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 60px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
}
.wordmark {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: .62rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: 1.2rem/1 var(--serif);
  white-space: nowrap;
}
.compass-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #d5a8738c;
  border-radius: 50%;
  color: var(--gold-pale);
  font-size: 1.25rem;
}
.head-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(.55rem, 2.4vw, 1.7rem);
  font-size: .85rem;
  color: var(--muted);
}
.head-links a, .head-links button {
  display: inline-grid;
  place-items: center;
  min-height: 44px;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  text-decoration: none;
}
.head-links a:hover, .head-links button:hover { color: var(--gold-pale); }
.connection {
  padding: .22rem .5rem;
  border-radius: 30px;
  background: #4a786c43;
  color: #d7eee0;
  font-size: .68rem;
  white-space: nowrap;
}
.connection::before { content: '•'; padding-right: .33rem; color: #98c7a8; }
.connection.offline { background: #9e4c3b39; color: var(--danger); }
.connection.offline::before { color: var(--danger); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  min-height: 42px;
  padding: .58rem .9rem;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: .86rem;
  font-weight: 700;
  line-height: 1.25;
}
.button-main {
  background: var(--gold);
  border-color: #f2c38e;
  color: #241e19;
}
.button-main:hover { background: var(--gold-pale); }
.button-outline {
  background: #293633;
  border-color: #73877b7d;
  color: var(--ink);
}
.button-outline:hover { background: #3b4e46; }
.button-quiet {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.button-quiet:hover { color: var(--ink); background: #c1cdb00f; }
.notice {
  position: fixed;
  z-index: 3;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  width: min(390px, calc(100vw - 2rem));
  padding: .85rem 1rem;
  border: 1px solid var(--gold);
  border-radius: 5px;
  background: #16231e;
  color: var(--ink);
  box-shadow: var(--shadow);
}
dialog {
  width: min(590px, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: clamp(20px, 5vw, 36px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #21312d;
  color: var(--ink);
  box-shadow: 0 20px 70px #080f0e8c;
}
dialog::backdrop { background: #070e0dcc; }
dialog .dialog-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
}
dialog .dialog-close:hover { color: var(--ink); background: #e4ddbb13; }
dialog h2 { margin: .25em 0; font-size: 2rem; }
dialog #modal-content > p:not(.eyebrow) { margin-top: .65rem; color: var(--muted); }
dialog label { margin-top: 1.25rem; }
dialog input { margin-top: .4rem; }
dialog .button { margin-top: .8rem; }
.rules { display: grid; gap: .7rem; margin-bottom: 0; padding-left: 1.25rem; color: var(--muted); }
.rules strong { color: var(--ink); }

.entrance {
  width: min(1420px, 100%);
  min-height: calc(100svh - 65px);
  margin: 0 auto;
  padding: clamp(30px, 6vw, 82px) clamp(18px, 5vw, 70px);
  display: grid;
  grid-template-columns: minmax(345px, .87fr) minmax(0, 1.13fr);
  align-items: stretch;
  gap: clamp(30px, 6vw, 89px);
}
.welcome { display: flex; flex-direction: column; justify-content: center; }
.welcome h1 {
  margin: .14em 0 .23em;
  font-size: clamp(3.1rem, 7vw, 7.6rem);
  line-height: .88;
  letter-spacing: -.06em;
}
.welcome h1 em { color: var(--gold-pale); font-weight: inherit; }
.lede { max-width: 33rem; color: #d5d3c3; font-size: clamp(1.05rem, 1.8vw, 1.34rem); text-wrap: pretty; }
.entry-card {
  margin-top: clamp(1.2rem, 4vw, 2.3rem);
  max-width: 410px;
  padding: .95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #1b2826;
  box-shadow: 0 7px 25px #0e171639;
}
.entry-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .27rem;
  padding: .24rem;
  margin-bottom: .95rem;
  border: 1px solid #6c837244;
  border-radius: 4px;
  background: #14201e;
}
.entry-switch button, .feed-tabs button {
  min-height: 38px;
  padding: .28rem .4rem;
  border: 0;
  border-radius: 3px;
  color: var(--muted);
  background: transparent;
  font-size: .8rem;
  font-weight: 700;
}
.entry-switch button:hover, .feed-tabs button:hover { color: var(--ink); }
.entry-switch button.current, .feed-tabs button[aria-pressed="true"] { color: var(--ink); background: #38514a; }
.entry-form { display: grid; gap: .4rem; }
.entry-form label:not(:first-child) { margin-top: .26rem; }
.entry-submit { justify-content: space-between; margin-top: .25rem; }
.resume-link {
  min-height: 34px;
  padding: .35rem 0 0;
  border: 0;
  color: var(--gold-pale);
  background: transparent;
  font-size: .8rem;
}
.resume-link:hover { text-decoration: underline; }
.cover {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid #8a9b79;
  border-radius: 44% 44% 3px 3px / 23% 23% 3px 3px;
  background:
    repeating-radial-gradient(ellipse at 60% 48%, #57776670 0 1px, transparent 1px 42px),
    linear-gradient(160deg, #44655e, #182926 80%);
  box-shadow: var(--shadow);
}
.cover img { display: block; width: 100%; height: 100%; inset: 0; position: absolute; object-fit: cover; object-position: center; }
.cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(179deg, transparent 55%, #13262369); pointer-events: none; }
.cover-rule { position: absolute; z-index: 1; inset: 12px; border: 1px solid #f1e2b058; border-radius: inherit; pointer-events: none; }
.cover-compass {
  position: absolute;
  z-index: 1;
  right: 28px;
  bottom: 28px;
  display: grid;
  place-items: center;
  width: 57px;
  height: 57px;
  border: 1px solid #f3cf96ab;
  border-radius: 50%;
  background: #202e27af;
  color: #f3cf96;
  font-size: 1.9rem;
}
.cover-compass span { position: absolute; top: -13px; font-size: .65rem; }

.shell { width: min(1512px, 100%); margin: 0 auto; padding: 2rem clamp(16px, 4vw, 60px) 3rem; }
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.35rem;
}
.page-heading h1 {
  margin-top: .2em;
  font-size: clamp(2.1rem, 5vw, 4rem);
  letter-spacing: -.045em;
}
.heading-buttons { display: flex; flex-wrap: wrap; gap: .55rem; }
.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}
.section-head, .notes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
}
.section-head > span { color: var(--faint); font-size: .8rem; white-space: nowrap; }
.lobby-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(270px, 1fr); gap: 1rem; }
.setup, .lobby-crew, .role-picker { padding: clamp(1rem, 3vw, 1.45rem); }
.setup-selects {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: .75rem;
  margin-top: 1.1rem;
}
.setup-selects select { margin-top: .25rem; }
.scenario-copy { margin-top: 1rem; color: var(--muted); }
.itinerary {
  list-style: none;
  padding: 0;
  margin: 1.1rem 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.itinerary li { position: relative; padding: 1.1rem .75rem .85rem; }
.itinerary li:not(:last-child) { border-right: 1px solid var(--line); }
.itinerary li::before {
  content: '';
  position: absolute;
  top: -4px;
  left: .75rem;
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  background: var(--gold);
}
.itinerary strong, .itinerary span { display: block; }
.itinerary strong { line-height: 1.3; }
.itinerary span { margin-top: .25rem; color: var(--muted); font-size: .82rem; }
.setup-start { margin-top: 1.2rem; }
.roster { list-style: none; padding: 0; margin: .75rem 0 0; }
.roster li {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
  padding: .6rem 0;
  border-top: 1px solid var(--line);
}
.roster li > span:nth-child(2) { flex: 1; overflow-wrap: anywhere; }
.roster strong, .roster strong + span { display: block; }
.roster strong + span { font-size: .78rem; color: var(--muted); }
.roster small, .player-top small { color: var(--gold-pale); font: 700 .69rem var(--sans); }
.host-label {
  padding: .24rem .46rem;
  border: 1px solid #ae947562;
  border-radius: 3px;
  white-space: nowrap;
}
.lobby-chat { margin-top: 1rem; }
.lobby-chat .section-head h2 { font-size: 1.15rem; }
.role-picker { grid-column: 1 / -1; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: .65rem; margin-top: 1rem; }
.role-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  min-width: 0;
  min-height: 156px;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: var(--panel-deep);
}
.role-card .role-ability { flex: 1; margin: .6rem 0 .55rem; color: var(--muted); font-size: .82rem; }
.role-card:hover:not(:disabled) { background: #283e36; }
.role-card.chosen { border-color: var(--gold); background: #3d3f30; }
.role-card.chosen .role-ability { color: #e1d7bc; }
.role-top { display: flex; align-items: center; gap: .5rem; }
.role-icon {
  display: inline-grid;
  place-content: center;
  flex: 0 0 auto;
  width: 37px;
  height: 37px;
  border: 1px solid color-mix(in srgb, var(--role-color) 70%, transparent);
  border-radius: 50%;
  color: var(--role-color);
  background: #16231f;
  font-size: 1.18rem;
}
.role-status { margin-left: auto; color: var(--gold-pale); }
.role-stats { font-size: .71rem; color: var(--gold-pale); }
.role-skills { display: flex; flex-wrap: wrap; gap: .15rem .65rem; margin-top: .35rem; color: var(--muted); font-size: .69rem; }
.feed-scroll {
  overflow: auto;
  scrollbar-color: #678078 transparent;
  padding: .2rem .1rem;
  min-height: 5.4rem;
  max-height: 14rem;
  overscroll-behavior: contain;
}
.chat-list, .log-list { list-style: none; margin: 0; padding: 0; }
.chat-message { display: grid; grid-template-columns: minmax(78px, .38fr) minmax(0, 1fr); gap: .5rem; padding: .4rem 0; border-top: 1px solid var(--line); font-size: .8rem; }
.chat-message strong, .chat-message span, .log-list li { overflow-wrap: anywhere; }
.chat-message strong { color: var(--gold-pale); }
.empty-note { color: var(--muted); font-size: .82rem; }
.chat-form { display: flex; gap: .3rem; margin-top: .4rem; }
.chat-form input { min-height: 40px; }
.chat-form .button { flex: 0 0 42px; padding: .4rem; }

.table-heading { padding-bottom: 1rem; }
.table-heading h1 { font-size: clamp(2rem, 4.5vw, 3.8rem); }
.mission-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, minmax(75px, auto));
  gap: 0;
  margin-bottom: 1rem;
  border: 1px solid #bba67c69;
  border-radius: 6px;
  background: linear-gradient(110deg, #3b3e31, #28332b);
}
.chapter-brief { padding: .75rem clamp(.8rem, 2vw, 1.2rem); }
.chapter-brief h2 { margin: .15rem 0; }
.chapter-brief > p:last-child { color: #dad3ba; font-size: .82rem; }
.chapter-brief .icon { color: var(--gold-pale); }
.table-meter {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 90px;
  border-left: 1px solid #bba67c60;
  padding: .5rem clamp(.75rem, 2vw, 1.25rem);
}
.table-meter > span { color: var(--muted); font-size: .75rem; }
.table-meter strong { font-family: var(--serif); font-size: 1.55rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-meter.pressure strong { color: var(--danger); }
.pressure-line {
  height: 3px;
  overflow: hidden;
  border-radius: 2px;
  background: #18201d;
}
.pressure-line span { display: block; height: 100%; width: var(--fill); background: #edac83; }
.table-grid { display: grid; grid-template-columns: minmax(0, 2.65fr) minmax(245px, 1fr); gap: 1rem; align-items: start; }
.map-card {
  min-width: 0;
  overflow: hidden;
  padding: 13px;
  border: 1px solid #aeb9958a;
  border-radius: 6px;
  background: #283d36;
  box-shadow: var(--shadow);
}
.map-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin: .1rem .35rem .65rem; }
.map-top p { color: var(--muted); font-size: .76rem; }
.map-scroll { overflow: auto; max-height: var(--map-zoom-max, none); scrollbar-color: #678078 transparent; touch-action: pan-x pan-y; }
.map-scroll.panning { cursor: grabbing; user-select: none; }
.map-zoom { display: flex; flex: 0 0 auto; align-items: center; gap: .28rem; }
.map-zoom .button { padding: .3rem .56rem; min-width: 34px; min-height: 34px; line-height: 1; }
.map-zoom .button[data-map-zoom="reset"] { min-width: 57px; font-size: .79rem; font-variant-numeric: tabular-nums; }
.map-zoom .button:disabled { opacity: .42; cursor: default; }
/* Terrain, routes and city pins use the same equirectangular map frame. */
.map-field {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-width: 720px;
  min-height: 360px;
  aspect-ratio: 2;
  outline: 1px solid #c0be9260;
  outline-offset: -1px;
  background: radial-gradient(ellipse at 38% 30%, #294b50, transparent 74%), #1e383f;
}
#route-map { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; }
.map-compass {
  position: absolute;
  inset: auto auto 12% 4%;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid #c9c4a58c;
  border-radius: 50%;
  color: #d3ccaa;
  font-size: 1.85rem;
  pointer-events: none;
}
.map-compass span { position: absolute; top: -14px; font: .64rem var(--serif); }
.map-node {
  position: absolute;
  z-index: 1;
  top: var(--y);
  left: var(--x);
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: transparent;
  color: #eee5c8;
}
.map-node:hover, .map-node:focus-visible, .map-node.inspected { z-index: 4; }
.map-pin {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid #efe1bb9c;
  border-radius: 50%;
  background: #20302b;
  box-shadow: 0 1px 8px #13211ee8;
  font-size: .79rem;
  line-height: 1;
}
.map-node.can-go .map-pin { border-color: #efbe76; color: #ffe0ad; }
.map-node.goal-node .map-pin { background: #edc58b; border-color: #fff0c8; color: #3d2c20; }
.map-node.here .map-pin { box-shadow: 0 0 0 3px #8ac4ae, 0 2px 6px #101a18; }
.map-node.inspected .map-pin, .map-node:hover .map-pin { outline: 2px solid var(--gold-pale); outline-offset: 4px; background: #5e4d35; color: #fff0c8; }
.map-label {
  position: absolute;
  top: calc(50% + var(--label-y, 18px));
  left: calc(50% + var(--label-x, 0px));
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: .22rem;
  background: #101f21f2;
  border: 1px solid #b2bfac66;
  color: #fff3d4;
  border-radius: 4px;
  padding: .12rem .34rem;
  white-space: nowrap;
  font-size: clamp(.66rem, 1.15vw, .76rem);
  font-weight: 720;
  line-height: 1.25;
}
.map-node:hover .map-label, .map-node.inspected .map-label { border-color: #efbe76; color: #fff6dd; }
.map-threat {
  display: grid;
  place-items: center;
  min-width: 14px;
  height: 14px;
  padding: 0 .13rem;
  border-radius: 8px;
  color: #28120e;
  background: #ffaf92;
  font-size: .62rem;
  font-weight: 850;
  line-height: 1;
}
.map-source { margin-left: auto; opacity: .8; }
.map-key { display: flex; flex-wrap: wrap; gap: .25rem 1.15rem; margin: .65rem .35rem 0; color: #d2d7c3; font-size: .71rem; }
.map-key .icon { color: var(--gold-pale); }
.map-key > span:nth-child(2) .icon { color: #aad9bc; }
.map-key > span:nth-child(3) .icon { color: var(--danger); }
.map-key i { display: inline-block; width: 15px; margin-right: .18rem; border-top: 1px solid var(--muted); vertical-align: middle; }
.map-key .line-sea { border-top-style: dashed; }

.action-rail { overflow: hidden; }
.turn-head, .site-detail, .action-group, .pending { padding: .75rem .85rem; }
.turn-head { background: #31443b; }
.turn-head h2, .site-detail h3, .pending h3 { margin-top: .2rem; }
.turn-head > p:last-child, .site-detail > p:not(.eyebrow), .pending > p:not(.eyebrow) { margin-top: .3rem; color: var(--muted); font-size: .83rem; }
.site-detail, .action-group { border-top: 1px solid var(--line); }
.site-state { display: flex; flex-wrap: wrap; gap: .25rem .4rem; margin: .45rem 0 .05rem; }
.state-chip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: .15rem;
  min-width: max-content;
  padding: .13rem .38rem;
  border-radius: 3px;
  background: #42605788;
  color: #d9e8d2;
  font-size: .69rem;
}
.threat-chip { color: var(--danger); background: #784b3e65; }
.goal-chip { color: var(--gold-pale); background: #7d693964; }
.pending { border-top: 1px solid var(--gold); background: linear-gradient(135deg, #3b3d2d, #26382d); }
.choice-buttons { display: grid; gap: .4rem; margin-top: .65rem; }
.choice {
  display: grid;
  gap: .18rem;
  padding: .55rem .65rem;
  text-align: left;
  border: 1px solid #ab946e;
  border-radius: 4px;
  color: var(--ink);
  background: #344337;
  font-size: .8rem;
}
.choice:hover { background: #4d5340; border-color: var(--gold-pale); }
.choice span { color: var(--muted); font-size: .72rem; }
.choice-risk { border-color: #c3806c; background: #654538; }
.choice-risk:hover { background: #785443; }
.choice-risk span { color: #f7d8c8; }
.action-group { display: grid; gap: .34rem; }
.action-group > .eyebrow:not(:first-child) { margin-top: .35rem; }
.site-detail .action-button { margin-top: .55rem; }
.action-button {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: .36rem;
  align-items: center;
  min-height: 39px;
  width: 100%;
  padding: .39rem .54rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #263a33;
  color: var(--ink);
  text-align: left;
  font-size: .83rem;
}
.action-button:hover { border-color: var(--gold-pale); background: #405344; }
.action-button .icon { color: var(--gold-pale); font-size: 1rem; }
.action-button small { display: block; margin-top: .05rem; color: var(--muted); font-size: .68rem; }
.action-button .action-cost { white-space: nowrap; text-align: right; }
.action-button.action-strong, .action-button.action-strong:hover { color: #271f17; border-color: var(--gold-pale); background: var(--gold); font-weight: 750; }
.action-button.action-strong:hover { background: var(--gold-pale); }
.action-button.action-strong .icon, .action-button.action-strong small { color: #38281b; }

.field-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, .8fr); gap: 1rem; margin-top: 1rem; }
.field-grid > .panel { padding: .85rem; min-width: 0; }
.field-crew > .section-head, .latest > .section-head { margin: 0 0 .55rem; }
.player-card { padding: .5rem .3rem; border-top: 1px solid var(--line); }
.player-card.player-active { border-left: 2px solid var(--gold); padding-left: .4rem; }
.player-card.player-down { opacity: .8; }
.player-top { display: flex; align-items: flex-start; gap: .43rem; }
.player-top div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.player-top h3 { font-size: 1rem; margin: .08rem 0 .2rem; }
.player-top p, .vitals, .items { color: var(--muted); font-size: .71rem; }
.player-top .role-icon { width: 27px; height: 27px; font-size: .9rem; }
.vitals, .items { display: flex; flex-wrap: wrap; gap: .3rem .6rem; padding: .3rem 0 0 1.85rem; }
.vitals span { white-space: nowrap; }
.vitals .icon { color: var(--gold-pale); }
.items { color: #dbc4a2; }
.items:empty { display: none; }
.notes-head h2 { font-size: 1.24rem; }
.feed-tabs { display: flex; min-width: 0; align-items: center; gap: .13rem; }
.feed-tabs button { padding: .25rem .38rem; min-height: 32px; font-size: .71rem; }
.notes .feed-scroll { margin-top: .3rem; }
.log-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .5rem; padding: .4rem .1rem; border-top: 1px solid var(--line); font-size: .78rem; }
.log-round { display: grid; place-items: center; align-self: start; min-width: 22px; min-height: 22px; padding: .01rem .12rem; border: 1px solid #7285758f; border-radius: 50%; color: var(--gold-pale); line-height: 1; }
.roll, .last-event { border-top: 1px solid var(--line); padding: .55rem 0 .15rem; }
.roll-heading { display: flex; justify-content: space-between; gap: .3rem; font-size: .8rem; }
.roll-heading strong { min-width: 0; overflow-wrap: anywhere; }
.roll-heading span { color: var(--danger); }
.roll-good .roll-heading span { color: #aed5ad; }
.dice-result { display: flex; flex-wrap: wrap; gap: .33rem; align-items: center; margin: .4rem 0; color: var(--muted); font-size: .75rem; }
.die { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 4px; background: var(--gold-pale); color: #372b20; font-size: .9rem; font-weight: 750; }
.last-event h3 { margin: .2rem 0; }
.last-event > p:last-child { color: var(--muted); font-size: .81rem; }
.outcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .9rem;
  border: 1px solid #c29078;
  border-radius: 5px;
  margin-bottom: 1rem;
  padding: 1rem;
  background: #5d4034;
}
.outcome.outcome-good { border-color: #a9bd94; background: #384b32; }
.outcome h2 { margin: .18rem 0; font-size: 1.85rem; }
.outcome p:last-child { font-size: .95rem; }

.atlas-dock, .map-city-picker { display: none; }
@media (max-width: 760px), (pointer: coarse) and (max-width: 1100px) {
  .table:has(.atlas-dock) { padding-bottom: calc(5.2rem + env(safe-area-inset-bottom)); }
  .atlas-dock {
    position: fixed;
    z-index: 2;
    inset: auto 0 0;
    display: flex;
    justify-content: center;
    gap: .45rem;
    padding: .5rem max(.7rem, env(safe-area-inset-right)) calc(.5rem + env(safe-area-inset-bottom)) max(.7rem, env(safe-area-inset-left));
    background: #172321f7;
    border-top: 1px solid var(--line);
  }
  .atlas-dock .button { flex: 1 1 auto; max-width: 15rem; min-height: 44px; padding-inline: .5rem; }
  .atlas-dock #quick-end { flex-grow: 2; }
  body:has(input:focus) .atlas-dock { visibility: hidden; }
  input, select { font-size: 16px; }
  .map-zoom .button, .dialog-close, .action-button, .choice, .feed-tabs button {
    min-height: 44px;
  }
  .map-zoom .button, dialog .dialog-close { min-width: 44px; }
  .map-scroll { max-height: min(var(--map-zoom-max, 1000px), clamp(215px, 42svh, 390px)); }
  .map-node { width: 40px; height: 40px; }
  .map-city-picker { display: flex; align-items: center; gap: .6rem; padding: .5rem .3rem 0; }
  .map-city-picker label { white-space: nowrap; }
  .map-card, .action-rail { scroll-margin-block: .6rem 5rem; }
}
@media (max-width: 1050px) {
  .entrance { grid-template-columns: minmax(284px, .95fr) minmax(0, 1.05fr); }
  .cover { min-height: 490px; }
  .table-grid { grid-template-columns: minmax(0, 1.8fr) minmax(235px, 1fr); }
  .field-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
  .latest { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .entrance { min-height: auto; padding-top: 2rem; gap: 1.4rem; grid-template-columns: minmax(0, 1fr); }
  .welcome h1 { font-size: clamp(3rem, 12vw, 5.2rem); }
  .welcome { z-index: 1; }
  .cover { min-height: 320px; border-radius: 42% 42% 3px 3px / 20% 20% 3px 3px; }
  .entry-card { width: 100%; max-width: 480px; }
  .table-grid { grid-template-columns: 1fr; }
  .action-rail { grid-row: 2; }
  .action-rail:has(.pending) { grid-row: 1; }
  .lobby-grid { grid-template-columns: minmax(0, 1fr); }
  .lobby-crew { grid-row: 3; }
  .shell { padding-top: 1.4rem; }
}
@media (max-width: 480px) {
  .masthead-inner { min-height: 60px; padding-inline: 12px; }
  .wordmark { gap: .35rem; font-size: 1rem; }
  .compass-mark { width: 24px; height: 24px; font-size: 1rem; }
  .head-links { gap: .65rem; font-size: .73rem; }
  .head-links .connection { height: 10px; width: 10px; padding: 0; overflow: hidden; color: transparent; background: #98c7a8; }
  .head-links .connection.offline { background: var(--danger); }
  .head-links .connection::before { display: none; }
  .page-heading { flex-direction: column; align-items: flex-start; gap: .7rem; }
  .mission-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chapter-brief { grid-column: 1 / -1; }
  .table-meter { min-width: 0; border-top: 1px solid #bba67c60; padding: .44rem .6rem; }
  .table-meter:nth-child(2) { border-left: 0; }
  .table-meter strong { font-size: 1.27rem; }
  .map-card { padding: 8px; }
  .map-top h2 { font-size: 1.2rem; }
  .field-grid { grid-template-columns: minmax(0, 1fr); }
  .latest { grid-column: auto; }
  .outcome { flex-direction: column; align-items: flex-start; }
  .setup-selects { grid-template-columns: 1fr; gap: .5rem; }
  .itinerary li { padding: .7rem .4rem .6rem; font-size: .75rem; }
  .itinerary li::before { left: .4rem; }
  .itinerary li span { font-size: .69rem; }
}
