/* AdFreely (애드프리) site — shared production stylesheet.
   Light/dark via prefers-color-scheme only. No theme classes.
   Lightbox behavior lives in js/lightbox.js (no inline script or style).
   Tokens, breakpoints, and components are documented in README.md. */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Apple SD Gothic Neo", Pretendard, "Noto Sans KR", system-ui, sans-serif;
  --bg: #F4F5FA;
  --bg-elev: #FFFFFF;
  --bg-soft: #EEF0FE;
  --ink: #1C1C1E;
  --muted: #5F6068;
  --helper: #666670;
  --line: rgba(60, 60, 67, 0.16);
  --line-strong: rgba(60, 60, 67, 0.28);
  --accent: #3D52E6;
  --accent-hover: #2F40C9;
  --accent-text: #FFFFFF;
  --accent-soft: #EEF0FE;
  --accent-ink: #2A38B3;
  --good: #248A3D;
  --good-bg: #E8F8ED;
  --warn-bg: #FFF4D6;
  --warn-ink: #7A5200;
  --badge: #FB1823;
  --shadow: 0 16px 40px rgba(28, 32, 80, 0.10);
  --shadow-sm: 0 6px 18px rgba(28, 32, 80, 0.08);
  --radius: 20px;
  --radius-sm: 14px;
  --wrap: 1120px;
  --header-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E0F12;
    --bg-elev: #1C1C1E;
    --bg-soft: #1E2248;
    --ink: #F2F2F7;
    --muted: #9A9BA3;
    --helper: #AEAEB2;
    --line: rgba(255, 255, 255, 0.10);
    --line-strong: rgba(255, 255, 255, 0.18);
    --accent: #6E77FF;
    --accent-hover: #8A91FF;
    --accent-text: #FFFFFF;
    --accent-soft: #1E2248;
    --accent-ink: #C3C6FF;
    --good: #30D158;
    --good-bg: #16351F;
    --warn-bg: #3A2F12;
    --warn-ink: #FFD479;
    --badge: #FF4A58;
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.32);
    color-scheme: dark;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body {
  overflow-x: hidden;
  max-width: 100%;
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  /* responsive-layout clip-left 임계(16px) 이상 */
  left: 16px;
  top: -100px;
  background: var(--accent);
  color: var(--accent-text);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 100;
}
.skip:focus { top: 12px; }

.wrap {
  width: min(var(--wrap), calc(100% - 40px));
  margin-inline: auto;
}

/* Temporary copy marker — strip .copy-temp in production if R&M replaces the text */
.copy-temp { position: relative; }
.copy-temp::after {
  content: "임시 문구";
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--warn-bg);
  color: var(--warn-ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: 2px;
  line-height: 1.5;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 16px;
  min-height: var(--header-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  flex: none;
  /* header-actions(40)와 top 정렬 — 한 줄 판정(tops 일치) */
  min-height: 40px;
}
/* a:link/a:visited UA 파란 링크색 방지 — 헤더·404 브랜드 = ink */
a.brand:link,
a.brand:visited,
a.brand:hover,
a.brand:active {
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand-mark { width: 32px; height: 32px; flex: none; }
.brand-mark img { width: 32px; height: 32px; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  .logo-light { display: none; }
  .logo-dark { display: block; }
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-ko { font-weight: 800; font-size: 16px; letter-spacing: -0.02em; color: var(--ink); }
.brand-en { font-size: 11px; color: var(--muted); font-weight: 600; }
/* EN: AdFreely alone = same size/weight/color as KO 애드프리 */
.brand-text .brand-en:only-child {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand-text:has(.brand-en:only-child) {
  flex-direction: row;
  align-items: center;
}

.nav-menu { margin-left: auto; }
.nav-toggle {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font: 650 14px/1 var(--font);
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  border-radius: 10px;
  padding: 8px 12px;
  min-height: 40px;
  box-sizing: border-box;
}
.nav-toggle::-webkit-details-marker { display: none; }
.nav-toggle::after {
  content: "⌄";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  font-size: 12px;
  line-height: 1;
  flex: none;
}
.nav-menu[open] .nav-toggle::after { content: "⌃"; }

.nav {
  position: absolute;
  right: 20px;
  top: calc(var(--header-h) + 8px);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 8px;
  display: flex;
  flex-direction: column;
  min-width: 200px;
}
.nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
}
.nav a:hover { background: var(--bg-soft); color: var(--accent-ink); }
.nav a.is-current { background: var(--bg-soft); color: var(--accent-ink); }

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: none;
  min-height: 40px;
}
.header-lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  font: 650 14px/1 var(--font);
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  border-radius: 10px;
  box-sizing: border-box;
  text-decoration: none;
  white-space: nowrap;
}
.header-lang:hover { color: var(--ink); border-color: var(--accent); }
.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0;
  min-height: 40px;
  padding: 8px 12px;
  font-size: 14px;
  line-height: 1;
  box-sizing: border-box;
  white-space: nowrap;
}
.nav-menu { margin-left: 0; }

@media (min-width: 840px) {
  .nav-toggle { display: none; }
  .nav-menu {
    margin-left: auto;
    position: static;
  }
  .nav {
    position: static;
    flex-direction: row;
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0;
    min-width: 0;
    gap: 2px;
  }
  .nav a { padding: 8px 12px; font-size: 14px; }
  /* keep Install CTA same size as Menu / lang buttons */
  .header-cta { min-height: 40px; padding: 8px 12px; font-size: 14px; }
  .header-lang { min-height: 40px; padding: 8px 12px; font-size: 14px; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 18px;
  border-radius: 14px;
  font: 700 16px var(--font);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
}
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-text); }
.btn-secondary {
  background: var(--bg-elev);
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-secondary:hover { color: var(--ink); border-color: var(--accent); }
.btn-disabled {
  background: var(--bg-elev);
  color: var(--muted);
  border-color: var(--line);
  cursor: default;
  pointer-events: none;
}
/* 헤더 [언어][메뉴][설치] 동일 치수 — .btn 기본(48/10/18/16)보다 특이·나중에 선언 */
a.btn.header-cta,
.btn.header-cta {
  min-height: 40px;
  height: 40px;
  padding: 8px 12px;
  font: 650 14px/1 var(--font);
  border-radius: 10px;
  box-sizing: border-box;
  flex: none;
  white-space: nowrap;
  gap: 0;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-note { font-size: 13px; color: var(--muted); }

/* 출시 이벤트 배너(홈 전용). PC·휴대폰 동일 문구, 좁은 화면에서는 줄바꿈 */
.event-banner {
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.45;
}
.event-banner p {
  width: min(1240px, calc(100% - 40px));
  margin-block: 0;
  padding: 8px 0;
  text-align: center;
  word-break: keep-all;
  overflow-wrap: break-word;
  text-wrap: balance;
}
.event-banner strong { font-weight: 800; margin-right: 4px; }
.event-banner a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-left: 4px;
  white-space: nowrap;
}
@media (max-width: 1023px) {
  .event-banner { font-size: 13px; }
  .event-banner p { width: calc(100% - 32px); }
}

/* Hero */
.hero {
  padding: 48px 0 24px;
  position: relative;
}
.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}
.kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(32px, 6vw, 56px);
  line-height: 1.18;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 0 0 16px;
  /* 히어로 제목: 단어 단위 줄바꿈(KO 한 글자 줄 방지), 줄 길이 균형(EN 외톨이 단어 방지) */
  word-break: keep-all;
  text-wrap: balance;
}
.lede {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--muted);
  margin: 0 0 28px;
  max-width: 36em;
}
.hero-shots {
  /* 모바일·헤드리스 캡처에서도 폰이 가로 가운데 오도록 grid/inline-block 정렬 */
  display: grid;
  justify-items: center;
  justify-content: center;
  align-items: end;
  gap: 16px;
  min-height: 280px;
  padding: 12px 0 28px;
  overflow: visible;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  text-align: center;
}
.phone {
  /* 레거시 CSS 베젤(미사용). 홈페이지 스샷은 전부 .phone-baked PNG(프레임 포함·모서리 alpha=0). */
  position: relative;
  width: min(280px, 100%);
  max-width: min(280px, 100%);
  height: auto;
  flex: none;
  display: inline-block;
  margin-left: auto;
  margin-right: auto;
  margin-inline: auto;
  padding: 10px;
  border: 2px solid #1c1c1e;
  border-radius: 36px;
  background: #0b0b0d;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 12px 36px rgba(0, 0, 0, 0.28);
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.28));
  font: inherit;
  color: inherit;
  text-align: left;
  vertical-align: bottom;
  appearance: none;
  -webkit-appearance: none;
  cursor: zoom-in;
  justify-self: center;
  box-sizing: border-box;
}
.phone::after {
  content: "";
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  max-width: 92px;
  min-width: 64px;
  height: 22px;
  background: #0b0b0d;
  border-radius: 999px;
  z-index: 3;
  pointer-events: none;
}
.phone picture,
.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 26px;
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
  z-index: 1;
}
/* PNG에 frame-iphone-screenshot.py 프레임 있음 → CSS 베젤 끔.
   border-radius는 PNG 바깥 R(108@840 → 36@280)과 일치시킨다.
   더 큰 radius+overflow:hidden은 중심이 어긋나 베이크 모서리 베젤을 잘라
   직선보다 얇아 보이므로(팀장님 17:12) PNG outer를 넘기지 않는다. */
.phone-baked {
  padding: 0;
  border: none;
  /* = PNG outer at width 280; overflow hides UA face in alpha corners */
  border-radius: 36px;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none;
  filter: none;
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
}
button.phone,
button.phone-baked {
  background: transparent !important;
  background-color: transparent !important;
  -webkit-appearance: none;
  appearance: none;
  color: inherit;
}
.phone-baked::after {
  content: none;
  display: none;
}
.phone-baked picture,
.phone-baked img {
  border-radius: 0;
  background: transparent;
  background-color: transparent;
  overflow: visible;
}
/* 그림자는 img alpha만 추종 — 부모 박스 모서리 샘플과 분리 */
.phone-baked img {
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.28));
}
.phone-back { width: min(220px, 36vw); opacity: 0.96; transform: translateY(24px); }
.phone-back::after { top: 14px; height: 18px; max-width: 72px; }
@media (min-width: 900px) {
  .hero { padding: 72px 0 32px; }
  /* 2단 그리드 왼쪽 열(최대 563px)에 KO 제목 한 줄 + 여유 10% 이상 */
  .hero h1 { font-size: clamp(32px, 3.6vw, 46px); }
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 48px; }
  /* max-width도 함께 올려야 width:300이 적용됨(기존 max-width:280이 이기면 radius만 커져 모서리 재클리핑) */
  .phone { width: 300px; max-width: 300px; }
  .phone.phone-baked { border-radius: calc(300px * 108 / 840); } /* = PNG outer ≈38.57 at width 300 */
  .phone-back { width: 240px; }
}

/* Sections */
.section { padding: 56px 0; }
.section-title {
  font-size: clamp(24px, 3.2vw, 36px);
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0 0 10px;
}
.section-lead { color: var(--muted); margin: 0 0 32px; max-width: 40em; }
.card-grid + .section-lead { margin-top: 24px; margin-bottom: 0; }

.section-alt {
  /* body --bg와 동일해야 phone 코너 rendered-bg 샘플이 페이지 bg와 일치 */
  background: var(--bg);
  border-block: 1px solid var(--line);
}
.section-alt .card { background: var(--bg-elev); }

.page-head { padding: 40px 0 8px; }
.page-head h1 {
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 8px 0 12px;
}

/* Cards / features */
.card-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1080px) {
  .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow-sm);
}
.card h3 { margin: 0 0 8px; font-size: 18px; letter-spacing: -0.02em; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }
.icon-pill {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}
.icon-pill svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: 6px;
  padding: 2px 7px;
  vertical-align: 2px;
}
.tag-soon { background: var(--warn-bg); color: var(--warn-ink); }

/* Limit / callout */
.callout {
  border-radius: var(--radius);
  padding: 20px 22px;
  background: var(--accent-soft);
  color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.callout strong { display: block; margin-bottom: 6px; font-size: 16px; }
.callout p { margin: 0; color: var(--ink); }

/* Steps */
.steps { display: grid; gap: 20px; }
@media (min-width: 840px) {
  .steps { grid-template-columns: 1fr 1fr; align-items: start; }
}
.step-list { list-style: none; margin: 0; padding: 0; }
.step-list li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.step-list li:first-child { padding-top: 0; }
.step-n {
  width: 36px;
  height: 36px;
  border-radius: 18px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 800;
  font-size: 15px;
  display: grid;
  place-items: center;
}
.step-list h3 { margin: 0 0 4px; font-size: 17px; }
.step-list p { margin: 0; color: var(--muted); font-size: 15px; }
.step-list p.step-sub { margin-top: 4px; font-size: 13px; color: var(--helper); }
.shot-panel { display: grid; gap: 16px; justify-items: center; justify-content: center; text-align: center; }
.shot-panel figure { margin: 0; width: 100%; display: grid; justify-items: center; }
.shot-panel figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; text-align: center; }
.shot-panel .phone { width: min(300px, 100%); max-width: min(300px, 100%); margin-left: auto; margin-right: auto; justify-self: center; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 4px 16px;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 14px 0;
  letter-spacing: -0.02em;
}
.faq details p { margin: 0 0 16px; color: var(--muted); }

/* Prose (privacy, updates) */
.prose { max-width: 42em; }
.prose h2 { font-size: 22px; margin: 32px 0 10px; letter-spacing: -0.02em; }
.prose p, .prose li { color: var(--muted); }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: 6px; }
.meta { font-size: 14px; color: var(--muted); }

/* Updates list */
.timeline { list-style: none; margin: 0; padding: 0; max-width: 42em; }
.timeline > li {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 12px;
}
.timeline h3 { margin: 0 0 8px; font-size: 18px; }
.timeline .ver { font-weight: 800; }
.timeline time, .timeline .meta { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.timeline ul { margin: 8px 0 0; padding: 0 0 0 1.2em; }
.timeline ul li { margin: 0 0 6px; }
.timeline > li.timeline-example {
  background: transparent;
  border: 1.5px dashed var(--line-strong);
  color: var(--muted);
  box-shadow: none;
}
.timeline-example .ver { color: var(--muted); font-weight: 700; }
.timeline-example ul { color: var(--muted); }

/* Support */
.mail-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 36em;
  box-shadow: var(--shadow-sm);
}
.mail-card a.mail {
  font-size: 20px;
  font-weight: 700;
  word-break: break-all;
}

/* Filters stub */
.filters-stub {
  max-width: 36em;
  margin: 48px auto;
  background: var(--bg-elev);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 28px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 48px;
  margin-top: 24px;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  gap: 28px;
}
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
.footer-brand { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.site-footer h2 { font-size: 13px; margin: 0 0 10px; color: var(--muted); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: 6px; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.legal { margin-top: 28px; color: var(--muted); font-size: 13px; }

/* Pending (확인 필요) — distinct from temporary invented copy */
.copy-pending { position: relative; }
.copy-pending::after {
  content: "확인 필요";
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #F3E8FF;
  color: #6B2FA0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: 2px;
  line-height: 1.5;
}
/* 영어 페이지에서는 표시도 영어로 */
:lang(en) .copy-pending::after { content: "To confirm"; }
:lang(en) .copy-temp::after { content: "Draft copy"; }
@media (prefers-color-scheme: dark) {
  .copy-pending::after { background: #3A2452; color: #E3C6FF; }
}

/* Desktop nav: do not use <details> closed state (UA display:none !important) */
.nav-desktop { display: none; }
@media (min-width: 840px) {
  .nav-menu { display: none; }
  .nav-desktop {
    display: flex;
    margin-left: auto;
    flex-direction: row;
    gap: 2px;
    position: static;
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0;
    min-width: 0;
  }
}

/* App Store pre-launch note */
.soon-note {
  font-size: 14px;
  color: var(--muted);
  margin: 12px 0 0;
}
.price-line {
  font-size: 15px;
  margin: 12px 0 0;
  max-width: 40em;
}

/* Before / after */
.compare {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .compare { grid-template-columns: 1fr 1fr; }
}
.compare figure { margin: 0; }
.compare figcaption, .compare-caption { font-size: 14px; color: var(--muted); margin-top: 12px; text-align: center; }
.compare-caption { max-width: 36em; margin-inline: auto; }
.shot-placeholder {
  min-height: 280px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-soft);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}

/* Feature popup highlight */
/* 기능 페이지: 문구·스샷 겹침/잘림 방지. 좁으면 세로 쌓기, 넓으면 2열 */
.feature-shot {
  display: grid;
  gap: 28px;
  align-items: start;
  justify-items: center;
  justify-content: center;
  overflow: visible;
  text-align: center;
  min-width: 0;
  /* width:100% 금지 — .wrap과 같이 쓰면 wrap 폭 제약을 덮어 @375 본문이 L=0/R=w 됨 */
  max-width: 100%;
  box-sizing: border-box;
}
.wrap.feature-shot {
  width: min(var(--wrap), calc(100% - 40px));
}
.feature-shot > div {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}
.feature-shot > .phone {
  min-width: 0;
  max-width: min(280px, 100%);
  margin-left: auto;
  margin-right: auto;
  margin-inline: auto;
  justify-self: center;
  position: relative;
  z-index: 0;
}
@media (min-width: 840px) {
  .feature-shot {
    grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
    column-gap: 32px;
    justify-items: stretch;
    text-align: start;
  }
  .feature-shot > :first-child {
    justify-self: stretch;
    text-align: start;
    min-width: 0;
  }
  .feature-shot > .phone {
    justify-self: center;
    align-self: start;
  }
}
.feature-shot ul {
  /* 불릿만 좌측 정렬. 블록은 가운데 폭(좁은 화면에서도 잘리지 않게) */
  margin: 12px auto 0;
  padding-left: 1.15em;
  padding-right: 0.25em;
  color: var(--muted);
  text-align: left;
  width: 100%;
  max-width: 36em;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: keep-all;
}
.feature-shot li { text-align: left; min-width: 0; }
.feature-shot li + li { margin-top: 8px; }

/* Don't-do box */
.dont-box {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.dont-box h2 { margin: 0 0 8px; }
.dont-box p { margin: 0; color: var(--muted); }

.card-soon {
  background: var(--bg);
  border-style: dashed;
  opacity: 0.95;
}

/* Install vertical steps */
/* 설치 단계 목록 밖 스샷만 가운데. 단계 문구에 text-align 새지 않음 */
.step-shot {
  display: grid;
  justify-items: center;
  justify-content: center;
  padding: 8px 0 24px;
  overflow: visible;
}
.step-shot .phone {
  margin-left: auto;
  margin-right: auto;
  max-width: min(280px, 100%);
}

.faq-card {
  display: block;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
}
.faq-card:hover { color: inherit; border-color: var(--accent); }
.faq-card h3 { margin: 0 0 6px; }
.faq-card p { margin: 0; color: var(--muted); }

.faq-cat {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 28px 0 10px;
}

/* Privacy narrower column */
.prose-narrow { max-width: 720px; }
.glance {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 0 0 28px;
}
.glance ul { margin: 8px 0 0; padding-left: 1.15em; }
.glance li + li { margin-top: 6px; }

/* Version badges */
.badge-beta { background: var(--accent-soft); color: var(--accent-ink); }
.badge-soon { background: var(--bg-soft); color: var(--muted); }

/* Footer as specified in the copy draft */
.footer-simple { display: grid; gap: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer-links a { color: var(--ink); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--accent); }
.footer-limit { color: var(--muted); margin: 0; }
.footer-mark { color: var(--helper); font-size: 12px; margin: 8px 0 0; line-height: 1.5; }

.prose details {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 4px 16px;
  margin: 16px 0 24px;
}
.prose details summary { cursor: pointer; font-weight: 700; padding: 14px 0; }
.prose details p { margin: 0 0 16px; }
.prose .phone { display: inline-block; margin: 16px auto 28px; margin-left: auto; margin-right: auto; }
.prose { text-align: start; }
.prose > .phone, .prose p + .phone { display: block; }


/* Phone screenshot lightbox. Same on mobile and desktop; not gated by viewport. */
html.lightbox-open,
html.lightbox-open body { overflow: hidden; }
button.phone.phone-lightbox-source { visibility: hidden; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 20px 24px;
  box-sizing: border-box;
}
.lightbox[hidden] { display: none !important; }
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  cursor: zoom-out;
}
.lightbox-dialog {
  position: relative;
  z-index: 1;
  max-width: min(420px, 100%);
  max-height: 100%;
}
/* phone-baked PNG already includes bezel — never add CSS chrome/padding here */
.lightbox-dialog img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(calc(100vh - 80px), 860px);
  display: block;
  margin-inline: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  /* drop-shadow follows PNG alpha (baked bezel), not a second rounded rect */
  filter: drop-shadow(0 16px 40px rgba(0, 0, 0, 0.45));
  pointer-events: none;
}
.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 22px;
  background: #ffffff;
  color: #1c1c1e;
  font: 700 15px var(--font);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.lightbox-close:hover { background: #f2f2f7; }


/* 글리프 우측 잘림 방지(FAIL4): body keep-all + overflow-x:hidden.
   선택자 화이트리스트 금지 — 본문 텍스트 공통 규칙으로 전 페이지 일괄.
   헤더 [언어]/메뉴]/설치]만 nowrap 유지(레이아웃 패리티). */
main :where(
  h1, h2, h3, h4, h5, h6,
  p, li, label, dd, dt,
  .lede, .section-lead, .section-title, .price-line,
  .soon-note, .cta-note, .kicker, .tag
),
main :where(.card, .faq-card, .dont-box, .prose, .feature-shot, .step-list, .timeline, .compare-caption) :where(h1, h2, h3, h4, p, li, span, a),
main :where(a.btn, .btn):not(.header-cta):not(.header-lang):not(.nav-toggle) {
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
  min-width: 0;
}
main :where(.card, .card-grid, .hero-grid, .steps, .feature-shot, .wrap, .page-head, .hero, .section, article, .cta-row) {
  min-width: 0;
  max-width: 100%;
}
main :where(.card-grid, .hero-grid, .feature-shot, .steps) > * {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 768px) {
  main :where(.page-head h1, .hero h1) {
    font-size: clamp(24px, 7.2vw, 34px);
    letter-spacing: -0.02em;
  }
  main .hero h1 {
    font-size: clamp(26px, 7.5vw, 40px);
    letter-spacing: -0.025em;
  }
  main .lede { font-size: clamp(15px, 3.8vw, 18px); }
  main .price-line { font-size: 14px; max-width: 100%; }
  main .card {
    padding: 18px 14px 16px;
  }
  main :where(a.btn, .btn):not(.header-cta):not(.header-lang):not(.nav-toggle) {
    white-space: normal;
    height: auto;
    max-width: 100%;
    text-align: center;
    line-height: 1.25;
    padding-block: 12px;
  }
}
@media (max-width: 360px) {
  main .page-head h1 { font-size: clamp(22px, 6.8vw, 28px); }
  main .hero h1 { font-size: clamp(24px, 7vw, 32px); }
  main .card { padding: 16px 12px 14px; }
  main .card h3 { font-size: 16px; }
  main .card p { font-size: 14.5px; }
  main .price-line { font-size: 13.5px; }
}

/* ≤390: EN「한국어」+Install이 @375에서 clip-right 나지 않게 */
@media (max-width: 390px) {
  .wrap { width: min(var(--wrap), calc(100% - 32px)); }
  .wrap.feature-shot { width: min(var(--wrap), calc(100% - 32px)); }
  .header-inner { gap: 6px; flex-wrap: nowrap; }
  .header-actions { gap: 4px; }
  .header-lang,
  .nav-toggle,
  a.btn.header-cta,
  .btn.header-cta {
    min-height: 40px;
    height: 40px;
    padding: 8px 8px;
    font: 650 13px/1 var(--font);
    border-radius: 10px;
  }
}
@media (max-width: 360px) {
  /* 320: wrap inset 16 → 설치 버튼이 viewport-16 안에. 높이는 40 유지 */
  .wrap { width: min(var(--wrap), calc(100% - 32px)); }
  .wrap.feature-shot { width: min(var(--wrap), calc(100% - 32px)); }
  .header-inner { gap: 4px; flex-wrap: nowrap; }
  .brand { gap: 4px; min-width: 0; min-height: 40px; }
  .brand-mark, .brand-mark img { width: 24px; height: 24px; }
  .brand-ko,
  .brand-text .brand-en:only-child { font-size: 13px; }
  .brand-en { font-size: 9px; }
  .header-actions { gap: 3px; flex: none; min-height: 40px; }
  .header-lang,
  .nav-toggle,
  a.btn.header-cta,
  .btn.header-cta {
    min-height: 40px;
    height: 40px;
    padding: 8px 6px;
    font: 650 12px/1 var(--font);
    border-radius: 10px;
  }
}


/* Seller information (디지니 v3, 2026-11-23). Existing tokens only. */
:root { --seller-ink: var(--helper); }          /* light #666670 */
@media (prefers-color-scheme: dark) {
  :root { --seller-ink: var(--muted); }         /* dark #9A9BA3 */
}
.seller-info {
  margin: 4px 0 0; font-size: 12px; line-height: 1.7;
  color: var(--seller-ink); font-style: normal;
  display: flex; flex-wrap: wrap; column-gap: 0; row-gap: 0;
}
.seller-info .row { display: block; width: 100%; }
.seller-info .item { white-space: nowrap; }
.seller-info .item + .item::before {
  content: "|"; color: var(--line-strong); margin: 0 8px;
}
.seller-info .brn { color: var(--ink); font-weight: 600; }
.seller-info a { color: inherit !important; text-decoration: none; }
.seller-info a:hover { text-decoration: underline; color: var(--ink) !important; }
@media (max-width: 719px) {
  .seller-info .item.wrap-m::before { content: none; }
  .seller-info .item.wrap-m { display: block; width: 100%; }
}
@media (max-width: 719px) { .seller-info .item.nosep-m::before { content: none; } }
/* v2: email value uses the same emphasis as the business registration number */
.seller-info a.em { color: var(--ink) !important; font-weight: 600; }
.seller-info a.em:hover { text-decoration: underline; }
/* ≤374px only: wrap between items so nowrap cannot stretch the footer grid
   (which also clipped the existing footer-limit line). Keep 375px+ unchanged
   (desktop 3 lines, mobile 4). A single item wider than the viewport (EN
   address) may wrap naturally inside. */
@media (max-width: 374px) {
  .footer-simple > *,
  .seller-info,
  .seller-info .row {
    min-width: 0;
    max-width: 100%;
  }
  .seller-info .item {
    display: block;
    width: 100%;
    max-width: 100%;
    white-space: normal; /* short items stay one line; long address wraps */
  }
  .seller-info .item + .item::before { content: none; }
}
