@charset "UTF-8";
/* 아기디데이 디자인 시스템. 인라인 style 금지(CSP style-src 'self') — 모든 모양은 이 파일의 클래스로. */
:root {
  --bg: #FFF8F0; --surface: #fff; --fg: #3B2A22; --muted: #6B5448; --line: #EADBCF; --field: #9C867B;
  --coral: #E26D5A; --coral-d: #BA4631; --coral-dd: #9F3A27; --coral-bg: #FDEDE7; --coral-soft: #FBE0D6;
  --mint: #3E8E7E; --mint-d: #2B6F61; --mint-dd: #235A4F; --mint-bg: #E6F4F0; --mint-line: #A8D5CA;
  --amber: #B7791F; --amber-d: #7A4A0B; --amber-bg: #FFF1D6;
  --note-bg: #FFF3CF; --gray-bg: #EFE9E4; --warn: #A32F2F; --hero-bg: #FCF5EC;
  --r: 14px; --r-s: 12px; --shadow: 0 2px 10px rgba(59, 42, 34, .08);
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --f1: 13px; --f2: 15px; --f3: 17px; --f4: 20px; --f5: 26px; --f6: 32px;
  --gutter: max(var(--s4), calc((100% - 1080px) / 2 + var(--s4)));
  --bar-h: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: var(--f3)/1.6 system-ui, -apple-system, "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif; color: var(--fg); background: var(--bg); word-break: keep-all; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
img, video, svg { max-width: 100%; }
a { color: var(--coral-d); }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; line-height: 1.3; margin: 0; text-wrap: balance; }
h1 { font-size: var(--f5); margin: var(--s2) 0 var(--s3); }
h2 { font-size: var(--f4); margin: var(--s5) 0 var(--s2); }
h3 { font-size: var(--f3); }
p { margin: 0 0 var(--s3); text-wrap: pretty; }
small { font-size: var(--f1); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--mint-d); outline-offset: 2px; border-radius: 6px; }
.ic { width: 20px; height: 20px; flex: none; vertical-align: -4px; }

/* 머리글·바닥글 */
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); padding: var(--s2) var(--gutter); background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; flex: none; white-space: nowrap; align-items: center; gap: var(--s2); min-height: 44px; font-size: var(--f3); font-weight: 800; letter-spacing: -0.02em; color: var(--fg); text-decoration: none; }
.logo { width: 30px; height: 30px; color: var(--coral-d); }
.site-header nav { display: flex; margin-left: auto; gap: var(--s1); margin-right: calc(-1 * var(--s3)); }
.site-header nav a { display: inline-flex; align-items: center; white-space: nowrap; min-height: 44px; padding: 0 var(--s3); border-radius: 999px; font-size: var(--f2); font-weight: 700; color: var(--fg); text-decoration: none; }
.site-header nav a[aria-current="page"] { font-weight: 800; color: var(--coral-dd); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px; }
.nav-l { display: none; }
.site-footer { display: block; margin-top: var(--s6); padding: var(--s3) var(--gutter) var(--s5); border-top: 1px solid var(--line); background: var(--surface); }
.site-footer nav { display: flex; flex-wrap: wrap; margin-left: calc(-1 * var(--s2)); }
.site-footer a { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s2); font-size: 14px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.site-footer a + a::before { content: "·"; position: absolute; left: -2px; color: var(--muted); text-decoration: none; }

/* 본문 폭 */
.page { max-width: 1080px; margin: 0 auto; padding: var(--s3) var(--s4) 0; }
.prose { max-width: 680px; line-height: 1.75; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: var(--s2); }
.lead { font-size: var(--f3); color: var(--muted); }
.nw { white-space: nowrap; }
.updated, .hint { color: var(--muted); font-size: var(--f1); }
.hint { font-size: var(--f2); }
.warn { color: var(--warn); min-height: 1.2em; font-weight: 700; font-size: var(--f2); }
.note-warn { margin: var(--s1) 0 0; font-size: var(--f1); font-weight: 700; color: var(--amber-d); }

/* 칩 */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) 0; list-style: none; margin: var(--s2) 0 0; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 2px 10px; border-radius: 999px; font-size: var(--f1); font-weight: 700; line-height: 1.3; background: var(--gray-bg); color: var(--muted); white-space: nowrap; }
.chip-mint, .chip-health { background: var(--mint-bg); color: var(--mint-d); }
.chip-coral, .chip-oral { background: var(--coral-bg); color: var(--coral-d); }
.chip-warn { background: var(--amber-bg); color: var(--amber-d); }
.chips .chip { gap: 0; min-height: 0; padding: 0; background: none; font-size: var(--f1); font-weight: 600; color: var(--muted); }
.chips .chip:not(:last-child)::after { content: "·"; margin: 0 var(--s2); }
.chips .chip .ic { display: none; width: 18px; height: 18px; color: var(--mint-d); }

/* 버튼 */
button, .btn { font: inherit; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 48px; padding: 0 var(--s5); border: 2px solid transparent; border-radius: var(--r-s); font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; transition: transform .12s ease, background-color .15s ease, box-shadow .15s ease; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--coral-d); color: #fff; }
.btn-mint { background: var(--mint-d); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--mint-d); border-color: var(--mint-d); }
.btn-soft { background: var(--coral-bg); color: var(--coral-dd); border-color: var(--coral-soft); }
.btn-text { min-height: 44px; padding: 0 var(--s3); background: none; color: var(--muted); text-decoration: underline; font-weight: 600; font-size: var(--f2); }
.btn-block { width: 100%; }
.btn-sub { font-size: var(--f1); font-weight: 600; }

/* 입력 */
.panel { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: var(--s4); margin: var(--s3) 0; }
.panel label { display: block; font-weight: 700; margin: var(--s3) 0 var(--s1); }
.panel label:first-child { margin-top: 0; }
input[type=date], select { font: inherit; width: 100%; min-height: 48px; padding: var(--s2) var(--s3); border: 2px solid var(--field); border-radius: var(--r-s); background: var(--surface); color: var(--fg); }
.notice { background: var(--note-bg); border-radius: var(--r-s); padding: var(--s3) var(--s4); font-size: var(--f2); margin: var(--s3) 0; }
.src-list { margin: var(--s2) 0 0; padding-left: var(--s5); font-size: var(--f1); }
.src-list a { display: inline-block; padding: var(--s1) 0; }
.empty-note { display: flex; align-items: center; gap: var(--s4); margin: var(--s3) 0; padding: var(--s4); border: 2px dashed var(--line); border-radius: var(--r); color: var(--muted); }
.empty-note img { width: 96px; height: 96px; flex: none; border-radius: var(--r-s); }
.empty-note p { margin: 0; font-size: var(--f2); }
#result:not([hidden]) + .empty-note { display: none; }

/* 카드·그림자: 모든 카드는 같은 1단계 그림자 */
.card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: var(--s4); margin: var(--s3) 0; }
.card h2, .card h3 { margin: 0; }

/* 홈: 히어로 */
.hero { position: relative; display: flex; flex-direction: column; gap: var(--s3); padding: 0; text-align: left; }
.hero picture { display: block; width: 100%; border-radius: 20px; overflow: hidden; background: var(--hero-bg); }
.hero img { display: block; width: 100%; height: 200px; object-fit: cover; object-position: 50% 30%; }
.hero-copy { width: 100%; }
.hero h1 { font-size: var(--f5); margin: 0 0 var(--s2); }
.hero .lead { margin: 0 0 var(--s2); }
.hero-cta { display: none; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s4); }

/* 홈: 도구 카드 */
.tools { list-style: none; margin: var(--s4) 0 0; padding: 0; display: grid; gap: var(--s3); }
.tools > li:nth-child(2) { transition-delay: 70ms; }
.tools > li:nth-child(3) { transition-delay: 140ms; }
.tools > li:nth-child(4) { transition-delay: 210ms; }
.tool { position: relative; isolation: isolate; display: grid; grid-template-columns: clamp(96px, 26vw, 128px) minmax(0, 1fr); gap: var(--s3); align-items: center; height: 100%; padding: var(--s3); border-radius: var(--r); box-shadow: var(--shadow); color: var(--fg); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, background-color .15s ease; -webkit-tap-highlight-color: transparent; }
.tool-check { --glow: #8FCBBE; background: var(--mint-bg); border: 1px solid var(--mint-line); }
.tool-dol { --glow: #F2A99A; background: var(--coral-bg); border: 1px solid #F3C9BC; }
.tool:active { transform: scale(.98); }
.tool-check:active { background: #D6EBE5; }
.tool-dol:active { background: var(--coral-soft); }
.tool-due { --glow: #F0C46E; background: var(--amber-bg); border: 1px solid #EBCB93; }
.tool-due:active { background: #FBE3B3; }
.tool > div { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.tool-art { position: relative; display: block; width: 100%; }
.tool-art::before { content: ""; position: absolute; inset: -8%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, var(--glow) 0%, transparent 100%); opacity: .4; transition: opacity .2s ease, transform .2s ease; pointer-events: none; }
.tool img { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: var(--r-s); transition: transform .2s ease; mix-blend-mode: multiply; -webkit-mask-image: radial-gradient(closest-side, #000 82%, transparent 100%); mask-image: radial-gradient(closest-side, #000 82%, transparent 100%); }
.tool h2 { margin: 0 0 var(--s1); font-size: var(--f4); }
.tool p { margin: 0 0 var(--s2); font-size: var(--f2); color: var(--muted); }
.tool-go { margin-top: auto; display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s4); border-radius: var(--r-s); color: #fff; font-weight: 700; font-size: var(--f2); }
.tool-check .tool-go { background: var(--mint-d); }
.tool-dol .tool-go { background: var(--coral-d); }
.tool-due .tool-go { background: var(--amber-d); }
.tool-preg { --glow: #F7B8A8; background: var(--hero-bg); border: 1px solid var(--line); }
.tool-preg:active { background: var(--coral-bg); }
.tool-preg .tool-go { background: var(--mint-d); }
.tool:active img { transform: translateY(1px) scale(.96); }
.tool:focus-visible { outline: 3px solid var(--fg); outline-offset: 3px; transform: translateY(-3px); box-shadow: 0 6px 18px rgba(59, 42, 34, .14); }
.tool:focus-visible img { transform: translateY(-4px) scale(1.04); }
.tool:focus-visible .tool-art::before { opacity: 1; transform: scale(1.1); }
/* 대기 움직임: enhance.js 가 화면에 보이는 카드에만 .float 를 붙인다(개별 속성 translate 라 hover 의 transform 과 겹치지 않음) */
@keyframes tool-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -2px; } }
.tool.float img { animation: tool-bob 7s ease-in-out infinite; }
.tools > li:nth-child(2) .tool.float img { animation-duration: 6s; animation-delay: -2s; }
.tools > li:nth-child(3) .tool.float img { animation-duration: 8s; animation-delay: -4s; }
.tools > li:nth-child(4) .tool.float img { animation-duration: 6.5s; animation-delay: -1s; }

/* 자사 광고(talking-baby) 카드 — 작은 가로형, 운영자 서비스·광고 표시 유지 */
.tb-card { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: var(--s3); align-items: center; margin: var(--s4) 0; padding: var(--s3); border: 2px solid #F3C9BC; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.tb-media { position: relative; display: block; width: 104px; aspect-ratio: 9 / 16; border-radius: var(--r-s); overflow: hidden; background: var(--gray-bg); line-height: 0; }
.tb-media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.tb-play { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; background: rgba(255, 255, 255, .94); box-shadow: 0 2px 8px rgba(59, 42, 34, .3); pointer-events: none; }
.tb-play::before { content: ""; position: absolute; left: 19px; top: 14px; border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent var(--coral-d); }
.tb-playing .tb-play { display: none; }
.tb-bubble { position: absolute; top: 6px; right: 6px; max-width: calc(100% - 12px); padding: 5px 10px; border-radius: 10px 10px 2px 10px; background: #fff; box-shadow: 0 1px 4px rgba(59, 42, 34, .25); color: var(--fg); font-size: 12px; font-weight: 800; line-height: 1.3; text-align: left; white-space: nowrap; pointer-events: none; }
.tb-body { min-width: 0; }
.tb-tag { display: inline-block; margin-bottom: var(--s1); padding: 1px 8px; border: 1px solid var(--coral-d); border-radius: 999px; background: var(--surface); color: var(--coral-d); font-size: var(--f1); font-weight: 800; line-height: 1.5; }
.tb-title { font-size: 16px; margin: 0 0 var(--s1); }
.tb-line { margin: 0 0 var(--s2); font-size: var(--f1); color: var(--muted); }
.tb-buy { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s1) var(--s2); }
.tb-price { margin: 0; font-size: var(--f3); font-weight: 800; color: var(--coral-dd); }
.tb-buy .btn { min-height: 44px; padding: 0 var(--s4); font-size: var(--f2); }

/* T5 */
.layout { display: grid; gap: var(--s3); }
.summary { position: relative; margin: var(--s3) 0; padding: var(--s4); border: 2px solid var(--coral); border-radius: var(--r); background: var(--coral-bg); box-shadow: var(--shadow); }
.eyebrow { display: flex; align-items: center; gap: 6px; margin: 0 0 var(--s2); font-size: var(--f2); font-weight: 800; color: var(--coral-dd); }
.sum-main { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.sum-main h2 { margin: 0; font-size: var(--f4); }
.sum-dday { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s2); margin: var(--s2) 0 0; }
.dd-num { font-size: var(--f6); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; color: var(--coral-dd); }
.dd-cap { font-size: var(--f2); color: var(--muted); }
.sum-note { margin-bottom: var(--s2); }
.period { margin: var(--s2) 0 0; font-size: var(--f3); font-weight: 700; }
.bar { display: block; width: 100%; height: 10px; margin: var(--s2) 0 var(--s1); border: 0; border-radius: 999px; background: #F5D9CF; overflow: hidden; -webkit-appearance: none; appearance: none; }
.bar::-webkit-progress-bar { background: #F5D9CF; border-radius: 999px; }
.bar::-webkit-progress-value { background: var(--coral); border-radius: 999px; transition: width .4s ease; }
.bar::-moz-progress-bar { background: var(--coral); border-radius: 999px; }
.pct { margin: 0 0 var(--s3); font-size: var(--f1); color: var(--muted); }
.sum-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }
.sum-actions .btn { flex: 1 1 200px; }
.tl { list-style: none; margin: var(--s3) 0; padding: 0 0 0 var(--s4); border-left: 2px solid var(--line); }
.tl-item { position: relative; margin: 0 0 var(--s3) var(--s3); padding: var(--s3) var(--s4); border: 2px solid transparent; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.tl-item::before { content: ""; position: absolute; left: -38px; top: 22px; width: 14px; height: 14px; border: 3px solid var(--mint); border-radius: 50%; background: var(--bg); }
.tl-open { border-color: var(--coral); background: var(--coral-bg); }
.tl-open::before { border-color: var(--coral); background: var(--coral); }
.tl-past { background: #F6F1EC; }
.tl-past::before { border-color: #B9AAA0; background: var(--gray-bg); }
.tl-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-bottom: var(--s1); }
.tl-name { flex: 1 1 auto; font-size: var(--f3); }
.tl-period { margin: 0; font-size: var(--f2); font-weight: 600; }
.tl-sub { margin: var(--s1) 0 0; font-size: var(--f2); color: var(--muted); }
.tl-start { margin: var(--s1) 0 0; font-size: var(--f2); color: var(--muted); }
.tl-start strong { font-size: var(--f3); color: var(--mint-d); }
.tl-foot { margin: var(--s2) 0 var(--s4); font-size: var(--f2); color: var(--muted); }
.tl-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: var(--s1); font-size: var(--f2); font-weight: 700; }
.chip-st.chip-past { background: var(--gray-bg); color: var(--muted); }
.chip-st.chip-open { background: var(--coral-d); color: #fff; }
.chip-st.chip-upcoming { background: var(--surface); color: var(--mint-d); box-shadow: inset 0 0 0 2px var(--mint-d); }
.past { margin: var(--s3) 0; }
.past > summary, .vax > summary { display: flex; align-items: center; min-height: 44px; padding: 0 var(--s4); border-radius: var(--r-s); background: var(--gray-bg); color: var(--fg); font-weight: 700; font-size: var(--f2); cursor: pointer; }
.vax { margin: var(--s3) 0; }
.vax[open] > summary { margin-bottom: var(--s2); }
.ics-opt { display: flex; flex: 1 1 100%; align-items: center; gap: var(--s2); min-height: 44px; font-size: var(--f2); font-weight: 600; cursor: pointer; }
.ics-opt input { width: 22px; height: 22px; flex: none; accent-color: var(--mint-d); }
.fb-card { display: grid; grid-template-columns: 88px 1fr; gap: var(--s4); align-items: center; }
.fb-card img { width: 88px; height: 88px; border-radius: var(--r-s); }
.fb-title { margin: 0; font-size: var(--f4); font-weight: 800; }
.fb-title strong { color: var(--coral-dd); }
.fb-date { margin: 0 0 var(--s3); font-size: var(--f2); color: var(--muted); }
.fb-card .btn { grid-column: 1 / -1; }

/* T1 */
.t1-summary { margin: var(--s3) 0; padding: var(--s4); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.t1-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s3); margin: 0 0 var(--s2); }
.t1-line #t1-count { font-size: var(--f3); font-weight: 700; color: var(--muted); }
.t1-prog { display: flex; align-items: center; gap: var(--s3); }
.t1-prog .bar { flex: 1 1 auto; width: auto; margin: 0; background: #D6ECE6; }
.t1-prog .bar::-webkit-progress-bar { background: #D6ECE6; }
.t1-prog .bar::-webkit-progress-value { background: var(--mint); }
.t1-prog .bar::-moz-progress-bar { background: var(--mint); }
.timeline { list-style: none; margin: var(--s3) 0; padding: 0; }
.step { position: relative; padding-left: 28px; margin-bottom: var(--s3); }
.step::before { content: ""; position: absolute; left: 8px; top: 0; bottom: calc(-1 * var(--s3)); width: 2px; background: var(--line); }
.step:last-child::before { bottom: auto; height: 36px; }
.step::after { content: ""; position: absolute; left: 2px; top: 30px; width: 14px; height: 14px; border: 3px solid var(--mint); border-radius: 50%; background: var(--bg); }
.step-soon::after { border-color: var(--coral); background: var(--coral); }
.step-overdue::after { border-color: var(--amber); background: var(--amber); box-shadow: 0 0 0 3px var(--amber-bg); }
.step-done::after { border-color: var(--mint-d); background: var(--mint-d); }
.step-label { display: flex; align-items: center; gap: var(--s3); min-height: 60px; padding: var(--s3); border: 2px solid transparent; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); cursor: pointer; transition: transform .12s ease; -webkit-tap-highlight-color: transparent; }
.step-label:active { transform: scale(.98); }
.step-upcoming .step-label { border-color: var(--mint-line); }
.step-soon .step-label { border-color: var(--coral); background: var(--coral-bg); }
.step-body { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.step-name { font-weight: 700; font-size: var(--f3); }
.step-date { font-size: var(--f2); color: var(--muted); }
.step-note { font-size: var(--f1); color: var(--muted); }
.step-done .step-name { color: var(--muted); }
.badge { flex: none; padding: 4px 10px; border-radius: 999px; font-size: var(--f1); font-weight: 800; white-space: nowrap; }
.badge-done { background: var(--mint-bg); color: var(--mint-d); }
.badge-overdue { background: var(--amber-bg); color: var(--amber-d); box-shadow: inset 0 0 0 1px var(--amber); }
.badge-today { background: var(--coral-d); color: #fff; }
.badge-upcoming { background: var(--mint-bg); color: var(--mint-d); }
.step-soon .badge-upcoming { background: var(--coral-d); color: #fff; }
.chk { -webkit-appearance: none; appearance: none; display: grid; place-content: center; flex: none; width: 28px; height: 28px; margin: 0; border: 2px solid var(--field); border-radius: 8px; background: var(--surface); cursor: pointer; }
.chk::before { content: ""; width: 16px; height: 16px; background: #fff; clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); transform: scale(0); transition: transform .12s ease; }
.chk:checked { border-color: var(--mint-d); background: var(--mint-d); }
.chk:checked::before { transform: scale(1); }
.step-pop .chk:checked::before { animation: pop .3s ease-out; }
.actions { margin: var(--s4) 0 0; }
.actions-sub { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: var(--s2) 0; }
.actions .hint:empty { display: none; }

/* T1 하단 고정 바: 버튼만 떠 있다. 결과 영역이 보이고 #actions 가 아직 아래일 때만 t1.js 가 보여 준다 */
.t1-result { padding-bottom: calc(var(--bar-h) + var(--s4) + env(safe-area-inset-bottom)); }
html { scroll-padding-bottom: calc(var(--bar-h) + var(--s4)); }
.cta-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; gap: var(--s2); padding: 0 var(--s4) calc(var(--s3) + env(safe-area-inset-bottom)); pointer-events: none; }
.cta-bar > * { pointer-events: auto; }
.cta-bar .btn { width: 100%; max-width: 480px; min-height: 52px; box-shadow: 0 6px 18px rgba(59, 42, 34, .3); }
.cta-msg { max-width: 480px; margin: 0; padding: var(--s2) var(--s3); border-radius: var(--r-s); background: var(--surface); box-shadow: var(--shadow); font-size: var(--f2); }
.cta-msg:empty { display: none; }

/* 광고 자리(구글 광고): 광고 판정이 true 일 때만 보인다(HTML 의 hidden 을 common.js 가 푼다). 클릭 유도 요소 없이 라벨·여백만 */
.ad-slot { position: relative; display: flex; align-items: center; justify-content: center; min-height: 90px; margin: var(--s6) 0; padding: var(--s5) var(--s2) var(--s2); border-radius: var(--r-s); color: var(--muted); font-size: var(--f1); }
.ad-slot::before { content: "광고"; position: absolute; top: var(--s1); left: var(--s3); font-size: var(--f1); color: var(--muted); }

/* 애니메이션 */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(0); } 60% { transform: scale(1.45); } 100% { transform: scale(1); } }
.summary, .t1-summary, .tl-item, .step, .fb-card { animation: rise .26s ease-out both; }
.d1 { animation-delay: 0ms; } .d2 { animation-delay: 40ms; } .d3 { animation-delay: 80ms; } .d4 { animation-delay: 120ms; }
.d5 { animation-delay: 160ms; } .d6 { animation-delay: 200ms; } .d7 { animation-delay: 240ms; } .d8 { animation-delay: 280ms; }
.d9 { animation-delay: 320ms; } .d10 { animation-delay: 360ms; } .d11 { animation-delay: 400ms; } .d12 { animation-delay: 440ms; }
.reveal { transition: opacity .3s ease-out, transform .3s ease-out; }
.reveal.wait { opacity: 0; transform: translateY(16px); }
.reveal.wait.in { opacity: 1; transform: none; }

/* 좁은 화면(≤379): 광고 카드 썸네일을 96px 로 줄여 글 폭 확보 */
@media (max-width: 379px) {
  .tb-card { grid-template-columns: 96px minmax(0, 1fr); }
  .tb-media { width: 96px; }
}

/* 좁은 화면(≤479): 메뉴 4개가 한 줄에 들어가도록 항목 안쪽 여백만 줄인다(터치 높이 44px 유지) */
@media (max-width: 479px) {
  .site-header nav { gap: 0; margin-right: calc(-1 * var(--s2)); }
  .site-header nav a { padding: 0 var(--s2); }
}

@media (max-width: 389px) {
  .site-header nav a { padding: 0 6px; }
}

/* 아주 좁은 화면(≤319): 바닥글 링크 3+2 배치 */
@media (max-width: 319px) {
  .site-footer nav { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; }
  .site-footer a + a::before { content: none; }
}

/* 600~959: 카드 2열 */
@media (min-width: 600px) {
  .nav-s { display: none; }
  .nav-l { display: inline; }
  .chips { gap: var(--s2); margin-top: var(--s3); }
  .chips .chip { gap: 6px; min-height: 36px; padding: 4px 12px; background: var(--surface); box-shadow: var(--shadow); font-size: var(--f2); font-weight: 700; color: var(--fg); white-space: normal; }
  .chips .chip:not(:last-child)::after { content: none; }
  .chips .chip .ic { display: inline-block; }
  .tools { grid-template-columns: 1fr 1fr; }
  .tool { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; align-items: start; justify-items: center; padding: var(--s4); text-align: center; }
  .tool-art { width: clamp(140px, 22vw, 160px); }
  .tool > div { align-items: center; width: 100%; height: 100%; }
  .tb-card { grid-template-columns: 160px minmax(0, 1fr); gap: var(--s5); max-width: 760px; margin: var(--s5) auto; padding: var(--s4); }
  .tb-media { width: 160px; }
  .tb-bubble { top: 8px; right: 8px; padding: 5px 10px; font-size: var(--f1); }
  .tb-tag { margin-bottom: var(--s2); font-size: var(--f2); }
  .tb-title { margin-bottom: var(--s2); font-size: var(--f5); }
  .tb-line { margin-bottom: var(--s3); font-size: var(--f3); }
  .tb-buy { padding-top: var(--s3); border-top: 1px dashed var(--line); }
  .tb-price { font-size: var(--f5); }
  .tb-buy .btn { padding: 0 var(--s5); }
  .hero { flex-direction: row; align-items: center; gap: var(--s5); }
  .hero picture { flex: 0 0 280px; width: 280px; }
  .hero img { height: auto; }
  .hero-cta { display: flex; }
  .t1-result { padding-bottom: 0; }
  html { scroll-padding-bottom: 0; }
  .cta-bar { display: none; }
}

/* 960+: 입력 sticky + 결과 2단, 히어로는 배경 그림 위에 글 */
@media (min-width: 960px) {
  h1, .hero h1 { font-size: var(--f6); }
  .layout { grid-template-columns: 340px minmax(0, 1fr); gap: var(--s6); align-items: start; }
  .layout > .panel-col { position: sticky; top: var(--s4); }
  .layout .panel { margin-top: 0; }
  .tools { grid-template-columns: 1fr 1fr; gap: var(--s4); }
  .hero { display: flex; align-items: center; min-height: 560px; border-radius: 20px; overflow: hidden; background: var(--hero-bg); }
  .hero picture { position: absolute; inset: 0; flex: none; width: 100%; border-radius: 0; -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 30%); mask-image: linear-gradient(to right, transparent 0%, #000 30%); }
  .hero img { width: 100%; height: 100%; object-position: 100% 60%; }
  .hero-copy { position: relative; z-index: 1; width: 46%; padding: var(--s6) 0 var(--s6) 48px; }
}

/* 호버는 데스크톱 포인터에서만 */
@media (hover: hover) {
  .btn-primary:hover { background: var(--coral-dd); }
  .btn-mint:hover { background: var(--mint-dd); }
  .btn-secondary:hover { background: var(--mint-bg); }
  .btn-soft:hover { background: var(--coral-soft); }
  .btn-text:hover { color: var(--fg); }
  .tool:hover { transform: perspective(700px) translateY(-3px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); box-shadow: 0 6px 18px rgba(59, 42, 34, .14); }
  .tool:hover:active { transform: perspective(700px) scale(.98); }
  .tool:hover img { transform: translateY(-4px) scale(1.04); }
  .tool:hover .tool-art::before { opacity: 1; transform: scale(1.1); }
  /* 기울기: enhance.js 가 포인터 위치를 5단계(data-tx·data-ty = -2..2)로 알려 주고, 각도는 여기서만 정한다(최대 4°) */
  .tool[data-tx="-2"] { --ry: -4deg; } .tool[data-tx="-1"] { --ry: -2deg; } .tool[data-tx="1"] { --ry: 2deg; } .tool[data-tx="2"] { --ry: 4deg; }
  .tool[data-ty="-2"] { --rx: 4deg; } .tool[data-ty="-1"] { --rx: 2deg; } .tool[data-ty="1"] { --rx: -2deg; } .tool[data-ty="2"] { --rx: -4deg; }
  .site-header nav a:hover { background: var(--coral-bg); }
  .site-footer a:hover { color: var(--fg); }
  .step-label:hover { box-shadow: 0 4px 14px rgba(59, 42, 34, .14); }
  .tb-media:hover { box-shadow: 0 4px 14px rgba(59, 42, 34, .22); }
  @media (prefers-reduced-motion: reduce) {
    .tool:hover, .tool:hover:active, .tool:hover img, .tool:hover .tool-art::before { transform: none !important; }
  }
}

/* 움직임 줄이기: 모든 애니메이션·전환 끔(영상 자동재생은 enhance.js 가 끈다) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal.wait { opacity: 1; transform: none; }
  .tools > li { transition-delay: 0s !important; }
  .tool.float img { animation: none !important; }
  .tool[data-tx], .tool[data-ty] { --rx: 0deg; --ry: 0deg; }
  /* 카드·그림·빛의 이동·확대·기울기·눌림만 끈다. 포커스 테두리·hover 배경·빛 진해짐은 그대로(마우스 올림 쪽은 위 hover 블록 안) */
  .tool:focus-visible, .tool:active, .tool:focus-visible img, .tool:active img, .tool:focus-visible .tool-art::before { transform: none !important; }
}
