:root {
  --bg: #F2F5F7; --ink: #10212E; --muted: #55666F; --rule: #CBD5DC; --rule-soft: #DDE4E9; --hover: #E6ECF0;
  --ocean: #0E3A5B; --land: #4C6D86;
  --t0: #F2C14E; --t1: #D9DE8A; --t2: #9FD0B4; --t3: #6FA9A8;
  --yes: #1D6B45; --limited: #8A5A00; --no: #A2312A; --gray: #55666F;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: "IBM Plex Sans KR", -apple-system, "Apple SD Gothic Neo", sans-serif; color: var(--ink); background: var(--bg); word-break: keep-all; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ocean); outline-offset: 2px; }

.app { display: grid; grid-template-columns: 340px minmax(0, 1fr) 440px; height: 100vh; }
.left { display: flex; flex-direction: column; min-height: 0; padding: 40px 0 0 36px; }
header h1 { font-size: 44px; font-weight: 700; letter-spacing: -2px; line-height: 1.04; margin: 0; }
.sub { font-size: 15px; color: var(--muted); line-height: 1.6; margin: 14px 24px 10px 0; }
.link { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 14.5px; margin-bottom: 22px; }

.list { list-style: none; margin: 0; padding: 0 0 24px; overflow: auto; flex: 1; border-top: 1px solid var(--rule); }
.list button { width: 100%; display: grid; grid-template-columns: 28px 12px 1fr auto; gap: 10px; align-items: baseline; padding: 10px 20px 10px 0; background: none; border: 0; border-bottom: 1px solid var(--rule-soft); text-align: left; cursor: pointer; }
.list button:hover, .list button[aria-current="true"] { background: var(--hover); }
.list .n { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; font-size: 14px; }
.list i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 1px rgba(16,33,46,.15); }
.list .name { font-size: 16px; font-weight: 500; }
.list .name small { display: block; font-size: 13px; color: var(--muted); font-weight: 400; margin-top: 2px; line-height: 1.45; }
.list .pts { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

.globe { position: relative; min-height: 0; background: var(--bg); }
.globe svg { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.globe svg:active { cursor: grabbing; }
.sphere { fill: var(--ocean); }
.grat { fill: none; stroke: #fff; stroke-opacity: .07; stroke-width: .6; }
.c { fill: var(--land); stroke: var(--ocean); stroke-width: .35; }
.c.r { cursor: pointer; }
.c.r:hover { stroke: #fff; stroke-width: .9; }
.c.sel { stroke: #fff; stroke-width: 1.6; }
.pin circle { fill: var(--ocean); stroke: #fff; stroke-width: 1; }
.pin text { fill: #fff; font-size: 10.5px; font-weight: 700; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.pin { cursor: pointer; }
.legend { position: absolute; left: 24px; bottom: 20px; display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink); background: rgba(242,245,247,.9); padding: 6px 10px; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.reset { position: absolute; right: 20px; top: 20px; background: var(--bg); border: 1px solid var(--rule); padding: 7px 12px; cursor: pointer; font-size: 14px; }
.reset:hover { background: #fff; }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font-size: 13px; padding: 4px 8px; white-space: nowrap; transform: translate(-50%, -130%); }

.detail { overflow: auto; padding: 40px 36px 48px 32px; border-left: 1px solid var(--rule); background: #F7F9FA; }
.detail h2 { font-size: 40px; letter-spacing: -1.5px; margin: 0; line-height: 1.1; }
.detail .meta { font-size: 14px; color: var(--muted); margin: 8px 0 0; }
.detail .meta b { color: var(--ink); }
.detail .line { font-size: 17px; line-height: 1.55; margin: 14px 0 22px; font-weight: 500; }
.detail h3 { font-size: 15px; margin: 26px 0 8px; padding-top: 12px; border-top: 2px solid var(--ink); }
.detail p, .detail li { font-size: 14.5px; line-height: 1.7; }
.detail p { margin: 0 0 8px; }
.detail ul { margin: 0; padding-left: 18px; }
.pc { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pc h4 { font-size: 13.5px; margin: 0 0 4px; color: var(--muted); font-weight: 500; }

.bars { display: grid; grid-template-columns: 76px 1fr 44px; gap: 7px 10px; align-items: center; font-size: 13.5px; }
.bars .bar { height: 6px; background: var(--rule-soft); position: relative; }
.bars .bar span { position: absolute; inset: 0 auto 0 0; background: var(--ink); }
.bars .v { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

dl.kv { display: grid; grid-template-columns: 92px 1fr; margin: 0; }
dl.kv dt, dl.kv dd { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--rule-soft); font-size: 14.5px; line-height: 1.6; }
dl.kv dt { color: var(--muted); }
.st { font-weight: 700; }
.st.yes { color: var(--yes); } .st.limited { color: var(--limited); } .st.no { color: var(--no); } .st.gray { color: var(--gray); }
.opt { padding: 8px 0; border-bottom: 1px solid var(--rule-soft); }
.opt b { font-size: 14.5px; }
.opt p { margin: 2px 0 0; color: #2b3b47; }
.note { font-size: 13px; color: var(--muted); }
.src a { color: var(--ink); text-underline-offset: 2px; }
.src li { font-size: 13.5px; }
table.crit { width: 100%; border-collapse: collapse; font-size: 14px; }
table.crit td { padding: 7px 0; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
table.crit td:last-child { text-align: right; font-variant-numeric: tabular-nums; width: 48px; }
.back { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: 14px; color: var(--muted); margin-bottom: 16px; }
footer.f { margin-top: 30px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }

@media (max-width: 1180px) { .app { grid-template-columns: 300px minmax(0, 1fr) 380px; } header h1 { font-size: 36px; } }
@media (max-width: 900px) {
  .app { display: flex; flex-direction: column; height: auto; }
  .globe { order: 1; height: 62vh; min-height: 340px; }
  .left { display: contents; }
  header { order: 0; padding: 24px 20px 4px; }
  .list { order: 3; padding: 0 20px 40px; overflow: visible; margin: 0 20px; padding: 0 0 40px; }
  .detail { order: 2; border-left: 0; border-top: 1px solid var(--rule); padding: 24px 20px 32px; }
  header h1 { font-size: 34px; }
  .legend { left: 10px; bottom: 10px; gap: 10px; font-size: 12px; }
  .reset { right: 10px; top: 10px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
