@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');

:root {
  --bg: #F2F2F7;
  --card: #FFFFFF;
  --card-2: #F7F7FA;
  --fill: rgba(118, 118, 128, 0.12);
  --fill-2: rgba(118, 118, 128, 0.2);
  --label: #0A0A0C;
  --label-2: rgba(60, 60, 67, 0.62);
  --label-3: rgba(60, 60, 67, 0.32);
  --sep: rgba(60, 60, 67, 0.14);
  --accent: #00A878;
  --accent-soft: rgba(0, 168, 120, 0.12);
  --accent-ink: #FFFFFF;
  --warm: #FF8A00;
  --warm-soft: rgba(255, 138, 0, 0.14);
  --rest: #3E7BFA;
  --rest-soft: rgba(62, 123, 250, 0.12);
  --danger: #E5484D;
  --bar-bg: rgba(249, 249, 251, 0.82);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.05);
  --r-xl: 28px;
  --r-lg: 20px;
  --r-md: 14px;
  --font: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Pretendard Variable', Pretendard, system-ui, 'Noto Sans KR', sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --card: #1C1C1E;
    --card-2: #2C2C2E;
    --fill: rgba(118, 118, 128, 0.24);
    --fill-2: rgba(118, 118, 128, 0.36);
    --label: #FFFFFF;
    --label-2: rgba(235, 235, 245, 0.62);
    --label-3: rgba(235, 235, 245, 0.3);
    --sep: rgba(84, 84, 88, 0.5);
    --accent: #2BD69A;
    --accent-soft: rgba(43, 214, 154, 0.16);
    --accent-ink: #00261A;
    --warm: #FF9F2E;
    --warm-soft: rgba(255, 159, 46, 0.18);
    --rest: #6B9BFF;
    --rest-soft: rgba(107, 155, 255, 0.16);
    --bar-bg: rgba(22, 22, 24, 0.8);
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--label);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.45;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  word-break: keep-all;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
input, select { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- 레이아웃 ---------- */
#app { min-height: 100%; }
.view {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(var(--safe-t) + 12px) 16px calc(var(--safe-b) + 104px);
}
.large-title { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; margin: 28px 4px 4px; }
.subtitle { color: var(--label-2); font-size: 15px; margin: 0 4px 20px; }
.section-title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin: 32px 4px 12px; }
.footnote { font-size: 13px; color: var(--label-2); margin: 8px 16px 0; line-height: 1.5; }

.card {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.pad { padding: 20px; }

/* 그룹 리스트 */
.list { background: var(--card); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow); }
.list-header { font-size: 13px; color: var(--label-2); margin: 28px 16px 8px; }
.row {
  display: flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 10px 16px;
  position: relative; width: 100%; text-align: left;
}
.row + .row::before {
  content: ''; position: absolute; top: 0; left: 16px; right: 0;
  border-top: 0.5px solid var(--sep);
}
.row.has-icon + .row.has-icon::before { left: 60px; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 17px; }
.row-sub { font-size: 13px; color: var(--label-2); margin-top: 1px; }
.row-value { color: var(--label-2); font-size: 16px; white-space: nowrap; }
.chev { width: 8px; height: 14px; color: var(--label-3); flex: none; }
button.row:active { background: var(--fill); }
.row select {
  appearance: none; -webkit-appearance: none; border: 0; background: transparent;
  color: var(--label-2); text-align: right; max-width: 60%; font-size: 16px; padding-right: 2px;
}
.row input[type="time"] {
  border: 0; background: var(--fill); border-radius: 8px; padding: 6px 10px; color: var(--label);
}

/* 아이콘 칩 */
.ico {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 700;
}

/* 토글 */
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; position: absolute; cursor: pointer; z-index: 1; }
.switch span {
  position: absolute; inset: 0; border-radius: 31px; background: var(--fill-2);
  transition: background .25s;
}
.switch span::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 1px 1px rgba(0,0,0,.08);
  transition: transform .25s cubic-bezier(.3,.7,.4,1);
}
.switch input:checked + span { background: #34C759; }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

/* 세그먼트 */
.seg {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--fill); border-radius: 10px; padding: 2px; gap: 2px;
}
.seg button {
  height: 32px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--label);
  transition: background .2s;
}
.seg button[aria-pressed="true"] { background: var(--card); box-shadow: 0 2px 6px rgba(0,0,0,.12); font-weight: 600; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seg button[aria-pressed="true"] { background: #636366; } }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 24px; border-radius: 16px;
  font-size: 17px; font-weight: 600; letter-spacing: -0.01em;
  transition: transform .12s, opacity .12s;
}
.btn:active { transform: scale(0.97); opacity: .9; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-gray { background: var(--fill); color: var(--label); }
.btn-tinted { background: var(--accent-soft); color: var(--accent); }
.btn-warm { background: var(--warm-soft); color: var(--warm); }
.btn-plain { color: var(--accent); height: 44px; padding: 0 12px; font-weight: 500; }
.btn-block { width: 100%; }
.btn-danger { color: var(--danger); }
.btn[disabled] { opacity: .4; pointer-events: none; }

/* ---------- 오늘 ---------- */
.today-head { display: flex; justify-content: space-between; align-items: flex-end; }
.date-line { font-size: 13px; color: var(--label-2); margin: 20px 4px 0; font-weight: 500; }

.hero {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 20px;
  padding: 20px; margin-top: 8px;
}
.ring { position: relative; width: 132px; height: 132px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: var(--fill); }
.ring .prog { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.3,.7,.2,1); }
.ring-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-big { font-size: 40px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.ring-big small { font-size: 20px; color: var(--label-3); font-weight: 600; }
.ring-cap { font-size: 12px; color: var(--label-2); margin-top: 4px; }
.week-dots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 14px; }
.wd { text-align: center; font-size: 11px; color: var(--label-2); }
.wd i {
  display: block; width: 100%; aspect-ratio: 1; border-radius: 50%;
  background: var(--fill); margin-bottom: 4px; max-width: 26px; margin-inline: auto;
}
.wd.on i { background: var(--accent); }
.wd.mini i { background: var(--accent); opacity: .45; }
.wd.today { color: var(--label); font-weight: 700; }
.wd.today i { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--label-3); }
.hero-text b { font-size: 17px; display: block; letter-spacing: -0.02em; }
.hero-text span { font-size: 14px; color: var(--label-2); }

.banner {
  display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-md);
  margin-top: 12px; background: var(--card); box-shadow: var(--shadow);
}
.banner .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 8px; flex: none; background: var(--accent); }
.banner.warm .dot { background: var(--warm); }
.banner.rest .dot { background: var(--rest); }
.banner b { display: block; font-size: 15px; }
.banner p { margin: 2px 0 0; font-size: 14px; color: var(--label-2); }
.banner .btn { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 10px; margin-top: 10px; }

.plan { margin-top: 16px; overflow: hidden; }
.plan-head { padding: 20px 20px 6px; }
.plan-kicker { font-size: 13px; color: var(--accent); font-weight: 600; }
.plan-title { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; margin-top: 2px; line-height: 1.2; }
.plan-meta { color: var(--label-2); font-size: 15px; margin-top: 4px; }
.moves { padding: 8px 0; }
.move {
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px;
  padding: 10px 20px; position: relative;
}
.move + .move::before { content: ''; position: absolute; top: 0; left: 72px; right: 0; border-top: 0.5px solid var(--sep); }
.move-badge {
  width: 40px; height: 40px; border-radius: 12px; background: var(--fill);
  display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--label-2);
}
.move-name { font-size: 16px; font-weight: 600; }
.move-sub { font-size: 13px; color: var(--label-2); }
.move-amt { font-size: 15px; font-variant-numeric: tabular-nums; color: var(--label-2); text-align: right; }
.plan-actions { display: grid; gap: 4px; padding: 8px 20px 20px; }
.anchor-line {
  margin: 12px 4px 0; font-size: 14px; color: var(--label-2); line-height: 1.5;
}
.anchor-line b { color: var(--label); font-weight: 600; }

.done-card { padding: 24px 20px; text-align: center; margin-top: 16px; }
.check {
  width: 64px; height: 64px; border-radius: 50%; background: var(--accent);
  display: grid; place-items: center; margin: 0 auto 12px; color: var(--accent-ink);
}
.done-card h3 { margin: 0; font-size: 22px; letter-spacing: -0.02em; }
.done-card p { margin: 6px 0 16px; color: var(--label-2); font-size: 15px; }

/* ---------- 기록 ---------- */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { padding: 16px; }
.stat-num { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-num small { font-size: 15px; font-weight: 600; color: var(--label-2); margin-left: 2px; }
.stat-label { font-size: 13px; color: var(--label-2); margin-top: 4px; }
.heat { padding: 16px; }
.heat-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); gap: 4px; }
.heat-grid i { aspect-ratio: 1; border-radius: 4px; background: var(--fill); }
.heat-grid i.l1 { background: var(--accent); opacity: .45; }
.heat-grid i.l2 { background: var(--accent); }
.heat-grid i.fut { background: transparent; }
.heat-grid i.now { box-shadow: inset 0 0 0 1.5px var(--label-3); }
.heat-legend { display: flex; justify-content: space-between; font-size: 12px; color: var(--label-2); margin-top: 10px; }
.chip {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px;
  font-size: 12px; font-weight: 600; background: var(--fill); color: var(--label-2); margin-left: 4px;
}
.chip.warm { background: var(--warm-soft); color: var(--warm); }
.chip.accent { background: var(--accent-soft); color: var(--accent); }
.empty { text-align: center; padding: 32px 20px; color: var(--label-2); font-size: 15px; }

/* ---------- 성장 ---------- */
.ladder { display: flex; gap: 4px; margin-top: 8px; }
.ladder i { height: 4px; flex: 1; border-radius: 2px; background: var(--fill-2); }
.ladder i.on { background: var(--accent); }
.ladder i.cur { background: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.step-list .row { align-items: flex-start; }
.step-n {
  width: 28px; height: 28px; border-radius: 50%; background: var(--fill); flex: none;
  display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--label-2); margin-top: 2px;
}
.step-n.on { background: var(--accent); color: var(--accent-ink); }
.step-cue { font-size: 14px; color: var(--label-2); margin-top: 4px; line-height: 1.5; }

/* ---------- 탭바 ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: center;
  padding: 6px 8px calc(var(--safe-b) + 6px);
  background: var(--bar-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-top: 0.5px solid var(--sep);
}
.tabbar-in { display: grid; grid-template-columns: repeat(5, 1fr); width: 100%; max-width: 560px; }
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  height: 50px; justify-content: center; font-size: 10.5px; font-weight: 500; color: var(--label-3);
}
.tab svg { width: 26px; height: 26px; }
.tab[aria-current="page"] { color: var(--accent); }

/* ---------- 시트 ---------- */
.backdrop {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.36); z-index: 40;
  opacity: 0; transition: opacity .3s;
}
.backdrop.open { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
  max-width: 560px; margin: 0 auto; max-height: 92vh; overflow-y: auto;
  background: var(--bg); border-radius: 14px 14px 0 0;
  padding: 8px 16px calc(var(--safe-b) + 20px);
  transform: translateY(100%); transition: transform .38s cubic-bezier(.2,.9,.25,1);
  overscroll-behavior: contain;
}
.sheet.open { transform: none; }
.grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--fill-2); margin: 0 auto 12px; }
.sheet h2 { font-size: 24px; letter-spacing: -0.03em; margin: 8px 4px 6px; line-height: 1.25; }
.sheet .lead { color: var(--label-2); font-size: 15px; margin: 0 4px 16px; }
.sheet-actions { display: grid; gap: 8px; margin-top: 20px; }

.q { margin-top: 18px; }
.q-title { font-size: 15px; font-weight: 600; margin: 0 4px 8px; }
.choice-list { display: grid; gap: 8px; }
.choice {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; text-align: left; padding: 16px; border-radius: var(--r-md);
  background: var(--card); box-shadow: var(--shadow); font-size: 16px;
  border: 2px solid transparent; transition: border-color .15s, background .15s;
}
.choice small { display: block; color: var(--label-2); font-size: 13px; margin-top: 2px; }
.choice[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.choice .tick {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--label-3); flex: none;
  display: grid; place-items: center;
}
.choice[aria-pressed="true"] .tick { background: var(--accent); border-color: var(--accent); }
.choice[aria-pressed="true"] .tick::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-ink); }

.feel-row { padding: 14px 16px; }
.feel-row + .feel-row { border-top: 0.5px solid var(--sep); }
.feel-name { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.feel-meta { font-size: 13px; color: var(--label-2); margin-bottom: 10px; }

.change { display: flex; gap: 10px; align-items: baseline; font-size: 15px; padding: 6px 4px; }
.change i { width: 8px; height: 8px; border-radius: 50%; background: var(--label-3); flex: none; transform: translateY(-1px); }
.change.up i, .change.ready i { background: var(--accent); }
.change.down i { background: var(--rest); }

/* ---------- 온보딩 ---------- */
.ob {
  position: fixed; inset: 0; z-index: 30; background: var(--bg); overflow-y: auto;
}
.ob-in {
  max-width: 520px; margin: 0 auto; min-height: 100%;
  display: flex; flex-direction: column;
  padding: calc(var(--safe-t) + 16px) 20px calc(var(--safe-b) + 20px);
}
.ob-top { display: flex; align-items: center; gap: 12px; height: 44px; }
.ob-progress { flex: 1; height: 4px; border-radius: 2px; background: var(--fill); overflow: hidden; }
.ob-progress i { display: block; height: 100%; background: var(--accent); border-radius: 2px; transition: width .4s cubic-bezier(.3,.7,.2,1); }
.ob-back { width: 44px; height: 44px; display: grid; place-items: center; color: var(--accent); margin-left: -12px; }
.ob-body { flex: 1; padding-top: 24px; }
.ob h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.2; margin: 0 0 10px; }
.ob .lead { font-size: 16px; color: var(--label-2); margin: 0 0 24px; line-height: 1.55; }
.ob-foot { padding-top: 20px; display: grid; gap: 8px; }
.welcome-mark {
  width: 84px; height: 84px; border-radius: 22px; background: var(--accent);
  display: grid; place-items: center; margin: 24px 0 28px; color: var(--accent-ink);
}
.pledge {
  font-size: 22px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.45;
  padding: 24px; border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow);
}
.pledge em { font-style: normal; color: var(--accent); }
.principles { display: grid; gap: 16px; margin-top: 8px; }
.principle { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.principle b { display: block; font-size: 16px; }
.principle span { font-size: 14px; color: var(--label-2); }
.principle .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }

/* ---------- 플레이어 ---------- */
.player {
  position: fixed; inset: 0; z-index: 50; background: var(--bg);
  display: flex; flex-direction: column;
  padding: calc(var(--safe-t) + 8px) 20px calc(var(--safe-b) + 16px);
  transition: background .5s;
}
.player[data-phase="rest"] { background: color-mix(in srgb, var(--rest) 10%, var(--bg)); }
.player[data-phase="iwork"] { background: color-mix(in srgb, var(--warm) 9%, var(--bg)); }
.player-in { max-width: 520px; width: 100%; margin: 0 auto; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.p-top { display: flex; align-items: center; gap: 12px; height: 44px; }
.p-close { width: 36px; height: 36px; border-radius: 50%; background: var(--fill); display: grid; place-items: center; }
.p-segs { flex: 1; display: flex; gap: 3px; }
.p-segs i { flex: 1; height: 4px; border-radius: 2px; background: var(--fill-2); }
.p-segs i.done { background: var(--label-2); }
.p-segs i.cur { background: var(--label); }
.p-time { font-size: 13px; color: var(--label-2); font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }

.p-head { text-align: center; margin-top: 20px; }
.p-phase { font-size: 14px; font-weight: 600; color: var(--accent); }
.player[data-phase="rest"] .p-phase { color: var(--rest); }
.player[data-phase="iwork"] .p-phase { color: var(--warm); }
.p-name { font-size: 30px; font-weight: 700; letter-spacing: -0.035em; line-height: 1.2; margin-top: 4px; }
.p-sub { font-size: 15px; color: var(--label-2); margin-top: 4px; }

.dial-wrap { flex: 1; display: grid; place-items: center; min-height: 0; padding: 4px 0 8px; }
.dial {
  position: relative; width: min(66vw, 34vh, 300px); aspect-ratio: 1;
  border-radius: 50%; touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dial .track { stroke: var(--fill); }
.dial .prog { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .35s cubic-bezier(.3,.7,.2,1), stroke .3s; }
.player[data-phase="rest"] .dial .prog { stroke: var(--rest); }
.player[data-phase="iwork"] .dial .prog { stroke: var(--warm); }
.dial.over .prog { stroke: var(--warm); }
.dial-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.dial-num {
  font-size: clamp(64px, 22vw, 104px); font-weight: 700; letter-spacing: -0.05em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.dial-cap { font-size: 15px; color: var(--label-2); margin-top: 6px; }
.dial.tappable { cursor: pointer; }
.dial.tappable:active { transform: scale(0.985); }
.dial.pulse { animation: pulse .32s ease-out; }
@keyframes pulse { 0% { transform: scale(1); } 40% { transform: scale(1.03); } 100% { transform: scale(1); } }

.p-over {
  margin: 0 auto 8px; height: 34px; display: inline-flex; align-items: center; padding: 0 14px;
  border-radius: 17px; background: var(--warm-soft); color: var(--warm); font-size: 14px; font-weight: 600;
}
.p-tools { display: flex; justify-content: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.pill {
  height: 36px; padding: 0 14px; border-radius: 18px; background: var(--fill);
  font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px;
}
.pill[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.p-cue {
  font-size: 14px; color: var(--label-2); line-height: 1.55; text-align: center;
  margin: 0 auto 14px; max-width: 420px;
}
.p-next { text-align: center; font-size: 14px; color: var(--label-2); margin-bottom: 12px; min-height: 20px; }
.p-next b { color: var(--label); font-weight: 600; }
.p-controls { display: grid; grid-template-columns: 56px 1fr 56px; gap: 12px; align-items: center; }
.round-btn {
  width: 56px; height: 56px; border-radius: 50%; background: var(--fill);
  display: grid; place-items: center;
}
.round-btn svg { width: 24px; height: 24px; }
.p-controls .btn { height: 56px; border-radius: 28px; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--safe-b) + 92px); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0;
  background: rgba(30, 30, 32, 0.92); color: #fff; padding: 12px 18px; border-radius: 14px;
  font-size: 15px; font-weight: 500; transition: opacity .25s, transform .3s; pointer-events: none;
  max-width: calc(100vw - 40px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 완료 순간: 하나의 연출 */
.finish-burst { position: relative; width: 120px; height: 120px; margin: 8px auto 12px; }
.finish-burst > svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.finish-burst .prog { stroke: var(--accent); stroke-linecap: round; animation: fill 1.1s cubic-bezier(.3,.7,.2,1) forwards; }
.finish-burst .tickmark { position: absolute; inset: 0; display: grid; place-items: center; color: var(--accent); opacity: 0; animation: pop .4s .9s ease-out forwards; }
@keyframes fill { from { stroke-dashoffset: 339.3; } to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .finish-burst .tickmark { opacity: 1; }
}

@media (min-width: 720px) {
  .view { padding-top: calc(var(--safe-t) + 28px); }
}
.finish-burst .tickmark svg { width: 46px; height: 46px; }

/* ---------- 동작 애니메이션 ---------- */
.fig { width: 100%; height: auto; display: block; overflow: hidden; }
.fig-ground { fill: var(--fill); opacity: .55; }
.fig-floor { stroke: var(--sep); stroke-width: 1.5; }
.fig-limb { stroke: var(--label); stroke-width: 8.5; stroke-linecap: round; }
.fig-far .fig-limb { stroke: var(--label-3); }
.fig-limb.hl { stroke: var(--accent); }
.fig-far .fig-limb.hl { stroke: color-mix(in srgb, var(--accent) 45%, transparent); }
.fig-torso { stroke: var(--label); stroke-width: 13; stroke-linecap: round; }
.fig-torso.hl { stroke: var(--accent); }
.fig-head { fill: var(--label); }
.fig-breath { fill: var(--rest); }
.fig-glute { fill: var(--accent); }
.fig-prop { fill: var(--fill-2); }
.fig-bar { stroke: var(--label-2); stroke-width: 5; stroke-linecap: round; }
.fig-towel { fill: var(--warm); }
.fig-strap { stroke: var(--warm); stroke-width: 3; stroke-linecap: round; }

button.move { width: 100%; text-align: left; font: inherit; color: inherit; }
button.move:active { background: var(--fill); }
.g-thumb { width: 64px; height: 44px; flex: none; border-radius: 10px; background: var(--card-2); overflow: hidden; display: grid; place-items: center; }
.g-thumb .fig { width: 64px; }
.g-thumb .fig-limb { stroke-width: 11; } .g-thumb .fig-torso { stroke-width: 15; }
.guide-row { gap: 14px; }
.breath-card { display: flex; gap: 16px; align-items: center; width: 100%; text-align: left; padding: 18px 20px; margin-top: 4px; }
.breath-card b { display: block; font-size: 17px; }
.breath-card span span { font-size: 14px; color: var(--label-2); }
.breath-card > span:last-child span { display: block; font-size: 14px; color: var(--label-2); margin-top: 2px; }
.breath-orb { width: 52px; height: 52px; border-radius: 50%; background: var(--rest-soft); display: grid; place-items: center; flex: none; }
.breath-orb i { width: 30px; height: 30px; border-radius: 50%; background: var(--rest); animation: breathe 8s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(.6); } 45% { transform: scale(1); } 55% { transform: scale(1); } }
.breath-rules { display: grid; gap: 14px; margin-top: 12px; }
.br-rule { display: flex; gap: 12px; align-items: flex-start; }
.br-rule b { display: block; font-size: 15px; }
.br-rule span { font-size: 13px; color: var(--label-2); }
.br-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex: none; }
.br-dot.in { background: var(--rest); } .br-dot.out { background: var(--accent); } .br-dot.hold { background: var(--warm); }

.g-switch { margin: 4px 0 8px; grid-auto-columns: minmax(0, 1fr); }
.g-switch button { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }
.g-stage { padding: 12px 16px 16px; }
.g-fig { max-width: 420px; margin: 0 auto; }
.g-phase { display: flex; align-items: center; gap: 14px; margin-top: 4px; min-height: 52px; }
.g-phase b { display: block; font-size: 17px; }
.g-phase span:not(.g-orb) { font-size: 14px; color: var(--label-2); }
.g-orb { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--fill); }
.g-orb i { width: 40px; height: 40px; border-radius: 50%; background: var(--rest); transition: background .3s; }
.g-orb[data-br="out"] i { background: var(--accent); }
.g-orb[data-br="hold"] i { background: var(--warm); }
.g-note { font-size: 13px; color: var(--label-2); margin: 6px 0 0; }
.g-ctrl { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 12px; }
.g-speed { width: 160px; }
.g-text { font-size: 15px; line-height: 1.6; }
.g-miss { margin: 0; padding-left: 18px; color: var(--label-2); }
.g-miss li + li { margin-top: 4px; }
.g-mini { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; margin-top: 8px; }

.bt-stage { padding: 24px 16px 16px; text-align: center; }
.bt-orb { position: relative; width: min(64vw, 240px); aspect-ratio: 1; margin: 0 auto; display: grid; place-items: center; }
.bt-orb i { position: absolute; inset: 0; border-radius: 50%; background: var(--rest-soft); box-shadow: inset 0 0 0 3px var(--rest); transform: scale(.45); }
.bt-orb[data-br="out"] i { background: var(--accent-soft); box-shadow: inset 0 0 0 3px var(--accent); }
.bt-orb[data-br="hold"] i { background: var(--warm-soft); box-shadow: inset 0 0 0 3px var(--warm); }
.bt-center { position: relative; text-align: center; }
.bt-center b { display: block; font-size: 48px; font-weight: 700; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.bt-center span { font-size: 14px; color: var(--label-2); }
.bt-seq { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.bt-chip { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 12px; background: var(--rest-soft); color: var(--rest); }
.bt-chip.out { background: var(--accent-soft); color: var(--accent); }
.bt-chip.hold { background: var(--warm-soft); color: var(--warm); }
.bt-count { font-size: 13px; color: var(--label-2); margin-top: 10px; }

.p-fig { display: block; width: min(62vw, 30vh, 260px); aspect-ratio: 1.45; margin: 10px auto 0; padding: 0; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.p-fig .fig { width: 100%; height: 100%; }
.p-fig.preview { opacity: .6; }
.p-say { text-align: center; font-size: 14px; font-weight: 600; color: var(--accent); min-height: 20px; margin-top: 6px; }
.player[data-phase="rest"] .p-say { color: var(--rest); }
.g-fig .fig { max-height: 46vh; }
