:root {
  --bg: #f5f6f2;
  --paper: #fff;
  --ink: #20251f;
  --muted: #626b5d;
  --line: #e2e5dc;
  --accent: #d3ef79;
  --accent-ink: #354315;
  --danger: #b33c38;
  --radius: 16px;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  font-size: 16px;
  line-height: 1.5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  border: 0;
  background: none;
  color: inherit;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #6b8d2e;
  outline-offset: 3px;
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #789b36;
  outline-offset: 1px;
}
svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.055em;
}
h2 {
  font-size: 1.2rem;
  letter-spacing: -0.025em;
  font-weight: 650;
}
h3 {
  font-size: 1rem;
  font-weight: 650;
}
.shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 232px;
  flex-shrink: 0;
  background: #22281f;
  color: #f5f6f2;
  padding: 36px 24px;
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
}
.brand {
  font-weight: 800;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  letter-spacing: -0.07em;
}
.brand-mark {
  background: var(--accent);
  color: #20251f;
  width: 37px;
  height: 37px;
  border-radius: 10px;
  text-align: center;
  line-height: 32px;
  font-size: 2rem;
}
.brand-caption {
  width: 100%;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: #9da596;
  padding: 4px 0 0 47px;
  font-weight: 500;
}
.sidebar nav {
  margin-top: 60px;
  display: grid;
  gap: 8px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 17px;
  border-radius: 9px;
  color: #abb3a4;
  font-size: 0.95rem;
}
.nav-item.active {
  background: #343d2b;
  color: var(--accent);
}
.sidebar-bottom {
  margin-top: auto;
  padding: 28px 12px 0;
  color: #a7af9f;
  font-size: 0.9rem;
}
.sidebar-bottom strong {
  color: #e5e9df;
  font-weight: 500;
}
.version {
  display: block;
  margin-top: 32px;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: #828d79;
}
.workspace {
  margin-left: 232px;
  width: calc(100% - 232px);
}
.topbar {
  height: 88px;
  border-bottom: 1px solid var(--line);
  margin: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar-label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--muted);
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}
.sync-status {
  font-size: 0.75rem;
  color: var(--muted);
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e7eadf;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid #d8dece;
}
.mobile-brand {
  display: none;
}
main {
  max-width: 1240px;
  margin: auto;
  padding: 43px 48px 70px;
  animation: arrive 0.25s ease-out;
}
.eyebrow {
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}
.subtitle {
  color: var(--muted);
  margin-top: 11px;
  font-size: 0.95rem;
}
.date-chip {
  font-size: 0.8rem;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  white-space: nowrap;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(250px, 1fr);
  gap: 28px;
}
.start-card {
  background: #262d23;
  color: #fff;
  border-radius: 18px;
  padding: 30px;
  position: relative;
  overflow: hidden;
  min-height: 244px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.start-card .eyebrow {
  color: #bbc4b2;
}
.start-card h2 {
  font-size: 1.9rem;
  letter-spacing: -0.045em;
  max-width: 280px;
  line-height: 1.15;
  z-index: 1;
}
.start-card p {
  color: #b6c0ae;
  font-size: 0.9rem;
  margin-top: 12px;
  max-width: 65%;
  z-index: 1;
}
.start-card .btn {
  margin-top: 25px;
  z-index: 1;
}
.weight-art {
  position: absolute;
  right: -12px;
  top: 28px;
  width: 205px;
  height: 205px;
  transform: rotate(-25deg);
  color: #d3ef79;
  opacity: 0.75;
  stroke-width: 1.2;
}
.btn {
  min-height: 46px;
  padding: 11px 18px;
  border-radius: 9px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition:
    background 0.15s,
    transform 0.15s;
}
.btn:active,
.icon-btn:active {
  transform: scale(0.97);
}
.btn.primary {
  background: var(--accent);
  color: #26331a;
}
.btn.dark {
  background: var(--ink);
  color: #fff;
}
.btn.secondary {
  background: var(--paper);
  border-color: var(--line);
}
.btn.ghost {
  color: var(--muted);
  padding-left: 9px;
  padding-right: 9px;
}
.btn.danger {
  color: var(--danger);
  background: #fbeeed;
}
.btn.full {
  width: 100%;
}
.icon-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: var(--muted);
  flex-shrink: 0;
}
.icon-btn:hover {
  background: #eef0e8;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 29px 0 15px;
}
.section-heading .text-btn {
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
}
.section-heading svg {
  width: 18px;
}
.week-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  background: var(--paper);
}
.week-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.week-count {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.05em;
  margin-top: 17px;
}
.week-count span {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0;
}
.week-days {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  gap: 5px;
}
.day {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.7rem;
  color: var(--muted);
  gap: 9px;
}
.day-circle {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f1f3ec;
  font-size: 0.75rem;
}
.day.today .day-circle {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}
.day.done .day-circle {
  background: var(--accent);
  color: var(--accent-ink);
}
.day svg {
  width: 17px;
}
.routine-list {
  border-top: 1px solid var(--line);
}
.routine-row {
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 19px 0;
}
.routine-symbol {
  background: #e9ede2;
  border-radius: 11px;
  width: 51px;
  height: 51px;
  display: grid;
  place-items: center;
  color: #596b44;
  flex-shrink: 0;
}
.routine-symbol svg {
  width: 25px;
  height: 25px;
}
.routine-info {
  flex: 1;
  min-width: 0;
}
.meta {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 5px;
}
.routine-row .start-small {
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  background: white;
}
.start-small svg {
  width: 18px;
}
.tag {
  font-size: 0.7rem;
  color: #54633e;
  background: #edf2e5;
  padding: 4px 8px;
  border-radius: 5px;
}
.note-card {
  padding: 23px 0;
  border-top: 1px solid var(--line);
  margin-top: 26px;
}
.note-card p {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 10px;
}
.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.mini-stat strong {
  font-size: 1.65rem;
  letter-spacing: -0.04em;
  font-weight: 600;
  display: block;
}
.mini-stat span {
  font-size: 0.75rem;
  color: var(--muted);
}
.empty-state {
  padding: 36px 20px;
  text-align: center;
  border: 1px dashed #d6dccd;
  border-radius: 12px;
}
.empty-state svg {
  width: 33px;
  height: 33px;
  color: #89977b;
  margin-bottom: 12px;
}
.empty-state p {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 10px auto 18px;
  max-width: 350px;
}
.history-row {
  padding: 19px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
}
.history-date {
  background: #e9ede2;
  border-radius: 9px;
  width: 53px;
  flex-shrink: 0;
  text-align: center;
  padding: 7px 0;
  font-size: 0.7rem;
  color: #59634e;
}
.history-date strong {
  display: block;
  font-size: 1.3rem;
  line-height: 1.1;
  color: var(--ink);
}
.history-row .history-info {
  flex: 1;
}
.history-row > svg {
  color: var(--muted);
  width: 17px;
}
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
}
.tabs {
  display: flex;
  gap: 6px;
  background: #e9ece2;
  padding: 4px;
  border-radius: 9px;
  margin-bottom: 24px;
  max-width: max-content;
}
.tabs button {
  min-height: 39px;
  padding: 7px 17px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}
.tabs button.active {
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 4px #20251f0d;
}
.exercise-list {
  display: grid;
  gap: 0;
}
.exercise-choice {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  text-align: left;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  min-height: 74px;
}
.exercise-choice .routine-info {
  pointer-events: none;
}
.exercise-choice .tag {
  margin-left: auto;
}
.search {
  position: relative;
  margin: 16px 0;
}
.search input {
  padding-left: 43px;
}
.search svg {
  position: absolute;
  left: 13px;
  top: 13px;
  width: 20px;
  color: var(--muted);
}
input:not([type="checkbox"]),
select,
textarea {
  width: 100%;
  border: 1px solid #dce0d5;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  padding: 11px 12px;
  min-height: 46px;
}
textarea {
  resize: vertical;
  min-height: 85px;
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2373796f' stroke-width='1.7'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 20px;
  background-position: right 10px center;
  padding-right: 35px;
}
label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin: 15px 0 7px;
}
.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.8rem;
}
.bottom-nav {
  display: none;
}
dialog {
  border: 0;
  border-radius: 20px;
  padding: 0;
  width: min(560px, calc(100% - 32px));
  max-height: 88dvh;
  color: var(--ink);
  background: var(--bg);
  box-shadow: 0 22px 90px #141c2440;
}
dialog::backdrop {
  background: #151b2359;
  backdrop-filter: blur(3px);
}
#modal-content {
  padding: 26px;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.modal-head h2 {
  font-size: 1.4rem;
}
.modal-head .icon-btn {
  margin: -8px -10px -8px 0;
}
.modal-scroll {
  max-height: 52dvh;
  overflow: auto;
}
.error {
  font-size: 0.85rem;
  color: var(--danger);
  margin-top: 12px;
}
.info-box {
  font-size: 0.85rem;
  background: #eaf0de;
  color: #4b5a38;
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 18px;
}
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.profile-card {
  margin-bottom: 22px;
}
.profile-card h2 {
  margin-bottom: 12px;
}
.setting-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 17px 0;
}
.setting-row select {
  width: 125px;
}
.profile-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.profile-identity .avatar {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
}
.workout-heading {
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 5;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.workout-heading h1 {
  font-size: 1.65rem;
}
.workout-clock {
  color: var(--muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  margin-top: 5px;
}
.workout-exercise {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 13px;
  margin-bottom: 18px;
  padding: 19px;
}
.exercise-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}
.exercise-head h2 {
  font-size: 1rem;
}
.set-grid {
  display: grid;
  grid-template-columns:
    32px minmax(55px, 1fr) minmax(55px, 1fr) minmax(55px, 1fr)
    44px;
  gap: 9px;
  align-items: center;
}
.set-labels {
  font-size: 0.7rem;
  color: var(--muted);
  text-align: center;
  margin: 8px 0;
}
.set-row {
  text-align: center;
  padding: 5px 0;
  border-radius: 7px;
  transition: background 0.18s;
}
.set-row.completed {
  background: #edf5df;
}
.set-row input {
  min-height: 44px !important;
  padding: 8px 4px !important;
  text-align: center;
  font-weight: 600;
  background: #f4f5f1 !important;
  border-color: transparent !important;
  font-variant-numeric: tabular-nums;
}
.set-row.completed input {
  background: #e3edcf !important;
}
.set-number {
  font-size: 0.8rem;
  color: var(--muted);
}
.previous {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}
.check-set {
  background: #e9ece3;
  border-radius: 7px;
  min-height: 44px;
  display: grid;
  place-items: center;
}
.check-set.checked {
  background: var(--accent);
  color: #344a15;
}
.check-set svg {
  width: 20px;
}
.set-add {
  width: 100%;
  font-size: 0.8rem;
  color: #667754;
  background: #f2f5ec;
  min-height: 39px;
  border-radius: 7px;
  margin-top: 13px;
}
.workout-note {
  font-size: 0.85rem !important;
  min-height: 40px !important;
  margin-bottom: 10px;
}
.rest-timer {
  position: fixed;
  bottom: 24px;
  left: calc(50% + 116px);
  transform: translateX(-50%);
  background: #263321;
  color: #fff;
  border: 1px solid #556747;
  border-radius: 12px;
  padding: 11px 15px;
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 20;
  box-shadow: 0 8px 25px #0002;
  min-width: 330px;
}
.rest-timer strong {
  font-variant-numeric: tabular-nums;
  font-size: 1.2rem;
}
.rest-timer .icon-btn {
  color: white;
}
.rest-timer .timer-label {
  font-size: 0.75rem;
  color: #c0cdb7;
}
.rest-timer button {
  font-size: 0.8rem;
  min-height: 44px;
}
.rest-timer[hidden],
.toast[hidden] {
  display: none;
}
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  z-index: 100;
  font-size: 0.88rem;
  max-width: calc(100% - 32px);
  box-shadow: 0 6px 30px #0002;
}
.chart {
  width: 100%;
  height: 210px;
  overflow: visible;
}
.chart text {
  font-size: 12px;
  fill: var(--muted);
  stroke: none;
}
.chart line {
  stroke: var(--line);
  stroke-width: 1;
}
.chart path {
  stroke: #719139;
  stroke-width: 2.5;
  fill: none;
}
.chart circle {
  fill: #719139;
  stroke: white;
  stroke-width: 2;
}
.chart-panel {
  margin-top: 24px;
}
.chart-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
.detail-exercise {
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.detail-exercise p {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 6px;
}
.inline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.loading {
  padding: 70px;
  text-align: center;
  color: var(--muted);
}
.auth-switch {
  text-align: center;
  font-size: 0.85rem;
  margin-top: 20px;
}
.auth-switch button {
  text-decoration: underline;
}
.routine-editor-item {
  display: flex;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--line);
  padding: 11px 0;
}
.routine-editor-item strong {
  flex: 1;
  font-size: 0.88rem;
}
.routine-editor-item input {
  width: 64px;
  min-height: 40px;
  font-size: 0.85rem;
}
.offline-banner {
  border: 1px solid #d6d9cc;
  border-radius: 8px;
  padding: 12px 15px;
  font-size: 0.85rem;
  margin-bottom: 20px;
}
.progress-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 10px 0 3px;
}
.progress-stat strong {
  font-size: 2.5rem;
  letter-spacing: -0.05em;
  font-weight: 600;
}
.progress-stat span {
  color: var(--muted);
}
.history-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}
.history-toolbar input {
  max-width: 300px;
}
.notification {
  margin-bottom: 24px;
}
.workout-toolbar {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}
.workout-toolbar .btn:first-child {
  flex: 1;
}
.install-panel {
  border: 1px solid var(--line);
  padding: 20px;
  border-radius: 12px;
  margin-top: 22px;
}
.install-panel p {
  margin: 9px 0 15px;
  font-size: 0.85rem;
  color: var(--muted);
}
.save-indicator {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 18px;
}
.routine-bottom {
  display: flex;
  justify-content: space-between;
  padding: 10px 0 0;
}
.routine-bottom .btn {
  font-size: 0.8rem;
}
.account-note {
  max-width: 450px;
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.85rem;
  margin-top: 15px;
}
.checkbox-row input {
  width: 18px;
  height: 18px;
}
.text-danger {
  color: var(--danger);
}
.remove-set {
  min-height: 38px;
  font-size: 0.75rem;
  color: var(--muted);
}
@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width: 1440px) {
  main {
    padding-top: 52px;
  }
  .dashboard-grid {
    gap: 40px;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 194px;
    padding: 30px 18px;
  }
  .workspace {
    margin-left: 194px;
    width: calc(100% - 194px);
  }
  main {
    padding: 32px 28px 65px;
  }
  .topbar {
    margin: 0 28px;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
  }
  .note-card {
    margin: 0;
  }
  .rest-timer {
    left: calc(50% + 97px);
  }
}
@media (max-width: 760px) {
  .sidebar {
    display: none;
  }
  .workspace {
    margin-left: 0;
    width: 100%;
  }
  .topbar {
    height: 72px;
    margin: 0 22px;
  }
  .topbar-label {
    display: none;
  }
  .mobile-brand {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.09em;
  }
  .mobile-brand span {
    color: #83a148;
  }
  .topbar-actions {
    gap: 13px;
  }
  .sync-status {
    font-size: 0.7rem;
  }
  .avatar {
    width: 35px;
    height: 35px;
  }
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fcfdf9f5;
    border-top: 1px solid var(--line);
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    z-index: 30;
    backdrop-filter: blur(16px);
    justify-content: space-around;
  }
  .bottom-nav .nav-item {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
    padding: 5px 7px;
    color: #66705f;
    font-size: 0.65rem;
    border-radius: 8px;
  }
  .bottom-nav .nav-item.active {
    color: #344a1d;
    background: none;
  }
  .bottom-nav .nav-item.active svg {
    color: #527528;
    fill: #d3ef7940;
  }
  .bottom-nav .nav-item svg {
    width: 23px;
    height: 23px;
  }
  main {
    padding: 29px 22px 110px;
  }
  .page-heading {
    margin-bottom: 25px;
    align-items: start;
  }
  h1 {
    font-size: 2.2rem;
  }
  .date-chip {
    display: none;
  }
  .eyebrow {
    font-size: 0.68rem;
    margin-bottom: 10px;
  }
  .subtitle {
    font-size: 0.85rem;
  }
  .start-card {
    padding: 25px;
    min-height: 234px;
  }
  .start-card h2 {
    font-size: 1.75rem;
    max-width: 230px;
  }
  .weight-art {
    width: 170px;
    height: 170px;
    right: -25px;
    top: 45px;
    opacity: 0.6;
  }
  .start-card p {
    max-width: 72%;
    font-size: 0.83rem;
  }
  .start-card .btn {
    margin-top: 23px;
  }
  .dashboard-grid {
    gap: 26px;
  }
  .dashboard-side {
    display: block;
  }
  .week-card {
    padding: 21px;
  }
  .week-days {
    margin-top: 20px;
  }
  .week-count {
    margin-top: 10px;
  }
  .note-card {
    margin-top: 23px;
  }
  .routine-row {
    padding: 17px 0;
    gap: 12px;
  }
  .routine-symbol {
    width: 45px;
    height: 45px;
  }
  .routine-row h3 {
    font-size: 0.93rem;
  }
  .routine-row .meta {
    font-size: 0.73rem;
  }
  .routine-row > .icon-btn {
    width: 32px;
  }
  .section-heading {
    margin-top: 25px;
  }
  .mini-stats {
    padding: 15px 0;
  }
  .mini-stat strong {
    font-size: 1.5rem;
  }
  .profile-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .profile-card {
    padding: 21px;
  }
  .rest-timer {
    left: 16px;
    right: 16px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    transform: none;
    min-width: 0;
    padding: 8px 12px;
    justify-content: space-between;
    gap: 10px;
  }
  .toast {
    bottom: calc(88px + env(safe-area-inset-bottom));
    width: max-content;
    max-width: calc(100% - 32px);
  }
  dialog {
    width: 100%;
    max-width: 100%;
    max-height: 93dvh;
    border-radius: 22px 22px 0 0;
    margin: auto 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  #modal-content {
    padding: 22px;
  }
  .modal-scroll {
    max-height: 50dvh;
  }
  .workout-heading {
    padding: 12px 0;
    top: 0;
  }
  .workout-heading h1 {
    font-size: 1.4rem;
  }
  .workout-heading .btn {
    padding: 10px 14px;
  }
  .workout-exercise {
    padding: 15px 12px;
    margin-bottom: 16px;
  }
  .set-grid {
    gap: 6px;
    grid-template-columns:
      26px minmax(48px, 1fr) minmax(48px, 1fr) minmax(48px, 1fr)
      42px;
  }
  .previous {
    font-size: 0.68rem;
  }
  .panel {
    padding: 20px;
  }
  .field-row {
    gap: 10px;
  }
  .tabs button {
    padding: 7px 14px;
  }
  .week-header h2 {
    font-size: 1rem;
  }
  .history-toolbar {
    flex-wrap: wrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 360px) {
  main {
    padding-left: 15px;
    padding-right: 15px;
  }
  .start-card {
    padding: 21px;
  }
  .set-grid {
    gap: 4px;
  }
  .routine-symbol {
    display: none;
  }
}
dialog[open],
.page-heading,
.dashboard-grid,
.workout-heading {
  animation: arrive 0.22s ease-out;
}
@media (prefers-reduced-motion: reduce) {
  dialog[open],
  .page-heading,
  .dashboard-grid,
  .workout-heading {
    animation: none;
  }
}

/* Readable labels on small screens, without relying on zoom. */
.meta,
.small,
.section-heading .text-btn,
.set-labels,
.setting-row label {
  font-size: 0.875rem;
}
.sync-status,
.eyebrow,
.day,
.bottom-nav .nav-item {
  font-size: 0.75rem;
}
.subtitle {
  font-size: 0.95rem;
}
@media (max-width: 760px) {
  .routine-row .meta {
    font-size: 0.8125rem;
  }
  .previous {
    font-size: 0.75rem;
  }
  .sync-status {
    font-size: 0.75rem;
  }
  .bottom-nav .nav-item {
    font-size: 0.75rem;
  }
}
