:root {
  color-scheme: light;
  --ink: #192b46;
  --muted: #74839a;
  --paper: #ffffff;
  --line: #e1e9f4;
  --accent: #1768e5;
  --accent-dark: #1555b7;
  --accent-soft: #edf4ff;
  --stage: #172337;
  --success: #2b7567;
  --danger: #b94343;
  --topbar-height: 68px;
  --panel-width: 336px;
  --app-height: 100dvh;
  --visual-height: 100dvh;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--stage); overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button { border: 0; background: transparent; color: inherit; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button, input, select, textarea { transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid #86b5ff; outline-offset: 3px; }
button:disabled, select:disabled, input:disabled { opacity: .42; cursor: default; }
button:active:not(:disabled) { transform: translateY(1px); }
[hidden] { display: none !important; }
.sr-only { position: absolute; clip: rect(0,0,0,0); height: 1px; width: 1px; overflow: hidden; white-space: nowrap; }

.topbar { height: var(--topbar-height); padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--paper); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand > svg { width: 30px; height: 30px; fill: none; stroke: var(--accent); stroke-width: 1.8; flex: none; }
.brand h1 { font-size: 18px; font-weight: 650; letter-spacing: .02em; margin: 0; white-space: nowrap; }
.brand h1 span { font-size: 13px; letter-spacing: 0; font-weight: 400; color: var(--muted); margin-left: 14px; }
.local-badge { font-size: 11px; white-space: nowrap; background: var(--accent-soft); color: var(--accent-dark); padding: 5px 8px; border-radius: 5px; }
.local-badge i { display: inline-block; width: 5px; height: 5px; background: var(--accent); border-radius: 50%; margin-right: 5px; vertical-align: 2px; }
.view-tabs { display: flex; gap: 4px; background: #f0f5fc; padding: 4px; border-radius: 9px; }
.view-tabs button { height: 40px; padding: 0 22px; color: #61738f; border-radius: 6px; white-space: nowrap; }
.view-tabs button:hover:not(.selected) { color: var(--accent-dark); background: #e5efff; }
.view-tabs button.selected { background: var(--accent); color: #fff; font-weight: 600; box-shadow: 0 2px 5px #1768e51c; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-button { height: 40px; min-width: 40px; border-radius: 7px; font-size: 21px; color: #71829c; }
.icon-button:hover { background: var(--accent-soft); color: var(--accent); }
.topbar .icon-button { font-size: 15px; border: 1px solid var(--line); }
.panel-toggle { height: 40px; padding: 0 14px; background: var(--accent-soft); color: var(--accent-dark); border: 1px solid #d6e5ff; border-radius: 7px; white-space: nowrap; }
.panel-toggle:hover { background: #dceaff; }
.panel-toggle span { display: inline-block; min-width: 18px; font-size: 11px; font-weight: 600; color: var(--accent); margin-left: 6px; }

.workspace { height: calc(var(--app-height) - var(--topbar-height)); display: flex; min-height: 0; }
.scene-column { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.stage { position: relative; flex: 1; min-height: 180px; overflow: hidden; isolation: isolate; touch-action: none; background: var(--stage); }
#canvas-host { position: absolute; inset: 0; }
canvas { display: block; width: 100%; height: 100%; }
#markers { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.stage-heading { position: absolute; left: 24px; top: 22px; display: flex; gap: 6px; align-items: center; pointer-events: none; z-index: 7; }
.floor-label, .station-label, .coverage-badge { padding: 8px 10px; border-radius: 6px; background: #fff; color: #354761; font-size: 12px; box-shadow: 0 2px 10px #0a1d3914; }
.floor-label { font-weight: 650; color: var(--accent); pointer-events: auto; min-height: 40px; max-width: 220px; border: 1px solid #d6e5ff; padding-right: 24px; }
.floor-label:hover:not(:disabled) { background: var(--accent-soft); }
.coverage-badge { color: #6c7c93; background: #fffffff2; }
.stage-tools { position: absolute; right: 20px; top: 20px; display: flex; gap: 6px; align-items: center; }
.stage-tools button, .stage-tools select { height: 40px; border: 1px solid #e1e9f4; border-radius: 7px; padding: 0 12px; background: #fffffff5; color: #344963; font-size: 12px; box-shadow: 0 2px 10px #0a1d3910; }
.stage-tools button:hover, .stage-tools select:hover { color: var(--accent); background: #f2f7ff; }
.stage-tools button[aria-pressed=true] { background: var(--accent-soft); border-color: #9fc3ff; color: var(--accent-dark); }
.stage-tools select { appearance: auto; }
.load-state { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 12px; color: #e1ebfa; background: #172337f5; z-index: 6; font-size: 14px; }
.load-state button { min-height: 40px; border: 1px solid #6585af; padding: 0 16px; border-radius: 7px; color: #fff; }
.load-state button:hover { background: #294266; }
.load-state.error { flex-direction: column; color: #f0d0d0; padding: 30px; text-align: center; }
.load-state.progress { inset: auto auto 22px 24px; padding: 10px 12px; background: #172337e8; border: 1px solid #8eaad233; border-radius: 7px; font-size: 12px; z-index: 4; pointer-events: none; }
.spinner { width: 17px; height: 17px; border: 2px solid #ffffff30; border-top-color: #81b3ff; border-radius: 50%; animation: spin .8s linear infinite; }
.gap-state { position: absolute; left: 50%; top: 45%; transform: translate(-50%,-50%); color: #bdcce2; text-align: center; pointer-events: none; }
.gap-symbol { font-size: 58px; font-weight: 300; color: #6d86aa; }
.gap-state p { margin: 14px 0; font-size: 16px; }
.gap-state button { pointer-events: auto; min-height: 40px; background: #2c4263; border: 1px solid #6d8ab5; color: #eff5ff; padding: 0 18px; border-radius: 7px; font-size: 13px; }
.gap-state button:hover { background: #3a557b; }
.scene-bottom { position: absolute; left: 24px; right: 24px; bottom: 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; pointer-events: none; }
.scene-bottom > span { background: #172337db; color: #e1eafa; font-size: 11px; padding: 9px 10px; border-radius: 6px; }
.add-button { pointer-events: auto; min-height: 44px; display: flex; align-items: center; gap: 7px; background: var(--accent); color: #fff; border: 1px solid #4b8bf0; padding: 0 16px; border-radius: 8px; font-size: 13px; font-weight: 600; box-shadow: 0 3px 16px #09244b40; }
.add-button:hover { background: var(--accent-dark); }
.add-button > span { font-size: 22px; font-weight: 400; line-height: 18px; }
.add-button.active { background: #fff; color: var(--accent-dark); border-color: #a7c8fc; }
.pick-hint { position: absolute; left: 50%; top: 20px; transform: translateX(-50%); padding: 4px 6px 4px 14px; background: #fff; color: var(--accent-dark); border: 1px solid #a9caff; border-radius: 8px; box-shadow: 0 4px 18px #071a3b33; z-index: 8; display: flex; align-items: center; gap: 12px; white-space: nowrap; font-size: 13px; }
.pick-hint button { min-width: 40px; height: 40px; font-size: 22px; border-radius: 5px; color: #7689a4; }
.pick-hint button:hover { background: var(--accent-soft); }
.stage.picking { cursor: crosshair; }

.station-navigation { display: flex; gap: 8px; align-items: center; padding: 12px; height: 108px; background: #edf4fe; border-top: 1px solid #dce8f8; }
.step-button { color: #577ba9; min-width: 40px; height: 64px; font: 300 32px/1 sans-serif; border-radius: 7px; }
.step-button:hover { background: #dceaff; color: var(--accent); }
.station-strip { display: flex; gap: 8px; overflow: auto; min-width: 0; flex: 1; scrollbar-width: thin; scrollbar-color: #b3cbee transparent; scroll-behavior: smooth; padding: 3px 2px 6px; scroll-snap-type: x proximity; }
.station { flex: none; width: 78px; height: 70px; position: relative; padding: 0; border-radius: 7px; overflow: hidden; background: #c4d5eb; border: 2px solid #dce6f4; scroll-snap-align: center; }
.station img { display: block; object-fit: cover; width: 100%; height: 100%; opacity: .78; transition: opacity 160ms ease; }
.station span { position: absolute; bottom: 0; left: 0; right: 0; padding: 5px 6px; text-align: left; font-size: 11px; color: white; background: #173458bb; }
.station.selected { border-color: var(--accent); box-shadow: 0 0 0 2px #bad5ff; }
.station.selected img, .station:hover img { opacity: 1; }
.station.selected span { background: var(--accent); color: #fff; font-weight: 650; }
.station:hover { border-color: #71a4ed; }
.station-jump { display: flex; align-items: center; flex: none; gap: 4px; margin-left: 2px; }
.station-jump input { width: 48px; height: 44px; padding: 0 4px; border: 1px solid #c6d9f5; border-radius: 6px; color: var(--accent-dark); background: #fff; text-align: center; font-size: 13px; appearance: textfield; }
.station-jump input::-webkit-inner-spin-button, .station-jump input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.station-jump > span { color: #6380a7; font-size: 11px; min-width: 27px; white-space: nowrap; }
.station-jump button { min-width: 44px; min-height: 44px; padding: 0 5px; border-radius: 6px; color: var(--accent-dark); font-size: 12px; }
.station-jump button:hover:not(:disabled) { color: var(--accent); background: #dceaff; }

.annotation-panel { background: var(--paper); width: var(--panel-width); flex: none; display: flex; flex-direction: column; min-height: 0; overflow: hidden; border-left: 1px solid var(--line); transition: width 180ms ease, opacity 180ms ease; z-index: 10; }
.workspace.panel-closed .annotation-panel { width: 0; opacity: 0; pointer-events: none; border-left: 0; }
.panel-heading { padding: 20px 20px 12px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-width: var(--panel-width); }
.panel-heading h2 { font-size: 17px; margin: 0 0 7px; font-weight: 650; letter-spacing: .01em; }
.panel-heading h2 span { font-size: 12px; font-weight: 500; color: var(--accent); background: var(--accent-soft); margin-left: 7px; padding: 2px 6px; border-radius: 5px; }
.saved-state { font-size: 11px; color: var(--muted); }
.annotation-search { margin: 0 20px 8px; position: relative; }
.annotation-search svg { position: absolute; left: 11px; top: 12px; width: 16px; height: 16px; fill: none; stroke: #899bb5; stroke-width: 1.7; pointer-events: none; }
.annotation-search input { width: 100%; height: 40px; padding: 0 11px 0 34px; border: 1px solid var(--line); background: #f8faff; color: var(--ink); border-radius: 7px; font-size: 12px; }
.annotation-search input::placeholder { color: #8797ad; }
.annotation-search input:focus { background: #fff; border-color: #80b0f7; }
.filter-row { display: flex; gap: 20px; margin: 0 20px 12px; border-bottom: 1px solid var(--line); min-height: 40px; min-width: calc(var(--panel-width) - 40px); flex: none; }
.filter-row button { min-height: 40px; font-size: 12px; padding: 0 1px 9px; color: #7c8da5; position: relative; }
.filter-row button:hover { color: var(--accent); }
.filter-row button.selected { color: var(--accent); font-weight: 650; }
.filter-row button.selected::after { content: ""; height: 2px; position: absolute; bottom: -1px; left: 0; right: 0; background: var(--accent); border-radius: 2px; }
.draft-banner { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin: 0 18px 12px; padding: 5px 7px; background: #edf4ff; border: 1px solid #d4e3fb; border-radius: 7px; flex: none; }
.draft-banner > span, .draft-banner > strong { font-size: 12px; color: #5276a8; margin-right: auto; font-weight: 500; }
.draft-banner button { min-height: 40px; padding: 0 9px; font-size: 12px; border-radius: 5px; white-space: nowrap; }
#resume-draft { color: var(--accent); background: #fff; }
#resume-draft:hover { background: #dceaff; }
#discard-draft { color: #7a8ea9; }
#discard-draft:hover { background: #e0ecff; color: #526e94; }
.annotation-list { overflow: auto; flex: 1; min-height: 0; padding: 0 20px; min-width: var(--panel-width); scrollbar-width: thin; scrollbar-color: #cfdaeb transparent; overscroll-behavior: contain; }
.annotation-card { padding: 16px 0; border-bottom: 1px solid var(--line); cursor: pointer; position: relative; }
.annotation-card.selected { background: #edf4ff; margin-left: -10px; margin-right: -10px; padding-left: 10px; padding-right: 10px; border-radius: 8px; border-bottom-color: #d3e3fc; }
.annotation-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 11px; color: #7688a2; }
.anchor-tag { color: var(--accent-dark); background: #edf4ff; padding: 4px 6px; border-radius: 4px; font-size: 11px; white-space: nowrap; }
.annotation-card.selected .anchor-tag { background: #dceaff; }
.annotation-card p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 11px 0 10px; font-size: 13px; line-height: 1.75; color: #304360; }
.annotation-card-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 8px; font-size: 10px; color: #8393aa; }
.annotation-card-actions { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-left: auto; }
.locate-button, .resolved-button, .annotation-edit, .annotation-delete { min-height: 40px; padding: 0 9px; font-size: 11px; border-radius: 6px; white-space: nowrap; }
.locate-button { color: var(--accent); background: #edf4ff; }
.locate-button:hover { background: #dae9ff; }
.resolved-button { color: #687c9a; border: 1px solid #dbe5f3; background: #fff; }
.resolved-button:hover { color: var(--accent); border-color: #a9c7f2; }
.annotation-card.resolved p { color: #8392a7; }
.resolved-button.done { color: var(--success); background: #eef7f5; border-color: #cbe5de; }
.annotation-edit { color: #7085a2; }
.annotation-edit:hover { color: var(--accent); background: #edf4ff; }
.annotation-delete { color: #8b96a7; }
.annotation-delete:hover { color: var(--danger); background: #fff0f0; }
.empty-annotations { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px 18px 70px; color: #8b9cb3; min-width: var(--panel-width); }
.empty-annotations svg { width: 42px; height: 42px; stroke: #99b9e6; stroke-width: 1.3; fill: none; }
.empty-annotations p { font-size: 13px; margin: 14px 0 6px; }
.empty-annotations button { min-height: 40px; color: var(--accent); font-size: 12px; padding: 0 10px; border-radius: 6px; }
.empty-annotations button:hover { background: var(--accent-soft); }
.panel-footer { border-top: 1px solid var(--line); padding: 5px 16px 5px 20px; display: flex; gap: 7px; align-items: center; color: #8291a7; font-size: 11px; min-width: var(--panel-width); flex: none; }
.panel-footer button { margin-left: auto; min-width: 40px; height: 40px; border-radius: 6px; font-size: 21px; color: #698ab9; }
.panel-footer button:hover { background: var(--accent-soft); color: var(--accent); }
.status-dot { height: 6px; width: 6px; border-radius: 50%; background: var(--accent); flex: none; }

.composer { margin: 0 18px 14px; padding: 12px; background: #f3f7ff; border: 1px solid #ccdef9; border-radius: 9px; min-width: calc(var(--panel-width) - 36px); flex: none; }
.composer-heading { display: flex; justify-content: space-between; align-items: center; margin: -5px -5px 6px 0; }
.composer-heading strong { font-size: 12px; color: var(--accent-dark); font-weight: 600; }
.composer-heading button { min-width: 40px; height: 40px; font-size: 21px; color: #7e91ad; border-radius: 5px; }
.composer-heading button:hover { background: #e3edff; }
.composer textarea { width: 100%; resize: vertical; min-height: 100px; max-height: 220px; border: 1px solid #d1dff2; background: #fff; border-radius: 6px; padding: 11px; color: var(--ink); line-height: 1.65; font-size: 13px; }
.composer textarea:focus { border-color: #80aff2; }
.composer textarea::placeholder { color: #8f9db2; }
.author-field { display: flex; align-items: center; gap: 10px; font-size: 11px; color: #7b8ca6; margin: 7px 0 9px; }
.author-field input { flex: 1; min-width: 0; min-height: 40px; border: 0; border-bottom: 1px solid #d6e2f2; background: transparent; padding: 5px; font-size: 12px; color: #536e94; }
.composer-actions { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.composer-actions .save-button { width: auto; flex: 1; min-width: 90px; }
.secondary-button { min-height: 40px; padding: 0 10px; color: var(--accent-dark); border: 1px solid #c9dcf8; background: #fff; border-radius: 6px; font-size: 12px; white-space: nowrap; }
.secondary-button:hover { background: #e8f1ff; }
#cancel-edit { color: #7285a1; padding: 0 8px; min-height: 40px; font-size: 12px; }
.save-button { min-height: 40px; width: 100%; background: var(--accent); color: #fff; padding: 0 16px; border-radius: 6px; font-size: 12px; font-weight: 550; }
.save-button:hover { background: var(--accent-dark); }
.form-error { font-size: 12px; color: var(--danger); line-height: 1.6; overflow-wrap: anywhere; margin: 7px 0; }
.toast { position: fixed; bottom: 132px; left: 50%; transform: translateX(-50%); max-width: min(90vw,520px); padding: 12px 18px; border: 1px solid #d4e3fa; border-radius: 8px; background: #fff; color: #254a7e; box-shadow: 0 4px 25px #071d3b26; z-index: 30; font-size: 13px; line-height: 1.6; }
.toast.error { background: #fff5f3; border-color: #edceca; color: #a4433c; }

.pin { position: absolute; pointer-events: auto; transform: translate(-50%,-50%); display: flex; align-items: center; justify-content: center; width: 40px; min-width: 40px; height: 40px; border-radius: 50%; font-size: 11px; white-space: nowrap; isolation: isolate; padding: 0; }
.pin::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; z-index: -1; box-shadow: 0 2px 8px #071a3b50; }
.pin:active:not(:disabled) { transform: translate(-50%,-50%); }
.pin.annotation-pin { color: #fff; font-weight: 700; }
.pin.annotation-pin::before { background: var(--accent); border: 2px solid #f3f7ff; }
.pin.annotation-pin.selected::before { outline: 5px solid #6aabff60; }
.pin.annotation-pin.done::before { background: #5a809b; border-color: #dfeaf4; }
.pin.station-pin { color: #eff5ff; font-size: 10px; }
.pin.station-pin::before { background: #1e395edb; border: 1.5px solid #c5dcff; inset: 7px; }
.pin.station-pin:hover::before { background: #1768e5; }
.pin.station-pin.current { color: #fff; }
.pin.station-pin.current::before { background: var(--accent); border-color: #f0f6ff; }
.pin.pending-pin { pointer-events: none; }
.pin.pending-pin::before { background: var(--accent); border: 3px solid #fff; outline: 6px solid #68a6ff55; inset: 9px; }
.route-map { position: absolute; left: 24px; bottom: 76px; width: 280px; background: #fffffff7; color: #375173; border: 1px solid #d8e5f8; border-radius: 10px; padding: 8px 10px; box-shadow: 0 8px 24px #071a3b33; z-index: 5; }
.route-title { font-size: 12px; color: #6581a6; padding: 0 0 0 5px; display: flex; justify-content: space-between; align-items: center; }
.route-title button { min-width: 40px; height: 40px; font-size: 21px; color: #7d92b0; border-radius: 5px; }
.route-title button:hover { background: var(--accent-soft); }
.route-map svg { display: block; width: 100%; height: 150px; }
.route-map polyline { stroke: #a0bfec; }
.route-map circle { cursor: pointer; fill: #7ba2d9; stroke: #fff; }
.route-map circle[r="7"] { fill: var(--accent); }
.route-map text { pointer-events: none; font-family: inherit; font-size: 9px; fill: #355884; }

dialog { border: 1px solid #dce7f7; border-radius: 14px; padding: 28px 30px; width: min(430px,calc(100vw - 32px)); max-height: calc(var(--visual-height) - 40px); overflow: auto; box-shadow: 0 20px 80px #071a3b40; color: var(--ink); background: #fff; }
dialog::backdrop { background: #0e2347a8; }
dialog h2 { font-size: 20px; font-weight: 650; margin: 5px 0 20px; }
dialog li { font-size: 13px; line-height: 1.9; margin: 9px 0; }
dialog ol { padding-left: 20px; }
dialog p { font-size: 12px; line-height: 1.8; color: #7185a3; }
dialog .save-button { margin-top: 12px; }
.dialog-close { position: absolute; right: 12px; top: 10px; min-width: 40px; height: 40px; border-radius: 6px; font-size: 25px; color: #8da1bf; }
.dialog-close:hover { background: var(--accent-soft); }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1180px) {
  .local-badge { display: none; }
  .brand h1 span { display: none; }
  .topbar { padding: 0 16px; gap: 12px; }
  .view-tabs button { padding: 0 18px; }
  .stage-heading { left: 18px; top: 18px; }
  .stage-tools { top: 66px; right: 18px; }
  .coverage-badge { display: none; }
}
@media (max-width: 900px) {
  :root { --panel-width: 304px; }
  .topbar { gap: 8px; }
  .stage-tools { gap: 4px; }
  .stage-tools button, .stage-tools select { padding: 0 10px; }
}
@media (max-width: 720px) {
  :root { --topbar-height: 64px; }
  body { overscroll-behavior: none; }
  .topbar { padding: 0 12px; gap: 8px; }
  .brand { gap: 7px; }
  .brand > svg { width: 24px; height: 24px; }
  .brand h1 { font-size: 15px; }
  .view-tabs { padding: 3px; gap: 2px; }
  .view-tabs button { height: 44px; padding: 0 12px; font-size: 12px; }
  .top-actions { gap: 4px; }
  .topbar .icon-button { display: none; }
  .panel-toggle { padding: 0 10px; height: 44px; font-size: 12px; }
  .panel-toggle span { min-width: 0; margin-left: 4px; }
  .annotation-panel { position: fixed; bottom: env(safe-area-inset-bottom,0px); left: 0; right: 0; width: 100%; height: min(46dvh,430px); max-height: calc(var(--visual-height) - 104px); border-left: 0; border-top: 1px solid #d9e7fa; border-radius: 16px 16px 0 0; box-shadow: 0 -8px 32px #071a3b24; transition: transform 180ms ease, opacity 180ms ease; }
  .workspace.panel-closed .annotation-panel { width: 100%; transform: translateY(110%); opacity: 0; pointer-events: none; }
  .panel-heading { padding: 12px 18px 8px; min-width: 0; flex: none; }
  .panel-heading h2 { font-size: 16px; margin-bottom: 3px; }
  .panel-heading .icon-button { min-width: 44px; height: 44px; }
  .annotation-search { margin: 0 18px 4px; }
  .annotation-search input { height: 44px; font-size: 16px; }
  .annotation-search svg { top: 14px; }
  .filter-row { margin: 0 18px 6px; min-height: 44px; min-width: 0; gap: 24px; }
  .filter-row button { min-height: 44px; padding-bottom: 7px; }
  .annotation-list { min-width: 0; padding: 0 18px; }
  .draft-banner { margin: 0 16px 8px; }
  .draft-banner button { min-height: 44px; }
  .empty-annotations { min-width: 0; padding: 10px 20px 18px; }
  .empty-annotations svg { width: 28px; height: 28px; }
  .empty-annotations p { margin: 8px 0 3px; }
  .empty-annotations button { min-height: 44px; }
  .composer { min-width: 0; margin: 0 16px 8px; padding: 10px; overflow: auto; overscroll-behavior: contain; flex: 1 1 auto; min-height: 0; }
  .composer textarea { min-height: 76px; max-height: 120px; font-size: 16px; padding: 9px; }
  .composer-heading { margin-bottom: 3px; }
  .composer-heading button { min-width: 44px; height: 44px; }
  .author-field { margin: 3px 0 5px; }
  .author-field input { min-height: 44px; font-size: 16px; }
  .composer-actions { margin-top: 8px; position: sticky; bottom: -10px; background: #f3f7ff; padding: 4px 0 2px; }
  .composer-actions button { min-height: 44px; }
  .annotation-panel:has(.composer:not([hidden])) .draft-banner,
  .annotation-panel:has(.composer:not([hidden])) .annotation-search,
  .annotation-panel:has(.composer:not([hidden])) .filter-row,
  .annotation-panel:has(.composer:not([hidden])) .annotation-list,
  .annotation-panel:has(.composer:not([hidden])) .empty-annotations,
  .annotation-panel:has(.composer:not([hidden])) .panel-footer { display: none !important; }
  .panel-footer { min-width: 0; padding: 1px 14px 1px 18px; }
  .panel-footer button { min-width: 44px; height: 44px; }
  .stage-heading { left: 12px; top: 12px; gap: 5px; }
  .floor-label, .station-label { padding: 8px; font-size: 11px; }
  .floor-label { max-width: min(52vw,220px); min-height: 44px; padding-right: 20px; }
  .stage-tools { right: 12px; top: 58px; gap: 4px; max-width: calc(100% - 24px); flex-wrap: wrap; justify-content: flex-end; }
  .stage-tools button, .stage-tools select { padding: 0 10px; font-size: 11px; height: 44px; }
  .scene-bottom { left: 12px; right: 12px; bottom: 16px; }
  .scene-bottom > span { font-size: 10px; padding: 8px; max-width: 165px; }
  .add-button { min-height: 44px; padding: 0 13px; font-size: 12px; }
  .station-navigation { height: 96px; padding: 8px 5px; gap: 2px; }
  .station { width: 66px; height: 64px; }
  .station-strip { gap: 7px; }
  .step-button { min-width: 44px; height: 64px; }
  .station-jump { gap: 2px; margin-left: 0; }
  .station-jump input { width: 44px; font-size: 16px; }
  .station-jump > span { font-size: 10px; min-width: 25px; }
  .pick-hint { top: 112px; padding-left: 12px; font-size: 12px; max-width: calc(100% - 24px); }
  .pick-hint button { min-width: 44px; height: 44px; }
  .route-map { left: 12px; bottom: 72px; width: 250px; }
  .route-title button { min-width: 44px; height: 44px; }
  .gap-state { top: 43%; width: 80%; }
  .gap-state p { font-size: 14px; }
  .gap-state button { min-height: 44px; }
  .toast { bottom: calc(46dvh + 12px); font-size: 12px; }
  .workspace.panel-closed ~ .toast { bottom: 112px; }
  .load-state.progress { bottom: 72px; left: 12px; }
  .annotation-card { padding: 12px 0; }
  .annotation-card p { margin: 8px 0; font-size: 13px; }
  .annotation-card-actions button { min-height: 44px; }
  .pin { min-width: 44px; width: 44px; height: 44px; }
  .pin::before { inset: 8px; }
  .pin.station-pin::before { inset: 9px; }
  .pin.pending-pin::before { inset: 11px; }
}
@media (max-width: 370px) {
  .topbar { padding: 0 8px; gap: 5px; }
  .brand > svg { display: none; }
  .view-tabs button { padding: 0 10px; }
  .panel-toggle { padding: 0 8px; }
}
@media (max-height: 600px) {
  .stage-tools { top: 58px; }
  .panel-heading { padding-top: 10px; }
  .station-navigation { height: 80px; padding-block: 5px; }
  .station { height: 58px; }
  .scene-bottom { bottom: 12px; }
  .gap-symbol { font-size: 35px; }
  .gap-state p { margin: 8px 0; }
  .composer textarea { min-height: 64px; }
  .route-map { bottom: 64px; max-height: 206px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; transition: none !important; }
}
