:root {
  color-scheme: light;
  --ink: #132d2b;
  --muted: #526663;
  --accent: #216251;
  --accent-hover: #174b3d;
  --accent-pale: #e0efe7;
  --canvas: #f3f6f1;
  --line: #d4ded6;
  --paper: #fff;
  --warm: #fff4e1;
  --danger: #973b29;
  font: 16px/1.55 system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
h1,h2,h3,p { margin: 0; }
h1 { font-size: clamp(1.7rem, 5.5vw, 2.4rem); line-height: 1.2; letter-spacing: -.035em; }
h2 { font-size: 1.24rem; line-height: 1.3; }
h3 { font-size: 1rem; }
p + p { margin-top: .5rem; }
button,input,select,textarea { font: inherit; }
a,button { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #46836b; outline-offset: 3px; }
button:disabled { cursor: wait; opacity: .6; }
[hidden] { display: none !important; }
.loading { max-width: 680px; margin: 15vh auto; padding: 1rem; }
.topbar { background: var(--ink); color: #fff; }
.topbar .inner { max-width: 1100px; margin: auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 720; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.topbar .right { display: flex; gap: 12px; align-items: center; }
.topbar .right span { font-size: .9rem; max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar button { color: #e6f3ec; background: transparent; padding: 8px 3px; white-space: nowrap; }
.outer { width: min(100%, 1100px); margin: auto; padding: 24px 20px 64px; }
.login-layout { width: min(100%,980px); margin: 7vh auto 0; padding: 20px; display: grid; gap: 2.5rem; grid-template-columns: 1.08fr 1fr; align-items: center; }
.login-blurb { display: grid; gap: 14px; max-width: 420px; }
.login-blurb p { color: var(--muted); max-width: 33ch; }
.login-logo { width: 72px; height: 72px; border-radius: 20px; margin-bottom: 10px; }
.login-panel { padding: 28px; }
.nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.nav button,.tab-minor { border-radius: 10px; color: var(--muted); background: transparent; padding: 10px 14px; font-weight: 650; min-height: 44px; }
.nav .active { background: var(--accent-pale); color: var(--ink); }
.card { border: 1px solid var(--line); background: var(--paper); border-radius: 16px; padding: 20px; }
.privacy-dialog { width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); color: var(--ink); }
.privacy-dialog::backdrop { background: rgb(19 45 43 / 60%); }
.privacy-card { width: min(100%, 720px); margin-inline: auto; }
.privacy-card a, .privacy-dialog a, .account-settings a, .login-panel a { color: var(--accent); }
.hero { background: var(--ink); color: #fff; border-radius: 18px; padding: clamp(20px,4vw,32px); display: grid; align-items: start; gap: 12px; }
.hero p { color: #deebe1; }
.hero .kicker { color: #b9d4c7; }
.hero .button { justify-self: start; background: #e5f4eb; color: var(--ink); }
.kicker { font-size: .84rem; font-weight: 700; letter-spacing: .06em; color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.layout { display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(0, .84fr); gap: 16px; align-items: start; }
.stack { display: grid; gap: 14px; align-content: start; min-width: 0; }
.padded { margin-top: 16px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.form { display: grid; gap: 14px; }
.form h2 + p { margin-top: -7px; }
.fields { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
label.field { display: grid; align-content: start; gap: 6px; color: var(--ink); font-weight: 620; font-size: .94rem; }
label.field small { color: var(--muted); font-weight: normal; }
input:not([type=checkbox]), select, textarea { width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid #acbdb2; color: var(--ink); border-radius: 10px; background: #fff; min-height: 46px; font-weight: normal; }
textarea { resize: vertical; min-height: 86px; }
label.toggle { display: flex; gap: 10px; align-items: start; font-size: .91rem; }
input[type=checkbox] { accent-color: var(--accent); width: 1.14rem; height: 1.14rem; flex: 0 0 auto; margin: .23em 0 0; }
.button { display: inline-flex; align-items: center; justify-content: center; color: #fff; background: var(--accent); padding: 10px 16px; border-radius: 10px; min-height: 44px; font-weight: 650; text-decoration: none; }
.button:hover { background: var(--accent-hover); color: #fff; }
.button.secondary { background: var(--accent-pale); color: var(--ink); }
.button.secondary:hover { background: #d0e6d8; }
.button.ghost { background: none; color: var(--accent); border: 1px solid var(--line); }
.button.ghost:hover { background: var(--canvas); }
.label { border-radius: 10px; padding: 3px 9px; background: var(--accent-pale); font-size: .84rem; color: var(--ink); display: inline-block; }
.item { border-top: 1px solid var(--line); padding: 12px 0 0; }
.item:first-of-type { border-top: 0; padding-top: 0; }
.item p { overflow-wrap: anywhere; }
.details { background: var(--canvas); padding: 12px; border-radius: 10px; }
.stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.stats div { min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 9px; }
.stats strong { display: block; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.score-list { margin: 0; }
.score-list div { display: grid; grid-template-columns: minmax(0,1fr) max-content; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); }
.score-list dt { overflow-wrap: anywhere; }
.score-list dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; text-align: end; }
.score-list dd span { margin-left: 4px; font-size: .77rem; font-weight: 500; }
.progress-card { display: grid; gap: 4px; background: var(--accent-pale); border-radius: 10px; padding: 12px; }
.progress-card strong { font-size: 1.16rem; font-variant-numeric: tabular-nums; }
.progress-card p { margin: 0; }
.notice, .alert { padding: 12px 14px; border-radius: 10px; }
.notice { background: var(--warm); }
.alert { background: #f9e6e1; color: var(--danger); }
.status { margin-bottom: 12px; }
.timer { font-variant-numeric: tabular-nums; font-size: 2.8rem; font-weight: 730; line-height: 1.2; }
.pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.pair div { background: var(--canvas); padding: 9px; border-radius: 9px; }
.message-list { display: grid; gap: 10px; max-height: 370px; overflow: auto; }
.bubble { max-width: 88%; border-radius: 12px; background: var(--canvas); padding: 10px 13px; overflow-wrap: anywhere; white-space: pre-wrap; }
.bubble.own { justify-self: end; background: var(--accent-pale); }
.coach-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.student-option { display: block; width: 100%; text-align: left; background: var(--canvas); border: 1px solid var(--line); padding: 10px; border-radius: 10px; color: var(--ink); }
.student-option.selected { background: var(--accent-pale); border-color: var(--accent); }
.task-text, .preserve { white-space: pre-wrap; overflow-wrap: anywhere; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.flex-fill { flex: 1 1 auto; }
.footer { max-width: 1100px; margin: auto; padding: 0 20px 26px; color: var(--muted); font-size: .84rem; }
@media (max-width: 720px) {
  .outer { padding: 16px 14px 32px; }
  .topbar .inner { padding: 10px 14px; }
  .layout,.coach-layout { grid-template-columns: minmax(0,1fr); }
  .login-layout { grid-template-columns: minmax(0,1fr); margin: 3vh auto 0; gap: 1.4rem; }
  .login-panel,.card { padding: 16px; }
  .nav { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; }
  .nav button { padding-inline: 5px; font-size: .91rem; }
  .brand { gap: 8px; }
  .topbar .right { gap: 8px; }
  .topbar .right span { max-width: 6em; }
}
@media (max-width: 365px) { .fields { grid-template-columns: minmax(0,1fr); } }

.student-shell,
.login-layout {
  --ink: #1b2b22;
  --muted: #536259;
  --accent: #23513e;
  --accent-hover: #153c2b;
  --accent-pale: #e9efdf;
  --canvas: #f8f6ee;
  --line: #e0e3d6;
  --paper: #fffef9;
  --forest: #142c25;
  --lime: #d4fa63;
  --surface-shadow: 0 6px 24px rgb(34 49 36 / 5%);
}
.student-shell { min-height: 100vh; background: var(--canvas); color: var(--ink); }
.student-header { border-bottom: 1px solid var(--line); }
.student-header-inner {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(100%, 1100px);
  margin-inline: auto;
  padding: 10px clamp(16px, 4vw, 28px);
}
.student-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
  font-size: 1.03rem;
  font-weight: 800;
  letter-spacing: -.035em;
  color: inherit;
  background: transparent;
  padding: 0;
  text-decoration: none;
}
.student-brand img { width: 36px; height: 36px; border-radius: 12px; flex: 0 0 auto; }
.student-avatar {
  display: inline-grid;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  color: var(--accent);
  font-size: .9rem;
  font-weight: 740;
}
.student-main.outer { padding: 25px clamp(16px, 4vw, 28px) 48px; }
.student-shell :where(.card, .week-card, .day-tile, .flow-card) {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--surface-shadow);
}
.student-shell :where(.card, .details, .progress-card) { overflow-wrap: anywhere; }
.student-shell :where(.button) { border-radius: 13px; }
.student-shell :where(input:not([type=checkbox], [type=radio]), select, textarea) {
  font-size: 16px;
  scroll-margin-block-end: 92px;
}
.student-shell :where(summary) { cursor: pointer; }

.student-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  padding: 4px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--paper);
}
.student-nav button {
  display: flex;
  min-height: 44px;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: .87rem;
  font-weight: 700;
  white-space: nowrap;
}
.student-nav button:is(.active,[aria-current="page"]) { background: var(--accent-pale); color: var(--forest); }
.student-nav .nav-symbol { position: relative; width: 20px; height: 20px; flex: 0 0 auto; }
.student-nav .nav-symbol::before, .student-nav .nav-symbol::after { position: absolute; content: ""; }
.student-nav [data-tab="today"] .nav-symbol::before { inset: 4px 4px 3px; border: 1.5px solid currentColor; border-top: 0; border-radius: 0 0 3px 3px; }
.student-nav [data-tab="today"] .nav-symbol::after { inset: 2px auto auto 5px; width: 10px; height: 10px; border-top: 1.5px solid currentColor; border-left: 1.5px solid currentColor; transform: rotate(45deg); }
.student-nav [data-tab="feed"] .nav-symbol::before { inset: 2px 2px 3px; border: 1.5px solid currentColor; border-radius: 4px; }
.student-nav [data-tab="feed"] .nav-symbol::after { inset: 7px 6px auto; height: 1px; background: currentColor; box-shadow: 0 3px currentColor; }
.student-nav [data-tab="record"] .nav-symbol::before { inset: 2px 3px 3px; border: 1.5px solid currentColor; border-radius: 3px; }
.student-nav [data-tab="record"] .nav-symbol::after { inset: auto 5px 6px; width: 2px; height: 4px; background: currentColor; box-shadow: 3px -2px currentColor, 6px -4px currentColor; }
.student-nav [data-tab="support"] .nav-symbol::before { inset: 3px 2px 4px; border: 1.5px solid currentColor; border-radius: 5px 5px 5px 1px; }
.student-nav [data-tab="support"] .nav-symbol::after { left: 6px; top: 8px; width: 2px; height: 2px; border-radius: 50%; background: currentColor; box-shadow: 3px 0 currentColor, 6px 0 currentColor; }
.student-nav [data-tab="profile"] .nav-symbol::before { inset: 2px 7px auto; height: 6px; border: 1.5px solid currentColor; border-radius: 50%; }
.student-nav [data-tab="profile"] .nav-symbol::after { inset: 10px 4px 3px; border: 1.5px solid currentColor; border-radius: 7px 7px 3px 3px; }

.day-view { display: grid; min-width: 0; gap: 20px; }
.day-heading { display: grid; gap: 4px; }
.day-heading .day-date { color: var(--muted); font-size: .85rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.day-heading h1 { font-size: clamp(2rem, 5.8vw, 3.2rem); font-weight: 850; line-height: 1.08; letter-spacing: -.055em; overflow-wrap: anywhere; }
.today-grid { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); gap: 16px; }
.daily-hero,
.login-blurb {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--forest);
  color: #f7faed;
}
.daily-hero::after,
.login-blurb::after {
  position: absolute;
  z-index: -1;
  inset: auto -110px -58px auto;
  width: 330px;
  height: 194px;
  border: 1px solid rgb(212 250 99 / 22%);
  border-radius: 50%;
  box-shadow:
    0 0 0 14px var(--forest), 0 0 0 15px rgb(212 250 99 / 20%),
    0 0 0 30px var(--forest), 0 0 0 31px rgb(212 250 99 / 16%),
    0 0 0 47px var(--forest), 0 0 0 48px rgb(212 250 99 / 12%);
  transform: rotate(-37deg);
  pointer-events: none;
  content: "";
}
.daily-hero {
  display: grid;
  min-width: 0;
  min-height: 250px;
  align-content: center;
  padding: clamp(21px, 5vw, 38px);
  border-radius: 25px;
  box-shadow: 0 12px 28px rgb(20 44 37 / 13%);
}
.hero-content { display: grid; gap: 11px; min-width: 0; }
.hero-content .hero-tag { color: var(--lime); font-size: .78rem; font-weight: 740; }
.hero-content h2 {
  max-width: 18ch;
  font-size: clamp(1.7rem, 4.5vw, 2.7rem);
  font-weight: 830;
  line-height: 1.12;
  letter-spacing: -.055em;
  overflow-wrap: anywhere;
}
.hero-content p:not(.hero-tag) { max-width: 36ch; margin: 0; color: #dbe6d4; font-size: .94rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 7px; }
.hero-actions .button { min-height: 48px; padding-inline: 17px; border-radius: 14px; background: var(--lime); color: #202907; font-weight: 780; }
.hero-actions .button:is(:hover,:active) { background: #e4ff9e; color: #202907; }
.hero-actions .button:is(.ghost,.secondary) { background: transparent; border: 1px solid #638174; color: #f7faed; }
.hero-actions .button:is(.ghost,.secondary):hover { background: #274638; }
.daily-hero :focus-visible { outline-color: #fff; }

.week-card { display: grid; min-width: 0; align-content: center; gap: 19px; padding: clamp(16px, 3vw, 25px); }
.week-summary { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.week-summary > * { min-width: 0; }
.week-summary :is(h2,h3) { font-weight: 800; letter-spacing: -.035em; }
.week-summary strong, .week-total { font-variant-numeric: tabular-nums; }
.week-summary p { color: var(--muted); font-size: .84rem; white-space: nowrap; }
.week-summary p strong { color: var(--forest); font-size: 1.55rem; font-weight: 820; line-height: 1; }
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.week-day { display: grid; min-width: 0; justify-items: center; align-content: start; min-height: 52px; padding: 5px 0; gap: 5px; border-radius: 12px; color: var(--muted); font-size: .76rem; font-weight: 650; }
.week-day.current { background: #edf1e2; color: var(--forest); }
.day-dot { display: grid; width: 19px; height: 19px; place-items: center; border: 1px solid #d3daca; border-radius: 100%; line-height: 1; }
.week-day.logged .day-dot, .day-dot.logged { border-color: #86a745; background: var(--lime); color: var(--forest); }
.week-day.current .day-dot, .day-dot.current { outline: 1px solid #67816d; outline-offset: 2px; }
.day-secondary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.day-tile { display: grid; min-width: 0; gap: 12px; align-content: start; padding: clamp(15px, 3vw, 22px); overflow-wrap: anywhere; }
.tile-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; min-width: 0; gap: 6px 10px; }
.tile-heading :is(h2,h3) { font-weight: 800; letter-spacing: -.02em; }
.day-tile > .button { justify-self: start; }
.day-tile .feed-preview { padding-top: 8px; border-top: 1px solid var(--line); }
.day-tile :is(.message-preview,.feed-preview .post-text) { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }

.exercise-view { display: grid; width: min(100%, 680px); min-width: 0; margin: 0 auto; gap: 14px; }
.flow-card { display: grid; min-width: 0; padding: clamp(16px, 4.5vw, 29px); gap: clamp(14px, 3vw, 20px); }
.flow-back {
  justify-self: start;
  min-height: 44px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--accent);
  font-size: .85rem;
  font-weight: 720;
  text-decoration: none;
}
.flow-heading { display: grid; gap: 6px; }
.flow-heading :is(h1,h2) { font-size: clamp(1.5rem, 5.7vw, 2.45rem); font-weight: 830; letter-spacing: -.055em; }
.flow-heading p { margin: 0; color: var(--muted); }
.rating-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.rating-field legend { padding: 0; color: var(--ink); font-weight: 760; }
.rating-field small { display: block; margin-top: 2px; color: var(--muted); }
.rating-options { display: grid; grid-template-columns: repeat(11, minmax(0,1fr)); gap: 4px; margin: 8px 0 0; }
.rating-options label { display: grid; position: relative; min-width: 0; cursor: pointer; }
.rating-options label input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 44px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.rating-options label span {
  display: grid;
  min-width: 0;
  min-height: 44px;
  place-items: center;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  font-size: .96rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.rating-options label:hover span { border-color: #7a997f; }
.rating-options input:checked + span { border-color: #7d9b42; background: var(--lime); color: #202907; }
.rating-options input:focus-visible + span { outline: 2px solid #377655; outline-offset: 1px; }
.rating-ends { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; color: var(--muted); font-size: .78rem; }
.discomfort-field { margin: 0; padding: 0; border: 0; }
.discomfort-field legend { padding: 0; font-weight: 720; }
.discomfort-choices { display:flex; flex-wrap:wrap; gap:8px; margin-top:6px; }
.discomfort-choices label { display: inline-flex; justify-content: center; align-items:center; min-height:44px; gap:6px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.discomfort-choices input { accent-color: var(--accent); }
.record-item + .record-item { padding-top: 10px; border-top: 1px solid var(--line); }
.record-item summary { min-height: 44px; }
.record-item summary span { display: block; margin-left: 1em; color: var(--muted); font-size: .82rem; }
.record-item .item { margin-top: 10px; }
.move-demo { display: grid; justify-items: start; gap: 10px; min-width: 0; }
.move-stage { position: relative; width: min(100%, 460px); }
.move-demo :is(.move-video, .move-still) { display: block; width: 100%; max-height: min(64svh, 450px); object-fit: contain; border-radius: 14px; }
.move-video { background: var(--forest); }
.move-still { max-width: 460px; }
.move-play {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 60%);
  border-radius: 50%;
  background: var(--lime);
  color: var(--forest);
  box-shadow: 0 3px 18px rgb(0 0 0 / 34%);
}
.move-play::before { content: ""; width: 0; height: 0; margin-left: 3px; border-block: 9px solid transparent; border-left: 14px solid currentColor; }
.move-cue { font-size: .86rem; color: var(--muted); }
.move-preview summary { min-height: 44px; align-content: center; font-weight: 700; color: var(--accent); }
.movement-page { width: min(100%, 590px); margin-inline: auto; }
.fitness-page { width: min(100%, 680px); margin-inline: auto; }
.fitness-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: clamp(16px, 5vw, 28px);
  border-radius: 20px;
  background: var(--forest);
  color: #f4faeb;
}
.fitness-total p { margin-top: 5px; color: #dce7d8; font-size: .82rem; }
.fitness-total > strong { color: var(--lime); font-size: clamp(2.3rem, 10vw, 3.4rem); font-variant-numeric: tabular-nums; }
.fitness-scores dt small { display: block; color: var(--muted); font-size: .76rem; font-weight: 400; }
.fitness-scores dd, .reference-list dd { font-variant-numeric: tabular-nums; }
.fitness-low { display: block; color: #874212; font-size: .75rem; font-weight: 700; }
.fitness-scores .button { display: block; margin: 5px 0 0 auto; }
.training-filters { display: flex; flex-wrap: wrap; gap: 7px; }
.training-filters .button[aria-pressed="true"] { border-color: var(--forest); background: var(--forest); color: #f4faeb; }
.training-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.drill-card { display: grid; align-content: start; justify-items: start; gap: 7px; }
.drill-card h2 { font-size: 1.24rem; }
.drill-tag { color: var(--accent); font-size: .8rem; font-weight: 700; }
.drill-card .button { margin-top: 5px; }
.drill-context summary { min-height: 32px; align-content: center; font-weight: 700; }
@media (max-width: 525px) {
  .training-grid { grid-template-columns: minmax(0, 1fr); }
}
.exercise-timer { display: grid; gap: 8px; padding: clamp(16px, 4.5vw, 25px); border-radius: 19px; background: var(--forest); color: #f4faeb; }
.exercise-timer :is(p,.small,.muted) { color: #dce7d8; }
.exercise-timer :is(.kicker,.label) { background: transparent; color: var(--lime); }
.exercise-timer :is(.timer,[data-timer]) { font-size: clamp(2.75rem, 10vw, 4.6rem); font-weight: 820; letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.finish-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.finish-actions .button { min-height: 48px; }
.finish-actions .button:is(.danger,.stop), .finish-actions .danger-button { background: #f9e9e2; color: #842c1e; }
.checkin-section { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--canvas); scroll-margin-block-end: 92px; }
.checkin-section summary { font-size: .9rem; font-weight: 720; }
.celebration { display: grid; min-width: 0; justify-items: start; gap: 11px; padding: clamp(17px, 4vw, 28px); border: 1px solid #c7d693; border-radius: 19px; background: #eef5d7; color: var(--forest); overflow-wrap: anywhere; }
.celebration-mark { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 15px; background: var(--lime); font-weight: 830; font-size: 1.3rem; }
.celebration h2 { font-weight: 810; letter-spacing: -.025em; }
.drill-save { margin-top: 8px; }
.checkin-reward {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  width: 100%;
  padding: 12px;
  border: 1px solid #ccd99e;
  border-radius: 14px;
  background: #f9fbe9;
}
.checkin-stamps { display: flex; gap: 5px; }
.checkin-stamps span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px dashed #83946d;
  border-radius: 50%;
  font-weight: 800;
}
.checkin-stamps .stamped { background: var(--lime); border-style: solid; }
@media (prefers-reduced-motion: no-preference) {
  .checkin-stamps .stamped:not(:has(+ .stamped)) { animation: motion-checked .34s ease-out both; }
}

.garden-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(104px, 42%);
  align-items: center;
  gap: 6px;
  min-height: 162px;
  width: 100%;
  padding: clamp(16px, 3.5vw, 24px);
  border: 1px solid #34564e;
  border-radius: 21px;
  background: radial-gradient(ellipse at 82% 58%, #365952 0%, #173331 42%, #102523 75%);
  color: #fbf5df;
  overflow: hidden;
}
.garden-copy { display: grid; align-content: center; gap: 6px; }
.garden-copy h2 { color: #e9d39e; font-size: .9rem; font-weight: 700; }
.garden-copy strong { color: #fff7d9; font-size: clamp(1.45rem, 5vw, 1.85rem); line-height: 1.18; }
.garden-copy p { margin: 0; color: #dbe6d7; font-size: .78rem; }
.garden-copy .garden-flowers { color: #f3d78e; }
.garden-progress { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; width: min(100%, 156px); margin: 4px 0; }
.garden-progress i { height: 5px; border-radius: 6px; background: #4b6860; }
.garden-progress i.lit { background: #efd17b; box-shadow: 0 0 7px #ecc57175; }
.garden-plant {
  width: 100%;
  max-width: 176px;
  aspect-ratio: 1;
  justify-self: center;
  background: url("./art/garden-stages.png") 0 0 / 200% 200% no-repeat;
  filter: drop-shadow(0 8px 8px #081d22b3);
}
.garden-card[data-stage="1"] .garden-plant { background-position: 100% 0; }
.garden-card[data-stage="2"] .garden-plant { background-position: 0 100%; }
.garden-card[data-stage="3"] .garden-plant { background-position: 100% 100%; }

.social-page { display: grid; min-width: 0; gap: 18px; }
.camp-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: end;
  min-height: clamp(242px, 36vw, 365px);
  overflow: hidden;
  padding: clamp(22px, 4.5vw, 50px);
  border: 1px solid #35574f;
  border-radius: 24px;
  background: #082523 url("./art/camp-night.jpg") 57% 17% / cover no-repeat;
  box-shadow: 0 10px 29px #052b2729;
  color: #faf2dd;
}
.camp-hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(78deg, #061b24df 1%, #071a24bb 33%, #06212d20 68%),
    linear-gradient(0deg, #060f22a8 0%, transparent 45%);
  content: "";
}
.camp-hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 86% 66%, #f4be6433, transparent 12%);
  opacity: .65;
  pointer-events: none;
  content: "";
}
.camp-hero h1 { font-family: Georgia, "Songti SC", "Noto Serif CJK SC", serif; font-size: clamp(2.4rem, 7vw, 4rem); letter-spacing: .035em; text-shadow: 0 2px 16px #020c10; }
.camp-hero p { margin-top: 6px; color: #dedecd; }
.camp-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.camp-actions .button { background: #ead4a1; color: #273326; }
.camp-actions .button:hover { background: #f7e4bc; color: #273326; }
.camp-actions .button.ghost { background: #0c232195; color: #f9f0d4; border-color: #adba9787; }
.camp-actions .button.ghost:hover { background: #1b443e; }
.camp-actions .button:focus-visible { outline-color: #fff5d1; }
.camp-heading { color: #213b33; font-weight: 830; }
.camp-composer { border-color: #cbd7bb; background: #f2f7e8; }
.camp-composer summary, .camp-archive summary { min-height: 30px; align-content: center; font-weight: 730; }
.camp-archive { padding: 8px 12px; color: var(--accent); }
.camp-composer form { justify-items: start; }
.invite-drills { width: 100%; min-inline-size: 0; margin: 0; padding: 0; border: none; }
.invite-drills legend { margin-bottom: 8px; color: var(--ink); font-size: .9rem; font-weight: 650; }
.invite-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.invite-options label { position: relative; min-width: 0; cursor: pointer; }
.invite-options input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; opacity: 0; }
.invite-options span {
  display: grid;
  min-height: 44px;
  place-items: center;
  padding: 6px 8px;
  border: 1px solid #b8c6b3;
  border-radius: 9px;
  background: #fcfdf8;
  color: #284435;
  font-size: .88rem;
  text-align: center;
}
.invite-options input:checked + span { border-color: #4c6856; background: #dbe9bb; }
.invite-options input:focus-visible + span { outline: 2px solid #456f58; outline-offset: 2px; }
.social-page .feed-layout {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1.66fr) minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}
.social-page .feed-layout > .feed-list { grid-column: 1; }
.social-page .feed-layout > .camp-sidebar { grid-column: 2; grid-row: 1 / span 2; }
.social-page .feed-list { display: grid; min-width: 0; gap: 12px; }
.social-page :is(.feed-composer, .people-panel, .feed-post) {
  display: grid;
  min-width: 0;
  gap: 13px;
  padding: clamp(15px, 3vw, 22px);
  border: 1px solid var(--line);
  border-radius: 21px;
  background: var(--paper);
  box-shadow: var(--surface-shadow);
  overflow-wrap: anywhere;
}
.social-page :is(.feed-composer, .people-panel) h2 { font-weight: 800; letter-spacing: -.025em; }
.social-page .feed-composer { border-color: #cad5bd; }
.social-page .feed-composer textarea { min-height: 72px; }
.social-page .feed-composer .button { justify-self: start; }
.camp-quest {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 13px 11px;
  border: 1px solid #c1c9a8;
  border-radius: 13px;
  background: linear-gradient(105deg, #f1edcf, #e6edd7 72%, #dfeadc);
}
.quest-seal {
  display: grid;
  width: 38px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid #b5aa71;
  border-radius: 11px;
  background: linear-gradient(135deg, #4e6852, #213f39);
  box-shadow: inset 0 0 0 2px #d5c58c24;
  color: #fbebba;
  font-family: Georgia, "Songti SC", serif;
  font-weight: 800;
}
.quest-test { margin-bottom: 2px; color: #4e5a3d; font-size: .77rem; }
.quest-focus { margin-top: 1px; color: #476252; font-size: .78rem; }
.camp-quest h3 { color: #213d34; font-size: 1.06rem; }
.camp-quest .button { min-height: 43px; padding-inline: 12px; white-space: nowrap; }
.camp-quest[data-quest-state="ready"] {
  border-color: #c5a76b;
  background: linear-gradient(115deg, #fcf0c8, #f3e7c3 63%, #e9edda);
  box-shadow: 0 0 0 2px #d8b97828;
}
.camp-quest[data-quest-state="ready"] .button {
  background: #73582a;
  border-color: #73582a;
  color: #fff6dd;
}
.camp-quest[data-quest-state="ready"] .button:hover { background: #5f471f; }
.quest-meta { grid-column: 2 / -1; margin: 0; color: #484938; font-size: .8rem; }
.quest-replies { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.quest-replies strong, .quest-status { color: #254e39; }
.quest-status { font-size: .85rem; white-space: nowrap; }
.quest-return {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 9px 16px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d1b774;
  border-radius: 14px;
  background: #faf2d2;
  color: #54421e;
}
.quest-return .button { background: #73582a; }
.quest-return .button:hover { background: #5f471f; }
.social-page :is(.post-meta,.friend-row) { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 10px; }
.social-page :is(.post-meta,.friend-row) > div { min-width: 0; }
.social-page .post-avatar {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  background: var(--accent-pale);
  color: var(--forest);
  font-size: .9rem;
  font-weight: 800;
}
.social-page .post-meta :is(time,.small,.muted) { color: var(--muted); font-size: .8rem; }
.social-page .post-text { margin-block: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.62; }
.social-page .post-checkin { width: fit-content; padding: 3px 9px; color: var(--forest); background: var(--accent-pale); border-radius: 9px; font-size: .86rem; font-weight: 730; }
.social-page .comment-row { padding: 9px 12px; border-radius: 12px; background: var(--canvas); }
.social-page .comment-row p { white-space: pre-wrap; }
.social-page .comment-row .button { margin-top: 5px; min-height: 34px; font-size: .8rem; }
.social-page :is(.post-actions,.friend-actions) { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 6px; }
.social-page .post-actions { padding-top: 9px; border-top: 1px solid var(--line); }
.social-page :is(.post-actions,.friend-actions) .button { min-height: 44px; padding-inline: 11px; font-size: .85rem; }
.social-page .post-actions button[aria-pressed="true"] { border-color: #9db75c; background: var(--lime); color: #202907; }
.social-page .friend-row { padding: 9px 0 0; border-top: 1px solid var(--line); }
.social-page .friend-row .friend-menu { margin-left: auto; }
.social-page .friend-menu summary { list-style: none; min-height:44px; display:grid; align-content:center; padding:0 6px; }
.social-page .invite-code {
  display: inline-block;
  max-width: 100%;
  padding: 9px 12px;
  border: 1px dashed #aabda9;
  border-radius: 11px;
  background: #eff2e6;
  color: var(--forest);
  font-family: ui-monospace, monospace;
  font-weight: 680;
  overflow-wrap: anywhere;
  user-select: all;
}
.social-page .feed-empty { padding: 17px; border: 1px dashed #cbd5c3; border-radius: 17px; background: var(--paper); color: var(--muted); }

.fit-share {
  display: grid;
  min-width: 0;
  gap: 9px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--canvas);
}
.fit-share legend { padding-inline: 5px; color: var(--forest); font-weight: 750; }
.fit-share label:has(input:is([type=radio],[type=checkbox])) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
  cursor: pointer;
}
.fit-share label:has(input:checked) { border-color: #86a745; background: var(--accent-pale); }
.fit-share input:is([type=radio],[type=checkbox]) {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
  accent-color: var(--accent);
}
.sport-card {
  display: grid;
  min-width: 0;
  gap: 7px;
  padding: 12px 14px;
  border: 1px solid #cad5bd;
  border-inline-start: 3px solid var(--accent);
  border-radius: 13px;
  background: var(--accent-pale);
  color: var(--forest);
  overflow-wrap: anywhere;
}
.sport-card :is(h3,strong) { font-weight: 790; }
.sport-card strong { font-variant-numeric: tabular-nums; }
.sport-card p + p { margin-top: 0; }
.sport-card .button { justify-self: start; }

body:has(.login-layout) { background: #f8f6ee; }
.login-layout {
  width: min(100%, 1010px);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(15px, 4vw, 42px);
  grid-template-columns: minmax(0, 1.17fr) minmax(0, 1fr);
  gap: clamp(14px, 3vw, 31px);
  color: var(--ink);
}
.login-blurb { max-width: none; min-width: 0; min-height: 300px; align-content: center; padding: clamp(22px, 5vw, 42px); border-radius: 27px; }
.login-blurb .login-logo { width: 62px; height: 62px; border-radius: 17px; margin: 0 0 2px; }
.login-blurb h1 { font-size: clamp(2rem, 5.5vw, 3.1rem); font-weight: 850; letter-spacing: -.06em; }
.login-blurb p { color: #dce7d8; }
.login-blurb p.kicker { color: var(--lime); }
.login-panel { min-width: 0; background: var(--paper); border-color: var(--line); border-radius: 23px; padding: clamp(18px, 4vw, 29px); box-shadow: var(--surface-shadow); }
.login-panel input { font-size: 16px; }
.login-panel h2 { font-size: 1.3rem; font-weight: 790; }
.login-panel .button { min-height: 48px; border-radius: 13px; }

@media (max-width: 720px) {
  .student-header-inner { min-height: 58px; padding: calc(7px + env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 7px max(14px, env(safe-area-inset-left)); }
  .student-main.outer { padding: 17px max(13px, env(safe-area-inset-right)) calc(94px + env(safe-area-inset-bottom)) max(13px, env(safe-area-inset-left)); }
  .student-shell .footer { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
  .student-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(5,minmax(0,1fr));
    width: 100%;
    margin: 0;
    padding: 6px max(8px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    border-width: 1px 0 0;
    border-radius: 0;
    box-shadow: 0 -3px 16px rgb(20 44 37 / 5%);
  }
  .student-nav button { flex-direction: column; min-height: 50px; gap: 3px; padding: 4px 2px; font-size: .76rem; }
  .day-view { gap: 14px; }
  .today-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .daily-hero { min-height: 195px; }
  .daily-hero::after, .login-blurb::after { inset-inline-end: -187px; }
  .week-card { gap: 12px; }
  .day-secondary { grid-template-columns: minmax(0, 1fr); }
  .social-page .feed-layout { grid-template-columns: minmax(0, 1fr); }
  .social-page .feed-layout > .camp-sidebar { grid-column: 1; grid-row: auto; }
  .login-layout { grid-template-columns: minmax(0, 1fr); align-content: center; }
  .login-blurb { min-height: 218px; }
}
@media (max-width: 640px) {
  .rating-options { grid-template-columns: repeat(6, minmax(0,1fr)); }
}
@media (max-width: 365px) {
  .flow-card { padding-inline: 10px; }
  .rating-options { gap: 3px; }
  .hero-actions .button { padding-inline: 12px; }
  .week-strip { gap: 2px; }
  .fit-share, .sport-card { padding-inline: 10px; }
  .camp-quest { grid-template-columns: auto minmax(0,1fr); }
  .camp-quest :is(.button, .quest-status) { grid-column: 2; justify-self: start; }
}

@keyframes motion-enter {
  from { opacity: .78; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}
@keyframes motion-respond {
  0% { transform: scale(.93); }
  55% { transform: scale(1.06); }
  100% { transform: none; }
}
@keyframes motion-track {
  from { opacity: .55; transform: translate(14px, 7px) rotate(-34deg); }
  to { opacity: 1; transform: rotate(-37deg); }
}
@keyframes motion-checked {
  0% { opacity: .65; transform: scale(.75); }
  65% { opacity: 1; transform: scale(1.16); }
  100% { opacity: 1; transform: none; }
}
@keyframes motion-dots {
  0% { opacity: 0; transform: scale(.25); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.25); }
}

@media (prefers-reduced-motion: no-preference) {
  .student-shell, .login-layout { --motion-ease: cubic-bezier(.2, .72, .26, 1); }
  .student-shell .daily-hero, .login-layout .login-blurb { animation: 270ms var(--motion-ease) motion-enter both; }
  .student-shell .daily-hero::after, .login-layout .login-blurb::after { animation: 390ms var(--motion-ease) motion-track both; }
  .student-shell .week-strip { animation: 250ms var(--motion-ease) 45ms motion-enter both; }
  .student-shell .week-day.current.logged .day-dot { animation: 285ms var(--motion-ease) 40ms motion-checked both; }
  .student-shell .exercise-view .flow-card { animation: 210ms var(--motion-ease) motion-enter both; }
  .student-shell .exercise-timer :is(.timer,[data-timer]) { animation: 250ms var(--motion-ease) motion-enter both; }

  .student-shell :is(.button,.student-nav button,.rating-options span), .login-layout .button {
    transition: transform 150ms var(--motion-ease), background-color 150ms ease, border-color 150ms ease;
  }
  .student-shell :is(.button:not(:disabled),.student-nav button):active,
  .login-layout .button:not(:disabled):active { transform: scale(.97); }
  .student-shell .rating-options label:active span { transform: scale(.94); }
  .student-shell .rating-options input:checked + span { animation: 245ms var(--motion-ease) motion-respond; }
  .student-shell .student-nav button:is(.active,[aria-current="page"]) .nav-symbol { animation: 215ms var(--motion-ease) motion-respond; }

  .student-shell .celebration { animation: 240ms var(--motion-ease) motion-enter both; }
  .student-shell .celebration-mark { position: relative; animation: 325ms var(--motion-ease) motion-checked both; }
  .student-shell .celebration-mark::after {
    position: absolute;
    inset: 1px 0 auto auto;
    width: 5px;
    height: 5px;
    border-radius: 100%;
    background: var(--accent);
    box-shadow: -47px -5px var(--accent), 7px 46px #86a745, 10px -4px #86a745, -39px 49px #86a745;
    animation: 360ms ease-out 35ms motion-dots both;
    pointer-events: none;
    content: "";
  }
  .student-shell .social-page .feed-post:first-of-type { animation: 240ms var(--motion-ease) motion-enter both; }
  .student-shell .social-page .post-actions button[aria-pressed="true"] { animation: 220ms var(--motion-ease) motion-respond; }
  .camp-hero::after { animation: camp-lantern 4s ease-in-out infinite alternate; }
  .celebration .garden-plant { animation: 400ms var(--motion-ease) 100ms motion-checked both; }
}
@keyframes camp-lantern { from { opacity: .35; } to { opacity: .9; } }
@media (prefers-reduced-motion: reduce) {
  .student-shell *, .student-shell *::before, .student-shell *::after,
  .login-layout *, .login-layout *::before, .login-layout *::after {
    scroll-behavior: auto;
    animation: none;
    transition: none;
  }
}
