/*
  웹 데모 껍데기. 색은 앱 테마(app/lib/ui/theme.dart 의 AppColors)와 같은
  값을 쓴다 — 폰 안의 앱과 바깥 페이지가 한 제품으로 보여야 한다.
*/

/* 데모 번들에 이미 있는 글꼴. URL 을 엔진과 똑같이 써야 브라우저 캐시를
   함께 쓴다(웹 번들 index.html 의 preload 주석 참조). */
@font-face {
  font-family: "NotoSansKR";
  src: url("app/assets/assets/fonts/NotoSansKR-Regular-subset.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "NotoSansKR";
  src: url("app/assets/assets/fonts/NotoSansKR-Bold-subset.ttf") format("truetype");
  font-weight: 700 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg-top: #1B0821;
  --bg-bottom: #3A1145;
  --nav: #4A1B57;
  --card: #3B1B48;
  --card-dim: #32163D;
  --bright: #A21FD1;
  --bright-dim: #8B18C0;
  --accent: #2EF07A;
  --stop: #F01E8C;
  --text: #FFFFFF;
  --dim: #C9B6D4;
  --faint: #B6A4C2;
  --grid: #5B3A6B;
  --z1: #3B9BE8; --z2: #35E0C0; --z3: #F0E040; --z4: #F0574F; --z5: #E830E8;

  /* 폰 그림의 실제 크기. 화면은 앱 시험 기준(390x844 논리 픽셀)에 맞췄다.
     상태표시줄 47px 은 화면 안이지만 앱 영역은 아니다 — Flutter 웹은
     안전 영역 패딩을 늘 0 으로 주므로, 노치 밑에 앱 글자가 깔리지 않게
     앱을 그 아래에서 시작한다. */
  --screen-w: 390px;
  --screen-h: 844px;
  --bezel: 12px;
  --s: .8; /* demo.js 가 창 크기에 맞춰 다시 정한다 */

  --font: "NotoSansKR", -apple-system, "Apple SD Gothic Neo", sans-serif;
}

* { box-sizing: border-box; }

html {
  /* 가로 스크롤 금지. clip 은 스크롤 컨테이너를 만들지 않아 sticky·snap 을
     안 깬다. */
  overflow-x: clip;
  scroll-behavior: smooth;
  background: var(--bg-top);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font);
  background:
    radial-gradient(1200px 700px at 85% 50%, rgba(162, 31, 209, .22), transparent 60%),
    radial-gradient(800px 500px at 0% 100%, rgba(46, 240, 122, .06), transparent 60%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom)) fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

button { font: inherit; cursor: pointer; }

/* ------------------------------------------------------------ 고정 장식 */

.brand {
  position: fixed; top: 28px; left: 40px; z-index: 5;
  font-weight: 800; font-size: 15px; letter-spacing: .06em;
  color: var(--dim);
}
.brand .dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); margin-right: 10px; vertical-align: middle;
  box-shadow: 0 0 12px var(--accent);
}

.dots {
  position: fixed; left: 40px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 14px; z-index: 5;
}
.dots button {
  width: 10px; height: 10px; padding: 0; border-radius: 50%;
  border: 1.5px solid var(--faint); background: transparent;
  transition: transform .2s, background .2s, border-color .2s;
}
.dots button:hover { transform: scale(1.3); }
.dots button[aria-current="true"] {
  background: var(--accent); border-color: var(--accent);
  transform: scale(1.25); box-shadow: 0 0 10px rgba(46, 240, 122, .6);
}

.counter {
  position: fixed; left: 40px; bottom: 28px; z-index: 5;
  font-size: 13px; color: var(--faint); letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
}
.counter #cur { color: var(--text); font-weight: 700; }
.counter .keys { margin-left: 18px; }
kbd {
  display: inline-block; min-width: 22px; padding: 1px 6px; margin-right: 4px;
  border: 1px solid var(--grid); border-bottom-width: 2px; border-radius: 6px;
  font: 600 12px var(--font); color: var(--dim); text-align: center;
}

/* --------------------------------------------------------------- 슬라이드 */

/* proximity — mandatory 는 창이 낮아 슬라이드가 한 화면을 넘칠 때 아래쪽
   내용을 영영 못 보게 만든다. */
html { scroll-snap-type: y proximity; }
.slide { scroll-snap-align: start; }

.slide {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: center;
  /* 왼쪽은 점 표시, 오른쪽은 고정된 폰 자리. */
  /* 오른쪽 여백 = 폰 폭 + 폰을 오른쪽 끝에서 띄운 거리(.phone-wrap 의 right) +
     숨 쉴 틈. 폰 위치를 바꾸면 여기도 같이 바꿔야 글이 폰 밑으로 안 들어간다. */
  padding: 96px calc(var(--phone-space, 0px) + clamp(40px, 11vw, 220px) + 3vw) 96px max(120px, 9vw);
}
.inner { max-width: 760px; width: 100%; }

.kicker {
  margin: 0 0 22px; font-size: 15px; font-weight: 700;
  color: var(--accent); letter-spacing: .12em;
}
.title {
  margin: 0; font-weight: 900; line-height: .98;
  font-size: clamp(56px, 8.4vw, 132px); letter-spacing: -.035em;
}
.title-end { font-size: clamp(44px, 6vw, 96px); line-height: 1.08; }
.hl {
  color: var(--accent);
  text-shadow: 0 0 40px rgba(46, 240, 122, .35);
}
.head {
  margin: 0 0 40px; font-weight: 900; line-height: 1.1;
  font-size: clamp(36px, 4.6vw, 68px); letter-spacing: -.03em;
}
.lede {
  margin: 34px 0 0; font-size: clamp(19px, 1.7vw, 26px);
  line-height: 1.6; color: var(--dim);
}
.aside { margin: 48px 0 0; font-size: 14px; color: var(--faint); }
.fine { margin: 28px 0 0; font-size: 13px; color: var(--faint); }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 44px; }
.cta {
  border: 0; border-radius: 16px; padding: 16px 28px;
  background: var(--accent); color: #000; font-weight: 800; font-size: 18px;
  box-shadow: 0 10px 30px rgba(46, 240, 122, .25);
  transition: transform .15s, box-shadow .15s;
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(46, 240, 122, .35); }
/* 폰 화면 전용(미디어 쿼리에서 켠다). */
.mobile-only { display: none; }
/* 마무리 슬라이드의 "출시 소식 받기" 는 메인(/)으로 가는 링크(a)다. */
a.cta { display: inline-block; text-decoration: none; }
.ghost {
  border: 1.5px solid var(--grid); border-radius: 16px; padding: 15px 24px;
  background: transparent; color: var(--dim); font-weight: 700; font-size: 17px;
}
.ghost:hover { border-color: var(--faint); color: var(--text); }
.cta:focus-visible, .ghost:focus-visible, .dots button:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 3px;
}

/* ------------------------------------------------------- 5. 마무리 */
.s-end .cta-row { margin-top: 22px; }
/* 마무리 제목은 좁은 화면에서 낱말 중간(선수/가)이 끊기지 않게. */
.title-end { word-break: keep-all; }

/* ------------------------------------------------------------ 2. 지표 */

.metrics {
  /* 3 + 2 배치. 2열로 쌓으면 900px 창에서 마지막 줄이 넘쳤다. */
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px;
}
.metrics .m { grid-column: span 2; }
.metrics .m-wide { grid-column: span 3; }
.metrics .m-zone { grid-column: span 3; }
.m {
  background: linear-gradient(160deg, var(--card), var(--card-dim));
  border: 1px solid rgba(255, 255, 255, .05);
  border-radius: 22px; padding: 20px 22px;
}
.m h3 { margin: 0 0 6px; font-size: 19px; font-weight: 800; }
.m p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--dim); }
.m-vis { height: 52px; margin-bottom: 14px; display: flex; align-items: flex-end; }

.vis-dist b { font-size: 42px; font-weight: 900; font-style: italic; line-height: 1; letter-spacing: -.02em; }
.vis-dist i { font-style: normal; color: var(--faint); margin-left: 6px; font-size: 15px; }

.vis-speed svg { width: 100%; height: 100%; overflow: visible; }
.vis-speed polyline {
  fill: none; stroke: var(--accent); stroke-width: 2.5;
  stroke-linejoin: round; stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(46, 240, 122, .5));
}

.vis-sprint { gap: 7px; }
.vis-sprint span {
  flex: 1; height: calc(var(--h) * 100%); border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, var(--bright), var(--bright-dim));
}

.vis-zone { align-items: center; gap: 3px; }
.vis-zone span { height: 22px; flex: var(--w) 1 0; border-radius: 4px; }
.vis-zone .z1 { background: var(--z1); } .vis-zone .z2 { background: var(--z2); }
.vis-zone .z3 { background: var(--z3); } .vis-zone .z4 { background: var(--z4); }
.vis-zone .z5 { background: var(--z5); }

.vis-heat { height: 52px; }
.vis-heat .pitch { max-width: 150px; }
.pitch {
  position: relative; width: 100%; height: 100%; border-radius: 10px;
  border: 1.5px solid var(--grid); overflow: hidden;
  background:
    radial-gradient(38px 30px at 68% 40%, rgba(240, 87, 79, .95), transparent),
    radial-gradient(60px 42px at 62% 48%, rgba(240, 224, 64, .7), transparent),
    radial-gradient(90px 60px at 55% 55%, rgba(53, 224, 192, .45), transparent),
    radial-gradient(70px 40px at 30% 70%, rgba(59, 155, 232, .45), transparent),
    #24102c;
}
/* 하프라인과 센터서클 */
.pitch::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0;
  border-left: 1.5px solid var(--grid);
}
.pitch i {
  position: absolute; left: 50%; top: 50%; width: 34px; height: 34px;
  transform: translate(-50%, -50%); border: 1.5px solid var(--grid); border-radius: 50%;
}

/* ------------------------------------------------- 3. 어떻게 분석하나 */
/* 소비자에게는 구조(워치→폰→서버)보다 "얼마나 제대로 분석하나" 가 궁금하다
   (운영자 피드백). 카드 모양은 .node 를 그대로 쓰고 2x2 로 깐다. */
.analysis { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.analysis .node { padding: 20px 18px; }
.analysis + .why { margin-top: 18px; }

/* ---------------------------------------------------------- 3. 흐름 */

.flow {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 64px 1fr 64px 1fr; align-items: stretch;
}
.node {
  background: linear-gradient(160deg, var(--card), var(--card-dim));
  border: 1px solid rgba(255, 255, 255, .05);
  border-radius: 22px; padding: 22px 18px;
}
.node-hot {
  background: linear-gradient(160deg, var(--bright), var(--bright-dim));
  box-shadow: 0 18px 50px rgba(162, 31, 209, .35);
}
.node h3 { margin: 12px 0 8px; font-size: 21px; font-weight: 800; }
.node p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--dim); }
.node-hot p { color: #F1E4F7; }
.node b { color: var(--text); }
.ico svg {
  width: 40px; height: 40px; fill: none; stroke: var(--accent);
  stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
}
.node-hot .ico svg { stroke: #fff; }
.arrow { position: relative; display: flex; align-items: center; justify-content: center; }
.arrow::before {
  content: ""; position: absolute; left: 8px; right: 12px; top: 50%;
  border-top: 2px dashed var(--accent); opacity: .7;
}
.arrow::after {
  content: ""; position: absolute; right: 6px; top: calc(50% - 6px);
  border: 6px solid transparent; border-left-color: var(--accent);
}
.arrow span {
  position: relative; top: -18px; font-size: 11px; color: var(--accent);
  white-space: nowrap; letter-spacing: .04em;
}
.why {
  margin-top: 30px; padding: 22px 24px; border-radius: 20px;
  border: 1px solid rgba(46, 240, 122, .35); background: rgba(46, 240, 122, .05);
}
.why h3 { margin: 0 0 8px; font-size: 16px; color: var(--accent); }
.why p { margin: 0; font-size: 16px; line-height: 1.7; color: var(--dim); }
.why b { color: var(--text); }

/* ---------------------------------------------------------- 4. 해보기 */

.steps { margin: 0; padding: 0; list-style: none; counter-reset: st; }
.steps li {
  counter-increment: st; position: relative;
  padding: 14px 0 14px 58px; font-size: clamp(17px, 1.5vw, 21px); color: var(--dim);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.steps li::before {
  content: counter(st); position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #000; font-weight: 900; font-size: 17px;
}
.steps b { color: var(--text); }
/* 폰 속 앱이 알려 주는 지금 단계(demo.js 의 message). 지금 단계는 밝게, 지난
   단계는 ✓ 로. 앱이 아무 말이 없으면(구형 번들·스크립트 실패) 지금처럼 다
   보인다 — 강조는 덤이다. */
.steps li { transition: color .3s, background .3s, padding-left .3s; border-radius: 14px; }
.steps li::before { transition: background .3s, color .3s, box-shadow .3s; }
.steps li.now { color: var(--text); background: rgba(46, 240, 122, .13); padding-left: 64px; }
.steps li.now::before { left: 10px; box-shadow: 0 0 0 6px rgba(46, 240, 122, .22); animation: step-pulse 1.6s ease-in-out infinite; }
.steps li.done { color: var(--faint); }
.steps li.done b { color: var(--dim); }
.steps li.done::before { content: "✓"; background: rgba(46, 240, 122, .18); color: var(--accent); }
@keyframes step-pulse { 50% { box-shadow: 0 0 0 11px rgba(46, 240, 122, .08); } }

/* 첫 화면 아래의 "아래로" 표시. 버튼이라 눌러도 넘어간다. */
.scroll-cue {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: none; border: 0; cursor: pointer;
  color: var(--dim); font: inherit; font-size: 13px; letter-spacing: .08em;
}
.scroll-cue i { font-style: normal; font-size: 22px; color: var(--accent); animation: cue-bob 1.8s ease-in-out infinite; }
.scroll-cue:hover { color: var(--text); }
@keyframes cue-bob { 50% { transform: translateY(7px); } }
.note { margin: 26px 0 0; font-size: 15px; line-height: 1.75; color: var(--faint); }
.note b { color: var(--dim); }

/* 자동 넘김 진행 막대. 맨 위 얇은 초록 줄이 차오르면 다음 섹션. */
.autobar {
  position: fixed; z-index: 40; top: 0; left: 0; height: 3px; width: 0;
  background: var(--accent); box-shadow: 0 0 12px rgba(46, 240, 122, .6);
  pointer-events: none;
}

/* 자동 재생 중 표시(Space 로 켜고 끈다). */
.autostate {
  position: fixed; z-index: 40; right: 28px; bottom: 26px; margin: 0;
  padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
  color: #000; background: var(--accent); box-shadow: 0 8px 24px rgba(46, 240, 122, .3);
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .3s, transform .3s;
}
.autostate kbd { background: rgba(0, 0, 0, .15); color: #000; border-color: transparent; }
body.autoplaying .autostate { opacity: 1; transform: none; }
.aside kbd { font-size: 12px; }

/* ------------------------------------------------------------ 섹션 등장 */
/* 섹션이 보이면(demo.js 가 .is-in) 제목·글·카드가 아래에서 차례로 떠오른다.
   html.js 일 때만 숨긴다 — 스크립트가 실패하면 그냥 다 보인다. 폰 그림은
   고정 위치라 움직이지 않는다. */
html.js .slide .inner > *,
html.js .slide .metrics > *,
html.js .slide .analysis > * {
  opacity: 0; transform: translateY(26px);
  transition: opacity .7s cubic-bezier(.2, .8, .2, 1), transform .7s cubic-bezier(.2, .8, .2, 1);
}
html.js .slide.is-in .inner > *,
html.js .slide.is-in .metrics > *,
html.js .slide.is-in .analysis > * { opacity: 1; transform: none; }
html.js .slide.is-in .inner > *:nth-child(2) { transition-delay: .08s; }
html.js .slide.is-in .inner > *:nth-child(3) { transition-delay: .16s; }
html.js .slide.is-in .inner > *:nth-child(4) { transition-delay: .24s; }
html.js .slide.is-in .inner > *:nth-child(5) { transition-delay: .32s; }
html.js .slide.is-in .metrics > *:nth-child(1), html.js .slide.is-in .analysis > *:nth-child(1) { transition-delay: .22s; }
html.js .slide.is-in .metrics > *:nth-child(2), html.js .slide.is-in .analysis > *:nth-child(2) { transition-delay: .30s; }
html.js .slide.is-in .metrics > *:nth-child(3), html.js .slide.is-in .analysis > *:nth-child(3) { transition-delay: .38s; }
html.js .slide.is-in .metrics > *:nth-child(4), html.js .slide.is-in .analysis > *:nth-child(4) { transition-delay: .46s; }
html.js .slide.is-in .metrics > *:nth-child(5) { transition-delay: .54s; }

/* ------------------------------------------------------------- 폰 그림 */

.phone-wrap {
  position: fixed; z-index: 4;
  /* 오른쪽 끝에 붙이면 넓은 화면에서 글과 폰 사이가 휑하다(운영자 피드백).
     조금 안쪽으로 — 글 칸(최대 760px)과는 겹치지 않는 선에서. */
  right: clamp(40px, 11vw, 220px); top: 50%;
  transform: translateY(-50%) scale(var(--s));
  transform-origin: right center;
  transition: transform .5s cubic-bezier(.2, .8, .2, 1), filter .5s;
}
.phone {
  position: relative;
  width: calc(var(--screen-w) + 2 * var(--bezel));
  height: calc(var(--screen-h) + 2 * var(--bezel));
  padding: var(--bezel);
  border-radius: 66px;
  /* 바깥 테(금속 느낌)와 안쪽 검은 베젤을 그림자 두 겹으로. */
  background: linear-gradient(150deg, #34303a 0%, #121016 45%, #2a2630 100%);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, .18),
    inset 0 0 0 7px #050406,
    0 50px 100px -20px rgba(0, 0, 0, .7),
    0 30px 60px -30px rgba(0, 0, 0, .8),
    0 0 140px rgba(162, 31, 209, .25);
}
/* 측면 버튼. 실제 기종을 흉내 내지 않는 범용 배치. */
.btn {
  position: absolute; width: 4px; border-radius: 2px;
  background: linear-gradient(90deg, #1a181d, #46424c);
}
.btn-action { left: -3px; top: 150px; height: 32px; }
.btn-vol1 { left: -3px; top: 210px; height: 62px; }
.btn-vol2 { left: -3px; top: 286px; height: 62px; }
.btn-power { right: -3px; top: 240px; height: 98px; background: linear-gradient(270deg, #1a181d, #46424c); }

.screen {
  position: relative; width: 100%; height: 100%;
  border-radius: 54px; overflow: hidden;
  background: var(--bg-top);
  display: flex; flex-direction: column;
  /* 사파리에서 둥근 모서리가 iframe 위에서 풀리는 것을 막는다. */
  isolation: isolate;
}
/* 유리 반사광. 눌림을 가로채지 않는다. */
.screen::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(118deg, rgba(255, 255, 255, .09) 0%, rgba(255, 255, 255, .02) 28%, transparent 42%);
}
.status {
  flex: 0 0 47px; position: relative;
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 30px 0 38px; background: #12051A;
  font-size: 15px; font-weight: 700; color: #fff;
}
.island {
  position: absolute; left: 50%; top: 10px; transform: translateX(-50%);
  width: 118px; height: 33px; border-radius: 20px; background: #000;
}
.sig { display: flex; align-items: flex-end; gap: 2px; }
.sig i { display: block; width: 3px; background: #fff; border-radius: 1px; }
.sig i:nth-child(1) { height: 4px; } .sig i:nth-child(2) { height: 6px; }
.sig i:nth-child(3) { height: 8px; } .sig i:nth-child(4) { height: 10px; }
.batt {
  margin-left: 8px; width: 24px; height: 11px; border-radius: 3px;
  border: 1.2px solid rgba(255, 255, 255, .6); position: relative;
}
.batt::after { content: ""; position: absolute; inset: 1.5px 5px 1.5px 1.5px; background: #fff; border-radius: 1px; }
#app { flex: 1; width: 100%; border: 0; display: block; background: var(--bg-top); }

.phone-hint {
  position: absolute; left: -128px; top: 50%; margin: 0;
  color: var(--accent); font-weight: 800; font-size: 18px;
  opacity: 0; transform: translateX(10px);
  transition: opacity .4s, transform .4s;
}
/* 4번 슬라이드에서는 폰이 주인공이다. 살짝 키우고 초록 빛을 두른다. */
body[data-slide="3"] .phone-wrap { transform: translateY(-50%) scale(calc(var(--s) * 1.04)); }
body[data-slide="3"] .phone { box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, .18),
    inset 0 0 0 7px #050406,
    0 50px 100px -20px rgba(0, 0, 0, .7),
    0 0 0 2px rgba(46, 240, 122, .55),
    0 0 90px rgba(46, 240, 122, .28); }
body[data-slide="3"] .phone-hint { opacity: 1; transform: none; }

/* 데스크톱에서 4번 슬라이드의 글은 고정 폰 왼쪽에 놓인다. */
.s-try .inner { max-width: 620px; }

/* ------------------------------------------------- 좁은 화면(폰·태블릿 세로) */
/*
  폰으로 /demo 를 열면 폰 그림 속 폰은 의미가 없다. 그림을 걷고 4번 슬라이드
  안에 앱을 거의 꽉 차게 둔다. 슬라이드 넘김 강제(snap)도 끈다 — 앱 안의
  스크롤과 페이지 스크롤이 서로 다투면 둘 다 못 쓴다.
*/
/* ------------------------------------------------- 낮은 데스크톱 창 */
/* [실측] 1440x900 노트북(보이는 높이 813)에서 3번 섹션이 923 이라 아래
   "앱이 좋아지면…" 상자가 화면 밖으로 잘리고 쪽번호와 겹쳤다. 높이가 낮은
   창에서는 위아래 여백·제목·카드를 높이에 맞춰 줄인다. 넓은 화면의
   모양은 그대로다. */
@media (min-width: 960px) and (min-height: 600px) and (max-height: 1000px) {
  .slide { padding-top: clamp(56px, 8vh, 96px); padding-bottom: clamp(64px, 9vh, 96px); }
  .head { font-size: clamp(34px, min(4.6vw, 6.6vh), 68px); margin-bottom: clamp(20px, 3.6vh, 40px); }
  .kicker { margin-bottom: clamp(12px, 2vh, 22px); }
  .analysis { gap: clamp(10px, 1.5vh, 16px); }
  .analysis .node { padding: clamp(12px, 1.9vh, 20px) 18px; }
  .analysis .node h3 { margin: clamp(6px, 1vh, 12px) 0 6px; font-size: clamp(17px, 2.3vh, 21px); }
  .analysis + .why { margin-top: clamp(10px, 1.6vh, 18px); }
  .why { padding-top: clamp(12px, 1.8vh, 20px); padding-bottom: clamp(12px, 1.8vh, 20px); }
  .title { font-size: clamp(48px, min(8.4vw, 13vh), 132px); }
  .lede { margin-top: clamp(16px, 3.4vh, 34px); }
  .aside { margin-top: clamp(20px, 4.4vh, 48px); }
  .metrics { gap: clamp(10px, 1.5vh, 14px); }
  .m { padding-top: clamp(12px, 2vh, 20px); padding-bottom: clamp(12px, 2vh, 20px); }
  .m-vis { height: clamp(40px, 5.6vh, 52px); margin-bottom: clamp(8px, 1.4vh, 14px); }
  .m p, .node p { line-height: 1.5; }
}

/* 더 낮은 창(1280x720·1366x768 노트북)에서는 위 축소로도 3번이 넘친다.
   분석 카드의 아이콘을 제목 옆으로 옮겨 한 줄씩 아낀다. */
@media (min-width: 960px) and (min-height: 600px) and (max-height: 760px) {
  .analysis .node {
    display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; align-items: center;
  }
  .analysis .ico { grid-row: 1; }
  .analysis .ico svg { width: 30px; height: 30px; }
  .analysis .node h3 { margin: 0; }
  .analysis .node p { grid-column: 1 / -1; margin-top: 6px; }
}

@media (max-width: 959px), (max-height: 599px) {
  /* ================= 모바일 — 처음부터 다시 그린 레이아웃 =================
     데스크톱 발표 레이아웃을 줄여 쓰던 것을 버리고 폰 기준으로 새로 짰다
     (운영자: "모바일 버전이 미학적으로 애바"). 원칙:
     - 한 열, 좌우 20px, 섹션 사이 숨 쉴 틈(72px), 글은 짧고 크게.
     - 카드 하나의 모양(둥근 22px, 옅은 테두리, 위에서 아래로 짙어지는 바탕)을
       모든 블록이 같이 쓴다 — 블록마다 모양이 다르면 조잡해 보인다.
     - 초록은 "누를 것" 에만. 장식에는 보라·흰색만. */
  /* 섹션 하나 = 화면 하나(운영자: 슬라이드가 한 화면을 넘치지 않게). 높이를
     화면에 맞추고 넘치면 자른다 — 그래서 아래 크기들은 작은 폰(SE, 화면 높이
     ~550px)에서도 들어가게 잡았다. 넘길 때는 섹션 단위로 딱딱 멈춘다. */
  html { scroll-snap-type: y mandatory; }
  body { background: radial-gradient(120% 60% at 50% 0%, #3A1145 0%, var(--bg-top) 60%) fixed; }
  .desk-only, .dots, .counter { display: none !important; }
  .mobile-only { display: inline-flex; }

  /* 위 막대: 반투명 + 흐림. 어디서든 사전 등록으로 갈 수 있게. */
  .brand {
    position: fixed; z-index: 20; top: 0; left: 0; right: 0;
    height: 56px; padding: 0 20px; padding-top: env(safe-area-inset-top);
    display: flex; align-items: center; gap: 10px;
    font-size: 15px; letter-spacing: .02em;
    background: rgba(27, 8, 33, .72);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
  }
  .top-cta {
    position: fixed; z-index: 21; top: calc(10px + env(safe-area-inset-top)); right: 16px;
    height: 36px; padding: 0 16px; align-items: center; border-radius: 999px;
    background: var(--accent); color: #000; font-weight: 800; font-size: 14px; text-decoration: none;
  }

  .slide {
    height: 100svh; min-height: 0; overflow: hidden;
    display: flex; flex-direction: column; justify-content: center;
    padding: calc(64px + env(safe-area-inset-top)) 20px calc(16px + env(safe-area-inset-bottom));
    scroll-snap-align: start; scroll-snap-stop: always;
  }
  .inner { max-width: 520px; margin: 0 auto; }
  .kicker {
    display: inline-block; margin: 0 0 14px; padding: 6px 12px; border-radius: 999px;
    background: rgba(46, 240, 122, .1); font-size: 12px; letter-spacing: .1em;
  }
  .head { font-size: clamp(24px, 3.6svh, 30px); line-height: 1.22; letter-spacing: -.02em; margin: 0 0 clamp(12px, 2.2svh, 22px); }

  /* 1. 표지 */
  .s-cover { justify-content: center; padding-bottom: 96px; position: relative; }
  .s-cover::before { /* 은은한 빛 덩어리 하나 — 장식은 이것뿐 */
    content: ""; position: absolute; width: 420px; height: 420px; right: -160px; top: 8%;
    background: radial-gradient(circle, rgba(162, 31, 209, .55), transparent 65%);
    filter: blur(10px); pointer-events: none;
  }
  .s-cover .inner { position: relative; }
  .title { font-size: clamp(56px, 17vw, 84px); line-height: .98; letter-spacing: -.035em; margin: 0 0 22px; }
  .lede { font-size: 20px; line-height: 1.5; margin: 0; color: var(--dim); }
  .s-cover .cta-row { margin-top: 36px; }
  .cta-row { display: grid; gap: 12px; }
  .cta, a.cta, .ghost {
    display: flex; justify-content: center; align-items: center;
    width: 100%; height: 56px; padding: 0 20px; border-radius: 16px; font-size: 17px;
  }
  .scroll-cue { bottom: calc(22px + env(safe-area-inset-bottom)); }

  /* 공통 카드 */
  .m, .node, .why, .phone-card {
    background: linear-gradient(180deg, rgba(74, 27, 87, .55), rgba(50, 22, 61, .55));
    border: 1px solid rgba(255, 255, 255, .07); border-radius: 22px;
  }

  /* 2. 무엇을 재나 — 2열, 거리·히트맵은 가로 전체 */
  .metrics { grid-template-columns: 1fr 1fr; gap: 12px; }
  .metrics { gap: 10px; }
  .metrics .m, .metrics .m-zone, .metrics .m-wide { grid-column: span 1; }
  .metrics .m:first-child { grid-column: span 2; }
  .m { padding: clamp(12px, 1.8svh, 16px) 14px; }
  .m-vis { height: clamp(26px, 4svh, 36px); margin-bottom: 8px; }
  .vis-dist b { font-size: clamp(30px, 4.6svh, 38px); }
  .vis-heat { height: clamp(26px, 4svh, 36px); }
  .m h3 { font-size: 15px; margin: 0 0 2px; }
  .m p { font-size: 12px; line-height: 1.45; margin: 0; color: var(--faint); }

  /* 3. 어떻게 분석하나 — 아이콘 + 글 한 줄짜리 행 */
  .analysis { grid-template-columns: 1fr; gap: 8px; }
  .analysis .node {
    display: grid; grid-template-columns: 48px 1fr; column-gap: 14px; row-gap: 2px;
    align-items: center; padding: clamp(11px, 1.7svh, 16px) 14px;
  }
  .analysis .node-hot { background: linear-gradient(135deg, var(--bright), var(--bright-dim)); border-color: transparent; }
  .analysis .ico {
    grid-row: span 2; width: 48px; height: 48px; border-radius: 14px;
    display: grid; place-items: center; background: rgba(255, 255, 255, .08);
  }
  .analysis .ico svg { width: 26px; height: 26px; }
  .analysis .node h3 { margin: 0; font-size: 16px; }
  .analysis .node p { margin: 0; font-size: 12.5px; line-height: 1.45; }
  .analysis + .why { margin-top: 12px; padding: 16px 18px; border-color: rgba(46, 240, 122, .35); }
  .why h3 { font-size: 15px; margin: 0 0 4px; }
  .why p { font-size: 14px; }

  /* 4. 직접 해보기 — 짧은 단계 목록, 폰 카드, 큰 버튼 */
  /* 4번은 폰이 주인공이라 한 화면에 넣으려면 안내를 한 줄로 접는다. 단계는
     짧은 이름(data-short)만, 남은 높이는 전부 폰 카드가 쓴다. */
  .s-try { justify-content: flex-start; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .s-try .inner { flex: none; margin: 0 auto; width: 100%; }
  .s-try .kicker { display: none; }
  .s-try .head br { display: none; }
  .note { display: none; }
  .steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .steps li {
    font-size: 0; padding: 8px 2px; border: 0; text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    background: rgba(255, 255, 255, .04); border-radius: 12px;
  }
  .steps li::before { position: static; transform: none; width: 24px; height: 24px; font-size: 12px; }
  .steps li::after { content: attr(data-short); font-size: 11.5px; font-weight: 700; color: var(--dim); white-space: nowrap; }
  .steps li.now { padding-left: 2px; background: rgba(46, 240, 122, .14); }
  .steps li.now::before { left: auto; }
  .steps li.now::after { color: var(--text); }
  .phone-wrap {
    position: static; transform: none !important;
    margin: 12px auto 0; width: min(100%, 390px); flex: 1; min-height: 0;
    display: flex; flex-direction: column; align-items: stretch; gap: 10px;
  }
  .phone {
    width: 100%; flex: 1; height: auto; min-height: 0;
    padding: 0; border-radius: 30px; background: #050406; overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 30px 70px -10px rgba(0, 0, 0, .7), 0 0 0 6px rgba(255, 255, 255, .03) !important;
  }
  .btn, .status, .screen::after { display: none; }
  .screen { border-radius: 29px; }
  .open-full {
    flex: none; justify-content: center; align-items: center; gap: 8px; height: 52px; border-radius: 16px;
    background: var(--accent); color: #000; font-weight: 800; font-size: 17px; text-decoration: none;
    box-shadow: 0 12px 32px rgba(46, 240, 122, .28);
  }

  /* 5. 마무리 — 가운데 정렬로 끝맺는다 */
  .s-end { text-align: center; }
  .title-end { font-size: clamp(40px, 11.5vw, 56px); line-height: 1.12; letter-spacing: -.03em; }
  .s-end .lede { font-size: 17px; }
  .s-end .cta-row { margin-top: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  /* 끄지 않고 줄인다 — demo.js 의 reduceMotion 주석. 반복 애니메이션만 멈춘다. */
  .scroll-cue i, .steps li.now::before { animation: none; }
  html.js .slide .inner > *, html.js .slide .metrics > *, html.js .slide .analysis > * {
    transform: translateY(8px);
  }
  html.js .slide.is-in .inner > *, html.js .slide.is-in .metrics > *, html.js .slide.is-in .analysis > * {
    transform: none;
  }
}
