/* Themes: each theme sets a few base colours; every tint in the app is derived from them with
   color-mix, so a new theme is just a new block here plus an entry in THEMES (app.js).
   Figure tiles, video and camera areas stay dark on purpose in every theme. */
:root, [data-theme="midnight"] {
  --bg: #0f1115; --card: #1a1d24; --card2: #22262f; --line: #2c313b; --tabs: #13161b;
  --text: #eceef1; --muted: #8d939e; --accent: #3d8bfd;
  --green: #2fbf71; --warn: #f2b13d; --danger: #ff5c5c; --purple: #a78bfa;
  color-scheme: dark;
}
:root {
  --accent-dim: color-mix(in srgb, var(--accent) 30%, var(--bg));
  --green-dim: color-mix(in srgb, var(--green) 22%, var(--bg));
  --r: 14px; --dock: 64px;
}
[data-theme="light"] {
  --bg: #f3f4f7; --card: #ffffff; --card2: #eceef2; --line: #dcdfe5; --tabs: #ffffff;
  --text: #15181d; --muted: #646b77; --accent: #2a6be0;
  --green: #1b9a56; --warn: #b97c0a; --danger: #d63a3a; --purple: #7652d6;
  color-scheme: light;
}
[data-theme="carbon"] { --bg: #000000; --card: #0e0e0e; --card2: #181818; --line: #272727; --tabs: #050505; --text: #f3f3f3; --muted: #8b8b8b; --accent: #ff7a1a; color-scheme: dark; }
[data-theme="forest"] { --bg: #0b1410; --card: #13201a; --card2: #1a2a22; --line: #25392d; --tabs: #0d1712; --text: #e8f2ec; --muted: #8ba395; --accent: #4cc38a; --green: #8fd14f; color-scheme: dark; }
[data-theme="ember"] { --bg: #140d0b; --card: #211512; --card2: #2b1c18; --line: #3b2722; --tabs: #170f0d; --text: #f6ece8; --muted: #a9918a; --accent: #ff6b3d; color-scheme: dark; }
[data-theme="ocean"] { --bg: #07131a; --card: #0f1f29; --card2: #152835; --line: #1f3646; --tabs: #09161e; --text: #e6f3fa; --muted: #86a4b5; --accent: #1fb8cf; color-scheme: dark; }
[data-theme="grape"] { --bg: #100c17; --card: #1b1526; --card2: #231c31; --line: #322844; --tabs: #130f1b; --text: #f1ecf8; --muted: #9b90ae; --accent: #a274ff; --purple: #e08cff; color-scheme: dark; }
[data-theme="rose"] { --bg: #160d12; --card: #22151c; --card2: #2c1b24; --line: #3c2632; --tabs: #190f15; --text: #f8ecf1; --muted: #ae909c; --accent: #ff5c9a; color-scheme: dark; }
/* Forge: red-orange theme with Rory (pro.js). */
[data-theme="forge"] { --bg: #140b08; --card: #20130e; --card2: #2a1a13; --line: #3d2418; --tabs: #170d09; --text: #fbeee6; --muted: #b0928a; --accent: #ff5a2c; --warn: #ffb03a; --figbg: #1c100b; color-scheme: dark; }
[data-theme="forge"] body { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cg fill='%23ff7a2f' fill-opacity='.16'%3E%3Ccircle cx='30' cy='40' r='2.5'/%3E%3Ccircle cx='180' cy='20' r='1.8'/%3E%3Ccircle cx='120' cy='150' r='2.2'/%3E%3Ccircle cx='60' cy='200' r='1.6'/%3E%3Ccircle cx='210' cy='170' r='2.6'/%3E%3C/g%3E%3Cg fill='%23ffb03a' fill-opacity='.12'%3E%3Cpath d='M95 70c6 8 4 16-2 18 2-6-2-10-4-12 0 6-4 8-6 6 0-6 6-8 12-12z'/%3E%3Cpath d='M200 100c5 7 3 13-2 15 2-5-2-8-3-10 0 5-3 6-5 5 0-5 5-7 10-10z'/%3E%3C/g%3E%3C/svg%3E"); background-attachment: fixed; }
[data-theme="forge"] .btn.primary { box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 40%, transparent); }
/* Verdant: green theme with Thorn (pro.js). */
[data-theme="verdant"] { --bg: #0a120c; --card: #121f15; --card2: #19291c; --line: #253c2a; --tabs: #0c150e; --text: #eaf5ea; --muted: #8fa892; --accent: #7ad13a; --green: #42d6a4; --figbg: #0f1a12; color-scheme: dark; }
[data-theme="verdant"] body { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cg fill='%237ad13a' fill-opacity='.11'%3E%3Cpath d='M40 40c20-14 36-6 36-6s-8 18-30 18c-4 0-6-6-6-12z'/%3E%3Cpath d='M170 120c18-12 32-4 32-4s-8 16-27 15c-4 0-5-6-5-11z'/%3E%3Cpath d='M70 190c14-10 26-3 26-3s-6 13-22 12c-3 0-4-5-4-9z'/%3E%3C/g%3E%3C/svg%3E"); background-attachment: fixed; }
/* Crimson: vampire theme with Valen (pro.js). */
[data-theme="crimson"] { --bg: #0e0709; --card: #1a0d11; --card2: #241217; --line: #3b1a23; --tabs: #12090c; --text: #f6e9ec; --muted: #a98d94; --accent: #e0213a; --danger: #ff6b6b; --purple: #b9a7ff; --figbg: #160a0e; color-scheme: dark; }
[data-theme="crimson"] body { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cg fill='%23e0213a' fill-opacity='.13'%3E%3Cpath d='M40 50q6-6 12-2 3-4 6 0 3-4 6 0 6-4 12 2-6 0-9 4-4-3-9 0-4-3-9 0-3-4-9-4z'/%3E%3Cpath d='M170 150q5-5 10-2 2-3 5 0 2-3 5 0 5-3 10 2-5 0-7 3-3-2-8 0-3-2-8 0-2-3-7-3z'/%3E%3C/g%3E%3Cpath d='M200 40a14 14 0 1 0 10 23 11 11 0 1 1-10-23z' fill='%23f6e9ec' fill-opacity='.07'/%3E%3C/svg%3E"); background-attachment: fixed; }
[data-theme="crimson"] h1 { letter-spacing: .04em; }
[data-theme="crimson"] .momo-greet .bubble { font-style: italic; }
/* Bamboo: light cream and bamboo-green theme with Bao the panda (pro.js). */
[data-theme="bamboo"] { --bg: #f6f8ef; --card: #ffffff; --card2: #eef3e3; --line: #dbe5c9; --tabs: #ffffff; --text: #233021; --muted: #6f7f69; --accent: #4caf50; --green: #2e9e6a; --warn: #c48a10; --danger: #d94a4a; --purple: #7d63d6; --figbg: #2d3a2a; --r: 18px; color-scheme: light; }
[data-theme="bamboo"] body { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cg fill='%234caf50' fill-opacity='.10'%3E%3Crect x='30' y='0' width='7' height='240' rx='3'/%3E%3Crect x='29' y='60' width='9' height='3'/%3E%3Crect x='29' y='140' width='9' height='3'/%3E%3Cpath d='M37 62c14-8 26-4 26-4s-8 10-22 8z'/%3E%3Cpath d='M180 90c-14-8-26-4-26-4s8 10 22 8z'/%3E%3Cpath d='M150 190c14-8 26-4 26-4s-8 10-22 8z'/%3E%3C/g%3E%3C/svg%3E"); background-attachment: fixed; }
[data-theme="bamboo"] .btn, [data-theme="bamboo"] .card, [data-theme="bamboo"] .ex { border-radius: 18px; }

/* Nightshade: purple goth theme with the Raven mascot (pro.js). */
[data-theme="nightshade"] {
  --bg: #0d0a14; --card: #171124; --card2: #20182f; --line: #30234a; --tabs: #100c19;
  --text: #f0e9fb; --muted: #9c90b5; --accent: #b65cff;
  --green: #3fcf9a; --warn: #f2b13d; --danger: #ff5c7a; --purple: #e06bff;
  --figbg: #170f24;
  color-scheme: dark;
}
[data-theme="nightshade"] body { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cg fill='%23b65cff' fill-opacity='.14'%3E%3Cpath d='M40 30l2 6 6 2-6 2-2 6-2-6-6-2 6-2z'/%3E%3Cpath d='M190 60l1.5 4.5 4.5 1.5-4.5 1.5-1.5 4.5-1.5-4.5-4.5-1.5 4.5-1.5z'/%3E%3Cpath d='M120 160l2 6 6 2-6 2-2 6-2-6-6-2 6-2z'/%3E%3Cpath d='M30 210l1.5 4.5 4.5 1.5-4.5 1.5-1.5 4.5-1.5-4.5-4.5-1.5 4.5-1.5z'/%3E%3C/g%3E%3Cg fill='%23e06bff' fill-opacity='.12'%3E%3Cpath d='M220 190a16 16 0 1 0 12 26 13 13 0 1 1-12-26z'/%3E%3Cpath d='M90 80a10 10 0 1 0 8 17 8 8 0 1 1-8-17z'/%3E%3C/g%3E%3C/svg%3E"); background-attachment: fixed; }
[data-theme="nightshade"] h1 { letter-spacing: .04em; }
[data-theme="nightshade"] .btn.primary { box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 40%, transparent); }
[data-theme="nightshade"] .momo-greet .bubble { font-style: italic; }
.mascot-line { font-weight: 700; font-style: italic; color: var(--accent); margin: 2px 0 4px; }

/* Sakura: pastel cherry-blossom theme with the Momo mascot (pro.js). */
[data-theme="sakura"] {
  --bg: #fff2f7; --card: #ffffff; --card2: #ffe5ef; --line: #f5cfe0; --tabs: #ffffff;
  --text: #3a2141; --muted: #9a7891; --accent: #ff5fa2;
  --green: #22a982; --warn: #d9850a; --danger: #e0445e; --purple: #9b6bff;
  --figbg: #4a2a50; --r: 18px;
  color-scheme: light;
}
[data-theme="sakura"] body { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cg fill='%23ff8fc0' fill-opacity='.16'%3E%3Cpath d='M30 40c8-10 22-8 22 4s-14 18-22 10-8-6 0-14z'/%3E%3Cpath d='M170 30c10-6 22 0 18 11s-18 13-24 4 0-12 6-15z'/%3E%3Cpath d='M110 120c9-9 22-5 20 7s-16 16-23 8-5-8 3-15z'/%3E%3Cpath d='M40 190c10-7 22-2 19 10s-17 14-23 5-2-10 4-15z'/%3E%3Cpath d='M200 170c8-9 21-6 20 6s-15 16-22 8-6-7 2-14z'/%3E%3C/g%3E%3C/svg%3E"); background-attachment: fixed; }
[data-theme="sakura"] .btn, [data-theme="sakura"] .card, [data-theme="sakura"] .ex { border-radius: 18px; }
[data-theme="sakura"] .btn.primary { box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); }
[data-theme="sakura"] h1, [data-theme="sakura"] h2 { letter-spacing: .01em; }
.momo-greet { display: flex; align-items: center; gap: 8px; margin: -6px 0 6px; }
.momo-greet .bubble { position: relative; background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 8px 12px; font-weight: 700; font-size: 14px; color: var(--accent); }
.momo-greet .bubble::before { content: ""; position: absolute; left: -8px; top: 50%; margin-top: -6px; border: 6px solid transparent; border-right-color: var(--line); border-left: 0; }
.mascot { display: block; flex: none; }
.celebrate .mascot { margin: -6px auto 0; animation: hop 1.2s ease-in-out infinite; }
@keyframes hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overscroll-behavior-y: contain; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1 { font-size: 26px; margin: 0; }
h2 { font-size: 18px; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.pre { white-space: pre-wrap; }

#view { padding: 12px 14px calc(var(--dock) + 110px); max-width: 680px; margin: 0 auto; padding-top: max(12px, env(safe-area-inset-top)); }

/* Dock: rest bar, mini bar, tabs */
#dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; }
#tabs { display: flex; background: var(--tabs); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
#tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; color: var(--muted); font-size: 11px; }
#tabs svg { width: 24px; height: 24px; fill: currentColor; }
#tabs a.on { color: var(--accent); }
#tabs a { position: relative; }
#tabs a.dot::after { content: ""; position: absolute; top: 6px; left: calc(50% + 9px); width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
body.focus #tabs { display: none; }
#minibar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 10px 8px; padding: 11px 14px; background: var(--accent-dim); border: 1px solid var(--accent); border-radius: var(--r); }
#minibar b { font-weight: 600; }
#restbar { margin: 0 10px 8px; background: var(--card2); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
#restbar .rb { display: flex; align-items: center; gap: 8px; padding: 9px 10px 9px 14px; }
#restbar .rt { font-size: 20px; font-variant-numeric: tabular-nums; font-weight: 700; flex: 1; }
#restbar .rt small { font-size: 12px; color: var(--muted); font-weight: 500; margin-right: 6px; }
#restbar .prog { height: 3px; background: var(--accent); transition: width .5s linear; }
[hidden] { display: none !important; }

/* Generic */
.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 10px; padding: 10px 16px; background: var(--card2); font-weight: 600; white-space: nowrap; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn.block { display: flex; width: 100%; margin: 10px 0; padding: 13px; }
.btn.ghost { background: var(--card); border: 1px solid var(--line); }
.btn.primary-ghost { background: var(--accent-dim); color: color-mix(in srgb, var(--accent) 40%, var(--text)); }
.btn.danger-ghost { background: transparent; color: var(--danger); }
.btn.danger { background: color-mix(in srgb, var(--danger) 16%, var(--card)); color: var(--danger); }
.icon { border: 0; background: transparent; padding: 6px; border-radius: 8px; display: inline-flex; }
.icon svg { width: 24px; height: 24px; fill: currentColor; }
.link { color: var(--accent); font-weight: 600; font-size: 14px; background: none; border: 0; padding: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin: 10px 0; }
.sect-head { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 0 4px; }
.group { margin: 18px 0 2px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: var(--accent); color: #fff; margin-left: 8px; vertical-align: 2px; }
.badge.pr { background: color-mix(in srgb, var(--warn) 18%, var(--card)); color: var(--warn); }
.day { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 8px; }
.empty { text-align: center; padding: 30px 10px; color: var(--muted); }
details.notes { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; margin: 10px 0; }
details.notes summary { font-weight: 600; cursor: pointer; }
details.notes .pre { margin-top: 8px; color: color-mix(in srgb, var(--text) 82%, var(--muted)); font-size: 14px; }
.eyebrow { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.resume { display: flex; align-items: center; justify-content: space-between; border-color: var(--accent); background: var(--accent-dim); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 8px; margin: 12px 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.stat b { display: block; font-size: 18px; }
.stat span { font-size: 12px; color: var(--muted); }
input.text, textarea.text, select.text { width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; outline: none; }
input.text:focus, textarea.text:focus { border-color: var(--accent); }
textarea.text { min-height: 220px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.chip { border: 1px solid var(--line); background: var(--card); padding: 6px 12px; border-radius: 99px; font-size: 13px; font-weight: 600; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Routine cards */
.routine { display: flex; align-items: center; gap: 12px; }
.routine.next { border-color: var(--accent); }
.routine-body { flex: 1; min-width: 0; }
.routine-title { font-weight: 700; font-size: 16px; margin-bottom: 3px; }
.routine .muted { font-size: 13px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ex-line { padding: 12px 0; border-bottom: 1px solid var(--line); }
.ex-line:last-child { border-bottom: 0; }
.ex-line b { display: block; }
.callout { background: color-mix(in srgb, var(--warn) 10%, var(--bg)); border-left: 3px solid var(--warn); padding: 8px 10px; border-radius: 6px; font-size: 13.5px; color: color-mix(in srgb, var(--warn) 25%, var(--text)); margin: 6px 0; white-space: pre-wrap; }

/* Active workout */
.wk-head { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -12px -14px 8px; padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.wk-time { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 17px; }
.wk-name { width: 100%; background: transparent; border: 0; font-size: 22px; font-weight: 700; padding: 6px 0; outline: none; }
.wk-notes { width: 100%; background: transparent; border: 0; color: var(--muted); resize: none; outline: none; padding: 0 0 6px; }
.ex { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 12px 6px; margin: 12px 0; }
.ex.ss { border-left: 3px solid var(--purple); }
.ex-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ex-name { color: var(--accent); font-weight: 700; font-size: 16px; }
.ss-tag { font-size: 11px; font-weight: 700; color: var(--purple); border: 1px solid var(--purple); border-radius: 6px; padding: 0 5px; margin-right: 6px; vertical-align: 2px; }
.ex-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin: 2px 0 4px; }
.rest-btn { border: 0; background: var(--card2); border-radius: 7px; padding: 3px 8px; font-size: 12.5px; color: var(--accent); font-weight: 600; }
.ex-note { width: 100%; background: transparent; border: 0; color: var(--muted); resize: none; outline: none; font-size: 13.5px; padding: 4px 0; }
.srow { display: grid; grid-template-columns: 34px minmax(0, 1fr) 68px 58px 40px; gap: 6px; align-items: center; padding: 4px 4px; margin: 0 -4px; border-radius: 9px; }
.srow.head { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding-top: 6px; }
.srow.head span:nth-child(n+3) { text-align: center; }
.srow.done { background: var(--green-dim); }
.stype { border: 0; background: var(--card2); border-radius: 7px; height: 32px; font-weight: 700; font-size: 14px; }
.stype.t-w { color: var(--warn); } .stype.t-d { color: var(--purple); } .stype.t-f { color: var(--danger); }
.srow.done .stype { background: transparent; }
.prev { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: none; border: 0; text-align: left; padding: 0; }
.srow input { width: 100%; height: 34px; text-align: center; background: var(--card2); border: 1px solid transparent; border-radius: 8px; font-weight: 600; font-size: 15px; outline: none; }
.srow input:focus { border-color: var(--accent); }
.srow input::placeholder { color: color-mix(in srgb, var(--muted) 70%, var(--card2)); font-weight: 500; }
.srow.done input { background: transparent; }
.chk { height: 32px; border: 0; border-radius: 8px; background: var(--card2); color: var(--muted); font-size: 17px; font-weight: 800; }
.srow.done .chk { background: var(--green); color: #fff; }
.add-set { width: 100%; border: 0; background: var(--card2); border-radius: 9px; padding: 8px; margin: 8px 0 6px; font-weight: 600; font-size: 14px; }
.shake { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* History */
.wcard h3 { margin: 0 0 2px; font-size: 16px; }
.wcard .sum { font-size: 13.5px; color: color-mix(in srgb, var(--text) 82%, var(--muted)); margin-top: 8px; line-height: 1.55; }
.wex { padding: 10px 0; border-bottom: 1px solid var(--line); }
.wex:last-child { border-bottom: 0; }
.wset { display: flex; gap: 12px; font-size: 14px; padding: 2px 0; font-variant-numeric: tabular-nums; }
.wset .n { width: 22px; color: var(--muted); font-weight: 700; }
.wset .n.t-w { color: var(--warn); } .wset .n.t-d { color: var(--purple); } .wset .n.t-f { color: var(--danger); }
.list-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 2px; border-bottom: 1px solid var(--line); gap: 10px; }
.list-row .muted { font-size: 12.5px; }

/* Chart */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.chart .dot { fill: var(--accent); }
.chart text { fill: var(--muted); font-size: 10px; }

/* Sheets & overlays */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; background: var(--card); border-radius: 18px 18px 0 0; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); max-height: 80vh; overflow: auto; }
.sheet-title { text-align: center; color: var(--muted); font-size: 13px; padding: 8px 0 10px; }
.sheet-btn { display: block; width: 100%; border: 0; background: var(--card2); padding: 14px; border-radius: 12px; margin: 6px 0; font-weight: 600; font-size: 15px; }
.sheet-btn.danger { color: var(--danger); }
.sheet-btn.cancel { background: transparent; color: var(--muted); }
.overlay { position: fixed; inset: 0; z-index: 40; background: var(--bg); display: flex; flex-direction: column; }
.overlay-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); border-bottom: 1px solid var(--line); }
.overlay-head input { flex: 1; }
.overlay-body { flex: 1; overflow: auto; padding: 4px 14px 90px; }
.overlay-foot { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%); }
.pick { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 4px; border-bottom: 1px solid var(--line); width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; }
.pick.on { color: var(--accent); }
.pick .tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.pick.on .tick { background: var(--accent); border-color: var(--accent); }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.setting select { background: var(--card2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; }
.setting input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--accent); }

.callout.news { background: color-mix(in srgb, var(--accent) 14%, var(--bg)); border-left-color: var(--accent); color: color-mix(in srgb, var(--accent) 40%, var(--text)); }
.demo-btn { color: var(--muted); }
.demo-btn.has { color: var(--accent); }
.demo-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.demo-frame.tall { aspect-ratio: 9 / 16; max-height: 70vh; margin-left: auto; margin-right: auto; width: auto; }
.demo-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.demo-media { display: block; width: 100%; max-height: 60vh; object-fit: contain; background: #000; border-radius: 12px; margin-bottom: 12px; }
.update-bar { position: fixed; left: 10px; right: 10px; top: max(10px, env(safe-area-inset-top)); z-index: 70; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 10px 16px; background: var(--card2); border: 1px solid var(--accent); border-radius: var(--r); font-weight: 600; font-size: 14px; }

/* Workout flow: clock, current exercise, exercise done check, rest overtime */
.wk-clock { text-align: center; }
.wk-sub { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.wk-time.idle { color: var(--muted); font-size: 15px; }
.ex.current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.now-tag { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--accent); margin: -2px 0 8px; }
.ex.ex-done { border-color: color-mix(in srgb, var(--green) 40%, var(--card)); background: color-mix(in srgb, var(--green) 10%, var(--card)); }
.ex.ex-done:not(.open) { padding-bottom: 10px; }
.ex.ex-done .ex-name { color: var(--text); }
.exchk { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--line); background: transparent; color: var(--muted); font-size: 17px; font-weight: 900; }
.exchk.ready { border-color: var(--green); color: var(--green); animation: pulse 1.4s ease-in-out infinite; }
.exchk.on { background: var(--green); border-color: var(--green); color: #fff; }
.finish-big.ready { background: var(--green); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(47, 191, 113, .55); } 60% { box-shadow: 0 0 0 9px rgba(47, 191, 113, 0); } }
#restbar.over { border-color: var(--warn); }
#restbar.over .rt { color: var(--warn); }
#restbar.over .prog { background: var(--warn); }
.stats.timing { grid-template-columns: repeat(2, 1fr); }
.celebrate .stats.timing { margin: 16px 0 6px; }
.celebrate .stat { background: color-mix(in srgb, var(--card) 78%, transparent); }
.fun { text-align: left; display: grid; gap: 6px; margin: 10px 0 2px; }
.fun-row { display: flex; gap: 10px; align-items: center; background: color-mix(in srgb, var(--card) 78%, transparent); border-radius: 10px; padding: 8px 10px; font-size: 14px; animation: pop .4s cubic-bezier(.2, 1.4, .4, 1) both; }
.fun-row span:first-child { font-size: 20px; width: 26px; text-align: center; }

/* Share card, AI prompts, custom exercises */
.share-preview { max-width: 420px; margin: 0 auto 12px; border-radius: 14px; overflow: hidden; background: var(--card); min-height: 120px; display: grid; place-items: center; }
.share-preview img { width: 100%; display: block; }
.ai-card .steps { margin: 6px 0 12px; padding-left: 20px; color: color-mix(in srgb, var(--text) 82%, var(--muted)); line-height: 1.6; }
.badge.custom { background: color-mix(in srgb, var(--accent) 22%, var(--card)); color: color-mix(in srgb, var(--accent) 55%, var(--text)); margin-left: 0; vertical-align: 0; font-size: 10.5px; }

/* Heart rate */
.hr-pill { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; color: #ff7d93; border: 0; background: rgba(255, 92, 122, .12); border-radius: 99px; padding: 1px 8px; vertical-align: 1px; }
.hr-pill b { font-variant-numeric: tabular-nums; }
.hr-pill.off { color: var(--muted); background: var(--card2); }
.hr-pill.z1 { color: #aab1bc; background: rgba(170,177,188,.14); } .hr-pill.z2 { color: #6fb0ff; background: rgba(61,139,253,.16); }
.hr-pill.z3 { color: #46d389; background: rgba(47,191,113,.16); } .hr-pill.z4 { color: #f2b13d; background: rgba(242,177,61,.16); } .hr-pill.z5 { color: #ff5c5c; background: rgba(255,92,92,.18); }
.rest-hr { display: block; font-size: 12px; color: #ff7d93; font-weight: 600; margin-top: 1px; }
.rest-hr b { color: var(--green); }
.zbar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; margin: 10px 0 6px; background: var(--card2); }
.zbar span.z1, .zlegend i.z1 { background: #6b7280; } .zbar span.z2, .zlegend i.z2 { background: #3d8bfd; } .zbar span.z3, .zlegend i.z3 { background: #2fbf71; }
.zbar span.z4, .zlegend i.z4 { background: #f2b13d; } .zbar span.z5, .zlegend i.z5 { background: #ff5c5c; }
.zlegend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.zlegend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; }
.num-in { width: 84px; background: var(--card2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; text-align: center; outline: none; }
.num-in:focus { border-color: var(--accent); }

/* How a set felt */
.feel-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 8px; padding: 8px 10px; background: color-mix(in srgb, var(--accent) 14%, var(--bg)); border: 1px solid var(--accent-dim); border-radius: 10px; font-size: 13px; animation: pop .3s ease both; }
.feel-ask > span { width: 100%; color: color-mix(in srgb, var(--accent) 40%, var(--text)); font-weight: 600; }
.feel-q { border: 1px solid var(--line); background: var(--card2); border-radius: 99px; padding: 6px 11px; font-size: 13px; font-weight: 700; }
.feel-q.q-easy { color: color-mix(in srgb, var(--green) 70%, var(--text)); } .feel-q.q-good { color: color-mix(in srgb, var(--accent) 55%, var(--text)); } .feel-q.q-hard { color: var(--warn); } .feel-q.q-max { color: var(--danger); }
.feel-q.more { color: var(--muted); }
.feel-x { margin-left: auto; border: 0; background: none; color: var(--muted); font-size: 18px; padding: 0 4px; }
.feel-tag { display: block; width: 100%; text-align: left; border: 0; background: none; color: color-mix(in srgb, var(--accent) 55%, var(--text)); font-size: 12px; font-weight: 600; padding: 0 4px 6px 44px; margin-top: -2px; }
.feel-tag.warn, .wfeel.warn { color: var(--warn); }
.wfeel { font-size: 12px; color: color-mix(in srgb, var(--accent) 55%, var(--text)); padding: 0 0 4px 34px; }
.feel-sheet .feel-label { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 10px 2px 6px; }
.feel-rir { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.feel-rir button { border: 1px solid var(--line); background: var(--card2); border-radius: 12px; padding: 8px 0; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.feel-rir b { font-size: 18px; } .feel-rir span { font-size: 11px; color: var(--muted); }
.feel-rir button.on { background: var(--accent); border-color: var(--accent); color: #fff; } .feel-rir button.on span { color: color-mix(in srgb, var(--accent) 25%, #fff); }
.chip.warn.on { background: color-mix(in srgb, var(--warn) 18%, var(--card)); border-color: var(--warn); color: var(--warn); }
.feel-note { min-height: 64px !important; font-family: inherit !important; font-size: 14px !important; margin: 10px 0 2px; }

/* Muscles worked */
.muscles { font-size: 12px; font-weight: 600; color: var(--warn); margin: 1px 0 2px; }
.list-row .muscles { font-weight: 500; }
.mchips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 8px; }
.mlabel { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); width: 42px; }
.mchip { font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.mchip.p { background: color-mix(in srgb, var(--warn) 16%, var(--card)); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--card)); }
.mchip.s { background: color-mix(in srgb, var(--warn) 8%, var(--card)); color: color-mix(in srgb, var(--warn) 60%, var(--muted)); border: 1px solid color-mix(in srgb, var(--warn) 25%, var(--card)); }

/* Exercise preview tiles */
.dthumb { position: relative; flex: none; width: 64px; height: 64px; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card2); }
.dthumb.sm { width: 52px; height: 52px; border-radius: 10px; }
.dthumb.xs { width: 40px; height: 40px; border-radius: 9px; }
.dthumb.lg { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 14px; }
.dthumb.is-fig { background: var(--figbg, #13161b); }
.dthumb .fig { position: absolute; inset: 3px; }
.dthumb.lg .fig { inset: 8px; }
.dthumb .fig svg { width: 100%; height: 100%; display: block; }
.dthumb.is-fig .play { opacity: .8; }
.demo-fig { width: 100%; max-width: 420px; aspect-ratio: 1; margin: 0 auto 12px; background: var(--figbg, #13161b); border-radius: 14px; overflow: hidden; }
.demo-fig svg { width: 100%; height: 100%; display: block; }
.dthumb img, .dthumb video, .dthumb canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.dthumb .ph { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 17px; color: var(--muted); letter-spacing: .02em; }
.dthumb.lg .ph { font-size: 34px; }
.dthumb.has .ph { color: var(--accent); }
.dthumb .play { position: absolute; right: 4px; bottom: 4px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; font-size: 9px; display: grid; place-items: center; padding-left: 2px; }
.dthumb.lg .play { width: 54px; height: 54px; font-size: 22px; right: calc(50% - 27px); bottom: calc(50% - 27px); padding-left: 4px; }
.dthumb:active { transform: scale(.96); }
.ex-line.with-thumb { display: flex; gap: 12px; align-items: flex-start; }
.ex-body { flex: 1; min-width: 0; }
.ex .ex-head { align-items: flex-start; gap: 10px; }
.ex .ex-head .ex-meta { margin: 3px 0 0; }
.ex-hero { margin: 0 0 12px; }
.list-row .dthumb { margin-right: 2px; }

/* Routine editor */
.badge.edited { background: color-mix(in srgb, var(--purple) 22%, var(--card)); color: var(--purple); }
.erow { display: grid; grid-template-columns: 34px 1fr 1fr 36px; gap: 6px; align-items: center; padding: 3px 0; }
.erow.head { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding-top: 8px; }
.erow input { width: 100%; height: 34px; text-align: center; background: var(--card2); border: 1px solid transparent; border-radius: 8px; font-weight: 600; outline: none; }
.erow input:focus { border-color: var(--accent); }
.erow .del { color: var(--muted); }
.erow .del svg { width: 18px; height: 18px; }

/* Badges & celebration */
.celebrate { text-align: center; background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 22%, var(--card)), var(--card) 70%); border: 1px solid var(--accent); border-radius: 18px; padding: 22px 16px 16px; margin: 4px 0 14px; animation: pop .45s cubic-bezier(.2, 1.4, .4, 1); }
.celebrate .big { font-size: 46px; line-height: 1; }
.celebrate h2 { margin: 8px 0 4px; font-size: 21px; }
.celebrate-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.badges { margin: 12px 0; display: grid; gap: 8px; }
.badge-card { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; animation: pop .4s cubic-bezier(.2, 1.4, .4, 1) both; }
.badge-card .bi { font-size: 26px; width: 36px; text-align: center; }
.badge-card.k-pr { border-color: color-mix(in srgb, var(--warn) 45%, var(--card)); background: color-mix(in srgb, var(--warn) 10%, var(--card)); }
.badge-card.k-milestone { border-color: color-mix(in srgb, var(--purple) 40%, var(--card)); background: color-mix(in srgb, var(--purple) 12%, var(--card)); }
.mini-badges { font-size: 13px; letter-spacing: 1px; margin-left: 4px; }
.srow.pr-flash { animation: prflash 1.2s ease; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes prflash { 0%, 100% { box-shadow: none; } 30% { box-shadow: 0 0 0 2px var(--warn), 0 0 18px rgba(242, 177, 61, .5); } }

/* Photos */
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0; }
.pgrid.small { grid-template-columns: repeat(4, 1fr); }
.pthumb { position: relative; padding: 0; border: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 3 / 4; background: var(--card2); }
.pthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pthumb span { position: absolute; left: 0; right: 0; bottom: 0; font-size: 11px; padding: 3px 5px; background: linear-gradient(transparent, rgba(0,0,0,.7)); text-align: left; }
.pthumb.add { font-size: 26px; color: var(--accent); border: 1px dashed var(--line); background: transparent; }
.camera { background: #000; }
.cam-top, .cam-bottom { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.cam-top { padding-top: max(10px, env(safe-area-inset-top)); }
.cam-bottom { justify-content: space-between; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
.cam-frame { position: relative; flex: 1; min-height: 0; margin: 0 auto; aspect-ratio: 3 / 4; max-width: 100%; overflow: hidden; border-radius: 14px; background: #111; }
.cam-frame video, .cam-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-frame video.mirror { transform: scaleX(-1); }
.cam-frame .ghost { opacity: .32; pointer-events: none; }
.cam-count { position: absolute; inset: 0; display: grid; place-items: center; font-size: 110px; font-weight: 800; text-shadow: 0 4px 20px #000; }
.cam-msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 30px; color: #ccc; }
.shutter { width: 74px; height: 74px; border-radius: 50%; border: 5px solid #fff; background: rgba(255,255,255,.25); }
.shutter:active { background: #fff; }
.camera.flash::after { content: ""; position: absolute; inset: 0; background: #fff; animation: fade .25s forwards; pointer-events: none; }
@keyframes fade { to { opacity: 0; } }
.tl canvas { display: block; width: 100%; max-width: 480px; margin: 8px auto; border-radius: 12px; background: #000; }
.tl input[type=range] { display: block; width: 100%; max-width: 480px; margin: 6px auto; accent-color: var(--accent); }

#toast { position: fixed; left: 50%; top: 16px; transform: translate(-50%, -80px); background: var(--card2); border: 1px solid var(--line); padding: 10px 16px; border-radius: 12px; z-index: 60; transition: transform .25s; max-width: 90vw; font-weight: 600; font-size: 14px; }
#toast.show { transform: translate(-50%, max(0px, env(safe-area-inset-top))); }
.spacer { height: 40px; }
.ok { color: var(--green); font-weight: 700; }
.warn-t { color: var(--warn); font-weight: 700; }
.sources { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0; }
.sources .chip { font-size: 12px; padding: 4px 10px; }
.links-in { min-height: 70px !important; font-size: 13px !important; }

/* Themes picker */
.themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.theme { border: 2px solid transparent; background: none; padding: 4px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.theme.on { border-color: var(--accent); }
.theme .sw { position: relative; width: 100%; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.theme .sw span { position: absolute; left: 14%; right: 14%; top: 22%; bottom: 22%; border-radius: 6px; }
.theme .sw i { position: absolute; right: 10%; bottom: 10%; width: 30%; aspect-ratio: 1; border-radius: 50%; }
.theme .tn { font-size: 12px; font-weight: 600; }
.theme .tn small { color: var(--warn); font-size: 10px; }

/* Sponsored card and Pro */
.sponsor { border-style: dashed; }
.sp-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.sp-label { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sp-img { display: block; width: 100%; max-height: 160px; object-fit: cover; border-radius: 10px; margin-bottom: 8px; }
.pro-link { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-color: color-mix(in srgb, var(--warn) 45%, var(--card)); }
.pro-hero { text-align: center; background: linear-gradient(160deg, color-mix(in srgb, var(--warn) 18%, var(--card)), var(--card) 70%); }
.pro-hero .big { font-size: 44px; }
.pro-hero h2 { margin: 6px 0 4px; }
.pro-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 20px; }
.pro-row:last-child { border-bottom: 0; }
.pro-row span { font-size: 14px; }

/* Profile, body measurements, progress (0.1.20) */
.radio-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.radio-row:last-of-type { border-bottom: 0; }
.radio-row input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.num-in.sm { width: 56px; }
.body-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 12px; margin-top: 10px; }
.body-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.body-grid .in-unit { display: flex; align-items: center; gap: 6px; }
.body-grid .num-in { width: 100%; min-width: 0; }
.body-grid small { width: 22px; }
.stat b small { font-size: 12px; font-weight: 600; color: var(--muted); }
.verdict { border-width: 1px 1px 1px 4px; }
.verdict.up { border-left-color: var(--green); } .verdict.flat { border-left-color: var(--accent); } .verdict.down { border-left-color: var(--warn); }
.verdict-t { display: block; font-size: 24px; margin-top: 2px; }
.verdict.up .verdict-t, .trend.up, small.up { color: var(--green); }
.verdict.flat .verdict-t, .trend.flat { color: var(--accent); }
.verdict.down .verdict-t, .trend.down, small.down { color: var(--warn); }
.trend { font-weight: 700; font-size: 14px; text-align: right; white-space: nowrap; }
.trend small { display: block; font-weight: 600; font-size: 11.5px; opacity: .8; }
.trend-bar { display: flex; gap: 3px; margin-top: 12px; border-radius: 8px; overflow: hidden; font-size: 11px; font-weight: 700; }
.trend-bar span { padding: 5px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.trend-bar .up { background: var(--green); } .trend-bar .flat { background: var(--accent); } .trend-bar .down { background: var(--warn); }
a.list-row { color: inherit; text-decoration: none; }
.legal { white-space: pre-wrap; font-size: 14px; line-height: 1.55; }

/* Adventure mode (game.js) */
.px { image-rendering: pixelated; }
.game-scene { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #1a1c2c; }
.game-scene canvas { display: block; width: 100%; aspect-ratio: 240 / 150; image-rendering: pixelated; }
.game-lvl { display: flex; align-items: baseline; gap: 8px; }
.game-bar { height: 8px; border-radius: 4px; background: var(--card2); overflow: hidden; margin: 8px 0 4px; }
.game-bar i { display: block; height: 100%; background: var(--accent); }
.game-stats { grid-template-columns: repeat(3, 1fr); }
.game-boost { font-size: 13px; color: var(--muted); }
.game-boost.on { color: var(--warn, var(--accent)); font-weight: 600; }
.game-away { border-color: var(--accent); }
.game-finish { display: flex; align-items: center; gap: 12px; text-align: left; margin: 14px 0 4px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--card) 78%, transparent); color: var(--text); text-decoration: none; }
.game-finish img { width: 48px; height: 48px; flex: none; }

/* First run and AI export (aiprompt.js) */
.welcome { padding-top: 8px; }
.welcome-hero { text-align: center; margin: 12px 0 18px; }
.welcome-hero .big { font-size: 44px; }
.welcome-hero h1 { font-size: 24px; line-height: 1.25; margin: 10px 0 8px; }
.welcome-steps { padding-left: 20px; margin: 0 0 8px; }
.welcome-steps li { margin: 0 0 12px; line-height: 1.45; }
.welcome .btn.block { margin-top: 8px; text-align: center; }
.ai-sheet .chips { margin-top: 4px; }
.ai-sheet .btn.block { margin-top: 8px; }
.ai-nudge { border-color: var(--accent); }

/* Animal themes (mascots in pro.js) */
[data-theme="bear"] { --bg: #15100c; --card: #211912; --card2: #2b2118; --line: #3d2f22; --tabs: #18120d; --text: #f5ece3; --muted: #ab9a88; --accent: #d9922e; --figbg: #1d1510; color-scheme: dark; }
[data-theme="monkey"] { --bg: #0c140d; --card: #142116; --card2: #1b2b1d; --line: #28402b; --tabs: #0e170f; --text: #eef5e6; --muted: #93a88f; --accent: #d99a12; --green: #6cc35a; --figbg: #111c12; color-scheme: dark; }
[data-theme="shark"] { --bg: #06101c; --card: #0d1a2b; --card2: #13233a; --line: #1d3350; --tabs: #08131f; --text: #e7f1fb; --muted: #8aa2bd; --accent: #f2794a; --figbg: #0b1726; color-scheme: dark; }
[data-theme="wallabear"] { --bg: #fbf3e8; --card: #ffffff; --card2: #f4e7d6; --line: #e8d5bd; --tabs: #ffffff; --text: #2f2117; --muted: #85705d; --accent: #d9692b; --green: #3f9a5c; --warn: #b98100; --danger: #cf3f3f; --purple: #7d63d6; --figbg: #3a2a1e; --r: 18px; color-scheme: light; }
[data-theme="penguin"] { --bg: #eef5fb; --card: #ffffff; --card2: #e3eef7; --line: #d0e0ee; --tabs: #ffffff; --text: #14253a; --muted: #5f7489; --accent: #2b8fd6; --green: #2e9e6a; --warn: #c48a10; --danger: #d94a4a; --purple: #7d63d6; --figbg: #1d2b3c; --r: 18px; color-scheme: light; }
[data-theme="wallabear"] .btn, [data-theme="wallabear"] .card, [data-theme="wallabear"] .ex,
[data-theme="penguin"] .btn, [data-theme="penguin"] .card, [data-theme="penguin"] .ex { border-radius: 18px; }

.welcome-privacy { border-color: var(--green, var(--accent)); }
.welcome-privacy ul { margin: 8px 0 0; padding-left: 18px; }
.welcome-privacy li { margin: 0 0 6px; line-height: 1.45; }

/* Brand (brand.js): the mark uses the theme accent, so it changes with the theme */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { flex: none; display: block; }
.brand-word { font-weight: 800; font-size: 1.25em; letter-spacing: -.01em; color: var(--text); }
.brand-word b { color: var(--accent); font-weight: 900; }
.welcome-hero .brand { font-size: 22px; margin-bottom: 4px; }
