/* 발도장사주: 크림 바탕 · 코코아 글자 · 인주색 도장. 원소 색은 그림과 카드에만 */
:root {
  --cream: #fff5e8; --paper: #fffdf9; --cocoa: #4a302a; --mute: #80665e; --line: #f0ddd0;
  --inju: #ec5b53; --inju-d: #cf403a; --blush: #ffe4da;
  --head: Jua, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --body: 'Gowun Dodum', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--cocoa); font: 16px/1.7 var(--body); word-break: keep-all; overflow-wrap: anywhere; }
h1, h2, h3 { font-family: var(--head); font-weight: 400; line-height: 1.25; margin: 0; }
h1 { font-size: clamp(42px, 11vw, 76px); }
h1 em { font-style: normal; color: var(--inju); }
h2 { font-size: clamp(28px, 7vw, 40px); }
h3 { font-size: 23px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--inju-d); }
.hidden { display: none !important; }
.center { text-align: center; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
section { padding: 52px 0; }

.nav { position: sticky; top: 0; z-index: 10; background: rgba(255,245,232,.93); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { display: flex; align-items: center; gap: 9px; font: 22px var(--head); color: var(--cocoa); text-decoration: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 12px 26px; border: 0; border-radius: 999px; background: var(--inju); color: #fff; font: 19px var(--head); text-decoration: none; cursor: pointer; box-shadow: 0 5px 0 var(--inju-d); transition: transform .12s, box-shadow .12s; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--inju-d); }
.btn:focus-visible { outline: 3px solid var(--cocoa); outline-offset: 3px; }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-lg { min-height: 60px; font-size: 21px; }
.btn-sm { min-height: 38px; padding: 6px 16px; font-size: 15px; box-shadow: 0 3px 0 var(--inju-d); }
.btn-block { width: 100%; }
.btn-soon { background: var(--cocoa); box-shadow: 0 5px 0 #2b1b17; }

.hero { padding-top: 34px; }
.hero .wrap { display: grid; gap: 34px; align-items: center; }
.eyebrow { margin: 0 0 8px; color: var(--inju-d); font: 16px var(--head); }
.lead { font-size: 17.5px; margin: 16px 0 24px; }
.ok { color: var(--mute); font-size: 14px; margin: 18px 0 0; }
.herocard { margin: 0 auto; width: min(100%, 400px); }
.herocard img { border-radius: 26px; box-shadow: 0 26px 50px -22px rgba(74,48,42,.45); transform: rotate(2deg); }
figcaption { text-align: center; color: var(--mute); font-size: 13.5px; margin-top: 12px; }
@media (max-width: 899px) { .hero .btn { width: 100%; } }
@media (min-width: 900px) { .hero { padding: 64px 0 72px; } .hero .wrap { grid-template-columns: 1fr 420px; gap: 70px; } .lead { font-size: 20px; } }

.friends { padding: 8px 0 20px; }
.friends ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.friends li { grid-column: span 2; border-radius: 22px; padding: 6px 4px 12px; text-align: center; }
.friends li:nth-child(4), .friends li:nth-child(5) { grid-column: span 3; }
.friends li img { width: min(100%, 170px); margin: 0 auto; }
.friends b { display: block; font: 19px var(--head); font-weight: 400; }
.friends span { display: block; font-size: 12.5px; color: var(--mute); }
.friends .wood { background: #e3f2e0; } .friends .fire { background: #ffe6d8; } .friends .earth { background: #fbeec9; }
.friends .metal { background: #e6e9f1; } .friends .water { background: #dfeefd; }
@media (min-width: 760px) { .friends ul { grid-template-columns: repeat(5, 1fr); } .friends li, .friends li:nth-child(4), .friends li:nth-child(5) { grid-column: auto; } }

.maker { display: grid; gap: 28px; align-items: start; }
@media (min-width: 900px) { .maker { grid-template-columns: 1fr 460px; gap: 48px; } }
.panel { background: var(--paper); border: 2px solid var(--line); border-radius: 28px; padding: 26px 20px; }
.sub { color: var(--mute); margin: 6px 0 20px; }
form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; font: 17px var(--head); border: 0; padding: 0; margin: 0; min-width: 0; }
.field legend { padding: 0; margin-bottom: 7px; float: left; width: 100%; }
.field legend + * { clear: both; }
.field i { font: normal 13px var(--body); color: var(--mute); }
.field small { font: 13px var(--body); color: var(--mute); }
.field > input { width: 100%; min-width: 0; min-height: 52px; padding: 11px 14px; border: 2px solid var(--line); border-radius: 15px; background: #fff; color: var(--cocoa); font: 16px var(--body); }
.field > input:focus { outline: 0; border-color: var(--inju); box-shadow: 0 0 0 4px var(--blush); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg.three { grid-template-columns: repeat(3, 1fr); }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 50px; padding: 6px; border: 2px solid var(--line); border-radius: 15px; background: #fff; font-size: 16px; line-height: 1.3; }
.seg input:checked + span { border-color: var(--inju); background: var(--blush); }
.seg input:focus-visible + span { outline: 3px solid var(--cocoa); outline-offset: 2px; }
.err { color: #b7231d; margin: 0; font-size: 14.5px; }
.err:empty { display: none; }
.safe { margin: 4px 0 0; font-size: 13px; color: var(--mute); text-align: center; }

.cardbox canvas, .cardbox img { width: 100%; height: auto; aspect-ratio: 4/5; border-radius: 24px; box-shadow: 0 24px 46px -24px rgba(74,48,42,.5); }
.cardbox img { opacity: .8; }
.out { max-width: 460px; width: 100%; margin: 0 auto; }
.note { font-size: 13.5px; color: var(--mute); text-align: center; }
.result, .locked, .pay { background: var(--paper); border: 2px solid var(--line); border-radius: 24px; padding: 20px; margin-top: 16px; }
.tag { display: inline-block; margin: 0 0 8px; padding: 3px 14px; border-radius: 99px; background: var(--blush); font: 16px var(--head); }
blockquote { margin: 10px 0 16px; font: 21px/1.45 var(--head); }
.basis { margin: 0; font-size: 14.5px; border-top: 2px dashed var(--line); padding-top: 12px; }
.basis dt { color: var(--mute); font-size: 13px; }
.basis dd { margin: 0 0 8px; }
.fine { font-size: 13px; color: var(--mute); margin: 8px 0 0; }
.locked ul { padding-left: 20px; margin: 10px 0; font-size: 15px; }
.locked b { font-family: var(--head); font-weight: 400; font-size: 17px; }
.locked li i { font-style: normal; color: var(--mute); font-size: 13px; }
.blur i { display: block; height: 13px; border-radius: 9px; background: #e6d6cc; margin-top: 10px; filter: blur(3px); }
.blur i:nth-child(2) { width: 82%; } .blur i:nth-child(3) { width: 93%; } .blur i:nth-child(4) { width: 58%; }
.plan { display: flex; align-items: center; gap: 12px; border: 2px solid var(--line); border-radius: 18px; padding: 13px 14px; margin-bottom: 10px; cursor: pointer; background: #fff; }
.plan:has(input:checked) { border-color: var(--inju); background: var(--blush); }
.plan input { width: 19px; height: 19px; accent-color: var(--inju); flex: none; }
.plan span { flex: 1; line-height: 1.4; }
.plan b { display: block; font: 17px var(--head); }
.plan small { color: var(--mute); font-size: 13px; }
.plan em { font: normal 22px var(--head); white-space: nowrap; }
.pay .btn { margin-top: 6px; }
.result h4 { font: 18px var(--head); margin: 18px 0 4px; }
.result p, .result ul { margin: 4px 0; }
.result ul { padding-left: 20px; }
#save { margin-top: 14px; }

.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.gallery figure { margin: 0; }
.gallery img { border-radius: 18px; box-shadow: 0 18px 34px -20px rgba(74,48,42,.5); }
@media (min-width: 900px) { .gallery { grid-template-columns: repeat(4, 1fr); gap: 20px; } }

details { background: var(--paper); border: 2px solid var(--line); border-radius: 18px; padding: 0 18px; margin-top: 10px; }
summary { cursor: pointer; font: 18px var(--head); padding: 15px 0; }
details p { margin: 0 0 16px; font-size: 15px; }

.foot { background: var(--cocoa); color: #e8d6cc; font-size: 13px; padding: 30px 0 40px; }
.foot a { color: #ffd9a8; }
.foot .links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14.5px; margin-top: 0; }
.foot dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; }
.foot dt { color: #c4aca1; }
.foot dd { margin: 0; }
.toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: max-content; max-width: calc(100% - 28px); background: var(--cocoa); color: #fff; padding: 12px 20px; border-radius: 99px; font-size: 14.5px; text-align: center; z-index: 30; box-shadow: 0 10px 26px rgba(0,0,0,.3); }

/* 약관 화면 */
.doc { max-width: 780px; margin: 0 auto; padding: 24px 20px 60px; }
.doc section { padding: 20px 0; }
.doc h2 { font-size: 28px; }
.doc h3 { font-size: 19px; margin-top: 22px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--paper); }
.doc th, .doc td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.doc td:nth-child(2) { min-width: 4.6em; }
#terms td:nth-child(2) { white-space: nowrap; }
.draft { background: var(--blush); border: 2px solid var(--inju); border-radius: 14px; padding: 12px 16px; font-size: 14px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }
