/* style.css : 색과 글꼴은 맨 위 :root에서. 강조색(accent)은 data.js의 THEME이 덮어써요 */
:root {
  --cream: #FBF6EE;
  --navy: #1E2A44;
  --mute: #5C6274;     /* 크림 바탕 대비 5:1 이상 */
  --line: #E4DACA;
  --accent: #C9472F;
  --accent-soft: #F7D9CF;
  --card: #ffffff;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--navy); font-family: var(--font); word-break: keep-all; overflow-wrap: anywhere; line-height: 1.5; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; border-radius: 8px; }

.deco { position: absolute; inset: 0 0 auto 0; height: 520px; overflow: hidden; pointer-events: none; z-index: 0; }
.deco i { position: absolute; border-radius: 50%; }
.deco .d1 { width: 300px; height: 300px; right: -90px; top: 20px; background: var(--accent-soft); }
.deco .d2 { width: 140px; height: 140px; left: -50px; top: 300px; background: #E9EEF8; }

.page { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 36px 20px 120px; display: grid; gap: 18px; grid-template-areas: "hero" "card" "body"; }
.hero { grid-area: hero; }
.card { grid-area: card; }
.body { grid-area: body; }

.dday { display: inline-block; margin: 0; background: var(--accent); color: #fff; font-weight: 800; font-size: 14px; border-radius: 999px; padding: 5px 12px; }
.dday.past { background: var(--mute); }
.eyebrow { margin: 18px 0 2px; font-size: 14px; font-weight: 600; color: var(--mute); }
h1 { margin: 0; font-size: clamp(34px, 9vw, 64px); line-height: 1.12; font-weight: 900; letter-spacing: -0.03em; }
.subtitle { margin: 10px 0 0; font-size: clamp(16px, 4.2vw, 20px); color: var(--mute); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 20px; box-shadow: 0 12px 30px rgba(30, 42, 68, 0.06); }
.info + .info { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.k { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--mute); letter-spacing: 0.02em; }
.when { margin: 0; font-size: 24px; font-weight: 800; }
.when-time { margin: 2px 0 0; font-size: 16px; }
.where { margin: 0; font-size: 19px; font-weight: 800; }
.where-sub { margin: 2px 0 0; font-size: 14px; color: var(--mute); }
.map-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.map-links.three { grid-template-columns: 1fr 1fr 1fr; }
.card-actions { margin-top: 18px; display: none; }
.card-actions > .btn { display: flex; width: 100%; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 16px; border-radius: 14px; border: 0; background: var(--accent); color: #fff; font-weight: 700; font-size: 16px; text-decoration: none; text-align: center; }
.btn.line { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.btn.sm { min-height: 44px; font-size: 14px; font-weight: 600; padding: 0 8px; }
.btn[aria-disabled="true"] { background: #d9d4cb; color: #4a4f5c; pointer-events: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.deadline { margin: 8px 0 12px; font-size: 13px; color: var(--mute); text-align: center; }

.sec { margin-top: 30px; }
.intro p { margin: 0 0 10px; font-size: 16px; line-height: 1.75; }
.timeline, .bring { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 14px; padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: 16px; }
.timeline li:last-child { border-bottom: 0; }
.timeline b { width: 52px; flex: none; color: var(--navy); color: color-mix(in srgb, var(--accent) 82%, #000); font-variant-numeric: tabular-nums; }
.bring li { padding: 6px 0 6px 22px; position: relative; font-size: 16px; }
.bring li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.map-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.map { display: block; width: 100%; height: auto; max-height: 220px; }
.map-body { padding: 14px 16px 16px; }

.foot { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--mute); }
.foot p { margin: 0 0 4px; }
.foot a { color: var(--navy); font-weight: 600; }

/* 휴대폰 아래 막대 */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: 2fr 1fr; gap: 8px; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(rgba(251,246,238,0), var(--cream) 28%); }
.bar .btn { min-height: 54px; }

/* 캘린더 시트 */
.sheet { border: 0; padding: 0; width: 100%; max-width: 480px; margin: auto auto 0; border-radius: 24px 24px 0 0; background: #fff; color: var(--navy); }
.sheet::backdrop { background: rgba(30, 42, 68, 0.4); }
.sheet-in { display: grid; gap: 8px; padding: 12px 22px calc(22px + env(safe-area-inset-bottom)); }
.grabber { width: 40px; height: 4px; border-radius: 2px; background: #ddd; margin: 0 auto 8px; }
.sheet h2 { margin: 4px 0 0; font-size: 19px; font-weight: 800; }
.small { margin: 0 0 6px; font-size: 13px; color: var(--mute); }
.opt { display: flex; justify-content: space-between; align-items: center; min-height: 56px; padding: 0 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--navy); text-decoration: none; font-size: 15px; }
.opt span { color: var(--mute); font-size: 14px; }
.sheet hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0 4px; width: 100%; }
.text-btn { background: none; border: 0; color: var(--mute); text-decoration: underline; text-underline-offset: 3px; min-height: 44px; font-size: 14px; }

.toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%) translateY(16px); background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; opacity: 0; pointer-events: none; transition: all .2s; z-index: 40; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.noscript { padding: 20px; text-align: center; }

/* PC: 왼쪽 내용, 오른쪽 따라오는 카드 */
@media (min-width: 1024px) {
  .deco { height: 640px; }
  .deco .d1 { width: 460px; height: 460px; right: auto; left: 46%; top: -140px; }
  .page { padding: 64px 48px 80px; grid-template-columns: 1fr 380px; column-gap: 64px; row-gap: 0; grid-template-areas: "hero card" "body card"; align-items: start; }
  .card { position: sticky; top: 32px; padding: 26px; }
  .card-actions { display: block; }
  .bar { display: none; }
  .subtitle { margin-top: 14px; }
  .intro { max-width: 600px; }
  .two { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
  .page { padding-bottom: 64px; }
  .sheet { margin: auto; border-radius: 24px; }
  .sheet .grabber { display: none; }
  .toast { bottom: 40px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .bar, .deco, .card-actions, .map-links { display: none !important; } }
