/* 실수령액노트 — mint score */
:root {
  --bg: #e7f7ee;
  --paper: #f7fff9;
  --ink: #06281c;
  --muted: #3a5c4e;
  --accent: #007a50;
  --accent-ink: #ffffff;
  --accent-glow: rgba(0,122,80,.28);
  --chip: #d9f5e6;
  --line: #c6e6d4;
  --warn: #8a2f15;
  --ok: #0b6a40;
  --ring: #7cffb2;
  --sticker: #e8ff00;
  --sticker-ink: #06281c;
  --blob-a: rgba(124,255,178,.55);
  --blob-b: rgba(232,255,0,.28);
  --shadow: 0 10px 32px rgba(6,40,28,.08);
  --score-bg: #06281c;
  --score-ink: #e9f8ef;
  --score-muted: #9ec9b5;
  --score-num: #7cffb2;
  --score-num-glow: rgba(124,255,178,.35);
  --score-glow: rgba(232,255,0,.16);
  --score-shadow: 0 18px 40px rgba(6,40,28,.28);
  --fun-bg: #e8ffd4;
}

* { box-sizing: border-box; }
html { font-size: 17px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; word-break: keep-all; overflow-wrap: break-word; line-break: strict; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-rounded, "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Nunito", "Malgun Gothic", sans-serif;
  line-height: 1.65;
  min-height: 100dvh;
}
body::before, body::after {
  content: "";
  position: fixed; z-index: -1; pointer-events: none;
  width: min(70vw, 520px); height: min(70vw, 520px);
  border-radius: 50%; filter: blur(10px);
}
body::before {
  top: -12vw; left: -10vw;
  background: var(--blob-a);
}
body::after {
  right: -12vw; bottom: 10vh;
  background: var(--blob-b);
}
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; }
.wrap { width: min(1120px, calc(100% - 28px)); margin: 0 auto; }
header.site {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 0;
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 0;
}
.logo {
  font-weight: 900; letter-spacing: -0.05em; text-decoration: none;
  color: var(--ink); font-size: 1.08rem;
  display: inline-flex; align-items: baseline; gap: 2px;
}
.logo span {
  background: var(--sticker); color: var(--sticker-ink);
  border-radius: 999px; padding: 1px 8px 2px; font-size: .72rem;
  letter-spacing: 0.04em; margin-left: 4px; font-weight: 800;
}
nav { display: flex; flex-wrap: wrap; gap: 6px 4px; }
nav a {
  color: var(--muted); text-decoration: none; margin: 0; font-size: .86rem;
  font-weight: 650; padding: 6px 10px; border-radius: 999px;
}
nav a:hover, nav a:focus-visible { color: var(--ink); background: var(--chip); }
.hero { padding: 28px 0 8px; }
.hero p.kicker {
  margin: 0 0 10px; color: var(--accent); font-weight: 800; font-size: .78rem;
  letter-spacing: .12em; text-transform: uppercase;
}
h1 {
  font-size: clamp(1.85rem, 7.2vw, 2.7rem);
  letter-spacing: -0.06em; line-height: 1.12; margin: 0 0 12px; font-weight: 900;
}
.lead { font-size: 1.02rem; color: var(--muted); margin: 0 0 8px; max-width: 38em; }
.note { font-size: .9rem; color: var(--muted); margin: 8px 0 0; }
.grid {
  display: grid; grid-template-columns: 1fr; gap: 16px; padding-bottom: 28px;
}
@media (min-width: 880px) {
  .grid { grid-template-columns: 1.02fr .98fr; align-items: start; gap: 22px; }
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.card h2 { margin: 0 0 14px; font-size: 1.12rem; letter-spacing: -0.04em; }
label { display: block; font-weight: 700; margin: 14px 0 6px; font-size: .92rem; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: .82rem; margin-top: 2px; }
input, select {
  width: 100%; padding: 13px 14px; border: 1.5px solid var(--line);
  border-radius: 14px; font: inherit; background: var(--input-bg, #fff); color: var(--ink);
}
input:focus, select:focus { outline: 3px solid var(--ring); outline-offset: 1px; border-color: var(--accent); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
button, .btn {
  appearance: none; border: 0; border-radius: 999px; padding: 12px 18px;
  font: inherit; font-weight: 800; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
button.primary, .btn.primary {
  background: var(--accent); color: var(--accent-ink, #fff);
  box-shadow: 0 8px 20px var(--accent-glow);
}
button.primary:hover { filter: brightness(1.05); }
button.ghost, .btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
button:focus-visible, .btn:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }

/* Game-style result scoreboard */
.score {
  background: var(--score-bg);
  color: var(--score-ink);
  border: 0;
  border-radius: 28px;
  padding: 22px 20px 20px;
  box-shadow: var(--score-shadow);
  position: relative;
  overflow: hidden;
}
.score::before {
  content: "";
  position: absolute; inset: auto auto -40px -40px;
  width: 180px; height: 180px; border-radius: 50%;
  background: var(--score-glow); pointer-events: none;
}
.score h2 { color: var(--score-ink); position: relative; }
.score .result-main {
  background: transparent; border-radius: 0; padding: 4px 0 12px; margin: 0 0 8px;
  position: relative;
}
.score .result-main .label { margin: 0; color: var(--score-muted); font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.score .result-main .value {
  margin: 4px 0 0; font-size: clamp(2.15rem, 10vw, 3.1rem);
  font-weight: 900; letter-spacing: -0.06em; font-variant-numeric: tabular-nums;
  color: var(--score-num); line-height: 1.05;
  text-shadow: 0 0 28px var(--score-num-glow);
}
.score .result-main .sub { margin: 8px 0 0; color: var(--score-muted); }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; position: relative; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: 999px; padding: 6px 12px;
  font-size: .82rem; font-weight: 800; letter-spacing: -0.02em;
  background: var(--sticker); color: var(--sticker-ink);
}
.badge.ghost { background: color-mix(in srgb, var(--score-ink) 12%, transparent); color: var(--score-ink); }
.score .rows { position: relative; }
.score .rows th, .score .rows td { border-bottom-color: color-mix(in srgb, var(--score-ink) 14%, transparent); }
.score .rows th { color: var(--score-muted); font-weight: 600; }
.score .rows td { color: var(--score-ink); }
.score .rows tr.total th, .score .rows tr.total td { color: var(--score-num); }
.score .note { color: var(--score-muted); }
.score #elig-msg { color: var(--score-ink); }

.rows { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.rows th, .rows td { text-align: left; padding: 8px 0; border-bottom: 1px solid var(--line); }
.rows th { font-weight: 500; color: var(--muted); }
.rows td { text-align: right; font-weight: 650; }
.rows tr.total th, .rows tr.total td { border-bottom: 0; font-weight: 800; color: var(--ink); padding-top: 12px; }
.warn {
  margin: 12px 0 0; padding: 12px 14px; border-radius: 12px;
  background: #f8ebe6; color: var(--warn); font-size: .92rem;
}
.ok {
  margin: 12px 0 0; padding: 12px 14px; border-radius: 12px;
  background: #e7f3ec; color: var(--ok); font-size: .92rem;
}
.ad-slot {
  border: 1px dashed var(--line); border-radius: 16px;
  padding: 22px 16px; text-align: center; color: var(--muted);
  background: color-mix(in srgb, var(--paper) 70%, transparent); margin: 8px 0 22px; font-size: .85rem;
}
article.prose { padding: 10px 0 60px; }
article.prose h2 { margin: 36px 0 10px; letter-spacing: -0.04em; font-size: 1.4rem; }
article.prose h3 { margin: 22px 0 8px; font-size: 1.05rem; }
article.prose p, article.prose li { max-width: 42em; }
article.prose table {
  width: 100%; border-collapse: collapse; font-size: .92rem;
  font-variant-numeric: tabular-nums; margin: 12px 0 18px;
}
article.prose th, article.prose td {
  border-bottom: 1px solid var(--line); text-align: left; padding: 8px 6px;
}
.sources { font-size: .88rem; color: var(--muted); }
.sources li { margin: 6px 0; }
footer.site {
  border-top: 1px solid var(--line); padding: 28px 0 40px;
  color: var(--muted); font-size: .88rem; background: color-mix(in srgb, var(--paper) 80%, transparent);
}
footer.site nav { margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
footer.site nav a { margin: 0; }
.skip {
  position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px;
}
.skip:focus { left: 8px; z-index: 40; }
.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;
}

.compare {
  margin: 4px 0 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 22px 20px;
  box-shadow: var(--shadow);
}
.compare h2, .compare h3 { margin: 0 0 8px; letter-spacing: -0.04em; }
.compare h3 { font-size: 1rem; margin-top: 16px; }
.compare .headline {
  font-size: clamp(1.3rem, 4.4vw, 1.85rem);
  font-weight: 900; letter-spacing: -0.04em; margin: 8px 0 6px;
  line-height: 1.3;
}
.compare .est { display: inline-block; background: var(--sticker); color: var(--sticker-ink);
  font-size: .76rem; font-weight: 800; border-radius: 999px; padding: 2px 8px; margin-left: 4px; vertical-align: middle; }
.bar-track { height: 16px; background: var(--chip); border-radius: 999px; overflow: hidden; margin: 12px 0 6px; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 999px; width: 0; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.bar-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: .8rem; }
.proj-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .9rem; margin: 10px 0 8px; }
.proj-table th, .proj-table td { text-align: right; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.proj-table th:first-child, .proj-table td:first-child { text-align: left; }
.proj-table .up { color: var(--ok); font-weight: 800; }
.chart { color: var(--accent); margin: 4px 0 10px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--muted); font-size: 9px; font-weight: 700; }
.chart .end { fill: var(--accent); }
.chart circle { fill: var(--accent); }
.chart .end-lab { fill: var(--ink); font-size: 10px; font-weight: 800; }
.fun {
  background: var(--fun-bg, var(--chip));
  border-radius: 20px; padding: 16px 16px 14px; margin: 14px 0;
}
.fun p { margin: 0 0 4px; }
.fun strong { font-size: clamp(1.3rem, 5vw, 1.7rem); letter-spacing: -0.04em; font-weight: 900; }
.assump { font-size: .86rem; color: var(--muted); margin: 8px 0; }
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
canvas#share-canvas { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bar-fill { transition: none; }
  .score .result-main .value { text-shadow: none; }
}

.logo.brand { margin-right: 4px; }
.logo.brand span { background: var(--sticker); }
a[aria-current="page"] { color: var(--ink); background: var(--chip); }

.score .share-actions { margin-top: 16px; }
.score .share-actions .primary { background: var(--score-num); color: var(--score-bg); }
