/* 두둥 web (doodoong.web.app). Tokens = HANDOFF §1 (C 구조 + 로즈). No build step. */
:root {
  --bg: #FAFAF7;
  --card: #FFFFFF;
  --text: #2E2E2E;
  --sub: #6B6B6B;
  --primary: #B8507A;
  --primary-press: #93405F;
  --on-primary: #FFFFFF;
  --line: #EFEDE8;
  --floor: #F3F2EE;
  --found: #FCF1F5;
  --found-line: #F2D9E3;
  --bubble: #F6E3EB;
  --shadow: 0 1px 2px rgba(40, 40, 40, .05), 0 6px 18px rgba(40, 40, 40, .04);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1C1B1A;
    --card: #282725;
    --text: #F2F1EE;
    --sub: #B5B2AC;
    --primary: #F29BB8;
    --primary-press: #F6B6CB;
    --on-primary: #1C1B1A;
    --line: #3A3835;
    --floor: #23221F;
    --found: #33262C;
    --found-line: #4A3540;
    --bubble: #3A2C32;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.2px;
}
a { color: var(--primary); }
a:hover { color: var(--primary-press); }
img { max-width: 100%; }

.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px; }

/* top bar */
.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; color: var(--text); text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.lang { font-size: 14px; font-weight: 700; color: var(--sub); text-decoration: none; padding: 6px 10px; border-radius: 10px; background: var(--floor); }

/* hero */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 20px 0 8px; }
.mascot { display: flex; flex-direction: column-reverse; align-items: center; gap: 2px; }
.mascot img { width: 160px; height: 160px; animation: bob 2.8s ease-in-out infinite; }
.say {
  position: relative; max-width: 100%;
  padding: 8px 14px; border-radius: 14px;
  background: var(--card); box-shadow: 0 2px 10px rgba(40, 40, 40, .08);
  font-size: 14px; font-weight: 800;
}
.say::after {
  content: ''; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; margin-left: -6px;
  background: var(--card); transform: rotate(45deg); border-radius: 0 0 3px 0;
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .mascot img { animation: none; } }
h1 { margin: 0; font-size: 26px; line-height: 1.3; font-weight: 800; letter-spacing: -0.6px; }
.lead { margin: 0; color: var(--sub); font-weight: 600; font-size: 15px; }

/* icon rows */
.card { background: var(--card); border-radius: 20px; box-shadow: var(--shadow); padding: 14px; margin: 16px 0; }
.row { display: flex; gap: 12px; align-items: center; padding: 10px 2px; }
.row + .row { border-top: 1px solid var(--line); }
.ic { width: 36px; height: 36px; flex-shrink: 0; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: var(--bubble); }
.ic svg { width: 18px; height: 18px; stroke: var(--primary); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.row b { font-weight: 800; }
.row span { font-weight: 600; font-size: 15px; }

/* buttons */
.btns { display: flex; flex-direction: column; gap: 10px; margin: 18px 0; }
.btn {
  height: 54px; border-radius: 18px; display: flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; font-size: 16px; font-weight: 800; border: 0; cursor: pointer; font-family: inherit;
}
.btn svg { width: 20px; height: 20px; fill: currentColor; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { color: var(--on-primary); background: var(--primary-press); }
.btn-outline { background: var(--card); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-outline:hover { color: var(--text); }
.btn-text { height: 44px; background: none; color: var(--sub); font-size: 14px; font-weight: 700; }
.btn-text:hover { color: var(--text); }

/* invite code */
.code-box { background: var(--found); border: 1px solid var(--found-line); border-radius: 18px; padding: 14px; text-align: center; }
.code-label { font-size: 13px; font-weight: 700; color: var(--sub); }
.code { font-size: 28px; font-weight: 800; letter-spacing: 3px; font-variant-numeric: tabular-nums; margin: 4px 0 8px; }
.copy { height: 40px; padding: 0 16px; border-radius: 12px; border: 0; background: var(--card); color: var(--text); font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: 10px; align-items: center; padding: 8px 0; font-weight: 600; font-size: 15px; }
.steps li::before {
  content: counter(s); width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%;
  background: var(--primary); color: var(--on-primary); font-size: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.note { font-size: 13px; font-weight: 600; color: var(--sub); text-align: center; margin: 6px 0; }
[hidden] { display: none !important; }

/* legal documents */
.doc { padding: 8px 0 24px; }
.doc h1 { font-size: 24px; margin: 8px 0 4px; }
.doc .meta { color: var(--sub); font-size: 14px; font-weight: 600; margin: 0 0 16px; }
.doc h2 { font-size: 18px; font-weight: 800; margin: 28px 0 8px; letter-spacing: -0.4px; }
.doc h3 { font-size: 16px; font-weight: 800; margin: 18px 0 6px; }
.doc p, .doc li { font-size: 15px; }
.doc ul { padding-left: 20px; margin: 6px 0; }
.doc li { margin: 4px 0; }
.summary { background: var(--found); border: 1px solid var(--found-line); border-radius: 18px; padding: 12px 14px; margin: 12px 0 8px; }
.summary .row { padding: 8px 0; }
.summary .row + .row { border-top-color: var(--found-line); }
.summary .ic { background: var(--card); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 8px 6px; border-top: 1px solid var(--line); }
.tbl th { font-weight: 800; color: var(--sub); font-size: 13px; }
.tbl-wrap { overflow-x: auto; }
.toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; padding: 0; list-style: none; }
.toc a { display: inline-block; font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 10px; background: var(--floor); color: var(--text); text-decoration: none; }

/* footer */
.foot { border-top: 1px solid var(--line); margin-top: 24px; padding: 18px 0 36px; font-size: 13px; color: var(--sub); font-weight: 600; }
.foot nav { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 8px; }
.foot a { color: var(--sub); }
