:root {
  color-scheme: light;
  --navy: #102a43;
  --navy-2: #173b57;
  --teal: #147d78;
  --teal-dark: #0d5d59;
  --teal-light: #82d9cc;
  --mint: #e6f6f1;
  --blue: #2563a6;
  --blue-light: #e8f1fa;
  --amber: #b45309;
  --amber-light: #fff4d6;
  --red: #b42318;
  --red-light: #fde9e7;
  --ink: #1f2933;
  --slate: #52606d;
  --muted: #758390;
  --line: #d9e2e8;
  --line-strong: #c8d4dc;
  --page: #f3f6f7;
  --card: #ffffff;
  --shadow: 0 22px 60px rgba(16, 42, 67, 0.08);
  --shadow-soft: 0 10px 30px rgba(16, 42, 67, 0.06);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0, rgba(255, 255, 255, 0) 340px),
    var(--page);
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    "Noto Sans CJK SC",
    "Source Han Sans SC",
    system-ui,
    sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

button,
input,
textarea {
  font: inherit;
}

button,
a,
summary,
label[for] {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

p,
h1,
h2,
h3 {
  margin-top: 0;
}

[hidden] {
  display: none !important;
}

.page-glow {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(3px);
  pointer-events: none;
  opacity: 0.58;
}

.page-glow-one {
  width: 420px;
  height: 420px;
  top: -190px;
  right: -120px;
  background: radial-gradient(circle, rgba(130, 217, 204, 0.32), rgba(130, 217, 204, 0));
}

.page-glow-two {
  width: 360px;
  height: 360px;
  bottom: -150px;
  left: -170px;
  background: radial-gradient(circle, rgba(37, 99, 166, 0.13), rgba(37, 99, 166, 0));
}

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  border-radius: 14px;
}

.brand:focus-visible,
button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(20, 125, 120, 0.32);
  outline-offset: 3px;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 13px;
  background: var(--navy);
  box-shadow: 0 8px 24px rgba(16, 42, 67, 0.22);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, transparent 48%, rgba(130, 217, 204, 0.22) 49%);
}

.brand-mark span {
  position: absolute;
  height: 3px;
  border-radius: 99px;
  background: var(--teal-light);
  transform: rotate(-32deg);
}

.brand-mark span:nth-child(1) {
  width: 12px;
  left: 8px;
  top: 23px;
}

.brand-mark span:nth-child(2) {
  width: 23px;
  left: 14px;
  top: 19px;
}

.brand-mark span:nth-child(3) {
  width: 9px;
  right: 7px;
  top: 15px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-copy strong {
  color: var(--navy);
  font-size: 16px;
  letter-spacing: 0.04em;
}

.brand-copy > span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.header-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 13px;
  color: var(--slate);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  font-size: 12px;
}

.header-status #beijingClock {
  color: var(--navy);
  font-weight: 750;
  white-space: nowrap;
}

.status-separator {
  width: 1px;
  height: 12px;
  background: var(--line);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(20, 125, 120, 0.11);
}

.header-status.is-offline .status-dot {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.1);
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.68fr);
  gap: 24px;
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 10px 0 48px;
}

.plan-column,
.side-column {
  min-width: 0;
}

.side-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-bottom: 12px;
  padding: 9px 14px;
  color: var(--teal-dark);
  border: 1px solid rgba(20, 125, 120, 0.17);
  border-radius: var(--radius-md);
  background: rgba(230, 246, 241, 0.8);
}

.info-banner p {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.info-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 5px rgba(20, 125, 120, 0.09);
}

.plan-hero {
  position: relative;
  overflow: hidden;
  min-height: 276px;
  padding: 24px 26px;
  color: #fff;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 92% 6%, rgba(130, 217, 204, 0.24), transparent 30%),
    linear-gradient(135deg, var(--navy) 0%, #153d59 58%, #175b64 100%);
  box-shadow: 0 26px 60px rgba(16, 42, 67, 0.19);
}

.plan-hero::after {
  content: "";
  position: absolute;
  right: -56px;
  bottom: -82px;
  width: 230px;
  height: 230px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  box-shadow:
    0 0 0 35px rgba(255, 255, 255, 0.025),
    0 0 0 75px rgba(255, 255, 255, 0.018);
}

.plan-hero.is-rest {
  background:
    radial-gradient(circle at 92% 6%, rgba(255, 244, 214, 0.22), transparent 30%),
    linear-gradient(135deg, #294556 0%, #3b5f6b 100%);
}

.hero-topline,
.hero-main,
.hero-meta {
  position: relative;
  z-index: 1;
}

.hero-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.eyebrow,
.section-label {
  color: var(--teal);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.eyebrow {
  color: var(--teal-light);
}

.hero-date {
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
}

.hero-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 32px;
}

.plan-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 24px;
  margin-bottom: 8px;
  padding: 0 8px;
  color: var(--navy);
  border-radius: 7px;
  background: var(--teal-light);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.07em;
}

.plan-hero h1 {
  max-width: 600px;
  margin-bottom: 8px;
  font-size: clamp(29px, 4.6vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-subtitle {
  max-width: 480px;
  margin: 0;
  color: rgba(255, 255, 255, 0.67);
  font-size: 13px;
}

.duration-ring {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 92px;
  height: 92px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(16, 42, 67, 0.7) 47%, transparent 49%),
    conic-gradient(var(--teal-light) 0 68%, rgba(255, 255, 255, 0.1) 68% 100%);
}

.duration-ring strong {
  display: block;
  margin-bottom: -22px;
  font-size: 25px;
  line-height: 1;
}

.duration-ring span {
  color: rgba(255, 255, 255, 0.6);
  font-size: 9px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 30px;
}

.meta-chip {
  padding: 5px 10px;
  color: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 10px;
}

.card {
  border: 1px solid rgba(216, 225, 232, 0.92);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.plan-card,
.week-card {
  margin-top: 16px;
  padding: 22px;
}

.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.card-heading h2 {
  margin: 2px 0 0;
  color: var(--navy);
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.heading-count,
.heading-note {
  flex: 0 0 auto;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.selection-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -3px 0 10px;
  padding: 9px 11px;
  color: var(--slate);
  border: 1px solid rgba(20, 125, 120, 0.14);
  border-radius: 11px;
  background: var(--mint);
  font-size: 11px;
}

.selection-toolbar strong {
  color: var(--teal-dark);
  font-size: 13px;
}

.selection-toolbar .text-button {
  color: var(--teal-dark);
  white-space: nowrap;
}

.exercise-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.exercise-item {
  display: grid;
  grid-template-columns: 28px 92px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  margin-bottom: 9px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfd;
  transition:
    opacity 150ms ease,
    border-color 150ms ease,
    background 150ms ease;
}

.exercise-item:first-child {
  border-top: 1px solid var(--line);
}

.exercise-item.is-deselected {
  opacity: 0.58;
  background: #f4f6f7;
}

.exercise-item.is-deselected .exercise-thumbnail img {
  filter: grayscale(0.8);
}

.exercise-check {
  position: relative;
  display: block;
  width: 24px;
  height: 24px;
  margin-top: 22px;
  cursor: pointer;
}

.exercise-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.check-box {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  color: transparent;
  border: 1.5px solid #adc1cc;
  border-radius: 7px;
  background: #fff;
  font-size: 13px;
  font-weight: 900;
  transition:
    color 120ms ease,
    border-color 120ms ease,
    background 120ms ease;
}

.exercise-check input:checked + .check-box {
  color: #fff;
  border-color: var(--teal);
  background: var(--teal);
}

.exercise-check input:focus-visible + .check-box {
  outline: 3px solid rgba(20, 125, 120, 0.25);
  outline-offset: 2px;
}

.exercise-thumbnail {
  position: relative;
  width: 92px;
  height: 72px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--page);
}

.exercise-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.exercise-thumbnail.is-placeholder {
  display: grid;
  place-items: center;
  color: var(--teal-dark);
  border: 1px solid rgba(20, 125, 120, 0.15);
  background:
    radial-gradient(circle at 80% 18%, rgba(130, 217, 204, 0.45), transparent 35%),
    var(--mint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.exercise-title-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.exercise-name-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.group-tag {
  padding: 2px 6px;
  color: var(--amber);
  border-radius: 999px;
  background: var(--amber-light);
  font-size: 8px;
  font-weight: 700;
}

.exercise-copy strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 14px;
}

.exercise-copy p {
  margin: 0;
  color: var(--slate);
  font-size: 12px;
}

.exercise-copy .alternatives {
  margin-top: 5px;
  color: var(--amber);
  font-size: 10px;
}

.equipment-help {
  margin-top: 6px;
  padding: 0;
  color: var(--blue);
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
}

.equipment-help:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.exercise-time {
  flex: 0 0 auto;
  color: var(--navy);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.equipment-modal {
  width: min(650px, calc(100% - 28px));
  max-width: 650px;
}

.equipment-modal-card {
  max-height: min(88vh, 860px);
  overflow-y: auto;
}

.equipment-hero {
  display: block;
  width: 100%;
  height: 270px;
  margin-bottom: 18px;
  border-radius: 15px;
  background: var(--page);
  object-fit: contain;
}

.equipment-english {
  margin: -3px 0 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.equipment-summary {
  color: var(--slate);
  font-size: 12px;
}

.equipment-guide-block {
  margin-top: 13px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfd;
}

.equipment-guide-block h3 {
  margin: 0 0 7px;
  color: var(--navy);
  font-size: 12px;
}

.equipment-guide-block p {
  margin: 0;
  color: var(--slate);
  font-size: 12px;
}

.equipment-guide-block ol,
.equipment-guide-block ul {
  margin: 0;
  padding-left: 20px;
  color: var(--slate);
  font-size: 12px;
}

.equipment-guide-block li + li {
  margin-top: 5px;
}

.equipment-guide-block.safety-guide {
  border-color: rgba(180, 35, 24, 0.16);
  background: var(--red-light);
}

.equipment-guide-block.safety-guide h3,
.equipment-guide-block.safety-guide li {
  color: var(--red);
}

.local-image-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.coach-note {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 13px;
  color: var(--slate);
  border-radius: var(--radius-md);
  background: var(--blue-light);
}

.coach-note p {
  margin: 0;
  font-size: 12px;
}

.note-mark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #fff;
  border-radius: 50%;
  background: var(--blue);
  font-size: 11px;
  font-weight: 800;
}

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.week-day {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  min-height: 70px;
  padding: 8px 3px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfcfd;
  cursor: pointer;
  font-size: 10px;
  font-family: inherit;
  text-align: center;
  appearance: none;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.week-day:hover {
  border-color: rgba(20, 125, 120, 0.4);
  background: #f3faf8;
  transform: translateY(-1px);
}

.week-day strong {
  display: block;
  margin: 3px 0;
  color: var(--navy);
  font-size: 11px;
}

.week-day.is-active {
  color: var(--teal-dark);
  border-color: rgba(20, 125, 120, 0.32);
  background: var(--mint);
  box-shadow: inset 0 -3px 0 var(--teal);
}

.week-day.is-active strong {
  color: var(--teal-dark);
}

.week-day.is-suggested::before {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
}

.week-day.is-completed {
  border-color: #8bc29b;
  background: #e7f4ea;
}

.week-day.is-completed .priority-label {
  color: #23704a;
  font-weight: 800;
}

.week-day.is-completed.is-active {
  border-color: var(--teal);
  box-shadow:
    inset 0 -3px 0 var(--teal),
    0 0 0 2px rgba(20, 125, 120, 0.1);
}

.plan-unavailable {
  margin-top: 16px;
  padding: 28px;
  text-align: center;
}

.plan-unavailable h2 {
  margin: 8px 0;
}

.plan-unavailable p {
  margin: 0;
  color: var(--slate);
}

code {
  padding: 2px 5px;
  color: var(--navy);
  border-radius: 5px;
  background: var(--page);
  font-size: 0.9em;
}

.form-card {
  padding: 22px;
}

.form-heading {
  margin-bottom: 18px;
}

.secure-badge {
  flex: 0 0 auto;
  padding: 5px 9px;
  color: var(--teal-dark);
  border: 1px solid rgba(20, 125, 120, 0.22);
  border-radius: 999px;
  background: var(--mint);
  font-size: 9px;
  font-weight: 700;
}

.quick-fields,
.field-grid {
  display: grid;
  gap: 10px;
}

.quick-fields,
.field-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  display: block;
  margin-bottom: 12px;
}

.field > span:first-child {
  display: block;
  margin-bottom: 6px;
  color: var(--slate);
  font-size: 11px;
  font-weight: 650;
}

.field small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 43px;
  padding: 10px 11px;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: none;
  background: #fbfcfd;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease;
}

.field textarea {
  min-height: 82px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #a4afb7;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(20, 125, 120, 0.09);
}

.field input:invalid:not(:placeholder-shown) {
  border-color: var(--red);
}

.input-with-unit {
  position: relative;
  display: block;
}

.input-with-unit input {
  padding-right: 43px;
}

.input-with-unit > span {
  position: absolute;
  top: 50%;
  right: 11px;
  color: var(--muted);
  font-size: 10px;
  transform: translateY(-50%);
}

.rpe-line {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 43px;
  padding: 8px 11px 8px 5px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fbfcfd;
}

.rpe-line input[type="range"] {
  flex: 1;
  min-height: 24px;
  padding: 0;
  border: 0;
  accent-color: var(--teal);
  background: transparent;
  box-shadow: none;
}

.rpe-line output {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  color: #fff;
  border-radius: 7px;
  background: var(--navy);
  font-size: 11px;
  font-weight: 800;
}

.field-group {
  margin: 0 0 12px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fbfcfd;
}

.field-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  color: var(--navy);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  list-style: none;
}

.field-group summary::-webkit-details-marker {
  display: none;
}

.field-group summary::after {
  content: "+";
  color: var(--muted);
  font-size: 16px;
  font-weight: 400;
}

.field-group[open] summary::after {
  content: "−";
}

.field-group summary small {
  margin-left: auto;
  margin-right: 10px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

.field-group .field {
  margin-bottom: 10px;
}

.field-group .field input {
  min-height: 38px;
  padding: 8px 9px;
  background: #fff;
}

.measure-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
}

.measure-switch > span {
  color: var(--slate);
  font-size: 10px;
  font-weight: 650;
}

.segmented-control {
  display: inline-flex;
  padding: 3px;
  border-radius: 9px;
  background: #e9eff2;
}

.segmented-control button {
  min-height: 28px;
  padding: 3px 9px;
  color: var(--muted);
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
}

.segmented-control button.is-active {
  color: var(--teal-dark);
  background: #fff;
  box-shadow: 0 2px 7px rgba(16, 42, 67, 0.09);
}

.upload-block {
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.upload-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.upload-heading strong {
  display: block;
  color: var(--navy);
  font-size: 12px;
}

.upload-heading p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.optional-label {
  padding: 3px 7px;
  color: var(--slate);
  border-radius: 999px;
  background: var(--page);
  font-size: 8px;
}

.drop-zone {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 12px;
  border: 1px dashed #b8c9d2;
  border-radius: var(--radius-md);
  background: #fbfcfd;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background 150ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--teal);
  background: var(--mint);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.upload-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--teal-dark);
  border-radius: 11px;
  background: var(--mint);
  font-size: 21px;
  font-weight: 300;
}

.drop-zone strong,
.drop-zone small {
  display: block;
}

.drop-zone strong {
  margin-bottom: 2px;
  color: var(--navy);
  font-size: 11px;
}

.drop-zone small {
  color: var(--muted);
  font-size: 9px;
}

.image-preview {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 8px;
  border: 1px solid rgba(20, 125, 120, 0.2);
  border-radius: var(--radius-md);
  background: var(--mint);
}

.image-preview img {
  width: 54px;
  height: 54px;
  border-radius: 9px;
  object-fit: cover;
}

.preview-copy {
  min-width: 0;
}

.preview-copy strong,
.preview-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-copy strong {
  color: var(--navy);
  font-size: 10px;
}

.preview-copy span {
  color: var(--muted);
  font-size: 9px;
}

.text-button {
  padding: 4px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.text-button.danger {
  color: var(--red);
}

.field-error,
.modal-error {
  margin: 8px 0 0;
  color: var(--red);
  font-size: 11px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  transition:
    transform 120ms ease,
    box-shadow 150ms ease,
    opacity 150ms ease;
}

.primary-button {
  gap: 10px;
  width: 100%;
  margin-top: 15px;
  padding: 0 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal-dark), var(--teal));
  box-shadow: 0 10px 22px rgba(20, 125, 120, 0.19);
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 13px 28px rgba(20, 125, 120, 0.24);
}

.primary-button:active,
.secondary-button:active {
  transform: translateY(1px);
}

.primary-button:disabled,
.secondary-button:disabled {
  opacity: 0.56;
  cursor: wait;
  transform: none;
}

.primary-button.compact {
  width: auto;
  min-width: 122px;
  margin-top: 0;
}

.button-arrow {
  font-size: 18px;
  font-weight: 400;
}

.secondary-button {
  padding: 0 16px;
  color: var(--navy);
  border: 1px solid var(--line-strong);
  background: #fff;
}

.secondary-button:hover {
  border-color: var(--teal);
  background: var(--mint);
}

.form-footnote {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.saved-card {
  padding: 25px 22px;
  text-align: center;
}

.saved-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin: 0 auto 12px;
  color: #fff;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 9px rgba(20, 125, 120, 0.09);
  font-size: 22px;
}

.saved-card h2 {
  margin: 5px 0 7px;
  color: var(--navy);
  font-size: 21px;
}

.saved-card p {
  margin: 0;
  color: var(--slate);
  font-size: 12px;
}

.saved-actions {
  margin-top: 19px;
}

.saved-actions .secondary-button {
  width: 100%;
}

.privacy-card {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 9px;
  padding: 14px;
  color: var(--slate);
  border: 1px solid rgba(37, 99, 166, 0.13);
  border-radius: var(--radius-md);
  background: rgba(232, 241, 250, 0.64);
}

.privacy-mark {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  color: var(--blue);
  font-size: 18px;
}

.privacy-card strong {
  display: block;
  color: var(--navy);
  font-size: 11px;
}

.privacy-card p {
  margin: 2px 0 0;
  font-size: 10px;
}

.mini-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.65);
}

.password-change-button {
  grid-column: 1 / -1;
  justify-self: start;
  padding: 3px 0;
  color: var(--teal-dark);
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.password-change-button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mini-card strong {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--navy);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-card .mini-wide {
  grid-column: 1 / -1;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0 0 calc(28px + env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 10px;
}

.loading-card {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: #fff;
}

.loading-line,
.loading-block {
  border-radius: 10px;
  background: linear-gradient(90deg, #edf2f4 25%, #f8fafb 50%, #edf2f4 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}

.loading-line {
  height: 17px;
  margin-bottom: 12px;
}

.loading-line-wide {
  width: 70%;
  height: 38px;
}

.loading-line-medium {
  width: 45%;
}

.loading-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 30px;
}

.loading-block {
  height: 190px;
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

.modal {
  width: min(430px, calc(100% - 28px));
  max-width: 430px;
  padding: 0;
  color: var(--ink);
  border: 0;
  border-radius: 22px;
  background: transparent;
  box-shadow: 0 32px 100px rgba(16, 42, 67, 0.28);
}

.modal::backdrop {
  background: rgba(9, 24, 36, 0.58);
  backdrop-filter: blur(5px);
}

.modal-card {
  position: relative;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  background: #fff;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 13px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--muted);
  border: 0;
  border-radius: 50%;
  background: var(--page);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.modal h2 {
  margin: 5px 0 8px;
  color: var(--navy);
  font-size: 23px;
}

.modal-description {
  margin-bottom: 18px;
  color: var(--slate);
  font-size: 12px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom));
  max-width: min(380px, calc(100% - 32px));
  padding: 12px 15px;
  color: #fff;
  border-radius: 12px;
  background: var(--navy);
  box-shadow: 0 14px 35px rgba(16, 42, 67, 0.23);
  font-size: 12px;
  animation: toast-in 180ms ease-out;
}

.toast.is-error {
  background: var(--red);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .site-header,
  .app-shell,
  .site-footer {
    width: min(760px, calc(100% - 32px));
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .side-column {
    display: grid;
    grid-template-columns: 1fr;
  }

}

@media (max-width: 640px) {
  body {
    font-size: 14px;
  }

  .site-header {
    width: calc(100% - 28px);
    padding-top: calc(16px + env(safe-area-inset-top));
    padding-bottom: 15px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .header-status {
    min-height: 30px;
    gap: 6px;
    padding: 0 9px;
    font-size: 10px;
  }

  .header-status #serverStatus,
  .status-separator {
    display: none;
  }

  .app-shell {
    width: calc(100% - 24px);
    gap: 16px;
    padding-top: 4px;
  }

  .info-banner {
    margin-bottom: 9px;
    padding: 9px 11px;
  }

  .info-banner p {
    font-size: 11px;
  }

  .plan-hero {
    min-height: 258px;
    padding: 20px 18px;
    border-radius: 22px;
  }

  .hero-date {
    font-size: 10px;
  }

  .hero-main {
    align-items: flex-start;
    margin-top: 27px;
  }

  .plan-hero h1 {
    padding-right: 8px;
    font-size: 32px;
  }

  .hero-subtitle {
    max-width: 230px;
    font-size: 11px;
  }

  .duration-ring {
    width: 74px;
    height: 74px;
  }

  .duration-ring strong {
    margin-bottom: -19px;
    font-size: 21px;
  }

  .duration-ring span {
    font-size: 8px;
  }

  .hero-meta {
    margin-top: 24px;
  }

  .meta-chip {
    padding: 4px 8px;
    font-size: 9px;
  }

  .plan-card,
  .week-card,
  .form-card {
    padding: 17px;
    border-radius: 18px;
  }

  .card-heading h2 {
    font-size: 18px;
  }

  .exercise-item {
    grid-template-columns: 24px 74px minmax(0, 1fr);
    gap: 8px;
    padding: 10px;
  }

  .exercise-check {
    margin-top: 21px;
  }

  .exercise-thumbnail {
    width: 74px;
    height: 66px;
  }

  .exercise-title-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 1px;
  }

  .exercise-time {
    color: var(--teal-dark);
  }

  .week-strip {
    grid-template-columns: repeat(7, minmax(36px, 1fr));
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .week-day {
    min-height: 62px;
    padding: 6px 2px;
    font-size: 8px;
  }

  .week-day strong {
    font-size: 9px;
  }

  .quick-fields {
    grid-template-columns: 1fr;
  }

  .field-grid.three {
    grid-template-columns: 1fr 1fr;
  }

  .field-grid.three .field:last-child {
    grid-column: 1 / -1;
  }

  .field-grid.two {
    grid-template-columns: 1fr;
  }

  .modal-card {
    padding: 23px 19px;
  }

  .modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .primary-button.compact,
  .modal-actions .secondary-button {
    width: 100%;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    width: calc(100% - 28px);
    gap: 4px;
    line-height: 1.6;
  }

  .toast {
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
