.workout-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 8px; }
.workout-nav .button { padding-inline: 6px; }
.workout-nav > :last-child:nth-child(odd) { grid-column: 1 / -1; }
.library-tools { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin:0 0 16px; }
.library-tools label { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:13px; }
.library-tools select { min-height:44px; max-width:100%; padding:8px; border:1px solid var(--line); border-radius:9px; background:var(--panel); color:var(--ink); }
.library-tools h1 { margin:0; flex:1; }
.plan-editor .day-summary { display:none; }
.plan-editor .day-template-heading { margin-top:0; }
.session-choices { display:flex; flex-wrap:wrap; align-items:flex-start; gap:8px 16px; margin-top:10px; }
.session-choices > .button { padding-inline:14px; min-height:44px; font-size:13px; color:var(--muted); }
.restart-choice { max-width:430px; font-size:13px; color:var(--muted); }
.restart-choice summary { min-height:44px; display:flex; align-items:center; cursor:pointer; text-decoration:underline; text-underline-offset:3px; }
.restart-choice p { margin:0 0 10px; line-height:1.5; }
.today-previous { flex-wrap:wrap; }
.today-previous > .session-choices { flex-basis:100%; margin-top:0; }
.sound-volume-setting { display:grid; grid-template-columns:1fr auto; gap:10px; margin:16px 0; }
.sound-volume-setting label { grid-column:1 / -1; display:flex; justify-content:space-between; }
.sound-volume-setting input { width:100%; min-width:0; accent-color:var(--accent); }
.sound-volume-setting small { grid-column:1 / -1; color:var(--muted); }
.workout-nav [aria-current="page"] { color: var(--accent); border-color: #769434; background: #b8f23816; }
.mode-switch {
  display: inline-flex;
  flex-shrink: 0;
  gap: 3px;
  margin-inline-start: auto;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #111619;
}
.mode-switch button {
  min-height: 44px;
  padding-inline: 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.mode-switch button:hover { color: var(--ink); background: #ffffff0a; }
.mode-switch button[aria-pressed="true"] { color: #172706; background: var(--accent); }
.day-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 20px;
  border: 1px solid #52673a;
  border-radius: 13px;
  background: linear-gradient(140deg, #202a1e, #151a1c 75%);
}
.day-summary h2 { margin: 3px 0; font-size: clamp(21px, 4vw, 29px); }
.day-summary h2::first-letter { text-transform: uppercase; }
.day-summary p, .day-note { color: var(--muted); font-size: 13px; }
.day-note { margin: 8px 0 0; }
.day-template-heading { margin-top:18px; }
.time-note { display:block; color:var(--muted); font-size:12px; line-height:1.5; }
.easier-tip { padding:10px 12px; border-left:2px solid var(--accent); background:#b8f23809; line-height:1.6; }
.easier-tip b { display:block; color:var(--accent); margin-bottom:4px; }
.day-template-heading h3 { font-size:19px; }
.day-template-heading .day-note { margin-top:5px; line-height:1.5; }
.day-list h3 small { font-size:12px; font-weight:400; }
.day-library-card > .day-order { padding:4px 7px; border-top:1px solid var(--line); gap:2px; }
.day-order > span { color:var(--muted); font-size:12px; white-space:nowrap; }
.day-order > div { display:flex; gap:2px; }
.day-order .icon-button { width:44px; min-width:44px; height:44px; font-size:20px; }
.day-order .icon-button:disabled { opacity:.3; }
.undo-notice { position:fixed; right:20px; bottom:20px; z-index:100; display:flex; align-items:center; gap:10px; width:min(580px,calc(100vw - 40px)); padding:12px; border:1px solid #658331; border-radius:12px; background:#1d2819; box-shadow:0 8px 24px #0005; }
.undo-notice[hidden] { display:none; }
.undo-notice > span { flex:1; min-width:0; }
.undo-notice strong { display:block; font-size:13px; overflow-wrap:anywhere; }
.undo-notice small { display:block; color:var(--muted); margin-top:3px; font-size:11px; }
.undo-notice .button { min-height:44px; padding-inline:10px; color:var(--accent); }
.undo-notice .icon-button { flex:0 0 32px; min-height:44px; width:32px; }
.undo-inline { position:static; width:100%; margin-bottom:10px; box-shadow:none; }
body:has(dialog[open]) > #undo-remove { display:none; }
.has-day-undo .main { padding-bottom:170px; }
.has-day-undo .toast { bottom:170px; }
@media(max-width:700px) {
 #undo-remove { right:10px; width:calc(100vw - 20px); bottom:calc(76px + env(safe-area-inset-bottom)); gap:6px; padding:9px; }
 .has-day-undo .main { padding-bottom:210px; }
 .has-day-undo .toast { bottom:220px; }
}
.day-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.day-tools .button, .day-edit { min-height: 44px; }
.day-tools .button { color: var(--accent); border-color: #587236; }
.day-library-card > .day-dose { display: block; padding: 10px; border-top: 1px solid var(--line); }
.day-dose-fields { display: flex; flex-wrap: wrap; gap: 8px; }
.day-dose-fields label { display: flex; flex: 1 1 56px; min-width: 0; flex-direction: column; gap: 4px; color: var(--muted); font-size: 12px; }
.day-dose-fields input, .day-dose-fields select { width: 100%; min-width: 0; min-height: 44px; padding: 7px 9px; font: inherit; font-size: 16px; color: var(--ink); background: #0f1416; border: 1px solid #414940; border-radius: 7px; }
.day-dose-fields [aria-invalid=true] { border-color: #ebaa91; }
.day-dose-status { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.day-dose-status.saved { color: var(--accent); }
.day-dose-status.error { color: #f1bba5; }
.day-dose-recovery { display: flex; flex-wrap: wrap; gap: 3px 10px; margin-top: 4px; }
.day-dose-recovery .text-button { min-height: 36px; text-align: left; font-size: 12px; }
.day-list { margin: 18px 0; }
.day-list > h3 { margin-bottom: 10px; }
.day-list > .section-heading { margin-bottom: 10px; }
#library-grid .day-edit { align-self: start; margin: 10px 14px; }
.day-catalog { margin-bottom: 22px; scroll-margin-top: 12px; }
.day-catalog .section-heading { margin-top: 0; }
.day-catalog-filters, .day-catalog-modes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.day-catalog-filters { margin: 10px 0; }
.day-catalog-modes [aria-pressed="true"] { color: var(--accent); border-color: #769434; background: #b8f23816; }
.day-catalog-filters input { min-width: 0; flex: 1 1 160px; }
.day-catalog-filters input, .day-catalog-filters select { min-height: 44px; max-width: 100%; }
.day-library { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 10px; }
.day-library-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #151a1c; }
.day-library-card .exercise-art { display: block; width: 100%; margin: 0; border-radius: 0; }
.day-library-card .exercise-art > img { aspect-ratio: 1.5; }
.day-library-card > div { display: flex; align-items: center; justify-content: space-between; gap: 5px; padding: 7px; }
.day-library-card h3 { font-size: 13px; overflow-wrap: anywhere; }
.day-library-card p { margin-top: 3px; color: var(--muted); font-size: 11px; }
.day-edit-compact { flex: 0 0 44px; width: 44px; padding: 0; font-size: 24px; color: var(--accent); }
.day-edit-compact[data-day-added="false"] { border-color: #6e8d43; background: #263422; }
.day-advanced { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 12px; }
.image-day-action { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; color: var(--muted); }
#today-view, #guided-view { max-width: 790px; }
.today-heading, .guided-heading, .guided-position {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.today-heading, .guided-heading { margin-bottom: 14px; }
.today-heading h1, .guided-heading h1 { margin: 3px 0 0; }
.today-heading .button, .guided-heading .button { flex-shrink: 0; }
.today-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #14191b;
}
.today-featured { border-color: #52673a; background: linear-gradient(145deg, #202b20, #151a1c 80%); }
.today-card h2 { margin: 3px 0 7px; font-size: clamp(22px, 4vw, 30px); }
.today-card h3 { margin: 4px 0; }
.today-card p, .today-card small, .guided-position span, .guided-count { color: var(--muted); }
.today-card .flow-meta { display: flex; align-items: center; gap: 7px; }
.flow-meta .icon, .guided-meta .icon { color: var(--accent); width: 17px; height: 17px; }
.today-card .today-next { margin-top: 14px; color: var(--ink); }
.today-anatomy { position: absolute; pointer-events: none; right: 25px; bottom: 16px; width: 110px; height: 165px; color: #b8f238; opacity: .15; }
.today-featured > :not(svg) { position: relative; }
.today-previous { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.flow-progress { display: block; width: 100%; height: 9px; margin: 6px 0 3px; border: 0; border-radius: 6px; background: #32392f; accent-color: var(--accent); }
.flow-progress::-webkit-progress-bar { border-radius: 6px; background: #32392f; }
.flow-progress::-webkit-progress-value { border-radius: 6px; background: var(--accent); }
.flow-progress::-moz-progress-bar { border-radius: 6px; background: var(--accent); }
.flow-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.flow-primary { min-height: 48px; }
.flow-offline { color: #f3d0b4; border-left: 3px solid #8d6243; padding: 8px 11px; margin: 0 0 12px; background: #392c23; border-radius: 7px; }
.guided-heading h1 { font-size: clamp(19px, 4vw, 27px); }
.guided-position h2 { font-size: clamp(20px, 4vw, 26px); margin: 0; }
.guided-position span { flex-shrink: 0; font-size: 13px; }
.guided-count { display: block; margin-bottom: 9px; }
.guided-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 16px; padding: 10px 14px; border-block: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.guided-meta strong { color: var(--accent); }
#guided-view .exercise-art > img { aspect-ratio: 2; }
#guided-timer-slot .timer, #stretch-timer-slot .timer { position: static; transform: none; width: 100%; margin: 0 0 12px; box-shadow: none; }
#stretch-timer-slot .timer { margin-top: 12px; }
.timer-note { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 8px; }
.timer-head > button { min-width: 44px; min-height: 44px; }
.timer-body > button { min-width: 44px; min-height: 44px; }
.timer-body > button[data-timer-toggle] { width: auto; font-size: 14px; flex-shrink: 0; }
.interface-sound-setting { display: grid; grid-template-columns: 24px 1fr; align-items: center; gap: 12px; min-height: 44px; margin: 16px 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.interface-sound-setting input { width: 20px; height: 20px; accent-color: var(--accent); }
.interface-sound-setting strong, .interface-sound-setting small { display: block; }
.interface-sound-setting small { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.guided-actions { margin: 10px 0 16px; }
.guided-dock { position: fixed; bottom: 16px; z-index: 50; display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: #182019; border: 1px solid #607b3d; border-radius: 14px; box-shadow: 0 6px 28px #0007; }
.guided-dock > p { flex: 1; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.guided-dock :is(#guided-timer-slot, #stretch-timer-slot) { flex: 1; min-width: 0; }
.guided-dock:has(.timer:not([hidden])) > p, .guided-dock:not(:has(.timer:not([hidden]))) :is(#guided-timer-slot, #stretch-timer-slot) { display: none; }
.guided-dock .timer { padding: 0; margin: 0!important; border: 0; background: none; box-shadow: none; }
.guided-dock .timer-head { margin-bottom: 4px; }
.guided-dock .timer-body { flex-wrap: wrap; }
.guided-dock .timer-body > strong { font-size: 30px; }
.guided-dock .timer-note { font-size: 11px; margin-top: 4px; }
.guided-dock :is(.guided-actions, .stretch-step-actions) { display: flex; flex: 0 1 235px; flex-direction: column; align-items: stretch; gap: 8px; margin: 0; }
.guided-dock :is(.guided-actions, .stretch-step-actions) > button { min-height: 48px; white-space: normal; }
body.has-guided-dock #guided-view { padding-bottom: calc(var(--guided-dock-height, 160px) + 24px); }
body.has-guided-dock #toast { bottom: calc(var(--guided-dock-height, 160px) + 32px); }
body.has-stretch-dock #stretch-guided { padding-bottom: calc(var(--stretch-dock-height, 160px) + 24px); }
body.has-stretch-dock #toast { bottom: calc(var(--stretch-dock-height, 160px) + 32px); }
.flow-finished > .icon { width: 34px; height: 34px; color: var(--accent); }
@media (max-width: 1000px) {
  .mobile-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); padding-inline: 5px; }
  .mobile-nav > button { padding-inline: 0; }
}
@media (max-width: 700px) {
  .app-header { flex-wrap: wrap; }
  .app-header > .mode-switch { order: 1; }
  .day-summary { flex-wrap: wrap; padding: 13px; }
  .day-summary .flow-primary { width: 100%; }
  .day-tools .button { flex: 1 1 auto; padding-inline: 8px; font-size: 13px; }
  .day-library { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .day-catalog-filters input { font-size: 16px; }
  .today-card { padding: 16px; }
  .today-heading > .button, .guided-heading > .button { padding-inline: 8px; font-size: 12px; }
  .today-previous { align-items: stretch; flex-direction: column; gap: 10px; }
  .flow-actions .flow-primary { width: 100%; }
  .guided-actions > .button { min-height: 46px; }
  .guided-heading { margin-bottom: 10px; }
  #guided-view .exercise-art > img { aspect-ratio: 1.75; }
}
@media (max-width: 370px) {
  .mobile-nav > button > span { font-size: 10px; }
  .today-anatomy { right: 10px; width: 85px; }
  .guided-position span { font-size: 12px; }
}
.finish-choice { margin-top: 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); }
.finish-choice summary { cursor: pointer; min-height: 32px; align-content: center; color: var(--text); }
.finish-choice p { font-size: 13px; line-height: 1.6; margin: 10px 0; }
.flow-save-note { color: var(--muted); font-size: 12px; margin: 0 0 10px; }
.flow-warmup { margin:12px 0; padding:10px 12px; border:1px solid var(--line); border-radius:10px; font-size:13px; }
.flow-warmup summary { cursor:pointer; min-height:28px; align-content:center; }
.flow-warmup p { line-height:1.6; color:var(--muted); }
.stretch-result { width:100%; padding:14px 0; }
.stretch-result p { margin:6px 0; font-size:13px; }
.update-notice { display:flex; align-items:center; flex-wrap:wrap; gap:10px; padding:12px 14px; border:1px solid #658331; border-radius:12px; margin-bottom:16px; background:#161e11; }
.update-notice[hidden] { display:none; }
.update-notice > span { flex:1; min-width:180px; }
.update-notice small { display:block; margin-top:4px; color:var(--muted); }
.has-update { position:relative; }
.has-update::after { content:''; position:absolute; top:6px; right:6px; width:7px; height:7px; background:var(--accent); border-radius:50%; }
@media(max-width:700px) {
 .header-actions .profile-button { display:flex; width:44px; min-width:44px; min-height:44px; padding:5px; justify-content:center; }
 .header-actions .profile-button > span:not(.profile-avatar),.header-actions .profile-button > b { display:none; }
 .finish-choice .button { width:100%; white-space:normal; }
 .guided-actions .flow-primary { white-space:normal; }
 .app-header { position:relative; }
}
