:root {
  color-scheme: dark;
  --bg: #05141d;
  --surface: #0a202b;
  --surface-2: #0d2834;
  --line: rgba(172, 216, 213, .15);
  --text: #edf7f5;
  --muted: #87a5a9;
  --accent: #baf566;
  --cyan: #5ce3dc;
  --amber: #ffc66f;
  --radius: 22px;
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}
[hidden] { display: none !important; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--text); background: radial-gradient(circle at 60% -20%, #123945 0, transparent 42%), var(--bg); }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.topbar { position: sticky; top: 0; z-index: 20; height: 76px; display: flex; align-items: center; gap: 42px; padding: 0 max(28px, calc((100vw - 1440px)/2)); background: rgba(5, 20, 29, .86); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 13px; margin-right: auto; }
.brand-mark { width: 42px; height: 42px; position: relative; display: grid; place-items: center; border-radius: 13px; background: var(--accent); transform: rotate(45deg); box-shadow: 0 0 28px rgba(186,245,102,.18); }
.brand-mark i { position: absolute; width: 4px; height: 22px; background: #071b27; border-radius: 4px; }
.brand-mark i:first-child { transform: translateX(-8px); height: 13px; }
.brand-mark i:last-child { transform: translateX(8px); height: 13px; }
.brand span:last-child { display: flex; flex-direction: column; gap: 1px; }
.brand strong { font-size: 17px; letter-spacing: .08em; }
.brand small { color: var(--muted); font-size: 11px; }
nav { display: flex; gap: 30px; color: #b7ccce; font-size: 14px; }
nav a:hover { color: var(--accent); }
.status { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid rgba(186,245,102,.22); border-radius: 999px; background: rgba(186,245,102,.06); color: #d9f7ad; font-size: 12px; }
.status span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.status b { font-weight: 600; }
.upload-nav { color: var(--accent); font-weight: 700; }

main { width: min(1440px, calc(100% - 56px)); margin: 0 auto; }
#upload { scroll-margin-top: 92px; }
.upload-panel { position: relative; display: grid; grid-template-columns: minmax(280px, .82fr) minmax(360px, 1.18fr); gap: 34px; margin: 28px 0 8px; padding: 30px; overflow: hidden; }
.upload-panel::before { content: ""; position: absolute; inset: -120px auto auto -80px; width: 300px; height: 300px; border-radius: 50%; background: rgba(92,227,220,.07); filter: blur(20px); pointer-events: none; }
.upload-intro, .upload-action { position: relative; z-index: 1; }
.upload-intro { display: flex; flex-direction: column; justify-content: center; }
.upload-intro h2 { margin: 0; font-size: clamp(28px, 3vw, 42px); letter-spacing: -.035em; }
.upload-intro > p:not(.section-kicker) { max-width: 560px; margin: 14px 0 23px; color: #b8cdce; font-size: 15px; line-height: 1.75; }
.upload-current { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.upload-current strong { color: #e5f3f1; overflow-wrap: anywhere; }
.upload-current .secondary { min-height: 36px; padding: 0 13px; font-size: 12px; }
.upload-action { display: grid; gap: 12px; }
.upload-dropzone { min-height: 184px; display: grid; place-items: center; align-content: center; gap: 8px; padding: 24px; border: 2px dashed rgba(92,227,220,.34); border-radius: 18px; color: #dceceb; background: linear-gradient(145deg, rgba(92,227,220,.06), rgba(186,245,102,.035)); text-align: center; cursor: pointer; transition: border-color .18s, background .18s, transform .18s; }
.upload-dropzone:hover, .upload-dropzone.is-dragover { border-color: var(--accent); background: rgba(186,245,102,.08); transform: translateY(-2px); }
.upload-dropzone:focus-visible { outline: 3px solid rgba(92,227,220,.62); outline-offset: 4px; }
.upload-dropzone.is-loading { opacity: .66; cursor: wait; pointer-events: none; }
.upload-dropzone strong { font-size: 22px; }
.upload-dropzone small { color: var(--muted); font-size: 13px; }
.upload-icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 16px; color: #071b27; background: var(--accent); font-size: 30px; font-weight: 300; line-height: 1; }
.is-loading .upload-icon { color: transparent; }
.is-loading .upload-icon::after { content: ""; position: absolute; width: 22px; height: 22px; border: 3px solid rgba(7,27,39,.25); border-top-color: #071b27; border-radius: 50%; animation: spin .8s linear infinite; }
.upload-status { padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; color: #c9dcdb; background: rgba(3,16,23,.38); font-size: 14px; line-height: 1.55; }
.upload-status::before { content: "ℹ"; display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 9px; border-radius: 50%; color: #071b27; background: var(--cyan); font-weight: 800; vertical-align: middle; }
.upload-status[data-state="success"] { border-color: rgba(186,245,102,.28); color: #e2f5c5; background: rgba(186,245,102,.06); }
.upload-status[data-state="success"]::before { content: "✓"; background: var(--accent); }
.upload-status[data-state="warning"] { border-color: rgba(255,198,111,.3); color: #ffe2b5; background: rgba(255,198,111,.06); }
.upload-status[data-state="warning"]::before { content: "!"; background: var(--amber); }
.upload-status[data-state="error"] { border-color: rgba(255,142,199,.35); color: #ffd3e9; background: rgba(255,142,199,.07); }
.upload-status[data-state="error"]::before { content: "×"; background: #ff8ec7; }
.centerline-entry { display: inline-flex; width: fit-content; color: var(--accent); font-size: 14px; font-weight: 750; text-decoration: none; }
.centerline-entry:hover { color: #e6ffc0; }
.projection-note.needs-confirmation { border-color: rgba(255,198,111,.32); background: rgba(255,198,111,.07); }
.projection-note.needs-confirmation > span { background: var(--amber); }
.upload-advanced { border-top: 1px solid var(--line); padding-top: 10px; color: var(--muted); font-size: 12px; }
.upload-advanced summary { min-height: 38px; display: flex; align-items: center; color: #bdd0d0; cursor: pointer; }
.upload-advanced p { margin: 4px 0 12px; line-height: 1.6; }
.component-picker { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 15px; border: 1px solid rgba(92,227,220,.3); border-radius: 10px; color: var(--cyan); background: rgba(92,227,220,.06); cursor: pointer; font-weight: 650; }
.component-picker:hover { background: rgba(92,227,220,.11); }
@keyframes spin { to { transform: rotate(360deg); } }

#overview { scroll-margin-top: 76px; }
.hero { min-height: 430px; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 70px; padding: 64px 0 50px; }
.eyebrow, .section-kicker { margin: 0 0 10px; color: var(--cyan); font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow span { display: inline-flex; margin-right: 10px; padding: 5px 9px; border-radius: 6px; color: #071b27; background: var(--accent); letter-spacing: .08em; }
.hero h1 { display: flex; align-items: baseline; gap: 16px; margin: 12px 0 4px; font-size: clamp(68px, 8.7vw, 130px); line-height: .96; letter-spacing: -.065em; font-variant-numeric: tabular-nums; }
.hero h1 small { font-size: clamp(22px, 2vw, 32px); letter-spacing: .02em; color: var(--muted); font-weight: 500; }
.hero-note { margin: 15px 0 28px; color: #b9cdcf; }
.hero-actions { display: flex; gap: 12px; }
.primary, .secondary { min-height: 45px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; font-weight: 650; }
.primary { color: #071b27; background: var(--accent); }
.primary:hover { background: #cdfb88; transform: translateY(-1px); }
.secondary { color: var(--text); border-color: var(--line); background: rgba(255,255,255,.025); }
.secondary:hover { border-color: rgba(92,227,220,.45); background: rgba(92,227,220,.06); }
.hero-meta { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: rgba(10,32,43,.62); box-shadow: 0 30px 80px rgba(0,0,0,.18); }
.hero-meta article { min-height: 142px; padding: 28px; display: grid; align-content: center; grid-template-columns: auto 1fr; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hero-meta article:nth-child(2n) { border-right: 0; }
.hero-meta article:nth-child(n+3) { border-bottom: 0; }
.hero-meta span { grid-column: 1/-1; margin-bottom: 9px; color: var(--muted); font-size: 12px; }
.hero-meta strong { font-size: 31px; letter-spacing: -.03em; }
.hero-meta strong.code { font-family: ui-monospace, Consolas, monospace; font-size: 25px; letter-spacing: .02em; }
.hero-meta small { align-self: end; padding: 0 0 4px 7px; color: var(--muted); }

.layer-section { margin: 8px 0 22px; scroll-margin-top: 92px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: 25px; letter-spacing: -.025em; }
.section-heading > p { margin: 0 0 3px; color: var(--muted); font-size: 12px; }
.layer-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.layer-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: linear-gradient(145deg, rgba(13,40,52,.9), rgba(7,27,38,.82)); box-shadow: 0 18px 45px rgba(0,0,0,.1); }
.layer-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; color: var(--muted); font-size: 11px; }
.layer-card-top i, .layer-toggle i, .table-filters i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--layer-color); box-shadow: 0 0 12px color-mix(in srgb, var(--layer-color) 60%, transparent); }
.layer-card > strong { display: block; font-size: 15px; }
.layer-count { display: flex; align-items: baseline; gap: 5px; margin: 7px 0 16px; font-size: 36px; line-height: 1; font-weight: 750; letter-spacing: -.045em; }
.layer-count small { color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0; }
.layer-card p { margin: 0 0 7px; overflow: hidden; color: var(--muted); font-family: ui-monospace, Consolas, monospace; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.layer-card code { display: block; overflow: hidden; color: color-mix(in srgb, var(--layer-color) 82%, white); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.projection-note { display: flex; align-items: center; gap: 13px; margin-top: 12px; padding: 13px 16px; border: 1px solid rgba(255,198,111,.17); border-radius: 13px; background: rgba(255,198,111,.055); color: #c7d5d4; }
.projection-note > span { flex: 0 0 auto; display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid rgba(255,198,111,.32); border-radius: 50%; color: var(--amber); font-family: Georgia, serif; font-size: 12px; }
.projection-note p { margin: 0; font-size: 11px; line-height: 1.6; }
.projection-note strong { margin-right: 6px; color: var(--amber); }

.panel { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(13,40,52,.92), rgba(7,27,38,.9)); box-shadow: 0 28px 70px rgba(0,0,0,.16); }
.panel-heading { display: flex; justify-content: space-between; align-items: center; padding: 25px 28px 19px; }
.panel h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.muted { color: var(--muted); font-size: 12px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(330px, .75fr); gap: 20px; scroll-margin-top: 92px; }
.map-panel { min-width: 0; overflow: hidden; }
.map-heading { padding-bottom: 13px; }
.text-button { padding: 7px 10px; border: 0; border-radius: 8px; color: var(--cyan); background: rgba(92,227,220,.07); font-size: 11px; }
.text-button:hover { background: rgba(92,227,220,.13); }
.layer-toggles { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 28px 15px; }
.layer-toggle { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; color: #779396; background: rgba(3,16,23,.28); font-size: 11px; }
.layer-toggle i { width: 7px; height: 7px; opacity: .35; box-shadow: none; }
.layer-toggle span { color: #5d777a; font-variant-numeric: tabular-nums; }
.layer-toggle.active { border-color: color-mix(in srgb, var(--layer-color) 32%, transparent); color: #d7e6e5; background: color-mix(in srgb, var(--layer-color) 7%, transparent); }
.layer-toggle.active i { opacity: 1; box-shadow: 0 0 9px color-mix(in srgb, var(--layer-color) 70%, transparent); }
.layer-toggle.active span { color: color-mix(in srgb, var(--layer-color) 78%, white); }
.map-legend { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.map-legend span { width: 20px; height: 3px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 8px rgba(186,245,102,.6); }
.map-stage { position: relative; height: 620px; margin: 0 18px 18px; border-radius: 15px; overflow: hidden; background: radial-gradient(circle at 50% 42%, rgba(17,64,72,.55), rgba(4,18,27,.96) 68%); border: 1px solid rgba(173,217,214,.08); }
#routeMap { width: 100%; height: 100%; display: block; }
.route-shadow { fill: none; stroke: rgba(92,227,220,.12); stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.route { fill: none; stroke: #62bbb7; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; cursor: pointer; transition: stroke .18s, stroke-width .18s, opacity .18s; }
.route:hover { stroke: #e2ffb9; stroke-width: 6; }
.route.dimmed { opacity: .18; }
.route.selected { stroke: var(--accent); stroke-width: 7; filter: url(#glow); opacity: 1; }
.route-node { fill: var(--accent); stroke: #071b27; stroke-width: 3; pointer-events: none; }
.map-feature { transition: opacity .18s, stroke-width .18s, transform .18s; }
.route { stroke: var(--feature-color); stroke-width: 2.5; cursor: default; }
.route.dimmed { opacity: .36; }
.route.selected { stroke: var(--feature-color); stroke-width: 6; filter: url(#glow); opacity: 1; }
.map-hit { cursor: pointer; }
.route-hit { fill: none; stroke: transparent; stroke-width: 16; pointer-events: stroke; }
.area-shape { fill: color-mix(in srgb, var(--feature-color) 26%, transparent); stroke: var(--feature-color); stroke-width: 2.5; }
.area-shape.dimmed { opacity: .35; }
.area-shape.selected { fill: color-mix(in srgb, var(--feature-color) 45%, transparent); stroke-width: 5; filter: url(#glow); opacity: 1; }
.area-hit { fill: transparent; stroke: transparent; stroke-width: 15; pointer-events: all; }
.point-symbol { fill: var(--feature-color); stroke: #071b27; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.point-symbol.dimmed { opacity: .45; }
.point-symbol.selected { stroke: white; stroke-width: 3; filter: url(#glow); opacity: 1; }
.point-hit { fill: transparent; stroke: transparent; pointer-events: all; }
.selection-node { fill: #071b27; stroke: var(--feature-color); stroke-width: 4; filter: url(#glow); pointer-events: none; }
.hidden { display: none; }
.north { position: absolute; right: 24px; top: 22px; display: grid; place-items: center; width: 38px; color: #b9cdcf; font-size: 11px; font-weight: 700; }
.north i { width: 0; height: 0; margin-top: 5px; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 24px solid var(--cyan); }
.scale { position: absolute; left: 24px; bottom: 22px; color: var(--muted); font-size: 11px; }
.scale i { display: block; width: 110px; height: 7px; margin-bottom: 5px; border: solid #9bb7b9; border-width: 0 2px 2px; }
.map-tooltip { position: absolute; z-index: 2; display: none; min-width: 130px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: rgba(3,16,23,.94); box-shadow: 0 14px 32px rgba(0,0,0,.3); color: #dcebea; font-size: 12px; pointer-events: none; }

.detail-panel { padding: 27px; }
.detail-top { display: flex; align-items: center; justify-content: space-between; }
.feature-id { padding: 6px 9px; border-radius: 7px; background: rgba(92,227,220,.08); color: var(--cyan); font-family: ui-monospace, Consolas, monospace; font-size: 11px; }
.detail-panel h2 { margin-top: 5px; font-size: 29px; }
.detail-layer { display: flex; align-items: center; gap: 7px; margin-top: 12px; color: var(--muted); font-size: 11px; }
.detail-layer i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px rgba(186,245,102,.45); }
.length-main { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 30px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.length-main strong { font-size: 55px; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.length-main span { color: var(--muted); }
.comparison { display: grid; gap: 12px; }
.comparison div { display: flex; justify-content: space-between; align-items: center; }
.comparison span, .coordinate-block span, .detail-footer span { color: var(--muted); font-size: 12px; }
.comparison strong { font-size: 14px; font-variant-numeric: tabular-nums; }
.coordinate-block { display: grid; gap: 12px; margin: 27px 0; padding: 18px; border-radius: 13px; background: rgba(1,14,21,.42); border: 1px solid rgba(173,217,214,.09); }
.coordinate-block div { display: grid; gap: 6px; }
.coordinate-block code { color: #cfe5e3; font-size: 11px; white-space: nowrap; }
.detail-footer { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.detail-footer div { display: grid; gap: 6px; }
.detail-footer strong { font-size: 12px; }
.attribute-list { margin: 20px 0 0; border-top: 1px solid var(--line); }
.attribute-list div { display: flex; justify-content: space-between; gap: 18px; padding: 10px 0; border-bottom: 1px solid rgba(172,216,213,.09); }
.attribute-list dt { color: var(--muted); font-size: 11px; }
.attribute-list dd { margin: 0; color: #d6e5e4; font-size: 11px; text-align: right; }

.insights { display: grid; grid-template-columns: 1.35fr .65fr; gap: 20px; margin: 20px 0; }
.composition { padding-bottom: 26px; }
.length-bars { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 34px; padding: 0 28px; }
.bar-item { display: grid; grid-template-columns: 70px 1fr 76px; gap: 10px; align-items: center; font-size: 12px; }
.bar-item { width: 100%; padding: 4px 0; border: 0; color: inherit; background: transparent; text-align: left; }
.bar-item:hover .bar-track { outline: 1px solid rgba(186,245,102,.28); }
.bar-item span:first-child { color: #c5d8d8; }
.bar-track { height: 6px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.06); }
.bar-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--accent)); }
.bar-value { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.empty-state { grid-column: 1/-1; padding: 22px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); text-align: center; }
.scope-card { padding: 27px; }
.scope-card h2 { margin-bottom: 16px; }
.scope-card > p:not(.section-kicker) { margin: 0 0 23px; color: #b6cbcc; font-size: 14px; line-height: 1.75; }
.scope-card dl { margin: 0; display: grid; gap: 0; }
.scope-card dl div { display: flex; justify-content: space-between; gap: 18px; padding: 12px 0; border-top: 1px solid var(--line); }
.scope-card dt { color: var(--muted); font-size: 12px; }
.scope-card dd { margin: 0; text-align: right; font-size: 12px; }

.records { margin-bottom: 26px; scroll-margin-top: 92px; overflow: hidden; }
.records-heading { gap: 20px; }
.table-tools { display: flex; align-items: center; gap: 12px; }
.search input { width: 235px; height: 38px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; outline: none; color: var(--text); background: rgba(3,16,23,.45); }
.search input:focus { border-color: rgba(92,227,220,.55); box-shadow: 0 0 0 3px rgba(92,227,220,.08); }
.unit-switch { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: rgba(3,16,23,.45); }
.unit-switch button { height: 30px; padding: 0 12px; color: var(--muted); border: 0; border-radius: 7px; background: transparent; font-size: 12px; }
.unit-switch button.active { color: #071b27; background: var(--accent); font-weight: 700; }
.table-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 28px 18px; }
.table-filters button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: rgba(3,16,23,.3); font-size: 11px; }
.table-filters button span { font-variant-numeric: tabular-nums; opacity: .72; }
.table-filters button.active { border-color: rgba(186,245,102,.3); color: #e6f6cf; background: rgba(186,245,102,.075); }
.table-filters i { width: 6px; height: 6px; box-shadow: none; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 13px 20px; color: var(--muted); background: rgba(3,16,23,.3); text-align: left; font-weight: 500; white-space: nowrap; }
td { padding: 16px 20px; border-top: 1px solid var(--line); color: #c8dcdb; font-variant-numeric: tabular-nums; white-space: nowrap; }
tbody tr { cursor: pointer; transition: background .15s; }
tbody tr:hover, tbody tr.active { background: rgba(92,227,220,.055); }
tbody tr:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }
tbody tr.active td:first-child { color: var(--accent); }
.line-name { display: flex; align-items: center; gap: 9px; color: var(--text); font-weight: 650; }
.line-swatch { width: 18px; height: 3px; border-radius: 3px; background: var(--cyan); }
.geometry-tag { display: inline-flex; padding: 4px 7px; border-radius: 6px; color: #b9cecf; background: rgba(255,255,255,.04); font-size: 11px; }
.no-results { text-align: center; color: var(--muted); padding: 32px; }
.record-count { padding: 13px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; text-align: right; }

footer { display: flex; justify-content: space-between; padding: 20px 2px 42px; color: var(--muted); font-size: 11px; }
footer code { color: #bcd2d1; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 50; opacity: 0; transform: translate(-50%, 14px); padding: 11px 15px; border: 1px solid rgba(186,245,102,.25); border-radius: 10px; color: #e6f9c8; background: rgba(6,27,35,.94); transition: .22s ease; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1050px) {
  .topbar nav { display: none; }
  .hero { grid-template-columns: 1fr; gap: 35px; }
  .workspace, .insights { grid-template-columns: 1fr; }
  .detail-panel { min-height: 0; }
  .length-bars { grid-template-columns: 1fr; }
  .upload-panel { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .topbar { height: 66px; padding: 0 18px; }
  .brand small, .status { display: none; }
  main { width: min(100% - 28px, 1440px); }
  .upload-panel { gap: 22px; margin-top: 16px; padding: 21px; }
  .upload-dropzone { min-height: 152px; }
  .upload-dropzone small { font-size: 0; }
  .upload-dropzone small::after { content: "点这里选择 ZIP"; font-size: 13px; }
  .upload-current { align-items: stretch; flex-direction: column; }
  .upload-current .secondary, .component-picker { width: 100%; min-height: 50px; }
  .hero { min-height: 0; padding: 42px 0 32px; }
  .hero h1 { font-size: 63px; }
  .hero-meta article { min-height: 112px; padding: 19px; }
  .hero-meta strong { font-size: 24px; }
  .map-stage { height: 460px; }
  .panel-heading, .detail-panel, .scope-card { padding-left: 19px; padding-right: 19px; }
  .length-bars { padding: 0 19px; }
  .records-heading { align-items: flex-start; flex-direction: column; }
  .table-tools { width: 100%; }
  .search { flex: 1; }
  .search input { width: 100%; }
  footer { flex-direction: column; gap: 8px; }
  .layer-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layer-card { padding: 16px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
  .layer-toggles, .table-filters { padding-left: 19px; padding-right: 19px; }
  .coordinate-block code { white-space: normal; overflow-wrap: anywhere; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 54px; }
  .hero-meta { grid-template-columns: 1fr 1fr; }
  .layer-cards { grid-template-columns: 1fr; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .table-tools { align-items: stretch; flex-direction: column; }
  .unit-switch { align-self: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
