:root {
  --ink: #172b2a;
  --muted: #647270;
  --paper: #f7f3ea;
  --card: #fffdf8;
  --line: #dcd8cc;
  --green: #277b64;
  --green-deep: #145646;
  --mint: #dceee7;
  --coral: #dd694f;
  --gold: #e5a542;
  --shadow: 0 16px 36px rgba(31, 47, 43, .12);
  --radius: 24px;
  font-family: "Trebuchet MS", Verdana, sans-serif;
  color: var(--ink);
  background: #d9e2dc;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; background: #d9e2dc; }
body { min-height: 100dvh; overflow-x: hidden; }
button, input, select, textarea { font-family: inherit; }
input, select, textarea { font-size: 16px; }
button { color: inherit; }
button, a, input, select, textarea, label { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, .brand-lockup strong { font-family: Palatino, "Palatino Linotype", Georgia, serif; }
h1 { margin-bottom: 10px; font-size: clamp(2rem, 8vw, 3.4rem); line-height: .98; letter-spacing: -.045em; }
h2 { margin-bottom: 6px; font-size: 1.45rem; line-height: 1.08; letter-spacing: -.025em; }

.app-shell {
  position: relative;
  width: min(100%, 960px);
  min-height: 100dvh;
  margin: 0 auto;
  background:
    radial-gradient(circle at 12% 12%, rgba(226, 166, 69, .12), transparent 26rem),
    radial-gradient(circle at 100% 40%, rgba(39, 123, 100, .1), transparent 28rem),
    var(--paper);
  box-shadow: 0 0 44px rgba(16, 34, 31, .17);
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: max(10px, env(safe-area-inset-top)) 14px 10px;
  background: rgba(247, 243, 234, .9);
  border-bottom: 1px solid rgba(38, 70, 64, .1);
  backdrop-filter: blur(18px);
}
.topbar-actions { display: flex; gap: 8px; }
.icon-button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 15px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line), 0 5px 12px rgba(28, 51, 47, .08);
  text-decoration: none;
  cursor: pointer;
  font-weight: 900;
  font-size: 1.1rem;
}
.icon-button:active { transform: translateY(1px); }
.brand-lockup { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-lockup strong { display: block; font-size: 1.12rem; white-space: nowrap; }
.brand-mark { width: 15px; height: 28px; border-radius: 50% 50% 38% 38%; background: var(--green); transform: rotate(35deg); }
.profile-badge { display: inline-flex; margin-left: 7px; padding: 3px 7px; border-radius: 999px; background: #332b45; color: #fff; font-size: .62rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; vertical-align: 2px; }

.screen { display: none; min-height: calc(100dvh - 68px); padding: 18px 16px calc(104px + env(safe-area-inset-bottom)); animation: screen-in .28s ease both; }
.screen.active { display: block; }
@keyframes screen-in { from { opacity: 0; transform: translateY(7px); } }
.card { border: 1px solid rgba(33, 72, 64, .12); border-radius: var(--radius); background: rgba(255, 253, 248, .94); box-shadow: var(--shadow); }
.eyebrow { margin-bottom: 7px; color: var(--green); font-size: .72rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }

.menu-hero { position: relative; min-height: 322px; padding: 28px 24px; overflow: hidden; background: linear-gradient(145deg, #fffdf8 0 62%, #e6efe9 62%); }
.hero-copy { position: relative; z-index: 2; width: min(100%, 410px); }
.hero-copy p:last-child { max-width: 360px; margin: 17px 0 0; color: var(--muted); line-height: 1.55; }
.hero-art { position: absolute; right: -10px; bottom: -13px; width: 210px; height: 190px; }
.hero-art span { position: absolute; display: block; border-radius: 999px; }
.hero-art span:nth-child(1) { right: 3px; bottom: 0; width: 158px; height: 158px; background: var(--green); box-shadow: inset -20px -18px 0 rgba(0,0,0,.1); }
.hero-art span:nth-child(2) { right: 45px; top: 4px; width: 68px; height: 76px; border: 18px solid var(--gold); background: transparent; transform: rotate(-18deg); }
.hero-art span:nth-child(3) { left: 4px; bottom: 26px; width: 63px; height: 63px; background: var(--coral); }

.level-card { display: grid; grid-template-columns: 76px 1fr; align-items: center; gap: 15px; margin-top: 14px; padding: 16px; box-shadow: 0 8px 22px rgba(31, 47, 43, .08); }
.level-orb { display: grid; width: 70px; height: 70px; place-content: center; border-radius: 22px; background: var(--ink); color: #fff; text-align: center; }
.level-orb span { font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; }
.level-orb strong { font-family: Palatino, Georgia, serif; font-size: 1.8rem; line-height: 1; }
.split-label { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: .76rem; }
.split-label span { color: var(--muted); }
.progress-track, .health-track { height: 12px; overflow: hidden; border-radius: 99px; background: #e2e2da; }
.progress-track i, .health-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), #5bb18e); transition: width .42s ease; }
.level-details p { margin: 7px 0 0; color: var(--muted); font-size: .76rem; }
.primary-actions { display: grid; gap: 10px; margin-top: 14px; }
.button { min-height: 48px; padding: 12px 18px; border: 0; border-radius: 16px; background: var(--mint); color: var(--green-deep); cursor: pointer; font-weight: 900; transition: transform .15s ease, filter .15s ease; }
.button:hover { filter: brightness(.98); }
.button:active { transform: translateY(2px); }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.button-large { min-height: 58px; font-size: 1rem; }
.button-large span { float: right; font-size: 1.2rem; }
.button-primary { background: var(--green); color: white; box-shadow: 0 9px 18px rgba(39, 123, 100, .2); }
.button-warm { background: var(--gold); color: #342608; }
.button-quiet { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.menu-tile { min-height: 128px; padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.7); text-align: left; cursor: pointer; }
.menu-tile strong, .menu-tile small { display: block; }
.menu-tile strong { margin-top: 14px; font-family: Palatino, Georgia, serif; font-size: 1.05rem; }
.menu-tile small { margin-top: 4px; color: var(--muted); line-height: 1.35; }
.tile-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; background: var(--ink); color: #fff; font-weight: 900; }

.screen-heading { margin: 6px 0 20px; }
.screen-heading.compact h1 { font-size: 2.45rem; }
.screen-heading > p:last-child { color: var(--muted); line-height: 1.45; }
.text-button { padding: 5px 0; border: 0; background: transparent; color: var(--green-deep); cursor: pointer; font-weight: 900; }
.danger-text { color: #b74f40; }
.length-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.length-card { position: relative; min-height: 126px; padding: 14px 10px; border: 2px solid transparent; border-radius: 20px; background: #fff; box-shadow: 0 7px 16px rgba(25, 50, 45, .07); cursor: pointer; text-align: left; }
.length-card.selected { border-color: var(--length-accent); background: color-mix(in srgb, var(--length-accent) 10%, white); }
.length-card strong, .length-card span, .length-card small { display: block; }
.length-card strong { font-family: Palatino, Georgia, serif; font-size: 1.1rem; }
.length-card span { margin-top: 17px; font-size: 1rem; font-weight: 900; }
.length-card small { margin-top: 3px; color: var(--muted); font-size: .68rem; line-height: 1.3; }
.setup-section { padding: 18px 14px; box-shadow: none; }
.setup-intro { margin: 12px 0 16px; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.section-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.section-title h2 { margin: 0; }
.section-title > strong { padding: 8px 11px; border-radius: 99px; background: var(--ink); color: #fff; font-size: .78rem; }
.preset-row, .filter-row { display: flex; gap: 8px; margin-top: 13px; overflow-x: auto; scrollbar-width: none; }
.preset-row::-webkit-scrollbar, .filter-row::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; font-size: .75rem; font-weight: 900; }
.chip.active { border-color: var(--green); background: var(--green); color: #fff; }
.muscle-filters { margin-top: 8px; }
.balance-note { margin: 14px 0 10px; padding: 11px 12px; border-radius: 14px; background: #eef2ed; color: var(--muted); font-size: .76rem; line-height: 1.4; }
.balance-note.good { background: var(--mint); color: var(--green-deep); }
.muscle-plan-list { display: grid; gap: 13px; }
.muscle-plan-step { padding: 14px; border: 1px solid var(--line); border-radius: 20px; background: #faf8f2; }
.muscle-plan-step.has-muscle { background: #fff; border-color: rgba(39, 123, 100, .28); }
.plan-step-heading { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; }
.plan-step-heading h3 { margin: 0; font-family: Palatino, "Palatino Linotype", Georgia, serif; font-size: 1.05rem; }
.plan-step-heading p { margin: 3px 0 0; color: var(--muted); font-size: .66rem; line-height: 1.3; }
.plan-step-heading > strong { padding: 6px 9px; border-radius: 999px; background: #e8e6dd; color: var(--muted); font-size: .68rem; }
.has-muscle .plan-step-heading > strong { background: var(--mint); color: var(--green-deep); }
.plan-step-number { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 12px; background: var(--ink); color: white; font-weight: 900; }
.muscle-group-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 13px; }
.muscle-group-chip { min-height: 39px; padding: 7px 5px; border: 1px solid var(--line); border-radius: 13px; background: white; cursor: pointer; font-size: .7rem; font-weight: 900; }
.muscle-group-chip.selected { border-color: var(--green); background: var(--green); color: white; }
.muscle-group-chip:disabled { opacity: .32; cursor: not-allowed; }
.plan-prompt, .plan-locked { margin: 12px 0 0; padding: 11px; border-radius: 13px; color: var(--muted); font-size: .7rem; text-align: center; }
.plan-prompt { background: #f0eee7; }
.plan-locked { background: #ebe9e3; }
.ranked-exercises { margin-top: 10px; }
.ranked-exercises .exercise-choice { min-height: 116px; }
.ranked-exercises .exercise-choice > span:not(.selection-number):not(.recommendation-rank) { padding-right: 22px; }
.exercise-choice small { display: block; margin-top: 8px; color: var(--green-deep); font-size: .6rem; line-height: 1.35; }
.recommendation-rank { position: absolute; top: 10px; right: 10px; color: #8b9693 !important; font-size: .66rem !important; font-weight: 900; }
.exercise-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.exercise-choice { position: relative; min-height: 92px; padding: 13px; border: 1px solid var(--line); border-radius: 17px; background: white; cursor: pointer; text-align: left; }
.exercise-choice.selected { border-color: var(--green); background: #edf7f2; box-shadow: inset 0 0 0 1px var(--green); }
.exercise-choice strong, .exercise-choice span { display: block; }
.exercise-choice strong { padding-right: 22px; line-height: 1.18; }
.exercise-choice span { margin-top: 7px; color: var(--muted); font-size: .68rem; }
.selection-number { position: absolute; top: 9px; right: 9px; display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: var(--green); color: #fff !important; font-size: .72rem !important; font-weight: 900; }
.sticky-action { position: sticky; z-index: 8; bottom: 0; margin: 14px -16px -28px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--paper) 20%); }
.sticky-action .button { width: 100%; }

.battle-screen { padding-top: 10px; }
.battle-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.battle-toolbar > div { display: flex; gap: 13px; color: var(--muted); font-size: .72rem; }
.battle-toolbar b { color: var(--ink); font-size: .88rem; }
.enemy-card { position: relative; overflow: hidden; padding: 17px; background: linear-gradient(145deg, var(--enemy-soft, #d9f0e6), #fffdf8 66%); box-shadow: 0 12px 28px rgba(31, 47, 43, .11); }
.enemy-heading { display: flex; justify-content: space-between; gap: 12px; }
.enemy-heading h1 { margin-bottom: 2px; font-size: 1.9rem; }
.enemy-heading p:last-child { margin: 0; color: var(--muted); font-size: .72rem; }
.enemy-heading > strong { white-space: nowrap; font-size: .85rem; }
.enemy-stage { position: relative; display: grid; height: 146px; place-items: center; }
.enemy-aura { position: absolute; width: 174px; height: 96px; border-radius: 50%; background: radial-gradient(ellipse, var(--enemy-soft), transparent 70%); transform: translateY(25px); }
.enemy-figure { position: relative; width: 102px; height: 98px; border-radius: 46% 46% 39% 39%; background: var(--enemy-accent); box-shadow: inset -14px -12px 0 rgba(0,0,0,.1), 0 15px 24px rgba(21, 45, 40, .15); transition: transform .2s ease; }
.enemy-figure::before, .enemy-figure::after { content: ''; position: absolute; top: 29px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: inset 0 -4px 0 rgba(0,0,0,.16); }
.enemy-figure::before { left: 27px; }
.enemy-figure::after { right: 27px; }
.enemy-figure i { position: absolute; display: block; background: var(--enemy-accent); }
.enemy-figure i:nth-child(1), .enemy-figure i:nth-child(2) { top: -15px; width: 28px; height: 38px; border-radius: 70% 30% 60% 30%; }
.enemy-figure i:nth-child(1) { left: 8px; transform: rotate(-25deg); }
.enemy-figure i:nth-child(2) { right: 8px; transform: rotate(25deg) scaleX(-1); }
.enemy-figure i:nth-child(3) { left: 41px; bottom: 24px; width: 21px; height: 8px; border-radius: 0 0 12px 12px; background: rgba(15, 37, 33, .55); }
.enemy-figure.hit { animation: enemy-hit .35s ease; }
@keyframes enemy-hit { 35% { transform: translateX(8px) rotate(3deg) scale(.96); filter: brightness(1.2); } }
.damage-pop { position: absolute; z-index: 2; top: 32px; right: 24%; color: var(--coral); font-family: Palatino, Georgia, serif; font-size: 1.6rem; font-weight: 900; opacity: 0; }
.damage-pop.show { animation: damage-pop .75s ease; }
@keyframes damage-pop { 0% { opacity: 0; transform: translateY(15px) scale(.8); } 25%, 60% { opacity: 1; transform: translateY(0) scale(1); } 100% { opacity: 0; transform: translateY(-16px); } }
.health-track { height: 14px; background: rgba(255,255,255,.75); box-shadow: inset 0 0 0 1px rgba(17, 54, 46, .1); }
.health-track i { width: 100%; background: var(--enemy-accent); }
.pace-note { margin: 9px 0 0; color: var(--muted); font-size: .71rem; text-align: center; }
.battle-exercises { margin-top: 15px; }
.battle-exercise-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 9px; }
.battle-exercise { min-height: 92px; padding: 11px 8px; border: 0; border-radius: 17px; background: #fff; box-shadow: inset 0 0 0 1px var(--line), 0 5px 13px rgba(26, 54, 48, .06); cursor: pointer; }
.battle-exercise b, .battle-exercise span { display: block; }
.battle-exercise b { line-height: 1.1; }
.battle-exercise span { margin-top: 8px; color: var(--green); font-size: .66rem; font-weight: 900; }
.battle-exercise small { display: block; margin-top: 3px; color: var(--muted); font-size: .6rem; }
.last-set { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 13px; margin-top: 10px; padding: 11px 13px; border-radius: 16px; background: #ebe8df; }
.last-set span, .last-set strong { display: block; }
.last-set span { color: var(--muted); font-size: .62rem; text-transform: uppercase; }
.last-set strong { margin-top: 2px; font-size: .75rem; }

.summary-hero { padding: 32px 22px; text-align: center; background: linear-gradient(150deg, var(--mint), #fff); }
.victory-mark { display: grid; width: 68px; height: 68px; margin: 0 auto 17px; place-items: center; border-radius: 22px; background: var(--green); color: white; font-size: 2rem; }
.summary-hero h1 { font-size: 2.55rem; }
.summary-hero > p:last-child { margin-bottom: 0; color: var(--muted); }
.summary-stats, .history-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 12px 0; }
.stat-card { padding: 15px 9px; border-radius: 18px; background: #fff; border: 1px solid var(--line); text-align: center; }
.stat-card strong, .stat-card span { display: block; }
.stat-card strong { font-family: Palatino, Georgia, serif; font-size: 1.5rem; }
.stat-card span { margin-top: 2px; color: var(--muted); font-size: .65rem; }
.summary-achievements { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px; margin-bottom: 12px; padding: 18px; }
.summary-achievements h2 { margin-bottom: 4px; }
.summary-achievements p { margin-bottom: 0; color: var(--muted); line-height: 1.4; }
.trained-muscles { display: flex; max-width: 210px; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.trained-muscles span { padding: 6px 9px; border-radius: 999px; background: var(--mint); color: var(--green-deep); font-size: .63rem; font-weight: 900; }
.recap-card, .chart-card, .history-level, #historyScreen > .card { margin-top: 12px; padding: 18px; box-shadow: 0 8px 20px rgba(31, 47, 43, .07); }
.recap-row, .session-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.recap-row:last-child, .session-row:last-child { border-bottom: 0; }
.recap-row span, .session-row span { color: var(--muted); font-size: .72rem; }

.library-list { display: grid; gap: 9px; margin-top: 14px; }
.library-item { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.library-item strong, .library-item span { display: block; }
.library-item span { margin-top: 5px; color: var(--muted); font-size: .72rem; }
.muscle-pill { align-self: start; padding: 6px 9px; border-radius: 99px; background: var(--mint); color: var(--green-deep) !important; font-size: .65rem !important; font-weight: 900; }
.history-level { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 14px; }
.week-chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; height: 145px; margin-top: 15px; }
.week-day { display: grid; grid-template-rows: 1fr auto; gap: 7px; min-width: 0; text-align: center; }
.week-bar-wrap { display: flex; align-items: flex-end; justify-content: center; border-radius: 10px; background: #f0eee7; overflow: hidden; }
.week-bar { width: 100%; min-height: 4px; border-radius: 9px 9px 0 0; background: var(--green); }
.week-day span { color: var(--muted); font-size: .66rem; }
.muscle-bars { display: grid; gap: 12px; margin-top: 15px; }
.muscle-row { display: grid; grid-template-columns: 72px 1fr 24px; align-items: center; gap: 8px; font-size: .72rem; }
.muscle-row i { display: block; min-width: 4px; height: 9px; border-radius: 99px; background: linear-gradient(90deg, var(--green), #70b496); }
.empty-state { padding: 24px 10px; color: var(--muted); text-align: center; line-height: 1.5; }

.app-dialog { width: min(calc(100% - 28px), 470px); max-height: calc(100dvh - 34px); padding: 0; overflow: auto; border: 0; border-radius: 25px; background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgba(11, 29, 25, .35); }
.app-dialog::backdrop { background: rgba(13, 30, 27, .62); backdrop-filter: blur(5px); }
.app-dialog form { position: relative; margin: 0; padding: 25px; }
.dialog-close { position: absolute; top: 14px; right: 14px; display: grid; width: 38px; height: 38px; place-items: center; border: 0; border-radius: 13px; background: #ece9e0; cursor: pointer; font-size: 1.5rem; }
.app-dialog h2 { padding-right: 42px; font-size: 1.8rem; }
.field-label { display: grid; gap: 7px; margin-top: 16px; color: var(--ink); font-size: .78rem; font-weight: 900; }
.field-label small { color: var(--muted); font-weight: 400; }
.text-input, .save-transfer { width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: white; color: var(--ink); outline: 0; }
.text-input:focus, .save-transfer:focus, .number-wheel:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(39,123,100,.12); }
.number-wheel-wrap { display: grid; grid-template-columns: 48px 1fr 48px; gap: 9px; margin-top: 8px; }
.number-wheel-wrap button { border: 0; border-radius: 14px; background: var(--mint); color: var(--green-deep); font-size: 1.5rem; font-weight: 900; }
.number-wheel { min-height: 72px; border: 1px solid var(--line); border-radius: 16px; background: white; color: var(--ink); text-align: center; font-family: Palatino, Georgia, serif; font-size: 2rem; font-weight: 900; }
.set-helper { margin: 14px 0; color: var(--muted); font-size: .72rem; line-height: 1.45; }
.set-dialog .button { width: 100%; }
.help-steps { display: grid; gap: 13px; padding-left: 22px; line-height: 1.45; }
.help-steps li { padding-left: 4px; }
.safety-note { padding: 13px; border-radius: 14px; background: #f4ead4; color: #57431c; line-height: 1.45; }
.setting-row, .profile-switch { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.setting-row span, .profile-switch span { display: grid; gap: 3px; }
.setting-row small, .profile-switch small { color: var(--muted); }
.setting-row select { max-width: 138px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.setting-row input[type="checkbox"] { width: 24px; height: 24px; accent-color: var(--green); }
.settings-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin: 17px 0 8px; }
.save-transfer { min-height: 80px; resize: vertical; font-family: monospace; font-size: .67rem; }
.cloud-status { margin: 0 0 8px; padding: 10px 12px; border-radius: 13px; background: var(--mint); color: var(--green-deep); font-size: .72rem; font-weight: 900; }
.settingsDialog .button, #settingsForm > .button { width: 100%; margin-top: 14px; }
.pause-dialog { text-align: center; }
.pause-dialog .button { width: 100%; margin-top: 10px; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); width: max-content; max-width: calc(100% - 32px); padding: 12px 17px; border-radius: 14px; background: var(--ink); color: white; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translate(-50%, 18px); transition: .25s ease; font-size: .78rem; font-weight: 900; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Workout RPG planning and prescription screens */
.dashboard-hero { position: relative; min-height: 245px; padding: 26px 23px; overflow: hidden; background: linear-gradient(145deg, #fffdf8 0 68%, #dfeee8 68%); }
.dashboard-hero > div:first-child { position: relative; z-index: 2; max-width: 410px; }
.dashboard-hero h1 { font-size: clamp(2.25rem, 9vw, 3.25rem); }
.dashboard-hero p:last-child { max-width: 390px; margin-bottom: 0; color: var(--muted); line-height: 1.5; }
.hero-emblem { position: absolute; right: -16px; bottom: -34px; width: 176px; height: 176px; border-radius: 50%; background: var(--green); box-shadow: inset -19px -16px 0 rgba(0,0,0,.1); }
.hero-emblem::before, .hero-emblem::after { content: ''; position: absolute; top: 46px; width: 18px; height: 18px; border-radius: 50%; background: #fff; }
.hero-emblem::before { left: 50px; }
.hero-emblem::after { right: 50px; }
.hero-emblem i { position: absolute; left: 68px; top: 84px; width: 42px; height: 15px; border-radius: 0 0 24px 24px; background: rgba(12,60,48,.65); }
.today-card, .week-strip { margin-top: 13px; padding: 18px; box-shadow: 0 8px 22px rgba(31,47,43,.08); }
.today-heading { display: flex; justify-content: space-between; gap: 12px; }
.today-heading h2 { font-size: 1.7rem; }
.today-heading p:last-child { margin-bottom: 0; color: var(--muted); font-size: .76rem; line-height: 1.4; }
.today-badge { align-self: flex-start; padding: 7px 10px; border-radius: 999px; background: var(--mint); color: var(--green-deep); font-size: .68rem; font-weight: 900; white-space: nowrap; }
.today-muscles { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.today-muscles span, .detail-tags span { padding: 6px 9px; border-radius: 999px; background: #ece9df; color: var(--muted); font-size: .66rem; font-weight: 900; }
.today-card .button { width: 100%; margin-top: 8px; }
.dashboard-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-top: 13px; }
.week-slot { display: grid; min-height: 66px; padding: 7px 3px; place-items: center; border-radius: 13px; background: #efede5; color: var(--muted); text-align: center; }
.week-slot b { font-size: .66rem; }
.week-slot span { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; font-size: .67rem; }
.week-slot.planned span { background: var(--green); color: #fff; }
.week-slot.complete span { background: var(--gold); color: #2f250c; }
.week-slot.skipped span { background: #d9d7d1; color: var(--muted); }
.week-slot.overdue span { background: var(--coral); color: #fff; }
.week-slot.today { box-shadow: inset 0 0 0 2px var(--ink); }
.dashboard-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 10px; }

.overview-heading { padding: 16px 4px 2px; }
.overview-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 12px; }
.overview-card { min-height: 205px; padding: 20px; box-shadow: 0 10px 24px rgba(31,47,43,.08); }
.workout-overview { background: linear-gradient(145deg, #fff, #e5f1eb); }
.overview-card-heading { display: flex; align-items: center; gap: 12px; }
.overview-card-heading h2 { margin: 0; }
.overview-card > p { color: var(--muted); line-height: 1.45; }
.overview-card .button { margin-top: 12px; }
.overview-icon { display: grid; width: 43px; height: 43px; flex: 0 0 auto; place-items: center; border-radius: 14px; background: var(--ink); color: white; font-weight: 900; }
.cardio-overview .overview-icon { background: #347a9b; }
.sleep-overview .overview-icon { background: #6a68a5; }
.protein-overview .overview-icon { background: #b26748; }
.water-overview .overview-icon { background: #317a90; font-size: .62rem; }
.water-progress i { background: #3b93ac; }
.mini-progress { height: 10px; margin: 14px 0 8px; overflow: hidden; border-radius: 99px; background: #e9e7de; }
.mini-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--coral); }
.profile-entry { display: flex; width: 100%; align-items: center; justify-content: space-between; margin-top: 12px; padding: 17px 20px; border: 1px solid var(--line); text-align: left; cursor: pointer; }
.profile-entry strong, .profile-entry small { display: block; }
.profile-entry small { margin-top: 3px; color: var(--muted); }
.profile-entry b { font-size: 1.8rem; }

.section-nav { position: fixed; z-index: 40; left: 50%; bottom: 0; display: grid; width: min(100%, 960px); grid-template-columns: repeat(6, 1fr); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); transform: translateX(-50%); border-top: 1px solid rgba(38,70,64,.14); background: rgba(255,253,248,.94); box-shadow: 0 -10px 30px rgba(23,43,42,.1); backdrop-filter: blur(16px); }
.section-nav button { display: grid; min-height: 54px; place-items: center; gap: 1px; border: 0; border-radius: 14px; background: transparent; color: var(--muted); cursor: pointer; }
.section-nav button b { display: grid; min-width: 23px; height: 23px; place-items: center; border-radius: 8px; font-size: .68rem; }
.section-nav button span { font-size: .58rem; font-weight: 900; }
.section-nav button.active { background: var(--mint); color: var(--green-deep); }
.section-nav button.active b { background: var(--green); color: #fff; }
body.battle-active .section-nav, body.dialog-workout .section-nav { display: none; }

.wellness-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.wellness-hero { padding: 21px; background: linear-gradient(145deg, #fff, #edf3ef); }
.wellness-hero h2 { margin-bottom: 6px; font-size: 2rem; }
.wellness-hero p { margin-bottom: 0; color: var(--muted); line-height: 1.5; }
.wellness-history, .trend-card { margin-top: 13px; padding: 18px; }
.trend-note { margin: -2px 0 13px; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.record-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.record-row:last-child { border-bottom: 0; }
.record-row strong, .record-row span { display: block; }
.record-row span { margin-top: 3px; color: var(--muted); font-size: .7rem; line-height: 1.4; }
.record-actions { display: flex; gap: 5px; }
.protein-actions { flex-wrap: wrap; justify-content: flex-end; max-width: 240px; }
.record-actions button { min-height: 36px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font-size: .65rem; font-weight: 900; }
.record-actions .delete { color: #a44234; }
.daily-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; min-height: 155px; margin-top: 14px; }
.daily-bar { display: grid; grid-template-rows: 1fr auto auto; gap: 5px; min-width: 0; text-align: center; }
.daily-bar-track { position: relative; display: flex; align-items: flex-end; border-radius: 10px; background: #efede5; overflow: hidden; }
.daily-bar-track i { width: 100%; min-height: 0; border-radius: 8px 8px 0 0; background: var(--green); }
.daily-bar-track.missing i { height: 0 !important; }
.daily-bar-track.missing::after { content: '?'; position: absolute; inset: 0; display: grid; place-items: center; color: #a8aaa4; font-weight: 900; }
.daily-bar b { font-size: .62rem; }
.daily-bar span { color: var(--muted); font-size: .56rem; }
.protein-quick { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; padding: 16px; }
.protein-quick .field-label { margin: 0; }
.profile-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 20px; }
.profile-form .field-label { margin-top: 0; }
.profile-form .button { grid-column: 1 / -1; }
.profile-height-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.recovery-context { margin-bottom: 12px; padding: 14px 16px; }
.recovery-context p { margin: 4px 0 0; color: var(--muted); line-height: 1.45; }
.recovery-context .button { margin-top: 10px; }

.onboarding-form { display: grid; gap: 13px; }
.form-card { position: relative; display: grid; gap: 13px; padding: 20px; box-shadow: 0 8px 18px rgba(31,47,43,.06); }
.form-card > div:first-of-type { padding-left: 42px; }
.form-card h2 { margin: 0; }
.form-card p { margin: 4px 0 0; color: var(--muted); font-size: .75rem; line-height: 1.45; }
.form-step { position: absolute; left: 18px; top: 18px; display: grid; width: 31px; height: 31px; place-items: center; border-radius: 11px; background: var(--ink); color: #fff; font-weight: 900; }
.choice-grid { display: grid; gap: 8px; }
.choice-grid.three { grid-template-columns: repeat(3, 1fr); }
.choice-grid.six { grid-template-columns: repeat(6, 1fr); }
.choice-grid.duration { grid-template-columns: repeat(5, 1fr); }
.choice-grid label { min-width: 0; cursor: pointer; }
.choice-grid input { position: absolute; opacity: 0; pointer-events: none; }
.choice-grid label > span { display: grid; min-height: 70px; padding: 10px 5px; place-content: center; border: 1px solid var(--line); border-radius: 15px; background: #fff; text-align: center; font-size: .72rem; font-weight: 900; }
.choice-grid label > span small { display: block; margin-top: 3px; color: var(--muted); font-size: .57rem; font-weight: 400; }
.choice-grid input:checked + span { border-color: var(--green); background: var(--green); color: white; box-shadow: inset 0 0 0 1px var(--green); }
.choice-grid input:checked + span small { color: rgba(255,255,255,.8); }
.weekday-picker { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 13px; }
.weekday-picker label { cursor: pointer; }
.weekday-picker input { position: absolute; opacity: 0; pointer-events: none; }
.weekday-picker span { display: grid; min-height: 46px; place-items: center; border: 1px solid var(--line); border-radius: 13px; background: white; font-size: .68rem; font-weight: 900; }
.weekday-picker input:checked + span { border-color: var(--green); background: var(--green); color: white; }
.focus-preferences { display: grid; gap: 9px; }
.focus-row { display: grid; grid-template-columns: minmax(82px, 1fr) repeat(3, minmax(62px, .78fr)); gap: 6px; align-items: center; }
.focus-row > strong { font-family: Palatino, Georgia, serif; font-size: .86rem; }
.focus-row label { cursor: pointer; }
.focus-row input { position: absolute; opacity: 0; pointer-events: none; }
.focus-row span { display: grid; min-height: 40px; place-items: center; padding: 6px 4px; border: 1px solid var(--line); border-radius: 11px; background: white; font-size: .61rem; font-weight: 900; }
.focus-row input:checked + span { border-color: var(--green); background: var(--green); color: white; }
.weekday-help { margin: 8px 0 0; color: var(--muted); font-size: .7rem; line-height: 1.4; }
.equipment-list { display: grid; gap: 8px; }
.equipment-option { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: #fff; cursor: pointer; }
.equipment-option input { width: 20px; height: 20px; accent-color: var(--green); }
.equipment-option strong, .equipment-option small { display: block; }
.equipment-option small { margin-top: 3px; color: var(--muted); }
.compact-setting { margin-top: 12px; }
.onboarding-form > .button { width: 100%; }

.schedule-list { display: grid; gap: 10px; }
.schedule-card { display: grid; grid-template-columns: 62px 1fr auto; gap: 12px; align-items: center; padding: 15px; border: 1px solid var(--line); border-radius: 19px; background: #fff; }
.schedule-card.overdue { border-color: #e8aa9b; background: #fff9f7; }
.schedule-card.skipped { opacity: .72; }
.schedule-date { display: grid; min-height: 58px; place-content: center; border-radius: 15px; background: var(--ink); color: #fff; text-align: center; }
.schedule-date b { font-family: Palatino, Georgia, serif; font-size: 1.4rem; }
.schedule-date span { font-size: .6rem; text-transform: uppercase; }
.schedule-card h3 { margin: 0; font-family: Palatino, Georgia, serif; }
.schedule-card p { margin: 4px 0 0; color: var(--muted); font-size: .67rem; }
.schedule-actions { display: grid; gap: 5px; }
.schedule-actions button { padding: 7px; border: 0; border-radius: 10px; background: var(--mint); color: var(--green-deep); font-size: .63rem; font-weight: 900; cursor: pointer; }
#regenerateScheduleButton { width: 100%; margin-top: 12px; }

.preview-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 15px; box-shadow: none; }
.preview-stat { text-align: center; }
.preview-stat strong, .preview-stat span { display: block; }
.preview-stat strong { font-family: Palatino, Georgia, serif; font-size: 1.35rem; }
.preview-stat span { color: var(--muted); font-size: .62rem; }
.duration-adjust { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 13px 0; }
.duration-adjust > span { font-size: .75rem; font-weight: 900; }
.duration-adjust > div { display: flex; gap: 5px; overflow-x: auto; }
.duration-adjust button { padding: 8px 10px; border: 1px solid var(--line); border-radius: 11px; background: #fff; font-size: .67rem; font-weight: 900; }
.duration-adjust button.active { border-color: var(--green); background: var(--green); color: #fff; }
.prescription-list { display: grid; gap: 9px; }
.prescription-card { padding: 15px; border: 1px solid var(--line); border-radius: 19px; background: #fff; }
.prescription-heading { display: flex; justify-content: space-between; gap: 10px; }
.prescription-heading h3 { margin: 0; font-family: Palatino, Georgia, serif; font-size: 1.1rem; }
.prescription-heading > strong { color: var(--green); white-space: nowrap; }
.prescription-card > p { margin: 6px 0; color: var(--muted); font-size: .7rem; }
.prescription-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.prescription-meta span { padding: 6px 8px; border-radius: 9px; background: #efede5; font-size: .62rem; font-weight: 900; }
.progression-note { margin-top: 10px !important; padding: 9px; border-radius: 11px; background: var(--mint); color: var(--green-deep) !important; }
.prescription-actions { display: flex; gap: 12px; margin-top: 9px; }

.battle-exercise-list { display: grid; gap: 8px; margin-top: 9px; }
.battle-exercise-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; min-height: 92px; padding: 13px; border: 1px solid var(--line); border-radius: 18px; background: #fff; cursor: pointer; text-align: left; }
.battle-exercise-row.complete { border-color: rgba(39,123,100,.35); background: #edf7f2; }
.battle-exercise-row.skipped { opacity: .55; }
.battle-exercise-row h3 { margin: 0; font-family: Palatino, Georgia, serif; font-size: 1.03rem; }
.battle-exercise-row p { margin: 5px 0 0; color: var(--muted); font-size: .68rem; }
.battle-targets { display: block; margin: 5px 0; color: #536663; font-size: .61rem; line-height: 1.35; }
.battle-exercise-row small { display: block; margin-top: 6px; color: var(--green-deep); font-size: .62rem; font-weight: 900; }
.set-count-ring { display: grid; width: 53px; height: 53px; place-content: center; border-radius: 17px; background: var(--ink); color: #fff; text-align: center; }
.set-count-ring b { font-size: 1rem; }
.set-count-ring span { font-size: .52rem; text-transform: uppercase; }
.resting .set-count-ring { background: var(--gold); color: #3b2b08; }
.battle-toolbar > div { flex-wrap: wrap; justify-content: flex-end; }

.set-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.set-amount-field { grid-column: 1 / -1; }
.set-stepper { display: grid; grid-template-columns: 48px 48px minmax(68px, 1fr) 48px 48px; gap: 6px; align-items: stretch; }
.set-stepper button { min-height: 52px; border: 0; border-radius: 14px; background: var(--mint); color: var(--green-deep); font: 900 .95rem/1 inherit; cursor: pointer; }
.set-stepper button:active { transform: translateY(1px); background: #c9eadf; }
.set-stepper input { width: 100%; min-width: 0; border: 2px solid var(--green); border-radius: 14px; background: #fff; color: var(--ink); text-align: center; font: 900 1.5rem/1 inherit; outline: 0; -moz-appearance: textfield; }
.set-stepper input::-webkit-inner-spin-button, .set-stepper input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.compact-stepper { grid-template-columns: 58px minmax(80px, 1fr) 58px; }
.resistance-input { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.resistance-input #unitLabel { min-width: 28px; color: var(--muted); font-weight: 900; }
.warmup-toggle { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: center; margin-top: 15px; padding: 12px; border-radius: 14px; background: #f0eee7; }
.warmup-toggle input { width: 21px; height: 21px; accent-color: var(--green); }
.warmup-toggle b, .warmup-toggle small { display: block; }
.warmup-toggle small { margin-top: 3px; color: var(--muted); }
.cue-box { padding: 13px; border-radius: 15px; background: var(--mint); }
.cue-box ul { margin-bottom: 0; padding-left: 20px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.substitute-list { display: grid; gap: 8px; }
.substitute-option { padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: white; text-align: left; cursor: pointer; }
.substitute-option strong, .substitute-option span { display: block; }
.substitute-option span { margin-top: 3px; color: var(--muted); font-size: .68rem; }
.feedback-card { margin-top: 12px; padding: 18px; }
.feedback-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 13px 0; }
.feedback-grid label { display: grid; gap: 5px; font-size: .7rem; font-weight: 900; }
.feedback-grid select { min-height: 43px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.pain-check { grid-column: 1 / -1; display: flex !important; align-items: center; padding: 10px; border-radius: 11px; background: #f7e2dc; }
.pain-check input { width: 20px; height: 20px; }

.volume-legend { display: flex; gap: 13px; margin-top: 12px; color: var(--muted); font-size: .66rem; }
.volume-legend span { display: flex; gap: 5px; align-items: center; }
.volume-legend i { width: 9px; height: 9px; border-radius: 50%; }
.direct-dot { background: var(--green); }
.secondary-dot { background: var(--gold); }
.volume-row { display: grid; grid-template-columns: 84px 1fr 34px; gap: 8px; align-items: center; font-size: .68rem; }
.volume-stack { display: flex; height: 10px; overflow: hidden; border-radius: 99px; background: #eceae2; }
.volume-stack .direct { background: var(--green); }
.volume-stack .secondary { background: var(--gold); }
.adherence-track { height: 17px; overflow: hidden; border-radius: 99px; background: #eceae2; }
.adherence-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), #65b294); }
.adherence-copy { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: .72rem; }
.exercise-trends { display: grid; gap: 8px; }
.trend-row { display: grid; grid-template-columns: minmax(0, 1fr) 92px 34px; align-items: center; gap: 10px; min-height: 54px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.trend-row:last-child { border-bottom: 0; }
.trend-row strong, .trend-row span { display: block; }
.trend-row span { margin-top: 3px; color: var(--muted); font-size: .64rem; }
.trend-row > b { text-align: right; color: var(--green-deep); }
.trend-bars { display: flex; height: 35px; align-items: flex-end; justify-content: flex-end; gap: 4px; }
.trend-bars i { width: 12px; min-height: 4px; border-radius: 5px 5px 2px 2px; background: linear-gradient(var(--green), #79baa3); }
.full-button { width: 100%; margin-top: 12px; }

.manual-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.manual-choice { position: relative; min-height: 105px; padding: 13px; border: 1px solid var(--line); border-radius: 17px; background: white; text-align: left; cursor: pointer; }
.manual-choice.selected { border-color: var(--green); background: var(--mint); box-shadow: inset 0 0 0 1px var(--green); }
.manual-choice strong, .manual-choice span { display: block; }
.manual-choice span { margin-top: 6px; color: var(--muted); font-size: .65rem; }
.manual-choice b { position: absolute; top: 9px; right: 9px; color: var(--green); }

@media (max-width: 430px) {
  .overview-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .workout-overview { grid-column: 1 / -1; grid-row: auto; }
  .protein-overview { grid-column: 1 / -1; }
  .water-overview { grid-column: 1 / -1; }
  .overview-card { min-height: 170px; padding: 16px; }
  .overview-card:not(.workout-overview) .overview-card-heading { align-items: flex-start; }
  .overview-card:not(.workout-overview) .overview-icon { width: 34px; height: 34px; border-radius: 11px; }
  .overview-card:not(.workout-overview) h2 { font-size: 1.1rem; }
  .overview-card:not(.workout-overview) p { font-size: .7rem; }
  .overview-card:not(.workout-overview) .button { width: 100%; padding-left: 7px; padding-right: 7px; font-size: .72rem; }
  .wellness-stats { grid-template-columns: 1fr 1fr; }
  .profile-form { grid-template-columns: 1fr; }
  .profile-form .button { grid-column: auto; }
  .dashboard-hero { min-height: 278px; }
  .dashboard-hero > div:first-child { width: 82%; }
  .dashboard-hero h1 { font-size: 2.25rem; }
  .choice-grid.three { grid-template-columns: 1fr; }
  .choice-grid.three label > span { min-height: 58px; }
  .choice-grid.six { grid-template-columns: repeat(3, 1fr); }
  .choice-grid.duration { grid-template-columns: repeat(3, 1fr); }
  .schedule-card { grid-template-columns: 55px 1fr; }
  .schedule-actions { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .set-fields { grid-template-columns: 1fr; }
  .feedback-grid { grid-template-columns: 1fr; }
  .pain-check { grid-column: auto; }
  .summary-achievements { grid-template-columns: 1fr; }
  .trained-muscles { max-width: none; justify-content: flex-start; }
}

@media (max-width: 390px) {
  .screen { padding-left: 12px; padding-right: 12px; }
  .topbar { padding-left: 10px; padding-right: 10px; }
  .brand-lockup strong { font-size: 1rem; }
  .hero-copy { width: 82%; }
  .menu-hero { min-height: 334px; padding: 23px 19px; }
  .hero-copy h1 { font-size: 2.25rem; }
  .hero-art { right: -38px; transform: scale(.85); transform-origin: right bottom; }
  .level-card { grid-template-columns: 64px 1fr; }
  .level-orb { width: 60px; height: 60px; }
  .battle-exercise-grid { gap: 6px; }
  .battle-exercise { min-height: 88px; padding: 10px 5px; font-size: .72rem; }
  .enemy-stage { height: 132px; }
  .summary-stats, .history-stats { gap: 6px; }
  .stat-card { padding-left: 5px; padding-right: 5px; }
}

@media (min-width: 961px) {
  body { padding: 24px 0; }
  .app-shell { min-height: calc(100dvh - 48px); border-radius: 30px; overflow: clip; }
  .screen { min-height: calc(100dvh - 116px); padding-left: 24px; padding-right: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
