:root {
  color-scheme: light;
  --paper: #f5f2e8;
  --sheet: #fcfaf2;
  --ink: #193d37;
  --muted: #55665a;
  --line: #d3d6c5;
  --green: #276754;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif CJK JP", Georgia, serif;
  --sans: "Hiragino Sans", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  font-size: 16px;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
button, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button, select, a, canvas[tabindex] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, select:focus-visible, a:focus-visible, canvas[tabindex]:focus-visible {
  outline: 3px solid #b96420; outline-offset: 3px;
}
button:disabled { opacity: .43; cursor: default; }
button[hidden], [hidden] { display: none !important; }
.visually-hidden, .skip-link:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link:focus { position: fixed; z-index: 5; left: 12px; top: 10px; padding: 12px; background: white; color: var(--ink); }
.masthead { border-bottom: 1px solid var(--line); }
.masthead-inner, .workspace {
  width: min(1512px, 100%);
  margin-inline: auto;
  padding-inline: clamp(14px, 3.2vw, 52px);
}
.masthead-inner { min-height: 79px; display: flex; align-items: center; gap: 21px; }
.brand { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 50% 50% 46% 46%;
  position: relative; overflow: hidden; display: block; background: #18483d;
}
.brand-mark::before, .brand-mark::after, .brand-mark i, .brand-mark b {
  content: ""; position: absolute; display: block;
}
.brand-mark::before {
  width: 11px; height: 15px; top: 6px; left: 17px; transform: rotate(26deg);
  background: #e3e7bc; border-radius: 95% 6% 84% 10%;
}
.brand-mark::after { width: 2px; height: 8px; left: 19px; top: 17px; background: #d2deb0; transform: rotate(30deg); }
.brand-mark i, .brand-mark b {
  width: 27px; height: 11px; border: 1.5px solid #dbe4b9; border-radius: 50%; left: 7px; top: 21px;
}
.brand-mark b { width: 35px; height: 15px; top: 23px; left: 3px; opacity: .62; }
.wordmark { display: flex; flex-direction: column; align-items: flex-start; }
.wordmark strong { font: 700 28px/1.12 var(--serif); letter-spacing: .1em; }
.wordmark span { margin-top: 1px; color: #586454; font: 650 8px/1.25 system-ui,sans-serif; letter-spacing: .23em; }
.play-mode { border-left: 1px solid #c7cbbb; padding-left: 20px; font-size: 12px; color: var(--muted); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.menu-button, .focus-button, .undo-button, .journal-button, .close-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 7px; background: transparent; min-height: 41px;
  font-size: 13px; font-weight: 600; line-height: 1.3;
}
.menu-button { padding: 8px 14px; }
.menu-button:hover, .journal-button:hover, .undo-button:not(:disabled):hover, .close-button:hover { background: #e9ecdd; }
.expedition-button { background: #245744; border-color: #245744; color: #f5f5df; }
.expedition-button:hover { background: #346c52; }
.glyph { flex: none; display: inline-block; position: relative; width: 20px; height: 20px; }
.glyph::before, .glyph::after { content: ""; position: absolute; }
.glyph-grid { width: 15px; height: 15px; }
.glyph-grid::before { left: 1px; top: 1px; width: 5px; height: 5px; background: currentColor; border-radius: 1px; box-shadow: 8px 0, 0 8px, 8px 8px; }
.glyph-ridge { width: 18px; height: 14px; }
.glyph-ridge::before {
  inset: 0; background: currentColor;
  clip-path: polygon(0 93%,31% 34%,46% 61%,63% 9%,100% 93%,88% 93%,64% 40%,48% 88%,31% 58%,11% 93%);
}
.glyph-help { border: 1.5px solid currentColor; width: 17px; height: 17px; border-radius: 50%; font: 700 12px/15px Georgia,serif; text-align: center; }
.workspace {
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(255px, 25%, 342px); gap: clamp(14px, 1.6vw, 26px);
  padding-top: clamp(16px, 2.1vw, 32px); padding-bottom: max(27px, env(safe-area-inset-bottom)); align-items: start;
}
.play-area, .journal { min-width: 0; }
.stage {
  isolation: isolate; position: relative; overflow: hidden; min-height: 425px;
  height: clamp(425px, min(63vw, calc(100svh - 218px)), 800px);
  border: 1px solid #acbdaf; border-radius: 13px;
  background: linear-gradient(161deg,#d2e4d6,#b6d5c6 60%,#9bbdb1);
}
#island { width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
#island:active { cursor: grabbing; }
#island:focus-visible { outline-offset: -5px; }
.stage-heading {
  position: absolute; z-index: 1; inset: clamp(18px, 2.3vw, 32px) auto auto clamp(18px, 2.3vw, 32px);
  max-width: calc(100% - 285px); pointer-events: none; color: #123e39;
  text-shadow: 0 1px 10px #e2f0d8, 0 1px 2px #dfefd5;
}
.stage-meta { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 650; letter-spacing: .06em; line-height: 1.4; }
.stage-divider { width: 19px; height: 1px; background: #4c6e5f; }
.stage-heading h1 { margin: 7px 0 0; font: 700 clamp(29px, 3.1vw, 49px)/1.25 var(--serif); letter-spacing: .055em; }
.season {
  display: inline-flex; margin-top: 7px; padding: 2px 7px; border: 1px solid #869c8690;
  border-radius: 3px; color: #314f44; background: #f1f4dece;
  font-size: 11px; font-weight: 650; text-shadow: none; font-variant-numeric: tabular-nums;
}
.season:empty, .medals:empty { display: none; }
.stage-switches {
  position: absolute; top: clamp(16px, 2.1vw, 30px); right: clamp(14px, 1.7vw, 25px);
  z-index: 2; display: flex; align-items: center; gap: 7px; pointer-events: none;
}
.stage-switches > * { pointer-events: auto; }
.view-button {
  display: inline-flex; gap: 7px; align-items: center; justify-content: center;
  min-height: 40px; padding: 7px 11px; border: 1px solid #264c40; border-radius: 6px;
  background: #214e42f2; box-shadow: 0 2px 6px #1f443130; color: #fffbee;
  font-size: 13px; font-weight: 650; white-space: nowrap;
}
.view-button::before {
  content: ""; width: 13px; height: 16px; background:
    radial-gradient(ellipse 3px 4.5px at 3.5px 9px,currentColor 82%,transparent 98%),
    radial-gradient(ellipse 2px 2px at 3.5px 14px,currentColor 82%,transparent 98%),
    radial-gradient(ellipse 3px 4.5px at 10px 4px,currentColor 82%,transparent 98%),
    radial-gradient(ellipse 2px 2px at 10px 9px,currentColor 82%,transparent 98%);
  transform: rotate(10deg);
}
.view-button:hover { background: #31644f; }
.view-button[aria-pressed="true"]::before {
  content: "↶"; background: none; transform: none; font: 600 18px/16px system-ui,sans-serif; width: 15px;
}
.layer-control {
  display: inline-flex; align-items: center; gap: 7px; min-height: 38px;
  padding: 0 5px 0 12px; border: 1px solid #385c4e55; border-radius: 6px; background: #f8faeceb;
  box-shadow: 0 1px 4px #2649360c; font-size: 12px;
}
.layer-control label { color: #516552; }
.select-wrap { position: relative; }
.select-wrap::after {
  content: ""; pointer-events: none; position: absolute; right: 9px; top: calc(50% - 4px);
  width: 7px; height: 7px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg);
}
#layer {
  appearance: none; border: 0; background: transparent; padding: 9px 23px 9px 2px;
  font-size: 13px; font-weight: 650; cursor: pointer;
}
.map-actions {
  pointer-events: none; position: absolute; z-index: 1; bottom: clamp(11px, 1.5vw, 21px);
  left: clamp(11px, 1.5vw, 21px); right: clamp(11px, 1.5vw, 21px); display: flex; justify-content: space-between; gap: 7px;
}
.map-actions > * { pointer-events: auto; }
.focus-button, .camera-actions {
  color: #254b3f; border: 1px solid #506b5480; border-radius: 6px; background: #fafbefec;
  box-shadow: 0 2px 9px #1c443522;
}
.focus-button { min-height: 38px; padding: 7px 12px; font-size: 12px; }
.glyph-target { width: 15px; height: 15px; border: 1.5px solid currentColor; border-radius: 50%; }
.glyph-target::before { inset: 3px; border: 1px solid currentColor; border-radius: 50%; }
.camera-actions { display: inline-flex; align-items: center; overflow: visible; }
.camera-actions button {
  width: 38px; height: 36px; border: 0; border-radius: 5px; background: transparent;
  font: 500 22px/1 system-ui,sans-serif; padding: 0;
}
.camera-actions button:hover, .focus-button:hover { background: #f4f7e6; }
.camera-divider { height: 17px; width: 1px; background: #b7c4b2; }
.walk-help, .walk-pad, .walk-touch { display: none; }
.walk-help {
  position: absolute; z-index: 1; left: clamp(12px,1.5vw,21px); bottom: clamp(12px,1.5vw,21px);
  margin: 0; padding: 7px 10px; border: 1px solid #dbeada80; border-radius: 6px;
  background: #1c3730c9; color: #fffced; font-size: 12px; font-weight: 600; line-height: 1.55;
  pointer-events: none; user-select: none;
}
.walk-pad {
  --knob: 40px;
  position: absolute; z-index: 2; left: clamp(12px,2.4vw,26px); bottom: clamp(12px,2.4vw,26px);
  width: clamp(94px,14vw,108px); aspect-ratio: 1; border: 1.5px solid #eff7dcbe; border-radius: 50%;
  background: radial-gradient(circle closest-side, transparent 70%,#e7efda62 71% 73%,transparent 74%),#183a31a8;
  box-shadow: 0 2px 9px #1c30294a; touch-action: none; user-select: none; -webkit-user-select: none;
}
.walk-pad::before {
  content: ""; position: absolute; inset: 7px; pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle 1.5px at top center,#f2f6e7 95%,transparent),
    radial-gradient(circle 1.5px at bottom center,#f2f6e7 95%,transparent),
    radial-gradient(circle 1.5px at left center,#f2f6e7 95%,transparent),
    radial-gradient(circle 1.5px at right center,#f2f6e7 95%,transparent);
}
#walkThumb {
  position: absolute; left: calc(50% - var(--knob) / 2); top: calc(50% - var(--knob) / 2);
  width: var(--knob); height: var(--knob); border-radius: 50%; pointer-events: none;
  border: 1px solid #f9fff1; background: #e2ead8e8; box-shadow: 0 2px 6px #14312862;
}
body[data-view="walk"] .walk-help { display: block; }
body[data-view="walk"] .map-actions, body[data-view="walk"] .tool-dock { display: none; }
body[data-view="walk"] #island { cursor: grab; }
body[data-view="walk"] #island:active { cursor: grabbing; }
.tool-dock {
  display: flex; justify-content: space-between; align-items: center; gap: 9px; flex-wrap: wrap;
  margin-top: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--sheet);
}
.tools, .construction { display: flex; gap: 5px; align-items: center; }
.tool {
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px clamp(11px, 1.45vw, 22px); border: 1px solid transparent; border-radius: 6px;
  color: #3e5648; background: transparent; font-size: 15px; font-weight: 650;
}
.tool:hover { background: #eaeee0; }
.tool[aria-pressed="true"], .tool.active, .tool.is-active, .tool[data-active="true"] {
  color: #f5f5df; background: #245744; border-color: #245744; box-shadow: inset 0 1px 0 #ffffff25;
}
.glyph-spade { transform: rotate(35deg); }
.glyph-spade::before { left: 5px; top: 9px; width: 10px; height: 10px; border: 1.6px solid currentColor; border-radius: 0 0 5px 5px; }
.glyph-spade::after { top: 1px; left: 9px; width: 2px; height: 10px; background: currentColor; }
.glyph-mound::before {
  left: 0; bottom: 3px; width: 20px; height: 12px; background: currentColor;
  clip-path: polygon(0% 85%,25% 70%,44% 30%,59% 16%,75% 46%,100% 85%,100% 100%,0 100%);
}
.glyph-mound::after { top: 1px; left: 13px; width: 3px; height: 3px; border-radius: 50%; background: currentColor; box-shadow: -4px 2px; }
.glyph-lens::before { top: 1px; left: 1px; width: 13px; height: 13px; border: 1.8px solid currentColor; border-radius: 50%; }
.glyph-lens::after { top: 12px; left: 12px; width: 8px; height: 2px; transform: rotate(45deg); transform-origin: left; background: currentColor; }
.glyph-tank::before { inset: 5px 1px 3px; border: 1.7px solid currentColor; border-top: 0; border-radius: 0 0 5px 5px; }
.glyph-tank::after { top: 8px; left: 2px; right: 2px; height: 3px; border-bottom: 1.5px solid currentColor; border-radius: 50%; }
.construction { gap: clamp(9px, 1.2vw, 18px); flex-wrap: wrap; }
.budget-label { font-size: 12px; color: var(--muted); white-space: nowrap; }
#budget { display: inline-block; padding-left: 2px; font: 650 17px/1 system-ui,sans-serif; color: var(--ink); font-variant-numeric: tabular-nums; }
.undo-button { min-height: 38px; border: 0; padding: 4px 8px; gap: 4px; }
.undo-button span { font: 550 19px/1 system-ui,sans-serif; }
.status-line { display: flex; align-items: baseline; gap: 8px; padding: 12px 4px 0; color: var(--muted); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.status-light { width: 7px; height: 7px; flex: none; display: inline-block; background: #a78b42; border-radius: 50%; }
body[data-connection="online"] .status-light { background: #4c8064; }
body[data-connection="offline"] .status-light { background: #b45d34; }
body[data-connection="offline"] .status-line { color: #854322; }
.journal { border: 1px solid #cdd3c0; border-radius: 11px; background: var(--sheet); overflow: hidden; }
.journal-section { padding: clamp(18px, 1.8vw, 29px); }
.journal-section + .journal-section { border-top: 1px solid var(--line); }
.journal-section h2, .dialog-head h2 {
  margin: 0; font: 700 clamp(19px, 1.45vw, 23px)/1.45 var(--serif); letter-spacing: .035em;
}
.journal-section h2 { display: flex; align-items: center; gap: 9px; }
.section-symbol { position: relative; display: inline-block; flex: none; width: 21px; height: 21px; color: #56805d; }
.section-symbol::before, .section-symbol::after { content: ""; position: absolute; }
.sprout { border-bottom: 1.5px solid currentColor; border-radius: 45%; }
.sprout::before { width: 10px; height: 13px; left: 9px; top: 0; border: 1.5px solid currentColor; border-radius: 90% 3% 90% 4%; transform: rotate(8deg); }
.sprout::after { width: 8px; height: 10px; left: 3px; top: 7px; border: 1.5px solid currentColor; border-radius: 8% 94% 4% 94%; }
.rings::before { width: 19px; height: 10px; left: 1px; top: 9px; border: 1.5px solid currentColor; border-radius: 50%; }
.rings::after { width: 8px; height: 11px; left: 7px; top: 1px; background: currentColor; border-radius: 75% 20% 67% 60%; transform: rotate(25deg); }
#hint { font-size: 14px; line-height: 1.85; color: #495e4d; margin: 12px 0 18px; overflow-wrap: anywhere; }
#goals { display: grid; gap: 11px; }
#goals > * { min-width: 0; }
.goal, .goal-row, .goal-line {
  display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: 6px; row-gap: 5px;
  font-size: 13px; font-weight: 600; line-height: 1.55;
}
.goal-name { min-width: 0; }
.goal-value, .goal-percent { color: #486b58; font: 600 12px/1.4 system-ui,sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; }
#goals progress, .goal-track { display: block; grid-column: 1 / -1; width: 100%; height: 5px; overflow: hidden; background: #e2e4d4; border: 0; border-radius: 99px; }
#goals progress { appearance: none; accent-color: #588568; }
#goals progress::-webkit-progress-bar { background: #e2e4d4; }
#goals progress::-webkit-progress-value, .goal-fill { background: #618766; border-radius: 99px; }
#goals progress::-moz-progress-bar { background: #618766; border-radius: 99px; }
.goal-fill { display: block; height: 100%; transition: width .2s ease; }
.primary-button, #dialogBody button.primary, #dialogBody .primary-button {
  background: var(--ink); border: 1px solid var(--ink); border-radius: 6px; color: #f7f6df;
  padding: 10px 15px; font-weight: 650; min-height: 43px;
}
.medals { margin-top: 14px; color: #795a2d; font-size: 12px; font-weight: 650; line-height: 1.7; }
.mission-actions { display: flex; gap: 6px; align-items: stretch; flex-wrap: wrap; }
.mission-actions:has(> button:not([hidden])) { margin-top: 15px; }
.mission-actions button { flex: 1 1 auto; font-size: 13px; }
.primary-button:hover { background: #285746; }
.observations { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; column-gap: 10px; }
.observations > * { grid-column: 1/-1; }
#telemetry, .reading, .detail-caption { color: var(--muted); font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
#telemetry { font-variant-numeric: tabular-nums; margin: 10px 0 8px; white-space: pre-line; }
.chart-well {
  padding: 5px 0; border-block: 1px solid #d4ddcc;
  background-color: #f0f3e7;
  background-image: linear-gradient(#8ea69025 1px,transparent 1px),linear-gradient(90deg,#8ea69020 1px,transparent 1px);
  background-size: 100% 15px,28px 100%;
}
#chart { width: 100%; height: 55px; display: block; }
.reading { margin-top: 11px; white-space: pre-line; }
#soilDetail {
  grid-column: 1; justify-self: start; width: min(72px,100%); height: auto; aspect-ratio: 1;
  margin-top: 12px; border: 1px solid #a4bba6; border-radius: 4px; image-rendering: pixelated;
}
#soilDetail:not([hidden]) + #detailCaption {
  grid-column: 2; grid-row: span 1; max-width: 135px; margin: 11px 0 0;
}
.journal-actions { display: flex; align-items: stretch; gap: 7px; padding: 12px clamp(15px,1.8vw,29px); background: #f1f1e5; border-top: 1px solid var(--line); }
.journal-button { min-height: 38px; padding: 6px 5px; flex: 1; background: #f9f8ed; }
.journal-actions .journal-button { white-space: nowrap; font-size: 12px; }
.journal-button[aria-pressed="true"] { background: #e1ead9; border-color: #a1b295; }
dialog {
  position: fixed; padding: 0; border: 1px solid #bdc6af; border-radius: 12px; max-width: min(490px, calc(100vw - 28px));
  width: 100%; max-height: min(85dvh, 740px); overflow: auto; color: var(--ink); background: var(--sheet); box-shadow: 0 16px 75px #112f2b45;
}
dialog::backdrop { background: #163a34a3; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.close-button { width: 39px; min-height: 39px; font: 400 24px/1 system-ui,sans-serif; flex: none; }
#dialogBody { padding: 15px 20px 21px; color: #354e40; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
#dialogBody :first-child { margin-top: 0; }
#dialogBody :last-child { margin-bottom: 0; }
#dialogBody ol, #dialogBody ul { padding-left: 1.4em; }
#dialogBody button { margin: 3px 3px 3px 0; min-height: 43px; padding: 8px 12px; border: 1px solid #c6cfba; border-radius: 6px; background: #f0f1e3; font-weight: 600; }
#dialogBody button:hover { background: #e0e8d5; }
#dialogBody textarea, #dialogBody input { max-width: 100%; padding: 8px; border: 1px solid #bfc8b0; border-radius: 5px; font: inherit; background: #fffef7; }
.noscript { margin: 1em; color: #80401b; }
@media(max-width: 1099px) {
  .stage-switches { flex-direction: column; align-items: flex-end; }
  .stage-heading { max-width: calc(100% - 155px); }
}
@media (any-pointer: coarse), (max-width: 760px) {
  body[data-view="walk"] .walk-pad { display: block; }
  .walk-help { left: auto; right: 11px; bottom: 12px; max-width: calc(100% - 138px); font-size: 11px; }
  .walk-touch { display: inline; }
  .walk-keyboard { display: none; }
}
@media(max-width: 940px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 250px; gap: 13px; }
  .stage { height: clamp(450px, min(62vw, calc(100svh - 205px)), 650px); }
  .tool { padding-inline: 10px; gap: 5px; }
  .tool-dock { padding-inline: 6px; gap: 4px; }
  .construction { gap: 5px; }
}
@media(max-width: 785px) {
  .masthead-inner { min-height: 66px; }
  .workspace { grid-template-columns: minmax(0,1fr); padding-top: 13px; }
  .stage { min-height: 345px; height: clamp(345px, 69vw, 530px); }
  .journal { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .journal-section { padding: 18px; }
  .journal-section + .journal-section { border-top: 0; border-left: 1px solid var(--line); }
  .journal-actions { grid-column: 1/-1; justify-content: flex-end; }
  .journal-button { flex: 0 1 auto; min-width: 95px; }
  .tool { padding-inline: clamp(12px, 3vw, 24px); }
  .status-line { padding-top: 8px; }
}
@media(max-width: 520px) {
  .masthead-inner, .workspace { padding-inline: max(10px,env(safe-area-inset-left)); }
  .masthead-inner { min-height: 60px; gap: 10px; }
  .brand { gap: 7px; }
  .brand-mark { width: 35px; height: 35px; }
  .brand-mark::before { left: 14px; top: 3px; }
  .brand-mark::after { left: 15px; top: 13px; }
  .brand-mark i { left: 4px; top: 18px; }
  .brand-mark b { left: 0; top: 20px; }
  .wordmark strong { font-size: 23px; }
  .wordmark span { font-size: 7px; }
  .play-mode { font-size: 10px; padding-left: 9px; }
  .top-actions { gap: 4px; }
  .menu-button { font-size: 12px; padding: 6px 8px; gap: 5px; min-height: 40px; }
  #help { min-width: 37px; }
  #help .menu-label {
    position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .workspace { gap: 10px; padding-top: 9px; }
  .stage { min-height: 330px; height: clamp(330px, 57svh, 480px); border-radius: 9px; }
  .stage-heading { inset: 15px auto auto 14px; max-width: calc(100% - 137px); }
  .stage-meta { gap: 6px; font-size: 10px; }
  .stage-divider { width: 12px; }
  .stage-heading h1 { font-size: clamp(23px, 6.5vw, 29px); margin-top: 5px; }
  .stage-switches { top: 12px; right: 10px; gap: 5px; }
  .view-button { gap: 5px; font-size: 12px; min-height: 38px; padding: 6px 8px; }
  .layer-control { padding: 0 3px 0 8px; min-height: 36px; gap: 0; }
  .layer-control label { position: absolute; width: 1px; height: 1px; margin: -1px; clip-path: inset(50%); overflow: hidden; }
  #layer { padding: 9px 18px 9px 0; font-size: 12px; }
  .select-wrap::after { right: 5px; }
  .map-actions { bottom: 9px; left: 9px; right: 9px; }
  .camera-actions button { width: 34px; height: 36px; }
  .focus-button { padding: 5px 8px; font-size: 11px; gap: 5px; }
  .tool-dock { gap: 3px; padding: 5px; margin-top: 6px; }
  .tool-dock:has(.tool[data-tool="tank"]:not([hidden])) { justify-content: center; }
  .tool-dock:has(.tool[data-tool="tank"]:not([hidden])) .construction { margin-left: auto; }
  .tools { gap: 1px; }
  .tool { padding: 6px 8px; font-size: 13px; min-height: 39px; gap: 4px; }
  .tool .glyph { transform: scale(.88); }
  .tool .glyph-spade { transform: scale(.88) rotate(35deg); }
  .budget-label { font-size: 10px; }
  #budget { font-size: 14px; }
  .construction { gap: 1px; }
  .undo-button { font-size: 11px; gap: 1px; padding: 4px; }
  .status-line { font-size: 11px; }
  .journal { grid-template-columns: 1fr; }
  .journal-section { padding: 16px; }
  .journal-section + .journal-section { border-left: 0; border-top: 1px solid var(--line); }
  .journal-section h2 { font-size: 19px; }
  #hint { margin: 8px 0 13px; font-size: 13px; }
  .journal-actions { justify-content: stretch; }
  .journal-button { flex: 1; }
}
@media(max-width: 360px) {
  .play-mode { display: none; }
  #levels { min-width: 37px; }
  #levels .menu-label {
    position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .tool { padding-inline: 7px; }
  .construction .undo-button span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; }
}
