/* LOG JUMP 데모 — LOG ABS 토큰(src/shared/lib/theme.ts, 10/19)을 그대로 옮기고 화면만 점프용으로 짰다. */
:root {
  --sys: -apple-system, "SF Pro Display", "SF Pro Text", "Apple SD Gothic Neo", "Pretendard", system-ui, sans-serif;
  --page: #0b0b0c;
  --panel: #141416;
  --bg: #000000;
  --card: #1c1c1e;
  --elevated: #2c2c2e;
  --label: #ffffff;
  --label2: rgba(235, 235, 245, 0.62);
  --label3: rgba(235, 235, 245, 0.3);
  --sep: rgba(84, 84, 88, 0.65);
  --brand: #ffffff;
  --on-brand: #000000;
  --glass: rgba(44, 44, 46, 0.72);
  --glass-edge: rgba(255, 255, 255, 0.12);
  --empty: #151517;
  --track: rgba(255, 255, 255, 0.2);
  --seg-track: rgba(118, 118, 128, 0.24);
  --seg-on: #636366;
  --a1: #ffb37a; --a2: #f57a45; --a3: #d9532b; /* 오후 햇빛 빨강 */
  --accent: linear-gradient(180deg, var(--a1) 0%, var(--a2) 45%, var(--a3) 100%);
  --ph-unweight: rgba(120, 160, 255, 0.11);
  --ph-brake: rgba(255, 179, 122, 0.16);
  --ph-push: rgba(245, 122, 69, 0.26);
  --warn: #ff9f0a;
  --up: #30d158; --down: #ff453a; /* 10/28 현우: 오르면 초록, 떨어지면 빨강 */
  --low: #ff453a;
  color-scheme: dark;
}
html[data-theme="light"] {
  --page: #e9e9ee;
  --panel: #f6f6f8;
  --bg: #ffffff;
  --card: #f2f2f7;
  --elevated: #e5e5ea;
  --label: #000000;
  --label2: rgba(60, 60, 67, 0.6);
  --label3: rgba(60, 60, 67, 0.3);
  --sep: rgba(60, 60, 67, 0.2);
  --brand: #000000;
  --on-brand: #ffffff;
  --glass: rgba(242, 242, 247, 0.85);
  --glass-edge: rgba(0, 0, 0, 0.08);
  --empty: #eeeef1;
  --track: rgba(0, 0, 0, 0.12);
  --seg-track: rgba(118, 118, 128, 0.12);
  --seg-on: #ffffff;
  --a1: #ff6f82; --a2: #f0405a; --a3: #c8263f; /* 라이트는 쿨톤 빨강(LOG ABS 와 같음) */
  --ph-unweight: rgba(60, 110, 255, 0.12);
  --ph-brake: rgba(255, 140, 80, 0.14);
  --ph-push: rgba(240, 64, 90, 0.16);
  --warn: #c93400;
  --up: #248a3d; --down: #d70015;
  --low: #d70015;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--page);
  color: var(--label);
  font-family: var(--sys);
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
input, select { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }

/* ───────── 바깥(데스크톱): 왼쪽 안내 + 오른쪽 폰 ───────── */
.shell { display: grid; grid-template-columns: 320px 1fr; height: 100dvh; }
.side { background: var(--panel); border-right: 1px solid var(--sep); display: flex; flex-direction: column; min-height: 0; overflow-y: auto; }
.side .brand { padding: 24px 24px 16px; border-bottom: 1px solid var(--sep); }
.side h1 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.3px; display: flex; align-items: center; gap: 9px; }
.side h1 i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.side p { margin: 8px 0 0; font-size: 13px; line-height: 1.55; color: var(--label2); }
.side .qr { margin: 16px 24px 4px; display: flex; gap: 14px; align-items: center; }
.side .qr .code { width: 96px; height: 96px; background: #fff; border-radius: 12px; padding: 8px; flex: none; }
.side .qr .code img, .side .qr .code canvas { width: 100% !important; height: 100% !important; }
.side .qr small { font-size: 12px; line-height: 1.5; color: var(--label2); }
.side .qr small b { color: var(--label); }
.side .group { padding: 14px 12px 4px; }
.side .ch { margin: 4px 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.4px; color: var(--label3); }
.side .st { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 12px; border-radius: 10px; font-size: 14px; color: var(--label2); }
.side .st:hover { background: var(--card); color: var(--label); }
.side .st.on { background: var(--card); color: var(--label); font-weight: 600; }
.side .st .tag { margin-left: auto; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 8px; background: var(--seg-track); color: var(--label2); }
.side .st .tag.set { background: rgba(48, 209, 88, 0.16); color: #30d158; }
html[data-theme="light"] .side .st .tag.set { color: #248a3d; }
.side .foot { margin-top: auto; padding: 14px 24px 18px; border-top: 1px solid var(--sep); font-size: 12px; line-height: 1.6; color: var(--label3); }
.stage { display: grid; place-items: center; min-width: 0; min-height: 0; overflow: hidden; }
.device {
  position: relative;
  width: 390px; height: 844px;
  border-radius: 52px;
  background: var(--bg);
  box-shadow: 0 0 0 10px #1b1c1f, 0 30px 80px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  transform-origin: center;
}
html[data-theme="light"] .device { box-shadow: 0 0 0 10px #d1d1d6, 0 30px 80px rgba(0, 0, 0, 0.18); }

/* 폰에서 열면 바깥 없이 화면 전체 */
@media (max-width: 760px) {
  .shell { display: block; }
  .side { display: none; }
  .stage { display: block; height: 100dvh; }
  .device { width: 100vw; height: 100dvh; border-radius: 0; box-shadow: none !important; transform: none !important; }
}

/* ───────── 화면 공통 ───────── */
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); overflow: hidden; }
.scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 120px; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }
/* 10/28: 스크롤하면 글자가 상태바(시계) 밑으로 올라가 겹쳤다 — 스크롤 화면 위에 배경색 띠를 깐다 */
.screen:has(> .scroll)::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: max(50px, env(safe-area-inset-top)); background: linear-gradient(var(--bg) 75%, transparent); z-index: 7; pointer-events: none; }
.screen:has(> .scroll)::after { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 170px; background: linear-gradient(transparent, var(--bg) 62%); z-index: 4; pointer-events: none; } /* 아래도 — 내용이 버튼 뒤로 비치지 않게 */
.pad { padding: 0 20px; }
.safe-top { padding-top: max(56px, env(safe-area-inset-top)); }
.fade-in { animation: fadein 0.28s ease both; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fade-in { animation: none; } }

/* 버튼 — LOG 규칙: 아래 줄 54 / 위 아이콘 40 / 칩 32, 곡률은 높이의 절반 */
.btn { height: 54px; border-radius: 27px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 17px; font-weight: 600; width: 100%; }
.btn.primary { background: var(--brand); color: var(--on-brand); }
.btn.glass { background: var(--glass); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); box-shadow: inset 0 0 0 0.5px var(--glass-edge); color: var(--label); }
.btn.on-photo.glass { background: rgba(44, 44, 46, 0.72); color: #fff; box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.12); }
.btn:disabled { opacity: 0.35; cursor: default; }
.btn svg { width: 15px; height: 15px; }
.icon-btn { width: 40px; height: 40px; border-radius: 20px; display: grid; place-items: center; background: var(--glass); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); box-shadow: inset 0 0 0 0.5px var(--glass-edge); flex: none; }
.icon-btn.on-photo { background: rgba(44, 44, 46, 0.6); color: #fff; }
.icon-btn svg { width: 18px; height: 18px; }
.chip { height: 32px; border-radius: 16px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; background: var(--glass); box-shadow: inset 0 0 0 0.5px var(--glass-edge); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.actions { position: absolute; left: 20px; right: 20px; bottom: max(34px, env(safe-area-inset-bottom)); display: grid; gap: 10px; grid-template-columns: 1fr; z-index: 5; }
.actions.two { grid-template-columns: 141px 1fr; }

/* 사진 */
.media { position: relative; flex: none; overflow: hidden; }
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 160px; background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0)); z-index: 1; }
.media::after { content: ""; position: absolute; inset: auto 0 0 0; height: 55%; background: linear-gradient(rgba(0, 0, 0, 0), var(--bg)); z-index: 1; }
.ai-mark { position: absolute; right: 12px; bottom: 10px; z-index: 2; font-size: 10px; color: rgba(255, 255, 255, 0.55); }
.ai-mark { display: none; } /* 10/28 민성: 사진 위 "AI 생성" 표시는 뺀다. 알림은 설정 화면 맨 아래 한 줄로 */

/* 웰컴 */
.welcome .media { position: absolute; inset: 0; }
.welcome .media::after { height: 62%; background: linear-gradient(rgba(0, 0, 0, 0), #000 88%); }
.welcome .copy { position: absolute; left: 0; right: 0; bottom: 120px; z-index: 2; padding: 0 24px; color: #fff; }
.welcome .logo { font-size: 14px; font-weight: 800; letter-spacing: 2px; display: flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, 0.8); }
.welcome h1 { margin: 12px 0 0; font-size: 34px; line-height: 1.22; font-weight: 800; letter-spacing: -0.6px; }
.welcome .actions .btn.primary { background: #fff; color: #000; }

/* 설문 */
.top { display: flex; align-items: center; gap: 12px; padding: max(56px, env(safe-area-inset-top)) 20px 0; }
.steps { flex: 1; display: grid; gap: 4px; }
.steps i { height: 4px; border-radius: 2px; background: var(--track); }
.steps i.on { background: var(--label); }
.q h1 { margin: 28px 0 6px; font-size: 28px; line-height: 1.25; font-weight: 800; letter-spacing: -0.5px; }
.q .sub { margin: 0 0 22px; font-size: 15px; color: var(--label2); }
.opts { display: grid; gap: 10px; }
.opts.two { grid-template-columns: 1fr 1fr; }
.opts.three { grid-template-columns: repeat(3, 1fr); }
.opt { min-height: 60px; border-radius: 18px; background: var(--card); padding: 14px 16px; text-align: left; font-size: 17px; font-weight: 600; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.opt span { font-size: 13px; font-weight: 500; color: var(--label2); }
.opt[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--label); }
.fields { display: grid; gap: 10px; }
.field { display: flex; align-items: center; justify-content: space-between; height: 58px; border-radius: 18px; background: var(--card); padding: 0 16px; font-size: 17px; }
.field label { color: var(--label2); font-size: 15px; }
.field .in { display: flex; align-items: baseline; gap: 4px; }
.field input { width: 84px; text-align: right; background: none; border: 0; outline: none; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.field select { background: none; border: 0; outline: none; font-size: 18px; font-weight: 700; text-align: right; appearance: none; -webkit-appearance: none; }
.field .u { color: var(--label2); font-size: 15px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--seg-track); border-radius: 9px; padding: 2px; height: 34px; }
.seg button { border-radius: 7px; font-size: 14px; font-weight: 600; color: var(--label); }
.seg button[aria-pressed="true"] { background: var(--seg-on); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.seg button:disabled { color: var(--label3); }

/* 제외 */
.excluded { justify-content: center; align-items: center; text-align: center; padding: 0 32px; }
.excluded .ic { width: 72px; height: 72px; border-radius: 36px; background: var(--card); display: grid; place-items: center; margin-bottom: 20px; }
.excluded h1 { margin: 0; font-size: 26px; font-weight: 800; line-height: 1.3; }
.excluded p { margin: 10px 0 0; font-size: 15px; line-height: 1.55; color: var(--label2); }

/* 홈 */
.home-top { display: flex; align-items: center; gap: 8px; padding: max(56px, env(safe-area-inset-top)) 20px 14px; }
.home-top .date { font-size: 17px; font-weight: 700; margin-right: auto; }
.hero { position: relative; margin: 0 20px; height: 300px; border-radius: 24px; overflow: hidden; color: #fff; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.75) 100%); }
.hero .cap { position: absolute; left: 20px; right: 20px; bottom: 18px; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; }
.hero small { display: block; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.75); }
.hero .big { font-size: 48px; font-weight: 800; letter-spacing: -1px; line-height: 1.05; }
.hero .big u { text-decoration: none; font-size: 20px; font-weight: 700; margin-left: 3px; color: rgba(255, 255, 255, 0.8); }
.hero .delta { font-size: 15px; font-weight: 700; color: rgba(255, 255, 255, 0.92); text-align: right; }
.hero .ai-mark { right: 14px; top: 12px; bottom: auto; }
.card { margin: 12px 20px 0; border-radius: 20px; background: var(--card); padding: 16px; }
.card h3 { margin: 0; font-size: 13px; font-weight: 600; color: var(--label2); display: flex; align-items: center; gap: 8px; }
.card h3 .r { margin-left: auto; color: var(--label3); font-weight: 500; }
.cond { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.cond .state { font-size: 22px; font-weight: 800; }
.cond .state.low { color: var(--low); }
.cond .state.ok { color: var(--label); }
.cond .note { margin-left: auto; text-align: right; font-size: 13px; color: var(--label2); }
.base-dots { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin-top: 12px; }
.base-dots i { height: 6px; border-radius: 3px; background: var(--track); }
.base-dots i.f { background: var(--label); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-top: 12px; align-items: end; height: 108px; }
.week .d { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.week .bar { width: 100%; border-radius: 8px; background: var(--empty); min-height: 8px; position: relative; }
.week .bar.f { background: var(--accent); }
.week .bar.today { box-shadow: inset 0 0 0 1.5px var(--label); }
.week .bar b { position: absolute; top: -18px; left: 0; right: 0; text-align: center; font-size: 11px; font-weight: 700; color: var(--label2); }
.week small { font-size: 12px; color: var(--label3); }
.week small.t { color: var(--label); font-weight: 700; }
.types { margin: 12px 20px 0; }
.dock { position: absolute; left: 20px; right: 20px; bottom: max(34px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr 150px; gap: 10px; z-index: 6; }
.dock .tabs { height: 54px; border-radius: 27px; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--glass); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); box-shadow: inset 0 0 0 0.5px var(--glass-edge); padding: 0 6px; }
.dock .tabs button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10px; font-weight: 600; color: var(--label2); }
.dock .tabs button.on { color: var(--label); }
.dock .tabs svg { width: 21px; height: 21px; }
.dock .start { height: 54px; border-radius: 27px; background: var(--brand); color: var(--on-brand); font-size: 17px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 7px; }
.dock .start svg { width: 14px; height: 14px; fill: currentColor; }

/* 준비 */
.prepare .media { height: 560px; }
.prepare .info { position: absolute; left: 0; right: 0; top: 430px; z-index: 2; text-align: center; padding: 0 20px; }
.prepare .info .eyebrow { font-size: 13px; font-weight: 600; color: var(--label2); }
.prepare .info h1 { margin: 4px 0 0; font-size: 30px; font-weight: 800; letter-spacing: -0.5px; }
.cues { position: absolute; left: 20px; right: 20px; top: 532px; display: grid; grid-template-columns: repeat(3, 1fr); padding-top: 14px; border-top: 0.5px solid var(--sep); z-index: 2; }
.cues div { display: flex; flex-direction: column; align-items: center; gap: 2px; border-left: 0.5px solid var(--sep); }
.cues div:first-child { border-left: 0; }
.cues small { font-size: 12px; color: var(--label2); }
.cues strong { font-size: 16px; font-weight: 700; }
/* 착용 방법 인서트 3장(10/28) — 신호 칸 아래 빈 곳. 짧은 화면(SE 등)에서는 버튼과 겹치니 숨긴다 */
.ins { position: absolute; left: 20px; right: 20px; top: 612px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; z-index: 2; }
.ins figure { margin: 0; }
.ins img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; display: block; background: var(--card); }
.ins figcaption { margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--label2); display: flex; gap: 5px; align-items: baseline; line-height: 1.3; }
.ins figcaption b { color: var(--a2); font-weight: 800; }
@media (max-height: 800px) { .ins { display: none; } }
.prepare .src { position: absolute; left: 20px; right: 20px; bottom: 102px; text-align: center; font-size: 13px; color: var(--label2); z-index: 2; }
.prepare .top { position: absolute; top: 0; left: 0; right: 0; z-index: 3; }

/* 측정 */
.measure { background: var(--bg); }
.measure .top { position: relative; z-index: 3; }
.ring { position: relative; width: 260px; height: 260px; margin: 64px auto 0; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring .bg { stroke: var(--track); }
.ring .fg { stroke: var(--label); transition: stroke-dashoffset 0.25s linear; }
.ring.go .fg { stroke: url(#acc); }
.ring .say { text-align: center; }
.ring .say b { display: block; font-size: 64px; font-weight: 800; letter-spacing: -1.5px; line-height: 1; }
.ring .say b.word { font-size: 40px; letter-spacing: -0.5px; }
.ring .say small { display: block; margin-top: 10px; font-size: 15px; color: var(--label2); font-weight: 600; }
.ring .say .u { font-size: 22px; font-weight: 700; color: var(--label2); margin-left: 2px; }
.live { margin: 34px 20px 0; height: 92px; border-radius: 18px; background: var(--card); position: relative; overflow: hidden; }
.live canvas { width: 100%; height: 100%; display: block; }
.live small { position: absolute; left: 12px; top: 8px; font-size: 11px; font-weight: 600; color: var(--label3); }
.trials { margin: 16px 20px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.trials div { height: 64px; border-radius: 16px; background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.trials small { font-size: 12px; color: var(--label3); font-weight: 600; }
.trials b { font-size: 20px; font-weight: 800; }
.trials div.cur { box-shadow: inset 0 0 0 1.5px var(--label); }
/* 직전 점프 대비 % (10/28) — 현우: 오르면 초록, 떨어지면 빨강 */
.arr { font-style: normal; font-size: 12px; font-weight: 700; color: var(--label2); white-space: nowrap; }
.arr.up { color: var(--up); }
.arr.down { color: var(--down); }
/* 측정 중 비교 카드 — 점프가 기록된 동안 실시간 그래프 자리를 덮는다 */
.cmp { position: absolute; inset: 0; background: var(--card); padding: 10px 14px; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.cmp[hidden] { display: none; }
.cmp small { position: static; font-size: 12px; color: var(--label2); }
.cmp div { display: grid; grid-template-columns: repeat(3, 1fr); }
.cmp span { display: flex; flex-direction: column; gap: 2px; }
.cmp span i { font-style: normal; font-size: 12px; color: var(--label3); font-weight: 600; }
.cmp .arr { font-size: 20px; font-weight: 800; }
.btn.drop { height: 64px; font-size: 18px; } /* 밴드에 낀 채로 누르기 쉽게 크게 */
.btn[hidden] { display: none; }
.trials div { height: 72px; }
.tri .arr { display: block; margin-top: 2px; }
.badge-sim { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 11px; font-weight: 700; background: var(--seg-track); color: var(--label2); }

/* 결과 */
.res-head { padding: max(56px, env(safe-area-inset-top)) 20px 0; display: flex; align-items: center; gap: 10px; }
.res-head .t { margin-right: auto; font-size: 17px; font-weight: 700; }
.res-big { padding: 18px 20px 0; }
.res-big small { font-size: 14px; color: var(--label2); font-weight: 600; }
.res-big .v { font-size: 72px; font-weight: 800; letter-spacing: -2px; line-height: 1.02; }
.res-big .v u { text-decoration: none; font-size: 26px; letter-spacing: 0; margin-left: 4px; color: var(--label2); }
.res-big .d { margin-top: 4px; font-size: 16px; font-weight: 700; }
.res-big .d.up { color: var(--up); }
.res-big .d.down { color: var(--down); }
.tri { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 20px 0; }
.tri div { border-radius: 14px; background: var(--card); padding: 10px 12px; }
.tri small { font-size: 12px; color: var(--label3); font-weight: 600; }
.tri b { display: block; font-size: 18px; font-weight: 800; }
.tri div.best { box-shadow: inset 0 0 0 1.5px var(--label); } /* 10/28: 최고 칸을 강조색(라이트는 빨강)으로 칠하면 "떨어짐" 빨강과 헷갈려 테두리로 */
.tri div.best small::after { content: " · 최고"; color: var(--label); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 20px 0; }
.met { border-radius: 20px; background: var(--card); padding: 14px 16px; }
.met small { font-size: 13px; font-weight: 600; color: var(--label2); display: flex; align-items: center; gap: 6px; }
.met b { display: block; margin-top: 6px; font-size: 26px; font-weight: 800; letter-spacing: -0.5px; }
.met b u { text-decoration: none; font-size: 14px; color: var(--label2); margin-left: 3px; font-weight: 600; }
.met .est { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: var(--seg-track); color: var(--label2); }
.chart { margin-top: 10px; }
.chart svg { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 12px; margin-top: 8px; font-size: 12px; color: var(--label2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.lock { display: flex; align-items: center; gap: 12px; }
.lock .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--elevated); display: grid; place-items: center; flex: none; }
.lock b { font-size: 16px; }
.lock small { display: block; font-size: 13px; color: var(--label2); margin-top: 2px; }
.warnline { margin: 10px 20px 0; padding: 12px 14px; border-radius: 14px; background: rgba(255, 159, 10, 0.12); color: var(--warn); font-size: 13px; font-weight: 600; line-height: 1.45; }

/* 기록 */
.page-title { padding: max(56px, env(safe-area-inset-top)) 20px 0; display: flex; align-items: center; gap: 10px; }
.page-title h1 { margin: 0; margin-right: auto; font-size: 30px; font-weight: 800; letter-spacing: -0.5px; }
.list { margin: 12px 20px 0; border-radius: 20px; background: var(--card); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-top: 0.5px solid var(--sep); }
.row:first-child { border-top: 0; }
.row .l { flex: 1; min-width: 0; }
.row .l b { font-size: 16px; font-weight: 600; }
.row .l small { display: block; font-size: 13px; color: var(--label2); margin-top: 2px; }
.row .r { text-align: right; font-size: 18px; font-weight: 800; }
.row .r small { display: block; font-size: 12px; font-weight: 600; color: var(--label2); }
.example-tag { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 13px; background: rgba(255, 159, 10, 0.14); color: var(--warn); font-size: 12px; font-weight: 700; }
.empty-card { margin: 16px 20px 0; border-radius: 20px; background: var(--card); padding: 28px 20px; text-align: center; }
.empty-card b { font-size: 17px; }
.empty-card .btn { margin-top: 14px; height: 44px; border-radius: 22px; font-size: 15px; }

/* 랭킹·업적 */
.badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 12px; }
.badge { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.badge .m { width: 60px; height: 60px; border-radius: 30px; display: grid; place-items: center; font-size: 18px; font-weight: 800; background: var(--elevated); color: var(--label3); }
.badge.on .m { background: var(--accent); color: #fff; }
.badge small { font-size: 11px; line-height: 1.3; color: var(--label2); font-weight: 600; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 0.5px solid var(--sep); }
.rank-row:first-of-type { border-top: 0; }
.rank-row .n { width: 22px; font-size: 15px; font-weight: 800; color: var(--label2); text-align: center; }
.rank-row .av { width: 34px; height: 34px; border-radius: 17px; background: var(--elevated); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.rank-row.me .av { background: var(--brand); color: var(--on-brand); }
.rank-row .nm { flex: 1; font-size: 15px; font-weight: 600; }
.rank-row .v { font-size: 16px; font-weight: 800; }

/* 설정 */
.set-group { margin: 22px 20px 0; }
.set-group > small { display: block; margin: 0 4px 8px; font-size: 13px; color: var(--label2); font-weight: 600; }
.set-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; border-top: 0.5px solid var(--sep); font-size: 16px; }
.set-row:first-of-type { border-top: 0; }
.set-row .v { margin-left: auto; color: var(--label2); }
.set-row.danger { color: var(--low); }
.set-box { border-radius: 16px; background: var(--card); overflow: hidden; }
.sw { width: 51px; height: 31px; border-radius: 16px; background: #30d158; position: relative; margin-left: auto; flex: none; }
.sw::after { content: ""; position: absolute; top: 2px; left: 22px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); transition: left 0.18s; }
.sw.off { background: var(--elevated); }
.sw.off::after { left: 2px; }
.fine { margin: 14px 24px 0; font-size: 12px; line-height: 1.55; color: var(--label3); }

.toast { position: absolute; left: 50%; bottom: 110px; transform: translateX(-50%); padding: 10px 16px; border-radius: 20px; background: var(--elevated); font-size: 14px; font-weight: 600; z-index: 20; white-space: nowrap; animation: fadein 0.2s ease both; }

/* ───────── 온보딩 — 사진으로 고르기 (LOG ABS 온보딩 구조, 10/23) ───────── */
.onb video, .onb .sp img, .onb .pcard img, .onb .lv img, .onb .vis img, .onb .full video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.onb-top { position: absolute; top: 0; left: 0; right: 0; z-index: 6; }
.onb-top .steps i { background: rgba(255, 255, 255, 0.28); }
.onb-top .steps i.on { background: #fff; }
.onb-ai { top: max(104px, calc(env(safe-area-inset-top) + 48px)); bottom: auto; z-index: 6; }
.btn.on-photo-white { background: #fff; color: #000; }
/* 시작: 위 영상 · 아래 사진, 여백 없이 */
.split { position: absolute; inset: 0; display: grid; grid-template-rows: 1fr 1fr; gap: 2px; background: #000; }
.split .sp { position: relative; overflow: hidden; }
.split .sp::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.72) 100%); }
.split .sp b { position: absolute; left: 24px; bottom: 20px; z-index: 1; color: #fff; font-size: 30px; font-weight: 800; letter-spacing: -0.5px; }
.split .sp:last-child b { bottom: 112px; }
.logo-top { position: absolute; top: max(60px, env(safe-area-inset-top)); left: 24px; z-index: 4; color: #fff; font-size: 14px; font-weight: 800; letter-spacing: 2px; display: flex; align-items: center; gap: 8px; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4); }
/* 성별: 반씩 꽉 채운 세로 사진 */
.pick { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: #000; }
.pcard { position: relative; overflow: hidden; color: #fff; }
.pcard::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.75) 100%); }
.pcard b { position: absolute; left: 0; right: 0; bottom: 48px; z-index: 1; text-align: center; font-size: 26px; font-weight: 800; }
/* 고른 표시는 흰 테두리 대신, 누른 순간 나머지를 어둡게(10/25 민성 — 테두리가 처음부터 쳐져 보였다) */
.pick.chosen .pcard:not([aria-pressed="true"]) { opacity: 0.35; transition: opacity 0.2s; }
/* 수준: 가로 사진 세 줄 */
.lvs { position: absolute; inset: 0; display: grid; grid-template-rows: 1.25fr 1fr 1fr; gap: 2px; background: #000; padding-top: 0; }
.lv { position: relative; overflow: hidden; color: #fff; text-align: left; }
.lv::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.1) 70%); }
.lv:first-child::after { background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 30%), linear-gradient(90deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.1) 70%); }
.lv b, .lv span { position: absolute; left: 22px; z-index: 1; }
.lv b { bottom: 40px; font-size: 26px; font-weight: 800; }
.lv span { bottom: 18px; font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, 0.78); }
.lvs.chosen .lv:not([aria-pressed="true"]) { opacity: 0.35; transition: opacity 0.2s; }
/* 위 사진 + 아래 입력 */
/* 10/28: 사진·글을 위에 고정(470px·400px)하니 긴 화면에서 버튼 위가 텅 비었다 — 글은 버튼 바로 위에 붙이고 사진이 그만큼 내려온다 */
.vis { position: absolute; left: 0; right: 0; top: 0; bottom: calc(max(34px, env(safe-area-inset-bottom)) + 54px + 150px); min-height: 470px; overflow: hidden; }
.vis::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 55%, var(--bg) 100%); }
.obody { position: absolute; left: 0; right: 0; bottom: calc(max(34px, env(safe-area-inset-bottom)) + 54px + 16px); padding: 0 20px; z-index: 2; }
.obody h1 { margin: 0; font-size: 30px; line-height: 1.2; font-weight: 800; letter-spacing: -0.5px; }
.osub { margin: 6px 0 0; font-size: 15px; color: var(--label2); }
.wheels { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; height: 176px; margin-top: 14px; }
.wheels.one { grid-template-columns: 1fr; }
.wheels::before { content: ""; position: absolute; left: 0; right: 0; top: 66px; height: 44px; border-radius: 12px; background: var(--seg-track); pointer-events: none; }
.wheel { position: relative; height: 176px; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; -webkit-mask-image: linear-gradient(transparent, #000 32%, #000 68%, transparent); mask-image: linear-gradient(transparent, #000 32%, #000 68%, transparent); }
.wheel::-webkit-scrollbar { display: none; }
.wheel .pad { height: 66px; }
.wheel .it { height: 44px; display: flex; align-items: center; justify-content: center; gap: 4px; scroll-snap-align: center; font-size: 22px; font-weight: 600; color: var(--label3); font-variant-numeric: tabular-nums; cursor: pointer; }
.wheel .it small { font-size: 14px; }
.wheel .it.sel { color: var(--label); font-weight: 800; }
/* 불편한 곳: 줄마다 체크 + 부위 사진 */
.ptitle { position: absolute; left: 20px; right: 20px; top: max(108px, calc(env(safe-area-inset-top) + 52px)); }
.ptitle h1 { margin: 0; font-size: 30px; line-height: 1.2; font-weight: 800; letter-spacing: -0.5px; }
.pains { position: absolute; left: 20px; right: 20px; top: 210px; display: grid; gap: 10px; }
.pn { display: flex; align-items: center; gap: 14px; height: 76px; border-radius: 20px; background: var(--card); padding: 0 10px 0 18px; text-align: left; overflow: hidden; }
.pn b { flex: 1; font-size: 18px; font-weight: 700; }
.pn img { width: 60px; height: 60px; border-radius: 14px; object-fit: cover; }
.pn .ck { width: 24px; height: 24px; border-radius: 12px; box-shadow: inset 0 0 0 1.6px var(--label3); flex: none; position: relative; }
.pn[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--label); }
.pn[aria-pressed="true"] .ck { background: var(--brand); box-shadow: none; }
.pn[aria-pressed="true"] .ck::after { content: ""; position: absolute; left: 8px; top: 4px; width: 6px; height: 11px; border: solid var(--on-brand); border-width: 0 2.4px 2.4px 0; transform: rotate(45deg); }
/* 밴드 영상 전체 */
.full { position: absolute; inset: 0; }
.full::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0) 22%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.85) 100%); }
.band-copy { position: absolute; left: 24px; right: 24px; bottom: 112px; z-index: 3; color: #fff; }
.band-copy h1 { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -0.5px; }
.band-copy p { margin: 8px 0 0; font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, 0.8); }

/* 결과 그래프 3단 + 핵심 숫자(charts.js, 10/24 — Honest Jump 결과 화면 참고) */
.chart-ttl { margin: 14px 0 2px; font-size: 13px; font-weight: 700; color: var(--label); }
.chart-ttl:first-child { margin-top: 4px; }
.chart-ttl small { margin-left: 6px; font-weight: 500; color: var(--label3); }
.keyrows { margin-top: 4px; }
.keyrows .kr { display: flex; align-items: baseline; gap: 6px; padding: 10px 0; border-top: 0.5px solid var(--sep); }
.keyrows .kr:first-child { border-top: 0; }
.keyrows .n { flex: 1; font-size: 15px; font-weight: 600; }
.keyrows .n small { display: block; font-size: 11px; font-weight: 500; color: var(--label3); margin-top: 1px; }
.keyrows b { font-size: 22px; font-weight: 800; }
.keyrows u { text-decoration: none; width: 52px; font-size: 13px; color: var(--label2); font-weight: 600; }
/* 사전 설문 — 아픈 부위 그림 (painmap.js, 2026-10-24) */
.pain { margin: 0 20px; }
.pain-head { font-size: 13px; color: var(--label2); line-height: 1.5; margin-bottom: 8px; }
.pain-seg { margin-bottom: 8px; }
.pain-body { position: relative; border-radius: 20px; background: var(--card); padding: 10px 24px; }
.pain-body svg { display: block; width: 100%; max-height: 54vh; margin: 0 auto; }
.pain-body path[data-region] { pointer-events: all; cursor: pointer; transition: fill 0.15s; }
.pain-body path[data-region]:active { stroke: var(--label); }
.pain-side { position: absolute; top: 10px; left: 12px; font-size: 11px; font-weight: 700; color: var(--label3); }
.pain-side.r { left: auto; right: 12px; }
.pain-legend { display: flex; gap: 12px; margin: 8px 2px 0; font-size: 12px; color: var(--label2); font-weight: 600; }
.pain-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.pain-list { margin-top: 8px; display: grid; gap: 6px; }
.pain-item { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 44px; padding: 0 14px; border-radius: 12px; background: var(--card); color: var(--label); font-size: 15px; font-weight: 600; }
.pain-item b { font-size: 14px; font-weight: 800; }
.pain-empty { font-size: 13px; color: var(--label3); margin: 6px 2px 0; }
.pain-foot { margin: 14px 0 0; font-size: 12px; color: var(--label3); text-align: center; line-height: 1.6; }
.pain-levels { display: grid; gap: 8px; }
.pain-lv { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 14px; background: var(--elevated); color: var(--label); text-align: left; }
.pain-lv[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--a2); }
.pain-lv i { flex: none; width: 14px; height: 14px; border-radius: 4px; margin-top: 3px; }
.pain-lv b { display: block; font-size: 16px; font-weight: 800; }
.pain-lv small { display: block; margin-top: 3px; font-size: 13px; line-height: 1.5; color: var(--label2); }
.pain-lv small u { text-decoration: none; color: var(--label); font-weight: 600; }

/* 사전 설문(오늘 아픈 곳) — 데모 앱 화면. 시트·버튼 묶음·알림 조각은 admin/admin.css 와 같은 모양(10/24 밤) */
.presurvey .pre-ttl { flex: 1; text-align: center; font-size: 17px; font-weight: 700; }
.presurvey .pre-sub { margin: 14px 20px 12px; font-size: 14px; line-height: 1.5; color: var(--label2); }
.presurvey .scroll { padding-bottom: 60px; }
.card.pre { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 10px 16px; }
.card.pre .chip { height: 30px; font-size: 13px; }
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 12px; font-weight: 700; background: var(--seg-track); color: var(--label2); }
.pill.ok { background: rgba(48, 209, 88, 0.16); color: #30d158; }
.pill.warn { background: rgba(255, 159, 10, 0.16); color: var(--warn); }
.pill.bad { background: rgba(255, 69, 58, 0.14); color: var(--low); }
.btns { margin: 14px 20px 0; display: grid; gap: 10px; }
.btns.two { grid-template-columns: 1fr 1fr; }
.btn.small { height: 44px; border-radius: 22px; font-size: 15px; }
.msg { margin: 10px 20px 0; padding: 12px 14px; border-radius: 14px; font-size: 13px; line-height: 1.5; font-weight: 600; background: var(--card); color: var(--label2); }
.msg.warn { background: rgba(255, 159, 10, 0.12); color: var(--warn); }
.msg.bad { background: rgba(255, 69, 58, 0.12); color: var(--low); }
.msg.ok { background: rgba(48, 209, 88, 0.12); color: #30d158; }
.sheet-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 20; display: flex; align-items: flex-end; }
.sheet { width: 100%; background: var(--elevated); border-radius: 24px 24px 0 0; padding: 20px 20px max(28px, env(safe-area-inset-bottom)); max-height: 80%; overflow-y: auto; }
.sheet h3 { margin: 0 0 12px; font-size: 18px; font-weight: 800; }
