/* base.css — 신규5 서비스 공용 디자인 기본틀.
   원칙: 밝은 바탕, 글자는 진한 먹색, 서비스 색 하나(--accent)만 쓴다. 그림자·그라데이션·이모지 없이 간격과 글자 크기로 위계를 만든다.
   서비스 페이지는 :root{--accent:…;--accent-soft:…} 만 바꾸고, 결과물(부적·달력·사진·영상)이 주인공이 되게 한다. */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-2: #f5f4f1;
  --bg-3: #eeece7;
  --ink: #161616;
  --ink-2: #555350;
  --ink-3: #8f8c87;
  --line: #e7e5e0;
  --line-2: #d6d3cc;
  --accent: #161616;
  --accent-ink: #ffffff;
  --accent-soft: #f1efe9;
  --danger: #c4372b;
  --ok: #1f7a4d;
  --r-s: 8px;
  --r: 14px;
  --r-l: 20px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  --serif: "Noto Serif KR", "Nanum Myeongjo", serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--font); letter-spacing: -0.01em; -webkit-font-smoothing: antialiased; overflow-x: hidden; word-break: keep-all; overflow-wrap: anywhere; }
img, video, canvas, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

/* 레이아웃 */
.wrap { max-width: 480px; margin: 0 auto; padding: 0 20px; }
.screen { padding: 20px 0 calc(120px + var(--safe-b)); }
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; }
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar .wrap { height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; letter-spacing: -0.02em; text-decoration: none; }
.brand svg { width: 22px; height: 22px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; border-radius: 10px; cursor: pointer; }
.icon-btn:active { background: var(--bg-2); }
.section { padding: 28px 0; }
.section + .section { border-top: 8px solid var(--bg-2); }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.center { text-align: center; }

/* 글자 */
.eyebrow { font-size: 14px; font-weight: 600; color: var(--accent); margin: 0 0 8px; }
h1, .h1 { font-size: 28px; line-height: 1.32; font-weight: 700; letter-spacing: -0.03em; margin: 0; }
h2, .h2 { font-size: 21px; line-height: 1.38; font-weight: 700; letter-spacing: -0.025em; margin: 0; }
h3, .h3 { font-size: 17px; line-height: 1.45; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
.lead { font-size: 16px; color: var(--ink-2); margin-top: 10px; }
.muted { color: var(--ink-2); }
.small { font-size: 13px; line-height: 1.55; color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; }
.serif { font-family: var(--serif); }

/* 입력 */
.field { display: block; margin-top: 20px; }
.field > .label { display: flex; align-items: baseline; justify-content: space-between; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.field > .label .opt { font-weight: 400; color: var(--ink-3); font-size: 13px; }
.input, select.input, textarea.input { width: 100%; height: 54px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: var(--r); background: #fff; font-size: 17px; outline: none; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none; }
textarea.input { height: auto; min-height: 104px; padding: 14px 16px; line-height: 1.55; resize: vertical; }
.input::placeholder { color: #b3b0aa; }
.input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(22, 22, 22, .06); }
.input.err { border-color: var(--danger); }
.hint { font-size: 13px; color: var(--ink-3); margin-top: 8px; }
.hint.err { color: var(--danger); }
.date3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; }

/* 고르기 */
.seg { display: flex; padding: 4px; gap: 4px; background: var(--bg-2); border-radius: var(--r); }
.seg button { flex: 1; height: 44px; border: 0; border-radius: 10px; background: transparent; font-size: 15px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 40px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; font-size: 15px; color: var(--ink); cursor: pointer; }
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); cursor: pointer; margin-top: 14px; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }

/* 버튼 */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 56px; padding: 0 20px; border: 0; border-radius: var(--r); background: var(--accent); color: var(--accent-ink); font-size: 17px; font-weight: 600; letter-spacing: -0.02em; cursor: pointer; text-decoration: none; transition: transform .08s, opacity .15s; }
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .35; cursor: default; transform: none; }
.btn.ghost { background: var(--bg-2); color: var(--ink); }
.btn.line { background: #fff; color: var(--ink); border: 1px solid var(--line-2); }
.btn.sm { height: 44px; font-size: 15px; border-radius: 12px; width: auto; padding: 0 16px; }
.link { background: none; border: 0; padding: 0; font-size: 14px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 12px 0 calc(12px + var(--safe-b)); background: linear-gradient(rgba(255, 255, 255, 0), #fff 24%); }
.cta .wrap > .small { margin-top: 8px; text-align: center; }

/* 카드·목록 */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-l); padding: 20px; }
.card.soft { background: var(--bg-2); border-color: transparent; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag.grey { background: var(--bg-2); color: var(--ink-2); }
.divider { height: 1px; background: var(--line); margin: 20px 0; }

/* 잠금(결제 전) */
.locked { position: relative; overflow: hidden; border-radius: var(--r); }
.locked > .blur { filter: blur(7px); opacity: .55; pointer-events: none; user-select: none; }
.locked > .lock { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; }
.locked > .lock .pill { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 18px; background: rgba(22, 22, 22, .86); color: #fff; font-size: 14px; font-weight: 600; }

/* 결제 시트 */
.sheet-bg { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .42); opacity: 0; transition: opacity .2s; }
.sheet-bg.on { opacity: 1; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; max-height: 92vh; overflow: auto; background: #fff; border-radius: 22px 22px 0 0; padding: 10px 0 calc(20px + var(--safe-b)); transform: translateY(102%); transition: transform .26s cubic-bezier(.2, .8, .2, 1); }
.sheet.on { transform: none; }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 0 auto 14px; }
.plan { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px; border: 1.5px solid var(--line); border-radius: var(--r); background: #fff; text-align: left; cursor: pointer; margin-top: 10px; }
.plan[aria-checked="true"] { border-color: var(--ink); }
.plan .dot { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); flex: none; display: grid; place-items: center; }
.plan[aria-checked="true"] .dot { border-color: var(--ink); background: var(--ink); box-shadow: inset 0 0 0 4px #fff; }
.plan .pt { flex: 1; }
.plan .pt b { display: block; font-size: 16px; font-weight: 600; }
.plan .pt span { font-size: 13px; color: var(--ink-2); }
.plan .pp { font-size: 17px; font-weight: 700; white-space: nowrap; }
.paymethods { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.paymethods span { font-size: 12px; color: var(--ink-2); padding: 4px 8px; background: var(--bg-2); border-radius: 6px; }

/* 진행·불러오기 */
.progress { height: 4px; border-radius: 2px; background: var(--bg-3); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 2px; transition: width .4s ease; }
.skel { background: linear-gradient(90deg, var(--bg-2) 0, var(--bg-3) 40%, var(--bg-2) 80%); background-size: 300% 100%; animation: skel 1.4s ease infinite; border-radius: 8px; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--bg-3); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translate(-50%, 12px); z-index: 60; max-width: calc(100% - 40px); padding: 12px 16px; border-radius: 12px; background: rgba(22, 22, 22, .92); color: #fff; font-size: 14px; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* 바닥글 */
.foot { padding: 32px 0 calc(140px + var(--safe-b)); background: var(--bg-2); font-size: 12px; line-height: 1.7; color: var(--ink-3); }
.foot p + p { margin-top: 2px; }
.ft-links { display: flex; gap: 14px; margin-bottom: 10px; font-size: 13px; }
.ft-links a { color: var(--ink-2); text-decoration: none; }
.ft-links b { font-weight: 600; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
