/* webi_app — 공용 스타일 (accent/theme 변수 주입 기반) */
:root {
  --accent: #3b82f6;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #f1f3f8;
  --border: #e5e8ef;
  --text: #1a1d24;
  --text-soft: #5b6472;
  --text-faint: #8a93a3;
  --radius: 14px;
  --maxw: 860px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 6px 20px rgba(16,24,40,.06);
}
:root[data-theme="dark"] {
  --bg: #0a0b10;
  --surface: #12141c;
  --surface-2: #171a24;
  --border: #232734;
  --text: #e7eaf0;
  --text-soft: #aab2c2;
  --text-faint: #6b7486;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.35);
}

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Noto Sans KR', 'Malgun Gothic', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  padding: 0 16px 72px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; }

/* ── Top bar ── */
.topbar {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.topbar .brand {
  font-weight: 800;
  letter-spacing: .3px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar .brand .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}
.topbar .crumbs { color: var(--text-faint); font-size: .9rem; }
.topbar .crumbs a { color: var(--text-soft); }
.topbar .spacer { flex: 1; }

/* ── Hero (landing) ── */
.hero {
  text-align: center;
  padding: 56px 0 32px;
}
.hero .icon {
  width: 96px; height: 96px; border-radius: 22px;
  margin: 0 auto 20px;
  display: grid; place-items: center;
  font-size: 2.4rem; font-weight: 900; color: #fff;
  background: var(--accent);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 45%, transparent);
}
.hero h1 { font-size: 2.1rem; font-weight: 900; letter-spacing: -.5px; text-wrap: balance; }
.hero .tagline { color: var(--text-soft); font-size: 1.05rem; margin-top: 8px; text-wrap: balance; }
.hero .pkg { color: var(--text-faint); font-size: .82rem; font-family: ui-monospace, Menlo, monospace; margin-top: 10px; }

/* ── Download section (store badges + QR) ── */
.dl-wrap {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 28px; justify-content: space-between;
}
.dl-badges { display: flex; flex-direction: column; gap: 12px; }
.badge-link {
  display: inline-block; line-height: 0;
  transition: transform .12s ease, opacity .12s ease;
}
.badge-link:hover { transform: translateY(-1px); opacity: .88; text-decoration: none; }
.badge-link img { display: block; height: 52px; width: auto; }
.dl-soon { color: var(--text-soft); font-size: .92rem; margin: 4px 0; }
.dl-qr { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-left: auto; }
.dl-qr img {
  display: block; width: 128px; height: 128px;
  background: #fff; padding: 8px; border-radius: 10px;
  box-shadow: var(--shadow);
}
.dl-qr figcaption { font-size: .8rem; color: var(--text-faint); text-align: center; }

/* ── Sections / cards ── */
.section { margin-top: 44px; }
.section > h2 {
  font-size: 1.05rem; font-weight: 800; color: var(--text);
  padding-left: 12px; border-left: 3px solid var(--accent);
  margin-bottom: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 14px; }
.feature {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 18px;
}
.feature .k { font-weight: 700; margin-bottom: 4px; }
.feature .d { color: var(--text-soft); font-size: .9rem; }

/* ── App grid (hub home) ── */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 18px; margin-top: 28px; }
.app-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 12px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.app-card:hover { transform: translateY(-3px); text-decoration: none; box-shadow: 0 12px 34px rgba(16,24,40,.12); }
.app-card .row { display: flex; align-items: center; gap: 14px; }
.app-card .badge-icon {
  width: 54px; height: 54px; border-radius: 14px; flex-shrink: 0;
  display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 1.3rem;
}
.app-card .name { font-weight: 800; font-size: 1.1rem; color: var(--text); }
.app-card .tag { color: var(--text-soft); font-size: .88rem; }
.app-card .meta { color: var(--text-faint); font-size: .8rem; display:flex; gap:10px; flex-wrap:wrap; }

/* ── Policy document ── */
.doc-title { padding: 40px 0 8px; }
.doc-title h1 { font-size: 1.7rem; font-weight: 900; }
.doc-title .sub { color: var(--text-faint); font-size: .85rem; margin-top: 6px; }
.doc { margin-top: 20px; }
.doc h2 {
  font-size: 1.12rem; font-weight: 800; color: var(--accent);
  padding-left: 10px; border-left: 3px solid var(--accent);
  margin: 32px 0 10px;
}
.doc p, .doc li { color: var(--text-soft); font-size: .96rem; margin-bottom: 8px; }
.doc ul { padding-left: 22px; margin-bottom: 10px; }
.doc strong { color: var(--text); }
.doc .info {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 4px 22px; margin-top: 10px;
}
.doc table { width: 100%; border-collapse: collapse; }
.doc table th {
  text-align: left; color: var(--accent); font-weight: 700;
  padding: 10px 14px 10px 0; vertical-align: top; width: 34%; white-space: nowrap;
}
.doc table td { color: var(--text-soft); padding: 10px 0; border-top: 1px solid var(--border); }
.doc table tr:first-child th, .doc table tr:first-child td { border-top: 0; }
.doc .notice {
  background: color-mix(in srgb, #f0b400 12%, var(--surface));
  border: 1px solid color-mix(in srgb, #f0b400 40%, var(--border));
  border-radius: 10px; padding: 12px 16px; margin-top: 12px;
  color: var(--text); font-size: .9rem;
}

/* ── Policy nav chips ── */
.policy-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip {
  display:inline-flex; align-items:center; gap:6px;
  padding: 7px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600;
  background: var(--surface-2); color: var(--text-soft); border: 1px solid var(--border);
}
.chip:hover { text-decoration: none; color: var(--text); border-color: var(--accent); }
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Footer ── */
.foot {
  max-width: var(--maxw); margin: 56px auto 0;
  padding-top: 22px; border-top: 1px solid var(--border);
  color: var(--text-faint); font-size: .82rem; text-align: center;
}
.foot a { color: var(--text-soft); }

/* ── 404 ── */
.err { text-align:center; padding: 72px 0 32px; }
.err .code { font-size: 4rem; font-weight: 900; color: var(--accent); }
.err h1 { font-size: 1.4rem; margin-top: 8px; }
.err p { color: var(--text-soft); margin-top: 8px; }

@media (max-width: 560px) {
  .hero h1 { font-size: 1.7rem; }
  .doc table th { width: auto; display:block; padding-bottom: 2px; }
  .doc table td { display:block; padding-top: 0; border-top: 0; padding-bottom: 12px; }
}
