/* ==========================================================================
   외주본에 없는 페이지 공용 (v2) — 로그인 · 소개 · 세트 이벤트 · 주문 조회 · 개인정보 · 프로필 완성 · 결제 완료/실패.
   본문은 기준 페이지에서 바이트 그대로 가져오므로(tools/pages/raw_pages.py) 그 본문이 쓰던 이름(.wrap·.btn·.field·
   .auth-*·.story·.pillar·var(--fg)…)을 외주본 언어(흑백·15px·직각)로 다시 정의한다. 각 페이지 머리 <style> 은 그대로.
   ========================================================================== */

/* ── 본 사이트 CSS 변수 — 본문/머리 <style> 안의 var(--…) 가 계속 동작하도록, 값만 외주본 팔레트로 ── */
:root {
    --bg: #ffffff;
    --bg-2: #f7f7f5;
    --bg-3: #eeeeee;
    --fg: #111111;
    --fg-dim: #555555;
    --fg-mute: #999999;
    --line: #e5e5e5;
    --line-strong: #cccccc;
    --accent: #111111;
    --accent-2: #111111;
    --muted: #999999;
    --max: 1600px;
    --pad: 3.8%;
    --gutter: 3.8%;
    --header-h: var(--wm-header-h, 88px);
    --bar-h: 38px;
    --easing: cubic-bezier(0.2, 0.7, 0.2, 1);
    --overlay: rgba(0, 0, 0, 0.45);
    --hover-tint: rgba(0, 0, 0, 0.06);
}
[data-theme="dark"] {
    --bg: #111111;
    --bg-2: #161616;
    --bg-3: #1c1c1c;
    --fg: #eeeeee;
    --fg-dim: #bbbbbb;
    --fg-mute: #888888;
    --line: #2a2a2a;
    --line-strong: #444444;
    --accent: #eeeeee;
    --accent-2: #eeeeee;
    --muted: #888888;
    --overlay: rgba(0, 0, 0, 0.6);
    --hover-tint: rgba(255, 255, 255, 0.08);
}

/* ── 틀·글자 ─────────────────────────────────────────── */
.wm-legacy { font-size: 15px; line-height: 1.6; }
.wm-legacy .wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: max(var(--pad), 16px); }
.wm-legacy h1 { margin: 13px 0 17px; font-size: 40px; font-weight: 700; line-height: 1.1; letter-spacing: -1.2px; }
.wm-legacy h2 { font-size: 28px; font-weight: 650; letter-spacing: -0.6px; }
.wm-legacy h3 { font-size: 20px; font-weight: 600; }
.wm-legacy p { margin: 0; }
.wm-legacy .lead,
.wm-legacy .sub { font-size: 15px; line-height: 1.8; color: #777; }
.wm-legacy .text-mute { color: #999; }
.wm-legacy .text-dim { color: #555; }
.wm-legacy .mt-8 { margin-top: 8px; }
.wm-legacy .mt-16 { margin-top: 16px; }
.wm-legacy .mt-24 { margin-top: 24px; }
.wm-legacy .mt-40 { margin-top: 40px; }
.wm-legacy .hidden { display: none !important; }
.wm-legacy .divider { border-top: 1px solid #ddd; }
.wm-legacy a { color: inherit; }

/* ── 버튼 ─────────────────────────────────────────── */
.wm-legacy .btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 28px; border: 1px solid #171717; font-size: 15px; font-weight: 500; text-align: center; }
.wm-legacy .btn-primary { background: #171717; color: #fff; }
.wm-legacy .btn-primary:hover { background: #333; border-color: #333; }
.wm-legacy .btn-ghost { background: transparent; color: #111; border-color: #ccc; }
.wm-legacy .btn-ghost:hover { border-color: #111; }
.wm-legacy .btn-block { width: 100%; }
.wm-legacy .btn-lg { min-height: 56px; }
.wm-legacy .btn:disabled { opacity: 0.6; cursor: wait; }

/* ── 입력칸 ────────────────────────────────────────── */
.wm-legacy .field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.wm-legacy .field label { font-size: 14px; color: #777; }
.wm-legacy .field input,
.wm-legacy .field select,
.wm-legacy .field textarea { width: 100%; height: 48px; padding: 0 12px; border: 1px solid #ddd; border-radius: 0; background: #fff; color: #171717; font: inherit; font-size: 15px; }
.wm-legacy .field textarea { height: auto; min-height: 120px; padding: 12px; resize: vertical; }
.wm-legacy .field input:focus,
.wm-legacy .field select:focus,
.wm-legacy .field textarea:focus { outline: 0; border-color: #171717; }
.wm-legacy .field input[readonly] { background: #fafafa; }
.wm-legacy .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wm-legacy .coupon-msg { min-height: 1.6em; font-size: 13px; color: #999; }
.wm-legacy .coupon-msg[data-tone="ok"] { color: #2a8f4f; }
.wm-legacy .coupon-msg[data-tone="err"] { color: #b34635; }

/* ── 로그인/회원가입 · 주문 조회 (auth-card) ─────────────────── */
.wm-legacy .auth-page { padding: 40px 0 90px; }
.wm-legacy .auth-card { max-width: 460px; margin: 0 auto; padding: 36px; border: 1px solid #e5e5e5; background: #fff; }
.wm-legacy .auth-card h1 { margin: 0 0 8px; font-size: 28px; }
.wm-legacy .auth-card .sub { margin-bottom: 26px; font-size: 14px; }
.wm-legacy .auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 24px; border-bottom: 1px solid #ddd; }
.wm-legacy .auth-tabs button { margin-bottom: -1px; padding: 14px 0; border-bottom: 2px solid transparent; color: #888; font-size: 15px; }
.wm-legacy .auth-tabs button.active { color: #111; border-bottom-color: #111; font-weight: 600; }
.wm-legacy .auth-form .field { display: block; margin-bottom: 16px; }
.wm-legacy .auth-form label { display: block; margin-bottom: 8px; font-size: 14px; color: #777; }
.wm-legacy .auth-form input[type="email"],
.wm-legacy .auth-form input[type="password"],
.wm-legacy .auth-form input[type="text"],
.wm-legacy .auth-form input[type="tel"],
.wm-legacy .auth-select { width: 100%; height: 48px; padding: 0 12px; border: 1px solid #ddd; border-radius: 0; background: #fff; color: #171717; font: inherit; font-size: 15px; }
.wm-legacy .auth-form input:focus,
.wm-legacy .auth-select:focus { outline: 0; border-color: #171717; }
.wm-legacy .auth-select { cursor: pointer; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.wm-legacy .auth-form .hint { margin-top: 6px; font-size: 13px; color: #999; }
.wm-legacy .auth-form .hint[data-tone="ok"] { color: #2a8f4f; }
.wm-legacy .auth-form .hint[data-tone="err"] { color: #b34635; }
.wm-legacy .auth-soon { margin: -6px 0 16px; padding: 12px 14px; border: 1px solid #ddd; border-left: 3px solid #171717; background: #f7f7f5; font-size: 13px; line-height: 1.6; color: #555; }
.wm-legacy .auth-form .input-row { display: flex; gap: 8px; align-items: stretch; }
.wm-legacy .auth-form .input-row input { flex: 1; min-width: 0; }
.wm-legacy .auth-form .input-row .btn { flex: none; min-height: 48px; padding: 0 14px; font-size: 13px; white-space: nowrap; }
.wm-legacy .auth-form .checkbox { display: flex; align-items: center; gap: 8px; margin: 16px 0; font-size: 13px; color: #555; }
.wm-legacy .auth-form .checkbox input { accent-color: #171717; width: 16px; height: 16px; }
.wm-legacy .auth-form .err { margin-bottom: 16px; padding: 10px 12px; border: 1px solid #e0b4ac; background: #fbf1ef; color: #b34635; font-size: 13px; }
.wm-legacy .auth-form .submit-row { margin-top: 22px; }
.wm-legacy .social-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 16px; color: #999; }
.wm-legacy .social-divider::before,
.wm-legacy .social-divider::after { content: ""; flex: 1; height: 1px; background: #e5e5e5; }
.wm-legacy .social-divider span { font-size: 12px; letter-spacing: 1px; white-space: nowrap; }
.wm-legacy .social-buttons { display: flex; flex-direction: column; gap: 10px; }
.wm-legacy .social-btn { position: relative; display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; height: 52px; border: 1px solid #ddd; font: inherit; font-size: 15px; font-weight: 500; }
.wm-legacy .social-btn svg { flex: none; width: 19px; height: 19px; }
.wm-legacy .social-btn:not(.is-soon):hover { filter: brightness(0.94); }
.wm-legacy .social-btn--kakao { background: #fee500; color: #191600; border-color: #fee500; }
.wm-legacy .social-btn--naver { background: #03c75a; color: #fff; border-color: #03c75a; }
.wm-legacy .social-btn.is-soon,
.wm-legacy .social-btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.wm-legacy .social-soon { position: absolute; top: 50%; right: 14px; padding: 3px 7px; transform: translateY(-50%); background: #0002; font-size: 10px; font-style: normal; letter-spacing: 1px; }

/* ── 소개(about): 스토리 · 기둥 · 흐르는 띠 · 제작 사진 ─────────── */
.wm-legacy .story { padding: 60px 0; }
.wm-legacy .story h1 { font-size: clamp(40px, 7vw, 88px); line-height: 1; letter-spacing: -2px; }
.wm-legacy .story__lead { max-width: 640px; margin: 32px 0 56px; font-size: 17px; line-height: 1.8; color: #555; }
.wm-legacy .story__pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.wm-legacy .pillar { display: flex; flex-direction: column; justify-content: space-between; aspect-ratio: 1; padding: 32px; background: #f7f7f5; }
.wm-legacy .pillar h3 { font-size: clamp(22px, 2.6vw, 36px); line-height: 1.1; letter-spacing: -1px; }
.wm-legacy .pillar h3 small { font-family: inherit !important; font-size: 12px !important; letter-spacing: 1px !important; color: #999 !important; }
.wm-legacy .pillar p { font-size: 14px; line-height: 1.7; color: #555; }
.wm-legacy .pillar > small { font-size: 13px; letter-spacing: 2px; color: #999; }
.wm-legacy .scroll-strip { display: flex; gap: 56px; overflow: hidden; padding: 28px 0; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; white-space: nowrap; }
.wm-legacy .scroll-strip__inner { display: inline-flex; gap: 56px; padding-right: 56px; animation: wm-marquee 40s linear infinite; }
.wm-legacy .scroll-strip span { font-size: clamp(32px, 5vw, 72px); font-weight: 700; letter-spacing: -1px; text-transform: uppercase; }
.wm-legacy .scroll-strip .dot { display: inline-block; width: 14px; height: 14px; margin: 0 24px; border-radius: 50%; background: #111; vertical-align: middle; }
@keyframes wm-marquee { to { transform: translateX(-100%); } }
.wm-legacy .grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.wm-legacy .process-gallery { columns: 3; column-gap: 18px; margin-top: 60px; }
.wm-legacy .pg-item { position: relative; margin: 0 0 18px; overflow: hidden; background: #111; break-inside: avoid; }
.wm-legacy .pg-item img { display: block; width: 100%; height: auto; filter: grayscale(1) contrast(1.06); }
.wm-legacy .pg-item figcaption { position: absolute; bottom: 13px; left: 15px; z-index: 2; color: #fff; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; text-shadow: 0 1px 8px #0009; }
.wm-legacy .pg-item::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 55%, #0007); pointer-events: none; }
.wm-legacy .reveal { opacity: 1; clip-path: none; transform: none; }   /* 등장 애니메이션 없이 바로 보이게(스크립트 의존 제거) */
.wm-legacy .reveal img { transform: none; }

/* ── 프로필 완성 · 결제 완료/실패 본문 안 글자 ─────────────────── */
.wm-legacy .complete h1,
.wm-legacy .fail-page h1 { font-size: clamp(40px, 7vw, 72px); letter-spacing: -2px; }
.wm-legacy .receipt { text-align: left; }

@media (max-width: 767px) {
    .wm-legacy .story { padding: 36px 0; }
    .wm-legacy .story__pillars { grid-template-columns: 1fr; }
    .wm-legacy .pillar { aspect-ratio: auto; gap: 18px; padding: 24px; }
    .wm-legacy .grid-2 { grid-template-columns: 1fr; gap: 28px; }
    .wm-legacy .process-gallery { columns: 2; column-gap: 10px; }
    .wm-legacy .field-row { grid-template-columns: 1fr; }
    .wm-legacy .auth-card { padding: 26px 18px; }
    .wm-legacy h1 { font-size: 32px; }
}

/* ── 어두운 화면 ─────────────────────────────────────────── */
[data-theme="dark"] .wm-legacy .auth-card,
[data-theme="dark"] .wm-legacy .field input,
[data-theme="dark"] .wm-legacy .field select,
[data-theme="dark"] .wm-legacy .field textarea,
[data-theme="dark"] .wm-legacy .auth-form input[type="email"],
[data-theme="dark"] .wm-legacy .auth-form input[type="password"],
[data-theme="dark"] .wm-legacy .auth-form input[type="text"],
[data-theme="dark"] .wm-legacy .auth-form input[type="tel"],
[data-theme="dark"] .wm-legacy .auth-select { background: #161616; border-color: #333; color: #eee; }
[data-theme="dark"] .wm-legacy .field input[readonly] { background: #111; }
[data-theme="dark"] .wm-legacy .auth-tabs,
[data-theme="dark"] .wm-legacy .divider,
[data-theme="dark"] .wm-legacy .scroll-strip { border-color: #2a2a2a; }
[data-theme="dark"] .wm-legacy .auth-tabs button.active { color: #eee; border-bottom-color: #eee; }
[data-theme="dark"] .wm-legacy .btn-primary { background: #eee; color: #111; border-color: #eee; }
[data-theme="dark"] .wm-legacy .btn-primary:hover { background: #fff; border-color: #fff; }
[data-theme="dark"] .wm-legacy .btn-ghost { color: #eee; border-color: #555; }
[data-theme="dark"] .wm-legacy .pillar,
[data-theme="dark"] .wm-legacy .auth-soon { background: #1a1a19; }
[data-theme="dark"] .wm-legacy .auth-soon { border-color: #333; border-left-color: #eee; color: #bbb; }
[data-theme="dark"] .wm-legacy .scroll-strip .dot { background: #eee; }
[data-theme="dark"] .wm-legacy .text-dim,
[data-theme="dark"] .wm-legacy .lead,
[data-theme="dark"] .wm-legacy .sub,
[data-theme="dark"] .wm-legacy .story__lead,
[data-theme="dark"] .wm-legacy .pillar p { color: #bbb; }
[data-theme="dark"] .wm-legacy .auth-form .err { background: #2a1512; border-color: #5a2a24; color: #ff8a76; }
[data-theme="dark"] .wm-legacy .social-divider::before,
[data-theme="dark"] .wm-legacy .social-divider::after { background: #2a2a2a; }
