/* ShapeUp styles (was inline in index.html) */
:root {
  /* Bright fitness-app world: soft grey canvas, white cards, orange→pink energy gradient. Layout: phone column, gradient hero, fixed bottom tab bar. */
  --bg: #F3F4F9;
  --card: #FFFFFF;
  --ink: #171A2C;
  --muted: #747A90;
  --line: #E6E8F0;
  --brand: #FF5A3C;
  --brand2: #FF3D7F;
  --grad: linear-gradient(135deg, #FF7A3D 0%, #FF3D7F 100%);
  --good: #16A974;
  --warn: #F29D0B;
  --bad: #E5484D;
  --water: #2F80ED;
  --sleep: #7B61FF;
  --steps: #0FA98A;
  --display: "Poppins", "Avenir Next", "Segoe UI", sans-serif;
  --body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 1px 2px rgba(23,26,44,.04), 0 6px 20px rgba(23,26,44,.06);
  --field: #F7F8FC;
  --tint: #FFF6F3;
  --soft: #FFF0EC;
  --tabbg: rgba(255,255,255,.96);
  --tickline: #CDD1DE;
  --how: #4A5068;
  --fig1: #FF5A3C;
  --fig2: #FFB8A8;
  color-scheme: light;
}
/* dark: same brand gradient, deep navy canvas */
:root[data-theme="dark"] {
  --bg: #0D0F17;
  --card: #171A26;
  --ink: #EEF0F7;
  --muted: #9AA0B8;
  --line: #2A2E3F;
  --field: #10121B;
  --tint: #2B1915;
  --soft: #2B1915;
  --tabbg: rgba(23,26,38,.96);
  --tickline: #464B60;
  --how: #B9BED0;
  --fig1: #FF6A4D;
  --fig2: #7A3B30;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 6px 20px rgba(0,0,0,.35);
  color-scheme: dark;
}
:root[data-theme="dark"] .badge[style], :root[data-theme="dark"] .step button[style*="background:#"] { background: color-mix(in srgb, currentColor 18%, transparent) !important; }
:root[data-theme="dark"] .chip.good { background: rgba(22,169,116,.18); color: #4ADE9F; }
:root[data-theme="dark"] .chip.warn { background: rgba(242,157,11,.18); color: #FBBF4D; }
:root[data-theme="dark"] .chip.bad { background: rgba(229,72,77,.18); color: #FF8A8E; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.5; }
body { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
.wrap { max-width: 520px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: 26px; font-weight: 700; line-height: 1.2; }
h2 { font-size: 19px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
button:disabled { opacity: .45; cursor: default; }
:focus-visible { outline: 3px solid rgba(255,90,60,.45); outline-offset: 2px; }
input, select, textarea { width: 100%; background: var(--field); border: 1.5px solid var(--line); border-radius: 12px; color: var(--ink); font: inherit; font-size: 16px; padding: 11px 12px; font-variant-numeric: tabular-nums; transition: border-color .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; background: var(--card); }
textarea { min-height: 80px; resize: vertical; }
label.f { font-size: 13px; font-weight: 600; color: var(--muted); display: grid; gap: 6px; }
.btn { background: var(--grad); color: #fff; border-radius: 14px; padding: 13px 20px; font-weight: 700; font-size: 15px; box-shadow: 0 6px 16px rgba(255,74,80,.28); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.block { width: 100%; }
.btn.soft { background: var(--soft); color: var(--brand); box-shadow: none; }
.btn.ghost { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); box-shadow: none; }
.btn.sm { padding: 8px 12px; font-size: 13px; border-radius: 10px; }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.ic { width: 20px; height: 20px; flex: none; }
.ic svg { width: 100%; height: 100%; display: block; }

/* hero */
.hero { background: var(--grad); color: #fff; border-radius: 0 0 28px 28px; padding: calc(18px + env(safe-area-inset-top)) 0 22px; box-shadow: 0 10px 30px rgba(255,74,80,.25); }
.hero .wrap { display: grid; gap: 16px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.25); display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 18px; border: 2px solid rgba(255,255,255,.5); }
.hello small { display: block; opacity: .85; font-size: 13px; font-weight: 500; }
.hello b { font-family: var(--display); font-size: 21px; font-weight: 700; line-height: 1.2; }
.st-big { font: 800 34px/1.1 Poppins, system-ui; }
.st-row { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.st-row:last-child { border-bottom: 0; }
.st-row img, .st-ico { width: 36px; height: 36px; border-radius: 10px; background: var(--field); }
.st-bar { height: 6px; border-radius: 6px; background: var(--field); margin-top: 6px; overflow: hidden; }
.st-bar i { display: block; height: 100%; border-radius: 6px; background: var(--grad); }
.st-bar i.over { background: var(--bad); }
.st-row select { font: inherit; font-size: 12.5px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: inherit; }
.st-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; height: 120px; }
.st-week div { display: grid; gap: 4px; justify-items: center; font-size: 11px; color: var(--muted); }
.st-week b { width: 100%; border-radius: 6px 6px 3px 3px; background: var(--grad); min-height: 3px; }
.st-week b.today { background: var(--brand); }
#alarmTop, #commTop, #profileBtn { position: relative; }
#alarmTop.need::after, #profileBtn.need::after, .tabbar #commTop.need::before { content: ""; position: absolute; top: 5px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: #FFD43B; box-shadow: 0 0 0 2px rgba(255,255,255,.5); }
.pill-btn { background: rgba(255,255,255,.2); border-radius: 99px; padding: 7px 12px; color: #fff; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.score { display: flex; align-items: center; gap: 18px; }
.ring { width: 96px; height: 96px; flex: none; position: relative; }
.ring svg { transform: rotate(-90deg); display: block; }
.ring .lbl { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1.05; }
.ring .lbl b { font-family: var(--display); font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ring .lbl span { font-size: 11px; opacity: .9; display: block; }
.score .meta { display: grid; gap: 8px; flex: 1; min-width: 0; }
.daynav { display: flex; align-items: center; gap: 6px; }
.daynav button { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.2); color: #fff; display: grid; place-items: center; }
.daynav span { font-weight: 700; font-size: 15px; }
.streak { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.2); padding: 5px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; width: fit-content; }
.now { background: var(--card); color: var(--ink); border-radius: 18px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; box-shadow: 0 8px 20px rgba(120,20,40,.18); }
.now .badge { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.now small { color: var(--brand); font-weight: 700; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.now b { display: block; font-weight: 700; line-height: 1.3; }
.sync { font-size: 12px; opacity: .85; }

/* sections */
main { padding-top: 18px; }
section { display: grid; gap: 14px; }
.sec-title { display: flex; align-items: baseline; justify-content: space-between; margin-top: 6px; }
.card { background: var(--card); border-radius: 20px; padding: 16px; box-shadow: var(--shadow); display: grid; gap: 12px; }
.card ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.card li::marker { color: var(--brand); }
.chead { display: flex; align-items: center; gap: 10px; }
.chead .badge { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; }
/* Plan tab: cards fold to their header; tap the header to open. */
.foldable > .chead { cursor: pointer; }
.foldable > .chead .chev { color: var(--muted); transition: transform .2s; transform: rotate(90deg); }
.foldable.fold > .chead .chev { transform: none; }
.foldable.fold > :not(.chead) { display: none !important; }
.foldable .fold-sub { display: none; font-size: 13px; color: var(--muted); font-weight: 500; margin-top: 1px; }
.foldable.fold .fold-sub { display: block; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

/* quick trackers */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { background: var(--card); border-radius: 20px; padding: 12px; box-shadow: var(--shadow); display: grid; gap: 8px; align-content: start; }
.tile .top { display: flex; align-items: center; justify-content: space-between; }
.tile .badge { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; }
.tile .name { font-size: 12px; font-weight: 600; color: var(--muted); }
.tile .val { font-family: var(--display); font-weight: 700; font-size: 22px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.tile .val small { font-size: 12px; color: var(--muted); font-weight: 500; font-family: var(--body); }
.tile .bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.tile .bar i { display: block; height: 100%; border-radius: 99px; }
.step { display: flex; gap: 6px; }
.step button { flex: 1; height: 32px; border-radius: 10px; font-weight: 700; font-size: 18px; line-height: 1; }
.tile input { padding: 4px 0; border: none; background: none; font-family: var(--display); font-weight: 700; font-size: 22px; border-bottom: 2px dashed var(--line); border-radius: 0; }
.tile input:focus { border-bottom-color: var(--steps); background: none; }

/* timeline */
.timeline { display: grid; gap: 10px; position: relative; }
.task { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); display: flex; align-items: flex-start; gap: 12px; padding: 12px 12px 12px 12px; transition: opacity .2s; border: 2px solid transparent; }
.task.is-now { border-color: var(--brand); }
.tl-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 8px 2px -2px; }
.tl-label.warn { color: var(--warn); }
.tl-label.good { color: var(--good); }
.wblock { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; border: 2px dashed var(--line); color: var(--muted); }
.wblock .badge { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--field); color: var(--muted); }
.wblock b { color: var(--ink); font-weight: 700; font-size: 14px; display: block; }
.wblock span.small { font-variant-numeric: tabular-nums; font-weight: 600; }
.task.done { opacity: .6; }
.task.done .ttl { text-decoration: line-through; text-decoration-thickness: 2px; }
.task .badge { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; }
.task .body { flex: 1; min-width: 0; }
.task summary { list-style: none; cursor: pointer; }
.task summary::-webkit-details-marker { display: none; }
.task .tm { font-size: 12px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 6px; }
.task .ttl { font-weight: 700; font-size: 15px; line-height: 1.35; display: block; margin-top: 1px; }
.task .more { font-size: 12px; color: var(--brand); font-weight: 600; }
.task details[open] .more { display: none; }
.how { margin: 8px 0 0; padding-left: 18px; color: var(--how); display: grid; gap: 4px; font-size: 14px; }
.how li::marker { color: var(--brand); }
.tick { width: 34px; height: 34px; border-radius: 50%; border: 2.5px solid var(--tickline); display: grid; place-items: center; flex: none; color: #fff; margin-top: 4px; transition: all .15s; }
.task.done .tick { background: var(--good); border-color: var(--good); }
.chip { font-size: 10.5px; padding: 2px 8px; border-radius: 99px; background: var(--line); color: var(--ink); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.chip.now { background: var(--grad); color: #fff; }
.chip.good { background: #DDF6EC; color: #0B7A52; }
.chip.warn { background: #FFF1D6; color: #9A5B00; }
.chip.bad { background: #FDE2E2; color: #B42318; }

/* stats */
.stat { background: var(--card); border-radius: 18px; padding: 12px; box-shadow: var(--shadow); display: grid; gap: 2px; }
.stat span { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat b { font-family: var(--display); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.25; }
.gauge { position: relative; height: 10px; border-radius: 99px; background: linear-gradient(90deg, #F29D0B 0 18%, #16A974 18% 45%, #F29D0B 45% 70%, #E5484D 70% 100%); }
.gauge i { position: absolute; top: -5px; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: var(--card); border: 4px solid var(--ink); }
.gscale { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); font-weight: 600; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
td, th { text-align: left; padding: 9px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; }
td.t { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--brand); font-weight: 700; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
tr.today td { background: var(--tint); }
.tablewrap { overflow-x: auto; }
.bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; align-items: end; height: 130px; }
.bars div { border-radius: 8px 8px 4px 4px; background: var(--line); min-height: 4px; }
.bars div.ok { background: var(--good); }
.bars div.mid { background: var(--warn); }
.bars div.cur { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--brand); }
.blabels { display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; font-size: 11px; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; font-weight: 600; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* face */
.drop { border: 2px dashed #FFC2B4; background: var(--tint); border-radius: 18px; padding: 22px 14px; display: grid; justify-items: center; gap: 8px; text-align: center; cursor: pointer; }
.drop .badge { width: 56px; height: 56px; border-radius: 18px; background: var(--grad); color: #fff; display: grid; place-items: center; }
.drop input { display: none; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.slot { aspect-ratio: 3 / 4; border-radius: 16px; border: 2px dashed #FFC2B4; background: var(--tint); display: grid; place-items: center; align-content: center; gap: 4px; color: var(--brand); position: relative; overflow: hidden; padding: 6px; }
.slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot.has { border-style: solid; border-color: var(--good); }
.slot b, .slot span { position: relative; z-index: 1; font-size: 13px; }
.slot span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.slot.has b, .slot.has span { background: rgba(0,0,0,.55); color: #fff; padding: 1px 8px; border-radius: 99px; }
.slot.has b { position: absolute; left: 6px; bottom: 6px; }
.slot.has span { position: absolute; right: 6px; top: 6px; }
/* camera capture */
.cam { position: fixed; inset: 0; z-index: 60; background: #000; color: #fff; display: grid; grid-template-rows: auto 1fr auto; }
.cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam video.mirror { transform: scaleX(-1); }
.cam-guide { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cam-top, .cam-bottom { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; padding: calc(12px + env(safe-area-inset-top)) 16px 12px; background: linear-gradient(rgba(0,0,0,.55), transparent); }
.cam-bottom { padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0,0,0,.65)); justify-content: space-between; }
.cam-top button, .cam-bottom .side { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.2); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 18px; }
.cam-mid { position: relative; z-index: 1; display: grid; align-content: space-between; justify-items: center; padding: 8px 16px; }
.cam-tip { background: rgba(0,0,0,.55); padding: 8px 14px; border-radius: 14px; font-weight: 600; text-align: center; max-width: 340px; }
.cam-count { font-family: var(--display); font-size: 96px; font-weight: 800; text-shadow: 0 4px 20px rgba(0,0,0,.5); align-self: center; }
.shutter { width: 76px; height: 76px; border-radius: 50%; background: #fff; border: 6px solid rgba(255,255,255,.4); background-clip: padding-box; }
.cam-dots { display: flex; gap: 6px; }
.cam-dots i { width: 34px; height: 44px; border-radius: 8px; border: 2px solid rgba(255,255,255,.5); background-size: cover; background-position: center; }
.cam-dots i.on { border-color: #FF7A3D; }
.thumbs img { width: 76px; height: 76px; object-fit: cover; border-radius: 14px; }
.answer { display: grid; gap: 10px; }
.answer h3 { color: var(--brand); margin-top: 4px; }
.answer ul { margin: 0; padding-left: 20px; display: grid; gap: 5px; }
.answer img { width: 100%; border-radius: 16px; }
.big-shape { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--tint); border-radius: 16px; color: var(--brand); }
.big-shape .ic { width: 30px; height: 30px; }
.big-shape b { color: var(--ink); }
.big-shape b { font-family: var(--display); font-size: 22px; }
.msg { font-size: 14px; padding: 10px 12px; border-radius: 12px; background: #FFF1D6; color: #7A4A00; font-weight: 500; }
.msg.ok { background: #DDF6EC; color: #0B6B48; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.checks label { display: flex; gap: 8px; align-items: center; padding: 10px; border: 1.5px solid var(--line); border-radius: 12px; font-size: 14px; font-weight: 600; cursor: pointer; }
.checks input { width: 18px; height: 18px; accent-color: var(--brand); }
details.guide summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--brand); }

/* schedule editor */
.srow { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.srow .badge { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.srow .t { font-size: 12px; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.edit { display: grid; gap: 10px; padding: 14px; border: 2px solid #FFC2B4; border-radius: 16px; background: #FFFBFA; }

/* bottom nav */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--tabbg); backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar .wrap { display: grid; grid-template-columns: repeat(var(--tabs, 6), 1fr); padding: 6px 4px; }
.tabbar button { display: grid; justify-items: center; gap: 2px; padding: 6px 0; font-size: 11px; font-weight: 600; color: var(--muted); border-radius: 12px; }
.tabbar button .ic { width: 24px; height: 24px; }
.tabbar button[aria-selected="true"] { color: var(--brand); }
.tabbar button[aria-selected="true"] .ic { background: var(--tint); border-radius: 10px; padding: 3px; width: 34px; height: 30px; }

/* onboarding */
.onb { min-height: 100%; display: grid; gap: 18px; padding: calc(24px + env(safe-area-inset-top)) 16px 24px; }
.onb-hero { background: var(--grad); color: #fff; border-radius: 28px; padding: 28px 22px; display: grid; gap: 14px; box-shadow: 0 14px 34px rgba(255,74,80,.3); }
.onb-hero h1 { font-size: 30px; font-weight: 800; }
.onb-hero .feat { display: flex; gap: 12px; align-items: center; font-weight: 600; }
.onb-hero .feat .badge { width: 38px; height: 38px; border-radius: 12px; background: rgba(255,255,255,.22); display: grid; place-items: center; flex: none; }
.dots { display: flex; gap: 6px; justify-content: center; }
.dots i { width: 8px; height: 8px; border-radius: 99px; background: var(--line); transition: all .2s; }
.dots i.on { width: 24px; background: var(--brand); }
.opts { display: grid; gap: 10px; }
.opt { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--card); border: 2px solid var(--line); border-radius: 18px; text-align: left; box-shadow: var(--shadow); }
.opt .badge { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.opt b { display: block; font-weight: 700; }
.opt .desc { display: block; font-size: 13px; color: var(--muted); }
.opt[aria-pressed="true"] { border-color: var(--brand); background: var(--tint); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg.c2 { grid-template-columns: 1fr 1fr; }
.seg.c4 { grid-template-columns: 1fr 1fr; }
.seg.sm button { padding: 10px 6px; font-size: 14px; font-weight: 600; border-radius: 12px; }
.q { display: grid; gap: 8px; }
.q > span { font-size: 14px; font-weight: 700; }
.fix { display: grid; gap: 10px; }
.cmp { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line, #EEF0F5); font-size: 14px; align-items: center; }
.cmp:last-child { border-bottom: 0; }
.cmp.head { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted, #6B7280); padding-top: 0; }
.cmp b { color: var(--brand); }
.fix > div { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; background: var(--field); }
.fix .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; margin-top: 7px; }
.fix b { display: block; font-weight: 700; line-height: 1.35; }
.fix p { font-size: 14px; color: var(--how); margin-top: 2px; }
.seg button { padding: 12px 0; border-radius: 14px; border: 2px solid var(--line); background: var(--card); font-weight: 700; }
.seg button[aria-pressed="true"] { border-color: var(--brand); background: var(--tint); color: var(--brand); }
.bignum { display: grid; gap: 6px; }
.bignum input { font-family: var(--display); font-size: 26px; font-weight: 700; padding: 10px 14px; }
.unit { position: relative; }
.unit em { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); font-weight: 600; font-size: 14px; pointer-events: none; }
.icon-btn { width: 36px; height: 36px; padding: 0; justify-content: center; }
.install { background: var(--grad); color: #fff; }
.install .muted { color: rgba(255,255,255,.88); }
.install .badge { background: rgba(255,255,255,.22); }
.install .btn { background: #fff; color: var(--brand); box-shadow: none; }
.install .x { color: #fff; opacity: .8; width: 30px; height: 30px; display: grid; place-items: center; }
.install li::marker { color: #fff; font-weight: 700; }
.install ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
/* workout / routine player */
.player { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: grid; grid-template-rows: auto 1fr auto auto; padding: calc(12px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)); gap: 10px; max-width: 560px; margin: 0 auto; overflow-y: auto; }
.pl-top { display: flex; align-items: center; gap: 10px; }
.pl-top > button { width: 40px; height: 40px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; flex: none; font-size: 18px; font-weight: 700; }
.pl-bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin-bottom: 4px; }
.pl-bar i { display: block; height: 100%; background: var(--grad); }
.pl-main { display: grid; justify-items: center; text-align: center; gap: 8px; align-content: start; }
.pl-main .chip { color: #fff; }
.pl-main h1 { font-size: 28px; }
.pl-ring { position: relative; width: 170px; height: 170px; margin: 2px 0; }
.pl-ring svg { transform: rotate(-90deg); }
.pl-ring .lbl { position: absolute; inset: 0; display: grid; place-content: center; }
.pl-ring b { font-family: var(--display); font-size: 48px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.pl-ring span { font-size: 13px; color: var(--muted); font-weight: 600; }
.pl-main .how { text-align: left; width: 100%; background: var(--card); border-radius: 16px; padding: 12px 14px 12px 32px; margin: 0; box-shadow: var(--shadow); }
.pl-ctrl { display: grid; grid-template-columns: 56px 1fr 56px; gap: 10px; align-items: center; }
.pl-ctrl > button:not(.btn) { height: 56px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; }
.pl-ctrl .btn { height: 56px; font-size: 17px; }
.pl-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; font-size: 13px; font-weight: 600; }
.pl-links a { color: var(--brand); text-decoration: none; padding: 6px 10px; border-radius: 99px; background: var(--soft); }
#aboutPage { z-index: 31; }
.orb { width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; margin: 18px auto 6px; box-shadow: 0 10px 40px rgba(255,90,60,.35); transition: transform .2s; }
.orb .ic { width: 48px; height: 48px; }
.orb.listening { animation: orbPulse 1.6s ease-in-out infinite; }
.orb.speaking { animation: orbTalk .5s ease-in-out infinite alternate; }
.orb.off { background: var(--field); color: var(--muted); box-shadow: none; }
@keyframes orbPulse { 50% { transform: scale(1.06); box-shadow: 0 10px 60px rgba(255,90,60,.55); } }
@keyframes orbTalk { to { transform: scale(1.12); } }
.vlog { width: 100%; display: grid; gap: 8px; text-align: left; margin-top: 6px; }
.vlog div { padding: 10px 12px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); font-size: 14.5px; }
.vlog div.you { background: var(--field); box-shadow: none; justify-self: end; max-width: 85%; }
.vlog small { display: block; font-size: 11px; color: var(--muted); font-weight: 700; }
.page { position: fixed; inset: 0; z-index: 30; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.page .wrap { display: grid; gap: 14px; padding-top: 14px; }
.page-top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: calc(12px + env(safe-area-inset-top)) 16px 12px; background: var(--grad); color: #fff; }
.page-top h2 { margin: 0; font-size: 20px; }
.icon-round { width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255,255,255,.22); color: #fff; cursor: pointer; }
.set-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.set-row:last-of-type { border-bottom: 0; }
.set-row > .ic:first-child { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--soft); color: var(--brand); flex: none; }
.set-row b, .set-row .grow { font-weight: 600; }
.set-row small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.sheet-bg { position: fixed; inset: 0; z-index: 40; background: rgba(10,12,20,.45); display: grid; align-items: end; }
.sheet { background: var(--card); border-radius: 24px 24px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); max-width: 560px; width: 100%; margin: 0 auto; display: grid; gap: 12px; max-height: 85vh; overflow-y: auto; }
.how .g { all: unset; cursor: pointer; color: var(--ink); text-decoration: underline; text-decoration-color: var(--brand); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.how .g .ic { display: inline-block; width: 15px; height: 15px; vertical-align: -2px; margin-left: 4px; color: var(--brand); }
.start-btn { margin-top: 10px; }
.fig { display: block; flex: none; }
.wplan .ex { align-items: center; }
.wplan .ex .fig { background: var(--field); border-radius: 12px; margin-right: 2px; }
.wplan .ex > span { flex: 1; }
#exFig { display: grid; place-items: center; background: var(--field); border-radius: 18px; padding: 6px; }
#plFig:empty { display: none; }
#plFig { text-align: center; } .demo-next { font-size: 13px; color: var(--muted); padding-top: 6px; }
#plFig { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 4px; }
.wplan { display: grid; gap: 12px; margin-top: 10px; }
.wplan h4 { margin: 0; font-family: var(--display); font-size: 15px; display: flex; justify-content: space-between; gap: 8px; }
.wplan h4 span { color: var(--brand); font-size: 13px; font-weight: 700; white-space: nowrap; }
.wplan .note { font-size: 13px; color: var(--muted); margin-top: 2px; }
.wplan .ex { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 14px; width: 100%; text-align: left; }
.wplan .ex b { font-weight: 700; }
.wplan .ex em { font-style: normal; font-weight: 700; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.wplan .ex small { display: block; color: var(--muted); font-size: 12.5px; }
.wplan .ex .ic { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin-left: 4px; color: var(--brand); }
a.btn { text-decoration: none; border: none; }
[hidden] { display: none !important; }
@media (max-width: 430px) { .pb-txt { display: none; } #profileBtn { width: 36px; height: 36px; padding: 0; justify-content: center; } }
.hero .row { min-width: 0; }
@media (max-width: 370px) { .tiles { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.task-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.late-pick { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.late-pick .chip { padding: 7px 11px; cursor: pointer; }
.task.skipped { opacity: .55; }
.task.skipped .ttl { text-decoration: line-through; }

.cm-msgs { display: grid; gap: 8px; max-height: calc(100vh - 230px); overflow-y: auto; padding: 4px 2px; }
.cm-msg { justify-self: start; max-width: 85%; background: var(--card); box-shadow: var(--shadow); border-radius: 16px 16px 16px 4px; padding: 8px 12px; font-size: 14.5px; cursor: pointer; }
.cm-msg.mine { justify-self: end; background: var(--soft); border-radius: 16px 16px 4px 16px; }
.cm-msg small { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.cm-user { border: 0; background: none; padding: 0; font: 700 12px/1.3 inherit; color: var(--brand); cursor: pointer; }
.cm-send { display: flex; gap: 8px; align-items: flex-end; position: sticky; bottom: 0; background: var(--bg); padding: 8px 0; }
.cm-send textarea, .cm-send input { flex: 1; min-height: 44px; resize: none; }
.cm-menu { display: grid; gap: 4px; justify-self: stretch; background: var(--card); box-shadow: var(--shadow); border-radius: 12px; padding: 6px; }
.cm-menu button { border: 0; background: var(--field); border-radius: 10px; padding: 10px; font: inherit; text-align: left; cursor: pointer; color: inherit; }
.cm-toast { position: fixed; left: 16px; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 40; }
#helpRow.need .grow::after { content: " •"; color: var(--brand); font-weight: 800; }

.tabbar #commTop { position: relative; }
.tabbar #commTop.need::before { top: 4px; right: calc(50% - 16px); }
.fab { position: fixed; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 11; width: 58px; height: 58px; border-radius: 50%; border: 0;
  display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: 0 8px 24px rgba(255, 90, 60, .45); cursor: pointer; transition: transform .15s; }
.fab .ic { width: 28px; height: 28px; }
.fab:active { transform: scale(.94); }
#onboard:not([hidden]) ~ .fab, .fab[hidden] { display: none; }
@media (min-width: 900px) { .fab { right: calc(50% - 430px); } }
.fab-menu { position: fixed; right: 16px; bottom: calc(152px + env(safe-area-inset-bottom)); z-index: 12; width: min(300px, calc(100vw - 32px)); display: grid; gap: 6px;
  background: var(--card); border-radius: 18px; padding: 8px; box-shadow: 0 14px 40px rgba(20, 24, 40, .25); animation: fabIn .15s ease-out; }
.fab-menu button { display: flex; gap: 12px; align-items: center; border: 0; background: none; border-radius: 12px; padding: 10px; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.fab-menu button:active, .fab-menu button:hover { background: var(--field); }
.fab-menu .badge { width: 38px; height: 38px; flex: none; }
.fab-menu small { display: block; color: var(--muted); font-size: 12px; }
@keyframes fabIn { from { opacity: 0; transform: translateY(8px) scale(.97); } }
@media (min-width: 900px) { .fab-menu { right: calc(50% - 430px); } }

.sos-btn { background: #E5484D !important; color: #fff; font-weight: 800; letter-spacing: .5px; padding: 7px 12px; box-shadow: 0 0 0 2px rgba(255,255,255,.6); }
.sos-count { font: 800 96px/1 Poppins, system-ui; color: #E5484D; margin: 18px 0 8px; }
.sos-call { background: #E5484D !important; font-size: 18px; padding: 16px; }
.route-box { background: var(--field); border-radius: 16px; padding: 10px; min-height: 120px; display: grid; place-items: center; }
.route { width: 100%; max-width: 260px; height: auto; }
#sosPage { z-index: 35; }
