:root {
  color-scheme: dark;
  --bg: #101214;
  --panel: #191c1e;
  --raised: #202426;
  --line: #303538;
  --line-soft: #292d30;
  --text: #f3f5f1;
  --muted: #a7aeaa;
  --subtle: #828b86;
  --accent: #c8fb65;
  --accent-ink: #172110;
  --accent-surface: #2a3820;
  --radius: 19px;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
button, input, select { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button, a { touch-action: manipulation; }
a { color: var(--accent); text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { letter-spacing: -.035em; }
svg.icon { width: 21px; height: 21px; flex: none; vertical-align: middle; }
.header { background: #141618; border-bottom: 1px solid var(--line-soft); }
.header-inner { max-width: 1240px; margin: auto; padding: 0 28px; height: 75px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 22px; }
.brand { background: none; border: 0; color: var(--text); display: inline-flex; align-items: center; justify-self: start; gap: 11px; padding: 0; font-size: 1.08rem; font-weight: 740; letter-spacing: -.025em; white-space: nowrap; }
.brand img { border-radius: 9px; }
.navigation { display: flex; align-items: center; gap: 6px; }
.nav-link { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 15px; min-height: 44px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font-size: .92rem; font-weight: 650; }
.nav-link[aria-current="page"] { background: var(--accent-surface); color: var(--accent); }
.nav-link .icon { width: 18px; height: 18px; }
.icon-button { min-width: 44px; min-height: 44px; padding: 9px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--raised); color: var(--muted); }
.icon-button[aria-expanded="true"] { color: var(--accent); background: var(--accent-surface); }
.settings-button { justify-self: end; background: transparent; }
.workspace { max-width: 1240px; padding: 32px 28px 55px; margin: 0 auto; }
.workspace:focus { outline: none; }
.access-panel { width: min(100%, 420px); margin: 7vh auto 0; }
.access-panel h1 { margin: 0 0 20px; font-size: 1.65rem; }
.access-panel form { display: grid; gap: 12px; }
.access-panel label { color: var(--muted); font-size: .9rem; }
.access-panel .set-input { text-align: left; padding-inline: 12px; }
.access-panel .button { justify-self: start; }
.page-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 21px; }
.page-top h1 { font-size: clamp(1.65rem, 4.5vw, 2.15rem); font-weight: 770; line-height: 1.06; }
.page-date { color: var(--muted); font-size: .9rem; padding-bottom: 2px; white-space: nowrap; }
.dashboard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(289px, 329px); gap: 22px; align-items: start; }
.main-column, .sidebar { min-width: 0; display: grid; gap: 21px; }
.hero { position: relative; overflow: hidden; min-height: 221px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; isolation: isolate; border: 1px solid #3b4434; border-radius: var(--radius); padding: 25px 28px; background: #20271e; }
.hero::before, .hero::after { content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none; }
.hero::before { left: 31%; background: url("/media/gym.jpg") center 57% / cover no-repeat; filter: grayscale(82%) brightness(.81); }
.hero::after { background: linear-gradient(90deg, #20271e 6%, #20271e 30%, #20271ee8 48%, #20271e24 86%), linear-gradient(0deg, #1419139c, transparent 66%); }
.hero-caption { font-size: .78rem; font-weight: 800; color: var(--accent); letter-spacing: .105em; text-transform: uppercase; }
.hero h2 { margin-top: 8px; font-size: clamp(2rem, 5.6vw, 3.15rem); font-weight: 790; line-height: 1.04; max-width: 100%; }
.hero-meta { color: #d4dcd0; font-size: .91rem; margin-top: 10px; display: flex; align-items: center; flex-wrap: wrap; gap: 5px 12px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta .icon { width: 16px; height: 16px; color: #c9d3c4; }
.hero-actions { margin-top: 20px; display: flex; gap: 9px; width: 100%; justify-content: flex-start; flex-wrap: wrap; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 10px 17px; border-radius: 10px; border: 1px solid transparent; font-size: .91rem; font-weight: 720; text-align: center; }
.button .icon { width: 18px; height: 18px; }
.primary { background: var(--accent); color: var(--accent-ink); }
.secondary { border-color: var(--line); background: var(--raised); color: var(--text); }
.ghost { color: var(--muted); background: transparent; border-color: var(--line); }
.danger { color: #f5a9a2; }
.button:disabled { opacity: .43; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 20px; min-width: 0; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.panel-title h2, .section-title h2 { font-size: 1.18rem; font-weight: 760; }
.muted { color: var(--muted); }
.cycle-grid { display: grid; gap: 7px; }
.cycle-item { width: 100%; display: grid; grid-template-columns: 35px minmax(0, 1fr) auto; align-items: center; gap: 9px; min-height: 46px; border: 1px solid transparent; border-radius: 10px; padding: 5px 7px; text-align: left; color: var(--text); background: transparent; }
.cycle-item.selected { background: #242c21; border-color: #465b37; }
.cycle-letter { width: 32px; height: 32px; display: grid; place-items: center; background: #272c2f; border-radius: 8px; font-weight: 800; color: #d2d8d2; }
.cycle-item.selected .cycle-letter { background: var(--accent); color: var(--accent-ink); }
.cycle-name { font-size: .89rem; line-height: 1.2; font-weight: 640; }
.cycle-day { color: var(--muted); font-size: .83rem; }
.cycle-item.selected .cycle-day { color: var(--accent); }
.panel-footer { border-top: 1px solid var(--line-soft); color: var(--muted); margin-top: 12px; padding-top: 13px; font-size: .87rem; line-height: 1.45; display: flex; align-items: flex-start; gap: 8px; }
.panel-footer .icon { width: 17px; height: 17px; color: var(--accent); margin-top: 1px; }
.timer-panel .panel-title { margin-bottom: 10px; }
.timer-panel .panel-title .icon { color: var(--accent); }
.timer-display { font-size: 2.55rem; line-height: 1.16; font-variant-numeric: tabular-nums; letter-spacing: -.05em; font-weight: 760; margin-bottom: 11px; }
.timer-display.finished { color: var(--accent); }
.timer-buttons { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 7px; }
.timer-buttons .button { padding-inline: 6px; font-size: .86rem; min-height: 43px; white-space: nowrap; }
.timer-panel .timer-reset { margin-top: 8px; width: 100%; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; padding: 1px 1px 10px; gap: 8px; }
.section-detail { color: var(--muted); font-size: .86rem; text-align: right; }
.exercise-list { display: grid; gap: 10px; }
.exercise-card { min-width: 0; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 13px; overflow: clip; }
.exercise-card.focused { border-color: #566c43; }
.exercise-card.complete { border-color: #394d34; }
.exercise-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; align-items: center; padding: 9px 14px 9px 11px; }
.exercise-toggle { width: 100%; min-height: 49px; background: transparent; color: var(--text); border: 0; border-radius: 8px; padding: 0; text-align: left; display: grid; grid-template-columns: 43px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.exercise-tile { background: #282f25; color: var(--accent); width: 43px; height: 43px; border-radius: 9px; display: grid; place-items: center; }
.exercise-tile .icon { width: 20px; height: 20px; }
.exercise-name { display: block; font-size: .98rem; letter-spacing: -.015em; font-weight: 710; line-height: 1.22; }
.exercise-muscle { display: block; color: var(--muted); font-size: .83rem; margin-top: 4px; line-height: 1.25; }
.set-target { white-space: nowrap; color: var(--muted); font-size: .9rem; font-weight: 640; font-variant-numeric: tabular-nums; }
.set-target .icon, .set-target.done { color: var(--accent); }
.tech-button { border: 0; background: transparent; }
.tech-button .icon { width: 19px; height: 19px; }
.exercise-body { border-top: 1px solid var(--line-soft); padding: 13px 14px 15px; }
.exercise-body > p { font-size: .9rem; line-height: 1.4; color: var(--muted); }
.exercise-body .previous { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px; margin-bottom: 13px; }
.previous strong { color: var(--text); font-weight: 650; }
.set-grid { display: grid; gap: 7px; }
.set-line { display: grid; grid-template-columns: 26px minmax(0, 1fr) minmax(0, 1fr) 48px; align-items: center; gap: 7px; }
.set-head { color: var(--muted); font-size: .82rem; margin-bottom: 2px; }
.set-number { text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 650; font-size: .92rem; }
.set-fields { display: grid; grid-template-columns: minmax(0, 1fr) 43px; gap: 5px; }
.set-input { width: 100%; height: 48px; text-align: center; background: #141719; border: 1px solid #3b4142; border-radius: 9px; padding: 7px 4px; color: var(--text); font-size: 1rem; font-variant-numeric: tabular-nums; }
.set-input::placeholder { color: #737c78; opacity: 1; }
.set-input[aria-invalid="true"] { border-color: #e7938a; }
.set-fields .icon-button { min-width: 42px; min-height: 48px; padding: 0; }
.set-confirm { width: 48px; height: 48px; background: #252e24; color: var(--accent); border-color: #495947; }
.set-confirm.saved { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.set-confirm .icon { width: 21px; height: 21px; }
.exercise-footer, .button-row { margin-top: 13px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.exercise-footer .button { padding-inline: 11px; font-size: .86rem; min-height: 44px; }
.add-set { background: transparent; color: var(--muted); }
.exercise-footnote { margin-top: 10px; }
.exercise-footnote.accent { color: var(--accent); }
.progress-track { margin-top: 12px; height: 4px; width: min(100%, 300px); background: #83947952; border-radius: 8px; overflow: hidden; }
.progress-track span { display: block; height: 100%; background: var(--accent); }
.next-status { color: #d7e6ce; margin-top: 12px; font-size: .9rem; }
.timer-float { display: none; }
.switch-line { width: 100%; display: flex; align-items: center; gap: 14px; padding: 0; color: var(--text); background: transparent; border: 0; text-align: left; min-height: 44px; }
.switch-line > span:first-child { flex: 1; }
.switch-line strong { font-weight: 710; display: block; }
.switch-line small { color: var(--muted); font-size: .87rem; line-height: 1.4; display: block; margin-top: 5px; }
.switch { width: 38px; height: 22px; border: 1px solid #525c55; background: #353d37; border-radius: 99px; position: relative; flex: none; }
.switch::after { position: absolute; content: ""; width: 14px; height: 14px; border-radius: 50%; background: #d1d9cf; top: 3px; left: 3px; }
[aria-pressed="true"] .switch { background: var(--accent-surface); border-color: #627d43; }
[aria-pressed="true"] .switch::after { left: 19px; background: var(--accent); }
.tabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; margin-bottom: 18px; }
.tabs button { width: 100%; min-height: 46px; padding: 6px; background: var(--raised); border: 1px solid var(--line); color: var(--muted); border-radius: 10px; font-weight: 780; }
.tabs button[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.program-intro { display: grid; gap: 5px; margin-bottom: 15px; }
.program-intro h2 { font-size: 1.45rem; }
.program-intro p, .panel-copy { color: var(--muted); line-height: 1.5; font-size: .94rem; }
.workout-notes { padding-left: 20px; color: var(--muted); margin: 0; line-height: 1.48; }
.workout-notes li + li { margin-top: 8px; }
.empty { padding: 32px 22px; min-height: 180px; display: grid; justify-items: start; align-content: center; gap: 9px; }
.empty .icon { color: var(--accent); }
.empty h2 { font-size: 1.2rem; }
.empty .button { margin-top: 7px; }
.history { display: grid; gap: 10px; }
.history details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: clip; }
.history summary { cursor: pointer; min-height: 65px; padding: 11px 15px; list-style: none; display: grid; align-items: center; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 11px; }
.history summary::-webkit-details-marker { display: none; }
.history summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: 0 4px 4px; }
.history [open] summary::after { transform: rotate(225deg); margin-bottom: -4px; }
.history-label { font-weight: 730; }
.history-label small { display: block; margin-top: 4px; color: var(--muted); font-size: .83rem; font-weight: 500; }
.history-results { border-top: 1px solid var(--line-soft); margin: 0; padding: 3px 15px 13px; }
.history-results div { border-bottom: 1px solid var(--line-soft); padding: 10px 0; }
.history-results div:last-child { border-bottom: 0; padding-bottom: 0; }
.history-results dt, .history-results dd { font-size: .91rem; line-height: 1.4; }
.history-results dd { color: var(--muted); margin: 3px 0 0; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { border-radius: 10px; background: #222629; padding: 12px 10px; }
.stat strong { display: block; font-size: 1.48rem; line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat span { display: block; font-size: .83rem; color: var(--muted); margin-top: 5px; }
dialog { border: 1px solid var(--line); border-radius: 18px; padding: 0; background: var(--panel); color: var(--text); width: min(520px, calc(100% - 26px)); max-height: min(86dvh, 760px); overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 24px 90px #000b; }
dialog::backdrop { background: #080a0bcc; backdrop-filter: blur(4px); }
.dialog-inner { padding: 19px; }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 13px; }
.dialog-head h2 { font-size: 1.45rem; line-height: 1.12; }
.dialog-head .icon-button { flex: none; align-self: flex-start; }
.dialog-tag { color: var(--accent); font-size: .83rem; font-weight: 670; margin-bottom: 6px; }
.dialog-inner > p, .dialog-inner > ol { color: var(--muted); line-height: 1.48; }
.tech-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tech-photos figure { margin: 0; min-width: 0; }
.tech-photos img { width: 100%; max-height: 145px; aspect-ratio: 4 / 3; object-fit: contain; background: #eeede9; display: block; border-radius: 9px; }
.tech-photos figcaption { font-size: .85rem; color: var(--muted); margin-top: 5px; }
.tech-tips { padding-left: 21px; margin: 14px 0; }
.tech-tips li + li { margin-top: 7px; }
.dialog-inner .tech-credit { font-size: .79rem; margin-top: 12px; }
.dialog-inner .video-note { font-size: .87rem; margin-top: 10px; }
.dialog-separator { border-top: 1px solid var(--line); margin-top: 15px; padding-top: 15px; }
.dialog-separator h3 { font-size: 1.04rem; margin-bottom: 7px; }
.dialog-separator p { color: var(--muted); line-height: 1.45; font-size: .93rem; }
.toast { position: fixed; z-index: 4; max-width: min(410px, calc(100% - 30px)); right: max(18px, env(safe-area-inset-right)); bottom: 23px; background: #303a29; color: var(--text); border: 1px solid #536748; padding: 11px 14px; border-radius: 11px; font-size: .9rem; box-shadow: 0 12px 26px #0008; }
.toast:empty { display: none; }
@media (hover: hover) {
  .nav-link:hover, .icon-button:hover, .ghost:hover, .secondary:hover { color: var(--text); background: #303733; }
  .cycle-item:hover, .exercise-toggle:hover { background: #272e29; }
  .primary:hover { background: #d7ff8b; }
  a:hover { text-decoration: underline; }
  a.button:hover { text-decoration: none; }
}
@media (max-width: 820px) {
  .header-inner { padding-inline: 19px; }
  .workspace { padding-inline: 19px; }
  .dashboard { grid-template-columns: minmax(0, 1fr) minmax(235px, 265px); gap: 14px; }
  .main-column, .sidebar { gap: 15px; }
  .panel { padding: 15px; }
  .hero { padding-inline: 19px; }
}
@media (max-width: 690px) {
  .header-inner { min-height: 59px; height: auto; grid-template-columns: 1fr auto; padding: max(8px, env(safe-area-inset-top)) 15px 7px; }
  .brand img { width: 32px; height: 32px; }
  .settings-button { border-color: transparent; }
  .navigation { position: fixed; z-index: 3; bottom: 0; left: 0; right: 0; background: #151819; border-top: 1px solid #363a3b; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 5px max(7px, env(safe-area-inset-right)) max(5px, env(safe-area-inset-bottom)) max(7px, env(safe-area-inset-left)); }
  .nav-link { flex-direction: column; min-height: 51px; padding: 5px 4px; gap: 4px; font-size: .79rem; }
  .nav-link .icon { width: 19px; height: 19px; }
  .workspace { padding: 17px 14px calc(84px + env(safe-area-inset-bottom)); }
  .page-top { margin-bottom: 14px; }
  .page-date { font-size: .8rem; }
  .dashboard { grid-template-columns: 1fr; gap: 17px; }
  .main-column { gap: 17px; }
  .hero { min-height: 186px; padding: 16px; border-radius: 15px; }
  .hero::before { left: 13%; background-position: 57% 55%; }
  .hero::after { background: linear-gradient(90deg, #20271e 5%, #20271eef 37%, #20271e38 100%), linear-gradient(0deg, #141913a9, transparent); }
  .hero h2 { font-size: clamp(1.85rem, 8.2vw, 2.7rem); }
  .hero-meta { margin-top: 7px; gap: 5px 9px; font-size: .84rem; }
  .hero-actions { margin-top: 14px; }
  .hero-actions .button { min-height: 46px; }
  .hero-actions .primary { flex: 1 1 auto; }
  .exercise-row { padding: 6px 6px 6px 8px; gap: 3px; }
  .exercise-toggle { grid-template-columns: 37px minmax(0, 1fr) auto; min-height: 49px; gap: 8px; }
  .exercise-tile { width: 37px; height: 38px; }
  .exercise-tile .icon { width: 18px; height: 18px; }
  .exercise-name { font-size: .94rem; }
  .exercise-muscle { font-size: .81rem; }
  .set-target { font-size: .82rem; }
  .section-detail { font-size: .8rem; }
  .exercise-body { padding-inline: 10px; }
  .panel { border-radius: 15px; }
  .timer-float { position: fixed; z-index: 3; bottom: calc(66px + env(safe-area-inset-bottom)); right: 13px; border: 1px solid #78954d; border-radius: 99px; padding: 5px; background: #26321e; color: var(--accent); box-shadow: 0 8px 19px #0009; display: flex; align-items: center; }
  .timer-float button { display: flex; align-items: center; justify-content: center; min-height: 44px; border: 0; padding: 5px 10px; gap: 7px; border-radius: 99px; background: transparent; color: currentColor; font-weight: 760; font-variant-numeric: tabular-nums; }
  .timer-float button:nth-child(2) { padding-inline: 9px; }
  .timer-float .icon { width: 17px; height: 17px; }
  .toast { bottom: calc(69px + env(safe-area-inset-bottom)); right: auto; left: 14px; max-width: calc(100% - 28px); }
  dialog { max-height: 88dvh; margin: auto auto max(0px, env(safe-area-inset-bottom)); border-radius: 17px 17px 0 0; width: 100%; max-width: 560px; }
}
@media (max-width: 360px) {
  .exercise-name { font-size: .89rem; }
  .exercise-toggle { gap: 6px; }
  .set-fields { grid-template-columns: minmax(0,1fr) 37px; gap: 3px; }
  .set-fields .icon-button { min-width: 37px; }
  .set-line { gap: 5px; }
}
.exercise-card { scroll-margin-top: 12px; }
.animation { margin: 13px 0 0; color: var(--muted); font-size: .87rem; }
.animation img { display: block; margin: 0 auto; width: 100%; max-height: 235px; object-fit: contain; background: #101214; border-radius: 10px; }
