/* FIT QUEST / Performance arcade. Shared visual tokens for every app surface. */
:root {
  --ink: #181c21;
  --paper: #f1f3f5;
  --surface: #ffffff;
  --surface-muted: #e7ebef;
  --night: #161b20;
  --night-raised: #252d35;
  --lime: #d4fa46;
  --green: #34472a;
  --muted: #596570;
  --line: #d9dfe4;
  --blue: #4761d1;
  --display: 'Bahnschrift', 'Arial Black', 'Malgun Gothic', sans-serif;
  --body: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Malgun Gothic', sans-serif;
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
body { background: var(--paper); }
button, input, select, textarea { font-family: var(--body); }
button { transition: background-color 140ms ease, border-color 140ms ease, transform 100ms ease; }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .4; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #657f16; outline-offset: 3px;
}
h1, h2, h3 { color: var(--ink); word-break: keep-all; }
h1 { font-size: 34px; font-weight: 800; line-height: 1.25; letter-spacing: -1.5px; }
h2 { font-size: 21px; font-weight: 750; letter-spacing: -.6px; }
h3 { font-size: 16px; font-weight: 750; }
p { line-height: 1.65; }
small, .muted { color: var(--muted); }
.eyebrow { font: 700 10px/1.5 var(--display); letter-spacing: 2px; color: #526448; }
.shell { max-width: 1600px; grid-template-columns: 210px minmax(0, 1fr); }
.sidebar { background: var(--night); color: #f2f5e9; border: 0; padding: 34px 20px; overflow-y: auto; }
.brand { color: #f4f5eb; font: 800 23px/1 var(--display); letter-spacing: -.6px; gap: 10px; }
.brandmark { border: 0; box-shadow: none; border-radius: 2px; background: var(--lime); color: var(--night); padding: 8px; font-size: 22px; }
.brand small { color: #b3bda9; font: 500 9px/1.6 var(--body); letter-spacing: 3px; margin-top: 7px; }
.nav { margin-top: 52px; gap: 8px; }
.nav button { color: #b4bfad; font-size: 13px; font-weight: 600; padding: 16px 14px; border-radius: 6px; }
.nav button:hover { background: #222c24; color: #fff; }
.nav button.active { background: var(--lime); color: #182010; }
.nav svg { width: 20px; height: 20px; stroke-width: 1.8; }
.sidebar-bottom { border-top: 1px solid #36414c; padding: 20px 0 0; color: #a6b1bc; font-size: 11px; }
.sidebar-bottom .textbtn { color: #bac6b1; padding-left: 0; font-size: 11px; }
.main { padding: 30px 42px 40px; background: var(--paper); }
.topbar { margin-bottom: 32px; align-items: center; color: #596b7b; min-height: 32px; }
.breadcrumb { font-size: 11px; }
.profile-account { background: #e5eaee; color: #3c4d31; border: 1px solid #d2dce4; border-radius: 4px; font-size: 11px; }
.profile #sync-status { color: #647259; font-size: 10px; }
.intro { margin-bottom: 24px; }
.intro p { color: var(--muted); font-size: 13px; margin-top: 8px; }
.badge { border-radius: 3px; background: #e6ecf1; border: 1px solid #d1dce5; color: #4b6039; padding: 6px 9px; font-size: 10px; font-weight: 600; }
.primary { background: var(--lime); color: #1b230f; border: 1px solid #b6d83c; box-shadow: none; border-radius: 6px; min-height: 46px; font-size: 13px; font-weight: 800; }
.primary:hover { background: #c6ed32; }
.secondary { background: var(--surface); color: var(--ink); border: 1px solid #cbd4c2; border-radius: 6px; min-height: 42px; font-size: 12px; }
.secondary:hover { border-color: #7d906c; background: #f5f7f0; }
.start-btn { background: var(--night); color: #e4fac6; border-radius: 5px; padding: 10px 13px; font-size: 12px; }
.textbtn { color: #42576b; font-weight: 600; }
.danger { color: #a33321; }
.card { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 24px; box-shadow: none; }
.section-head { margin-bottom: 18px; }
.bottom-note { color: #596b7b; font-size: 10px; padding-top: 28px; letter-spacing: .5px; }
.tip { background: #e5ebf0; border: 1px solid #d7e0e7; border-radius: 6px; color: #526244; font-size: 12px; }
.master-banner { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; color: #586b7b; padding: 0 0 10px; margin-bottom: 18px; font: 600 10px/1.5 var(--display); letter-spacing: .7px; }
.master-banner span { color: #586b7b; font-family: var(--body); font-size: 9px; letter-spacing: 0; }
.master-banner { gap: 6px 10px; flex-wrap: wrap; align-items: center; }
.master-banner .textbtn { font-size: 10px; min-height: 28px; padding: 5px 8px; border: 1px solid #c8d5df; border-radius: 4px; background: #e6edf3; }
.preview-options { display: grid; gap: 10px; margin: 22px 0; }
.preview-options button { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px 10px; text-align: left; padding: 17px; border: 1px solid #c9d6e1; border-radius: 6px; background: #edf2f6; }
.preview-options b { font-size: 15px; }
.preview-options span { grid-column: 1; font-size: 12px; color: #52697e; line-height: 1.5; }
.preview-options i { grid-column: 2; grid-row: 1/3; align-self: center; font-style: normal; font-size: 20px; }
.preview-options button:hover { border-color: #5a768f; background: #e2ebf2; }
.preview-note { color: #53697e; font-size: 11px!important; }
.preview-label { font-size: 10px!important; color: #53697e; background: #e8eef4; border-radius: 3px; padding: 6px; margin-bottom: 12px; }
/* Home: the session is the main action; the companion is the second read. */
.training-overview { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(255px, 1fr); gap: 18px; margin-bottom: 24px; }
.session-launch { position: relative; overflow: hidden; min-height: 335px; padding: 30px; border-radius: 10px; background: var(--night); color: #f4f6e9; display: flex; flex-direction: column; }
.session-launch::after { content: ''; position: absolute; right: -35px; top: 25px; width: 170px; height: 220px; transform: skew(-18deg); border: 32px solid #d4fa4614; pointer-events: none; }
.session-launch .eyebrow { color: var(--lime); }
.session-launch h2 { color: #f7f9ef; font-size: 34px; font-weight: 800; letter-spacing: -1px; line-height: 1.2; margin: 25px 0 10px; z-index: 1; overflow-wrap: anywhere; }
.session-launch p { color: #b1bda5; font-size: 12px; z-index: 1; max-width: 90%; }
.session-meta { display: flex; flex-wrap: wrap; gap: 12px; color: #c9d6be; font-size: 11px; margin: 18px 0 24px; }
.session-meta span { border-left: 2px solid #7c915e; padding-left: 8px; }
.session-launch .primary { align-self: flex-start; min-width: 180px; margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.session-launch .primary span { font-size: 19px; }
.home-partner { min-height: 335px; display: flex; flex-direction: column; background: #e0e7ee; border: 1px solid #c5d1dc; border-radius: 10px; padding: 21px; overflow: hidden; }
.home-partner-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.home-partner h2 { font-size: 20px; margin-top: 8px; }
.partner-arena { position: relative; height: 176px; display: flex; justify-content: center; align-items: center; margin: 6px 0; background-image: linear-gradient(#a1b08c20 1px,transparent 1px),linear-gradient(90deg,#a1b08c20 1px,transparent 1px); background-size: 20px 20px; }
.partner-arena::after { content: ''; position: absolute; bottom: 8px; width: 100px; height: 5px; background: #4b64323b; }
.partner-arena .pixel-sprite { width: 128px; height: 128px; }
.partner-progress { display: flex; align-items: center; gap: 10px; font-size: 11px; }
.partner-progress .progress { background: #c3d0dd; }
.partner-progress .progress span { background: #476fab; }
.partner-caption { color: #4d6173; font-size: 10px; margin-top: 12px; }
.home-secondary { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 18px; margin-bottom: 26px; }
.week-count { font: 650 46px/1 var(--display); color: var(--ink); margin: 7px 0 0; }
.week-count span { font: 400 12px/1.5 var(--body); margin-left: 8px; }
.weekdays { margin: 21px 0 0; }
.day { color: #66737f; }
.day b { width: 31px; height: 31px; border-radius: 4px; border-color: #d4ddc8; }
.day.done b { background: var(--night); color: var(--lime); }
.day.today b { color: #486332; border-color: #728d53; }
.week-card .tip { display: none; }
.recent-session { display: flex; flex-direction: column; }
.recent-session .empty { text-align: left; padding: 18px 0; }
.recent-session .history-row { margin-top: 5px; }
.home-routines { margin-top: 4px; }
.routine-grid { gap: 14px; }
.routine { border-radius: 8px; border: 1px solid var(--line); background: #fff; padding: 20px; gap: 14px; }
.routine-icon, .routine:nth-child(2) .routine-icon, .routine:nth-child(3) .routine-icon { background: #ebeee5; color: #3a4b2c; border-radius: 4px; width: 33px; height: 33px; }
.routine h3 { font-size: 17px; }
.routine p { font-size: 12px; color: #65717b; line-height: 1.75; }
.routine-foot { font-size: 10px; border-top: 1px solid #e6eadf; padding-top: 12px; }
.history-row { border-color: #e0e6d8; gap: 15px; padding: 18px 0; }
.history-title { display: block; font-size: 14px; font-weight: 750; margin-bottom: 5px; overflow-wrap: anywhere; }
.history-row small { font-size: 11px; }
.date-box { background: #e6ecf1; color: #526679; border-radius: 4px; }
.date-box b { color: #344b24; font-family: var(--display); }
.stats { gap: 12px; }
.stat { background: var(--night); border: 0; border-radius: 8px; padding: 20px; }
.stat strong { color: #f2f6e7; font: 650 34px/1.3 var(--display); }
.stat small { color: #c4d1b4; font-size: 11px; }
.stat strong small { color: var(--lime); font-size: 12px; }
.filter button { border-radius: 5px; background: #fff; color: #516442; }
.filter button.selected { background: var(--night); color: #e8f6d0; border-color: var(--night); }
.weight-trend .section-head h2 { margin-top: 6px; }
.history-overview { display: grid; grid-template-columns: minmax(0,1fr); gap: 18px; }
.history-overview>.card { margin: 0; min-width: 0; }
.calendar-card .section-head h2 { font-size: 18px; }
.weight-trend .select { max-width: 340px; font-size: 13px; border-color: #cbd7e1; border-radius: 5px; }
.trend-summary { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin-top: 23px; }
.trend-summary small { font-size: 11px; }
.trend-summary strong { display: block; font: 700 39px/1.25 var(--display); margin-top: 6px; }
.trend-summary strong span { font: 600 14px var(--body); color: #586c7e; }
.trend-change { color: #425a70; background: #edf2f6; padding: 7px 10px; border-radius: 4px; font-size: 11px; text-align: right; }
.chart-scroll { max-width: 100%; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #9cadbd #edf2f6; }
.chart-scroll:focus-visible, summary:focus-visible { outline: 3px solid #657f16; outline-offset: 3px; }
.chart { gap: 16px; padding: 14px 8px 0; margin: 32px 0 33px; min-width: max-content; height: 140px; border-bottom: 1px solid #b7c7d5; }
.bar { flex: 1 0 40px; min-width: 40px; border-radius: 2px 2px 0 0; background: #b5c7d9; }
.bar.latest { background: #446fa7; }
.bar b { color: #354b61; font-size: 11px; }
.bar span { font-size: 10px; color: #566b7e; }
.chart-note { font-size: 11px; color: #596b7b; margin-top: 8px; }
.chart-data { border-top: 1px solid var(--line); margin-top: 15px; padding-top: 12px; font-size: 12px; }
.chart-data summary { cursor: pointer; color: #425a70; min-height: 30px; padding: 7px 0; }
.chart-data table { border-collapse: collapse; width: 100%; margin-top: 10px; text-align: left; }
.chart-data caption { text-align: left; padding-bottom: 10px; color: #596b7b; }
.chart-data th, .chart-data td { padding: 11px 0; border-bottom: 1px solid #e3e9ee; }
.chart-data th:last-child, .chart-data td:last-child { text-align: right; }
.calendar-day { border-radius: 4px; }
.calendar-day.has-workout { background: #e1efc5; color: #314522; }
.calendar-day.is-selected { background: var(--night); color: var(--lime); }
.calendar-day.is-today { border-color: #6686a4; }
.calendar-day.is-selected small { color: #d4fa46; }
.calendar-weekday, .calendar-foot { color: #596b7b; }
.calendar-day small { color: #536744; }
.calendar-day:hover { background: #edf1e6; }
/* Workout: large values, compact hierarchy, stable controls. */
.workout-head { align-items: center; gap: 18px; margin-bottom: 20px; }
.workout-head>div { min-width: 0; }
.workout-head .eyebrow { color: #526b37; }
.workout-head h1 { font-size: 32px; overflow-wrap: anywhere; }
.workout-head > .primary { background: var(--night); color: var(--lime); border-color: var(--night); min-height: 48px; white-space: nowrap; }
.live-volume { display: block; margin-top: 5px; color: #4a6075; }
.live-volume b { font-family: var(--display); font-size: 15px; color: #273b4d; margin: 0 3px; }
.exercise-jump { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 4; background: var(--paper); padding: 10px 0; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.exercise-jump>span { font-size: 10px; color: #536b80; white-space: nowrap; }
.exercise-jump-scroll { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #9cadbd #edf2f6; min-width: 0; padding: 3px; }
.exercise-jump-scroll:focus-visible { outline: 3px solid #657f16; outline-offset: 0; }
.exercise-jump button { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; max-width: 220px; font-size: 11px; padding: 9px 11px; background: #fff; border: 1px solid #cad7e2; color: #344e64; border-radius: 4px; }
.exercise-jump button b { font: 700 11px var(--display); color: #577494; margin-right: 7px; }
.exercise-jump button:hover { background: var(--night); color: #f1f5f9; border-color: var(--night); }
.exercise-jump button:hover b { color: var(--lime); }
.exercise { scroll-margin-top: 75px; }
.session-end-actions { display: flex; gap: 15px; align-items: center; flex-wrap: wrap; margin: 20px 0; }
.workout-companion { border: 1px solid #d0dbe4; background: #e8edf2; padding: 10px 16px; gap: 14px; margin: 0 0 22px; border-radius: 6px; }
.workout-companion p { font-size: 12px; margin: 3px 0 9px; }
.workout-companion small { font-size: 10px; color: #4f6639; }
.workout-companion b { font: 700 18px/1 var(--display); color: #344a25; }
.workout-companion .pixel-sprite { width: 64px; height: 64px; }
.progress { background: #d4ddc7; height: 6px; border-radius: 2px; }
.progress span { background: #688c40; border-radius: 2px; }
.exercise { padding: 24px; margin-bottom: 18px; }
.exercise > .section-head { border-bottom: 1px solid #dfe5ea; padding-bottom: 15px; margin-bottom: 12px; }
.exercise > small { display: block; font-size: 12px; color: #647382; margin-bottom: 12px; }
.workout-order-controls .badge { background: #ecf0e5; border: 0; padding: 6px 8px; }
.workout-order-controls .textbtn { color: #697d58; min-width: 34px; min-height: 38px; font-size: 17px; }
.workout-order-controls .textbtn:hover { background: #edf2e4; border-radius: 4px; }
.set-grid { grid-template-columns: 38px minmax(0,1fr) minmax(0,1fr) 48px; gap: 13px; }
.set-grid.muted { font-size: 10px; color: #596b7b; padding: 6px 0; }
.workout-set { padding: 5px 0; border-radius: 5px; }
.set-grid input { height: 52px; font: 650 22px/1 var(--display); color: #21313f; border-radius: 5px; border: 1px solid #d5dfe7; background: #f5f7f9; padding: 8px; }
.set-grid input:focus { border-color: #6c8d48; background: #fff; }
.set-grid input:disabled { background: #e7eedc; border-color: #e7eedc; color: #5c7148; opacity: 1; }
.set-number-handle { color: #5b6d7e; font: 600 13px/1 var(--display); }
.set-number-handle small { font-size: 10px; color: #718362; }
.check { width: 48px; height: 48px; border: 1px solid #b0bfcd; color: #5b6d7e; border-radius: 6px; font-size: 20px; }
.check.checked { background: var(--lime); color: #223114; border-color: #a5c63a; }
.exercise-tools { border-top: 1px solid #e2e7ec; margin-top: 10px; padding-top: 6px; }
.exercise-tools .textbtn { color: #5b7540; margin-top: 0!important; min-height: 36px; font-size: 11px; }
.exercise-tools .textbtn:disabled { color: #78866c; }
.workout-note { padding: 22px; }
.workout-note .field { margin: 0; }
.workout-note textarea { background: #f6f8fa; border-color: #d6dfe7; color: #304325; border-radius: 5px; }
.timer { background: var(--night); color: #e9f2dc; box-shadow: 0 8px 25px #18210d26; border: 1px solid #36452b; border-radius: 8px; }
.rest-readout { color: var(--lime); font-weight: 650; }
.rest-readout.rest-ready { animation: restReady 360ms ease-out; }
@keyframes restReady { from { transform: translateY(3px); opacity: .4; } to { transform: translateY(0); opacity: 1; } }
.rest-controls label { color: #c1d0ad; }
.rest-controls select { background: #303b46; border-color: #60758a; color: #eef3f8; border-radius: 4px; }
.rest-controls button { border: 1px solid #5a6b7b; background: #303b46; color: #e5edf5; border-radius: 4px; }
.rest-controls button:hover { background: #45596c; }
.is-dragging, .workout-set.is-set-dragging { background: #e4efcc; outline-color: #769449; }
.workout-drag-preview, .set-undo { background: #1c2815; border-color: #8bb543; color: #e5f4ce; border-radius: 5px; }
.set-action-menu { border-color: #bacda3; border-radius: 6px; box-shadow: 0 8px 24px #172b412e; }
/* Forms and dialogs share the same visual language. */
dialog { border: 1px solid #d0d9c4; border-radius: 12px; background: #fcfdfe; color: var(--ink); padding: 26px; box-shadow: 0 24px 90px #0b160c45; }
dialog::backdrop { background: #07100abc; backdrop-filter: blur(4px); }
dialog > h2 { font-size: 23px; }
dialog p { font-size: 13px; }
.field { color: #4d6070; font-size: 12px; font-weight: 600; }
.field input, .field select, .birth-layout textarea { min-height: 46px; background: #f4f6f8; color: #263747; border: 1px solid #ced9e2; border-radius: 5px; }
.field input::placeholder, textarea::placeholder { color: #798b67; opacity: 1; }
.field input:focus, .field select:focus { background: #fff; }
.exercise-search { min-height: 44px; background: #f1f5f8; color: #243718; border: 1px solid #cddae4; border-radius: 5px; font-size: 13px; }
.quick-add-exercise { background: #ddf1b7; border-color: #a7c574; color: #34521b; min-height: 42px; }
.exercise-search-hint, .routine-selection-note { color: #5d7348; }
.picker button { border-radius: 5px; border-color: #d5dfc8; background: #f1f5f8; color: #4b6535; font-size: 12px; padding: 9px 12px; }
.picker button.selected { border-color: #1e2d15; background: #22331a; color: #e0f4bf; }
.modal-actions { gap: 9px; }
.form-error, .sync-error { color: #ad3521!important; }
.save-alert, .birth-alert { background: #fff0d7; border-color: #dbb471; color: #72521d; }
.network-alert { background: #fff0d7; color: #765020; }
#toast { background: #182313; color: #e6f0dc; border: 1px solid #5e7d41; border-radius: 6px; font-size: 12px; box-shadow: 0 6px 24px #1528102e; }
/* Entry: a sports game title screen, with the form always within reach. */
.entry { max-width: 1600px; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); }
.entry-world { background: var(--night); color: #f0f6e3; border: 0; padding: 42px 56px; }
.entry-brand { font: 800 28px/1 var(--display); letter-spacing: -.5px; color: #f2f7e5; }
.entry-brand>span { background: var(--lime); color: var(--night); box-shadow: none; border-radius: 2px; }
.entry-brand small { color: #b8c6aa; font-size: 10px; }
.entry-copy { margin-top: 64px; }
.entry-copy .eyebrow { color: var(--lime); font: 650 11px/1.5 var(--display); letter-spacing: 2px; }
.entry-copy h1 { color: #f5f8ed; font-size: 43px; line-height: 1.3; letter-spacing: -2px; font-weight: 800; margin-top: 20px; }
.entry-copy p { color: #bac8ac; font-size: 14px; line-height: 1.75; }
.world-window { background: #273222; border: 1px solid #526141; box-shadow: none; border-radius: 5px; max-width: 430px; margin: 32px 0 0; overflow: hidden; }
.window-chrome { background: #25321c; border-bottom: 1px solid #526141; color: #d2eba9; font: 600 10px/1.5 var(--display); letter-spacing: 1.5px; }
.pixel-world { height: 210px; background-color: #1e2919; background-image: linear-gradient(#afcf7820 1px,transparent 1px),linear-gradient(90deg,#afcf7820 1px,transparent 1px); background-size: 24px 24px; }
.pixel-cloud { display: none; }
.world-ground { height: 28px; background: #334626; border-top: 2px solid #91b55a; background-image: none; }
.world-label { font: 600 9px/1 var(--display); color: #cfef9b; letter-spacing: 2px; bottom: 9px; }
.world-star { color: #bce676; }
.window-caption { background: #29371f; color: #bdd0a5; font-size: 11px; padding: 12px; }
.entry-features { gap: 14px; justify-content: flex-start; color: #b3c997; font: 600 10px/1.5 var(--display); margin-top: 25px; }
.entry-form { background: var(--paper); padding: 42px 50px; }
.entry-form-inner { max-width: 370px; }
.entry-form h2 { font-size: 28px; font-weight: 800; line-height: 1.3; }
.entry-form .field { font-size: 12px; }
.entry-form .field input { background: #fff; min-height: 49px; border-color: #cbd7be; }
.auth-tabs { gap: 0; padding: 4px; border: 1px solid #cbd9e4; border-radius: 6px; background: #e5ebf0; margin: 24px 0 20px; }
.auth-tabs button { flex: 1; border: 0; padding: 10px; font-size: 12px; color: #50677b; border-radius: 3px; }
.auth-tabs button.selected { background: #fff; color: #24381a; border: 0; box-shadow: 0 1px 3px #2d45171a; }
.lifecycle-consent { color: #5e6d7a; font-size: 11px; }
.lifecycle-consent input { accent-color: #577a31; }
.demo-link { color: #4e6b32; font-size: 12px; }
.entry-footnote { color: #596b7b; }
.master-entry { border: 1px dashed #abc17f; background: #e8efd9; padding: 15px; border-radius: 6px; margin-bottom: 22px; }
.master-entry .primary { background: #24331b; color: #d4fa46; border-color: #24331b; }
.master-entry p { font-size: 10px; color: #506438; }
.boot-state { background: var(--night); color: #eef6e1; min-height: 100vh; }
.boot-state b { font-family: var(--display); color: var(--lime); font-size: 34px; letter-spacing: 1px; }
.boot-state p { color: #bccdaf; }
/* Companion and milestones: arcade surfaces rather than pastel decoration. */
.pet-card { background: #e0e7ee; border: 1px solid #c4d0db; box-shadow: none; border-radius: 9px; min-height: 335px; }
.pet-scene::before { background-image: linear-gradient(#71865817 1px,transparent 1px),linear-gradient(90deg,#71865817 1px,transparent 1px); background-size: 24px 24px; }
.pet-scene::after { background: #6b834140; height: 5px; width: 110px; }
.pet-head .eyebrow { color: #4c682f; }
.speech { background: var(--night); color: #e3f1ce; box-shadow: none; border-radius: 5px; font-size: 11px; padding: 10px 13px; }
.spark { display: none; }
.life-card { background: #e9edf1; border: 1px solid #d3dce3; border-radius: 6px; padding: 16px 20px; }
.life-card p, .memory-row p { color: #506477; }
.training-overview+.life-healthy { margin-bottom: 18px; padding: 12px 16px; }
.training-overview+.life-healthy .eyebrow { display: none; }
.training-overview+.life-healthy>div { display: flex; align-items: center; gap: 14px; }
.training-overview+.life-healthy h3 { margin: 0; font-size: 13px; white-space: nowrap; }
.training-overview+.life-healthy .secondary { white-space: nowrap; min-height: 34px; padding: 7px 10px; }
.life-critical { background: #fff1d6; border-color: #dbbb7d; }
.life-dead { background: #e4e8ee; border-color: #bac5d1; }
.life-lonely { background: #f2eddd; border-color: #d2c7a8; }
.birth-preview { background: #e0e9f1; border: 1px solid #bdce9f; border-radius: 8px; }
.birth-preview .window-chrome { background: #243442; color: #d6f2ac; }
.birth-preview>p { color: #45637d; }
.birth-notes { border-color: #c6d7ae; color: #4d6b86; font-size: 12px; }
.birth-policy { background: #e9efde; color: #516c82; }
.personality-hints span { background: #e5ecf2; color: #58713e; border-radius: 3px; font-size: 11px; }
.birth-facts dt { color: #596b7b; }
.birth-facts dd { color: #354b5d; }
.loading-pixels { color: #83a445; }
.memory-symbol { background: #283848; border-color: #283848; color: var(--lime); border-radius: 3px; }
.memory-row h3 { color: #2c4020; }
.memory-row small { color: #596b7b; }
.reveal-stage { background: #e1edcd; border-color: #becf9e; }
.reveal-spark { color: #759c3c; }
.birth-reveal h2 { font-size: 27px; }
.birth-reveal .reveal-letter { color: #415c2b; }
.shop-item { border-color: #d4e0c7; }
.shop-item p { color: #596b7b; }
.item-pixel { background: #e3ebf3; color: #56732c; }
.potion { background: #e2e8f5; color: #4862ae; }
.growth-stage { border-color: #d9e3ce; }
.growth-rewards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.growth-rewards>div { background: #edf2f6; border-radius: 5px; padding: 18px; }
.growth-rewards span { display: block; font-size: 11px; color: #526b80; }
.growth-rewards b { display: block; font: 700 30px/1.2 var(--display); margin-top: 10px; }
.growth-rewards small { font: 600 11px var(--body); color: #526b80; }
.growth-rules { margin: 14px 0; font-size: 12px; color: #4b6277; }
.growth-rules summary { cursor: pointer; padding: 10px 0; min-height: 36px; }
.growth-rules p { margin: 6px 0 18px; line-height: 1.8; }
/* Reward: decisive numbers, a kinetic XP strip and a shareable achievement. */
.workout-reward { text-align: center; }
.workout-reward>.eyebrow { color: #506c2e; }
.workout-reward h2 { font-size: 25px; font-weight: 800; }
.reward-header { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 15px 0 9px; text-align: left; }
.reward-header>div:last-child { min-width: 0; }
.reward-header h2 { font-size: 22px; overflow-wrap: anywhere; }
.reward-header p { color: #53677b; font-size: 12px; overflow-wrap: anywhere; }
.reward-header .pixel-sprite { width: 64px; height: 64px; flex-shrink: 0; }
.record-shortcut { min-height: 34px; padding: 7px 12px; background: #e8f6bd; color: #3e5826; border: 1px solid #b4cb81; border-radius: 4px; font-size: 11px; font-weight: 700; }
.workout-reward>.sprite-wrap .pixel-sprite, .workout-reward>.pixel-sprite { width: 128px; height: 128px; }
.reward-stats { gap: 7px; margin: 19px 0 12px; }
.reward-stats>div { background: #e9eef3; border: 0; border-radius: 5px; padding: 14px 5px; gap: 6px; }
.reward-stats b { color: #253645; font: 650 23px/1.3 var(--display); }
.reward-stats small { color: #53677b; font-size: 10px; }
.metric-change { color: #536f31; font-size: 10px; }
.reward-comparison { border: 0; border-top: 1px solid #d4dfe8; border-bottom: 1px solid #d4dfe8; background: transparent; border-radius: 0; padding: 12px 0; color: #5b7540; }
.reward-comparison small { color: #536744; }
.reward .earned-xp { color: #2e4b15; font: 750 40px/1 var(--display); margin: 22px 0 12px; letter-spacing: -1px; }
.xp-breakdown { color: #536d3b; font-size: 10px!important; }
.reward-growth { background: var(--night); color: #e7f4d6; border: 1px solid #354a27; border-radius: 6px; padding: 18px; }
.reward-growth b { color: #eff6e2; font: 650 14px/1.5 var(--display); }
.reward-growth .progress { background: #3c4b31; height: 13px; }
.reward-growth .progress span { background: var(--lime); box-shadow: 0 0 14px #caff4430; }
.reward-growth small { color: #c2d6a9; }
.reward-growth.level-up { background: #1d2b15; border-color: #91b447; }
.personal-records { border: 1px solid #cadcb2; background: #f0f6e6; border-radius: 6px; padding: 16px; }
.personal-records p { color: #4d6934; }
.personal-records small { color: #738760; }
.pr-celebration { background: #d4fa46; border: 1px solid #a8c637; color: #20300f; padding: 23px 17px; border-radius: 6px; animation: none; scroll-margin-top: 16px; }
.pr-celebration .pr-stars { animation: none; }
.pr-celebration.is-celebrating { animation: recordArrival .65s cubic-bezier(.2,.7,.3,1) both; }
.pr-celebration.is-celebrating .pr-stars { animation: recordStars 1.1s ease-out both; }
.pr-celebration .eyebrow, .pr-celebration h3, .pr-celebration p, .pr-achievement small { color: #304817; }
.pr-stars { color: #57751f; }
.pr-achievement { border-color: #9fbf34; }
.pr-achievement b { font: 800 32px/1.15 var(--display); color: #1a2a0a; letter-spacing: -.5px; }
.pr-celebration .secondary { background: #1e3011; color: #e7ffc6; border-color: #1e3011; font-weight: 700; }
.workout-reward .modal-actions { background: #fcfdfe; border-color: #d7e1ca; bottom: -26px; padding-top: 12px; }
@media (min-width: 761px) {
  .main:has(.workout-head) { max-width: 1000px; width: 100%; margin-inline: auto; }
  .exercise .set-grid { grid-template-columns: 42px minmax(0,1fr) minmax(0,1fr) 50px; }
  .exercise .set-grid input { height: 56px; font-size: 25px; }
  .rest-panel { min-width: 400px; }
}
@media (min-width: 1240px) {
  .history-overview { grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: start; }
  .history-overview .calendar-controls { gap: 5px; }
  .history-overview .calendar-controls .secondary { padding-inline: 9px; }
}
@media (max-width: 1100px) {
  .shell { grid-template-columns: 180px minmax(0,1fr); }
  .sidebar { padding-inline: 16px; }
  .brand { font-size: 21px; }
  .brandmark { font-size: 17px; }
  .main { padding: 25px; }
  .training-overview { grid-template-columns: minmax(0,1.4fr) minmax(230px,1fr); }
  .session-launch { padding: 24px; }
  .session-launch h2 { font-size: 29px; }
  .entry-world { padding: 36px; }
  .entry-copy h1 { font-size: 36px; }
}
@media (min-width: 761px) and (max-width: 1000px) {
  .routine-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .home-secondary { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 760px) {
  .field input, .field select, .field textarea, .exercise-search, .weight-trend .select, .rest-controls select { font-size: 16px; }
  .main :is(input,textarea,select,button) { scroll-margin-block: 80px 190px; }
  .shell { display: block; }
  .main { padding: 22px 18px 112px; }
  .topbar { margin-bottom: 27px; align-items: center; }
  .topbar .mobile-title { font: 800 22px/1 var(--display); letter-spacing: -.6px; color: #1f2b18; }
  .topbar .profile { max-width: 155px; }
  .profile #sync-status { font-size: 9px; }
  .profile-account { font-size: 10px; }
  .sidebar { padding: 8px 7px max(8px,env(safe-area-inset-bottom)); border-top: 1px solid #3b4957; background: var(--night); }
  .nav { margin: 0; }
  .nav button { padding: 9px 15px; gap: 6px; font-size: 10px; color: #b4c89e; border-radius: 6px; }
  .nav button.active { background: #d4fa46; color: #21320e; }
  h1 { font-size: 28px; letter-spacing: -1.2px; }
  .intro { margin-bottom: 21px; }
  .intro p { font-size: 12px; }
  .master-banner { margin-bottom: 14px; font-size: 9px; }
  .master-banner span { font-size: 8px; }
  .training-overview { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
  .session-launch { min-height: 275px; padding: 24px; }
  .session-launch h2 { font-size: 32px; margin-top: 22px; }
  .session-meta { margin: 15px 0 20px; font-size: 10px; }
  .session-launch .primary { min-height: 47px; width: 100%; }
  .home-partner { min-height: 0; padding: 16px 18px; display: grid; grid-template-columns: minmax(0,1fr) 96px; gap: 3px 15px; }
  .home-partner-head { grid-column: 1; }
  .home-partner h2 { font-size: 19px; margin-top: 5px; }
  .home-partner .eyebrow { font-size: 8px; letter-spacing: 1.5px; }
  .home-partner-head .badge { font-size: 9px; padding: 4px 6px; }
  .partner-arena { grid-column: 2; grid-row: 1 / 4; height: 100px; margin: 0; }
  .partner-arena .pixel-sprite { width: 64px; height: 64px; }
  .partner-arena::after { width: 55px; bottom: 0; }
  .partner-progress { margin-top: 12px; gap: 8px; font-size: 10px; }
  .partner-caption { margin-top: 3px; font-size: 9px; }
  .home-secondary { grid-template-columns: 1fr; gap: 14px; margin-bottom: 24px; }
  .home-secondary .card { padding: 20px; }
  .recent-session .section-head { margin-bottom: 5px; }
  .recent-session .history-row { padding-bottom: 0; }
  .week-card .section-head { margin-bottom: 14px; }
  .week-count { font-size: 40px; }
  .weekdays { margin-top: 18px; }
  .routine { padding: 19px; gap: 13px; }
  .routine h3 { font-size: 18px; }
  .routine p { font-size: 12px; }
  .card { padding: 20px; }
  .section-head h2 { font-size: 19px; }
  .stat { padding: 17px 10px; }
  .stat strong { font-size: 27px; }
  .stat small { font-size: 10px; }
  .workout-head { align-items: flex-start; gap: 12px; margin-bottom: 18px; }
  .workout-head h1 { font-size: 28px; margin-top: 7px!important; }
  .workout-head .eyebrow { font-size: 8px; }
  .workout-head>.primary { padding: 12px; font-size: 12px; min-height: 45px; margin-top: 9px; }
  .workout-companion { padding: 10px 12px; gap: 10px; margin-bottom: 17px; }
  .workout-companion .pixel-sprite { width: 64px; height: 64px; }
  .workout-companion p { font-size: 11px; }
  .workout-companion b { font-size: 16px; }
  .exercise { padding: 18px 16px; margin-bottom: 15px; }
  .exercise > .section-head { padding-bottom: 12px; gap: 8px; }
  .exercise .section-head h2 { font-size: 21px; }
  .exercise>small { font-size: 11px; margin-bottom: 10px; }
  .set-grid { grid-template-columns: 28px minmax(0,1fr) minmax(0,1fr) 43px; gap: 8px; }
  .set-grid input { font-size: 21px; height: 49px; padding: 7px; }
  .check { width: 43px; height: 45px; }
  .workout-order-controls { gap: 0; }
  .workout-order-controls .textbtn { min-width: 30px; min-height: 36px; padding: 5px; }
  .workout-order-controls .badge { display: none; }
  .timer { bottom: 86px; left: 18px; right: 18px; width: auto; border-radius: 7px; }
  .rest-panel { padding: 10px; gap: 9px; }
  .rest-controls { gap: 5px; }
  .rest-controls button { min-height: 32px; padding: 5px 8px; font-size: 11px; }
  .rest-readout { font-size: 12px; }
  .main:has(.rest-panel) { padding-bottom: 225px; }
  dialog { width: calc(100% - 28px); max-width: 490px; padding: 22px; border-radius: 10px; }
  .workout-reward .modal-actions { bottom: -22px; }
  .entry-world { padding: 28px 24px; }
  .entry-copy { margin-top: 31px; }
  .entry-copy h1 { font-size: 34px; margin-top: 15px; }
  .entry-copy p { font-size: 12px; margin-top: 15px; }
  .entry-brand { font-size: 24px; }
  .entry-brand>span { width: 31px; height: 31px; font-size: 21px; }
  .world-window { margin-top: 23px; max-width: none; }
  .pixel-world { height: 160px; }
  .pixel-world .egg-sprite { width: 128px; height: 128px; }
  .entry-features { margin-top: 20px; font-size: 9px; }
  .entry-form { padding: 30px 24px 42px; }
  .entry-form h2 { font-size: 26px; }
  .home-routines .section-head { gap: 8px; }
  .home-routines .section-head .textbtn { font-size: 11px; white-space: nowrap; }
  .life-card { padding: 15px 17px; gap: 10px; }
  .life-card .secondary { min-height: 35px; padding: 7px 10px; }
  .training-overview+.life-healthy { flex-direction: row; align-items: center; padding: 12px 14px; }
  .training-overview+.life-healthy>div { display: block; }
  .training-overview+.life-healthy h3 { margin-bottom: 5px; }
  .training-overview+.life-healthy p { font-size: 10px; }
  .training-overview+.life-healthy .secondary { font-size: 10px; }
  .reward-stats b { font-size: 20px; }
  .growth-rewards>div { padding: 13px 10px; }
  .growth-rewards b { font-size: 25px; }
  .growth-rewards span, .growth-rewards small { font-size: 10px; }
}
@media (max-width: 360px) {
  .main { padding-inline: 14px; }
  .topbar .mobile-title { font-size: 20px; }
  .nav button { padding-inline: 12px; }
  .session-launch { padding: 21px; }
  .session-launch h2 { font-size: 29px; }
  .home-partner { grid-template-columns: minmax(0,1fr) 80px; padding: 15px; gap: 3px 10px; }
  .partner-arena { height: 85px; }
  .partner-arena .pixel-sprite { width: 64px; height: 64px; }
  .home-partner h2 { font-size: 17px; }
  .home-partner-head .badge { font-size: 8px; }
  .workout-head h1 { font-size: 25px; }
  .workout-head>.primary { padding: 10px; font-size: 11px; }
  .exercise { padding: 16px 13px; }
  .exercise .section-head h2 { font-size: 19px; }
  .set-grid { gap: 6px; grid-template-columns: 25px minmax(0,1fr) minmax(0,1fr) 39px; }
  .set-grid input { font-size: 20px; }
  .check { width: 39px; }
  .exercise-tools .textbtn { font-size: 10px; }
  .timer { left: 14px; right: 14px; }
  .rest-controls button { padding-inline: 6px; }
  dialog { padding: 18px; width: calc(100% - 22px); }
  .workout-reward .modal-actions { bottom: -18px; }
  .reward-stats b { font-size: 17px; }
  .reward-header h2 { font-size: 18px; }
  .reward-header .pixel-sprite { width: 64px; height: 64px; }
  .metric-change { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  button { transition: none; }
  .ai-sprite, .demo-sprite, .egg-sprite { animation: none; }
}
/* Completed-workout correction sheet. */
.record-tools,.record-fields{display:flex;gap:12px;justify-content:space-between;margin:14px 0;flex-wrap:wrap}
.record-fields .field{flex:1;min-width:120px}
.record-exercise{border-bottom:1px solid var(--line);padding:12px 0}
.record-set{display:grid;grid-template-columns:28px minmax(0,1fr) minmax(0,1fr) 44px;gap:8px;align-items:center;margin:8px 0}
.record-set input{min-width:0;width:100%;padding:12px 8px}
.record-set-labels{font-size:12px;color:var(--muted)}
#record-editor textarea{width:100%;min-height:80px}

/* Keep each 64px sprite texel on a whole CSS-pixel grid. Avoid composited
   transform animation, which can shimmer on crisp transparent edges. */
.pixel-sprite { display:block; flex-shrink:0; image-rendering:pixelated; }
.sprite-wrap { flex-shrink:0; line-height:0; }
@keyframes pixelBob {
  0%,100% { top:0; transform:none; }
  50% { top:-6px; transform:none; }
}
/* AI originals already contain the drawn pixel clusters. Let the browser
   downsample that original instead of discarding facial pixels to 64x64. */
.ai-sprite, .demo-sprite { image-rendering:auto; }
.pet-touch{position:relative;display:inline-flex;align-items:center;justify-content:center;padding:0;flex-shrink:0;line-height:0;border-radius:8px;cursor:pointer;isolation:isolate}
.pet-touch-spark{display:none;position:absolute;right:0;top:8px;font-size:22px;line-height:1;color:#617b10}
.pet-speech{position:fixed;z-index:10000;background:#fffef3;color:#243122;border:2px solid #536136;border-radius:12px;padding:13px 15px;font-size:14px;line-height:1.6;pointer-events:none;box-shadow:0 4px 0 #24312220;word-break:keep-all}
.pet-greeting .pixel-sprite{animation:petHello .6s steps(2,end) 1}
.pet-greeting[data-pet-stage="2"] .pixel-sprite{animation:petHello .45s steps(2,end) 2}
.pet-greeting[data-pet-stage="3"] .pixel-sprite{animation:petHello .35s steps(2,end) 3}
.pet-greeting[data-pet-stage="3"] .pet-touch-spark{display:block;animation:petSpark 1s steps(2,end) 2}
@keyframes petHello{0%,100%{top:0;left:0;transform:none}25%{top:-4px;left:-2px;transform:none}50%{top:-8px;left:0;transform:none}75%{top:-4px;left:2px;transform:none}}
@keyframes petSpark{0%,100%{opacity:0}50%{opacity:1}}
.pr-pet-entrance{display:flex;align-items:center;justify-content:center;gap:12px;margin:14px 0;text-align:left}
.pr-pet-entrance .pixel-sprite{width:128px;height:128px}
.pr-pet-message{background:#fffef3;color:#243122;border:1px solid #b6bc94;border-radius:10px;padding:12px;max-width:200px}
.pr-celebration.is-celebrating .pr-pet-entrance .pixel-sprite{animation:petHello .55s steps(2,end) 2}
@media(max-width:400px){.pr-pet-entrance .pixel-sprite{width:64px;height:64px}}
@media(prefers-reduced-motion:reduce){.pet-greeting .pixel-sprite,.pet-greeting[data-pet-stage] .pixel-sprite,.pet-greeting .pet-touch-spark,.pr-celebration.is-celebrating .pr-pet-entrance .pixel-sprite{animation:none}}
.exercise-thumb{position:relative;display:inline-flex;align-items:center;justify-content:center;width:56px;height:56px;flex-shrink:0;border:1px solid #d9e0e6;border-radius:10px;background:#fff;overflow:hidden;color:#4b6870}
.exercise-thumb>svg{width:30px;height:30px}
.exercise-thumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#fff;padding:3px}
.exercise-thumb img[hidden]{display:none}
.exercise-heading{display:flex;gap:12px;align-items:center;min-width:0}
.exercise-heading h2{overflow-wrap:anywhere}
.exercise-art-button{padding:0;flex-shrink:0;border-radius:10px}
.exercise-picker{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.exercise-picker [data-pick]{display:flex;align-items:center;text-align:left;gap:9px;padding:8px;min-width:0}
.exercise-picker [data-pick] span:last-child{overflow-wrap:anywhere}
.exercise-picker [data-pick].selected{box-shadow:inset 3px 0 #739514}
.exercise-art-poses{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:20px 0}
.exercise-art-poses figure{margin:0;text-align:center}
.exercise-art-poses img{width:100%;height:200px;object-fit:contain;background:#fff}
.art-credit{font-size:12px;line-height:1.8;margin:16px 0}
.art-credit-list{display:grid;gap:8px;margin:16px 0}
.nav svg{padding:3px;box-sizing:content-box;background:#ffffff0a;border-radius:6px}
.nav .active svg{background:#161b2012}
@media(max-width:400px){.exercise-picker .exercise-thumb{width:40px;height:40px}.exercise-heading{gap:8px}.exercise-heading .exercise-thumb{width:44px;height:44px}.exercise-art-poses img{height:140px}}
.exercise-picker [data-pick][hidden]{display:none}
.picker-filters{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 14px}.picker-filters button{min-width:40px;min-height:40px;padding:8px 11px;border:1px solid var(--line);border-radius:7px;font-size:12px;color:var(--muted);background:var(--surface)}.picker-filters button.selected{background:var(--night);color:var(--surface);border-color:var(--night)}.picker-view-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:6px 0 10px}.picker-view-row>span{font-size:12px;color:var(--muted)}.picker-view-row button{min-height:40px;font-size:12px}.picker-view-row button[aria-pressed=true]{font-weight:750;color:var(--green);background:#edf5d4;border-radius:6px}.picker-reset{font-size:12px;min-height:40px;margin-bottom:12px}.picker-reset[hidden]{display:none}.routine-save-actions{position:sticky;bottom:-28px;z-index:3;background:var(--surface);padding-top:14px;padding-bottom:10px;border-top:1px solid var(--line)}
@media(max-width:760px){.picker-filters button{min-height:44px}.routine-save-actions{bottom:-20px;padding-bottom:max(12px,env(safe-area-inset-bottom))}}
.session-add-button{display:block;width:100%;min-height:52px;border:1px dashed #7a8792;color:var(--ink);background:var(--surface);border-radius:10px;font-weight:650;margin:0 0 20px}.session-picker-intro{font-size:13px;margin-bottom:18px}.session-exercise-list{display:grid;gap:8px;max-height:45dvh;overflow:auto;overscroll-behavior:contain}.session-exercise-list>button{display:flex;align-items:center;gap:12px;text-align:start;padding:12px;border:1px solid var(--line);border-radius:9px;background:var(--surface);min-height:68px}.session-exercise-list>button[aria-pressed=true]{background:#edf5d4;border-color:#52682c}.session-exercise-list>button[hidden]{display:none}.session-exercise-list b{font-size:14px;line-height:1.5;display:block}.session-exercise-list small{display:block;font-size:12px;margin-top:3px}.session-pick-state{margin-inline-start:auto;font-size:12px;flex-shrink:0}.session-add-custom{padding:16px;background:var(--paper);border-radius:8px;margin:12px 0}.session-add-custom[hidden]{display:none}.session-add-custom p,#session-picker-status{font-size:12px;color:var(--muted);line-height:1.6;margin:10px 0}.session-add-custom>div{display:flex;gap:12px;align-items:end;flex-wrap:wrap}.session-add-custom label{display:grid;gap:6px;font-size:12px;flex:1}.session-add-custom select{font-size:16px;min-height:44px;padding:8px;border:1px solid var(--line);border-radius:6px}.session-add-custom button{min-height:44px}.session-exercise-list .exercise-thumbnail{flex-shrink:0}
.exercise-jump .session-add-shortcut{flex-shrink:0;min-height:44px;font-size:12px;background:var(--surface);border:1px solid var(--line);color:var(--ink);padding:9px 12px}.session-tools-top{display:flex;justify-content:flex-end;margin-bottom:16px}.session-tools-top button{min-height:44px}@media(max-width:760px){.exercise-jump{flex-wrap:wrap}.exercise-jump .exercise-jump-scroll{flex-basis:calc(100% - 68px)}.exercise-jump .session-add-shortcut{margin-inline-start:auto}}
html:has(dialog[open]){overflow:hidden}.skip-link{position:fixed;inset-block-start:8px;inset-inline-start:8px;transform:translateY(-150%);z-index:100;background:var(--night);color:white;border:2px solid var(--lime);padding:12px 18px;border-radius:6px;font-size:14px}.skip-link:focus{transform:none}.set-undo{gap:12px}.set-undo button{min-height:44px}.set-undo button[aria-label]{min-width:32px;font-size:20px;text-decoration:none;padding:4px}.set-action-menu button{min-height:44px}
@media(max-width:760px){.workout-order-controls .textbtn{min-width:40px;min-height:44px}.exercise-tools .textbtn{min-height:44px;font-size:11px}.rest-controls button{min-height:40px}.rest-controls select{min-height:40px}.sample-review label{min-height:44px}.master-banner .textbtn{min-height:36px}.set-undo{padding:8px 12px;font-size:12px}}
.exercise{scroll-margin-top:80px}@media(max-width:760px){.exercise{scroll-margin-top:140px}}
.password-input{position:relative;display:flex;align-items:stretch;gap:8px}.password-input input{flex:1;min-width:0}.password-input button{min-width:60px;min-height:48px;border:1px solid #adb6c0;border-radius:6px;background:var(--surface);font-size:12px;font-weight:600;color:var(--ink)}
@media(max-width:760px){.entry-world{display:grid;grid-template-columns:minmax(0,1fr) 80px;grid-template-areas:"brand brand" "copy art" "guide guide";gap:18px 16px;padding:24px}.entry-brand{grid-area:brand;display:block;min-width:0;width:100%}.entry-brand small{display:none}.entry-copy{grid-area:copy;min-width:0;margin:0}.entry-copy .eyebrow{display:none}.entry-copy h1{font-size:27px;line-height:1.35;margin:0;letter-spacing:-1px;word-break:keep-all}.entry-copy p{font-size:12px;margin-top:10px;line-height:1.65;overflow-wrap:anywhere}.entry-copy p br{display:none}.entry-world .world-window{grid-area:art;align-self:center;justify-self:end;margin:0;border:0;box-shadow:none;background:transparent;width:80px;min-width:0}.entry-world .window-chrome,.entry-world .window-caption,.entry-world .world-ground,.entry-world .world-label,.entry-world .world-star,.entry-features{display:none}.entry-world .pixel-world{height:110px;background:none}.entry-world .pixel-world .egg-sprite{width:80px;height:80px}.entry-form{padding-top:24px}.entry-form .auth-tabs{margin-top:20px}.auth-tabs button{min-height:44px}}@media(max-width:360px){.entry-copy h1{font-size:24px}.entry-world{grid-template-columns:minmax(0,1fr) 72px;gap:16px 12px;padding:20px}.entry-world .world-window{width:72px}.entry-world .pixel-world .egg-sprite{width:72px;height:72px}}

@media(max-width:760px){.master-entry{padding:12px;margin-bottom:24px}.master-entry>.eyebrow{display:none}.master-entry p{margin:8px 0 0;font-size:11px}.master-entry .primary{margin:0;min-height:48px}}

.weekdays button.day{background:transparent;border:0;color:inherit;cursor:pointer;min-height:64px;padding:4px}.weekdays button.day:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.weekdays button.day small{font-size:10px}#day-options{display:grid;gap:8px;max-height:45vh;overflow:auto}#day-options [aria-pressed=true]{outline:2px solid var(--accent)}#modal [data-day-source]{margin:6px 0}

.workout-top-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.workout-top-actions .secondary{min-height:44px}@media(max-width:600px){.workout-top-actions{flex-direction:column;flex-shrink:0}}

.split-options{display:grid;gap:10px}.split-options [aria-pressed=true]{border:2px solid #6b862b;background:#edf5d5;color:#18210d}

/* Visually hidden copy must not participate in the brand's flex layout. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.sidebar .brand{min-width:0;position:relative}
.sidebar .brand .fitquest-wordmark{min-width:0;max-width:100%;flex:1}

/* Birth + growth: pixel egg and rising flame. */
.brandmark{padding:0;background:transparent;display:inline-flex;flex-shrink:0}.brandmark img{display:block;width:40px;height:40px}.entry-brand-icon{display:inline-block;vertical-align:middle;flex-shrink:0;margin-right:10px}.brand>span:last-child{font-weight:900;letter-spacing:.035em}
.day-planner,.day-picker{min-width:0}.planner-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:24px}.planner-heading small{font-size:12px;color:#627183}.planner-heading h2{font-size:23px;margin:6px 0 0;letter-spacing:-.7px}.planner-heading button{padding:8px;min-width:40px;min-height:40px}.planner-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.planner-actions button{text-align:left;padding:16px;border-radius:12px;min-height:76px}.planner-actions button:first-child{grid-column:1/-1}.planner-actions b,.planner-actions small{display:block}.planner-actions small{font-size:12px;margin-top:7px;font-weight:400}.planner-section{margin-top:26px}.planner-section h3{font-size:15px;display:flex;align-items:center;gap:8px;margin:0 0 12px}.planner-section h3 span{font-size:12px;background:#e7edf2;border-radius:20px;padding:3px 8px;color:#526271}.planner-empty{padding:25px 16px;background:#f0f3f6;border:1px dashed #cbd5df;border-radius:12px;text-align:center;font-size:14px}.planner-empty p{color:#617083;margin:8px 0 0;line-height:1.6}.planner-note{color:#617083;font-size:12px;line-height:1.6}.planner-plan{border:1px solid #dbe2e9;border-radius:12px;padding:16px;margin-bottom:10px}.planner-plan h4{margin:0;font-size:16px}.planner-plan p{color:#617083;line-height:1.7}.day-body-tabs{display:flex;gap:8px;overflow-x:auto;padding:2px 2px 12px;margin-bottom:12px;scrollbar-width:thin}.day-body-tabs button{display:grid;justify-items:center;gap:6px;flex:0 0 56px;border:1px solid #dbe2e9;background:#fff;border-radius:12px;padding:9px 5px;color:#526271;font-size:12px}.day-body-tabs button>span{height:28px;display:grid;place-items:center;font-size:23px}.day-body-tabs svg{width:28px;height:28px}.day-body-tabs [aria-pressed=true]{background:#161b20;color:#d4fa46;border-color:#161b20}.day-picker .field{margin-bottom:8px}.day-picker #day-options{max-height:42dvh;gap:8px}.day-exercise{display:flex;align-items:center;gap:12px;width:100%;padding:10px;border:1px solid #dbe2e9;background:#fff;border-radius:12px;text-align:left;color:#161b20;min-height:76px}.day-exercise-copy{flex:1;min-width:0}.day-exercise-copy b{font-size:14px;line-height:1.4;display:block}.day-exercise-copy small{display:block;font-size:11px;color:#617083;margin-top:5px}.day-check{display:grid;place-items:center;width:25px;height:25px;border:1px solid #cbd5df;border-radius:8px;flex-shrink:0}.day-picker #day-options [aria-pressed=true]{outline:none;border-color:#7e9638;background:#f3f8e5}.day-exercise[aria-pressed=true] .day-check{background:#d4fa46;border-color:#a0bf35}.day-picker-footer{display:flex;gap:10px;position:sticky;bottom:-1px;background:#fcfdfe;padding:16px 0 0;margin-top:10px}.day-picker-footer .primary{flex:1}.day-picker-footer button{min-height:48px}.day-picker-footer button:disabled{opacity:.5;cursor:default}.weekdays{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.weekdays button.day{min-width:0;padding:4px 0}@media(max-width:600px){.home-secondary{grid-template-columns:minmax(0,1fr)}.planner-heading h2{font-size:21px}.day-exercise .exercise-thumb{width:46px;height:46px}.day-body-tabs button{flex-basis:51px}.day-picker #day-options{max-height:38dvh}}
.planner-actions b{word-break:keep-all;line-height:1.5;font-size:13px}.planner-note:last-child{margin-top:16px}.day-body-tabs button[aria-pressed=true]{background:#161b20!important;color:#d4fa46!important}.day-body-tabs button[aria-pressed=false]{background:#fff;color:#526271}
.program-library{margin-top:36px}.program-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px}.program-card{text-align:left;padding:24px;background:#fff;border:1px solid #dbe2e9;border-radius:14px;color:#161b20}.program-card>small{font-size:12px;color:#596d36}.program-card h3{font-size:19px;margin:12px 0}.program-card p{color:#627183;font-size:14px;line-height:1.6}.program-card strong{display:block;margin-top:22px;font-size:13px}.program-guide{display:flex;align-items:center;gap:12px;margin:20px 0}.program-pet{width:76px;flex-shrink:0}.program-pet img,.program-pet svg,.program-pet .pet-touch{max-width:76px;max-height:100px;object-fit:contain}.program-speech{background:#edf3df;border:1px solid #d2dfbb;border-radius:14px;padding:16px;flex:1}.program-speech small{font-size:11px;color:#526437}.program-speech p{margin:7px 0 0;line-height:1.7}.program-tabs{display:flex;gap:6px;margin-bottom:24px}.program-tabs button{flex:1;min-height:44px;border:1px solid #dbe2e9;border-radius:8px;background:white;font-size:12px;padding:8px}.program-tabs [aria-pressed=true]{background:#161b20;color:#d4fa46}.program-day{border:1px solid #dbe2e9;border-radius:10px;padding:14px;margin:10px 0}.program-day summary{cursor:pointer;font-weight:700;font-size:14px;min-height:30px}.program-day summary small{font-weight:400;color:#627183}.program-exercise{display:flex;align-items:center;gap:10px;margin-top:12px;font-size:13px}.program-exercise small{display:block;font-size:11px;color:#627183;margin-top:5px}.program-detail .wide{min-height:48px}.program-detail button:disabled{opacity:.6}@media(max-width:400px){.program-grid{grid-template-columns:minmax(0,1fr)}.program-guide{gap:8px}.program-pet{width:56px}.program-pet img,.program-pet svg{max-width:56px}.program-speech{padding:12px}}
.program-speech p,.program-exercise small,.program-tabs button{word-break:keep-all}.program-exercise>span:last-child{min-width:0}.program-exercise .exercise-thumb{width:44px;height:44px}.program-tabs button{padding:8px 4px}

/* Approved FIT QUEST wordmark, shared by entry and navigation. */
.brand .fitquest-wordmark{display:block;width:100%;height:auto;border-radius:8px}.entry-brand{flex-wrap:wrap;min-width:0}.entry-brand .fitquest-wordmark{display:block;width:min(320px,100%);max-width:100%;height:auto;border-radius:10px}.entry-brand small{display:block;width:100%;margin-top:8px}.mascot-hello{overflow:hidden}.mascot-hello img{object-fit:contain!important;width:100%!important;height:100%!important}
@media(max-width:760px){.entry-brand .fitquest-wordmark{width:clamp(214px,72vw,280px)}.entry-brand small{display:none}}

.exercise-recent-label{display:block;color:#526236;font-size:11px;line-height:1.5;font-weight:600;margin-top:3px}

/* Keep exercise names readable while leaving a full touch row for actions. */
@media(max-width:760px){
  .exercise .section-head{flex-wrap:wrap;gap:12px}
  .exercise .exercise-heading{flex:1 0 100%;width:100%;min-width:0}
  .exercise .exercise-heading h2{flex:1;min-width:0;word-break:keep-all;overflow-wrap:anywhere;line-height:1.4}
  .exercise .workout-order-controls{width:100%;justify-content:flex-end;gap:8px}
  .exercise .workout-order-controls .textbtn{min-width:44px;min-height:44px}
}
