:root {
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  color: #202b42;
  background: #f3f5fa;
  font-synthesis: none;
  --navy: #182443;
  --muted: #5d6981;
  --stroke: #dfe5f0;
  --accent: #4844a9;
  --green: #087253;
  --red: #b33b4d;
  --width: 74rem;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, select { font: inherit; }
button, select, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #7667d9; outline-offset: 3px; }
a { color: var(--accent); }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.75rem, 4vw, 2.45rem); letter-spacing: -.045em; line-height: 1.18; }
h2 { font-size: 1.14rem; letter-spacing: -.025em; }
.topbar { color: #fff; background: var(--navy); }
.topbar-inner, .nav, .layout { max-width: var(--width); margin: 0 auto; padding-inline: 1.5rem; }
.topbar-inner, .brand, .header-actions { display: flex; align-items: center; }
.topbar-inner { min-height: 4.6rem; justify-content: space-between; gap: .65rem; }
.brand { color: #fff; text-decoration: none; gap: .65rem; font-weight: 800; white-space: nowrap; letter-spacing: -.02em; }
.brand img { border-radius: .65rem; }
.header-actions { gap: .65rem; }
.sync { color: #dbe2f4; font-size: .81rem; }
.button { border: 1px solid var(--stroke); border-radius: .6rem; background: #fff; color: #29324c; padding: .52rem .78rem; font-size: .86rem; font-weight: 750; cursor: pointer; white-space: nowrap; min-height: 2.45rem; }
.button:hover { background: #eef0fb; }
.button:disabled { opacity: .6; cursor: wait; }
.refresh, .quiet { background: transparent; color: #fff; border-color: #596782; }
.refresh:hover, .quiet:hover { background: #2b395d; }
.nav-wrap { background: #fff; border-bottom: 1px solid var(--stroke); }
.nav { display: flex; gap: clamp(1.15rem, 4vw, 2.65rem); overflow: auto; scrollbar-width: none; }
.nav a { display: inline-flex; align-items: center; min-height: 3.3rem; border-bottom: 3px solid transparent; padding-top: 3px; color: var(--muted); white-space: nowrap; font-size: .93rem; font-weight: 700; text-decoration: none; }
.nav a[aria-current] { color: var(--accent); border-color: var(--accent); }
.layout { padding-block: 2rem 3rem; }
.page-head, .panel-head, .hero-top { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.page-head { margin-bottom: 1.25rem; }
.subtitle { margin-top: .55rem; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.controls { display: flex; flex-wrap: wrap; gap: .65rem; align-items: end; }
.control { display: grid; gap: .3rem; color: var(--muted); font-size: .81rem; font-weight: 700; }
select { appearance: none; padding: .52rem 2rem .52rem .72rem; min-height: 2.5rem; border: 1px solid #ccd5e6; border-radius: .6rem; color: #252e4b; background: #fff; font-size: .88rem; }
.select-wrap { display: grid; position: relative; }
.select-wrap::after { content: ""; pointer-events: none; position: absolute; right: .85rem; top: .9rem; width: .4rem; height: .4rem; border: solid #525d79; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.hero { display: grid; grid-template-columns: 1.35fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.hero-main { background: linear-gradient(125deg, #192747, #26396a); color: #fff; border-radius: 1rem; padding: 1.35rem; min-width: 0; }
.hero-main .muted { color: #d2d9ef; }
.hero-main .draft { color: #ffe2a7; background: #ffffff14; }
.hero-main .figure { margin: .7rem 0 .55rem; font-size: clamp(1.65rem, 5vw, 2.7rem); }
.hero-main .positive { color: #9ce6ca; }
.hero-main .negative { color: #ffc0ce; }
.hero-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.card, .panel { background: #fff; border: 1px solid var(--stroke); border-radius: 1rem; min-width: 0; }
.card { padding: 1rem; }
.card .figure { margin-top: .42rem; }
.figure { font-weight: 820; font-size: clamp(1.05rem, 2.25vw, 1.48rem); letter-spacing: -.045em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.muted { color: var(--muted); font-size: .875rem; line-height: 1.45; }
.tag { display: inline-block; border-radius: .35rem; background: #eef0f9; color: #494681; padding: .21rem .43rem; font-size: .8rem; font-weight: 720; }
.draft { color: #83510e; background: #fff0d5; }
.positive { color: var(--green); }
.negative { color: var(--red); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.panel { padding: 1.2rem; margin-bottom: 1rem; }
.panel-head { margin-bottom: .9rem; }
.sum-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); gap: .75rem; margin-bottom: 1rem; }
.source-link { font-size: .84rem; font-weight: 700; text-decoration: underline; text-underline-offset: .16em; }
.panel-foot { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: .95rem; }
.bar-list { display: grid; gap: .72rem; }
.bar-row { display: grid; grid-template-columns: 5.1rem minmax(2rem, 1fr) minmax(5rem, auto); gap: .65rem; align-items: center; font-size: .86rem; }
.bar-row strong { text-align: right; font-variant-numeric: tabular-nums; }
.bar-row meter { display: block; width: 100%; height: .9rem; background: #e9edf6; border: 0; border-radius: .3rem; appearance: none; }
.bar-row meter::-webkit-meter-bar { border: 0; background: #e9edf6; }
.bar-row meter::-webkit-meter-optimum-value { background: #7668d9; border-radius: .25rem; }
.bar-row meter::-moz-meter-bar { background: #7668d9; border-radius: .25rem; }
.bar-row.negative meter::-webkit-meter-optimum-value { background: #bd6573; }
.bar-row.negative meter::-moz-meter-bar { background: #bd6573; }
.bar-row:nth-child(2n+2):not(.negative) meter::-webkit-meter-optimum-value { background: #5375b0; }
.bar-row:nth-child(2n+2):not(.negative) meter::-moz-meter-bar { background: #5375b0; }
.table-scroll { overflow: auto; }
table { border-collapse: collapse; width: 100%; font-size: .88rem; }
th, td { padding: .68rem .55rem; text-align: left; border-bottom: 1px solid #e8ecf5; vertical-align: top; }
thead { background: #f5f6fb; }
th { color: #4e5975; font-weight: 720; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.numeric { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.break { min-width: 8rem; }
.detail-label { display: block; color: var(--muted); font-size: .78rem; margin-top: .16rem; }
.note { max-width: 51rem; line-height: 1.75; overflow-wrap: anywhere; }
.note h2, .note h3, .note h4 { margin: 1.1em 0 .35em; }
.note p { margin: .45rem 0; white-space: pre-wrap; }
.note ul { padding-left: 1.4rem; margin: .45rem 0; }
.note pre { white-space: pre-wrap; background: #f4f6fb; padding: .7rem; border-radius: .5rem; }
.note blockquote { margin: .65rem 0; border-left: 3px solid #8b80da; padding-left: .7rem; color: #4e5975; }
.loading, .diagnostics { background: #fff; border: 1px solid var(--stroke); padding: 1rem; border-radius: .75rem; }
.loading p { margin-top: .5rem; line-height: 1.55; }
.diagnostics { margin-top: 1rem; color: #805719; }
.diagnostics summary { cursor: pointer; }
.diagnostics ul { margin-bottom: 0; }
.signin { min-height: 100dvh; display: grid; place-items: center; padding: 1rem; }
.signin-card { width: min(100%, 26rem); border-radius: 1rem; background: #fff; border: 1px solid var(--stroke); padding: 1.6rem; }
.signin-card img { border-radius: .9rem; margin-bottom: .75rem; }
.signin-card p { margin: .65rem 0 1rem; color: var(--muted); }
.signin-card label { display: grid; gap: .4rem; margin-bottom: .85rem; }
.signin-card input { font: inherit; width: 100%; padding: .65rem; border: 1px solid #c8d2e5; border-radius: .55rem; }
.signin-card .primary { background: var(--accent); color: #fff; width: 100%; }
.signin-card .form-error { color: var(--red); }
@media (max-width: 760px) {
  .layout, .nav, .topbar-inner { padding-inline: 1rem; }
  .topbar-inner { position: relative; padding-block: .75rem 1.85rem; }
  .grid, .hero { grid-template-columns: 1fr; gap: 0; }
  .hero-side { margin-top: .75rem; }
  .layout { padding-top: 1.3rem; }
  .sync { position: absolute; left: 1rem; bottom: .48rem; }
}
@media (max-width: 400px) {
  .nav { gap: 1.05rem; }
  .header-actions { gap: .3rem; }
  .button { padding-inline: .48rem; }
  .panel { padding: .85rem; }
  .bar-row { gap: .35rem; }
}
