:root {
  color-scheme: light;
  --paper: #f4f5f8;
  --surface: #ffffff;
  --surface-alt: #f0f3f8;
  --ink: #18243b;
  --muted: #596980;
  --line: #e0e5ef;
  --blue: #3456ce;
  --blue-soft: #edf1ff;
  --teal: #216f65;
  --teal-soft: #eaf4f0;
  --orange: #9b5029;
  --orange-soft: #f9eee7;
  --hero: #e7edff;
  --hero-ink: #203c91;
  --hero-secondary: #3e5488;
  --hero-art: #b3c2ef;
  --radius: 16px;
  --font: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --utility: "SFMono-Regular", Consolas, monospace;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #111722;
  --surface: #192130;
  --surface-alt: #202b3c;
  --ink: #e9edf7;
  --muted: #a4b0c5;
  --line: #303c50;
  --blue: #a0b4ff;
  --blue-soft: #283759;
  --teal: #8bd1bf;
  --teal-soft: #203b36;
  --orange: #e9ad86;
  --orange-soft: #3c2e2a;
  --hero: #21325b;
  --hero-ink: #e6ecff;
  --hero-secondary: #bac9ef;
  --hero-art: #415887;
}
* { box-sizing: border-box; }
html { scrollbar-color: var(--line) var(--paper); scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.7 var(--font); -webkit-font-smoothing: antialiased; }
::selection { background: var(--blue); color: var(--surface); }
button, a, input { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; color: inherit; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; text-underline-offset: 4px; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.page-shell { max-width: 1392px; margin: auto; padding: 0 60px; }
.skip-link { position: absolute; top: -80px; background: var(--ink); color: var(--paper); padding: 10px 20px; z-index: 10; }
.skip-link:focus { top: 8px; }
.topbar { height: 108px; display: flex; align-items: center; justify-content: space-between; gap: 28px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 13px; flex: none; }
.brand img { width: 44px; height: 44px; }
.brand span { display: flex; flex-direction: column; }
.brand strong { font-size: 21px; letter-spacing: .04em; font-weight: 700; }
.brand small { font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.main-nav { display: flex; gap: 8px; padding: 5px; background: var(--surface-alt); border-radius: 12px; }
.nav-button { border: 0; background: transparent; border-radius: 8px; padding: 10px 20px; font-size: 14px; color: var(--muted); transition: color .2s, background .2s; }
.nav-button:hover { color: var(--ink); }
.nav-button.active { background: var(--surface); color: var(--blue); font-weight: 650; }
.header-tools { display: flex; align-items: center; gap: 23px; }
.connection { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.connection.connected .status-dot { background: var(--teal); }
.connection.offline .status-dot { background: var(--orange); }
.theme-toggle { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); transition: color .2s, background .2s; }
.theme-toggle:hover { background: var(--blue-soft); color: var(--blue); }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .theme-sun { display: none; }
[data-theme="dark"] .theme-toggle .theme-moon { display: none; }
[data-theme="dark"] .theme-toggle .theme-sun { display: block; }
main { padding: 38px 0 0; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 27px; }
.page-heading h1 { font-size: 25px; font-weight: 600; letter-spacing: -.025em; line-height: 1.5; margin: 0; text-wrap: balance; }
.date-display { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; }
.icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; flex-shrink: 0; }
.icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.layout { display: grid; grid-template-columns: minmax(0,1fr) 336px; gap: 28px; align-items: start; }
.main-column, .side-column { display: flex; flex-direction: column; gap: 24px; }
.hero { position: relative; overflow: hidden; background: var(--hero); color: var(--hero-ink); min-height: 264px; border-radius: var(--radius); display: flex; justify-content: space-between; padding: 35px 38px; gap: 12px; }
.hero.pull { --hero: var(--teal-soft); --hero-ink: var(--teal); --hero-secondary: var(--teal); --hero-art: #a4cfc2; }
.hero.legs { --hero: var(--orange-soft); --hero-ink: var(--orange); --hero-secondary: var(--orange); --hero-art: #dfbaa0; }
.hero.rest { --hero: var(--teal-soft); --hero-ink: var(--teal); --hero-secondary: var(--teal); --hero-art: #a4cfc2; }
[data-theme="dark"] .hero.pull, [data-theme="dark"] .hero.rest { --hero-art: #395e56; }
[data-theme="dark"] .hero.legs { --hero-art: #695044; }
.hero-copy { position: relative; z-index: 1; }
.hero h2 { font-size: clamp(36px,3.5vw,52px); font-weight: 650; letter-spacing: -.035em; line-height: 1.3; margin: 0 0 11px; text-wrap: balance; }
.hero-kicker { font-size: 13px; font-weight: 600; letter-spacing: .06em; margin-bottom: 7px; color: var(--hero-secondary); }
.hero-description { font-size: 13px; color: var(--hero-secondary); margin: 0; max-width: 365px; line-height: 1.9; }
.hero-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; margin-top: 27px; font-size: 12px; color: var(--hero-secondary); }
.hero-meta>span { display: flex; gap: 7px; align-items: center; }
.hero-meta strong { font-variant-numeric: tabular-nums; color: var(--hero-ink); font-weight: 700; }
.hero-meta .icon { width: 17px; height: 17px; }
.hero-art { position: absolute; right: 28px; bottom: 29px; text-align: right; color: var(--hero-art); pointer-events: none; }
.hero-art>span { display: block; font: 750 clamp(62px,6.7vw,92px)/1 system-ui,sans-serif; letter-spacing: -.04em; }
.split-signature { display: flex; justify-content: flex-end; gap: 7px; margin-top: 16px; }
.split-signature i { font-size: 11px; line-height: 22px; font-style: normal; text-align: center; width: 28px; border-top: 2px solid currentColor; }
.split-signature .current { color: var(--hero-secondary); }
.soft-note { font-size: 11px; color: var(--muted); padding: 0 3px; margin-top: -10px; }
.paper-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.week-card { padding: 23px 22px; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card-top h2, .card-top h3 { font-size: 15px; font-weight: 650; margin: 0; }
.week-info { font: 11px/1.5 var(--utility); color: var(--muted); margin-top: 5px; font-variant-numeric: tabular-nums; }
.week-controls { display: flex; align-items: center; gap: 2px; }
.icon-button { width: 32px; height: 36px; border: 0; border-radius: 8px; background: transparent; display: grid; place-items: center; color: var(--muted); }
.icon-button:hover, .text-button:hover { background: var(--blue-soft); color: var(--blue); }
.text-button { font-size: 12px; color: var(--blue); background: none; border: 0; border-radius: 7px; min-height: 36px; padding: 5px 8px; }
.week-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 5px; margin-top: 23px; }
.day-tile { min-width: 0; min-height: 100px; border: 1px solid transparent; border-radius: 9px; background: transparent; padding: 10px 1px 9px; display: flex; flex-direction: column; align-items: center; position: relative; transition: background .2s, border-color .2s; }
.day-tile:hover { background: var(--surface-alt); }
.day-tile .weekday { font-size: 11px; color: var(--muted); }
.day-tile .day-number { font: 550 22px/1.3 var(--utility); margin: 8px 0; color: var(--ink); font-variant-numeric: tabular-nums; }
.day-tile .day-kind { font-size: 11px; line-height: 1.4; color: var(--blue); }
.day-tile.pull .day-kind { color: var(--teal); }
.day-tile.legs .day-kind { color: var(--orange); }
.day-tile.rest .day-kind { color: var(--muted); }
.day-tile.selected { border-color: var(--blue); background: var(--blue-soft); }
.day-tile.is-today:after { content: ""; position: absolute; top: 5px; right: 5px; width: 4px; height: 4px; border-radius: 50%; background: var(--blue); }
.week-legend { display: flex; justify-content: space-between; align-items: center; padding-top: 17px; margin-top: 17px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.legend-item { display: flex; align-items: center; gap: 5px; }
.legend-dot { width: 4px; height: 4px; background: var(--blue); border-radius: 50%; }
.workout-panel { overflow: hidden; }
.workout-heading { padding: 27px 28px 22px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.workout-heading h2 { font-size: 20px; margin: 0 0 5px; font-weight: 650; letter-spacing: -.02em; }
.workout-heading p { font-size: 12px; color: var(--muted); margin: 0; }
.workout-count { font: 11px var(--utility); color: var(--muted); white-space: nowrap; }
.exercise-head, .exercise-row { display: grid; grid-template-columns: 30px minmax(0,1fr) 125px 112px; gap: 16px; margin: 0 28px; }
.exercise-head { padding: 12px 0; color: var(--muted); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 11px; }
.exercise-head span:nth-last-child(-n+2) { text-align: right; }
.exercise-row { align-items: start; padding: 25px 0; border-bottom: 1px solid var(--line); }
.exercise-row:last-child { border-bottom: 0; }
.exercise-order { font: 12px var(--utility); color: var(--muted); padding-top: 5px; }
.exercise-name { font-size: 16px; line-height: 1.5; margin: 0; font-weight: 650; }
.exercise-purpose { color: var(--muted); font-size: 12px; line-height: 1.8; margin: 6px 0 0; max-width: 65ch; }
.exercise-data { text-align: right; line-height: 1.4; padding-top: 1px; }
.exercise-data .dose { font: 600 23px/1.2 var(--utility); letter-spacing: -.035em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.exercise-data .dose small { font-size: 12px; color: var(--muted); font-weight: 400; letter-spacing: 0; margin: 0 4px; }
.exercise-data .caption { font-size: 11px; color: var(--muted); margin-top: 8px; }
.exercise-rest { font-size: 13px; text-align: right; line-height: 1.8; padding-top: 3px; color: var(--muted); }
.exercise-rest.long { font-size: 11px; }
.tutorial { display: inline-flex; align-items: center; gap: 5px; color: var(--blue); font-size: 11px; min-height: 28px; line-height: 1.8; margin-top: 5px; }
.tutorial:hover { text-decoration: underline; }
.tutorial .icon { width: 12px; height: 12px; }
.routine { padding: 23px; }
.routine-line { display: flex; gap: 12px; align-items: flex-start; }
.routine-line+.routine-line { margin-top: 21px; padding-top: 21px; border-top: 1px solid var(--line); }
.routine-icon { width: 22px; height: 22px; color: var(--blue); display: grid; place-items: center; flex: none; margin-top: 1px; }
.routine-line:last-child .routine-icon { color: var(--teal); }
.routine-label { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; line-height: 1.4; margin: 1px 0 9px; }
.routine-minutes { font: 11px var(--utility); color: var(--muted); white-space: nowrap; }
.routine-copy { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.9; }
.tips-card { padding: 23px; background: transparent; border-color: transparent; border-radius: 0; }
.tips-card h3 { font-size: 16px; margin: 0 0 12px; }
.tips-card p { font-size: 12px; color: var(--muted); line-height: 1.95; margin: 0; }
.tip-divider { margin: 18px 0; border: 0; border-top: 1px solid var(--line); }
.scheme-card { padding: 20px 23px; border-top: 1px solid var(--line); }
.scheme-card p { font-size: 12px; color: var(--muted); margin: 7px 0 0; }
.scheme-card strong { font-size: 13px; font-weight: 600; }
.scheme-card .sub { font-size: 11px; margin-top: 13px; color: var(--muted); }
.notes { padding: 0 27px; background: transparent; border: 0; }
.notes details { padding: 20px 0; border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-size: 13px; font-weight: 550; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
summary::-webkit-details-marker { display: none; }
summary .icon { width: 16px; height: 16px; color: var(--muted); transition: transform .2s; }
details[open] summary .icon { transform: rotate(180deg); }
.note-content { color: var(--muted); font-size: 13px; line-height: 1.95; padding-top: 8px; max-width: 75ch; }
.note-content p { margin: 10px 0 0; }
.note-content ol { padding-left: 20px; margin: 7px 0; }
.note-content li { padding: 5px 0; }
.source-link { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--blue); margin-top: 15px; }
.plan-tabs { display: flex; gap: 8px; margin-bottom: 0; }
.plan-tab { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 12px 23px; font-size: 14px; display: flex; align-items: center; gap: 10px; }
.plan-tab:hover { border-color: var(--blue); }
.plan-tab.active { background: var(--blue-soft); color: var(--blue); border-color: var(--blue); }
.plan-tab .tab-code { font-size: 11px; }
.rest-content { padding: 32px; }
.rest-content h2 { font-size: 22px; margin: 0 0 12px; }
.rest-content p { color: var(--muted); font-size: 13px; line-height: 1.9; margin: 0; }
.recovery-options { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 28px; }
.recovery-option { padding: 0; }
.recovery-option .icon { color: var(--teal); }
.recovery-option strong { display: block; font-size: 14px; margin: 9px 0 5px; }
.recovery-option span { color: var(--muted); font-size: 12px; }
.next-workout { margin-top: 27px; padding-top: 23px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.next-workout p { font-size: 12px; }
.next-workout strong { font-size: 14px; }
.next-button { border: 1px solid var(--line); border-radius: 9px; background: var(--surface); padding: 11px 15px; color: var(--blue); font-size: 12px; white-space: nowrap; }
.next-button:hover { background: var(--blue-soft); }
.footer { display: flex; justify-content: space-between; gap: 16px; padding: 30px 0 34px; color: var(--muted); font-size: 11px; }
.loading-state { min-height: 480px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.loading-state h1 { font-size: 25px; margin: 22px 0 7px; }
.loading-state p { font-size: 13px; color: var(--muted); }
.loading-mark { height: 26px; width: 26px; border: 2px solid var(--line); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
.error-state { padding: 70px 20px; text-align: center; }
.error-state h1 { font-size: 23px; }
.error-state p { color: var(--muted); font-size: 13px; }
.error-state button { margin-top: 10px; }
.preview-banner { font-size: 12px; padding: 8px 15px; background: var(--blue-soft); border-radius: 9px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.preview-banner button { flex-shrink: 0; }
.mobile-week { display: none; }
.desktop-week { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
@media(min-width:1120px) { .side-column { position: sticky; top: 24px; } }
@media(max-width:1180px) {
  .page-shell { padding: 0 32px; }
  .layout { grid-template-columns: minmax(0,1fr) 310px; gap: 22px; }
  .hero { padding: 32px 28px; }
  .hero-art { right: 20px; }
  .hero-art>span { font-size: 65px; }
  .hero-description { max-width: 260px; }
  .exercise-head, .exercise-row { grid-template-columns: 22px minmax(0,1fr) 110px 88px; gap: 10px; margin: 0 23px; }
  .exercise-name { font-size: 15px; }
  .exercise-data .dose { font-size: 21px; }
}
@media(max-width:900px) {
  .layout { grid-template-columns: minmax(0,1fr); }
  .side-column { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
  .scheme-card { grid-column: 1/-1; }
  .hero-description { max-width: 365px; }
  .hero-art>span { font-size: 90px; }
  .hero-art { right: 36px; }
  .mobile-week { display: block; }
  .desktop-week { display: none; }
  .week-grid { gap: 12px; }
  .day-tile { min-height: 100px; }
  .exercise-head, .exercise-row { grid-template-columns: 30px minmax(0,1fr) 125px 112px; gap: 16px; margin: 0 28px; }
  .exercise-name { font-size: 16px; }
  .header-tools { gap: 14px; }
  .topbar { gap: 18px; }
}
@media(max-width:620px) {
  .page-shell { padding: 0 20px; }
  .topbar { height: 118px; align-items: flex-start; padding-top: 20px; position: relative; gap: 10px; }
  .brand { gap: 10px; }
  .brand img { width: 38px; height: 38px; }
  .brand strong { font-size: 18px; }
  .brand small { font-size: 10px; }
  .header-tools { margin-left: auto; gap: 10px; }
  .connection { font-size: 11px; }
  .theme-toggle { width: 40px; height: 40px; border-radius: 10px; }
  .main-nav { position: absolute; bottom: 12px; left: 0; padding: 0; background: none; gap: 24px; }
  .nav-button { padding: 8px 0; font-size: 13px; border-radius: 0; }
  .nav-button.active { background: transparent; }
  .nav-button.active::after { content: ""; display: block; height: 2px; background: var(--blue); margin-top: 6px; }
  main { padding-top: 25px; }
  .page-heading { display: block; margin-bottom: 20px; }
  .page-heading h1 { font-size: 21px; }
  .date-display { font-size: 11px; margin-top: 7px; }
  .date-display .icon { width: 15px; height: 15px; }
  .main-column { gap: 20px; }
  .layout { gap: 20px; }
  .hero { padding: 26px 23px; min-height: 252px; }
  .hero h2 { font-size: 36px; letter-spacing: -.035em; margin-bottom: 10px; }
  .hero-kicker { font-size: 12px; margin-bottom: 8px; }
  .hero-description { font-size: 12px; max-width: 245px; }
  .hero-meta { margin-top: 27px; gap: 18px; font-size: 11px; }
  .hero-art { right: 18px; bottom: 22px; }
  .hero-art>span { font-size: 48px; }
  .split-signature { display: none; }
  .hero-copy { width: 100%; }
  .soft-note { font-size: 11px; line-height: 1.8; margin-top: -7px; }
  .workout-heading { padding: 23px 20px 18px; }
  .workout-heading h2 { font-size: 18px; }
  .workout-heading p { font-size: 11px; }
  .workout-count { display: none; }
  .exercise-head { display: none; }
  .exercise-row { margin: 0 20px; padding: 23px 0; grid-template-columns: 22px minmax(0,1fr) 99px; column-gap: 9px; row-gap: 11px; }
  .exercise-row:first-child { border-top: 1px solid var(--line); }
  .exercise-order { font-size: 11px; padding-top: 4px; }
  .exercise-name { font-size: 15px; }
  .exercise-purpose { font-size: 11px; margin-top: 5px; }
  .exercise-data .dose { font-size: 21px; }
  .exercise-data .dose small { font-size: 11px; margin: 0 2px; }
  .exercise-data .caption { font-size: 11px; margin-top: 7px; }
  .exercise-rest { grid-column: 2/4; text-align: left; font-size: 11px; padding: 0; display: flex; gap: 7px; align-items: baseline; }
  .exercise-rest::before { content: "组间休息"; flex: none; }
  .exercise-rest.long { font-size: 11px; }
  .tutorial { font-size: 11px; min-height: 32px; margin-top: 4px; }
  .week-card { padding: 20px 17px; }
  .card-top h2 { font-size: 14px; }
  .week-info { font-size: 10px; }
  .week-controls { gap: 0; }
  .icon-button { width: 32px; min-height: 38px; }
  .text-button { padding: 5px 7px; min-height: 38px; }
  .week-grid { gap: 4px; margin-top: 17px; }
  .day-tile { padding: 9px 0; min-height: 96px; }
  .day-tile .weekday, .day-tile .day-kind { font-size: 11px; }
  .day-tile .day-number { font-size: 21px; }
  .week-legend { font-size: 10px; margin-top: 13px; padding-top: 14px; }
  .side-column { display: flex; gap: 18px; position: static; }
  .routine { padding: 23px 20px; }
  .tips-card { padding: 15px 20px; }
  .scheme-card { padding: 20px; }
  .notes { padding: 0 8px; }
  .note-content { font-size: 12px; }
  .footer { font-size: 11px; padding-top: 26px; flex-direction: column; gap: 5px; }
  .plan-tabs { gap: 8px; }
  .plan-tab { flex: 1; justify-content: center; padding: 11px 9px; font-size: 13px; gap: 6px; }
  .plan-tab .tab-code { font-size: 10px; }
  .rest-content { padding: 25px 21px; }
  .rest-content h2 { font-size: 20px; }
  .recovery-options { gap: 18px; }
  .recovery-option strong { font-size: 13px; }
  .recovery-option span { font-size: 12px; }
  .next-workout { gap: 10px; align-items: flex-start; }
  .next-workout p { font-size: 11px; }
  .next-workout strong { font-size: 13px; }
  .next-button { padding: 9px 11px; font-size: 11px; }
  .preview-banner { font-size: 11px; padding: 8px 12px; }
}
@media(max-width:360px) {
  .page-shell { padding: 0 14px; }
  .brand small { display: none; }
  .connection { font-size: 10px; gap: 5px; }
  .header-tools { gap: 8px; }
  .hero { padding: 25px 21px; }
  .hero h2 { font-size: 32px; }
  .hero-art>span { font-size: 39px; }
  .exercise-row { margin: 0 17px; grid-template-columns: 18px minmax(0,1fr) 92px; gap: 9px 7px; }
  .exercise-name { font-size: 14px; }
  .exercise-data .dose { font-size: 20px; }
  .week-card { padding: 19px 13px; }
  .card-top h2 { font-size: 13px; }
  .week-grid { gap: 2px; }
}
@media(prefers-reduced-motion:reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
