/* 옷만들기 도면 메이커 — 대문·안내 페이지 공통 스타일 (도구 화면 app.html은 자체 스타일 사용)
   크림 바탕 + 레몬·코랄·민트·라일락 포인트, 둥근 카드, 알약 버튼 */
:root {
  --bg: #fbf8f2;
  --paper: #ffffff;
  --ink: #17171c;
  --ink-soft: #5e5e6a;
  --rule: #ebe5d9;
  --lemon: #ffe14d;
  --coral: #ff6b4a;
  --mint: #3dd6ae;
  --lilac: #b8a6ff;
  --sky: #8fd0ff;
  --lemon-soft: #fff6c7;
  --coral-soft: #ffe3da;
  --mint-soft: #d7f7ec;
  --lilac-soft: #ece6ff;
  --sky-soft: #def1ff;
  --mark: #e5482a;
  --dark: #17171c;          /* 바닥·띠 */
  --dark-ink: #f4f1ea;
  /* 예전 이름 (인라인 스타일 호환) */
  --mat: var(--dark); --mat-deep: var(--ink); --mat-ink: var(--dark-ink); --tape: var(--lemon);
  --font: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(23,23,28,.04), 0 8px 24px rgba(23,23,28,.06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #121216; --paper: #1c1c22; --ink: #f2f0eb; --ink-soft: #a6a6b0; --rule: #2b2b33;
    --lemon-soft: #3a3418; --coral-soft: #3b231d; --mint-soft: #173229; --lilac-soft: #29243d; --sky-soft: #1a2c3a; --dark: #0b0b0e; }
}
:root[data-theme="dark"] { --bg: #121216; --paper: #1c1c22; --ink: #f2f0eb; --ink-soft: #a6a6b0; --rule: #2b2b33;
  --lemon-soft: #3a3418; --coral-soft: #3b231d; --mint-soft: #173229; --lilac-soft: #29243d; --sky-soft: #1a2c3a; --dark: #0b0b0e; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink); line-height: 1.7; word-break: keep-all; overflow-wrap: break-word; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } html { scroll-behavior: auto; } }

/* ---------- 머리: 밝은 바탕 + 색 방울 ---------- */
header.mat { position: relative; overflow: hidden; isolation: isolate; color: var(--ink); background: var(--bg); }
header.mat::before, header.mat::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(60px); opacity: .55; pointer-events: none; }
header.mat::before { width: 460px; height: 460px; right: -120px; top: -140px; background: var(--lemon); }
header.mat::after { width: 380px; height: 380px; left: -140px; bottom: -180px; background: var(--lilac); opacity: .4; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 16px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; text-decoration: none; letter-spacing: -0.03em; }
.logo img { width: 30px; height: 30px; }
.logo small { font-size: 12px; font-weight: 600; color: var(--ink-soft); letter-spacing: 0; margin-left: -2px; }
@media (max-width: 420px) { .logo small { display: none; } }
.nav { display: flex; gap: 4px; flex-wrap: wrap; font-size: 14px; font-weight: 600; background: color-mix(in srgb, var(--paper) 70%, transparent); border: 1px solid var(--rule); border-radius: 999px; padding: 4px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.nav a { text-decoration: none; padding: 6px 14px; border-radius: 999px; transition: background .15s; }
.nav a:hover { background: var(--lemon-soft); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--bg); }

.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; padding-top: 44px; padding-bottom: 72px; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 6px 14px 6px 8px; background: var(--paper); border: 1px solid var(--rule); border-radius: 999px; font-weight: 700; font-size: 14px; box-shadow: var(--shadow); }
.hero .eyebrow::before { content: "✂"; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--coral); color: #fff; font-size: 13px; }
.hero h1 { font-size: clamp(76px, 13vw, 140px); line-height: 1; margin: 0; letter-spacing: -0.06em; font-weight: 800; }
.hero h1 .h1-sub { display: block; font-size: clamp(24px, 3.4vw, 36px); line-height: 1.25; letter-spacing: -0.04em; margin-top: 10px; }
.name-tip { font-weight: 800; text-decoration: underline wavy var(--coral); text-underline-offset: 5px; }
.hero h1 .tape { display: block; height: 18px; margin-top: 18px; max-width: 300px; border-radius: 999px; transform: rotate(-2deg);
  background: var(--lemon) repeating-linear-gradient(90deg, rgba(23,23,28,.55) 0 1.5px, transparent 1.5px 10px) bottom / 100% 7px no-repeat; }
.hero .lead { font-size: clamp(17px, 2.2vw, 20px); margin: 22px 0 0; color: var(--ink); }
.hero .lead strong { background: linear-gradient(transparent 62%, var(--lemon) 62%); padding: 0 2px; }
.hero .sub { font-size: 14px; color: var(--ink-soft); margin: 12px 0 0; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 24px; border-radius: 999px; font-weight: 700; font-size: 16px; text-decoration: none; background: var(--ink); color: var(--bg); border: 2px solid var(--ink); transition: transform .15s, box-shadow .15s; }
.btn::after { content: "→"; transition: transform .15s; }
.btn:hover { transform: translateY(-2px); box-shadow: 4px 4px 0 var(--coral); }
.btn:hover::after { transform: translateX(3px); }
.btn.ghost { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.btn.ghost::after { content: none; }
.btn.ghost:hover { box-shadow: 4px 4px 0 var(--lemon); }
.hero figure { position: relative; margin: 0; background: var(--paper); border-radius: 20px; padding: 10px; border: 1px solid var(--rule); box-shadow: 0 30px 60px -20px rgba(23,23,28,.35); transform: rotate(1.5deg); transition: transform .3s; }
.hero figure:hover { transform: rotate(0) scale(1.01); }
.hero figure::before { content: "A4 한 장"; position: absolute; left: -18px; top: -18px; z-index: 1; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--coral); color: #fff; font-weight: 800; font-size: 15px; transform: rotate(-12deg); box-shadow: 0 8px 20px rgba(255,107,74,.4); }
.hero figure img { display: block; border-radius: 12px; }
.hero figcaption { font-size: 12px; color: var(--ink-soft); text-align: center; padding-top: 8px; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; padding-top: 24px; padding-bottom: 48px; gap: 36px; } .hero figure { transform: none; } .hero figure::before { left: auto; right: -6px; width: 70px; height: 70px; font-size: 13px; } }

/* ---------- 본문 ---------- */
main section { padding-block: 64px; }
h2 { font-size: clamp(26px, 3.8vw, 38px); line-height: 1.25; margin: 0 0 8px; letter-spacing: -0.04em; font-weight: 800; }
h2 + .desc { color: var(--ink-soft); margin: 0 0 32px; font-size: 17px; }
h3 { font-size: 18px; margin: 0 0 6px; letter-spacing: -0.02em; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; background: var(--paper); border: 1px solid var(--rule); border-radius: 22px; padding: 22px; counter-increment: s; transition: transform .2s; }
.steps li:hover { transform: translateY(-4px); }
.steps li::before { content: counter(s, decimal-leading-zero); display: block; font-size: 40px; font-weight: 800; line-height: 1; letter-spacing: -0.04em; margin-bottom: 14px; color: var(--ink);
  width: fit-content; padding: 6px 10px; border-radius: 12px; background: var(--lemon); }
.steps li:nth-child(2)::before { background: var(--mint); }
.steps li:nth-child(3)::before { background: var(--lilac); }
.steps li:nth-child(4)::before { background: var(--coral); color: #fff; }
.steps p, .cards p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--paper); border: 1px solid var(--rule); border-radius: 22px; padding: 24px; transition: transform .2s, box-shadow .2s; }
.cards .card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .ic { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .02em; margin-bottom: 12px; padding: 4px 12px; border-radius: 999px; background: var(--lemon-soft); color: var(--ink); }
.cards .card:nth-child(5n+2) .ic { background: var(--mint-soft); }
.cards .card:nth-child(5n+3) .ic { background: var(--lilac-soft); }
.cards .card:nth-child(5n+4) .ic { background: var(--coral-soft); }
.cards .card:nth-child(5n+5) .ic { background: var(--sky-soft); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } .cards { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

.persona { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.persona .card { display: flex; flex-direction: column; border: 0; padding: 30px; }
.persona .card:nth-child(1) { background: var(--lemon-soft); }
.persona .card:nth-child(2) { background: var(--lilac-soft); }
.persona .card .ic { background: var(--paper); }
.persona ol { margin: 12px 0 20px; padding-left: 20px; color: var(--ink-soft); font-size: 15px; }
.persona ol li { margin: 4px 0; }
.persona .btn { align-self: flex-start; margin-top: auto; }
.btn.small { padding: 10px 18px; font-size: 14px; }
@media (max-width: 860px) { .persona { grid-template-columns: 1fr; } }
.faq details { background: var(--paper); border: 1px solid var(--rule); border-radius: 18px; padding: 16px 20px; margin-bottom: 10px; transition: background .2s; }
.faq details[open] { background: var(--mint-soft); border-color: transparent; }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--bg); font-weight: 700; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 10px 0 0; color: var(--ink-soft); }

.band { position: relative; overflow: hidden; isolation: isolate; background: var(--coral); color: #fff; border-radius: 28px; padding: 40px; display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.band::before { content: ""; position: absolute; z-index: -1; right: -60px; top: -80px; width: 280px; height: 280px; border-radius: 50%; background: var(--lemon); opacity: .9; }
.band::after { content: ""; position: absolute; z-index: -1; right: 180px; bottom: -120px; width: 200px; height: 200px; border-radius: 50%; background: var(--lilac); opacity: .8; }
.band h2 { margin: 0; color: #fff; }
.band .btn { background: var(--ink); color: #fff; border-color: var(--ink); }
.band .btn:hover { box-shadow: 4px 4px 0 #fff; }
.note { font-size: 14px; color: var(--ink-soft); }

/* ---------- 글 페이지 (작성법·소개·정책) ---------- */
.page-head { padding-top: 28px; padding-bottom: 44px; }
.page-head h1 { font-size: clamp(32px, 5vw, 48px); margin: 0; line-height: 1.2; letter-spacing: -0.045em; font-weight: 800; }
.page-head p { margin: 12px 0 0; color: var(--ink-soft); font-size: 17px; }
.article { max-width: 760px; margin: 0 auto; padding: 40px 16px 64px; }
.article h2 { font-size: 26px; margin: 52px 0 12px; display: flex; align-items: center; gap: 10px; }
.article h2::before { content: ""; flex: none; width: 10px; height: 26px; border-radius: 999px; background: var(--coral); }
.article .band h2::before { content: none; }
.article h3 { margin: 28px 0 6px; }
.article p, .article li { font-size: 16px; }
.article li::marker { color: var(--coral); font-weight: 700; }
.article table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 16px 0; font-size: 14px; background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; }
.article th, .article td { border-bottom: 1px solid var(--rule); padding: 10px 12px; text-align: left; vertical-align: top; }
.article tr:last-child th, .article tr:last-child td { border-bottom: 0; }
.article th { background: var(--lemon-soft); white-space: nowrap; }
.table-scroll { overflow-x: auto; }
.toc { background: var(--paper); border: 1px solid var(--rule); border-radius: 18px; padding: 16px 22px; }
.toc ol { margin: 6px 0 0; padding-left: 20px; }
.callout { border: 0; background: var(--lemon-soft); padding: 14px 18px; border-radius: 16px; margin: 20px 0; }
.updated { font-size: 14px; color: var(--ink-soft); }
.kbd { font-weight: 700; color: var(--mark); }

/* ---------- 광고 자리: 설정 전에는 숨김, 설정되면 site.js가 .on 추가 ---------- */
.ad-slot { display: none; }
.ad-slot.on { display: block; margin: 8px auto; padding: 8px 16px; min-height: 100px; max-width: 1120px; }
.ad-slot.on::before { content: "광고"; display: block; font-size: 11px; color: var(--ink-soft); margin-bottom: 4px; }

/* ---------- 바닥 ---------- */
footer.mat { background: var(--dark); color: var(--dark-ink); border-radius: 28px 28px 0 0; margin-top: 24px; }
.foot { padding-block: 36px 44px; font-size: 14px; }
.foot .links { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.foot .links a { text-decoration: none; padding: 5px 12px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; transition: background .15s, color .15s; }
.foot .links a:hover { background: var(--lemon); color: #17171c; border-color: var(--lemon); }
.foot p { margin: 4px 0; opacity: .65; font-size: 13px; }
