* { box-sizing: border-box; }
body { margin: 0; }
:root {
  --nav: 53px;
  --p-bg: #f1f5f2;
  --p-ink: #141414;
  --p-muted: #4a5068;
  --p-action: #176746;
  --page-line: #c7d6ce;
  --font-text: "Malgun Gothic", system-ui, sans-serif;
  --font-mono: ui-monospace, Consolas, monospace;
}
body { background: var(--p-bg); color: var(--p-ink); font-family: var(--font-text); }
.wrap { width: min(680px, calc(100% - 36px)); margin-inline: auto; }
.masthead.nav { position: static; height: var(--nav); background: var(--p-bg); border-bottom: 1px solid var(--page-line); }
.mast-row { display: flex; align-items: center; gap: 8px; }
.mast-row { height: 100%; justify-content: space-between; }
.brand, .edition { text-decoration: none; color: inherit; }
.brand { font-weight: 800; display: inline-flex; gap: 8px; align-items: center; }
.station { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 4px; background: var(--p-action); color: white; }
.edition { font: 500 13px var(--font-mono); }
.edition span { margin-left: 4px; border: 1px solid var(--page-line); padding: 4px 6px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; z-index: 2; padding: 8px; background: white; }
h1, h2, p { margin: 0; }
main > section.broadcast { padding: 20px 0 24px; }
.kicker, .reading-label, .observed, .world-intro { font-size: 13px; color: var(--p-muted); }
.kicker { color: var(--p-action); font-weight: 700; }
h1 { font-size: clamp(31px, 8vw, 42px); line-height: 1.15; font-weight: 800; letter-spacing: -.07em; }
.reading-label { margin-top: 10px; }
.degrees { color: #123d46; font: 700 clamp(66px, 17vw, 96px)/1 var(--font-mono); letter-spacing: -.09em; }
.degrees small { font-size: .37em; margin-left: .17em; }
.observed { margin-top: 5px; }
time { font-family: var(--font-mono); white-space: nowrap; }
main > section.world { padding: 0 0 18px; }
h2 { font-size: 22px; line-height: 1.2; letter-spacing: -.055em; }
.world-intro { margin-top: 4px; }
footer { border-top: 1px solid var(--page-line); padding: 14px 0 20px; font-size: 13px; }
footer a { color: var(--p-action); text-underline-offset: 3px; }
a:focus-visible, select:focus-visible { outline: 2px solid var(--p-action); outline-offset: 3px; }
@media (min-width: 660px) {
  main > section.broadcast { padding-top: 32px; }
}

/* Keep observations and quotes together on short mobile screens. */
main > section:is(.broadcast, .world) { display: block; height: auto; min-height: 0; }
main > section:is(.broadcast, .world) > .wrap { display: block; height: auto; padding-block: 0; }





.newsline { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--page-line); font-size: 13px; }
.news-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.news-heading h2 { font-size: 16px; }
.news-heading a { color: var(--p-action); text-underline-offset: 2px; }
#headlines { list-style: none; margin: 4px 0 0; padding: 0; }
#headlines a { display: block; padding: 5px 0; line-height: 1.45; color: inherit; text-underline-offset: 2px; }
#news-status { color: var(--p-muted); }

.world-quotes { display: block; width: 100%; min-width: 0; margin-top: 10px; }
.world-quotes a { color: var(--p-action); }


.domestic-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 7px; font-size: 13px; }
.domestic-links a, .world-quotes .tradingview-widget-copyright a { color: var(--p-action); text-underline-offset: 2px; }

.domestic-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-top: 12px; }
.domestic-heading h3, .overseas-heading { margin: 0; font-size: 16px; }
.domestic-heading a { color: var(--p-action); font-size: 13px; text-underline-offset: 2px; }
.domestic-quotes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 8px 0 16px; }
.domestic-quotes > div { padding: 8px 10px; border: 1px solid var(--page-line); border-radius: 4px; }
.domestic-quotes dt { font-weight: 700; font-size: 14px; }
.domestic-quotes dd { margin: 3px 0 0; font-size: 13px; }
.domestic-quotes strong { display: block; font-size: 19px; font-variant-numeric: tabular-nums; }
.domestic-quotes small { display: block; color: var(--p-muted); font-size: 11px; }

#headlines li { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: baseline; gap: 8px; }
#headlines time { color: var(--p-muted); font-size: 11px; }

.river-map { margin: 12px 0 0; }
.river-map figcaption { font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.river-map figcaption span { margin-left: 6px; font-size: 12px; font-weight: 400; color: var(--p-muted); }
.river-map-body { position: relative; aspect-ratio: 680 / 758; overflow: hidden; border-radius: 8px; background: #e8efe9; container-type: inline-size; }
.river-art, .river-art img, .map-stations { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-stations { list-style: none; margin: 0; padding: 0; }
.map-station { position: absolute; left: var(--x); top: var(--y); width: var(--w); height: var(--h); display: grid; place-items: center; }
.station-seonyu { --x: 21.62%; --y: 28.50%; --w: 20%; --h: 10.82%; }
.station-anyang { --x: 6.18%; --y: 62.93%; --w: 20.15%; --h: 10.82%; }
.station-jungnang { --x: 57.06%; --y: 14.78%; --w: 19.71%; --h: 10.95%; }
.station-tancheon { --x: 75.29%; --y: 62.80%; --w: 20.29%; --h: 10.82%; }
.map-reading { width: 100%; color: #101b16; text-align: center; line-height: 1.1; white-space: nowrap; }
.map-reading strong, .map-value, .map-reading time { display: block; }
.map-reading strong { font-size: clamp(10px, 3.2cqw, 22px); }
.map-value { color: #075642; font-weight: 800; font-size: clamp(13px, 4.25cqw, 29px); font-variant-numeric: tabular-nums; }
.map-reading time { margin-top: 2px; font-size: clamp(8px, 2.15cqw, 12px); }
.map-status { margin-top: 6px; font-size: 11px; color: var(--p-muted); }

:root { color-scheme: light dark; }
@media (prefers-color-scheme: dark) {
  :root {
    --p-bg: #0c1821;
    --p-ink: #edf5fa;
    --p-muted: #a6bdcc;
    --p-action: #8bdfcf;
    --page-line: #34505d;
  }
  .station { background: #176746; }
  .river-map-body { background: #102732; }
  .station-seonyu { --x: 21.32%; --y: 37.34%; --w: 21.76%; --h: 12.14%; }
  .station-anyang { --x: 5.88%; --y: 72.03%; --w: 22.21%; --h: 12.27%; }
  .station-jungnang { --x: 55.74%; --y: 20.05%; --w: 22.79%; --h: 12.40%; }
  .station-tancheon { --x: 74.12%; --y: 72.69%; --w: 21.76%; --h: 12.40%; }
  .map-reading, .map-value { color: #f4faff; }
  .domestic-quotes a { color: var(--p-action); }
}

