:root {
  color-scheme: light;
  --canvas: #f3f6fb;
  --paper: #fff;
  --ink: #132438;
  --muted: #52657b;
  --line: #d9e3ee;
  --blue: #1b58c7;
  --blue-hover: #1548a6;
  --blue-bg: #e9f2ff;
  --teal: #117a71;
  --night: #111c2d;
  --shadow: 0 4px 18px #182e4d0b;
  --nav-height: 68px;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  background: var(--canvas);
  color: var(--ink);
}
* { box-sizing: border-box; }
body, h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #458cf1; outline-offset: 3px; }
:is(input, select, textarea):focus { outline: none; box-shadow: none; --control-border: var(--blue); }
.symbols { position: absolute; height: 0; width: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar, .wrap, .bottom-nav > div { width: min(calc(100% - 36px), 960px); margin: auto; }
.topbar { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand, .admin-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 750; }
.brand { font-size: 1.2rem; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #87f2d6; background: var(--night); }
.admin-link { min-height: 38px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); font-size: .875rem; }
.admin-link:hover, .text-link:hover { color: var(--blue); }
.admin-link .icon { width: 17px; height: 17px; }
.wrap { padding-block: 28px 44px; }
.authenticated .wrap { padding-bottom: calc(98px + env(safe-area-inset-bottom, 0px)); }
.bottom-nav { position: fixed; z-index: 5; inset: auto 0 0; padding-bottom: env(safe-area-inset-bottom); background: var(--paper); border-top: 1px solid var(--line); }
.bottom-nav > div { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; height: calc(var(--nav-height) - 1px); padding: 6px 0; }
.bottom-nav a { display: grid; place-items: center; align-content: center; gap: 4px; min-height: 48px; font-size: .875rem; color: var(--muted); border-radius: 11px; }
.bottom-nav a .icon { width: 21px; height: 21px; }
.bottom-nav a:hover { color: var(--blue); }
.bottom-nav a[aria-current="page"] { color: var(--blue); background: var(--blue-bg); font-weight: 750; }
.page-heading { margin-bottom: 20px; }
.page-heading h1 { font-size: clamp(1.95rem, 6.8vw, 2.85rem); font-weight: 750; line-height: 1.2; letter-spacing: -.025em; overflow-wrap: anywhere; }
.page-heading > p:not(.eyebrow), .heading-action > div > p { color: var(--muted); line-height: 1.5; margin-top: 6px; }
.eyebrow { color: var(--teal); font-size: .875rem; font-weight: 800; letter-spacing: .07em; margin-bottom: 6px; }
.heading-action { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }
h2 { font-size: 1.125rem; }
.surface, .settings-panel { background: var(--paper); border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow); }
.body-card { padding: clamp(12px, 2.4vw, 24px); border: 1px solid #2b4558; border-radius: 24px; background: radial-gradient(ellipse at 50% 4%, #233e50, transparent 58%), #0f1b2a; color: #eff9ff; box-shadow: 0 14px 35px #14294021; }
.body-card-top, .body-card-title, .body-atlas-link { display: flex; align-items: center; gap: 8px; }
.body-card-top { justify-content: space-between; }
.body-card-title h2 { font-size: clamp(1.12rem, 4.8vw, 1.38rem); letter-spacing: -.02em; }
.body-card-icon { display: grid; place-items: center; flex: none; width: 35px; height: 35px; border: 1px solid #56b69c45; border-radius: 10px; background: #193b3b; color: #a6f1d8; }
.body-card-icon .icon { width: 19px; height: 19px; }
.body-atlas-link { min-height: 44px; flex: none; gap: 4px; padding: 0 9px; border: 1px solid #a6f1d84d; border-radius: 10px; color: #b7f5e2; background: #a6f1d811; font-size: .875rem; font-weight: 700; }
.body-atlas-link:hover { background: #a6f1d825; }
.body-atlas-link .icon { width: 15px; height: 15px; }
.muscle-atlas { max-width: 800px; }
.muscle-atlas-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.muscle-atlas-image { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(7px, 1.4vw, 13px); margin-top: 13px; }
.anatomy-figure {
  display: grid;
  justify-items: center;
  align-content: start;
  min-width: 0;
  padding: 10px 3px 9px;
  border: 1px solid #42617070;
  border-radius: 15px;
  background: radial-gradient(ellipse at 50% 44%, #29605e50, transparent 69%), repeating-linear-gradient(0deg, #89b2c51b 0 1px, transparent 1px 24px), #132737;
}
.anatomy-figure figcaption { margin-bottom: 4px; padding: 3px 10px; border-radius: 7px; background: #203947; color: #daebf5; font-size: .8125rem; font-weight: 650; }
.anatomy { display: block; width: min(100%, 223px); height: auto; aspect-ratio: 164 / 294; overflow: visible; }
.body-base { stroke: #567287; stroke-width: .8; }
.body-base .body-muted { fill: #3b5b6e; }
.muscle { stroke: #102532; stroke-width: 1.35; stroke-linejoin: round; cursor: pointer; }
.muscle:hover, .muscle:focus-visible { fill: #b2ffe7; stroke: #dcfff2; stroke-width: 1.6; filter: drop-shadow(0 0 4px #83e8c87a); }
.muscle:focus-visible { outline: none; }
.muscle .muscle-lines { fill: none; stroke: #133c44; stroke-width: .95; stroke-linecap: round; opacity: .55; pointer-events: none; }
.muscle .muscle-hit-area { fill: transparent; stroke: none; pointer-events: all; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 23px 0 11px; }
.section-heading > a, .text-link { display: inline-flex; align-items: center; color: var(--blue); gap: 3px; font-size: .875rem; font-weight: 700; }
.section-heading h2 small { margin-left: 4px; color: var(--muted); font-size: .875rem; font-weight: 500; }
.section-heading > a .icon { width: 15px; height: 15px; }
.part-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.part-tile { display: flex; gap: 8px; align-items: center; min-height: 67px; min-width: 0; padding: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 13px; }
.part-tile:hover, .action-row:hover { background: #f2f7ff; }
.tile-icon { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 9px; background: #e6f5f3; color: #147e74; }
.part-tile strong, .part-tile small { display: block; }
.part-tile small { color: var(--muted); font-size: .875rem; }
.part-tile > .icon { margin-left: auto; width: 16px; color: var(--muted); }
.library-filters, .settings-panel, .plan-editor, .plan-card, .calendar-card { padding: 16px; }
.search-bar { display: flex; align-items: stretch; gap: 8px; }
.search-field { display: flex; align-items: center; flex: 1; min-width: 0; gap: 8px; background: var(--canvas); border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; color: var(--muted); }
.search-field input { background: none; border: 0; width: 100%; min-width: 0; min-height: 42px; padding: 4px 0; color: var(--ink); }
.search-field:focus-within { border-color: var(--blue); }
.scene-switch { display: flex; margin: 12px 0; border: 0; padding: 0; gap: 5px; }
.scene-switch legend { color: var(--muted); font-size: .875rem; padding: 0; margin-bottom: 6px; }
.scene-switch label { position: relative; cursor: pointer; flex: 1; text-align: center; min-width: 0; }
.scene-switch input { position: absolute; opacity: 0; margin: 0; width: 1px; height: 1px; }
.scene-switch span { display: grid; place-items: center; min-height: 43px; border: 1px solid transparent; border-radius: 9px; background: #edf2f8; color: var(--ink); font-size: .925rem; font-weight: 650; }
.scene-switch input:checked + span { color: white; background: var(--blue); }
.scene-switch input:focus-visible + span { border-color: var(--blue); }
.scene-switch input:checked:focus-visible + span { border-color: #102e57; }
.filter-selects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.filter-selects label { min-width: 0; color: var(--muted); font-size: .875rem; }
.settings-panel input:not([type="hidden"]), .plan-editor input { width: 100%; min-height: 44px; border: 1px solid var(--control-border, var(--line)); border-radius: 9px; padding: 7px 8px; background: #f7faff; color: var(--ink); }
select {
  appearance: none;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 8px 33px 8px 11px;
  border: 1px solid var(--control-border, var(--line));
  border-radius: 10px;
  background: #f7faff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%2352657b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 10px center / 16px no-repeat;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 650;
  text-overflow: ellipsis;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
select:hover { background-color: #eff5ff; }
select:focus { background-color: var(--paper); }
select[aria-invalid="true"] { border-color: #ae3b4b; }
.filter-selects select { margin-top: 4px; }
.filter-selects select:has(option:checked:not([value=""])) { color: var(--blue); background-color: var(--blue-bg); }
@supports (appearance: base-select) and selector(select::picker(select)) {
  select, select::picker(select) { appearance: base-select; }
  select { display: flex; align-items: center; justify-content: space-between; padding-inline-end: 13px; background-image: none; }
  select::picker-icon {
    content: "";
    flex: none;
    width: 7px;
    height: 7px;
    margin-inline-start: 8px;
    border: solid currentColor;
    border-width: 0 1.6px 1.6px 0;
    color: var(--muted);
    transform: translateY(-2px) rotate(45deg);
  }
  select:open::picker-icon { color: var(--blue); transform: translateY(2px) rotate(225deg); }
  select::picker(select) {
    max-inline-size: calc(100vi - 24px);
    max-block-size: min(45dvb, 20rem);
    margin-block: 5px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 10px 28px #182e4d26;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  select option { min-height: 42px; padding: 8px 10px; border-radius: 8px; line-height: 1.35; overflow-wrap: anywhere; }
  select option:hover, select option:focus-visible { background: #f1f6ff; }
  select option:checked { background: var(--blue-bg); color: var(--blue); font-weight: 700; }
  select option::checkmark { order: 1; margin-inline-start: auto; }
}
select[data-select-open] { border-color: var(--blue); background-color: var(--blue-bg); }
.select-fallback-menu {
  position: fixed;
  inset-inline-end: auto;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 10px 28px #182e4d26;
  overflow: auto;
  overscroll-behavior: contain;
}
.select-fallback-menu::backdrop { background: transparent; }
.select-fallback-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  line-height: 1.35;
  text-align: start;
  overflow-wrap: anywhere;
}
.select-fallback-menu button:hover, .select-fallback-menu button:focus-visible { background: #f1f6ff; }
.select-fallback-menu button:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.select-fallback-menu [aria-selected="true"] { background: var(--blue-bg); color: var(--blue); font-weight: 700; }
.select-fallback-menu [aria-selected="true"]::after { content: "✓"; flex: none; }
.action-list { display: grid; gap: 9px; }
.action-row { display: flex; align-items: center; gap: 13px; padding: 11px; min-height: 90px; min-width: 0; }
.action-row:hover, .part-tile:hover { border-color: #91acd9; }
.action-thumb { display: grid; place-items: center; flex: none; width: 88px; height: 65px; border-radius: 9px; overflow: hidden; background: #e4effe; color: var(--blue); }
.action-thumb img { width: 100%; height: 100%; object-fit: cover; }
.action-copy { display: grid; min-width: 0; flex: 1; gap: 3px; }
.action-copy small, .action-copy > span { color: var(--muted); font-size: .875rem; }
.action-copy strong { font-size: 1.06rem; overflow-wrap: anywhere; }
.row-arrow { display: grid; place-items: center; flex: none; width: 31px; height: 31px; border-radius: 9px; background: #ecf2fa; color: #385a87; }
.row-arrow .icon { width: 16px; height: 16px; }
.empty { padding: 27px 15px; text-align: center; color: var(--muted); display: grid; justify-items: center; gap: 7px; }
.empty-icon { display: grid; place-items: center; width: 47px; height: 47px; border-radius: 14px; color: var(--blue); background: var(--blue-bg); margin-bottom: 4px; }
.empty-icon .icon { width: 23px; height: 23px; }
.empty .button { margin-top: 6px; }
.empty h2 { color: var(--ink); }
.back-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 12px 4px 5px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: #284972; font-size: .875rem; font-weight: 700; }
.back-link:hover { border-color: #91acd9; color: var(--blue); }
.back-link-icon { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--blue-bg); color: var(--blue); }
.back-link .icon { width: 17px; height: 17px; transform: rotate(180deg); }
.detail-heading { margin-bottom: 10px; }
.detail-heading h1:focus { outline: none; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags > * { font-size: .875rem; border-radius: 999px; padding: 5px 11px; background: #e7f0fe; color: #214a76; }
.detail-grid { display: grid; gap: 18px; margin-top: 17px; }
.detail-description { display: grid; min-width: 0; align-content: start; gap: 11px; }
.detail-description:empty { display: none; }
.demo { display: block; width: 100%; border-radius: 15px; background: var(--night); aspect-ratio: 16 / 9; object-fit: contain; }
.demo-steps { padding: clamp(12px, 2vw, 18px); }
.demo-steps h2 { margin-bottom: 13px; }
.demo-steps ol { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.demo-steps figure { margin: 0; }
.demo-steps figcaption { display: flex; align-items: baseline; gap: 9px; margin-top: 7px; font-weight: 650; }
.demo-step-index { color: var(--muted); font-size: .875rem; font-weight: 550; white-space: nowrap; }
.photo { margin-top: 10px; }
.photo summary { cursor: pointer; padding-block: 8px; }
.instructions { padding: 15px; }
.instructions .tags a:hover { background: #d9e8ff; }
.instructions p, .instructions .tags { margin-top: 7px; }
.instructions p { color: var(--muted); line-height: 1.65; }
.settings-panel { align-self: start; }
.settings-heading { display: flex; justify-content: space-between; align-items: center; gap: 7px; margin-bottom: 10px; }
.settings-heading span { background: var(--blue-bg); color: var(--blue); border-radius: 999px; padding: 4px 8px; font-size: .875rem; flex: none; }
.settings-panel label { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 55px; border-top: 1px solid var(--line); font-weight: 650; }
.settings-panel input:not([type="hidden"]) { width: 6rem; }
.button { min-height: 48px; padding: 8px 14px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 11px; font-weight: 700; text-align: center; line-height: 1.25; }
.button .icon { width: 18px; height: 18px; }
.primary { background: var(--blue); color: #fff; }
.primary:hover { background: var(--blue-hover); }
.secondary { background: #edf3fb; color: #23416a; border-color: #d8e4f4; }
.secondary:hover { background: #e1ebfa; border-color: #bacce6; }
.compact { min-height: 42px; padding-inline: 11px; font-size: .875rem; }
.settings-panel > .button { width: 100%; margin-top: 11px; }
.training-action { margin-top: 13px; }
.training-action > .button { width: 100%; min-height: 50px; }
.training-action .feedback { margin: 0 0 6px; text-align: center; }
.feedback, .form-error { margin-top: 10px; color: var(--muted); font-size: .875rem; }
.form-error { color: #94283a; background: #fff1f3; padding: 9px 11px; border-radius: 8px; }
.training-login-page { display: grid; justify-items: center; min-height: 100vh; min-height: 100svh; background: radial-gradient(ellipse at 15% 0%, #d9e7fa, transparent 62%), #eff4fa; }
.training-login { align-self: start; display: flex; flex-direction: column; width: min(calc(100% - 28px), 510px); margin: max(14px, env(safe-area-inset-top, 0px)) auto max(28px, env(safe-area-inset-bottom, 0px)); }
.training-login-hero { position: relative; flex: none; height: clamp(232px, 38vh, 315px); border-radius: 25px; overflow: hidden; isolation: isolate; background: var(--night); }
.training-login-hero img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 67% 38%; }
.training-login-hero::after { position: absolute; z-index: -1; inset: 0; content: ""; background: linear-gradient(112deg, #0b192dd9, #101d3122 70%), linear-gradient(0deg, #101d316b, transparent 55%); }
.training-login-brand { position: absolute; inset: 18px auto auto 18px; display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border: 1px solid #ffffff38; border-radius: 13px; background: #142840bd; color: white; font-size: 1rem; font-weight: 740; }
.training-login-brand .brand-mark { width: 31px; height: 31px; border-radius: 8px; background: #ffffff1f; color: #b8ddff; }
.training-login-panel { position: relative; margin: -41px 9px 0; padding: 25px clamp(15px, 5vw, 29px) 26px; border: 1px solid #e0e9f4; border-radius: 23px; background: var(--paper); box-shadow: 0 14px 40px #19365d19; }
.training-login-panel h1 { font-size: clamp(1.7rem, 6.5vw, 2.2rem); line-height: 1.2; letter-spacing: -.035em; }
.training-login-panel h1::before { display: block; width: 24px; height: 4px; margin-bottom: 12px; border-radius: 3px; background: var(--blue); content: ""; }
.training-login-form { display: grid; gap: 15px; margin-top: 22px; }
.training-login-field { display: grid; gap: 7px; }
.training-login-field label { color: #31475e; font-size: .9rem; font-weight: 680; }
.training-login-field input { width: 100%; min-width: 0; height: 51px; padding: 10px 12px 10px 41px; border: 1px solid var(--control-border, var(--line)); border-radius: 11px; background: #f5f8fd; color: var(--ink); font-size: 1rem; }
.training-login-field input:focus { background: var(--paper); }
.training-login-field input[aria-invalid="true"] { border-color: #ae3b4b; }
.training-input-field { position: relative; }
.training-input-field > .icon { position: absolute; top: 50%; inset-inline-start: 13px; width: 17px; height: 17px; color: #657c96; transform: translateY(-50%); pointer-events: none; }
.training-input-field:focus-within > .icon { color: var(--blue); }
.training-password-field input { padding-inline-end: 62px; }
.training-password-field button { position: absolute; inset: 4px 5px 4px auto; min-width: 49px; padding: 0 6px; border: 0; border-radius: 8px; background: transparent; color: var(--blue); font-size: .875rem; font-weight: 700; }
.training-password-field button:hover { background: var(--blue-bg); }
.training-login-dialog { width: min(calc(100% - 36px), 380px); max-height: calc(100% - 36px); padding: 22px; border: 1px solid var(--line); border-radius: 19px; background: var(--paper); color: var(--ink); box-shadow: 0 20px 60px #13243838; }
.training-login-dialog::backdrop { background: #101c30a8; }
.training-login-dialog-icon { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 12px; border-radius: 11px; background: var(--blue-bg); color: var(--blue); }
.training-login-dialog h2 { font-size: 1.25rem; }
.training-login-dialog p { margin-top: 7px; color: var(--muted); font-size: .9375rem; }
.training-login-dialog form { display: flex; justify-content: flex-end; margin-top: 18px; }
.training-login-dialog button { min-height: 42px; min-width: 78px; }
.training-login-form > .button { position: relative; width: 100%; min-height: 52px; margin-top: 3px; border-radius: 12px; background: linear-gradient(110deg, #194eb6, #2267dc); box-shadow: 0 6px 16px #1b58c730; }
.training-login-form > .button:hover { background: var(--blue-hover); }
.training-login-form > .button .icon { position: absolute; inset-inline-end: 16px; }
.training-admin-login { display: flex; min-height: 39px; width: fit-content; align-items: center; gap: 5px; margin: 9px auto 0; color: var(--muted); font-size: .875rem; font-weight: 650; }
.training-admin-login:hover { color: var(--blue); }
.training-admin-login .icon { width: 16px; height: 16px; }
.profile-icon { display: inline-grid; place-items: center; width: 49px; height: 49px; border-radius: 14px; color: var(--blue); background: var(--blue-bg); }
.profile-icon .icon { width: 25px; height: 25px; }
@media (max-width: 768px), (hover: none) and (pointer: coarse) {
  .training-admin-login, .topbar .admin-link { display: none; }
}
@media (min-width: 769px) and (min-height: 500px) {
  .training-login-page { align-items: center; }
  .training-login { align-self: center; display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); width: min(calc(100% - 64px), 985px); min-height: 490px; margin-block: 28px; padding: 8px; border: 1px solid #e0e9f4; border-radius: 26px; background: var(--paper); box-shadow: 0 20px 65px #152b5220; }
  .training-login-hero { height: auto; border-radius: 20px; }
  .training-login-hero img { object-position: 63% center; }
  .training-login-brand { inset: 25px auto auto 25px; }
  .training-login-panel { display: flex; flex-direction: column; justify-content: center; margin: 0; padding: 38px clamp(26px, 5vw, 56px); border: 0; box-shadow: none; }
}
.plan-list { display: grid; gap: 12px; }
.plan-card header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.plan-card ol { padding-left: 24px; margin-block: 12px; }
.plan-card li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.plan-card li::marker { color: var(--blue); font-weight: 700; }
.plan-card li small { margin-left: 8px; color: var(--muted); }
.plan-editor { display: grid; gap: 13px; }
.plan-editor > label { display: grid; gap: 5px; font-weight: 650; }
.plan-editor .section-heading { margin: 2px 0 0; }
.plan-parameter-hint { color: var(--muted); font-size: .875rem; }
#plan-steps { display: grid; gap: 9px; }
.step-field { display: grid; grid-template-columns: 25px minmax(0, 1fr) 42px; align-items: center; gap: 7px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.plan-step-picker { display: flex; min-width: 0; min-height: 58px; align-items: center; gap: 8px; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: #f7faff; color: var(--ink); text-align: start; }
.plan-step-picker:hover { border-color: #91acd9; }
.plan-step-picker[data-invalid] { border-color: #ae3b4b; }
.plan-step-picker .action-thumb { width: 51px; height: 44px; border-radius: 6px; }
.plan-step-picker .action-copy strong { font-size: .95rem; }
.plan-step-picker .action-copy > span { font-size: .78rem; }
.plan-step-picker > .icon { width: 15px; color: var(--muted); }
.plan-picker { width: min(calc(100% - 28px), 620px); height: 78vh; height: 78dvh; max-width: none; max-height: 680px; margin: auto; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); color: var(--ink); box-shadow: 0 20px 60px #13243838; }
.plan-picker::backdrop { background: #101c30a8; }
body:has(.plan-picker[open]) { overflow: hidden; }
.plan-picker-panel { display: flex; flex-direction: column; height: 100%; }
.plan-picker-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 9px; }
.plan-picker-heading h2 { font-size: clamp(1.15rem, 4.5vw, 1.45rem); }
.plan-picker-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, 30%); gap: 8px; padding: 0 16px 12px; }
.plan-picker-filters select { font-size: .9rem; }
.plan-picker-results { flex: 1; min-height: 0; margin: 0; padding: 10px 16px max(14px, env(safe-area-inset-bottom, 0px)); overflow: auto; overscroll-behavior: contain; border-top: 1px solid var(--line); background: var(--canvas); }
.plan-picker-option { width: 100%; min-height: 72px; padding: 7px; gap: 9px; color: var(--ink); text-align: start; box-shadow: none; }
.plan-picker-option .action-thumb { width: clamp(56px, 16vw, 82px); height: 56px; }
.plan-picker-option[aria-current="true"] { border-color: var(--blue); background: #f7faff; }
.plan-picker-empty { padding: 24px 0; color: var(--muted); text-align: center; }
@media (max-width: 600px) {
  .plan-picker { width: 100%; height: 84vh; height: 84dvh; margin: auto auto 0; border-bottom: 0; border-radius: 20px 20px 0 0; }
}
.step-parameters { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px; padding-top: 3px; }
.step-parameters label { display: grid; align-content: start; gap: 4px; min-width: 0; color: var(--muted); font-size: .8125rem; font-weight: 650; }
.step-parameters input { font-weight: 500; }
.step-errors { grid-column: 2 / -1; }
.plan-editor .errorlist { margin: 0; padding: 0; color: #94283a; font-size: .8125rem; list-style: none; }
.plan-step-summary { display: inline-block; margin-inline-start: 8px; color: var(--muted); font-size: .8125rem; white-space: nowrap; }
.step-number { display: grid; place-items: center; height: 25px; border-radius: 7px; font-size: .875rem; font-variant-numeric: tabular-nums; color: var(--blue); background: var(--blue-bg); }
.step-remove { display: grid; place-items: center; height: 42px; border: 1px solid #efd8dd; background: #fff4f6; color: #a52c3b; border-radius: 9px; }
.step-remove:hover:not(:disabled) { background: #ffe8ed; }
.step-remove .icon { width: 17px; height: 17px; }
.plan-editor-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding-top: 9px; border-top: 1px solid var(--line); }
.delete-plan { margin-top: 15px; }
.danger { color: #962e40; background: #fff5f7; border-color: #efd0d8; }
.danger:hover { background: #ffe8ee; }
.profile-account { display: flex; align-items: center; gap: 10px; padding: 12px; margin-bottom: 13px; }
.profile-account .profile-icon { flex: none; width: 42px; height: 42px; border-radius: 11px; }
.profile-account .profile-icon .icon { width: 21px; height: 21px; }
.profile-account-copy { display: grid; flex: 1; min-width: 0; gap: 2px; overflow-wrap: anywhere; }
.profile-account-copy > span { color: var(--muted); font-size: .8125rem; }
.profile-account-copy > strong { font-size: .975rem; font-weight: 730; }
.profile-account form { flex: none; }
.profile-logout { display: flex; align-items: center; gap: 5px; min-height: 44px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 9px; background: #f5f8fc; color: #35506c; font-size: .8125rem; font-weight: 680; }
.profile-logout:hover { border-color: #9cb4d8; background: var(--blue-bg); color: var(--blue); }
.profile-logout .icon { width: 16px; height: 16px; }
.account-intro { margin-top: 9px; color: var(--muted); font-size: .925rem; }
.account-switch { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; font-size: .9rem; }
.account-switch a { color: var(--blue); font-weight: 720; text-decoration: underline; text-underline-offset: 3px; }
.account-field-help { color: var(--muted); font-size: .8125rem; }
.account-field-help ul { margin: 0; padding-inline-start: 1.15rem; }
.account-form .errorlist { margin: 0; padding: 8px 10px 8px 28px; border-radius: 8px; background: #fff1f3; color: #94283a; font-size: .875rem; }
.account-settings { max-width: 960px; }
.account-settings-heading { display: grid; justify-items: start; gap: 12px; }
.account-settings-heading .back-link { margin-bottom: 0; }
.account-settings-grid { display: grid; gap: 14px; align-items: start; }
.account-card { min-width: 0; padding: clamp(16px, 3vw, 26px); }
.account-card-heading { display: flex; align-items: center; gap: 11px; }
.account-card-heading h2 { font-size: 1.15rem; }
.account-card-heading .profile-icon { width: 40px; height: 40px; border-radius: 11px; }
.account-card-heading .profile-icon .icon { width: 21px; height: 21px; }
.account-identifier { display: flex; justify-content: space-between; gap: 12px; margin: 16px 0 0; padding: 10px 12px; border-radius: 10px; background: #f5f8fd; font-size: .875rem; }
.account-identifier dt { color: var(--muted); flex: none; }
.account-identifier dd { margin: 0; text-align: end; overflow-wrap: anywhere; }
.account-card .account-form { margin-top: 17px; }
.account-card input { scroll-margin-bottom: calc(var(--nav-height) + 20px + env(safe-area-inset-bottom, 0px)); }
.account-notice { display: flex; align-items: center; gap: 8px; margin: 0 0 13px; padding: 10px 13px; border-radius: 10px; background: #e8f7ee; color: #19603b; }
.account-notice .icon { width: 18px; height: 18px; }
@media (max-width: 768px) {
  .training-register .training-login-hero { max-height: 212px; }
}
@media (min-width: 769px) {
  .account-settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 360px) {
  .profile-account { flex-wrap: wrap; }
  .profile-account-copy { flex-basis: calc(100% - 52px); }
}
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-bottom: 15px; }
.stat-grid > div { display: grid; gap: 3px; padding: 11px 7px; text-align: center; }
.stat-grid strong { font-size: 1.55rem; color: var(--teal); }
.stat-grid span { font-size: .875rem; color: var(--muted); }
.calendar-card h2 { display: flex; align-items: center; gap: 6px; }
.calendar-card h2 .icon { color: var(--teal); }
.calendar-heading { display: flex; gap: 8px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.calendar-key { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: .875rem; }
.calendar-key::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #66cdb0; }
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); justify-items: center; row-gap: 6px; margin-top: 12px; }
.calendar span, .calendar time { display: grid; width: min(34px, 100%); height: 32px; place-items: center; font-size: .875rem; border-radius: 50%; }
.calendar span { color: var(--muted); }
.cal-other { color: #647990; opacity: .57; }
.calendar .cal-active { background: #b5ebdb; color: #07584e; font-weight: 750; }
.calendar .cal-today { outline: 2px solid #328678; outline-offset: -2px; }
.record-list { overflow: hidden; }
.record-link { display: flex; align-items: center; padding: 12px; gap: 7px; }
.record-link:hover { background: #f2f7ff; }
.record-link:focus-visible { outline-offset: -3px; }
.record-link-arrow { display: grid; place-items: center; flex: none; color: var(--blue); }
.record-link-arrow .icon { width: 15px; height: 15px; }
.record-list article + article { border-top: 1px solid var(--line); }
.record-details { min-width: 0; overflow-wrap: anywhere; }
.record-list article time { margin-left: auto; white-space: nowrap; }
.record-list article p, .record-list article time { color: var(--muted); font-size: .875rem; }
.record-history-link { min-height: 40px; padding-inline: 3px; }
.record-history-link:hover { color: var(--blue-hover); }
.history-pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-top: 13px; color: var(--muted); font-size: .875rem; }
.history-pagination > :first-child { justify-self: start; }
.history-pagination > :last-child { justify-self: end; }
.share-wrap { max-width: 540px; }
@font-face {
  font-family: "Poster Heading";
  src: url("fonts/poster-heading.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Poster Numbers";
  src: url("fonts/poster-numbers.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
.workout-share-themes { min-width: 0; margin: 0 0 18px; padding: 0; border: 0; }
.workout-share-themes legend { margin-bottom: 9px; padding: 0; font-size: .9375rem; font-weight: 750; }
.workout-share-theme-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 5px;
  scroll-padding-inline: 2px;
  scroll-snap-type: inline proximity;
  scrollbar-width: thin;
  scrollbar-color: #a9bbd3 transparent;
}
.workout-share-theme {
  position: relative;
  flex: 0 0 clamp(92px, 29%, 124px);
  min-width: 0;
  scroll-snap-align: start;
  cursor: pointer;
}
.workout-share-theme input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.workout-share-theme > span { display: grid; overflow: hidden; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--muted); text-align: center; font-size: .8125rem; font-weight: 650; }
.workout-share-theme img { display: block; width: 100%; height: 49px; border-radius: 6px; object-fit: cover; }
.workout-share-theme[data-theme="ticket"] img { border-block: 6px solid #efdfca; object-position: center 66%; }
.workout-share-theme[data-theme="split"] img { border-inline-start: 18px solid #e2dfd6; filter: grayscale(1); }
.workout-share-theme[data-theme="full-bleed"] img { object-position: center 72%; filter: brightness(.78) saturate(1.25); }
.workout-share-theme > span > span { padding: 6px 0 4px; }
.workout-share-theme input:checked + span { border-color: var(--blue); background: var(--blue-bg); color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.workout-share-theme input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.workout-share-preview { display: block; width: 100%; height: auto; border: 1px solid #172c4524; border-radius: 12px; background: var(--paper); box-shadow: 0 20px 42px #182e4d24, 0 3px 8px #182e4d12; }
.workout-share-card { padding: clamp(16px, 5vw, 27px); border: 1px solid #304b60; border-radius: 23px; background: radial-gradient(ellipse at 100% 0%, #2a6170, transparent 66%), #15263d; color: #f4f8ff; box-shadow: 0 16px 32px #182e4d25; }
.workout-share-header { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px 8px; }
.workout-share-brand { display: flex; align-items: center; gap: 6px; color: #adf0dd; font-size: .875rem; font-weight: 750; }
.workout-share-brand .icon { width: 18px; height: 18px; }
.workout-share-header time, .workout-share-record time { color: #c1d7e7; font-size: .8125rem; font-variant-numeric: tabular-nums; }
.workout-share-header h1 { grid-column: 1 / -1; font-family: "Poster Heading", "Songti SC", SimSun, serif; font-size: clamp(1.75rem, 7vw, 2.55rem); font-weight: 700; line-height: 1.17; }
.workout-share-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 19px 0 13px; }
.workout-share-stats > div { display: flex; flex-direction: column-reverse; gap: 5px; padding: 11px 10px; border: 1px solid #6487995c; border-radius: 12px; background: #7098ad1c; }
.workout-share-stats dt { color: #c4d9e8; font-size: .8125rem; }
.workout-share-stats dd { margin: 0; color: #b5f6e3; font-family: "Poster Numbers", "Arial Narrow", sans-serif; font-size: clamp(1.18rem, 5.3vw, 1.72rem); font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.workout-share-stats small { margin-inline-start: 5px; font-size: .75rem; font-weight: 650; }
.workout-share-record { padding: 12px; border-radius: 12px; background: #0d192aad; }
.workout-share-record > div { display: flex; justify-content: space-between; gap: 6px; color: #b0c5dc; font-size: .8125rem; }
.workout-share-record h2 { margin: 5px 0 4px; overflow-wrap: anywhere; }
.workout-share-record p { color: #c1d7e7; font-size: .875rem; overflow-wrap: anywhere; }
.workout-share-actions { display: flex; gap: 8px; margin-top: 13px; }
.workout-share-actions > * { flex: 1; }
.workout-share-actions a[aria-disabled="true"] { opacity: .55; cursor: default; }
.session {
  --session-accent: #70efd0;
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow: auto;
  overscroll-behavior: contain;
  display: grid;
  justify-items: center;
  color: #f4f8ff;
  background: radial-gradient(ellipse at 50% 42%, #233854, #101a2b 69%);
  padding: 20px 18px;
  padding: max(20px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
}
.session[data-phase="rest"], .session[data-paused="true"] { --session-accent: #ffd18b; }
.session-inner { width: min(100%, 500px); min-height: 100%; display: grid; grid-template-rows: auto 1fr auto; align-content: stretch; gap: 16px; }
.session-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 9px; padding: 3px 0 15px; border-bottom: 1px solid #34465f; }
.session-top > div { min-width: 0; }
.session h1 { margin-top: 6px; font-size: clamp(1.75rem, 7vw, 2.55rem); line-height: 1.2; overflow-wrap: anywhere; }
.session h1:focus { outline: none; }
#session-group { color: #c8d9f0; font-size: .9rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.session-stage { display: grid; align-content: center; justify-items: center; gap: 15px; padding-block: 12px; }
#phase { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border: 1px solid #465e7a; border-radius: 999px; background: #1b2d45; color: var(--session-accent); font-size: .9rem; font-weight: 700; }
#phase::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ring { --progress: 0%; width: min(72vw, 310px); max-width: 100%; aspect-ratio: 1; border-radius: 50%; background: conic-gradient(var(--session-accent) var(--progress), #3d516c 0); display: grid; place-items: center; padding: 10px; }
.ring-center { display: grid; justify-items: center; align-content: center; gap: 7px; width: 100%; height: 100%; border: 1px solid #435772; border-radius: 50%; background: radial-gradient(circle at 50% 34%, #233a57, #16263d 79%); }
#count { font-size: clamp(3.1rem, 17vw, 5.8rem); font-weight: 800; line-height: 1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
#target { font-size: clamp(1rem, 4.5vw, 1.4rem); color: #c7d9f0; font-weight: 650; }
.session-timing { display: flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 9px; background: #17283e; border: 1px solid #3d526d; color: #d7e6fa; }
.session-timing .icon { width: 17px; height: 17px; }
#elapsed { font-size: 1.13rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.sound { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 40px; border: 1px solid #4d6480; background: #263b56; color: #ecf5ff; border-radius: 9px; padding: 6px 9px; font-size: .875rem; font-weight: 650; white-space: nowrap; }
.sound .icon { width: 17px; height: 17px; }
.sound[aria-pressed="true"] .icon { color: #70efd0; }
.sound:hover:not(:disabled) { background: #304c70; }
.session-footer { padding-top: 13px; border-top: 1px solid #34465f; }
.session-actions { display: flex; flex-wrap: wrap; gap: 9px; width: 100%; }
.session-actions > * { flex: 1 1 110px; min-height: 52px; }
.session-actions .primary { background: #70efd0; color: #102335; border-color: #70efd0; }
.session-actions .primary:hover { background: #9af5e1; }
.session-actions .secondary { background: #273750; color: #ffd0d8; border-color: #86636e; }
.session-actions .secondary:hover { background: #3a4259; }
.session-end-dialog { width: min(calc(100% - 32px), 380px); max-height: calc(100% - 32px); padding: 20px; border: 1px solid #566980; border-radius: 17px; background: #1b2d41; color: #f4f8ff; box-shadow: 0 20px 60px #060d17a0; }
.session-end-dialog::backdrop { background: #080e19b3; }
.session-end-icon { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 12px; border-radius: 10px; background: #633e47; color: #ffd0d8; }
.session-end-dialog h2 { font-size: 1.25rem; }
.session-end-dialog p { margin-top: 8px; color: #c8d9ed; font-size: .9375rem; line-height: 1.5; }
.session-end-dialog form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 17px; }
.session-end-dialog .button { min-height: 44px; padding-inline: 5px; }
.session-end-cancel { background: #70efd0; color: #102335; }
.session-end-cancel:hover { background: #a1f5e2; }
.session-end-confirm { border-color: #98737d; background: #452f3c; color: #ffdbe0; }
.session-end-confirm:hover { background: #603e4a; }
#pause > .icon:nth-child(2), .session[data-paused="true"] #pause > .icon:first-child { display: none; }
.session[data-paused="true"] #pause > .icon:nth-child(2) { display: block; }
.session[data-phase="done"] .session-footer { padding-top: 0; border-top: 0; }
.session-complete { display: grid; gap: 11px; padding: 13px; border: 1px solid #3c5a68; border-radius: 17px; background: #1b2d41; }
.session-complete-status { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.session-save { display: flex; align-items: center; gap: 7px; padding: 2px 3px; color: #c4d6eb; font-size: .875rem; font-weight: 650; }
.session-save .icon { display: none; width: 19px; height: 19px; padding: 3px; border-radius: 50%; background: #70efd02a; color: #a6f8e3; }
.session-complete[data-save-state="saved"] .session-save { color: #b8f5e6; }
.session-complete[data-save-state="saved"] .session-save .icon { display: block; }
.session-complete[data-save-state="error"] .session-save { color: #ffd3a5; }
.session-retry { border: 1px solid #89663f; border-radius: 8px; background: #3b2d25; color: #ffdeba; padding: 5px 8px; font-size: .8125rem; font-weight: 650; }
.session-retry:hover { background: #504034; }
.session-complete-actions { display: grid; gap: 8px; }
.session-complete-actions.has-next { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.session-complete-actions .button { min-width: 0; min-height: 50px; padding-inline: 6px; border-radius: 10px; font-size: .9375rem; }
.session-return, .session-next { background: #70efd0; color: #102335; }
.session-return:hover, .session-next:hover { background: #a1f5e2; }
.session-return .icon { transform: rotate(180deg); }
.session-complete-actions.has-next .session-return { border-color: #586e88; background: #263952; color: #edf5ff; }
.session-complete-actions.has-next .session-return:hover { background: #314866; }
@media (min-width: 680px) {
  .part-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: minmax(0, 1.45fr) minmax(270px, 1fr); }
  .library-filters, .settings-panel, .plan-editor, .plan-card, .calendar-card { padding: 20px; }
  .action-thumb { width: 105px; height: 70px; }
}
@media (min-width: 800px) {
  .home-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; gap: 20px; }
  .body-index .section-heading { margin-top: 4px; }
  .body-index .part-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-description:empty + .settings-panel { grid-column: 1 / -1; max-width: 500px; width: 100%; }
}
@media (max-width: 679px) {
  .authenticated .detail { padding-bottom: calc(170px + env(safe-area-inset-bottom, 0px)); }
  .training-action { position: fixed; inset: auto 0 var(--nav-height); bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px)); background: var(--paper); padding: 9px max(18px, env(safe-area-inset-left, 0px)); border-top: 1px solid var(--line); z-index: 4; }
  .settings-panel label:focus-within { scroll-margin-bottom: 175px; }
}
@media (max-height: 630px) {
  .session-stage { gap: 9px; padding-block: 5px; }
  .ring { width: min(59vw, 225px); padding: 8px; }
  #count { font-size: clamp(2.45rem, 13vw, 4.2rem); }
}
@media (max-height: 470px) and (min-width: 520px) {
  .session-inner { width: min(100%, 710px); grid-template: "head stage" 1fr "foot stage" auto / minmax(0, 1fr) minmax(0, 1fr); gap: 14px 26px; }
  .session-top { grid-area: head; align-self: start; flex-wrap: wrap; }
  .session-stage { grid-area: stage; }
  .session-footer { grid-area: foot; }
  .ring { width: min(45vh, 205px); }
}
@media (max-width: 355px) {
  .topbar, .wrap, .bottom-nav > div { width: calc(100% - 22px); }
  .part-tile > .icon { display: none; }
}
