/* ==========================================================================
   testgogo — 공통 베이스
   디자인 토큰 · 리셋 · 버튼 · 토스트 · 푸터 · 정책 문서
   모든 페이지가 이 파일을 먼저 로드합니다.
   ========================================================================== */

:root {
  --accent: #F5A524;
  --bg1: #FFF7E8;
  --bg2: #FFE7BC;

  --ink: #24201C;
  --ink-soft: #6B625A;
  --line: #EBE4DA;
  --card: #FFFFFF;

  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 6px 24px rgba(60, 45, 25, .08);
  --shadow-lg: 0 14px 40px rgba(60, 45, 25, .14);

  --ease: cubic-bezier(.22, .8, .3, 1);
  --app-max: 480px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100dvh;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo',
               'Malgun Gothic', 'Noto Sans KR', system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(170deg, var(--bg1) 0%, var(--bg2) 100%);
  background-attachment: fixed;
  line-height: 1.6;
  word-break: keep-all;
  transition: background .6s var(--ease);
  display: flex;
  justify-content: center;
}

.app {
  width: 100%;
  max-width: var(--app-max);
  min-height: 100dvh;
  padding: 20px 20px calc(28px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

/* ── 버튼 ───────────────────────────────────────────────────────────────── */
.btn {
  font: inherit;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  transition: transform .12s var(--ease), box-shadow .2s var(--ease), background .2s;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 38%, transparent);
}
.btn-lg { padding: 17px 20px; font-size: 17px; border-radius: 18px; }

.btn-ghost {
  background: rgba(255, 255, 255, .7);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  font-size: 14px;
  padding: 12px 14px;
}

/* ── 공통 조각 ──────────────────────────────────────────────────────────── */
.eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 800; letter-spacing: .12em;
  color: var(--accent);
  background: rgba(255, 255, 255, .8);
  padding: 6px 12px; border-radius: 999px;
}

.chip {
  font-size: 12.5px; font-weight: 600; color: var(--ink-soft);
  background: rgba(255, 255, 255, .75);
  border: 1px solid var(--line);
  padding: 6px 11px; border-radius: 999px;
}

/* ── 사이트 헤더 ────────────────────────────────────────────────────────── */
.site-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 0 18px;
}
.brand {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 17px; font-weight: 900; letter-spacing: -.02em;
  color: var(--ink); text-decoration: none;
}
.brand-mark {
  width: 28px; height: 28px; border-radius: 9px;
  background: var(--accent);
  display: grid; place-items: center;
  font-size: 15px;
}
.site-head .btn-ghost { padding: 8px 12px; font-size: 12.5px; }

/* ── 푸터 ───────────────────────────────────────────────────────────────── */
.site-foot {
  margin-top: auto; padding-top: 26px;
  text-align: center; font-size: 11.5px; color: var(--ink-soft);
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  opacity: .75;
}
.site-foot a { color: inherit; text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }

/* ── 토스트 ─────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 28px;
  transform: translate(-50%, 20px);
  background: rgba(35, 30, 25, .93);
  color: #fff;
  font-size: 13.5px; font-weight: 600;
  padding: 11px 18px; border-radius: 999px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s var(--ease);
  z-index: 50;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── 광고 슬롯 ──────────────────────────────────────────────────────────── */
.ad-slot { margin: 16px 0; text-align: center; overflow: hidden; }
.ad-slot[hidden] { display: none; }

/* ── 정책 문서 ──────────────────────────────────────────────────────────── */
.doc { background: var(--card); border-radius: var(--radius); padding: 24px 20px; box-shadow: var(--shadow); }
.doc h1 { font-size: 22px; font-weight: 900; margin-bottom: 6px; }
.doc .updated { font-size: 12px; color: var(--ink-soft); margin-bottom: 20px; }
.doc h2 { font-size: 16px; font-weight: 800; margin: 22px 0 8px; }
.doc p, .doc li { font-size: 14px; color: #4A4239; line-height: 1.8; }
.doc ul { padding-left: 18px; margin: 6px 0; }
.doc a { color: var(--accent); }
.doc-back { display: inline-block; margin-top: 24px; font-size: 14px; font-weight: 700; color: var(--ink-soft); text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
