:root {
	font-family: "DM Sans", system-ui, sans-serif;
	color: #f3f4ef;
	background: #0e130f;
	font-size: 15px;
	color-scheme: dark;
}
* {
	box-sizing: border-box;
}
body {
	margin: 0;
	min-height: 100vh;
	background:
		radial-gradient(circle at 78% -15%, #203023 0, transparent 35%), #0e130f;
}
button,
input,
select,
textarea {
	font: inherit;
}
button {
	cursor: pointer;
}
button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}
h1,
h2,
h3,
p {
	margin-top: 0;
}
h1,
h2,
h3 {
	font-family: "Space Grotesk", system-ui, sans-serif;
	letter-spacing: -0.025em;
	text-wrap: balance;
}
h1 {
	font-size: 2.65rem;
	line-height: 1.12;
}
h2 {
	font-size: 1.5rem;
}
h3 {
	font-size: 1.1rem;
}
p {
	color: #b4c0b2;
	line-height: 1.55;
	text-wrap: pretty;
}
.shell {
	max-width: 1220px;
	margin: auto;
	padding: 28px 32px 48px;
}
.top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding: 4px 0 24px;
	margin-bottom: 18px;
	border-bottom: 1px solid #2b372e;
}
.brand {
	font-family: "Space Grotesk", sans-serif;
	font-weight: 700;
	font-size: 1.6rem;
	color: #a8d7b0;
	letter-spacing: -0.06em;
}
.logo-crop {
	position: relative;
	overflow: hidden;
	background: #080908;
	flex: none;
}
.logo-crop img {
	position: absolute;
	max-width: none;
	filter: brightness(1.55);
}
.header-logo {
	width: 168px;
	height: 76px;
	border-radius: 10px;
}
.header-logo img {
	width: 310px;
	height: 310px;
	left: -65px;
	top: -111px;
}
.auth-logo {
	width: 240px;
	height: 112px;
	margin: 0 auto 28px;
	border-radius: 12px;
}
.auth-logo img {
	width: 450px;
	height: 450px;
	left: -95px;
	top: -161px;
}
.top-right {
	display: flex;
	align-items: center;
	gap: 14px;
	color: #a8b2a5;
}
.muted {
	color: #8c988b;
}
.nav {
	display: flex;
	gap: 4px;
	overflow: auto;
	padding-bottom: 12px;
	margin-bottom: 10px;
}
.ghost {
	background: #1b251d;
	color: #e7eee0;
	border: 1px solid #3d4d3c;
	border-radius: 10px;
	padding: 10px 15px;
}
.nav button {
	background: transparent;
	color: #b4c0b2;
	border: 1px solid transparent;
	border-radius: 9px;
	padding: 10px 15px;
	font-weight: 600;
}
.nav button.active {
	background: #24382a;
	color: #d9f1db;
	border-color: #3b6548;
}
.primary {
	background: #a9dab1;
	color: #15200d;
	border: 0;
	border-radius: 10px;
	padding: 12px 18px;
	font-weight: 700;
}
.primary,
.ghost,
.nav button,
.routine-picker button {
	transition:
		background-color 180ms ease,
		border-color 180ms ease,
		color 180ms ease,
		transform 180ms ease;
}
.primary:hover:not(:disabled) {
	background: #c0ebc6;
}
.ghost:hover:not(:disabled),
.nav button:hover:not(.active):not(:disabled) {
	background: #263629;
	border-color: #57755a;
}
.primary:active:not(:disabled),
.ghost:active:not(:disabled) {
	transform: translateY(1px);
}
:where(button, a, input, select, textarea):focus-visible {
	outline: 2px solid #bfecc3;
	outline-offset: 3px;
}
.danger {
	background: #38201e;
	color: #ffb4a9;
	border: 0;
	border-radius: 10px;
	padding: 8px 12px;
}
.grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}
.routine-picker {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 18px;
}
.routine-choice {
	margin-bottom: 18px;
}
.routine-choice > strong {
	display: block;
	margin-bottom: 4px;
}
.routine-choice .small {
	margin-bottom: 12px;
}
.routine-choice .routine-picker {
	margin-bottom: 0;
}
.routine-picker button {
	background: #1a211a;
	border: 1px solid #465342;
	border-radius: 999px;
	color: #f3f4ef;
	padding: 10px 17px;
	cursor: pointer;
}
.routine-picker button.active {
	background: #a8d7b0;
	border-color: #a8d7b0;
	color: #101710;
}
.routine-picker button:disabled {
	cursor: not-allowed;
	opacity: 0.8;
}
.session-progress {
	margin-top: 16px;
}
.session-progress h2 {
	margin: 5px 0 16px;
}
.log-exercise {
	padding: 0;
	overflow: hidden;
}
.exercise-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	border: 0;
	background: transparent;
	color: #f3f4ef;
	padding: 18px 22px;
	text-align: left;
	cursor: pointer;
}
.exercise-toggle strong,
.exercise-toggle small {
	display: block;
}
.exercise-identity {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}
.exercise-copy {
	min-width: 0;
}
.exercise-copy strong,
.exercise-copy small {
	display: block;
	overflow-wrap: anywhere;
}
.exercise-copy small {
	margin-top: 4px;
	color: #aebaaa;
	font-size: 0.82rem;
}
.exercise-thumb {
	flex: none;
	width: 68px;
	height: 68px;
	border: 1px solid #536a52;
	border-radius: 10px;
	background: #f7f6f0;
	object-fit: contain;
}
.exercise-thumb.log {
	width: 60px;
	height: 60px;
}
.exercise-thumb.list {
	width: 56px;
	height: 56px;
}
.exercise-thumb.swap {
	width: 40px;
	height: 40px;
}
.exercise-placeholder {
	display: inline-grid;
	place-items: center;
	background: #273629;
	color: #b9d4b5;
}
.exercise-placeholder svg {
	width: 35px;
	height: 35px;
}
.exercise-toggle > .exercise-identity {
	flex: 1;
}
.image-credits {
	margin-top: 20px;
	border-top: 1px solid #334134;
	padding-top: 14px;
}
.image-credits summary {
	width: fit-content;
	cursor: pointer;
	color: #b9d4b5;
}
.image-credits ul {
	columns: 2;
	padding-left: 18px;
	font-size: 0.83rem;
	line-height: 1.7;
}
.image-credits li {
	break-inside: avoid;
}
.image-credits a {
	color: #b9d4b5;
}
.exercise-toggle small {
	margin-top: 5px;
	color: #aebaaa;
	font-size: 0.82rem;
}
.exercise-details {
	border-top: 1px solid #303a2e;
	padding: 16px 22px 22px;
}
.swap-panel {
	background: #101710;
	border: 1px solid #465342;
	border-radius: 14px;
	padding: 16px;
	margin-bottom: 16px;
}
.swap-panel p {
	margin: 5px 0 0;
}
.swap-options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 14px 0;
}
.swap-options button {
	text-align: left;
}
.swap-options .muted {
	font-size: 0.8rem;
}
.swap-form {
	display: flex;
	align-items: end;
	gap: 10px;
}
.card {
	background: #182119;
	border: 1px solid #334134;
	border-radius: 16px;
	padding: 24px;
}
.hero {
	background: linear-gradient(120deg, #213c28, #182719 72%);
	border-color: #416c4a;
	padding: 32px;
	grid-column: span 2;
}
.eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: 0.75rem;
	font-weight: 700;
	color: #a8d7b0;
	overflow-wrap: anywhere;
}
.stat {
	font-family: "Space Grotesk", sans-serif;
	font-weight: 700;
	font-size: 2.2rem;
	margin: 8px 0;
}
.section-title {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin: 38px 0 16px;
}
.stack {
	display: grid;
	gap: 14px;
}
.row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
}
.exercise {
	border-top: 1px solid #303a2e;
	padding: 17px 0;
}
.exercise:first-of-type {
	border: 0;
}
.pill {
	display: inline-block;
	border: 1px solid #465342;
	border-radius: 100px;
	padding: 5px 9px;
	color: #c9d4c0;
	font-size: 0.78rem;
}
.exercise-toggle .pill {
	flex: none;
}
.set-row {
	display: grid;
	grid-template-columns: 1fr 90px 80px auto;
	align-items: center;
	gap: 10px;
	padding: 8px 0;
	border-top: 1px solid #303a2e;
}
.set-form {
	grid-template-columns: 55px 90px 75px 100px 70px auto;
}
.log-exercise .set-form {
	grid-template-columns: 1fr;
	gap: 10px;
}
.quick-entry {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	align-items: end;
	gap: 14px;
	max-width: 760px;
}
.quick-field {
	display: grid;
	gap: 8px;
	min-width: 0;
}
.quick-field-heading {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
	color: #cbd5c5;
	font-size: 0.88rem;
	font-weight: 700;
}
.quick-field-heading span {
	color: #aebaaa;
	font-size: 0.76rem;
	font-weight: 500;
}
.quick-input {
	display: grid;
	grid-template-columns: 52px minmax(0, 1fr) 52px;
	gap: 8px;
	min-width: 0;
}
.quick-input input {
	min-width: 0;
	min-height: 52px;
	text-align: center;
	font-size: 1.2rem;
	font-weight: 700;
	appearance: textfield;
}
.quick-input input::-webkit-inner-spin-button,
.quick-input input::-webkit-outer-spin-button {
	appearance: none;
	margin: 0;
}
.quick-input button {
	min-width: 52px;
	min-height: 52px;
	padding: 0;
	font-size: 1.5rem;
}
.quick-entry > .primary {
	grid-column: 1 / -1;
	min-height: 52px;
	width: 100%;
}
.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;
}
.last-performance {
	margin: 16px 0 8px;
	color: #d1e6d0;
	font-size: 0.87rem;
}
.suggested-weight {
	margin: 0 0 10px;
	color: #c8e9cb;
	font-size: 0.85rem;
}
.quick-repeat {
	margin: 2px 0 10px;
}
.set-more summary,
.exercise-menu summary {
	cursor: pointer;
	color: #c8d9c6;
	font-size: 0.84rem;
	padding: 8px 0;
}
.set-more-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin-top: 8px;
}
.exercise-menu {
	margin-bottom: 8px;
}
.exercise-menu .coach-actions {
	margin: 8px 0 12px;
}
.set-index {
	font-weight: 700;
	color: #d2e9d2;
}
.inline-saved {
	display: inline-block;
	margin: 8px 0 0 10px;
	color: #b9edbf;
	font-size: 0.85rem;
}
.field-error {
	margin: 5px 0;
	color: #ffb4a9;
	font-size: 0.86rem;
}
.undo-toast {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 45;
	display: flex;
	align-items: center;
	gap: 12px;
	background: #253c2a;
	color: #e8f6e9;
	border: 1px solid #6b9b73;
	border-radius: 12px;
	padding: 10px 12px;
	box-shadow: 0 12px 28px #000a;
}
.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.elapsed-label {
	margin-bottom: 13px;
	color: #d3e5d1;
}
.weekly-goal .stat span {
	color: #a9c0a8;
	font-size: 1.5rem;
}
.weekly-goal .adherence-meter {
	margin-bottom: 12px;
}
.weekly-goal .small {
	margin-bottom: 0;
}
.recap-records {
	color: #c0f0c6;
	font-weight: 600;
}
.trend-chart {
	width: 100%;
	overflow: hidden;
	margin-top: 18px;
}
.trend-chart svg {
	display: block;
	width: 100%;
	height: auto;
	max-height: 290px;
}
.chart-grid {
	stroke: #3b4e3d;
	stroke-width: 1;
}
.chart-label {
	fill: #bbcbbb;
	font-size: 12px;
	font-family: "DM Sans", system-ui, sans-serif;
}
.chart-line {
	fill: none;
	stroke: #b1e2b6;
	stroke-width: 3;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.chart-dot {
	fill: #d8f4dc;
	stroke: #1d3423;
	stroke-width: 2;
}
.set-group-fields {
	grid-column: 1 / -1;
	display: flex;
	gap: 12px;
	align-items: end;
}
.set-group-fields label {
	font-size: 0.8rem;
	color: #aebaaa;
}
.set-group-fields label:first-child {
	flex: 1;
}
.set-row input,
.set-row select,
.editor-row input,
.field input,
.field select,
.field textarea {
	width: 100%;
	background: #101710;
	border: 1px solid #445140;
	color: #f3f4ef;
	border-radius: 10px;
	padding: 10px;
}
.field {
	display: grid;
	gap: 7px;
	color: #cbd5c5;
	font-size: 0.9rem;
}
input::placeholder,
textarea::placeholder {
	color: #a5b3a4;
}
input:hover,
select:hover,
textarea:hover {
	border-color: #6b8a6e;
}
.swap-form .field {
	flex: 1;
}
.auth {
	min-height: 100vh;
	display: grid;
	place-items: center;
	padding: 24px;
}
.auth-card {
	max-width: 440px;
	width: 100%;
	background: #182119;
	border: 1px solid #3e5140;
	padding: 36px;
	border-radius: 20px;
	box-shadow: 0 30px 80px #0004;
}
.auth-card h1 {
	font-size: 2.5rem;
	margin: 8px 0 16px;
}
.admin-login-link {
	display: inline-block;
	margin-top: 26px;
	color: #b9d9bd;
	font-size: 0.86rem;
	text-decoration: underline;
	text-underline-offset: 4px;
}
.auth form {
	display: grid;
	gap: 16px;
}
.auth .brand {
	margin-bottom: 30px;
}
.message {
	color: #ffb4a9;
	min-height: 1.3em;
	background: #3b1e1e;
	border: 1px solid #85504a;
	border-radius: 10px;
	padding: 10px 14px;
}
.message.success {
	color: #d8f4dc;
	background: #233b2a;
	border-color: #547b5b;
}
.app-notice {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 30;
	max-width: min(420px, calc(100vw - 36px));
	box-shadow: 0 12px 28px #000a;
}
.workout-recap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 16px;
}
.editor-head {
	display: grid;
	grid-template-columns: 24px minmax(130px, 2fr) 68px 95px 78px 78px 118px;
	gap: 8px;
	margin-top: 18px;
	color: #bbc9b8;
	font-size: 0.78rem;
}
.small {
	font-size: 0.85rem;
}
.history-item {
	border-bottom: 1px solid #303a2e;
	padding: 17px 0;
}
.history-item:last-child {
	border: 0;
}
.calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 6px;
	margin-top: 20px;
	text-align: center;
}
.calendar-grid > strong {
	color: #a8d7b0;
	font-size: 0.8rem;
}
.calendar-day {
	min-height: 42px;
	background: #101710;
	border: 1px solid #303a2e;
	border-radius: 8px;
	color: #d9dfd6;
}
.calendar-day.trained {
	border-color: #a8d7b0;
}
.calendar-day.active {
	background: #a8d7b0;
	color: #101710;
}
.calendar-day small {
	display: block;
}
.history-set-form {
	display: grid;
	grid-template-columns: minmax(120px, 1fr) repeat(2, 85px) 110px 75px auto;
	align-items: center;
	gap: 8px;
}
.history-set-form input,
.history-set-form select {
	min-width: 0;
	width: 100%;
	background: #101710;
	border: 1px solid #445140;
	border-radius: 10px;
	color: #f3f4ef;
	padding: 10px;
}
.workout-notes-form {
	display: grid;
	gap: 10px;
	margin-top: 16px;
}
.workout-notes-form button {
	justify-self: start;
}
.editor-row {
	display: grid;
	grid-template-columns: 24px minmax(130px, 2fr) 68px 95px 78px 78px 118px;
	gap: 8px;
	margin: 8px 0;
}
.editor-row.dragging {
	opacity: 0.5;
}
.drag-handle {
	cursor: grab;
	user-select: none;
	color: #b7cdb8;
	align-self: center;
	text-align: center;
}
.drag-handle:active {
	cursor: grabbing;
}
.editor-actions {
	display: flex;
	gap: 3px;
}
.editor-actions button {
	padding: 8px;
	min-width: 35px;
}
.library-picker {
	display: flex;
	align-items: end;
	gap: 10px;
	margin-top: 16px;
}
.library-picker .field {
	flex: 1;
}
.editor-row > * {
	min-width: 0;
}
.settings-form,
.catalog-search {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	align-items: end;
	gap: 12px;
	margin: 16px 0;
}
.program-form {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
	align-items: end;
	gap: 12px;
	margin: 18px 0;
}
.program-list {
	margin-top: 18px;
}
.checkbox {
	display: flex;
	align-items: center;
	gap: 8px;
}
.checkbox input {
	width: auto;
}
.settings-form button,
.catalog-search button {
	justify-self: start;
}
.catalog-search {
	grid-template-columns: 1.5fr 1fr 1fr auto;
}
.empty {
	padding: 28px;
	text-align: center;
	color: #a8b2a5;
}
.footer {
	margin-top: 40px;
	text-align: center;
	font-size: 0.8rem;
	color: #82927e;
}
.account-danger-zone {
	border-color: #4a2020;
}
.account-danger-zone h2 {
	color: #ffb4a9;
}
.week-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 8px;
}
.week-day {
	display: grid;
	gap: 5px;
	padding: 10px;
	border-radius: 12px;
	background: #121a12;
}
.week-day.current {
	outline: 1px solid #a8d7b0;
}
.week-day span {
	font-size: 0.78rem;
}
.coach-layout {
	display: grid;
	grid-template-columns: 270px minmax(0, 1fr);
	align-items: start;
	gap: 16px;
}
.coach-layout > * {
	min-width: 0;
}
.coach-request,
.coach-start,
.trainee-list {
	display: grid;
	gap: 12px;
}
.coach-request,
.coach-start {
	margin: 18px 0;
}
.trainee-choice {
	width: 100%;
	display: grid;
	justify-items: start;
	gap: 8px;
	padding: 12px;
	text-align: left;
	color: #f3f4ef;
	background: #121a12;
	border: 1px solid #354032;
	border-radius: 12px;
	word-break: break-word;
}
.trainee-entry {
	display: grid;
	gap: 8px;
}
.trainee-entry > .ghost {
	justify-self: start;
	padding: 7px 10px;
	font-size: 0.85rem;
}
.trainee-choice.selected {
	border-color: #a8d7b0;
}
.trainee-choice:disabled {
	opacity: 0.7;
}
.schedule-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin: 18px 0;
}
.coach-exercise {
	padding: 16px 0;
	border-top: 1px solid #303a2e;
}
.coach-exercise:first-child {
	border-top: 0;
}
.coach-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin: 14px 0 24px;
}
.coach-stats div {
	display: grid;
	gap: 4px;
	padding: 14px;
	border-radius: 12px;
	background: #121a12;
}
.coach-stats strong {
	font-size: 1.5rem;
}
.coach-stats span {
	color: #a8b2a5;
	font-size: 0.85rem;
}
.trend-list {
	display: grid;
	gap: 12px;
}
.trend-row {
	display: grid;
	grid-template-columns: minmax(120px, 1fr) minmax(100px, 2fr) auto;
	align-items: center;
	gap: 12px;
}
.trend-row > div:first-child {
	display: grid;
	gap: 3px;
	min-width: 0;
	overflow-wrap: anywhere;
}
.trend-row .muted {
	font-size: 0.8rem;
}
.trend-track {
	height: 10px;
	background: #101710;
	border-radius: 10px;
	overflow: hidden;
}
.trend-track span {
	display: block;
	height: 100%;
	background: #a8d7b0;
	border-radius: inherit;
}
.coach-notice {
	color: #a8d7b0;
}
.goal-form {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 180px auto;
	align-items: end;
	gap: 12px;
	margin-bottom: 22px;
}
.note-form {
	display: grid;
	gap: 12px;
	margin: 18px 0;
}
.note-form button {
	justify-self: start;
}
.exercise-trend {
	margin-top: 22px;
}
.adherence {
	margin-top: 16px;
}
.adherence h3 {
	margin: 8px 0;
}
.adherence-meter {
	height: 10px;
	background: #101710;
	border-radius: 10px;
	overflow: hidden;
}
.adherence-meter span {
	display: block;
	height: 100%;
	background: #a8d7b0;
}
.session-progress .adherence-meter span {
	width: var(--fill, 0%);
	min-width: 0;
}
.update-item {
	display: flex;
	justify-content: space-between;
	gap: 12px;
}
.update-item.unread {
	color: #a8d7b0;
}
.coach-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.exercise-details .coach-actions {
	margin-bottom: 12px;
}
.weekly-bars {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	align-items: end;
	gap: 7px;
	height: 170px;
	margin-top: 20px;
}
.weekly-bar {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	gap: 6px;
	height: 100%;
	font-size: 0.7rem;
	color: #aeb9ad;
}
.weekly-bar > div {
	width: min(100%, 44px);
	min-height: 4px;
	background: #a8d7b0;
	border-radius: 5px 5px 0 0;
}
.measurement-form {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
	align-items: end;
	gap: 12px;
	margin-bottom: 18px;
}
.cardio-form {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	align-items: end;
	gap: 12px;
	margin: 18px 0;
}
.cardio-form button {
	justify-self: start;
}
.timer-card {
	margin-bottom: 14px;
}
.timer-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	margin-bottom: 16px;
}
.timer-display {
	font-family: "Space Grotesk", sans-serif;
	font-weight: 700;
	font-size: 2.4rem;
	color: #a8d7b0;
	line-height: 1;
	margin-top: 4px;
}
.timer-select select {
	background: #101710;
	border: 1px solid #445140;
	color: #f3f4ef;
	border-radius: 10px;
	padding: 10px;
	font-size: 0.9rem;
	cursor: pointer;
}
.timer-controls {
	display: flex;
	gap: 10px;
}
.timer-controls button {
	flex: 1;
	padding: 10px;
	font-size: 0.9rem;
}
@media (max-width: 720px) {
	.editor-row {
		grid-template-columns: 24px repeat(4, minmax(0, 1fr));
	}
	.editor-row input:first-of-type {
		grid-column: 2 / -1;
	}
	.editor-row .editor-actions {
		grid-column: 1 / -1;
		justify-content: flex-end;
	}
	.library-picker {
		flex-direction: column;
		align-items: stretch;
	}
	html {
		scroll-padding-bottom: calc(190px + env(safe-area-inset-bottom));
	}
	.log-exercise,
	.exercise-toggle,
	.quick-entry {
		scroll-margin-bottom: calc(190px + env(safe-area-inset-bottom));
	}
	.quick-entry {
		grid-template-columns: 1fr;
		gap: 15px;
	}
	.undo-toast {
		bottom: calc(82px + env(safe-area-inset-bottom));
	}
	.shell:has(.timer-card.rest-active) .undo-toast {
		bottom: calc(165px + env(safe-area-inset-bottom));
	}
	.program-form {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.weekly-bars {
		gap: 3px;
	}
	.weekly-bar span {
		font-size: 0.6rem;
		writing-mode: vertical-rl;
	}
	.measurement-form {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.goal-form {
		grid-template-columns: 1fr 1fr;
	}
	.goal-form button {
		grid-column: 1 / -1;
	}
	.coach-layout {
		grid-template-columns: 1fr;
	}
	.week-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
	.grid {
		grid-template-columns: 1fr 1fr;
	}
	.hero {
		grid-column: span 2;
	}
	.top-right span {
		display: none;
	}
}
@media (max-width: 520px) {
	.top {
		gap: 8px;
	}
	.header-logo {
		width: 143px;
		height: 65px;
	}
	.header-logo img {
		width: 264px;
		height: 264px;
		left: -55px;
		top: -94px;
	}
	.top-right {
		gap: 6px;
	}
	.top-right .ghost {
		display: inline-flex;
		align-items: center;
		padding: 8px 9px;
		font-size: 0.8rem;
		white-space: nowrap;
		text-decoration: none;
	}
	h1 {
		font-size: 2.15rem;
	}
	.auth-card {
		padding: 25px;
	}
	.swap-form {
		flex-direction: column;
		align-items: stretch;
	}
	.exercise-toggle {
		align-items: flex-start;
		padding: 16px 18px;
	}
	.exercise-thumb.log {
		width: 48px;
		height: 48px;
	}
	.image-credits ul {
		columns: 1;
	}
	.exercise-details {
		padding: 16px 18px 18px;
	}
	.cardio-form {
		grid-template-columns: 1fr;
	}
	.program-form {
		grid-template-columns: 1fr;
	}
	.card > .row,
	.exercise.row {
		flex-wrap: wrap;
	}
	.measurement-form {
		grid-template-columns: 1fr;
	}
	.goal-form {
		grid-template-columns: 1fr;
	}
	.goal-form button {
		grid-column: auto;
	}
	.nav.coach-nav {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
	.week-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.schedule-grid,
	.coach-stats {
		grid-template-columns: 1fr;
	}
	.trend-row {
		grid-template-columns: 1fr auto;
	}
	.trend-track {
		grid-column: 1 / -1;
		grid-row: 2;
	}
	.nav {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 4px;
	}
	.nav button {
		min-width: 0;
		padding: 11px 2px;
		font-size: 0.78rem;
	}
	.grid {
		grid-template-columns: 1fr;
	}
	.hero {
		grid-column: span 1;
	}
	.shell {
		padding: 16px;
	}
	.card {
		padding: 18px;
	}
	.set-row {
		grid-template-columns: 1fr 65px 65px auto;
		gap: 5px;
	}
	.set-form,
	.history-set-form {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.set-form .set-next {
		grid-column: 1 / -1;
	}
	.set-form input,
	.set-form select {
		width: 100%;
		min-height: 44px;
	}
	.editor-head {
		display: none;
	}
	.set-form button,
	.history-set-form button {
		grid-column: 1 / -1;
	}
	.quick-input button {
		grid-column: auto;
	}
	.set-row input {
		padding: 8px 5px;
	}
	.editor-row {
		grid-template-columns: 24px repeat(4, minmax(0, 1fr));
	}
	.editor-row input:first-of-type {
		grid-column: 2 / -1;
	}
	.editor-row .editor-actions {
		grid-column: 1 / -1;
	}
	.settings-form,
	.catalog-search {
		grid-template-columns: 1fr;
	}
	.hero {
		padding: 24px;
	}
	.timer-header {
		margin-bottom: 8px;
	}
	.timer-select {
		width: auto;
	}
	.timer-select select {
		width: auto;
	}
	.timer-display {
		font-size: 2rem;
	}
	.timer-controls {
		flex-wrap: wrap;
	}
	.timer-card {
		position: sticky;
		top: 8px;
		z-index: 12;
		box-shadow: 0 10px 24px #0009;
		padding: 12px 16px;
	}
	.workout-recap {
		align-items: flex-start;
		flex-direction: column;
	}
	.timer-controls button {
		flex: 1 1 calc(50% - 5px);
		min-width: 80px;
	}
}
@media (max-width: 720px) {
	.shell {
		padding-bottom: calc(90px + env(safe-area-inset-bottom));
	}
	.shell:has(.timer-card.rest-active) {
		padding-bottom: calc(195px + env(safe-area-inset-bottom));
	}
	.nav,
	.nav.coach-nav {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 40;
		display: grid;
		grid-template-columns: repeat(5, minmax(0, 1fr));
		gap: 2px;
		margin: 0;
		padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
		background: #172019;
		border-top: 1px solid #39503c;
		box-shadow: 0 -8px 24px #0008;
	}
	.nav.coach-nav {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}
	.nav button {
		min-width: 0;
		padding: 11px 2px;
		font-size: 0.74rem;
	}
	.timer-card.rest-active {
		position: fixed;
		top: auto;
		left: 12px;
		right: 12px;
		bottom: calc(70px + env(safe-area-inset-bottom));
		z-index: 35;
		display: grid;
		grid-template-columns: 1fr auto;
		align-items: center;
		gap: 8px;
		padding: 10px 14px;
		margin: 0;
		box-shadow: 0 10px 30px #000b;
	}
	.timer-header {
		margin: 0;
		gap: 8px;
	}
	.timer-display {
		font-size: 1.45rem;
	}
	.timer-select select {
		padding: 7px;
		font-size: 0.8rem;
	}
	.timer-controls {
		align-items: center;
		flex-wrap: nowrap;
	}
	.timer-controls button {
		flex: none;
		min-width: 0;
		padding: 8px 9px;
		font-size: 0.8rem;
	}
}
@media (prefers-reduced-motion: reduce) {
	.primary,
	.ghost,
	.nav button,
	.routine-picker button {
		transition: none;
	}
}
.photo-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 16px;
	margin-top: 20px;
}
.photo-card img {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	border-radius: 10px;
}
