:root {
  --bg: #f4efe4;
  --surface: rgba(255, 252, 246, 0.88);
  --surface-strong: #fffaf1;
  --ink: #162019;
  --muted: #5c675e;
  --accent: #b55433;
  --line: rgba(22, 32, 25, 0.12);
  --shadow: 0 16px 48px rgba(27, 27, 27, 0.08);
  --green: #1f5d42;
  --orange: #a56422;
  --red: #a34a35;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin:0; min-height:100vh; font-family:"IBM Plex Sans KR",sans-serif; color:var(--ink); background:linear-gradient(180deg,#f8f2e8 0%,var(--bg) 100%); }
body.modal-open { overflow:hidden; }
.page-shell { width:min(1120px,calc(100vw - 32px)); margin:0 auto; padding:24px 0 56px; }

.hero-slim { display:flex; justify-content:space-between; align-items:end; gap:24px; flex-wrap:wrap; padding:18px 0 28px; border-bottom:1px solid var(--line); margin-bottom:24px; }
.hero-slim h1 { font-family:"Space Grotesk",sans-serif; font-size:clamp(2rem,5vw,3.6rem); line-height:.96; letter-spacing:-.04em; margin:0; }
.hero-nums { display:flex; gap:20px; }
.hero-nums div { text-align:center; }
.hero-nums strong { display:block; font-family:"Space Grotesk",sans-serif; font-size:2.4rem; line-height:1; }
.hero-nums span { font-size:.88rem; color:var(--muted); }
.eyebrow { margin:0 0 10px; font-family:"Space Grotesk",sans-serif; font-size:.82rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--accent); }

.panel-section { margin-bottom:28px; }
.section-head { display:flex; justify-content:space-between; align-items:center; gap:16px; flex-wrap:wrap; margin-bottom:14px; }
.section-head h2 { font-family:"Space Grotesk",sans-serif; font-size:clamp(1.5rem,3vw,2.2rem); line-height:1.05; letter-spacing:-.03em; margin:0; }
.filter-row { display:flex; gap:8px; flex-wrap:wrap; }
select { appearance:none; border:1px solid var(--line); background:var(--surface-strong); color:var(--ink); border-radius:14px; padding:10px 12px; min-width:160px; font-size:13px; }
.focus-hint { display:inline-flex; align-items:center; padding:6px 10px; border-radius:999px; background:rgba(31,93,66,.1); color:var(--green); font-size:.8rem; font-weight:700; }

.insight-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-bottom:12px; }
.insight-card { appearance:none; font:inherit; color:inherit; border:1px solid var(--line); border-radius:16px; padding:12px; background:var(--surface); box-shadow:var(--shadow); text-align:left; cursor:pointer; transition:transform 160ms ease,border-color 160ms ease; }
.insight-card:hover { transform:translateY(-2px); border-color:rgba(181,84,51,.35); }
.insight-card.is-active { border-color:rgba(31,93,66,.5); box-shadow:0 10px 32px rgba(31,93,66,.18); }
.insight-card span { display:block; font-size:.78rem; color:var(--accent); font-weight:700; margin-bottom:6px; }
.insight-card strong { display:block; font-family:"Space Grotesk",sans-serif; font-size:1.7rem; line-height:1; margin-bottom:6px; }
.insight-card p { margin:0; color:var(--muted); font-size:.82rem; line-height:1.45; }
.spotlight-card { border:1px solid var(--line); border-radius:20px; background:var(--surface); box-shadow:var(--shadow); padding:12px; }
.spotlight-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.spotlight-head strong { font-size:.96rem; }
.spotlight-head span { color:var(--muted); font-size:.8rem; }
.spotlight-list { display:grid; gap:8px; }
.spotlight-item { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; padding:12px; }
.spotlight-item p { margin:0; color:var(--muted); font-size:.84rem; }
.dday-pill { display:inline-flex; align-items:center; padding:4px 8px; border-radius:999px; font-size:.78rem; font-weight:700; white-space:nowrap; background:rgba(31,93,66,.1); color:var(--green); }
.dday-pill.is-warning { background:rgba(163,74,53,.14); color:var(--red); }

.compare-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.compare-card { background:var(--surface); border:1px solid var(--line); border-radius:22px; box-shadow:var(--shadow); padding:16px; }
.compare-title { margin:0 0 10px; font-size:.9rem; font-weight:700; color:var(--ink); }
.compare-chart { display:grid; gap:8px; }
.compare-row { display:grid; grid-template-columns:130px 1fr 36px; gap:8px; align-items:center; }
.compare-label { font-size:.84rem; color:var(--ink); line-height:1.3; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.compare-bar-wrap { position:relative; height:18px; background:rgba(22,32,25,.06); border-radius:999px; overflow:hidden; }
.compare-bar-wrap-stack { display:flex; }
.compare-bar { height:100%; }
.compare-bar-active { background:linear-gradient(90deg,#1f5d42,#2c7c58); border-radius:999px; }
.compare-bar-period { background:linear-gradient(90deg,#b55433,#d4764f); border-radius:999px; }
.compare-bar-promo { background:rgba(165,100,34,.7); }
.compare-bar-news { background:rgba(72,98,164,.7); }
.compare-value { font-size:.82rem; color:var(--muted); text-align:right; }

.active-board { display:grid; grid-template-columns:repeat(3,minmax(260px,1fr)); gap:14px; }
.group-board { border:1px solid var(--line); border-radius:22px; background:var(--surface); box-shadow:var(--shadow); padding:14px; }
.group-board-head { display:flex; justify-content:space-between; gap:10px; align-items:center; margin-bottom:10px; }
.group-board-head strong { font-size:1rem; }
.group-board-head span { color:var(--muted); font-size:.84rem; }
.group-board-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.active-card { text-align:left; border:1px solid var(--line); background:var(--surface); border-radius:18px; padding:14px; cursor:pointer; transition:transform 160ms ease,border-color 160ms ease; }
.active-card:hover { transform:translateY(-2px); border-color:rgba(181,84,51,.3); }
.active-card strong { display:block; font-size:1.02rem; line-height:1.25; margin-bottom:4px; }
.active-card.is-new { border-color:rgba(31,93,66,.4); }
.active-card.has-news { box-shadow:0 8px 28px rgba(27,27,27,.12); }
.new-badge { display:inline-flex; padding:2px 8px; border-radius:999px; font-size:.72rem; font-weight:800; background:var(--green); color:#fff; vertical-align:middle; margin-left:6px; letter-spacing:.04em; }
.active-card-date { font-size:.88rem; font-weight:700; color:var(--ink); margin-top:4px; }
.active-card-meta { margin-top:4px; color:var(--muted); font-size:.86rem; }
.active-card-meta .meta-ministry { color:var(--accent); font-weight:600; }
.active-card-stats { display:flex; gap:10px; flex-wrap:wrap; margin-top:8px; padding-top:8px; border-top:1px solid var(--line); color:var(--muted); font-size:.82rem; }

.table-wrap { background:var(--surface); border:1px solid var(--line); border-radius:22px; box-shadow:var(--shadow); padding:16px; overflow:auto; max-height:520px; }
table { width:100%; border-collapse:collapse; font-size:.92rem; }
th,td { padding:12px 10px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
th { font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); }
.inline-link { background:none; border:0; padding:0; color:var(--ink); font:inherit; cursor:pointer; text-align:left; }
.inline-link:hover { color:var(--accent); }
.status-pill { display:inline-flex; align-items:center; padding:4px 9px; border-radius:999px; font-size:11px; font-weight:700; }
.badge-active { background:rgba(31,93,66,.15); color:var(--green); }
.badge-ended { background:rgba(163,74,53,.14); color:var(--red); }
.badge-pending { background:rgba(165,100,34,.14); color:var(--orange); }

.modal-shell { position:fixed; inset:0; display:none; z-index:50; }
.modal-shell.is-open { display:block; }
.modal-backdrop { position:absolute; inset:0; background:rgba(10,14,11,.5); backdrop-filter:blur(3px); }
.modal-dialog { position:relative; width:min(860px,calc(100vw - 24px)); max-height:calc(100vh - 36px); margin:18px auto; overflow:auto; background:rgba(255,252,246,.97); border:1px solid var(--line); border-radius:24px; box-shadow:var(--shadow); }
.modal-close { position:sticky; top:12px; float:right; margin:12px 12px 0 0; width:38px; height:38px; border:0; border-radius:999px; background:rgba(22,32,25,.07); color:var(--ink); font-size:24px; cursor:pointer; z-index:3; }
.modal-detail-panel { background:transparent; border:0; box-shadow:none; backdrop-filter:none; border-radius:0; padding:8px 24px 28px; }
.detail-card h3 { font-size:1.5rem; line-height:1.1; font-family:"Space Grotesk",sans-serif; }
.detail-sub { margin-top:8px; font-size:.92rem; color:var(--muted); line-height:1.6; }
.detail-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin-top:16px; }
.detail-grid > div { border:1px solid var(--line); border-radius:16px; padding:12px; background:var(--surface-strong); }
.detail-grid span { display:block; margin-bottom:6px; font-size:.8rem; color:var(--accent); font-weight:600; }
.detail-grid strong { font-size:.95rem; line-height:1.4; }
.detail-fold { margin-top:14px; border:1px solid var(--line); border-radius:16px; background:var(--surface-strong); }
.detail-fold summary { padding:12px 14px; font-size:.92rem; font-weight:700; cursor:pointer; }
.detail-fold > div, .detail-fold > p { padding:0 14px 14px; font-size:.9rem; color:var(--muted); line-height:1.6; }
.detail-link { display:inline-flex; align-items:center; justify-content:center; min-height:42px; padding:0 16px; border-radius:999px; font-weight:600; text-decoration:none; border:0; color:#fff8ef; background:linear-gradient(135deg,#1f4030 0%,#0f2218 100%); margin-top:16px; width:100%; transition:transform 160ms ease; }
.detail-link:hover { transform:translateY(-2px); }
.button { display:inline-flex; align-items:center; justify-content:center; min-height:42px; padding:0 16px; border-radius:999px; font-weight:600; text-decoration:none; border:0; transition:transform 160ms ease; }
.button:hover { transform:translateY(-2px); }
.button-primary { color:#fff8ef; background:linear-gradient(135deg,#1f4030 0%,#0f2218 100%); }

.chain-section { margin-top:18px; }
.chain-title { margin:0 0 10px; font-size:.94rem; font-weight:700; color:var(--ink); }
.history-chain { display:grid; gap:0; }
.history-step { position:relative; display:grid; grid-template-columns:16px 1fr; gap:10px; padding:0 0 10px; }
.history-step:last-child { padding-bottom:0; }
.history-step:not(:last-child)::after { content:''; position:absolute; left:7px; top:16px; bottom:-2px; width:2px; background:rgba(22,32,25,.1); }
.history-dot { width:16px; height:16px; border-radius:999px; background:rgba(181,84,51,.16); border:2px solid rgba(181,84,51,.45); margin-top:2px; }
.history-dot.is-latest { background:rgba(31,93,66,.16); border-color:rgba(31,93,66,.55); }
.history-dot.is-promo { background:rgba(165,100,34,.14); border-color:rgba(165,100,34,.5); }
.history-dot.is-news { background:rgba(72,98,164,.14); border-color:rgba(72,98,164,.5); }
.history-card { display:grid; gap:3px; padding:8px 10px; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.5); }
.history-card.is-current-card { background:rgba(31,93,66,.07); border-color:rgba(31,93,66,.24); }
.history-card.is-promo-card { background:rgba(165,100,34,.06); border-color:rgba(165,100,34,.2); }
.history-card.is-news-card { background:rgba(72,98,164,.06); border-color:rgba(72,98,164,.2); }
.history-card strong { font-size:.88rem; }
.history-card span,.history-card a { color:var(--muted); font-size:.84rem; text-decoration:none; }
.history-card a:hover { color:var(--accent); }
.history-card .history-type { color:var(--accent); font-weight:700; }
.history-card.is-current-card .history-type { color:var(--green); }
.history-card.is-promo-card .history-type { color:var(--orange); }
.history-card.is-news-card .history-type { color:#4862a4; }

.page-footer { margin-top:36px; padding:18px 0; border-top:1px solid var(--line); color:var(--muted); font-size:.84rem; line-height:1.6; }
.empty-box { color:var(--muted); line-height:1.7; padding:24px; }
.detail-empty { color:var(--muted); }

@media (max-width:680px) {
  .compare-grid { grid-template-columns:1fr; }
  .insight-grid { grid-template-columns:1fr; }
  .active-board { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .group-board-grid { grid-template-columns:1fr; }
  .page-shell { width:min(100vw - 20px,760px); }
  .hero-slim { flex-direction:column; align-items:flex-start; }
  .hero-nums { gap:14px; }
  .hero-nums strong { font-size:1.8rem; }
  .spotlight-item { flex-direction:column; align-items:flex-start; }
  .compare-row { grid-template-columns:100px 1fr 32px; gap:6px; }
  .compare-label { font-size:.78rem; }
  .detail-grid { grid-template-columns:1fr; }
  .modal-detail-panel { padding:8px 16px 24px; }
}
@media (max-width:480px) {
  .active-board { grid-template-columns:1fr; }
}
