:root{--app-icon:url(/assets/bb0f377612e7dd88e8839d23d9fcb1be8deea46111b23700564da9cc95c77c41.svg)}
:root {
  color-scheme: light;
  --ink: #183137;
  --muted: #566b6e;
  --brand: #122e37;
  --green: #126e53;
  --green-hover: #0b5841;
  --mint: #e7f3ec;
  --white: #fff;
  --paper: #f8faf7;
  --line: #dce5e0;
  --warning: #9c3b2d;
  --radius: 10px;
  --shadow: 0 3px 13px rgba(25, 57, 55, .11), 0 1px 3px rgba(24, 48, 50, .08);
  font-family: 'Noto Sans CJK JP', 'Hiragino Sans', Meiryo, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--ink);
  background: var(--brand);
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; overflow: hidden; }
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #469c7e; outline-offset: 2px; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border: 0; }
a { color: #175f4d; }
svg { display: block; width: 20px; height: 20px; flex: none; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; flex: none; }
[hidden] { display: none !important; }
h1, h2, h3, p, dl, dd { margin: 0; }
.app { height: 100vh; height: 100dvh; min-height: 280px; display: grid; grid-template-rows: auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); }

.app-header { min-height: 70px; display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 9px 22px 9px 24px; padding-top: max(9px, env(safe-area-inset-top)); color: #fff; background: var(--brand); border-bottom: 1px solid #183f47; }
.brand, .header-actions { display: flex; align-items: center; }
.brand { gap: 12px; min-width: 0; }
.brand-mark { width: 43px; height: 43px; border: 1px solid #5caa94; border-radius: 10px; background: #1c785f; }
.brand-mark svg { width: 26px; height: 26px; }
.brand h1 { white-space: nowrap; font-size: 1.31rem; line-height: 1.25; font-weight: 760; }
.brand h1 span { letter-spacing: .9px; margin-right: .12em; font-family: system-ui, sans-serif; }
.brand p { color: #c0d4d2; font-size: .72rem; letter-spacing: .075em; margin-top: 4px; white-space: nowrap; }
.version { color: #c8e1da; align-self: flex-start; margin: 2px 0 0 5px; padding: 1px 6px 2px; border: 1px solid #3e6263; border-radius: 4px; font: 600 .73rem/1.55 system-ui, sans-serif; white-space: nowrap; }
.header-actions { gap: 11px; }
.game-mode { display: flex; align-items: center; gap: 10px; color: #d1e1dd; font-size: .83rem; white-space: nowrap; margin-right: 7px; }
.game-mode svg { width: 16px; height: 16px; color: #9cc5b9; }
.header-divider { height: 14px; width: 1px; background: #557176; }
.header-button, .header-icon { display: flex; align-items: center; justify-content: center; gap: 8px; height: 42px; border-radius: 7px; border: 1px solid #4b696d; background: #25424b; color: #f2fbf6; padding: 0 12px; font-size: .83rem; font-weight: 650; white-space: nowrap; }
.header-button svg, .header-icon svg { width: 17px; height: 17px; }
.header-icon { width: 42px; padding: 0; background: transparent; }
.header-button:hover, .header-icon:hover { background: #36565e; }

.workspace { min-height: 0; display: grid; grid-template-columns: clamp(290px, 25vw, 354px) minmax(0, 1fr); grid-template-areas: 'panel map'; }
.panel { grid-area: panel; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--paper); border-right: 1px solid #c9d8d1; z-index: 3; }
.panel-scroll { min-height: 0; flex: 1 1 auto; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.panel-section { padding: 25px 23px 24px; }
.panel-heading, .dialog-heading { display: flex; gap: 10px; align-items: center; }
.panel-heading h2, .dialog-heading h2 { font-size: 1.24rem; font-weight: 760; letter-spacing: .015em; }
.heading-icon { width: 35px; height: 35px; border-radius: 8px; background: var(--mint); color: var(--green); }
.heading-icon svg { width: 19px; height: 19px; }
.panel-footer { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 0 16px; min-height: 43px; border-top: 1px solid var(--line); font-size: .71rem; color: var(--muted); white-space: nowrap; }
.save-state { display: inline-flex; gap: 5px; align-items: center; }
.save-state svg { width: 14px; height: 14px; color: var(--green); }
.save-state.error, .save-state.error svg { color: var(--warning); }
.network-stats { display: grid; grid-template-columns: 44% 56%; margin: 22px 0 15px; padding: 13px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.network-stats div { min-width: 0; padding: 0 9px 2px; }
.network-stats div + div { padding-left: 14px; border-left: 1px solid var(--line); }
.network-stats div > span { display: block; color: var(--muted); font-size: .78rem; font-weight: 550; }
.network-stats strong { color: #15373a; font: 660 clamp(1.23rem, 2vw, 1.68rem)/1.36 system-ui, sans-serif; letter-spacing: -.065em; font-variant-numeric: tabular-nums; }
.network-stats small { color: var(--muted); font-size: .73rem; margin: 0 0 0 5px; }
.btn { display: inline-flex; min-height: 45px; align-items: center; justify-content: center; gap: 8px; padding: 8px 13px; border: 1px solid transparent; border-radius: 7px; font-size: .89rem; font-weight: 680; text-align: center; color: var(--ink); background: white; }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--green-hover); }
.btn-primary:disabled { background: #d9e5df; color: #526b61; }
.btn-outline { border-color: #cddbd2; }
.btn-outline:hover { background: #eef5ee; }
.create-road, .submit-road { width: 100%; }
.list-heading, .save-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 28px 0 10px; }
.list-heading h3, .save-list-heading h3 { font-size: .91rem; font-weight: 750; }
.list-heading > span, .save-list-heading > span { color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; }
.empty-state { border: 1px dashed #ceddd3; border-radius: var(--radius); background: #f1f6f0; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 26px 12px 27px; }
.empty-icon { width: 43px; height: 43px; margin-bottom: 11px; border-radius: 50%; color: #427a66; background: #e2eee3; }
.empty-icon svg { width: 24px; height: 24px; }
.empty-state p { color: #3e5954; font-size: .9rem; font-weight: 700; }
.empty-state > span:last-child { color: var(--muted); font-size: .79rem; margin-top: 7px; line-height: 1.65; }
.road-list, .save-list { list-style: none; padding: 0; margin: 0; }
.road-list { display: grid; gap: 6px; }
.road-row { width: 100%; display: flex; text-align: left; align-items: center; border-radius: 8px; border: 1px solid var(--line); background: white; padding: 9px 10px; gap: 8px; }
.road-row:hover, .road-row[aria-pressed="true"] { background: #eaf4eb; border-color: #9bbdad; }
.road-badge { display: inline-flex; min-width: 35px; max-width: 63px; padding: 2px 5px; align-items: center; justify-content: center; align-self: flex-start; border-radius: 4px; color: #fff; background: #216b55; font: 700 .75rem/1.55 system-ui, sans-serif; overflow-wrap: anywhere; }
.road-row-body { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.road-row-body strong { overflow-wrap: anywhere; font-size: .86rem; }
.road-row-body small { color: var(--muted); font-size: .74rem; }
.road-row > span:last-child svg { width: 14px; height: 14px; color: var(--muted); }
.selected-road { background: white; border: 1px solid #b7cfc0; border-top: 3px solid #287b60; border-radius: var(--radius); margin: 17px 0; padding: 12px; }
.selected-road h3 { display: flex; align-items: center; gap: 7px; font-size: .95rem; overflow-wrap: anywhere; }
.selected-road h3 > span:last-child { min-width: 0; }
.selected-meta { color: var(--muted); font-size: .77rem; margin: 6px 0 10px; }
.selected-tools { display: flex; align-items: center; gap: 5px; margin-top: 7px; }
.selected-tools .btn { font-size: .76rem; padding: 6px 7px; min-height: 38px; }
.selected-tools .btn svg, .selected-edit svg { width: 15px; height: 15px; }
.selected-edit { width: 100%; min-height: 39px; font-size: .82rem; }
.icon-button { display: inline-flex; width: 38px; min-height: 38px; align-items: center; justify-content: center; padding: 0; border-radius: 7px; color: #39585a; background: transparent; }
.icon-button:disabled { color: #a0b0ac; }
.icon-button:hover:not(:disabled) { background: #eaf2ed; }
.icon-button svg { width: 18px; height: 18px; }
.draft-heading .icon-button, .dialog-heading .icon-button { margin-left: auto; }
.draft-stats { display: flex; gap: 12px; align-items: center; min-height: 44px; margin: 15px 0 8px; padding: 0 8px 0 10px; background: #eaf4ed; border: 1px solid #d0e4d6; border-radius: 7px; font-size: .78rem; color: #386458; font-variant-numeric: tabular-nums; white-space: nowrap; }
.draft-stats b { font-size: .91rem; color: #154a3c; }
.minimal-button { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 4px; margin-left: auto; background: transparent; border-radius: 5px; color: #135f4b; font-size: .72rem; }
.minimal-button svg { width: 15px; height: 15px; }
.minimal-button:disabled { color: #66847b; opacity: .65; }
.minimal-button:hover:not(:disabled) { background: #d6e9dc; }
.draft-guide { color: #4b6562; font-size: .79rem; margin-bottom: 15px; }
form label, .dialog-body label { display: block; font-size: .81rem; font-weight: 650; margin-bottom: 5px; }
form input:not([type="file"]), form select { min-width: 0; width: 100%; min-height: 42px; padding: 6px 9px; border: 1px solid #c6d8d0; border-radius: 6px; background: white; color: var(--ink); font-size: 1rem; }
input::placeholder { color: #687b7a; opacity: 1; }
form select { appearance: none; padding-right: 25px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23395956' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 15px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.field-row > div { min-width: 0; }
.attributes { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 14px 0 13px; }
.attributes summary { cursor: pointer; padding: 9px 0; font-size: .82rem; font-weight: 650; color: #365a50; }
.attributes select { margin-bottom: 10px; }
.form-error { color: var(--warning); background: #fff1ec; border-radius: 5px; padding: 7px 9px; margin: 8px 0; font-size: .83rem; }
.mobile-panel-head { display: none; }

.map { position: relative; grid-area: map; overflow: hidden; overflow: clip; isolation: isolate; min-width: 0; min-height: 0; background: #dcebef; }
.map canvas, .map-tiles { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.map-tiles { pointer-events: none; }
.map-tiles img { position: absolute; top: 0; left: 0; visibility: hidden; user-select: none; }
.map-tiles img.ready { visibility: visible; filter: saturate(.54) contrast(.93) brightness(1.045); }
#road-map { outline: none; touch-action: none; cursor: grab; }
#road-map[data-mode="waypoints"], #road-map[data-mode="freehand"] { cursor: crosshair; }
#road-map.panning { cursor: grabbing; }
#road-map:focus-visible { outline: 2px solid #559b86; outline-offset: -3px; }
.map-top { position: absolute; left: 18px; right: 16px; top: 16px; display: grid; align-items: start; grid-template-columns: minmax(190px, 265px) minmax(max-content, 1fr) auto; gap: 10px; pointer-events: none; z-index: 5; }
.map-top > * { pointer-events: auto; }
.map-search, .layers-wrap { position: relative; min-width: 0; }
.search-input, .map-tools, .overlay-button, .zoom-controls, .square-button { box-shadow: var(--shadow); border: 1px solid rgba(125, 156, 148, .35); background: white; border-radius: 8px; }
.search-input { display: flex; align-items: center; gap: 9px; height: 47px; padding: 0 9px 0 13px; color: #486761; }
.search-input > span svg { width: 18px; height: 18px; }
.search-input input { flex: 1 1 0; width: 100%; min-width: 0; height: 100%; border: 0; background: transparent; outline: none; color: var(--ink); font-size: .89rem; }
.search-input:focus-within { border-color: #438f78; box-shadow: 0 0 0 2px #78ac987d; }
.search-input input::-webkit-search-cancel-button { display: none; }
.search-input .icon-button { width: 30px; min-height: 34px; }
.search-results, .layers-panel { position: absolute; top: 53px; border: 1px solid var(--line); background: #fff; border-radius: 8px; box-shadow: var(--shadow); overflow: hidden; }
.search-results { inset-inline: 0; min-width: 210px; max-height: min(320px, 44dvh); overflow: auto; }
.search-item { display: flex; align-items: center; width: 100%; gap: 8px; padding: 9px 11px; min-height: 40px; text-align: left; background: #fff; font-size: .84rem; }
.search-item + .search-item { border-top: 1px solid #edf1ed; }
.search-item:hover, .search-item:focus { background: #eaf4ec; }
.search-item [data-icon] { color: var(--green); }
.search-item svg { width: 15px; height: 15px; }
.search-item > span:last-child { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.search-item small { display: block; color: var(--muted); font-size: .72rem; }
.search-empty { color: var(--muted); font-size: .84rem; padding: 11px; }
.map-tools { justify-self: center; display: flex; width: max-content; align-items: center; gap: 5px; height: 47px; padding: 4px; }
.tool-modes, .history-tools { display: flex; align-items: center; gap: 2px; }
.mode-tool { display: inline-flex; gap: 6px; height: 37px; align-items: center; justify-content: center; padding: 0 10px; background: transparent; border-radius: 5px; color: #3d5857; white-space: nowrap; font-size: .82rem; font-weight: 650; }
.mode-tool svg { width: 16px; height: 16px; }
.mode-tool:hover { background: #f1f6f2; }
.mode-tool[aria-pressed="true"] { color: #126049; background: #dfefe5; }
.tool-divider { width: 1px; height: 24px; background: #e1e9e4; }
.history-tools .icon-button { min-height: 36px; width: 32px; }
.history-tools svg { width: 16px; height: 16px; }
.overlay-button { display: flex; height: 47px; gap: 7px; align-items: center; justify-content: center; padding: 0 12px; white-space: nowrap; color: #32554e; font-weight: 700; font-size: .85rem; }
.overlay-button:hover, .overlay-button[aria-expanded="true"] { background: #ebf6ef; }
.overlay-button svg { width: 17px; height: 17px; }
.layers-panel { right: 0; width: 226px; padding: 10px 11px; }
.layers-panel fieldset { margin: 0; padding: 1px 0 7px; border: 0; }
.layers-panel fieldset + fieldset { border-top: 1px solid var(--line); padding-top: 5px; }
.layers-panel legend { font-size: .76rem; font-weight: 700; color: #476762; padding: 3px 2px 2px; }
.layers-panel label { display: flex; align-items: center; min-height: 34px; cursor: pointer; padding-right: 4px; gap: 7px; font-size: .84rem; }
.layers-panel input { accent-color: var(--green); width: 16px; height: 16px; margin: 0 2px; }
.map-controls { display: grid; gap: 8px; justify-items: center; position: absolute; right: 16px; top: 79px; pointer-events: none; }
.map-controls button { pointer-events: auto; }
.compass { width: 38px; height: 40px; display: grid; justify-items: center; padding: 1px 0 2px; border-radius: 50%; color: #38635f; font: 700 .68rem/1.3 system-ui, sans-serif; background: #fdfdf8df; border: 1px solid #b6ccc4; }
.compass svg { width: 19px; height: 19px; }
.zoom-controls { display: grid; overflow: hidden; }
.zoom-controls button, .square-button { width: 42px; height: 42px; display: grid; place-items: center; background: white; color: #284e47; }
.zoom-controls button + button { border-top: 1px solid var(--line); }
.zoom-controls button:hover, .square-button:hover { background: #e9f4ec; }
.zoom-controls svg, .square-button svg { width: 18px; height: 18px; }
.map-bottom { display: flex; align-items: end; justify-content: space-between; gap: 5px; position: absolute; bottom: 11px; left: 17px; right: 15px; pointer-events: none; }
.map-hint { display: inline-flex; align-items: center; gap: 7px; max-width: 66%; min-height: 33px; padding: 5px 9px; border: 1px solid #bcd4ca; border-radius: 6px; background: #fdfef6ed; color: #40635b; font-size: .78rem; font-weight: 630; }
.map-hint svg { width: 15px; height: 15px; }
.map-hint.drawing { color: #075842; background: #f7fff2; border-color: #81b9a3; box-shadow: var(--shadow); }
.map-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.map-scale { min-width: 50px; display: grid; justify-items: center; color: #2f5251; padding: 2px 6px 5px; background: #fdfef4eb; border-radius: 4px; font: 650 .69rem/1.2 system-ui, sans-serif; }
#scale-line { display: block; min-width: 15px; height: 5px; border: 1px solid #3d615e; border-top: 0; }
.credit { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 0 6px; color: #345f5d; font-size: .65rem; line-height: 1.25; background: #fdfef5eb; border-radius: 4px; padding: 4px 6px; text-align: right; pointer-events: auto; }
.credit a { text-underline-offset: 2px; white-space: nowrap; }
.toast { position: absolute; left: 50%; bottom: 63px; z-index: 7; transform: translateX(-50%); padding: 11px 15px; width: max-content; max-width: min(92%, 550px); background: #173b39; color: white; box-shadow: var(--shadow); border-radius: 8px; font-size: .84rem; font-weight: 600; pointer-events: none; }
.toast.error { background: #802f26; }

.app-dialog { color: var(--ink); background: #fbfdf9; border: 1px solid #b4c7be; border-radius: 12px; width: min(510px, calc(100vw - 26px)); max-height: calc(100dvh - 30px); padding: 0; box-shadow: 0 15px 70px #112e3b47; }
.app-dialog::backdrop { background: #142d3659; }
.dialog-heading { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.dialog-body { padding: 14px 16px 17px; }
.dialog-body p { font-size: .86rem; }
.dialog-note { color: var(--muted); margin-top: 12px; }
.slot-form { display: grid; grid-template-columns: minmax(110px, 1fr) auto; gap: 8px; align-items: end; }
.slot-form > div { min-width: 0; }
.slot-form .btn, .slot-form input { min-height: 43px; }
.save-list-heading { margin: 15px 0 7px; }
.save-list { max-height: 244px; overflow: auto; }
.save-list li { display: flex; gap: 6px; justify-content: space-between; align-items: center; padding: 8px 6px 8px 10px; border: 1px solid var(--line); background: white; border-radius: 6px; margin-bottom: 5px; font-size: .83rem; }
.save-list li > div:first-child { overflow-wrap: anywhere; min-width: 0; }
.save-list small { display: block; color: var(--muted); font-size: .74rem; }
.save-list .row-buttons { display: flex; gap: 4px; flex: none; }
.save-list .btn, .save-list .icon-button { min-height: 36px; font-size: .78rem; padding: 5px 9px; }
.save-list .icon-button { width: 34px; min-width: 34px; padding: 0; }
.dialog-actions { display: flex; gap: 8px; margin-top: 13px; }
.dialog-actions .btn { flex: 1; }
.new-game { width: 100%; margin-top: 9px; }
.help-body dt { color: #1b594b; font-weight: 750; font-size: .91rem; }
.help-body dd { margin: 4px 0 13px; color: #42605e; font-size: .88rem; }
.confirm-dialog { width: min(420px, calc(100vw - 26px)); }
.confirm-dialog .dialog-actions { justify-content: flex-end; }
.confirm-dialog .dialog-actions .btn { flex: initial; }

@media (min-width: 761px) and (max-width: 985px) {
  .map-top { grid-template-columns: minmax(190px, 265px) 1fr auto; }
  .map-tools { grid-row: 2; grid-column: 1 / -1; justify-self: start; }
  .layers-wrap { grid-column: 3; }
}

@media (max-width: 760px) {
  .app-header { padding: max(6px, env(safe-area-inset-top)) 10px 6px 11px; min-height: 56px; gap: 7px; }
  .brand { gap: 8px; }
  .brand-mark { height: 35px; width: 35px; border-radius: 8px; }
  .brand-mark svg { width: 23px; height: 23px; }
  .brand h1 { font-size: 1.08rem; }
  .brand p { display: none; }
  .version { margin: 0; padding: 0 4px; align-self: center; font-size: .68rem; }
  .header-actions { gap: 5px; }
  .game-mode, .header-label { display: none; }
  .header-icon, .header-button { width: 40px; height: 40px; padding: 0; }
  .workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: 'map' 'panel'; }
  .panel { border-top: 1px solid #b3cbc0; border-right: 0; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -3px 16px #143e321f; }
  .mobile-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 7px; min-height: 57px; padding: 9px 11px 7px; }
  .mobile-panel-head .btn { flex: none; min-height: 41px; padding: 6px 9px; font-size: .8rem; }
  .mobile-panel-head .btn svg { width: 14px; height: 14px; }
  #sheet-toggle { border-radius: 6px; min-height: 42px; position: relative; display: flex; align-items: center; gap: 7px; min-width: 0; padding: 4px 6px; white-space: nowrap; background: transparent; color: #234941; font-size: .83rem; font-weight: 700; }
  #sheet-toggle:hover { background: #e9f1ea; }
  #sheet-toggle svg { width: 16px; height: 16px; }
  .sheet-grip { position: absolute; width: 27px; height: 3px; top: -5px; left: 42%; border-radius: 4px; background: #b5c9bf; }
  .sheet-count { color: #306153; font: 690 .76rem/1.55 system-ui, sans-serif; padding: 0 6px; border-radius: 10px; background: #e3eee5; }
  .sheet-caret { color: #578074; }
  #sheet-toggle[aria-expanded="true"] .sheet-caret { transform: rotate(180deg); }
  .panel-footer, .panel:not(.expanded) .panel-scroll { display: none; }
  .panel-scroll { max-height: min(36dvh, 300px); }
  .panel-section { padding: 4px 13px 14px; }
  #routes-panel > .panel-heading, #routes-panel > .network-stats, #routes-panel > .create-road { display: none; }
  .list-heading { margin-top: 4px; }
  .empty-state { padding: 12px 8px; }
  .empty-icon { width: 29px; height: 29px; margin-bottom: 4px; }
  .empty-icon svg { width: 17px; height: 17px; }
  .empty-state > span:last-child { margin-top: 4px; }
  .selected-road { margin: 2px 0 9px; }
  .selected-tools .btn, .selected-edit { min-height: 42px; }
  .draft-heading h2 { font-size: 1.02rem; }
  .draft-heading .heading-icon { width: 28px; height: 28px; }
  .draft-stats { margin-top: 6px; }
  .draft-guide { margin-bottom: 8px; }
  .map-top { top: 9px; left: 9px; right: 9px; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
  .map-search { grid-row: 1; grid-column: 1; }
  .layers-wrap { grid-row: 1; grid-column: 2; }
  .map-tools { grid-row: 2; grid-column: 1 / -1; justify-self: start; height: 45px; }
  .overlay-button, .search-input { height: 44px; }
  .overlay-button { padding: 0 10px; }
  .search-input input { font-size: 16px; }
  .mode-tool { min-height: 36px; font-size: .78rem; padding-inline: 8px; gap: 4px; }
  .mode-tool svg { width: 15px; height: 15px; }
  .history-tools .icon-button { width: 33px; }
  .search-results, .layers-panel { top: 49px; z-index: 2; }
  .map-search:focus-within, .layers-wrap:has(#layers-panel:not([hidden])) { z-index: 3; }
  .map-controls { top: 111px; right: 9px; gap: 6px; }
  .map-controls .compass { width: 32px; height: 33px; background: #fbfdf4e6; }
  .map-controls .compass svg { width: 15px; height: 15px; }
  .zoom-controls button, .square-button { width: 39px; height: 41px; }
  .map-bottom { bottom: 6px; left: 7px; right: 7px; align-items: end; }
  .map-hint { font-size: .71rem; gap: 4px; padding: 4px 6px; min-height: 27px; }
  .map-hint svg { width: 13px; height: 13px; }
  .map-meta { gap: 3px; }
  .credit { font-size: .62rem; gap: 0 4px; padding: 3px; }
  .map-scale { padding: 1px 4px 3px; }
  .toast { bottom: 47px; }
}

@media (max-width: 360px) {
  .mode-tool { padding-inline: 6px; }
  .tool-modes, .history-tools { gap: 1px; }
  .map-tools { gap: 3px; }
  .history-tools .icon-button { width: 29px; }
  .overlay-button { padding-inline: 8px; }
  .credit > span { display: none; }
  .brand h1 { font-size: .98rem; }
}

@media (max-width: 760px) and (max-height: 510px) {
  .map-controls { top: 8px; bottom: 6px; align-content: center; right: 8px; }
  .map-controls .compass { display: none; }
  .zoom-controls button, .square-button { width: 34px; height: 29px; }
  .map-controls .square-button { align-self: end; }
  .map-top { right: 49px; }
}

/* Engineering sits beside the existing map and has a separate elevation dock. */
.selected-civil { width: 100%; min-height: 38px; margin-top: 5px; font-size: .82rem; }
.selected-civil:disabled { opacity: .5; }
.civil-panel { padding-top: 20px; }
.civil-surface-length { color: #47645a; font-size: .75rem; margin-top: 5px; }
.civil-name { margin: 11px 0 8px; color: #28534a; overflow-wrap: anywhere; font-size: .97rem; }
.civil-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #d4e4d9; border-radius: 8px; background: white; }
.civil-metrics > div { min-width: 0; padding: 9px 6px 8px; }
.civil-metrics > div + div { border-left: 1px solid #e1eae4; }
.civil-metrics span, .civil-cost-head span { color: #56736a; display: block; font-size: .70rem; line-height: 1.25; margin-bottom: 3px; }
.civil-metrics strong { color: #184d40; font: 700 .84rem/1.4 system-ui, sans-serif; overflow-wrap: anywhere; }
.civil-action-row { display: grid; grid-template-columns: .9fr 1.1fr; gap: 6px; margin-top: 9px; }
.civil-action-row .btn { min-height: 39px; font-size: .81rem; padding: 6px; }
.civil-tabs { display: flex; gap: 3px; padding: 3px; background: #e7eeea; border-radius: 7px; margin: 15px 0 10px; }
.civil-tabs button { flex: 1; padding: 7px 3px; border-radius: 5px; background: transparent; min-height: 37px; color: #4c625d; white-space: nowrap; font-size: .78rem; font-weight: 690; }
.civil-tabs button[aria-pressed="true"] { background: #fff; color: #11604c; box-shadow: 0 1px 3px #33554a1a; }
#civil-warning-count { margin-left: 1px; color: #86472e; }
#civil-attributes { display: grid; gap: 3px; }
#civil-attributes > label, #civil-structure-form > label { margin-top: 8px; }
#civil-attributes .field-row:first-child, #civil-structure-form .field-row { margin-top: 4px; }
#civil-attributes select { font-size: .89rem; }
.civil-source, .civil-note { color: #546d64; font-size: .76rem; margin: 6px 0; line-height: 1.6; }
.civil-source a { text-underline-offset: 2px; }
.civil-wide { width: 100%; margin: 8px 0; }
.civil-plan-edit { width: 100%; min-height: 40px; font-size: .83rem; }
.civil-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.civil-list .civil-row { min-height: 36px; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 4px; color: #234139; background: #fdfefb; border: 1px solid var(--line); border-radius: 6px; text-align: left; font-size: .75rem; padding: 5px 7px; }
.civil-row:hover, .civil-row[aria-pressed="true"] { background: #eaf3ea; border-color: #a5c3b0; }
.civil-list .warning-row { flex-direction: column; align-items: start; padding: 8px; }
.warning-title { display: flex; align-items: baseline; gap: 5px; }
.warning-tag { padding: 1px 5px; border-radius: 4px; flex: none; font-size: .69rem; font-weight: 700; background: #dbeae3; color: #2e6355; }
.warning-tag.notice { background: #f6ecd2; color: #79591f; }
.warning-tag.warning { background: #f8e6d5; color: #8c4f27; }
.warning-tag.major { background: #f9e1de; color: #8b302c; }
.warning-place { color: var(--muted); }
.civil-warning-detail { margin-top: 9px; padding: 10px; background: #f6f3e9; border: 1px solid #e2d6b8; border-radius: 8px; font-size: .79rem; }
.civil-warning-detail h4 { margin: 0 0 7px; font-size: .85rem; }
.civil-warning-detail dt { color: #635746; font-weight: 700; }
.civil-warning-detail dd { margin: 1px 0 6px; }
.civil-warning-detail p { margin-top: 8px; color: #474236; }
.civil-cost-head { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.civil-cost-head > div { border: 1px solid #d5e4d9; border-radius: 7px; padding: 8px; background: #fff; }
.civil-cost-head strong { color: #184d40; font-size: .9rem; overflow-wrap: anywhere; }
.civil-cost-line { padding: 5px 3px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 4px; font-size: .8rem; }
.civil-cost-name { display: flex; align-items: center; gap: 5px; }
.civil-cost-name i { width: 10px; height: 10px; border-radius: 2px; }
.civil-cost-value { text-align: right; }
.civil-cost-value small { display: block; color: var(--muted); font-size: .70rem; }
.civil-dem { display: flex; align-items: center; gap: 4px; margin-top: 12px; padding: 6px; background: #eaf1ee; border-radius: 6px; }
.civil-dem p { color: #355d51; font-size: .76rem; }
.civil-dem .minimal-button { min-height: 30px; flex: none; }

.profile-dock { z-index: 6; position: absolute; left: 15px; right: 68px; bottom: 49px; background: #fcfefa; border: 1px solid #b5cfc2; border-radius: 9px; box-shadow: 0 4px 24px #193b3d35; max-height: min(50%, 420px); overflow: auto; overscroll-behavior: contain; }
.profile-header { position: sticky; top: 0; z-index: 1; background: #fcfefa; display: flex; gap: 11px; align-items: center; padding: 3px 8px 2px 13px; border-bottom: 1px solid #e1eae4; }
.profile-header h2 { color: #1e4e42; font-size: 1.02rem; }
.profile-source { margin-left: auto; font-size: .69rem; white-space: nowrap; text-underline-offset: 2px; }
.profile-header .icon-button { margin-left: 0; min-height: 34px; }
.profile-key { display: flex; gap: 12px; font-size: .76rem; color: #46655b; }
.profile-key span { display: flex; gap: 4px; align-items: center; }
.profile-key span::before { content: ''; width: 15px; height: 2px; border-radius: 2px; background: #548477; }
.profile-key .key-road::before { background: #ad5a33; }
#profile-chart { position: relative; inset: auto; display: block; width: 100%; height: clamp(140px, 23vh, 212px); touch-action: none; cursor: crosshair; }
#profile-chart:focus-visible { outline: 2px solid #6fab95; outline-offset: -2px; }
.profile-inspection { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 1px 8px 1px 12px; background: #eff6f0; border-block: 1px solid #e2ebe4; }
.profile-inspection output { font-size: .77rem; color: #395e54; font-variant-numeric: tabular-nums; }
.profile-inspection .minimal-button { flex: none; }
.profile-settings { padding: 3px 11px 6px; }
.profile-settings summary { color: #28574c; font-weight: 690; font-size: .83rem; cursor: pointer; padding: 5px 0; }
.profile-options { display: flex; gap: 6px; margin: 4px 0 5px; }
.profile-options .btn, .profile-form .btn { min-height: 35px; font-size: .76rem; padding: 5px 8px; }
.profile-options .btn:disabled { opacity: .56; }
.profile-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: end; }
.profile-form label { margin: 0 0 3px; font-size: .74rem; }
.profile-form input:not([type="file"]) { width: 110px; min-height: 35px; padding: 4px 6px; }
.profile-point-actions { display: flex; gap: 4px; }
.profile-point-actions button:disabled { opacity: .5; }
.map:has(.profile-dock:not([hidden])) .toast { top: 73px; bottom: auto; }

.selected-design-actions { display: grid; grid-template-columns: .9fr 1.1fr; gap: 5px; }
.selected-design-actions .btn { padding: 5px 3px; }
.facility-panel .panel-heading { margin-bottom: 8px; }
.facility-create { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin: 13px 0 10px; }
.facility-create .btn { min-height: 42px; padding: 5px 2px; font-size: .81rem; }
.infra-inline { display: flex; align-items: center; gap: 6px; }
.infra-inline .btn { flex: none; min-height: 42px; white-space: nowrap; padding: 5px 7px; font-size: .73rem; }
.infra-subhead { margin: 12px 0 6px; color: #31554b; font-size: .83rem; }
.infra-anchor { padding: 7px; border: 1px solid var(--line); border-radius: 6px; background: white; color: #31554b; font-size: .78rem; }
.infra-anchor label { font-weight: 680; overflow-wrap: anywhere; }
.infra-station { width: 92px; min-width: 0; min-height: 38px; margin-top: 3px; padding-inline: 6px; border: 1px solid #c6d8d0; border-radius: 5px; }
.infra-anchor .minimal-button { margin: 0; white-space: nowrap; }
.infra-buttons { display: flex; flex-wrap: wrap; gap: 5px; margin: 7px 0; }
.infra-buttons .btn { flex: 1 1 auto; min-height: 40px; padding: 6px 7px; font-size: .77rem; }
.infra-buttons .minimal-button { margin-left: 0; }
.civil-list .facility-row { justify-content: flex-start; min-height: 46px; gap: 7px; }
.infra-row-name { display: grid; min-width: 0; gap: 2px; overflow-wrap: anywhere; }
.infra-row-name small { color: var(--muted); }
.infra-badge { min-width: 31px; flex-shrink: 0; padding: 3px 4px; color: white; background: #255e88; border-radius: 5px; font: 750 .7rem system-ui, sans-serif; text-align: center; }
.infra-badge.jct { background: #4c4483; }
.infra-badge.sa { background: #0c6c5d; }
.infra-badge.pa { background: #55692e; }
.infra-result { padding: 8px; margin: 7px 0; color: #205347; background: #e7f1e9; border-radius: 6px; font-size: .79rem; overflow-wrap: anywhere; }
.infra-movement { display: flex; gap: 4px; align-items: center; justify-content: space-between; padding: 5px 7px; background: white; border: 1px solid var(--line); border-radius: 6px; }
.infra-movement .btn { min-height: 34px; padding: 4px 7px; font-size: .75rem; flex-shrink: 0; }
.infra-movement-info { display: grid; gap: 2px; min-width: 0; font-size: .77rem; overflow-wrap: anywhere; }
.move-pill { justify-self: start; padding: 1px 4px; border-radius: 4px; color: #626a65; background: #eff0ec; font-size: .69rem; }
.move-pill.on, .move-pill.straight { background: #e5f1e6; color: #285b4a; }
.move-pill.invalid { background: #f6e5db; color: #86472e; }
.infra-message { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px 4px; border-bottom: 1px solid var(--line); font-size: .75rem; }
.infra-message > span:nth-child(2) { flex: 1 1 70%; }
.infra-park { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.facility-panel form > label:not(.infra-check), #facility-rest-basic > label, #facility-template-wrap > label,
#facility-links label, #facility-ramp-editor > label { display: block; margin: 9px 0 5px; font-size: .81rem; font-weight: 650; }
.facility-panel #facility-links select, .facility-panel #facility-ramp-editor > select {
  width: 100%; min-width: 0; min-height: 42px; padding: 5px 7px; border: 1px solid #c6d8d0; border-radius: 6px; color: var(--ink); background: white;
}
.facility-panel #facility-targets { margin-top: 7px; }
.facility-panel .infra-check { display: flex; min-height: 34px; align-items: center; gap: 5px; font-size: .75rem; margin: 1px 0; }
.facility-panel input[type="checkbox"] { width: 16px; height: 16px; min-height: 16px; flex: none; accent-color: var(--green); }
#facility-equipment-options { display: grid; grid-template-columns: 1fr 1fr; padding: 6px 0 3px; gap: 0 5px; }
#lane-bands .civil-row { font-variant-numeric: tabular-nums; }
.ramp-edit-tools { position: absolute; z-index: 6; bottom: 48px; left: 15px; display: flex; align-items: center; gap: 5px; padding: 5px; border: 1px solid #b5cfc2; border-radius: 8px; background: #fcfefa; box-shadow: var(--shadow); }
.ramp-edit-tools > span { padding-inline: 3px; color: #395e54; font-size: .77rem; white-space: nowrap; }
.ramp-edit-tools .btn { min-height: 39px; padding: 5px 7px; white-space: nowrap; font-size: .77rem; }
.map:has(.ramp-edit-tools:not([hidden])) .toast { bottom: 104px; }

@media (max-width: 760px) {
  .civil-panel { padding-top: 2px; }
  .ramp-edit-tools { left: 7px; bottom: 43px; gap: 3px; }
  .ramp-edit-tools .btn { min-height: 42px; padding-inline: 5px; }
  .facility-panel .minimal-button, .infra-movement .btn, .civil-list .civil-row { min-height: 42px; }
  .facility-panel .infra-check { min-height: 40px; }
  #facility-save { display: none; }
  #facility-work .civil-action-row { grid-template-columns: minmax(0, 1fr); }
  .civil-name { margin-top: 2px; }
  .profile-dock { left: 6px; right: 6px; bottom: 42px; max-height: calc(100% - 152px); }
  .profile-header { padding-left: 9px; }
  .profile-key { gap: 6px; }
  #profile-chart { height: clamp(130px, 21dvh, 173px); }
  .profile-settings, .profile-inspection { padding-inline: 7px; }
  .profile-inspection output { font-size: .68rem; }
  .profile-inspection .minimal-button { font-size: .69rem; }
  .profile-form input:not([type="file"]) { width: 90px; }
  .map:has(.profile-dock:not([hidden])) .toast { top: 109px; }
}

@media (max-width: 360px) {
  .app-header { padding-inline: 8px; gap: 5px; }
  .header-actions { gap: 3px; }
  .header-icon, .header-button { width: 36px; }
  .brand { gap: 5px; }
  .brand-mark { width: 31px; height: 34px; flex: none; }
  .brand h1 { font-size: .94rem; }
}

.auto-layout { margin-top: -3px; }
.auto-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 5px; }
.auto-row select { font: inherit; font-size: .85rem; color: var(--ink); background: #fff; border: 1px solid #c6d8d0; border-radius: 6px; padding: 6px 4px; min-height: 38px; }
.auto-row .btn { min-height: 38px; font-size: .77rem; padding-inline: 7px; }
.auto-row .btn:disabled { opacity: .55; }
#auto-results:not(:empty) { margin: 5px 0 10px; }
.profile-structures { display: flex; flex-wrap: wrap; gap: 4px 9px; margin: -1px 10px 5px; color: #4c6b62; font-size: .66rem; }
.profile-structures span { display: flex; gap: 4px; align-items: center; }
.profile-structures span::before { content: ''; width: 9px; height: 7px; border-radius: 2px; background: var(--structure-color); }

/* The traffic panels share the controls and palette of the road editor. */
#facility-preview { width: 100%; height: 104px; border: 1px solid var(--line); border-radius: 7px; display: block; margin-bottom: 10px; }
#facility-preview[hidden] { display: none; }
.lane-range-row.is-upgraded { border-left: 3px solid #bb8021; }
#lane-reset { margin-top: 7px; }
#photo-tiles { z-index: 1; }
#road-map { z-index: 2; }
.map-traffic-legend { position: absolute; z-index: 3; bottom: 67px; left: 17px; display: flex; flex-wrap: wrap; gap: 4px 8px;
  max-width: min(410px, calc(100% - 82px)); padding: 7px 9px; border: 1px solid #cddbd3; border-radius: 7px;
  background: rgba(251,253,248,.96); box-shadow: 0 2px 12px #17373020; color: #204641; font-size: .73rem; pointer-events: none; }
.map-traffic-legend strong { width: 100%; }
.map-traffic-legend p { width: 100%; margin: 0; font-size: .7rem; }
.map-key { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.map-key i { width: 11px; height: 6px; border-radius: 2px; flex: 0 0 auto; }
.layers-panel { width: 252px; max-width: calc(100vw - 18px); max-height: min(78vh, 574px); overflow: auto; overscroll-behavior: contain; }
.layers-panel select, #new-start-mode { width: 100%; margin-bottom: 7px; }
.layers-panel .traffic-layer-label { min-height: 24px; color: #476762; font-weight: 720; font-size: .76rem; }
.map-source-details { font-size: .72rem; color: #48645e; }
.map-source-details summary { cursor: pointer; }
.map-source-details p { margin: 5px 0; }
.map-bottom { z-index: 3; }
.credit { flex-wrap: wrap; justify-content: flex-end; }
.credit .photo-fallback { pointer-events: auto; color: #173e36; font-size: .69rem; white-space: nowrap; }
#simulation-open.is-calculating > span:first-child { color: #eac875; }
.traffic-dialog { width: min(690px, calc(100vw - 28px)); max-height: min(90vh, 860px); }
.traffic-body { max-height: min(75vh, 710px); overflow-y: auto; overscroll-behavior: contain; padding-top: 12px; }
.traffic-body section > h3, .traffic-result h3 { font-size: .96rem; margin: 13px 0 6px; color: #21463e; }
.traffic-result h4 { font-size: .82rem; margin: 12px 0 6px; color: #345c53; }
.traffic-tabs { margin-bottom: 12px; }
.traffic-tabs button { flex: 1 1 0; }
.traffic-fields { display: grid; gap: 4px 10px; grid-template-columns: repeat(2,minmax(0,1fr)); margin: 4px 0; }
.traffic-fields > div { min-width: 0; }
.traffic-dialog select, .traffic-dialog input[type="number"] { width: 100%; }
.traffic-dialog label { display: block; font-size: .78rem; color: #3b5e56; margin: 6px 0 3px; }
.traffic-dialog label.infra-check { display: flex; align-items: center; min-height: 32px; }
.traffic-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; margin: 9px 0; }
.traffic-metrics:empty { display: none; }
.traffic-metrics div { background: #f0f5ee; border-radius: 6px; padding: 6px 8px; }
.traffic-metrics span, .traffic-metrics strong { display: block; }
.traffic-metrics span { font-size: .71rem; color: #506b61; }
.traffic-metrics strong { overflow-wrap: anywhere; color: #224b40; font-size: .95rem; }
.simulation-status { padding: 8px 9px; border-radius: 6px; background: #edf4f0; color: #2e5348; font-size: .84rem; }
#sim-progress { width: 100%; accent-color: #188366; }
.sim-actions { margin-top: 8px; flex-wrap: wrap; }
.traffic-options { margin-top: 10px; }
.traffic-table-wrap { overflow: auto; max-width: 100%; margin: 6px 0 10px; border: 1px solid #dce7dc; border-radius: 6px; }
.traffic-table { border-collapse: collapse; width: 100%; font-size: .76rem; }
.traffic-table th, .traffic-table td { text-align: start; border-bottom: 1px solid #e3ebe2; padding: 6px 7px; }
.traffic-table th { background: #edf4ed; color: #345c50; white-space: nowrap; }
.traffic-table td { min-width: 71px; }
.traffic-table td .minimal-button { text-align: start; line-height: 1.35; }
.traffic-table tbody tr:last-child td { border-bottom: 0; }
.section-traffic-values { margin-top: 8px; }
#sim-operation { margin: 7px 0 10px; }
#drive-result { margin-top: 9px; }
@media (max-width:760px) {
  .map-traffic-legend { bottom: 46px; left: 6px; max-width: min(297px,calc(100% - 66px)); padding: 4px 6px; font-size: .65rem; gap: 3px 5px; }
  .map-traffic-legend p { font-size: .62rem; }
  .traffic-dialog { width: calc(100vw - 16px); }
  .traffic-body { padding-left: 12px; padding-right: 12px; }
}
.map-controls { z-index: 4; }
#photo-tiles img.ready { filter: none; }
.credit #photo-credit:not([hidden]):not(:empty) { display: inline; }

.action-guide { margin: 0 0 9px; padding: 8px 10px; border-radius: 7px; background: #e9f3ec; color: #27554a; font-size: .83rem; line-height: 1.45; }
.facility-summary { margin: 8px 0; color: #2d5a4f; font-size: .8rem; }
.facility-ports { margin: 10px 0; }
.facility-ports .infra-subhead { margin-bottom: 5px; }
.junction-port-row { display: grid; gap: 5px; background: #f5f8f3; border: 1px solid #d6e3da; border-radius: 7px; padding: 8px; font-size: .82rem; }
.port-state { color: #7c5620; font-size: .74rem; }
.junction-port-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.junction-port-actions .btn { min-height: 33px; font-size: .76rem; }
.port-settings { margin: 0; }
.port-settings input,.port-settings select,.port-settings label { display:block; width:100%; margin-top:5px; }
.civil-tabs button:disabled { opacity: .65; cursor: default; }

.profile-batch { margin: 4px 9px; padding: 3px 8px 8px; border: 1px solid #d3e5df; border-radius: 5px; background: #f2faf7; }
.profile-batch-fields { display: flex; align-items: end; gap: 7px; flex-wrap: wrap; margin: 6px 0; }
.profile-batch-fields > div { flex: 1 1 105px; min-width: 0; }
.profile-batch-fields select, .profile-batch-fields input { width: 100%; min-height: 35px; }
#batch-point-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(137px,1fr)); gap: 2px 6px; max-height: 125px; overflow-y: auto; }
#batch-point-list label { display: flex; align-items: center; gap: 4px; }
.profile-batch-report { padding: 7px; margin-top: 6px; border-left: 3px solid #22859e; font-size: .79rem; background: #e7f5f7; }
.profile-batch-report p { margin: 4px 0; }
#batch-note { margin: 4px 0; }
@media (max-width: 760px) {
  .profile-batch { margin-inline: 4px; }
  .profile-batch :is(button,select,input) { min-height: 42px; }
  #batch-point-list label { min-height: 42px; }
  #batch-point-list input { min-height: unset; }
}

.traffic-map-shortcuts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.traffic-reading { padding: 9px 11px; margin: 8px 0; background: #f0f7f5; border-left: 4px solid #408c78; border-radius: 4px; }
.traffic-reading strong, .traffic-reading p { display: block; margin: 0 0 4px; }
.traffic-reading p:last-child { margin-bottom: 0; }
.traffic-reading.jam-2 { background: #fff6dd; border-color: #ba7814; }
.traffic-reading.jam-3, .traffic-reading.jam-4 { background: #fff1ed; border-color: #ad373b; }
.traffic-reading.disconnected, .traffic-reading.missing { border-color: #687782; }
.traffic-reading ul { margin: 5px 0 0; padding-left: 1.2em; }
.traffic-detail-toggle { margin-top: 8px; }
.traffic-detail-toggle summary { cursor: pointer; }
.traffic-legend-line { display: inline-block; border-radius: 2px; min-width: 18px; }
.traffic-legend-line.is-dashed { background: repeating-linear-gradient(to right,#596575 0 4px,transparent 4px 7px) !important; }
@media (max-width: 760px) {
  .traffic-map-shortcuts .btn { min-height: 42px; flex: 1 1 40%; }
}

.lane-traffic-comparison { margin-top: 8px; padding: 8px; background: #eef7f5; border-radius: 5px; font-size: .79rem; }
.lane-traffic-comparison p { margin: 3px 0; }
.lane-compare-direction { border-top: 1px solid #cfdfd9; margin-top: 4px; padding-top: 3px; }

.route-range-controls { margin: 7px 0 12px; padding: 9px; border: 1px solid #ddc9a7; border-radius: 7px; background: #fff8e9; }
.route-range-controls > strong { display: block; }
.route-range-controls > p { margin: 4px 0 7px; color: #6e492d; font-size: .83rem; }
.route-range-controls .attributes { margin: 5px 0 0; }
.route-range-controls .infra-buttons { flex-wrap: wrap; }
.route-range-controls .minimal-button { min-height: 32px; }
.route-range-controls .btn { min-height: 38px; }
.analysis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 10px 0 6px; }
.analysis-grid > div { min-width: 0; padding: 6px 7px; background: #eaf4f1; border-radius: 5px; }
.analysis-grid dt { color: #3d5e59; font-size: .75rem; }
.analysis-grid dd { margin: 2px 0 0; color: #173d3a; font-weight: 720; line-height: 1.35; overflow-wrap: anywhere; }
#analysis-summary > p, #analysis-status { margin: 8px 0; }
#analysis-charts { background: #f6faf9; padding: 7px; margin: 9px 0; border: 1px solid #ddeae6; border-radius: 5px; }
#analysis-plot { margin-top: 5px; width: 100%; }
#analysis-plot svg { display: block; width: 100%; cursor: crosshair; }
.analysis-plot-key { display: flex; gap: 9px; font-weight: 650; font-size: .76rem; }
#analysis-comparison h3 { font-size: .93rem; margin: 14px 0 6px; }
#analysis-panel .traffic-table-wrap { max-height: 260px; }
#analysis-panel .traffic-table th { position: sticky; top: 0; background: #eaf3f0; }
#analysis-panel .traffic-table .minimal-button { padding: 5px 0; white-space: normal; }
.traffic-layer-field select { width: 100%; }
.traffic-layer-field { margin-top: 7px; }
.map-legend-show { position: absolute; z-index: 3; left: 17px; bottom: 67px; }
.map-traffic-legend .legend-close { pointer-events: auto; font-size: .75rem; margin-left: auto; min-height: 26px; }
#lane-capacity-preview { background: #edf3f7; border-radius: 5px; padding: 7px; }
#lane-capacity-preview:empty { display: none; }
@media (max-width: 760px) {
  .map-legend-show { left: 6px; bottom: 46px; }
  .route-range-controls .btn,.route-range-controls select,.route-range-controls input[type=number] { min-height: 42px; }
  .analysis-grid { gap: 5px; }
  .analysis-grid dd { font-size: .88rem; }
}
.local-history,.traffic-main-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; margin: 6px 0; }
.local-history button,.traffic-main-actions button { min-height: 37px; padding-inline: 6px; }
.local-history button { font-size: .78rem; }
.local-history.design-history { position: sticky; top: 0; z-index: 2; background: #fcfefa; padding: 4px 0; }
.profile-dock .design-history { margin: 0; padding: 4px 8px; grid-template-columns: repeat(4,minmax(0,1fr)); }
.traffic-target { font-size: .86rem; color: #365950; font-weight: 680; }
#analysis-updated { margin: 2px 0 6px; }
#analysis-demand-banner { border-color: #a56d20; background: #fff1cd; }
#analysis-panel :is(select,input[type=number]) { width: 100%; }
.traffic-segment-card { margin: 7px 0; padding: 7px; border: 1px solid #cfddd5; border-radius: 6px; }
.traffic-segment-title { display: block; width: 100%; min-height: 36px; padding: 5px 0; font-weight: 670; background: transparent; color: #145e57; text-align: start; overflow-wrap: anywhere; }
.traffic-segment-card p { margin: 4px 0; }
.congestion-chip { display: inline-block; padding: 3px 6px; border-left: 4px solid; border-radius: 3px; font-size: .78rem; font-weight: 700; }
.congestion-chip.b0 { background: #e6f3e8; color: #15583e; }
.congestion-chip.b1 { background: #f4f0d8; color: #63500f; }
.congestion-chip.b2 { background: #ffead3; color: #743918; }
.congestion-chip.b3,.congestion-chip.b4 { background: #fce3e5; color: #84213f; }
.congestion-chip.bnone { background: #ebeff1; color: #41525f; }
.test-presets { display: flex; flex-wrap: wrap; gap: 5px; }
.test-presets button { min-height: 38px; }
#analysis-table .traffic-table { display: block; }
#analysis-table .traffic-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#analysis-table .traffic-table :is(tbody,tr) { display: block; width: 100%; }
#analysis-table .traffic-table tr { padding: 5px 7px; }
#analysis-table .traffic-table tr + tr { border-top: 2px solid #cfddd5; }
#analysis-table .traffic-table td { display: flex; justify-content: space-between; gap: 8px; padding: 4px 1px; }
#analysis-table .traffic-table td::before { content: attr(data-label); color: #345c50; flex-shrink: 0; }
@media (max-width:760px) {
  .panel-scroll:has(#analysis-panel:not([hidden])) { max-height: min(53dvh,470px); }
  .traffic-main-actions button,.local-history button,.test-presets button,.traffic-segment-title { min-height: 42px; }
  #analysis-panel :is(select,input[type=number]) { min-height: 42px; }
  .profile-dock .design-history { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .traffic-dialog .traffic-table { display: block; }
  .traffic-dialog .traffic-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .traffic-dialog .traffic-table :is(tbody,tr) { display: block; width: 100%; }
  .traffic-dialog .traffic-table tr { padding: 4px 7px; }
  .traffic-dialog .traffic-table tr + tr { border-top: 2px solid #cfddd5; }
  .traffic-dialog .traffic-table td { display: flex; justify-content: space-between; gap: 8px; padding: 4px 1px; }
  .traffic-dialog .traffic-table td::before { content: attr(data-label); color: #345c50; flex-shrink: 0; }
}

.profile-dock { max-height: min(72%, 720px); left:12px; right:61px; }
#profile-chart { height:clamp(215px, 34dvh, 355px); }
.profile-view-tools { display:flex; flex-wrap:wrap; align-items:center; gap:6px; padding:6px 11px; }
.profile-view-tools .btn { min-height:32px; padding:4px 9px; font-size:.85rem; }
.profile-axis-group { font-size:.83rem; display:inline-flex; align-items:center; gap:4px; color:#36594e; }
.profile-axis-group button { border:1px solid #b5cfc2; color:#183f34; background:#fbfffb; border-radius:5px; min-width:32px; min-height:32px; cursor:pointer; }
#profile-viewport { margin-left:auto; font-size:.8rem; color:#4a655c; font-variant-numeric:tabular-nums; }
.profile-dock.profile-maximized { position:fixed; inset:8px; max-height:none; z-index:60; }
.profile-maximized #profile-chart { height:clamp(220px, calc(100dvh - 183px), 1000px); }
@media(max-width:760px) {
  .profile-dock { left:6px; right:6px; max-height:calc(100% - 62px); }
  #profile-chart { height:clamp(177px, 30dvh, 305px); }
  .profile-dock.profile-maximized { inset:4px; }
  .profile-maximized #profile-chart { height:max(200px, calc(100dvh - 208px)); }
  #profile-viewport { margin-left:0; }
}

.catalog-main, .catalog-options { display:grid; grid-template-columns:minmax(0,1fr) minmax(100px,.85fr); gap:8px; margin:8px 0; align-items:end; }
.catalog-main > *, .catalog-options > * { min-width:0; }
.catalog-options label { display:grid; gap:4px; color:#4a6257; }
.catalog-options :is(input,select), .catalog-main :is(input,select) { width:100%; min-width:0; }
.scenario-dialog { width:min(730px,calc(100% - 20px)); }
.scenario-modes { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.scenario-modes label { display:flex; align-items:flex-start; gap:10px; border:1px solid #c7d9cf; background:#f5faf6; padding:13px; border-radius:8px; cursor:pointer; }
.scenario-modes label:has(input:checked) { border-color:#438d78; box-shadow:inset 0 0 0 1px #438d78; background:#eaf6ee; }
.scenario-modes strong,.scenario-modes small { display:block; }
.scenario-modes small { margin-top:4px; color:#526b61; font-weight:400; }
.catalog-checklist { max-height:248px; overflow:auto; border:1px solid #c7d9cf; border-radius:8px; background:#fbfdfa; }
.catalog-check { display:flex; align-items:center; gap:8px; padding:7px 10px; margin:0; }
.catalog-check + .catalog-check { border-top:1px solid #e2ebe4; }
.catalog-actions { justify-content:flex-start; align-items:center; }
.help-topic { border-bottom:1px solid #d5e5dc; margin:10px 0; padding:4px 0 10px; }
.help-topic h3 { margin:0 0 4px; }
.help-topic p { margin:0; color:#34564b; }
#projects-editor { margin-top:12px; }
#projects-output { white-space:pre-line; }
@media(max-width:540px) {
  .scenario-modes { grid-template-columns:1fr; }
  .scenario-modes label { padding:7px 10px; }
  .catalog-main { grid-template-columns:minmax(0,1.2fr) minmax(84px,.85fr); }
}

.inv-shortcuts, .inv-map-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-block: 9px; }
#inv-form { display: grid; gap: 8px; margin-block: 12px; }
#inv-form label, #inv-tariff label, #inv-manager-section label { display: block; font-size: .82rem; font-weight: 650; margin: 4px 0; }
#inv-form select, #inv-manager, #inv-rate { width: 100%; }
#inv-result-title, #inv-region h3, #inv-compare h4 { margin: 14px 0 8px; font-size: 1rem; }
.inv-metrics { display:grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap:6px; }
.inv-metrics > div { min-width:0; display:grid; gap:3px; padding:9px 10px; background:#edf4ef; border-radius: 8px; }
.inv-metrics span { font-size:.75rem; color:#4b635b; }
.inv-metrics strong { color:#133e32; font-size: .91rem; overflow-wrap:anywhere; }
.inv-region { border:1px solid #cbded5; border-radius:10px; padding:0 12px 10px; background:#f5f9f5; margin-top:10px; }
.inv-region ul { margin-block:6px; padding-left:18px; font-size:.82rem; }
.inv-region select { width:100%; }
.inv-result-note { margin:9px 0; color:#294b3e; font-size:.85rem; line-height:1.55; }
.inv-status { margin-block:8px; min-height: 1em; }
#inv-progress { width:100%; height:8px; accent-color:#227653; }
.inv-map-controls { display:grid; grid-template-columns:auto minmax(110px,1fr); gap:5px 8px; }
.inv-map-controls label { font-size:.82rem; }
.inv-map-controls button { grid-column:2; justify-self:end; }
.inv-chart { padding:8px 0; }
.inv-chart-row { display:grid; grid-template-columns:minmax(66px, .72fr) minmax(0, 1fr); gap:4px; margin:8px 0; font-size:.75rem; align-items:center; }
.inv-bar-track { min-height:5px; background:#e6ece9; border-radius:999px; grid-column:2; }
.inv-bar { display:block; height:5px; min-width:0; background:#297957; border-radius:999px; }
.inv-mini-table { width:100%; border-collapse:collapse; table-layout:fixed; font-size:.76rem; }
.inv-mini-table :is(th,td) { padding:6px 3px; text-align:left; border-bottom:1px solid #d5e1db; overflow-wrap:anywhere; }
.inv-mini-table tr > :first-child { width:43%; }
.map-investment-legend { top:68px; left:12px; bottom:auto; max-width:min(287px,calc(100% - 116px)); pointer-events:auto; }
.inv-key { display:flex; align-items:center; gap:5px; }
.inv-key i { width:12px; height:8px; border-radius:3px; flex:none; }
@media (max-width:760px) {
  .map-investment-legend { top:110px; left:6px; max-width:min(250px,calc(100% - 119px)); }
  #inv-kind, #inv-plan, #inv-plan-b, #inv-manager { font-size:16px; }
}

@media (max-width: 470px) {
  .brand { gap: 6px; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-mark svg { width: 20px; height: 20px; }
  .brand h1 { font-size: .96rem; }
  .version { display: none; }
  .header-actions { gap: 4px; }
  .header-icon, .header-button { width: 34px; height: 39px; }
}
@media (max-width: 365px) {
  .brand-mark { display: none; }
  .brand h1 { font-size: .88rem; }
  .header-actions { gap: 3px; }
  .header-icon, .header-button { width: 32px; }
}

.app:has(#business-strip:not([hidden])) { grid-template-rows:auto auto minmax(0,1fr); }
.business-strip { min-height:42px; padding:4px 16px; display:flex; align-items:center; gap:12px; background:#19434a; color:#e4f4ec; font-size:.88rem; }
.business-strip button { background:#2c615f; color:#f3faf6; border:1px solid #84a8a07a; border-radius:7px; padding:4px 10px; min-height:32px; white-space:nowrap; }
.business-strip time { font-variant-numeric:tabular-nums; white-space:nowrap; }
.business-strip strong { color:#eaf8c9; white-space:nowrap; font-variant-numeric:tabular-nums; }
#business-strip-status { margin-inline-end:auto; }
.business-strip select { color:#ecf5ef; background:#214c50; width:auto; min-height:30px; border-color:#67908c; font-size:.8rem; }
.business-start { margin-bottom:14px; padding:12px; border:1px solid #cbded3; border-radius:9px; background:#f3f8f5; }
.business-start > select { width:100%; }
#scenario-business { display:grid; gap:8px; margin-top:10px; }
.business-config-grid,.business-coordinates { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 10px; }
.business-config-grid label,.business-coordinates label { font-size:.86rem; }
.business-area-title { display:block; margin-top:5px; }
.business-area-options > :is(select,div), #scenario-areas > select, #business-grow-areas > select { width:100%; margin-top:5px; }
.business-pref-picker { max-height:185px; overflow:auto; padding:7px; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:2px 7px; }
.business-pref-picker label { gap:4px; font-size:.82rem; margin:0; min-width:0; }
.business-area-map { display:block; width:100%; height:auto; border-radius:8px; border:1px solid #c2d7d1; background:#dfedf0; touch-action:none; }
.business-dialog { width:min(740px,calc(100% - 30px)); }
.business-body { display:grid; gap:9px; }
.business-table-wrap { overflow:auto; width:100%; margin:.5rem 0; }
.business-table { width:100%; border-collapse:collapse; font-size:.88rem; }
.business-table tr > * { border-bottom:1px solid #d8e6df; padding:7px 9px; text-align:start; font-weight:400; white-space:normal; min-width:70px; }
.business-table thead th { background:#eaf2ed; color:#254e43; font-weight:720; }
.business-work-card { margin:6px 0; padding:10px 12px; border:1px solid #cfe1d5; border-radius:9px; background:#f8fbf8; }
.business-work-card h3,.business-body > section h3,.business-body details h3 { margin:2px 0 5px; font-size:1rem; }
.business-work-card progress { width:100%; height:9px; accent-color:#207354; }
.business-warning { background:#f7edda; color:#743a25; border-radius:7px; padding:9px 11px; }
#business-cash-chart { display:block; width:100%; max-width:460px; height:auto; margin-block:9px; }
#business-route-filter { margin-bottom:6px; }
#business-route-filter label { font-size:.82rem; }
#route-development { width:100%; }
@media (max-width:760px) {
  .business-strip { padding:4px 8px; gap:7px; font-size:.79rem; }
  .business-strip time { margin-inline-start:auto; }
  #business-strip-status { display:none; }
  .business-strip button { padding:3px 7px; }
  .business-strip select { padding:2px 13px 2px 4px; }
  .business-dialog { width:calc(100% - 15px); }
  .business-pref-picker { grid-template-columns:1fr 1fr; }
  .business-table tr > * { padding:5px 6px; font-size:.8rem; }
}

/* Demand area selection is a separate map interaction. */
.demand-pick { position:absolute; z-index:4; top:70px; right:66px; min-height:36px;
  background:#fbfdf4; box-shadow:0 2px 9px #142e4520; }
.demand-pick[aria-pressed="true"] { color:#fff; background:#263f60; border-color:#263f60; }
.map-investment-legend { pointer-events:none; }
.map-investment-legend button { pointer-events:auto; }
.inv-demand-controls { padding:9px 0 11px; border-bottom:1px solid #d4e2d8; }
#inv-region { scroll-margin-top:5px; }
@media (max-width:760px) {
  .demand-pick { top:108px; right:9px; transform:translateY(-100%); min-height:40px; }
  .map-investment-legend .legend-close { min-height:32px; }
  .inv-demand-controls select, .inv-demand-controls input { min-height:41px; }
}
@media (max-height:470px) and (orientation:landscape) {
  .demand-pick { top:65px; right:54px; transform:none; }
  .map-investment-legend { top:auto; bottom:35px; }
}

.vertical-candidates { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(250px,100%),1fr)); gap:6px; margin:8px 0; }
.vertical-candidate { display:grid; text-align:left; gap:2px; height:auto; }
.vertical-candidate span { font-size:.75rem; font-weight:500; }
.vertical-candidate[aria-pressed="true"] { background:#e6effa; border-color:#376b9a; }

.consult-include { display:flex; flex-wrap:wrap; gap:6px 15px; margin:10px 0; border:1px solid #c5d9cc; }
#consult-dialog textarea { width:100%; resize:vertical; font:inherit; color:#173733; border:1px solid #c0d4c7; border-radius:6px; padding:8px; }
#consult-output { font-family:ui-monospace,monospace; font-size:.82rem; }

.forecast-chart { display:block; width:100%; height:auto; max-width:630px; margin:12px 0 0; }

.public-work-dialog { width: min(580px, calc(100% - 20px)); }
#public-work-cost { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; margin-bottom: .8rem; }
#public-work-cost > div { display: grid; gap: .25rem; padding: .55rem; border: 1px solid var(--line, #d8e1de); border-radius: .45rem; }
#public-work-cost span, .public-metrics dt { font-size: .76rem; }
.public-summary { margin-block: .65rem; }
.public-decision, .public-ready { color: var(--green, #17664f); font-weight: 700; }
.public-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .55rem .8rem; margin: .55rem 0; }
.public-metrics dd { margin: .15rem 0 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.public-detail { margin-bottom: .65rem; }
#public-work-funding .inv-metrics { margin-block: .45rem; }
@media (max-width: 490px) {
  #public-work-cost > div { padding: .45rem; }
  #public-work-cost strong { font-size: .88rem; overflow-wrap: anywhere; }
  .public-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.business-strip { display:grid; grid-template-columns:auto auto auto minmax(0,1fr) auto auto auto; column-gap:10px; row-gap:2px; }
#business-strip-status { margin:0; text-align:right; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.business-strip-feedback { grid-column:3 / -1; text-align:right; font-size:.76rem; }
.business-strip-feedback:empty { display:none; }
.business-strip button:disabled { opacity:.58; }
.skip-compact { display:none; }
.planning-summary { margin-block:9px 14px; }
.planning-summary h3, .route-plan-guide h4 { margin:.35rem 0; }
.route-plan-guide { border:1px solid #9dc3b9; background:#f0f8f5; border-radius:9px; padding:8px; }
.route-plan-guide p { margin:.3rem 0; }
.route-plan-guide .inv-shortcuts { margin:4px 0 0; flex-wrap:wrap; }
#public-work-strategy { width:min(100%, 22rem); }
@media (max-width:760px) {
  .business-strip { grid-template-columns:auto minmax(0,1fr) auto auto auto; gap:2px 5px; }
  .business-strip time { margin:0; }
  .business-strip strong { grid-column:1 / 3; grid-row:2; font-size:.7rem; }
  .skip-label { display:none; }
  .skip-compact { display:inline; }
  #business-strip-status { display:block; grid-column:3 / -1; grid-row:2; text-align:right; font-size:.7rem; }
  .business-strip-feedback { grid-column:1 / -1; }
  .business-strip select { min-width:0; }
}
.consult-notes { margin-top:1.2rem; padding-top:.65rem; border-top:1px solid var(--line); }
.consult-notes h3 { margin:.2rem 0 .5rem; }
.consult-preview-text { white-space:pre-wrap; overflow-wrap:anywhere; }
@media (max-width:440px) { .consult-notes .dialog-actions { flex-wrap:wrap; } }

.app { grid-template-rows:auto auto minmax(0,1fr); }
.app:has(#business-strip:not([hidden])) { grid-template-rows:auto auto auto minmax(0,1fr); }
.workspace { position:relative; }
.workspace-nav { display:flex; align-items:stretch; gap:6px; min-width:0; padding:3px 10px 0; background:#e6efeb; border-bottom:1px solid #b6cbc2; }
#workspace-tabs { display:flex; gap:4px; min-width:0; flex:1; overflow-x:auto; scrollbar-width:thin; }
.workspace-tab { display:flex; flex:none; align-items:center; border:1px solid transparent; border-radius:8px 8px 0 0; white-space:nowrap; background:#d9e7e3; }
.workspace-tab.current { background:#fbfdf9; border-color:#b6cbc2; border-bottom-color:#fbfdf9; }
.workspace-tab button { border:0; background:transparent; color:#224841; padding:0 10px; min-height:33px; }
.workspace-tab.current button[role="tab"] { color:#07554a; font-weight:700; }
.workspace-tab .workspace-close { padding:0 7px; min-width:30px; font-size:1.2rem; }
#workspace-add { flex:none; width:91px; min-height:32px; font-size:.8rem; }
.workspace .task-dialog:not(:modal) { position:absolute; inset:8px; margin:auto; max-height:calc(100% - 16px); z-index:9; overflow:auto; }
.workspace .task-dialog:not(:modal) .dialog-heading { position:sticky; top:0; z-index:2; background:#fbfdf9; }
@media (max-width:760px) {
  .workspace-nav { padding-inline:5px; }
  .workspace-tab button { min-height:38px; }
  .workspace .task-dialog:not(:modal) { inset:3px; width:calc(100% - 6px); max-height:calc(100% - 6px); }
}

#boot-note {position:fixed;inset:0;z-index:999;background:#f2f4ec;color:#173e38;padding:12vh 8vw;font:600 1.1rem system-ui}
#boot-note[hidden],[hidden]{display:none!important}
.brand h1{font-size:clamp(.88rem,1.4vw,1.22rem);letter-spacing:.015em;line-height:1.18}
.brand h1 .brand-break{color:inherit}
.brand .version{font:600 .72rem system-ui;cursor:pointer;min-height:30px}
.highway-mark{background:transparent var(--app-icon) center / contain no-repeat!important}
.release-body{display:grid;gap:.8rem}.release-body h3{margin:.5rem 0 0}.release-body p{line-height:1.65;margin:.25rem 0}.release-body select{max-width:100%;min-height:32px}.release-body button{margin:3px 1px}
#update-offer{padding:12px;border:1px solid #7eaa91;border-radius:8px}.release-body label{display:block;margin:6px 0}
#vault-status{font-variant-numeric:tabular-nums;color:#146653}
@media(max-width:850px){.brand-break{display:block}.brand .version{display:inline-block!important}.brand h1{font-size:.78rem}.brand .highway-mark{width:26px;height:26px}.brand{gap:5px}}

.brand .version[hidden]{display:none!important}
