:root {
  color-scheme: dark;
  --bg: #07131d;
  --panel: #0c1c29;
  --panel-2: #102536;
  --line: rgba(181, 214, 229, .14);
  --text: #eef8fa;
  --muted: #89a7b5;
  --cyan: #46d5df;
  --amber: #ffb455;
  --pink: #e862a3;
  --gold: #cfac4c;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 25% 0%, #10283a 0, var(--bg) 36rem); color: var(--text); }
button, select, input { font: inherit; }
button { color: inherit; }
.app-shell { width: min(1480px, calc(100% - 48px)); margin: 0 auto; padding: 34px 0 56px; }
.topbar { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 24px; }
.eyebrow, .section-label, .map-kicker, .hero-label { color: var(--cyan); font-size: .76rem; font-weight: 800; letter-spacing: .13em; }
h1 { margin: 7px 0 0; font-size: clamp(1.9rem, 4vw, 3.2rem); letter-spacing: -.055em; line-height: 1; }
.intro-copy { max-width: 720px; margin: 12px 0 0; color: #aac0c9; font-size: 1rem; line-height: 1.5; }
.data-status { color: var(--muted); font-size: .87rem; padding-bottom: 4px; white-space: nowrap; }
.data-status span { display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: #50d592; box-shadow: 0 0 14px #50d592; }
.scenario-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.scenario { appearance: none; border: 1px solid var(--line); border-radius: 10px; background: rgba(12, 28, 41, .68); padding: 13px 16px; text-align: left; cursor: pointer; transition: .18s ease; }
.scenario:hover { border-color: rgba(70, 213, 223, .42); transform: translateY(-1px); }
.scenario.active { border-color: var(--cyan); background: linear-gradient(135deg, rgba(70, 213, 223, .2), rgba(70, 213, 223, .06)); box-shadow: inset 0 -2px var(--cyan); }
.scenario b, .scenario span { display: block; }
.scenario b { font-size: .94rem; }
.scenario span { color: var(--muted); font-size: .78rem; margin-top: 4px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 14px; align-items: stretch; }
.map-card, .readout, .comparison, .method { background: rgba(12, 28, 41, .91); border: 1px solid var(--line); box-shadow: 0 24px 80px rgba(0,0,0,.22); }
.map-card { border-radius: 15px; padding: 12px; min-width: 0; }
.map-toolbar { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 1px 3px 11px 5px; }
.map-kicker { color: var(--text); }
.map-sample { color: var(--muted); font-size: .8rem; margin-left: 11px; }
.view-switch { padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: #07131d; }
.view { border: 0; border-radius: 5px; background: transparent; color: var(--muted); padding: 7px 11px; font-size: .8rem; cursor: pointer; }
.view.active { color: var(--text); background: var(--panel-2); }
.map { position: relative; overflow: hidden; width: 100%; aspect-ratio: 1.72 / 1; min-height: 420px; border-radius: 10px; background: #d8dedf; cursor: grab; touch-action: none; user-select: none; }
.map.panning { cursor: grabbing; }
.tile-layer, #mapCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.tile-layer { overflow: hidden; background: #d8dedf; filter: grayscale(1) contrast(.8) brightness(1.12); }
.tile-layer img { position: absolute; display: block; max-width: none; user-select: none; -webkit-user-drag: none; }
#mapCanvas { z-index: 2; pointer-events: none; }
.marker { position: absolute; width: 34px; height: 34px; transform: translate(-50%, -50%); border: 2px solid white; border-radius: 50% 50% 50% 8px; background: var(--pink); box-shadow: 0 8px 24px rgba(0,0,0,.55), 0 0 0 6px rgba(232,98,163,.19); rotate: -45deg; cursor: grab; z-index: 5; }
.marker:active { cursor: grabbing; }
.marker:focus-visible { outline: 3px solid var(--amber); outline-offset: 4px; }
.marker span { position: absolute; width: 8px; height: 8px; left: 11px; top: 11px; background: white; border-radius: 50%; }
.drag-hint { position: absolute; left: 18px; top: 17px; color: rgba(238,248,250,.82); font-size: .75rem; font-weight: 800; letter-spacing: .08em; pointer-events: none; transition: opacity .3s; }
.touch-hint { display: none; }
.north { position: absolute; right: 18px; top: 17px; font-weight: 800; font-size: .78rem; color: rgba(238,248,250,.74); }
.map-controls { position: absolute; right: 14px; top: 43px; display: grid; border: 1px solid rgba(199,222,228,.24); border-radius: 8px; overflow: hidden; box-shadow: 0 8px 22px rgba(0,0,0,.24); z-index: 6; }
.map-controls button { width: 38px; height: 36px; border: 0; border-bottom: 1px solid rgba(199,222,228,.16); background: rgba(3,12,18,.78); color: #eaf7f9; font-size: 1.25rem; line-height: 1; cursor: pointer; backdrop-filter: blur(8px); }
.map-controls button:last-child { border-bottom: 0; font-size: 1.05rem; }
.map-controls button:hover, .map-controls button:focus-visible { background: rgba(27,72,87,.92); outline: 0; }
.legend { z-index: 4; position: absolute; left: 18px; bottom: 17px; display: flex; gap: 6px; align-items: center; padding: 7px 9px; border-radius: 7px; background: rgba(3, 12, 18, .76); backdrop-filter: blur(8px); font-size: .75rem; color: #d9e8ec; pointer-events: none; }
.legend i { display: block; width: 95px; height: 10px; border-radius: 99px; background: linear-gradient(90deg,#17324a,#1e7892,#f3d15e,#f06a47); }
.attribution { position: absolute; right: 8px; bottom: 7px; z-index: 7; padding: 4px 6px; border-radius: 4px; background: rgba(255,255,255,.9); font-size: .75rem; line-height: 1; }
.attribution a { color: #244e62; text-decoration: none; }
.attribution a:hover { text-decoration: underline; }
.readout { border-radius: 15px; padding: 25px; display: flex; flex-direction: column; }
.location-block { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.location-block h2 { font-size: 1.25rem; margin: 7px 0 3px; letter-spacing: -.025em; }
.coords { color: var(--muted); font-size: .77rem; font-variant-numeric: tabular-nums; }
.location-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 13px; }
.location-presets span { margin-right: 2px; color: var(--muted); font-size: .75rem; }
.location-presets button { border: 1px solid var(--line); border-radius: 999px; background: #07131d; padding: 6px 9px; color: #cfe0e6; font-size: .75rem; cursor: pointer; }
.location-presets button:hover { border-color: rgba(70,213,223,.55); background: rgba(70,213,223,.08); }
.sound-hero { padding: 23px 0 18px; }
.hero-label { color: var(--muted); font-size: .75rem; }
.db-row { display: flex; align-items: baseline; gap: 8px; margin-top: 5px; }
.db-row strong { font-size: 4.8rem; letter-spacing: -.08em; line-height: .95; font-variant-numeric: tabular-nums; }
.db-row span { color: var(--cyan); font-size: 1.1rem; font-weight: 800; }
.meter { position: relative; height: 7px; margin: 16px 0 10px; border-radius: 99px; background: linear-gradient(90deg,#183b5a 0%,#2a9db2 40%,#f5cf58 68%,#ef6947 100%); overflow: visible; }
.meter i { position: absolute; right: 0; top: 0; bottom: 0; background: rgba(4,16,24,.78); border-radius: 0 99px 99px 0; }
.meter em { position: absolute; top: -5px; width: 2px; height: 17px; background: white; box-shadow: 0 0 10px white; }
.sound-context { color: var(--muted); font-size: .83rem; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.metrics > div { padding: 13px 12px; min-height: 80px; }
.metrics > div:nth-child(odd) { border-right: 1px solid var(--line); }
.metrics > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.metrics span, .metrics b, .metrics small { display: block; }
.metrics span { color: var(--muted); font-size: .78rem; }
.metrics b { margin-top: 4px; font-size: 1.02rem; }
.metrics b i { font-style: normal; }
.metrics small { color: #7e9eab; margin-top: 3px; font-size: .72rem; line-height: 1.25; }
.control-group { margin-top: 19px; }
.control-group label, .slider-label { color: #cfe0e6; font-weight: 700; font-size: .79rem; }
select { width: 100%; margin-top: 8px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: #07131d; color: var(--text); }
.slider-label { display: flex; justify-content: space-between; align-items: center; }
.slider-label output { color: var(--cyan); font-size: .74rem; }
input[type="range"] { accent-color: var(--cyan); width: 100%; margin: 12px 0 0; }
.range-labels { display: flex; justify-content: space-between; color: #7897a4; font-size: .75rem; }
.advanced { margin-top: 15px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.advanced summary { padding: 13px 0; cursor: pointer; color: #cfe0e6; font-size: .82rem; font-weight: 750; }
.advanced[open] { padding-bottom: 15px; }
.advanced .control-group { margin-top: 2px; }
.reset { margin-top: 19px; border: 1px solid rgba(70,213,223,.45); border-radius: 8px; background: rgba(70,213,223,.09); padding: 11px; cursor: pointer; font-weight: 750; }
.reset:hover { background: rgba(70,213,223,.16); }
.uncertainty { margin: 12px 0 0; color: #83a1ae; font-size: .76rem; line-height: 1.45; }
.comparison { margin-top: 14px; border-radius: 15px; padding: 24px; }
.comparison-head { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 17px; }
.comparison h2 { margin: 6px 0 0; font-size: 1.45rem; }
.comparison-key { color: var(--muted); font-size: .76rem; }
.comparison-insight { margin: 0 0 15px; padding: 13px 15px; border: 1px solid rgba(70,213,223,.24); border-radius: 10px; background: linear-gradient(90deg, rgba(70,213,223,.12), rgba(70,213,223,.035)); color: #dceef1; font-size: .9rem; line-height: 1.45; }
.comparison-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; }
.compare-card { position: relative; overflow: hidden; padding: 15px; min-height: 112px; border: 1px solid var(--line); border-radius: 10px; background: #091923; }
.compare-card.active { border-color: rgba(70,213,223,.62); }
.compare-card::after { content: ''; position: absolute; inset: auto 0 0; height: 3px; background: var(--accent); }
.compare-card span, .compare-card small { display: block; }
.compare-card span { color: var(--muted); font-size: .78rem; }
.compare-card b { display: inline-block; margin: 11px 6px 0 0; font-size: 1.6rem; letter-spacing: -.04em; }
.compare-card em { color: var(--muted); font-style: normal; font-size: .72rem; }
.compare-card small { margin-top: 7px; color: #aac0c9; font-size: .76rem; line-height: 1.35; }
.compare-card .delta { color: #7fdce2; }
.sample-caveat { margin: 16px 2px 0; color: #8ba8b4; font-size: .82rem; line-height: 1.5; }
.method { margin-top: 14px; border-radius: 15px; padding: 0 24px; }
.method summary { cursor: pointer; padding: 19px 0; font-weight: 800; }
.method-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; border-top: 1px solid var(--line); }
.method-grid p { color: var(--muted); font-size: .86rem; line-height: 1.6; }
.method-grid b { color: var(--text); }
.source-line { color: #7897a4; font-size: .78rem; line-height: 1.6; padding: 3px 0 20px; }
.source-line a { color: #9bc9d2; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.scenario:focus-visible, .view:focus-visible, .reset:focus-visible, .location-presets button:focus-visible, summary:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
@media (max-width: 920px) {
  .app-shell { width: min(100% - 24px, 760px); padding-top: 22px; }
  .topbar { align-items: start; flex-direction: column; gap: 12px; }
  .data-status { padding: 0; }
  .workspace { grid-template-columns: 1fr; }
  .readout { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
  .location-block, .sound-hero { grid-column: span 1; }
  .metrics { grid-column: 1 / -1; }
  .reset, .uncertainty { grid-column: 1 / -1; }
  .comparison-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .app-shell { width: 100%; padding: 17px 10px 35px; }
  .topbar { padding: 0 5px; margin-bottom: 19px; }
  .eyebrow { font-size: .75rem; }
  .intro-copy { font-size: .92rem; }
  .data-status { font-size: .78rem; }
  .scenario-row { grid-template-columns: 1fr 1fr; gap: 6px; }
  .scenario { min-height: 62px; padding: 10px; text-align: left; }
  .scenario b { font-size: .82rem; }
  .scenario span { font-size: .75rem; }
  .map-card { padding: 7px; }
  .map-toolbar { padding: 4px 4px 8px; }
  .map-sample { display: block; margin: 3px 0 0; }
  .map { min-height: 390px; aspect-ratio: .93 / 1; }
  .legend { bottom: 28px; }
  .desktop-hint { display: none; }
  .touch-hint { display: inline; }
  .readout { grid-template-columns: 1fr; padding: 20px; }
  .sound-hero, .location-block { grid-column: 1; }
  .db-row strong { font-size: 4.2rem; }
  .comparison { padding: 20px 13px; }
  .comparison-head { display: block; }
  .comparison-key { margin-top: 8px; }
  .comparison-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .compare-card { padding: 12px; }
  .method { padding: 0 18px; }
  .method-grid { grid-template-columns: 1fr; gap: 0; }
}

.overlay-control { display:flex; align-items:center; gap:12px; padding:6px 4px 14px; font-size:14px; color:var(--muted); }
.overlay-control input[type="range"] { flex:1; min-width:60px; width:auto; margin:0; height:28px; }
.overlay-control output { min-width:36px; text-align:right; font-variant-numeric:tabular-nums; }
