/* 회원가입·로그인·마이페이지·관리자 공용 스타일 (랜딩페이지와 같은 토큰) */
:root {
  --bg: #F8F7F2; --surface: #FFFEFB; --ink: #222920; --muted: #586052; --line: #E2E2D8;
  --olive: #315439; --olive-ink: #FFFFFF; --olive-soft: #ECF0E5; --gold: #89591C; --gold-soft: #F4E7CC;
  --wrong: #B4442F; --wrong-soft: #F6E0DA;
  --font-display: "Noto Serif KR", "Batang", "AppleMyungjo", serif;
  --font-body: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --radius: 16px; --gutter: clamp(18px, 4vw, 32px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11150E; --surface: #1A2016; --ink: #EBEFE2; --muted: #A1AA95; --line: #2D3527;
    --olive: #9CBB5F; --olive-ink: #142008; --olive-soft: #243020; --gold: #E2AE50; --gold-soft: #3A2E17;
    --wrong: #EE8A73; --wrong-soft: #3D211B; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11150E; --surface: #1A2016; --ink: #EBEFE2; --muted: #A1AA95; --line: #2D3527;
  --olive: #9CBB5F; --olive-ink: #142008; --olive-soft: #243020; --gold: #E2AE50; --gold-soft: #3A2E17;
  --wrong: #EE8A73; --wrong-soft: #3D211B; color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 1rem; line-height: 1.65; word-break: keep-all; }
a { color: var(--olive); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.3; margin: 0; text-wrap: balance; }
p { margin: 0; }
[hidden] { display: none !important; }

.bar { background: var(--surface); border-bottom: 1px solid var(--line); }
.bar .inner { max-width: 1180px; margin-inline: auto; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.04em; text-decoration: none; color: var(--ink); }
.logo-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--olive); color: var(--olive-ink); }
.logo-mark svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.bar nav { display: flex; align-items: center; gap: 16px; font-size: .9rem; }
.bar nav a { color: var(--muted); text-decoration: none; font-weight: 600; }
.bar nav a:hover { color: var(--olive); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px; border: 0; border-radius: 9px;
  font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; background: var(--olive); color: var(--olive-ink); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.danger { background: var(--wrong); color: #fff; }
.btn.small { min-height: 34px; padding: 4px 12px; font-size: .85rem; }

/* 회원가입·로그인 카드 */
.auth { padding-block: clamp(32px, 7vw, 72px); padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.card { max-width: 460px; margin-inline: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 5vw, 40px); display: grid; gap: 22px; }
.card.wide { max-width: 640px; }
.card header { display: grid; gap: 6px; }
.card h1 { font-size: 1.75rem; }
.card header p { color: var(--muted); }
form.stack { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field > label, .field > .label { font-weight: 600; font-size: .92rem; }
.field .hint { font-size: .82rem; color: var(--muted); }
.field .opt { font-weight: 400; color: var(--muted); font-size: .82rem; }
input[type="email"], input[type="password"], input[type="text"], input[type="search"], select {
  font: inherit; width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); }
input:focus, select:focus { border-color: var(--olive); outline: none; box-shadow: 0 0 0 3px var(--olive-soft); }
.stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stages label { position: relative; display: grid; gap: 2px; padding: 12px 10px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; text-align: center; font-weight: 700; }
.stages label small { font-weight: 400; color: var(--muted); font-size: .75rem; }
.stages input { position: absolute; opacity: 0; pointer-events: none; }
.stages label:has(input:checked) { border-color: var(--olive); background: var(--olive-soft); }
.stages label:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.check input { width: 18px; height: 18px; margin-top: 4px; accent-color: var(--olive); flex: none; }
.terms { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: grid; gap: 10px; }
.terms details { font-size: .82rem; color: var(--muted); }
.terms summary { cursor: pointer; }
.terms table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.terms th, .terms td { text-align: left; padding: 6px 8px; border-top: 1px solid var(--line); vertical-align: top; }
.msg { padding: 12px 14px; border-radius: 10px; font-size: .92rem; background: var(--olive-soft); }
.msg.error { background: var(--wrong-soft); color: var(--wrong); }
.alt { text-align: center; font-size: .92rem; color: var(--muted); }
@media (max-width: 420px) { .stages { grid-template-columns: minmax(0, 1fr); } }

/* 마이페이지 */
.section { display: grid; gap: 14px; padding-top: 22px; border-top: 1px solid var(--line); }
.section h2 { font-size: 1.2rem; }
.kv { display: grid; grid-template-columns: 7em minmax(0, 1fr); gap: 8px 14px; font-size: .95rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.badge { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: .76rem; font-weight: 700; background: var(--olive-soft); color: var(--olive); }
.badge.admin { background: var(--gold-soft); color: var(--gold); }
