/* 낱말닷 — 공용 스타일. self-contained, 반응형, 라이트/다크 */

:root {
  color-scheme: light dark;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1a1d21;
  --text-muted: #5b6470;
  --border: #e3e6ea;
  --brand: #3a6df0;
  --brand-strong: #2b54c4;
  --brand-soft: #eaf0ff;
  --accent: #f0a63a;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(20, 30, 50, 0.06), 0 8px 24px rgba(20, 30, 50, 0.06);
  --maxw: 880px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo",
    "Malgun Gothic", "Noto Sans KR", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1216;
    --surface: #171b21;
    --text: #eef1f5;
    --text-muted: #9aa4b2;
    --border: #262c34;
    --brand: #6d97f7;
    --brand-strong: #8fb0fb;
    --brand-soft: #1a2436;
    --accent: #f4b455;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  overflow-wrap: break-word;
  word-break: keep-all;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

/* 레이아웃 */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* 헤더 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
}

.logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  flex: none;
}

.nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.94rem;
  font-weight: 600;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--text);
  background: var(--brand-soft);
  text-decoration: none;
}

/* 메인 */
main {
  padding: 28px 0 8px;
}

.hero {
  text-align: center;
  padding: 40px 0 24px;
}

.hero .logo-lg {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--brand), var(--brand-strong));
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.hero h1 {
  font-size: clamp(1.9rem, 6vw, 2.8rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

.hero .pitch {
  font-size: clamp(1.05rem, 3.5vw, 1.25rem);
  color: var(--text-muted);
  max-width: 30ch;
  margin: 0 auto;
}

/* 스토어 배지 */
.badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 26px 0 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
  font-weight: 700;
  min-width: 190px;
  cursor: default;
}

.badge:hover {
  text-decoration: none;
}

/* Live store link (App Store): make it clearly clickable and lift on hover. */
.badge-link {
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.badge-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.badge small {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  opacity: 0.75;
  letter-spacing: 0.02em;
}

.badge strong {
  font-size: 1.02rem;
}

.badge .badge-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.badge-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 4px;
}

/* 특징 그리드 */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 36px 0;
}

@media (max-width: 560px) {
  .features {
    grid-template-columns: 1fr;
  }
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.feature .ico {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.feature h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.feature p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}

/* 문서(법적 페이지) */
.doc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px clamp(20px, 5vw, 40px);
  box-shadow: var(--shadow);
  margin-bottom: 32px;
}

.doc h1 {
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.doc .updated {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 24px;
}

.doc h2 {
  font-size: 1.2rem;
  margin: 30px 0 10px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

.doc h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

.doc h3 {
  font-size: 1.02rem;
  margin: 18px 0 6px;
}

.doc p,
.doc li {
  color: var(--text);
}

.doc ul,
.doc ol {
  padding-left: 22px;
}

.doc li {
  margin: 4px 0;
}

.doc .muted {
  color: var(--text-muted);
}

.callout {
  background: var(--brand-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 18px 0;
}

.callout p {
  margin: 6px 0;
}

/* 표 */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 14px 0;
  border: 1px solid var(--border);
  border-radius: 12px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 460px;
  font-size: 0.92rem;
}

th,
td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  background: var(--brand-soft);
  font-weight: 700;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: none;
}

/* FAQ */
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px 18px;
  margin: 10px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 12px 0;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before {
  content: "＋";
  color: var(--brand);
  font-weight: 800;
  margin-right: 10px;
}

.faq details[open] summary::before {
  content: "－";
}

.faq details p {
  margin: 0 0 14px;
  color: var(--text-muted);
}

/* 문의 카드 */
.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--brand-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 18px 0;
  flex-wrap: wrap;
}

.contact-card .ico {
  font-size: 1.8rem;
}

.contact-card div {
  min-width: 0;
}

.contact-card a {
  font-weight: 700;
  font-size: 1.05rem;
  word-break: break-all;
}

/* CTA */
.cta {
  text-align: center;
  margin: 8px 0 12px;
}

.links-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.btn:hover {
  text-decoration: none;
  border-color: var(--brand);
  color: var(--brand);
}

/* 푸터 */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 24px;
  padding: 26px 0 40px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--text-muted);
}

.footer-nav a:hover {
  color: var(--text);
}

.small {
  font-size: 0.85rem;
  color: var(--text-muted);
}
