/* 혜택마당 — 카드 피드형. 모바일 2열 → 태블릿 3열 → PC 4~5열 */
:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --surface-2: #f0eee9;
  --ink: #1b1d21;
  --ink-2: #474c54;
  --ink-3: #767c86;
  --line: #e5e1d9;
  --brand: #1f7a5c;
  --brand-ink: #ffffff;
  --brand-soft: #e2f1eb;
  --accent: #e8590c;
  --accent-soft: #fdece2;
  --warn: #9a5b00;
  --warn-soft: #fff3d6;
  --bad: #a33a3a;
  --bad-soft: #fbe8e8;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 24, 30, .05), 0 3px 10px rgba(20, 24, 30, .04);
  --max: 1280px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131519; --surface: #1c1f24; --surface-2: #252930; --ink: #eceef1; --ink-2: #c3c8cf;
    --ink-3: #8e949d; --line: #30353c; --brand: #4cc497; --brand-ink: #0c1f18; --brand-soft: #173a2e;
    --accent: #f59a5c; --accent-soft: #3a2518; --warn: #f0c062; --warn-soft: #3a2f14;
    --bad: #f08a8a; --bad-soft: #3b1e1e; --shadow: 0 1px 2px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  word-break: keep-all; overflow-wrap: anywhere;
}
a { color: var(--brand); }
button, input, select { font: inherit; color: inherit; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* ── 머리: 로고·검색 + 섹션 탭 ── */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 12px; height: 56px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; color: var(--ink); text-decoration: none; letter-spacing: -.02em; flex: none; }
.logo-mark { width: 30px; height: 30px; flex: none; display: block; }
.topsearch { flex: 1; max-width: 460px; margin-left: auto; }
.topsearch input { width: 100%; height: 38px; padding: 0 14px 0 36px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23767c86' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") 12px 50% / 16px no-repeat; font-size: 15px; }
.toplinks { display: none; gap: 2px; }
.toplinks a, .sectabs a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap; }
.toplinks a { padding: 8px 10px; border-radius: 10px; }
.toplinks a:hover { background: var(--surface-2); }
.sectabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.sectabs::-webkit-scrollbar { display: none; }
.sectabs a { padding: 10px 12px; border-bottom: 3px solid transparent; }
.sectabs a:hover { color: var(--ink); }
.sectabs a[aria-current] { color: var(--ink); border-bottom-color: var(--brand); font-weight: 800; }
.saved-count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; text-align: center; line-height: 18px; font-weight: 700; }
.saved-count:empty { display: none; }

/* ── 홈 첫 화면 ── */
.hero { padding: 18px 0 4px; }
.hero h1 { font-size: clamp(22px, 5.4vw, 32px); margin: 0 0 4px; letter-spacing: -.03em; line-height: 1.3; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero > p { margin: 0 0 14px; color: var(--ink-2); font-size: 15px; }
.secbtns { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.secbtn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 4px; border-radius: 14px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); transition: transform .1s, box-shadow .1s; }
.secbtn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.secbtn span { font-size: 22px; line-height: 1; }
.secbtn b { font-size: 13px; letter-spacing: -.02em; text-align: center; }
.secbtn small { font-size: 11px; color: var(--ink-3); }
.fitcta { display: flex; align-items: center; gap: 12px; margin: 12px 0 0; padding: 14px 16px; border-radius: 14px; background: var(--brand-soft); color: var(--ink); text-decoration: none; border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); }
.fitcta .ico { font-size: 26px; }
.fitcta b { display: block; font-size: 16px; }
.fitcta small { display: block; font-size: 13px; color: var(--ink-2); }
.fitcta > span:last-child { margin-left: auto; font-size: 20px; }

/* ── 레일(섹션 묶음) ── */
.rail { margin: 36px 0 6px; }
.rail-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.rail-h h2 { font-size: 20px; margin: 0; letter-spacing: -.03em; }
.rail-h h2 small { font-size: 14px; color: var(--ink-3); font-weight: 600; margin-left: 2px; }
.rail-h a { font-size: 14px; font-weight: 700; text-decoration: none; color: var(--ink-2); white-space: nowrap; }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 46%; gap: 10px; overflow-x: auto; list-style: none; padding: 2px 2px 8px; margin: 0 -2px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.strip > li { scroll-snap-align: start; }

/* ── 카드 ── */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; list-style: none; padding: 0; margin: 0; }
.card { position: relative; min-width: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .12s, box-shadow .12s; }
.card:hover { border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); box-shadow: 0 6px 18px rgba(20,24,30,.07); }
.thumb { position: relative; display: flex; flex-direction: column; justify-content: flex-end; aspect-ratio: 16 / 9; padding: 12px 14px; margin: 6px 6px 0; border-radius: 10px; color: #fff; text-decoration: none; overflow: hidden; }
.thumb .ico { position: absolute; right: 12px; top: 12px; font-size: 30px; line-height: 1; opacity: .9; }
.thumb b { position: relative; font-size: 18px; line-height: 1.25; letter-spacing: -.03em; font-weight: 800; max-width: 78%; }
.thumb small { position: relative; font-size: 12px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.flags { position: absolute; left: 8px; top: 8px; display: flex; gap: 4px; }
.flag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: rgba(255,255,255,.85); color: #333; }
.flag.hot { background: #ff3b30; color: #fff; }
.flag.new { background: #ffd43b; color: #3b2f00; }
.flag.soon { background: #1b1d21; color: #fff; }
.flag.off { background: rgba(0,0,0,.55); color: #fff; }
/* 섹션별 색: 차분한 파스텔 3단계 (id로 골고루), 글씨는 진하게 */
.t-gov { --tb: #e6f2ec; --tb2: #d7ebe1; --tx: #0f4d38; }
.t-event { --tb: #fdefe4; --tb2: #fbe3d1; --tx: #8a3306; }
.t-deal { --tb: #fbe9ef; --tb2: #f6d9e3; --tx: #861c42; }
.t-finance { --tb: #e7effa; --tb2: #d6e4f6; --tx: #133f78; }
.t-free { --tb: #efeafb; --tb2: #e2d9f7; --tx: #43298f; }
.thumb.v0 { background: var(--tb); }
.thumb.v1 { background: linear-gradient(160deg, var(--tb), var(--tb2)); }
.thumb.v2 { background: var(--tb2); }
.thumb { color: var(--tx); }
@media (prefers-color-scheme: dark) {
  .t-gov { --tb: #183a2e; --tb2: #1d4537; --tx: #bfe8d6; }
  .t-event { --tb: #3a2416; --tb2: #45291a; --tx: #f8d2b6; }
  .t-deal { --tb: #3a1b27; --tb2: #45202f; --tx: #f5c6d6; }
  .t-finance { --tb: #172a44; --tb2: #1b3150; --tx: #c3d8f5; }
  .t-free { --tb: #261d44; --tb2: #2d2350; --tx: #d6cbf6; }
}
.cbody { padding: 10px 12px 4px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); font-weight: 600; }
.card h3 { margin: 0; font-size: 15px; line-height: 1.35; letter-spacing: -.02em; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.sum { margin: 0; font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.why { font-size: 12px; color: var(--ink-3); margin: 2px 0 0; padding: 0; list-style: none; }
.why li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.why li::before { content: "· "; }
.cfoot { display: flex; align-items: center; gap: 6px; padding: 6px 8px 8px 12px; font-size: 12px; color: var(--ink-3); }
.cfoot span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.save { position: relative; z-index: 2; flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; font-size: 18px; cursor: pointer; color: var(--ink-3); transition: transform .1s, background .1s; }
.save:hover { background: var(--surface-2); }
.save:active { transform: scale(.88); }
.save[aria-pressed="true"] { color: #e03131; }
.badge { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.badge.ok { background: var(--brand-soft); color: var(--brand); }
.badge.maybe { background: var(--warn-soft); color: var(--warn); }
.badge.no { background: var(--bad-soft); color: var(--bad); }
.badge.dday { background: var(--accent-soft); color: var(--accent); }
.badge.always { background: var(--surface-2); color: var(--ink-2); }
.empty { padding: 36px 16px; text-align: center; color: var(--ink-3); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ── 섹션 페이지 ── */
.sechead { margin: 20px 0 4px; padding: 0; background: none !important; color: var(--ink); }
.sechead h1 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.sechead p { margin: 4px 0 0; color: var(--ink-3); font-size: 15px; }
.layout, .plain { display: block; padding-bottom: 90px; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 14px 0 8px; }
.toolbar h2 { font-size: 18px; margin: 0 auto 0 0; }
.toolbar h2 span { color: var(--ink-3); font-size: 15px; }
.search { flex: 1 1 220px; display: flex; }
.search input { width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); min-height: 44px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: none; padding: 7px 12px; cursor: pointer; font-size: 14px; min-height: 38px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); font-weight: 700; }
.cats { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.chip { position: relative; display: inline-flex; flex: none; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 14px; cursor: pointer; transition: background .12s, border-color .12s, transform .08s; user-select: none; white-space: nowrap; }
.chip span:hover { background: var(--surface-2); }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 700; }
.chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.chip span:active { transform: scale(.96); }

/* 정부지원금 진단 */
.quiz { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin: 14px 0; scroll-margin-top: 120px; }
.quiz h2 { margin: 0 0 4px; font-size: 17px; }
.quiz .sub { margin: 0 0 12px; color: var(--ink-3); font-size: 13px; }
.quiz .chip input:checked + span { background: var(--brand-soft); border-color: var(--brand); color: var(--ink); }
.quiz .chip input:checked + span::before { content: "✓ "; color: var(--brand); }
.q { border: 0; margin: 0 0 12px; padding: 0; }
.q legend { font-weight: 700; font-size: 14px; margin-bottom: 8px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 130px; flex: 1; }
.field label { font-size: 13px; font-weight: 700; }
.field input, .field select { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); min-height: 44px; }
.hint { font-size: 13px; color: var(--ink-3); margin: 4px 0 8px; }
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 0; }
.stat { background: var(--surface-2); border-radius: 12px; padding: 10px; }
.stat b { display: block; font-size: 19px; letter-spacing: -.02em; }
.stat small { color: var(--ink-3); font-size: 12px; }
.stat.money b { color: var(--brand); }
.est { font-size: 12px; color: var(--ink-3); margin: 6px 0 0; }

.ad { margin: 14px 0; min-height: 100px; text-align: center; }
.ad::before { content: "광고"; display: block; font-size: 11px; color: var(--ink-3); margin-bottom: 4px; }

/* ── 상세 ── */
.crumbs { font-size: 13px; color: var(--ink-3); padding: 12px 0 0; }
.crumbs a { color: var(--ink-3); }
.detail { display: block; padding-bottom: 100px; }
.detail article { min-width: 0; }
.thumb.big { aspect-ratio: auto; min-height: 150px; margin-top: 10px; border-radius: var(--radius); padding: 18px; }
.thumb.big b { font-size: 28px; }
.thumb.big small { font-size: 13px; }
.thumb.big .ico { font-size: 72px; right: 18px; top: 22%; }
.detail h1 { font-size: clamp(22px, 5vw, 32px); line-height: 1.3; margin: 6px 0; letter-spacing: -.03em; }
.lede { font-size: 16px; color: var(--ink-2); margin: 0 0 14px; }
.facts { display: grid; grid-template-columns: 1fr; margin: 0 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts div { display: grid; grid-template-columns: 84px 1fr; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--ink-3); font-size: 14px; font-weight: 700; }
.facts dd { margin: 0; font-weight: 600; }
.notice { background: var(--warn-soft); color: var(--ink); border-radius: 12px; padding: 12px 14px; font-size: 14px; margin: 0 0 14px; }
.notice b { color: var(--warn); }
.detail section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 12px; }
.detail section.plainsec { background: none; border: 0; padding: 8px 0; }
.detail section h2 { font-size: 18px; margin: 0 0 8px; }
.detail section ul:not(.grid), .detail section ol { margin: 0; padding-left: 20px; }
.detail section li { margin: 4px 0; }
.detail .grid li { margin: 0; }
.docs { list-style: none; padding: 0 !important; }
.docs label { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; cursor: pointer; }
.docs input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--brand); flex: none; }
.docs input:checked + span { text-decoration: line-through; color: var(--ink-3); }
.progress { font-size: 13px; color: var(--ink-3); margin: 8px 0 0; }
.excl { background: var(--bad-soft) !important; border-color: transparent !important; }
.source { font-size: 14px; color: var(--ink-2); }
.source p { margin: 4px 0; }
.side { display: none; }
.actions { display: flex; flex-direction: column; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px; cursor: pointer; transition: transform .08s, background .12s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.kakao { background: #fee500; border-color: #fee500; color: #191919; }
.btn.save { width: auto; height: auto; border-radius: 12px; border: 1px solid var(--line); font-size: 15px; }
.btn.save[aria-pressed="true"] { background: #fff0f0; border-color: #ffc9c9; color: #e03131; }

.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; background: var(--surface); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 8px; }
.dock .btn { flex: 1; }
.dock .btn.icon { flex: 0 0 52px; padding: 0; font-size: 20px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0; font-size: 11px; color: var(--ink-3); text-decoration: none; font-weight: 600; }
.tabbar a[aria-current] { color: var(--brand); }
.tabbar svg { width: 22px; height: 22px; }
body:has(.dock) .tabbar { display: none; }

/* 달력 */
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.timeline li { display: grid; grid-template-columns: 60px 1fr auto; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.timeline .date { font-weight: 800; color: var(--accent); }
.timeline a { color: var(--ink); font-weight: 700; text-decoration: none; }
.timeline small { display: block; color: var(--ink-3); font-weight: 400; font-size: 12px; }

.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; z-index: 50; white-space: nowrap; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

footer.site { border-top: 1px solid var(--line); padding: 24px 0 96px; color: var(--ink-3); font-size: 13px; margin-top: 24px; }
footer.site a { color: var(--ink-3); }
footer.site p { margin: 4px 0; }
.page { padding-top: 10px; padding-bottom: 40px; max-width: 760px; }
.page.wide { max-width: var(--max); }
.page h1 { font-size: 26px; letter-spacing: -.02em; }
.amount { font-weight: 800; }

/* 작은 폰 */
@media (max-width: 380px) { .secbtn b { font-size: 12px; } .thumb b { font-size: 15px; } }
/* 태블릿 */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .strip { grid-auto-columns: 30%; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts div:nth-child(odd) { border-right: 1px solid var(--line); }
  .facts div:nth-child(3) { border-bottom: 0; }
  .card h3 { font-size: 16px; }
}
/* PC */
@media (min-width: 1024px) {
  .toplinks { display: flex; }
  .tabbar, .dock { display: none !important; }
  .hero { padding: 26px 0 4px; }
  .secbtn { flex-direction: row; justify-content: center; gap: 8px; padding: 14px 8px; }
  .secbtn b { font-size: 15px; }
  .secbtn small { font-size: 13px; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .strip { grid-auto-columns: calc(20% - 8px); }
  .layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 24px; align-items: start; padding-bottom: 40px; }
  .layout .quiz { position: sticky; top: 118px; max-height: calc(100vh - 130px); overflow: auto; }
  .layout .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .plain { padding-bottom: 40px; }
  .detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; padding-bottom: 40px; }
  .side { display: block; position: sticky; top: 118px; margin-top: 10px; }
  .side .box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
  .side .amount-big { font-size: 24px; font-weight: 800; color: var(--accent); margin: 2px 0 4px; letter-spacing: -.02em; }
  .detail .grid.mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  footer.site { padding-bottom: 32px; }
  .toast { bottom: 30px; }
}
@media (min-width: 1240px) {
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .layout .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .top, .tabbar, .dock, .side, .ad, footer.site { display: none !important; } }
.secbtn i { font-style: normal; }
.secbtn .long { display: none; }
@media (min-width: 640px) { .secbtn .long { display: inline; } .secbtn .short { display: none; } }
/* 모바일: 섹션 머리 줄이고, 큰 글씨와 아이콘 겹침 방지 */
@media (max-width: 639px) {
  .sechead { padding: 12px 14px; margin-top: 10px; }
  .sechead h1 { font-size: 20px; }
  .sechead p { font-size: 13px; }
  .thumb .ico { font-size: 24px; top: 10px; right: 10px; }
  .thumb b { max-width: 100%; font-size: 16px; }
}

/* 깔끔하게: 카드 간격·글씨 */
.grid { gap: 12px; }
@media (min-width: 640px) { .grid { gap: 16px; } }
@media (min-width: 1024px) { .grid { gap: 20px; } }
.cbody { padding: 10px 14px 2px; }
.cfoot { padding: 4px 8px 8px 14px; }
.meta { font-weight: 500; }
.sectabs a { font-size: 15px; padding: 10px 14px; }
.hero h1 { font-weight: 800; }
@media (max-width: 639px) { .sum { display: none; } .card h3 { font-size: 14.5px; } }
/* 썸네일 위쪽은 D-day 자리로 비워 둠: 두 줄 문구와 겹치지 않게 */
.thumb { aspect-ratio: auto; min-height: 118px; padding-top: 38px; }
@media (min-width: 1024px) { .thumb { min-height: 128px; } }
.thumb.big { min-height: 160px; padding-top: 44px; }

/* 카드 등록 도우미 */
.admin { display: grid; gap: 16px; padding-bottom: 90px; }
.admin form { display: grid; grid-template-columns: 1fr; gap: 4px 14px; margin: 0; }
.admin textarea { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; resize: vertical; }
.admin .hint { margin: 0 0 6px; font-size: 12px; }
.admin .af.off { opacity: .45; }
.grid.one { grid-template-columns: minmax(0, 1fr) !important; max-width: 300px; }
@media (min-width: 1024px) {
  .admin { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
  .admin form { grid-template-columns: 1fr 1fr; }
  .admin-side { position: sticky; top: 118px; }
}

/* 총정리 안내 글 */
.guide h1 { font-size: clamp(24px, 5vw, 32px); line-height: 1.3; }
.guide > p { font-size: 16px; color: var(--ink-2); }
.guide h2 { font-size: 20px; margin: 28px 0 10px; letter-spacing: -.02em; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.gtable { width: 100%; border-collapse: collapse; font-size: 14px; }
.gtable th, .gtable td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.gtable th { background: var(--surface-2); font-weight: 700; white-space: nowrap; }
.gtable tr:last-child td { border-bottom: 0; }
.gtable td:nth-child(2), .gtable td:nth-child(3) { white-space: nowrap; }
.gitem { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 18px 12px; margin: 14px 0; }
.gitem h2 { margin-top: 14px; }
.gitem .facts { border: 0; margin: 8px 0; background: var(--surface-2); }
.glist { list-style: none; padding: 0; display: grid; gap: 8px; }
.glist a { display: block; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 600; }
.glist a:hover { border-color: var(--brand); }
.glist.big small { display: block; color: var(--ink-3); font-weight: 400; font-size: 13px; margin-top: 2px; }
.chips.guides { list-style: none; padding: 0; margin: 0; }
.gchip { display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; }
.gchip:hover { border-color: var(--brand); color: var(--brand); }

/* 대표 그림 (B안): 이모티콘 대신 통일된 아이콘 그림 */
.thumb .ico { display: none; }
.thumb .art { position: absolute; right: 6px; top: 50%; transform: translateY(-46%); width: 46%; max-width: 132px; height: auto; }
.thumb .art .blob { fill: #fff; opacity: .6; }
.thumb .art .dot { fill: var(--tx); opacity: .22; }
.thumb .art .dot.d2 { opacity: .14; }
.thumb .art .ic { fill: none; stroke: var(--tx); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.thumb b { max-width: 58%; font-size: 19px; line-height: 1.22; }
.thumb small { max-width: 58%; }
.thumb { min-height: 128px; }
.thumb.big .art { max-width: 190px; width: 34%; right: 18px; }
.thumb.big b { font-size: 30px; }
@media (max-width: 639px) { .thumb b { font-size: 16px; max-width: 60%; } .thumb .art { width: 44%; right: 2px; } .thumb { min-height: 118px; } }
@media (prefers-color-scheme: dark) { .thumb .art .blob { fill: #000; opacity: .25; } }

/* ===== 카드 디자인 (경쟁 사이트 벤치마킹, 2026-11-17) =====
   정부지원금 = 정보형 카드(온통청년식) · 나머지 = 입체 그림 배너 카드(복지로·마이리얼트립식)
   그림: Microsoft Fluent Emoji 3D (MIT) — /assets/art3d/ */
:root { --cb-gov: linear-gradient(135deg, #e8f7f0, #d1efe1); --cb-deal: linear-gradient(135deg, #fff0f4, #ffdbe7);
  --cb-event: linear-gradient(135deg, #fff4e6, #ffe2bf); --cb-finance: linear-gradient(135deg, #eaf3ff, #d3e5ff);
  --cb-free: linear-gradient(135deg, #f3edff, #e3d7ff); --amt-gov: #067a57; --amt-deal: #c11574; --amt-event: #c4320a;
  --amt-finance: #175cd3; --amt-free: #6938ef; }
@media (prefers-color-scheme: dark) { :root { --cb-gov: linear-gradient(135deg, #12352a, #164133); --cb-deal: linear-gradient(135deg, #3a1726, #45192e);
  --cb-event: linear-gradient(135deg, #3a2614, #452c16); --cb-finance: linear-gradient(135deg, #142a47, #173254); --cb-free: linear-gradient(135deg, #261c47, #2d2154);
  --amt-gov: #5fd3a6; --amt-deal: #f58bbf; --amt-event: #fdab6d; --amt-finance: #84b7ff; --amt-free: #b49cff; } }
.card { border-radius: 18px; }
.card .art3d { display: block; }
.tagc { display: inline-block; font-size: 11.5px; line-height: 1.5; padding: 1px 8px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.tagc.new { background: #ffd43b; color: #3b2f00; }

/* 배너형 */
.card.cb { border: 0; box-shadow: 0 1px 2px rgba(15,23,42,.06), 0 6px 18px rgba(15,23,42,.06); }
.card.cb:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(15,23,42,.12); border-color: transparent; }
.cb-top { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 152px; padding: 46px 16px 16px; text-decoration: none; color: var(--ink); overflow: hidden; }
.s-gov.cb-top, .hero-art.s-gov { background: var(--cb-gov); } .s-deal.cb-top, .hero-art.s-deal { background: var(--cb-deal); }
.s-event.cb-top, .hero-art.s-event { background: var(--cb-event); } .s-finance.cb-top, .hero-art.s-finance { background: var(--cb-finance); }
.s-free.cb-top, .hero-art.s-free { background: var(--cb-free); }
.cb-top b { position: relative; z-index: 1; font-size: 20px; line-height: 1.25; letter-spacing: -.03em; font-weight: 800; max-width: 62%; }
.cb-top small { position: relative; z-index: 1; font-size: 12px; color: var(--ink-2); max-width: 62%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.cb-top .art3d { position: absolute; right: 10px; bottom: 10px; width: 40%; max-width: 112px; height: auto; filter: drop-shadow(0 8px 10px rgba(16,24,40,.18)); }
.flags { position: absolute; left: 12px; top: 12px; display: flex; gap: 4px; z-index: 1; }
.flag { font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.92); color: #344054; }
.flag.hot { background: #f04438; color: #fff; } .flag.soon { background: #1d2939; color: #fff; } .flag.off { background: rgba(0,0,0,.5); color: #fff; }
.flag.new { background: #ffd43b; color: #3b2f00; }
.card.cb .cbody { padding: 12px 14px 4px; }
.card.cb .meta { gap: 4px; }
.card.cb h3 { margin-top: 4px; }

/* 정보형 */
.card.ci { padding: 16px; gap: 8px; border: 1px solid var(--line); box-shadow: none; }
.card.ci:hover { transform: none; border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: 0 8px 22px rgba(15,23,42,.08); }
.ci-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ci-head .save { margin-left: auto; width: 32px; height: 32px; }
.st { font-size: 13px; font-weight: 800; }
.st.hot { color: #d92d20; } .st.near { color: #dc6803; } .st.always { color: #039855; } .st.off { color: var(--ink-3); } .st.soon { color: #1d4ed8; }
.ci-title { display: flex; gap: 10px; align-items: center; }
.ci-title .art3d { width: 44px; height: 44px; flex: none; }
.card.ci h3 { margin: 0; font-size: 16.5px; }
.amt { font-size: 20px; font-weight: 800; letter-spacing: -.03em; line-height: 1.25; color: var(--amt-gov); }
.card.ci .sum { -webkit-line-clamp: 2; }
.ci-row { display: flex; gap: 8px; font-size: 12.5px; color: var(--ink-2); min-width: 0; }
.ci-row b { color: var(--ink); white-space: nowrap; flex: none; }
.ci-row span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-more { margin-top: auto; display: block; text-align: center; padding: 10px; border: 1px solid var(--brand); color: var(--brand); border-radius: 10px; font-weight: 700; font-size: 14px; background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
.card.ci:hover .ci-more { background: var(--brand); color: var(--brand-ink); }
.card.ci .why { margin: 0; }

/* 상세 화면 맨 위 배너 */
.hero-art { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 200px; margin-top: 10px; padding: 52px 22px 22px; border-radius: 20px; overflow: hidden; }
.hero-art b { position: relative; z-index: 1; font-size: 30px; line-height: 1.2; letter-spacing: -.03em; font-weight: 800; max-width: 64%; }
.hero-art small { position: relative; z-index: 1; font-size: 14px; color: var(--ink-2); margin-top: 4px; max-width: 64%; }
.hero-art .art3d { position: absolute; right: 18px; bottom: 14px; width: 34%; max-width: 168px; height: auto; filter: drop-shadow(0 10px 14px rgba(16,24,40,.2)); }

/* 첫 화면 섹션 단추·진단 배너 */
.secbtn img { width: 40px; height: 40px; }
.fitcta img.ico { width: 44px; height: 44px; flex: none; }

/* 휴대폰: 글자·그림 겹침 방지 */
@media (max-width: 639px) {
  .cb-top { min-height: 140px; padding: 42px 12px 12px; }
  .cb-top b { font-size: 16.5px; max-width: 66%; }
  .cb-top small { max-width: 66%; }
  .cb-top .art3d { width: 34%; right: 6px; bottom: 8px; }
  .card.ci { padding: 13px; }
  .ci-title .art3d { width: 36px; height: 36px; }
  .card.ci h3 { font-size: 15px; }
  .amt { font-size: 17px; }
  .ci-more { padding: 8px; font-size: 13px; }
  .hero-art b { font-size: 24px; }
  .secbtn img { width: 32px; height: 32px; }
}
/* 겹침 방지: 글자 영역과 그림 영역을 확실히 나눔 */
.cb-top b, .cb-top small { max-width: calc(100% - min(40%, 112px) - 18px); }
@media (max-width: 639px) { .cb-top b, .cb-top small { max-width: calc(100% - 34% - 10px); } }
/* 정보형 카드: 찜 단추는 오른쪽 위에 고정 (상태 줄이 길어져도 혼자 줄바꿈되지 않게) */
.card.ci { position: relative; }
.ci-head { padding-right: 34px; }
.ci-head .save { position: absolute; top: 10px; right: 10px; margin: 0; }
/* 아래 탭 '찜' 숫자는 아이콘 오른쪽 위에 작게 */
.tabbar a { position: relative; }
.tabbar .saved-count { position: absolute; top: 3px; left: calc(50% + 6px); margin: 0; min-width: 16px; line-height: 16px; font-size: 10px; padding: 0 4px; }
/* 휴대폰 정보형 카드: 그림은 작게, 제목은 3줄까지 */
@media (max-width: 639px) {
  .ci-title { gap: 8px; align-items: flex-start; }
  .ci-title .art3d { width: 30px; height: 30px; margin-top: 2px; }
  .card.ci h3 { -webkit-line-clamp: 3; font-size: 14.5px; }
}

/* ── 11-18 정리: 흰 배경, 선 두께·진하기, 그림 크기, 총정리 타일 ── */
:root { --bg: #ffffff; --surface-2: #f3f5f7; --line: #d5dae1; --bw: 1.5px; }
@media (prefers-color-scheme: dark) { :root { --bw: 1px; } }
.card, .card.ci, .facts, .detail section, .tablewrap, .gitem, .quiz, .secbtn, .empty, .side .box, .timeline li { border-width: var(--bw); }
.card.cb { border: var(--bw) solid var(--line); box-shadow: none; }
.card.cb:hover { border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); box-shadow: 0 10px 24px rgba(15,23,42,.10); }
.card.ci:hover { border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); }
.gtable th, .gtable td { border-bottom: 1px solid var(--line); }
.gtable th { background: #eef1f4; border-bottom: var(--bw) solid var(--line); }
.facts div { border-bottom-color: var(--line); }
/* 그림 크기: 문구를 가리지 않게 작게, 자리는 오른쪽 아래로 고정 */
.cb-top { min-height: 136px; }
.cb-top .art3d { width: 30%; max-width: 84px; right: 12px; bottom: 12px; }
.cb-top b, .cb-top small { max-width: calc(100% - min(30%, 84px) - 20px); }
.ci-title .art3d { width: 36px; height: 36px; }
.hero-art .art3d { width: 26%; max-width: 128px; }
@media (max-width: 639px) {
  .cb-top { min-height: 120px; }
  .cb-top .art3d { width: 30%; max-width: 64px; right: 8px; bottom: 8px; }
  .cb-top b, .cb-top small { max-width: calc(100% - min(30%, 64px) - 14px); }
  .ci-title .art3d { width: 28px; height: 28px; }
}
/* 가로 띠(마감 임박 등): PC에서 카드 폭 고정 */
@media (min-width: 640px) { .strip { grid-auto-columns: 31%; gap: 14px; } }
@media (min-width: 1024px) { .strip { grid-auto-columns: calc((100% - 56px) / 5); gap: 14px; } }
/* 총정리 타일 */
.gtiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.gtile { display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-height: 76px; background: var(--surface); border: var(--bw) solid var(--line); border-radius: 16px; text-decoration: none; color: var(--ink); transition: border-color .12s, box-shadow .12s, transform .12s; }
.gtile:hover { border-color: var(--brand); box-shadow: 0 8px 20px rgba(15,23,42,.08); transform: translateY(-2px); }
.gtile img { width: 44px; height: 44px; flex: none; padding: 6px; border-radius: 12px; background: var(--surface-2); box-sizing: content-box; }
.gtile span { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.gtile b { font-size: 15.5px; line-height: 1.35; letter-spacing: -.02em; }
.gtile small { font-size: 13px; color: var(--ink-3); line-height: 1.45; }
.gtile em { flex: none; font-style: normal; font-weight: 800; font-size: 13px; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 4px 10px; }
.gtile em::after { content: "개"; font-weight: 600; }
@media (min-width: 640px) { .gtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .gtiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } .gtiles.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .gtile { padding: 12px 14px; } .gtile img { width: 36px; height: 36px; } .gtile b { font-size: 14.5px; } }
.gtiles:not(.wide) .gtile small { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; }
.card.ci h3 { -webkit-line-clamp: 3; }
@media (max-width: 639px) {
  .gtiles:not(.wide) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .gtiles:not(.wide) .gtile { position: relative; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; min-height: 0; }
  .gtiles:not(.wide) .gtile img { width: 30px; height: 30px; padding: 5px; }
  .gtiles:not(.wide) .gtile small { display: none; }
  .gtiles:not(.wide) .gtile b { font-size: 14px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .gtiles:not(.wide) .gtile em { position: absolute; top: 12px; right: 10px; padding: 3px 8px; font-size: 12px; }
}
/* 로고 크게 */
.logo { font-size: 23px; gap: 10px; letter-spacing: -.03em; }
.logo-mark { width: 38px; height: 38px; }
@media (max-width: 639px) { .logo { font-size: 20px; gap: 8px; } .logo-mark { width: 32px; height: 32px; } }

/* ── 왼쪽 메뉴 (PC는 고정, 휴대폰·태블릿은 ☰ 버튼으로 여닫기) ── */
.snav { position: fixed; top: 0; bottom: 0; left: 0; z-index: 60; width: min(292px, 86vw); display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; overscroll-behavior: contain; transform: translateX(-102%); transition: transform .2s ease; }
body.nav-open .snav { transform: none; box-shadow: 0 0 40px rgba(15,23,42,.18); }
body.nav-open { overflow: hidden; }
.snav-dim { position: fixed; inset: 0; z-index: 55; background: rgba(15,23,42,.38); }
.snav-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 14px 10px 20px; }
.snav-x, .snav-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); cursor: pointer; padding: 0; }
.snav-x:hover, .snav-btn:hover { background: var(--surface-2); }
.snav-x svg, .snav-btn svg { width: 24px; height: 24px; }
.snav-body { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 4px 12px 12px; }
.snav-body > a, .snav-grp > summary { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; transition: background .12s, color .12s; }
.snav-body > a:hover, .snav-grp > summary:hover { background: var(--surface-2); color: var(--ink); }
.snav-body svg { width: 20px; height: 20px; flex: none; color: var(--ink-3); }
.snav-body img { width: 22px; height: 22px; flex: none; }
.snav-body > a[aria-current] { background: var(--brand-soft); color: var(--brand); font-weight: 800; }
.snav-body > a[aria-current] svg { color: var(--brand); }
.snav-body em { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 700; color: var(--ink-3); background: var(--surface-2); border-radius: 999px; padding: 1px 8px; }
.snav-body > a[aria-current] em { background: var(--surface); color: var(--brand); }
.snav-body .saved-count { margin-left: auto; }
.snav-fit { margin: 6px 0 2px; background: linear-gradient(135deg, #e6f6ef, #eef4ff); color: var(--brand) !important; font-weight: 800 !important; }
.snav-label { margin: 16px 12px 4px; font-size: 12px; font-weight: 700; color: var(--ink-3); letter-spacing: .02em; }
.snav-grp > summary { list-style: none; }
.snav-grp > summary::-webkit-details-marker { display: none; }
.snav-grp > summary svg:last-child { margin-left: auto; width: 18px; height: 18px; transition: transform .15s; }
.snav-grp[open] > summary svg:last-child { transform: rotate(180deg); }
.snav-sub { display: flex; flex-direction: column; padding: 2px 0 6px 26px; }
.snav-sub a { position: relative; display: block; padding: 8px 10px 8px 18px; border-radius: 8px; font-size: 14px; color: var(--ink-2); text-decoration: none; line-height: 1.4; }
.snav-sub a::before { content: ""; position: absolute; left: 4px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--line); }
.snav-sub a:hover { background: var(--surface-2); color: var(--ink); }
.snav-sub a[aria-current] { color: var(--brand); font-weight: 700; }
.snav-sub a[aria-current]::before { background: var(--brand); }
.snav-body hr { border: 0; border-top: 1px solid var(--line); margin: 12px 4px; }
.snav-body > a.snav-min { min-height: 38px; font-size: 14px; font-weight: 500; }
.snav-foot { margin: 0 12px 16px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); }
.snav-foot b { display: block; font-size: 14px; }
.snav-foot small { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.bar .snav-btn { margin-left: -8px; }

/* PC: 메뉴를 왼쪽에 고정, 위 막대는 검색만 */
@media (min-width: 1024px) {
  .snav { width: 256px; transform: none; transition: none; z-index: 40; }
  .snav-x, .snav-btn, .snav-dim { display: none !important; }
  body.nav-open { overflow: auto; }
  .main-col { margin-left: 256px; }
  .top .logo, .top .sectabs, .toplinks { display: none !important; }
  .top .bar { height: 64px; }
  .topsearch { margin-left: 0; max-width: 520px; }
  .topsearch input { height: 42px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .strip { grid-auto-columns: calc((100% - 28px) / 3); gap: 14px; }
  .layout { display: block; }
  .layout .quiz { position: static; max-height: none; }
  .layout .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .side { top: 80px; }
  .detail { grid-template-columns: minmax(0, 1fr) 300px; }
  .gtiles:not(.wide) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .strip { grid-auto-columns: calc((100% - 42px) / 4); }
  .layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; }
  .layout .quiz { position: sticky; top: 80px; max-height: calc(100vh - 92px); overflow: auto; }
  .layout .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gtiles:not(.wide) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1600px) {
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .strip { grid-auto-columns: calc((100% - 56px) / 5); }
  .layout .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media print { .snav, .snav-dim { display: none !important; } .main-col { margin: 0; } }
@media (min-width: 1024px) { .hero .secbtns { display: none; } .hero { padding-top: 22px; } }
/* 상태 표시: 공식 확인, 총액 줄 */
.tagc.ok { background: #e6f6ef; color: #067647; }
.flag.ok { background: #067647; color: #fff; }
.card.ci .tot { font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-top: -4px; }
.card.ci .tot small { font-weight: 500; color: var(--ink-3); }
.ended-note { font-size: 12.5px; font-weight: 600; color: var(--ink-3); margin-left: 4px; }
/* 제휴 상자 */
.detail section.aff { background: #fbfaf5; border-style: dashed; }
.aff ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; }
.aff li { padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.aff li p { margin: 4px 0 10px; color: var(--ink-2); font-size: 14px; }
.aff .btn { min-height: 40px; font-size: 14px; }
.adtag { font-size: 11px; font-weight: 700; color: var(--ink-3); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }
@media (prefers-color-scheme: dark) { .detail section.aff { background: var(--surface-2); } }
