/*
  RAM Guard 웹사이트 공통 스타일
  색상은 앱 DESIGN.md §8.2 토큰(lib/core/theme/app_colors.dart)을 그대로 따른다.
*/

/* ───────────── 토큰 ───────────── */
:root {
  --bg: #ffffff;
  --bg-alt: #f6f9ff;
  --surface: #ffffff;
  --surface-2: #f4f8ff;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #64748b;
  --line: #e2e8f0;
  --line-2: #e9eff8;

  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --primary-light: #60a5fa;
  --primary-soft: #eaf1ff;
  --link: #2563eb;
  --accent-grad: linear-gradient(100deg, #2563eb 0%, #3b82f6 55%, #60a5fa 100%);

  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --success-text: #15803d;
  --warning-text: #b45309;
  --danger-text: #dc2626;

  /* 폰 목업 안쪽(앱 화면) 팔레트 — 앱의 light/dark 팔레트와 동일 */
  --app-bg: #ffffff;
  --app-surface: #f4f8ff;
  --app-text: #0f172a;
  --app-text-2: #64748b;
  --app-line: #e2e8f0;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 4px 14px rgba(15, 23, 42, .05);
  --shadow-lg: 0 40px 80px -30px rgba(15, 23, 42, .35), 0 18px 36px -18px rgba(15, 23, 42, .18);
  --header-bg: rgba(255, 255, 255, .8);

  --container: 1160px;
  --gutter: 20px;
  --header-h: 64px;

  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui,
    "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Segoe UI", Roboto, sans-serif;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120;
    --bg-alt: #0d1526;
    --surface: #18233b;
    --surface-2: #111a2e;
    --text: #f1f5f9;
    --text-2: #cbd5e1;
    --text-3: #94a3b8;
    --line: #22304a;
    --line-2: #1b2740;

    --primary: #3b82f6;
    --primary-strong: #2563eb;
    --primary-soft: rgba(59, 130, 246, .15);
    --link: #7cb0ff;
    --accent-grad: linear-gradient(100deg, #60a5fa 0%, #93c5fd 100%);

    --success-text: #4ade80;
    --warning-text: #fbbf24;
    --danger-text: #f87171;

    --app-bg: #0b1120;
    --app-surface: #1b2536;
    --app-text: #f1f5f9;
    --app-text-2: #94a3b8;
    --app-line: #334155;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-lg: 0 40px 80px -30px rgba(0, 0, 0, .7), 0 18px 36px -18px rgba(0, 0, 0, .5);
    --header-bg: rgba(11, 17, 32, .75);
  }
}

/* 일본어·중국어는 해당 언어 글꼴을 먼저 쓴다 (Pretendard 에는 가나·한자 간체 글리프가 없다) */
html:lang(ja) {
  --font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", "Yu Gothic", Meiryo, system-ui, sans-serif;
}
html:lang(zh) {
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei",
    system-ui, sans-serif;
}

/* ───────────── 기본 ───────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  word-break: keep-all;
  overflow-wrap: break-word;
  overflow-x: clip;
}
/* keep-all 은 띄어쓰기가 없는 일본어·중국어 줄바꿈을 막는다 */
html:lang(ja) body, html:lang(zh) body { word-break: normal; line-break: strict; }

img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { color: var(--text); margin: 0; }
p { margin: 0; }
button, select { font: inherit; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 8px;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
@media (min-width: 768px) { :root { --gutter: 32px; } }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 10px;
  background: var(--primary); color: #fff; font-weight: 600;
}
.skip-link:focus { top: 12px; text-decoration: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.num { font-variant-numeric: tabular-nums; }

/* 선 아이콘 (index.html 의 <symbol> 스프라이트) */
.i { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }

/* ───────────── 버튼 ───────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; border: 0;
  background: var(--primary); color: #fff;
  font-size: 15px; font-weight: 700; line-height: 1.2; white-space: nowrap;
  cursor: pointer; transition: background-color .15s ease, transform .15s ease;
}
.btn:hover { background: var(--primary-strong); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn-sm { padding: 8px 15px; font-size: 14px; }
.btn-ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--primary-soft); }

.store-badge { display: inline-block; border-radius: 11px; transition: transform .15s ease, opacity .15s ease; }
.store-badge img { height: 52px; width: auto; }
.store-badge:hover { opacity: .88; }
.store-badge:active { transform: scale(.98); }

/* ───────────── 헤더 ───────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header .bar { height: var(--header-h); display: flex; align-items: center; gap: 12px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0;
  color: var(--text); font-size: 17px; font-weight: 800; letter-spacing: -.01em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }

.site-nav { display: none; gap: 2px; margin-left: 20px; }
.site-nav a {
  padding: 8px 12px; border-radius: 10px;
  color: var(--text-2); font-size: 15px; font-weight: 500;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--surface-2); color: var(--text); text-decoration: none; }
@media (min-width: 900px) { .site-nav { display: flex; } }

.bar-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.bar-end .btn { display: none; }
@media (min-width: 640px) { .bar-end .btn { display: inline-flex; } }

.lang-select { position: relative; display: inline-flex; align-items: center; }
.lang-select select {
  -webkit-appearance: none; appearance: none;
  height: 36px; padding: 0 30px 0 32px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  font-size: 14px; font-weight: 500; cursor: pointer;
}
.lang-select select:hover { border-color: var(--text-3); }
.lang-select .ico { position: absolute; pointer-events: none; color: var(--text-3); }
.lang-select .ico-globe { left: 11px; width: 15px; height: 15px; }
.lang-select .ico-chev { right: 11px; width: 12px; height: 12px; }

/* ───────────── 푸터 ───────────── */
.site-footer {
  background: var(--bg-alt); border-top: 1px solid var(--line);
  padding: 56px 0 40px; color: var(--text-3); font-size: 14px;
}
.footer-top { display: grid; gap: 32px; }
@media (min-width: 768px) { .footer-top { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-brand p { margin-top: 12px; max-width: 320px; }
.footer-col h2 { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 12px; letter-spacing: .02em; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-col a { color: var(--text-2); }
.footer-bottom {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line);
  display: grid; gap: 10px; font-size: 12.5px; line-height: 1.6;
}
.footer-bottom .copy { color: var(--text-2); font-size: 13px; }

/* ───────────── 공통 섹션 ───────────── */
.section { padding: 88px 0; }
@media (min-width: 960px) { .section { padding: 128px 0; } }
.section-alt { background: var(--bg-alt); }

.section-head { max-width: 760px; margin: 0 auto 48px; text-align: center; }
@media (min-width: 960px) { .section-head { margin-bottom: 64px; } }
.section-head.left { margin-left: 0; text-align: left; }

.eyebrow {
  display: inline-block; color: var(--primary);
  font-size: 14px; font-weight: 700; letter-spacing: .04em;
}
@media (prefers-color-scheme: dark) { .eyebrow { color: var(--link); } }

.section-title {
  margin: 12px 0 16px;
  font-size: clamp(28px, 4.2vw, 46px); line-height: 1.2;
  font-weight: 800; letter-spacing: -.035em;
}
html:lang(ja) .section-title, html:lang(zh) .section-title { letter-spacing: -.01em; }
.section-lead { color: var(--text-2); font-size: clamp(16px, 1.5vw, 19px); }

/* ───────────── 히어로 ───────────── */
.hero { position: relative; overflow: hidden; padding: 40px 0 72px; }
@media (min-width: 960px) { .hero { padding: 72px 0 120px; } }

.hero-bg {
  position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background:
    radial-gradient(640px 520px at 78% 38%, rgba(37, 99, 235, .16), transparent 70%),
    radial-gradient(420px 360px at 12% 8%, rgba(96, 165, 250, .12), transparent 70%);
}
.hero-bg::after {
  /* 메모리 셀을 닮은 옅은 점 격자 */
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(37, 99, 235, .16) 1.2px, transparent 1.3px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 75% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 70% at 75% 40%, #000 20%, transparent 75%);
}

.hero-grid { display: grid; gap: 56px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 48px; } }

.live-chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 14px 6px 10px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary-strong);
  font-size: 14px; font-weight: 600;
}
@media (prefers-color-scheme: dark) { .live-chip { color: var(--link); } }
.live-dot {
  position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--success);
}
.live-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  background: var(--success); opacity: .35; animation: pulse 2s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(.5); opacity: .5; } 100% { transform: scale(1.6); opacity: 0; } }

.hero h1 {
  margin: 22px 0 22px;
  font-size: clamp(38px, 6.2vw, 66px); line-height: 1.12;
  font-weight: 800; letter-spacing: -.045em;
}
html:lang(ja) .hero h1, html:lang(zh) .hero h1 { letter-spacing: -.02em; font-size: clamp(34px, 5.4vw, 58px); }
.hero h1 .accent {
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero .lead { max-width: 540px; color: var(--text-2); font-size: clamp(17px, 1.55vw, 19px); line-height: 1.7; }

.cta-row { margin-top: 34px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text); font-weight: 600; font-size: 16px;
}
.link-arrow svg { width: 16px; height: 16px; transition: transform .15s ease; }
.link-arrow:hover { text-decoration: none; }
.link-arrow:hover svg { transform: translateY(2px); }

.hero-meta {
  list-style: none; margin: 30px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  color: var(--text-3); font-size: 14px; font-weight: 500;
}
.hero-meta li { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta svg { width: 16px; height: 16px; color: var(--success); }

/* ───────────── 폰 목업 (1em = 폰 너비의 1/30) ───────────── */
.hero-visual { --w: 272px; position: relative; display: flex; justify-content: center; padding: 0 0 12px; }
@media (min-width: 400px) { .hero-visual { --w: 290px; } }
@media (min-width: 960px) { .hero-visual { --w: 316px; } }

.phone {
  position: relative; width: var(--w); aspect-ratio: 300 / 620;
  font-size: calc(var(--w) / 30);
  padding: 1.05em; border-radius: 5.1em;
  background: #0b1220;
  box-shadow: var(--shadow-lg), inset 0 0 0 .2em #27344a, inset 0 0 0 .35em #0b1220;
}
.phone-screen {
  position: relative; height: 100%; overflow: hidden;
  border-radius: 4.1em; background: var(--app-bg); color: var(--app-text);
  display: flex; flex-direction: column;
}
.island {
  position: absolute; top: 1.1em; left: 50%; transform: translateX(-50%);
  width: 9em; height: 2.6em; border-radius: 2em; background: #000; z-index: 2;
}
.status-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.35em 2.3em 0 2.8em; height: 3.9em;
  font-size: 1em; font-weight: 600;
}
.status-bar .time { font-size: 1.35em; }
.status-bar svg { width: 6.2em; height: 1.2em; }

.app-title { text-align: center; margin-top: 1.1em; }
.app-title strong { display: block; font-size: 1.9em; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.app-title span { font-size: 1.2em; color: var(--app-text-2); }

.donut { position: relative; width: 15.4em; height: 15.4em; margin: 1.3em auto 0; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut .track { stroke: var(--app-line); }
.donut .arc { transition: stroke-dashoffset 1.2s cubic-bezier(.4, 0, .2, 1); }
.donut .center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.donut .pct { font-size: 3.9em; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.donut .pct small { font-size: .5em; font-weight: 700; margin-left: .05em; }
.donut .lbl { font-size: 1.15em; color: var(--app-text-2); margin-top: .35em; }

.status-pill {
  display: flex; width: max-content; align-items: center; gap: .5em;
  margin: 1.1em auto 0; padding: .35em .95em; border-radius: 2em;
  background: rgba(34, 197, 94, .12); color: var(--success-text);
  font-size: 1.1em; font-weight: 700;
}
.status-pill i { width: .6em; height: .6em; border-radius: 50%; background: var(--success); }

.avail-card {
  margin: 1.5em 1.8em 0; padding: 1em 1em 1.05em; border-radius: 1.6em;
  background: var(--app-surface); text-align: center;
}
.avail-card > span { display: block; font-size: 1.05em; color: var(--app-text-2); }
.avail-card strong { display: block; font-size: 2.3em; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; color: var(--primary); }

.trend-card { margin: .9em 1.8em 0; background: var(--app-surface); border-radius: 1.5em; padding: .95em 1.2em 1em; }
.trend-card header { display: flex; justify-content: space-between; font-size: 1.05em; }
.trend-card header b { font-weight: 700; }
.trend-card header span { color: var(--app-text-2); }
.trend-card svg { width: 100%; height: 4.4em; margin-top: .5em; overflow: visible; }

.app-btn {
  margin: 1.2em 1.8em 0; height: 4.4em; border-radius: 2.2em;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(90deg, #2563eb, #1d4ed8); color: #fff;
  font-size: 1em; font-weight: 700;
}
.app-btn span { font-size: 1.4em; }

.tab-bar {
  margin-top: auto; display: grid; grid-template-columns: repeat(4, 1fr);
  padding: .9em .6em 2.6em; border-top: 1px solid var(--app-line);
}
.tab-bar div { display: flex; flex-direction: column; align-items: center; gap: .3em; color: var(--app-text-2); }
.tab-bar div.on { color: var(--primary); }
.tab-bar svg { width: 2.2em; height: 2.2em; }
.tab-bar span { font-size: .95em; font-weight: 600; white-space: nowrap; }
.home-indicator {
  position: absolute; bottom: .8em; left: 50%; transform: translateX(-50%);
  width: 11em; height: .45em; border-radius: 1em; background: var(--app-text); opacity: .85;
}

/* 떠 있는 위젯 */
.float-widget {
  position: absolute; z-index: 3;
  left: calc(50% - var(--w) / 2 - var(--w) * .34);
  top: 21%;
  font-size: calc(var(--w) / 30);
  width: 14.6em; height: 14.6em; padding: 2.1em;
  border-radius: 3.2em; background: var(--app-bg); color: var(--app-text);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--app-line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4em;
  animation: float 6s ease-in-out infinite;
}
.float-widget .ring { position: relative; width: 6.8em; height: 6.8em; }
.float-widget .ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.float-widget .ring .track { stroke: var(--app-line); }
.float-widget .ring .arc { transition: stroke-dashoffset 1.2s cubic-bezier(.4, 0, .2, 1); }
.float-widget .ring div {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.float-widget .ring b { font-size: 1.4em; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.float-widget .ring div > span { font-size: .72em; color: var(--app-text-2); margin-top: .2em; }
.float-widget .free { font-size: 1.2em; font-weight: 700; color: var(--success); line-height: 1.1; }
.float-widget .free-lbl { font-size: .85em; color: var(--app-text-2); margin-top: -.2em; }
@media (max-width: 559px) { .float-widget { display: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ───────────── 신뢰 띠 ───────────── */
.trust { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.trust-list { list-style: none; margin: 0; padding: 0; display: grid; }
.trust-list li { display: flex; align-items: center; gap: 14px; padding: 22px 0; }
.trust-list li + li { border-top: 1px solid var(--line); }
@media (min-width: 820px) {
  .trust-list { grid-template-columns: repeat(3, 1fr); }
  .trust-list li { padding: 28px 24px; justify-content: center; }
  .trust-list li + li { border-top: 0; border-left: 1px solid var(--line); }
}
.trust-ico {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary);
}
@media (prefers-color-scheme: dark) { .trust-ico { color: var(--link); } }
.trust-ico svg { width: 22px; height: 22px; }
.trust-list div > strong { display: block; font-size: 16px; font-weight: 700; }
.trust-list div > span { display: block; color: var(--text-3); font-size: 14px; }

/* ───────────── 기능 벤토 ───────────── */
.bento { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile.wide { grid-column: span 2; }
}
@media (min-width: 1024px) {
  .bento { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .tile.band { grid-column: 1 / -1; }
}

.tile {
  display: flex; flex-direction: column; gap: 26px;
  padding: 28px; border-radius: 28px;
  background: var(--surface-2); border: 1px solid var(--line-2);
  overflow: hidden;
}
@media (min-width: 720px) { .tile { padding: 32px; } }
.tile h3 { font-size: 21px; font-weight: 750; letter-spacing: -.025em; line-height: 1.35; margin-bottom: 8px; }
.tile p { color: var(--text-2); font-size: 15.5px; line-height: 1.7; }
.tile-ico {
  width: 40px; height: 40px; border-radius: 12px; margin-bottom: 18px;
  display: grid; place-items: center; background: var(--primary-soft); color: var(--primary);
}
@media (prefers-color-scheme: dark) { .tile-ico { color: var(--link); } }
.tile-ico svg { width: 21px; height: 21px; }

.viz {
  margin-top: auto; padding: 20px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--line-2);
  box-shadow: var(--shadow-sm);
}
@media (min-width: 720px) {
  .tile.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px; align-items: center; }
  .tile.split .viz { margin-top: 0; }
}

/* 상태 색 도넛 3종 */
.viz-states { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 24px 16px; }
.state { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.state .mini-ring { position: relative; width: 84px; height: 84px; }
.state .mini-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.state .mini-ring .track { stroke: var(--line); }
.state .mini-ring b {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 19px; font-weight: 800; letter-spacing: -.02em;
}
.state .tag { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.state .range { font-size: 12px; color: var(--text-3); margin-top: -4px; }
.tag.ok { color: var(--success-text); background: rgba(34, 197, 94, .12); }
.tag.warn { color: var(--warning-text); background: rgba(245, 158, 11, .14); }
.tag.bad { color: var(--danger-text); background: rgba(239, 68, 68, .12); }

/* 추이 차트 */
.viz-trend svg { width: 100%; height: 110px; overflow: visible; }
.viz-trend .grid-line { stroke: var(--line); stroke-dasharray: 3 4; }
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.chips div { background: var(--surface-2); border-radius: 12px; padding: 8px 10px; text-align: center; }
.chips span { display: block; font-size: 12px; color: var(--text-3); }
.chips b { font-size: 16px; font-weight: 750; }

/* 최적화 전/후 */
.viz-boost { display: grid; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 4.6em 1fr auto; align-items: center; gap: 12px; font-size: 14px; }
.bar-row > span { color: var(--text-3); }
.bar-row > b { font-weight: 750; min-width: 4.2em; text-align: right; }
.meter { height: 12px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--text-3); opacity: .45; }
.bar-row.after .meter i { background: var(--success); opacity: 1; }
.bar-row.after b { color: var(--success-text); }
.viz-caption { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--text-3); padding-top: 12px; border-top: 1px dashed var(--line); }

/* 목록형 시각화 (기기 건강, 사진, 가이드) */
.viz-list { list-style: none; margin: 0; padding: 6px 18px; }
.viz-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; font-size: 14.5px; }
.viz-list li + li { border-top: 1px solid var(--line-2); }
.viz-list .k { color: var(--text-2); display: inline-flex; align-items: center; gap: 10px; }
.viz-list .v { font-weight: 700; white-space: nowrap; }
.viz-list .v.ok { color: var(--success-text); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--success); }

.thumb {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center; color: #fff;
}
.thumb svg { width: 18px; height: 18px; }
.thumb.shot { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.thumb.video { background: linear-gradient(135deg, #a78bfa, #6d28d9); }
.viz-list .meta { display: flex; flex-direction: column; line-height: 1.35; }
.viz-list .meta small { color: var(--text-3); font-size: 12.5px; }

.step-no {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
  background: var(--primary-soft); color: var(--primary);
}
@media (prefers-color-scheme: dark) { .step-no { color: var(--link); } }
.settings-chip {
  display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 12px;
  padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: var(--primary); color: #fff;
}
.settings-chip svg { width: 14px; height: 14px; }

/* 위젯 쇼케이스 */
.viz-widgets {
  position: relative; padding: 26px;
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: center;
  background:
    radial-gradient(120% 140% at 0% 0%, #93c5fd 0%, transparent 55%),
    radial-gradient(120% 140% at 100% 100%, #818cf8 0%, transparent 55%),
    linear-gradient(135deg, #3b82f6, #6366f1);
  border: 0;
}
@media (prefers-color-scheme: dark) {
  .viz-widgets {
    background:
      radial-gradient(120% 140% at 0% 0%, #1e40af 0%, transparent 60%),
      radial-gradient(120% 140% at 100% 100%, #4338ca 0%, transparent 60%),
      linear-gradient(135deg, #172554, #1e1b4b);
  }
}
.w {
  background: var(--app-bg); color: var(--app-text); border-radius: 22px;
  box-shadow: 0 10px 24px -10px rgba(15, 23, 42, .45);
}
.w-small { width: 132px; height: 132px; padding: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.w-medium { width: 284px; max-width: 100%; height: 132px; padding: 16px 18px; display: flex; align-items: center; gap: 18px; }
.w .ring { position: relative; width: 74px; height: 74px; flex-shrink: 0; }
.w-medium .ring { width: 90px; height: 90px; }
.w .ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.w .ring .track { stroke: var(--app-line); }
.w .ring div { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.w .ring b { font-size: 16px; font-weight: 800; line-height: 1; }
.w-medium .ring b { font-size: 19px; }
.w .ring div > span { font-size: 9px; color: var(--app-text-2); margin-top: 2px; }
.w .free { font-size: 14px; font-weight: 700; color: var(--success); line-height: 1.1; margin-top: 2px; }
.w .free-lbl { font-size: 10px; color: var(--app-text-2); }
.w-medium dl { margin: 0; display: grid; gap: 7px; }
.w-medium dt { font-size: 10px; color: var(--app-text-2); line-height: 1.2; }
.w-medium dd { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.2; }
.w-medium dd.good { color: var(--success); }

.lock-group { display: flex; gap: 12px; align-items: center; color: #fff; }
.w-lock-circle {
  position: relative; width: 60px; height: 60px; border-radius: 50%;
  background: rgba(255, 255, 255, .18); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: grid; place-items: center;
}
.w-lock-circle svg { position: absolute; inset: 5px; width: 50px; height: 50px; transform: rotate(-90deg); }
.w-lock-circle b { font-size: 16px; font-weight: 700; }
.w-lock-rect {
  height: 60px; padding: 0 14px; border-radius: 16px;
  background: rgba(255, 255, 255, .18); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: flex; flex-direction: column; justify-content: center;
  font-size: 13px; font-weight: 600; line-height: 1.45; white-space: nowrap;
}
.lock-label {
  width: 100%; text-align: center; color: rgba(255, 255, 255, .85);
  font-size: 12px; font-weight: 600; letter-spacing: .02em; margin-top: -4px;
}

/* 다크 모드 · 언어 띠 */
.tile.band { gap: 22px; }
@media (min-width: 1024px) {
  .tile.band { flex-direction: row; align-items: center; justify-content: space-between; gap: 40px; }
  .tile.band .band-text { display: flex; gap: 18px; align-items: flex-start; max-width: 560px; }
  .tile.band .tile-ico { margin-bottom: 0; flex-shrink: 0; }
}
.lang-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lang-chips span[lang] {
  padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
}
.theme-swatch {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #ffffff 50%, #0b1120 50%);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}

/* ───────────── 작동 방식 ───────────── */
.how-panel {
  position: relative; overflow: hidden;
  border-radius: 36px; padding: 44px 24px;
  color: #e2e8f0;
  background:
    radial-gradient(700px 400px at 100% 0%, rgba(96, 165, 250, .35), transparent 60%),
    linear-gradient(160deg, #0f1f4d 0%, #1e3a8a 55%, #1d4ed8 100%);
}
@media (min-width: 720px) { .how-panel { padding: 64px 56px; } }
@media (min-width: 1024px) { .how-panel { padding: 80px 72px; } }
.how-panel .eyebrow { color: #93c5fd; }
.how-panel .section-title { color: #fff; }
.how-panel .section-lead { color: #bfdbfe; }
.how-head { max-width: 640px; }

.steps { list-style: none; margin: 48px 0 0; padding: 0; display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.steps li {
  counter-increment: step;
  padding: 26px; border-radius: 22px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block; margin-bottom: 18px;
  font-size: 14px; font-weight: 800; letter-spacing: .08em; color: #93c5fd;
}
.steps h3 { color: #fff; font-size: 19px; font-weight: 750; letter-spacing: -.02em; line-height: 1.4; margin-bottom: 10px; }
.steps p { color: #cbd5e1; font-size: 15px; line-height: 1.7; }

.how-note {
  margin-top: 24px; display: flex; gap: 12px; align-items: flex-start;
  padding: 18px 20px; border-radius: 18px;
  background: rgba(15, 23, 42, .35); color: #dbeafe; font-size: 15px;
}
.how-note svg { flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; color: #93c5fd; }

/* ───────────── 개인정보 ───────────── */
.privacy-grid { display: grid; gap: 40px; align-items: start; }
@media (min-width: 960px) { .privacy-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 72px; } }
.privacy-grid .section-head { margin-bottom: 0; }
.privacy-cards { display: grid; gap: 14px; }
.p-card {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 24px; border-radius: 22px;
  background: var(--surface-2); border: 1px solid var(--line-2);
}
.p-card .tile-ico { margin: 0; flex-shrink: 0; }
.p-card h3 { font-size: 18px; font-weight: 750; letter-spacing: -.02em; margin-bottom: 4px; }
.p-card p { color: var(--text-2); font-size: 15px; }
.ads-note { margin-top: 24px; color: var(--text-3); font-size: 14px; }
.privacy-link { margin-top: 20px; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.privacy-link svg { width: 16px; height: 16px; }

/* ───────────── FAQ ───────────── */
.faq-grid { display: grid; gap: 32px; }
@media (min-width: 960px) { .faq-grid { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 72px; } }
.faq-grid .section-head { margin-bottom: 0; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  position: relative; list-style: none; cursor: pointer;
  padding: 22px 44px 22px 0;
  font-size: 17px; font-weight: 700; letter-spacing: -.015em; line-height: 1.5;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; position: absolute; right: 6px; top: 50%;
  width: 20px; height: 20px; margin-top: -10px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 4v12M4 10h12' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 4v12M4 10h12' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  color: var(--text-3); transition: transform .2s ease;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list summary:hover { color: var(--primary); }
.faq-list .answer { padding: 0 8px 24px 0; color: var(--text-2); font-size: 16px; line-height: 1.75; }

/* ───────────── 마지막 CTA ───────────── */
.final-cta { padding: 0 0 96px; }
@media (min-width: 960px) { .final-cta { padding-bottom: 128px; } }
.cta-card {
  position: relative; overflow: hidden; text-align: center;
  padding: 56px 24px; border-radius: 36px;
  background: var(--surface-2); border: 1px solid var(--line-2);
}
.cta-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(500px 260px at 50% 0%, rgba(37, 99, 235, .14), transparent 70%);
}
.cta-card > * { position: relative; }
.cta-card img.app-icon {
  width: 88px; height: 88px; margin: 0 auto 24px; border-radius: 20px;
  box-shadow: 0 14px 30px -12px rgba(37, 99, 235, .55);
}
.cta-card .section-title { margin-top: 0; }
.cta-card .section-lead { margin-bottom: 30px; }
.cta-card .store-badge img { margin: 0 auto; }

/* ───────────── 약관 문서 ───────────── */
.doc-hero { padding: 40px 0 36px; border-bottom: 1px solid var(--line); background: var(--bg-alt); }
@media (min-width: 960px) { .doc-hero { padding: 64px 0 48px; } }
.doc-tabs {
  display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
}
.doc-tabs a {
  padding: 8px 16px; border-radius: 999px;
  color: var(--text-2); font-size: 14px; font-weight: 600; white-space: nowrap;
}
.doc-tabs a:hover { color: var(--text); text-decoration: none; }
.doc-tabs a[aria-current="page"] { background: var(--primary); color: #fff; }
.doc-hero h1 {
  margin: 28px 0 14px;
  font-size: clamp(30px, 4.6vw, 46px); line-height: 1.2; font-weight: 800; letter-spacing: -.035em;
}
html:lang(ja) .doc-hero h1, html:lang(zh) .doc-hero h1 { letter-spacing: -.01em; }
.updated { display: inline-flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 14.5px; }
.updated svg { width: 16px; height: 16px; }

.doc-layout { display: grid; gap: 28px; padding-top: 32px; padding-bottom: 96px; }
@media (min-width: 1024px) {
  .doc-layout { grid-template-columns: 232px minmax(0, 720px); gap: 72px; padding-top: 56px; }
}

.toc { font-size: 14px; }
@media (min-width: 1024px) { .toc { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; } }
.toc details {
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2);
}
.toc summary {
  list-style: none; cursor: pointer; padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; color: var(--text);
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary svg { width: 14px; height: 14px; color: var(--text-3); transition: transform .2s ease; }
.toc details[open] summary svg { transform: rotate(180deg); }
.toc ol { list-style: none; margin: 0; padding: 0 10px 12px; }
.toc a {
  display: block; padding: 7px 10px; border-radius: 10px;
  color: var(--text-2); line-height: 1.45;
}
.toc a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.toc a.active { color: var(--primary); font-weight: 700; }
@media (prefers-color-scheme: dark) { .toc a.active { color: var(--link); } }
@media (min-width: 1024px) {
  .toc details { border: 0; background: none; }
  .toc summary { cursor: default; padding: 0 0 12px 12px; font-size: 13px; color: var(--text-3); letter-spacing: .04em; pointer-events: none; }
  .toc summary svg { display: none; }
  .toc ol { padding: 0; border-left: 1px solid var(--line); }
  .toc a { border-radius: 0 10px 10px 0; margin-left: -1px; border-left: 2px solid transparent; }
  .toc a.active { border-left-color: var(--primary); background: none; }
}

.doc-body { min-width: 0; }
.doc-body > p:first-child {
  padding: 20px 22px; border-radius: 18px;
  background: var(--surface-2); border: 1px solid var(--line-2);
  color: var(--text-2); font-size: 16px; line-height: 1.8;
}
.doc-body h2 {
  margin: 48px 0 14px; padding-top: 4px;
  font-size: 21px; font-weight: 750; letter-spacing: -.02em; line-height: 1.4;
}
.doc-body p, .doc-body li { color: var(--text-2); font-size: 16px; line-height: 1.85; }
.doc-body p + p { margin-top: 12px; }
.doc-body strong { color: var(--text); }
.doc-body ul { margin: 10px 0; padding-left: 1.25em; }
.doc-body li { margin: 8px 0; padding-left: 4px; }
.doc-body li::marker { color: var(--primary); }
.doc-body a { word-break: break-all; }

.contact-card {
  margin-top: 56px; padding: 26px; border-radius: 22px;
  background: var(--surface-2); border: 1px solid var(--line-2);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
.contact-card h2 { font-size: 18px; font-weight: 750; margin: 0 0 4px; letter-spacing: -.02em; }
.contact-card p { color: var(--text-2); font-size: 15px; }

[hidden] { display: none !important; }

/* ───────────── 동작 줄이기 ───────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
