/* 앱과 같은 청록 테마 (app/src/account_cleaner/ui/theme/tokens.py) */
:root {
  --accent: #0b7a75;
  --accent-hover: #096560;
  --accent-soft: #e7f2f1;
  --bg: #ffffff;
  --band: #f7f8f9;
  --line: #eeeff1;
  --line-strong: #dcdee3;
  --text: #1a1c20;
  --text-2: #555d6d;
  --text-3: #6c727c;
  --card: #ffffff;
  --shadow: 0 1px 2px rgba(26, 28, 32, 0.04), 0 8px 24px rgba(26, 28, 32, 0.06);
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #3fb8b0;
    --accent-hover: #5ccac2;
    --accent-soft: #15302f;
    --bg: #111315;
    --band: #181b1e;
    --line: #262a2f;
    --line-strong: #353a41;
    --text: #eef0f2;
    --text-2: #b4bac3;
    --text-3: #8d949e;
    --card: #1d2125;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
code { font-size: 0.9em; background: var(--accent-soft); color: var(--accent); padding: 1px 6px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.3; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: clamp(26px, 3.4vw, 34px); }
h3 { font-size: 18px; }
p { margin: 0; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--text-3); }
.accent { color: var(--accent); }
section { padding: 88px 0; }
.band { background: var(--band); }
.sub { color: var(--text-2); margin-top: 12px; font-size: 17px; }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; min-height: 46px; padding: 0 22px;
  border-radius: 10px; border: 1px solid var(--accent);
  background: var(--accent); color: #fff;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 40%, transparent); outline-offset: 2px; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--band); border-color: var(--line-strong); }
.btn-small { min-height: 36px; padding: 0 14px; font-size: 14px; color: #fff !important; }
.btn-large { min-height: 56px; padding: 0 32px; font-size: 18px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }

/* 상단 바 */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; }
.brand-mark img { width: 18px; filter: brightness(0) invert(1); }
.topnav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.topnav a:not(.btn) { text-decoration: none; color: var(--text-2); }
.topnav a:not(.btn):hover { color: var(--accent); }

/* 첫 화면 */
.hero { padding: 72px 0 88px; background: linear-gradient(180deg, var(--accent-soft) 0%, var(--bg) 70%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr); gap: 56px; align-items: center; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: 15px; margin-bottom: 16px; }
h1 { font-size: clamp(34px, 4.6vw, 52px); }
.lead { color: var(--text-2); font-size: 18px; margin-top: 22px; }
.lead strong { color: var(--text); }
.cta { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-facts { list-style: none; padding: 0; margin: 36px 0 0; display: flex; gap: 32px; flex-wrap: wrap; }
.hero-facts li { display: flex; flex-direction: column; }
.hero-facts b { font-size: 24px; color: var(--accent); }
.hero-facts span { color: var(--text-3); font-size: 14px; }
.shot {
  margin: 0; position: relative;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line-strong); box-shadow: var(--shadow);
  background: #f7f8f9;
}
.hero-shot { transform: perspective(1600px) rotateY(-4deg); }

/* 카드 */
.cards { display: grid; gap: 16px; margin-top: 40px; }
.cards.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-2); font-size: 15px; }
.num {
  display: inline-grid; place-items: center; width: 30px; height: 30px; margin-bottom: 14px;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 14px;
}

/* 화면 따라가 보기 */
.tour { margin-top: 20px; }
.tour-steps { list-style: none; padding: 0; margin: 0 0 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.tour-steps button {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 42px; padding: 0 16px 0 8px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--card); color: var(--text-2);
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.tour-steps button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.step-num {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-size: 13px;
}
.tour-steps button[aria-selected="true"] .step-num { background: rgba(255, 255, 255, 0.22); color: #fff; }
#tour { padding-top: 40px; --tour-chrome: 480px; } /* 상단 바·제목·단계 버튼·설명 카드 높이 합 */
#tour .sub { margin-top: 8px; }
.tour-stage { display: flex; flex-direction: column; align-items: center; gap: 16px; }
/* 캡처 원본(1440×900)을 그 크기 그대로 보여 준다. 화면이 더 좁을 때만 줄인다 (원본보다 키우지 않음 → 글씨 안 깨짐) */
/* 제목·단계 버튼·설명 카드와 함께 한 화면에 들어오도록 화면 높이로도 제한한다 (이미지 비율 1440:900 = 1.6).
   단, 글씨를 읽을 수 있게 900px(안내 창 420px) 밑으로는 줄이지 않는다 — 그보다 낮은 화면은 스크롤 */
.tour-shot { width: max(min(900px, calc(100vw - 48px)), min(1442px, calc(100vw - 48px), calc((100vh - var(--tour-chrome)) * 1.6))); } /* 테두리 1px×2 포함 */
.tour-shot.is-dialog { width: max(min(420px, calc(100vw - 48px)), min(522px, calc(100vw - 48px), calc((100vh - var(--tour-chrome)) * 1.09))); }
@supports (height: 100svh) {
  .tour-shot { width: max(min(900px, calc(100vw - 48px)), min(1442px, calc(100vw - 48px), calc((100svh - var(--tour-chrome)) * 1.6))); }
  .tour-shot.is-dialog { width: max(min(420px, calc(100vw - 48px)), min(522px, calc(100vw - 48px), calc((100svh - var(--tour-chrome)) * 1.09))); }
}
.hotspots { position: absolute; inset: 0; pointer-events: none; }
.hotspot {
  position: absolute; border: 2.5px solid #ff7a45; border-radius: 10px;
  box-shadow: 0 0 0 4px rgba(255, 122, 69, 0.18);
  animation: pop 0.45s ease-out both;
}
.hotspot-tip {
  position: absolute; left: -2px; bottom: calc(100% + 6px);
  background: #ff7a45; color: #fff; font-size: 13px; font-weight: 600; line-height: 1.4;
  padding: 3px 9px; border-radius: 6px; white-space: nowrap;
}
.tip-below .hotspot-tip { bottom: auto; top: calc(100% + 6px); }
@keyframes pop { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: scale(1); } }
.tour-text {
  width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px;
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; column-gap: 32px; align-items: start;
}
.tour-count, .tour-text h3, .tour-text > p:not(.tour-count) { grid-column: 1; }
.tour-points { grid-column: 2; grid-row: 1 / span 3; }
.tour-nav { grid-column: 3; grid-row: 1 / span 3; flex-direction: column; min-width: 128px; margin-top: 0 !important; }
.tour-count { color: var(--accent); font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.tour-text h3 { font-size: 20px; margin-bottom: 6px; }
.tour-text > p:not(.tour-count) { color: var(--text-2); }
.tour-points { margin: 16px 0 0; padding-left: 20px; color: var(--text-2); font-size: 15px; }
.tour-points li + li { margin-top: 6px; }
.tour-nav { display: flex; gap: 8px; margin-top: 24px; }
.tour-nav .btn { flex: 1; }

/* AI 흐름 */
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 16px; align-items: stretch; margin-top: 40px; }
.flow-step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.flow-step h3 { margin: 6px 0 8px; }
.flow-step p:not(.tag) { color: var(--text-2); font-size: 15px; }
.tag { display: inline-block; font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 2px 10px; border-radius: 999px; }
.flow-arrow { display: grid; place-items: center; color: var(--text-3); font-size: 22px; }

/* 결과 */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 4px; }
.stat b { font-size: 30px; color: var(--accent); letter-spacing: -0.02em; }
.stat span { font-weight: 600; }
.stat small { color: var(--text-3); font-size: 13px; line-height: 1.5; }
.note { margin-top: 20px; color: var(--text-3); font-size: 14px; }

/* 영상 */
.video { margin-top: 32px; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--band); border: 1px solid var(--line); }
.video iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-empty { height: 100%; display: grid; place-items: center; color: var(--text-3); }

/* 받기 */
.download { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.checklist { margin: 20px 0 0; padding-left: 20px; color: var(--text-2); }
.checklist li + li { margin-top: 6px; }
.download-actions { display: flex; flex-direction: column; align-items: stretch; gap: 10px; max-width: 360px; }

.footer { border-top: 1px solid var(--line); padding: 32px 0; font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* 좁은 화면 */
@media (max-width: 960px) {
  .hero-grid, .download { grid-template-columns: 1fr; }
  .tour-text { grid-template-columns: 1fr; }
  .tour-points, .tour-nav { grid-column: 1; grid-row: auto; }
  .tour-nav { flex-direction: row; margin-top: 20px !important; }
  .hero-shot { transform: none; }
  .cards.four, .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards.three { grid-template-columns: 1fr 1fr; }
  .flow { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); }
  .topnav a:not(.btn) { display: none; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .tour-shot, .tour-shot.is-dialog { width: calc(100vw - 32px); } /* 휴대폰은 세로로 스크롤해서 본다 */
  section { padding: 64px 0; }
  .cards.four, .cards.three, .stats { grid-template-columns: 1fr; }
  .hotspot-tip { display: none; }
  .hero-facts { gap: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hotspot { animation: none; }
}
