:root {
  --bg: #f7f4ee;
  --panel: #ffffff;
  --text: #1e1530;
  --muted: #66707c;
  --line: #dde1e6;
  --accent: #2e1b4f;
  --accent-soft: #eeeaf6;
  --accent-text: #ffffff;
  --btn: #eef0f3;
  --btn-hover: #e2e6ea;
  --error: #b91c1c;
  --error-soft: #fdecec;
  --warn: #9a5b00;
  --warn-soft: #fff4e0;
  --ok: #2e1b4f;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #120b1f;
    --panel: #1b1230;
    --text: #eee9f6;
    --muted: #9aa3ad;
    --line: #2f353c;
    --accent: #d4b678;
    --accent-soft: #2a2140;
    --accent-text: #1a1028;
    --btn: #2a2f36;
    --btn-hover: #343a42;
    --error: #f87171;
    --error-soft: #3a2224;
    --warn: #fbbf24;
    --warn-soft: #3a2f1c;
    --ok: #4ade80;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
}
a { color: var(--accent); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.top { display: flex; align-items: center; justify-content: space-between; max-width: 460px; margin: 0 auto; padding: 18px 16px 0; }
.brand { font-weight: 700; font-size: 18px; color: var(--text); text-decoration: none; letter-spacing: -.2px; }
.brand span { font-weight: 400; color: var(--muted); font-size: 14px; margin-left: 6px; }

main { max-width: 460px; margin: 0 auto; padding: 16px 16px 60px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 24px 20px; margin-bottom: 14px; }
h1 { font-size: 22px; margin: 0 0 6px; letter-spacing: -.3px; }
h2 { font-size: 16px; margin: 0 0 12px; }
.lead { color: var(--muted); margin: 0 0 20px; font-size: 14px; }

.field { margin-bottom: 14px; }
.field > label, .field > .label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.field .hint.ok { color: var(--ok); }
.field .hint.bad { color: var(--error); }
input[type=text], input[type=password], input[type=email], input[type=tel] {
  width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--text); font: inherit;
}
input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
input:disabled { opacity: .6; }
.row { display: flex; gap: 8px; }
.row > input { flex: 1 1 auto; min-width: 0; }
.row > .btn { flex: 0 0 auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 16px;
  border: 1px solid var(--line); background: var(--btn); color: var(--text); border-radius: 8px;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--btn-hover); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.block { width: 100%; }
.btn.danger { color: var(--error); }
.btn.small { height: 34px; padding: 0 12px; font-size: 13px; }
.btn.google { background: #fff; color: #1f1f1f; border-color: #dadce0; }
.btn.kakao { background: #FEE500; color: #191600; border-color: #FEE500; }

.links { display: flex; justify-content: center; gap: 6px 16px; flex-wrap: wrap; margin-top: 16px; font-size: 14px; }
.links a { color: var(--muted); text-decoration: none; }
.links a:hover { color: var(--text); text-decoration: underline; }

.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 20px 0 14px; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.social { display: grid; gap: 8px; }

/* 동의 */
.agree { border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; margin: 6px 0 18px; }
.agree label { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 14px; cursor: pointer; }
.agree label.all { font-weight: 700; border-bottom: 1px solid var(--line); }
.agree input { width: 18px; height: 18px; accent-color: var(--accent); flex: 0 0 auto; }
.agree .req { color: var(--accent); font-size: 12px; font-weight: 700; }
.agree a { margin-left: auto; font-size: 12px; color: var(--muted); }

/* 알림 */
.notice { padding: 12px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.error { background: var(--error-soft); color: var(--error); }
.notice.info { background: var(--accent-soft); color: var(--text); }
.form-error { color: var(--error); font-size: 14px; min-height: 0; margin: -4px 0 12px; }
.form-error:empty { display: none; }

/* 내 정보 */
.info { width: 100%; border-collapse: collapse; font-size: 14px; }
.info th { text-align: left; color: var(--muted); font-weight: 500; width: 96px; padding: 10px 0; vertical-align: top; }
.info td { padding: 10px 0; border-bottom: 1px solid var(--line); }
.info tr:last-child td { border-bottom: 0; }
.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 10px; background: var(--btn); color: var(--muted); margin-left: 6px; }
.tag.on { background: var(--accent-soft); color: var(--accent); }
details.section { border-top: 1px solid var(--line); padding: 4px 0; }
details.section:first-of-type { border-top: 0; }
details.section > summary { cursor: pointer; padding: 12px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
details.section > summary::after { content: "＋"; color: var(--muted); }
details.section[open] > summary::after { content: "－"; }
details.section > div { padding: 4px 0 14px; }

.result { text-align: center; padding: 8px 0 4px; }
.result .big { font-size: 22px; font-weight: 700; margin: 6px 0; letter-spacing: .5px; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(16px); opacity: 0; pointer-events: none;
  background: #1e1530; color: #fff; padding: 11px 18px; border-radius: 8px; transition: .2s; z-index: 50;
  max-width: calc(100vw - 32px); font-size: 14px;
}
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.error { background: var(--error); }

@media (max-width: 480px) {
  .card { padding: 20px 16px; border-radius: 10px; }
}

/* 브랜드 로고 (r0.5.0) */
.top .brand { display: inline-flex; align-items: center; gap: 8px; }
.top .brand img { display: block; height: auto; }
.top .brand picture { display: block; }
