:root {
  color-scheme: light;
  --ink: #18352f;
  --ink-soft: #31544b;
  --muted: #77857f;
  --muted-strong: #5f716a;
  --canvas: #f4f1e8;
  --surface: #fffef9;
  --surface-alt: #faf8f1;
  --line: #e7e1d4;
  --line-strong: #d8d0c1;
  --accent: #f06b4f;
  --accent-deep: #db5338;
  --accent-soft: #ffe4da;
  --forest: #173c34;
  --forest-light: #235448;
  --lime: #daea91;
  --lime-deep: #b9d35a;
  --yellow-soft: #fff0ba;
  --green-soft: #deeee4;
  --shadow: 0 20px 55px rgba(43, 57, 49, 0.08);
  --shadow-small: 0 9px 28px rgba(43, 57, 49, 0.07);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --sidebar-width: 246px;
  --font-sans: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 95% 8%, rgba(218, 234, 145, 0.3), transparent 24rem),
    var(--canvas);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

button,
select {
  cursor: pointer;
}

svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

::selection {
  color: var(--forest);
  background: var(--lime);
}

:focus-visible {
  outline: 3px solid rgba(240, 107, 79, 0.42);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 8px 14px;
  color: white;
  background: var(--forest);
  border-radius: 8px;
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.is-hidden {
  display: none !important;
}

.auth-pending .app-shell {
  display: none;
}

.auth-screen {
  position: relative;
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.08fr) minmax(400px, 0.92fr);
  overflow: hidden;
  background: var(--canvas);
}

.auth-brand-panel {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  padding: clamp(34px, 5vw, 72px);
  color: white;
  background:
    radial-gradient(circle at 80% 18%, rgba(218, 234, 145, 0.22), transparent 19rem),
    linear-gradient(145deg, #173c34, #102d27);
}

.auth-brand {
  align-self: flex-start;
}

.auth-brand .brand-copy strong {
  color: white;
}

.auth-brand .brand-copy small {
  color: rgba(255, 255, 255, 0.5);
}

.auth-manifesto {
  position: relative;
  z-index: 2;
  max-width: 620px;
  padding: 80px 0;
}

.auth-manifesto h1 {
  margin: 22px 0 18px;
  font-size: clamp(36px, 5vw, 67px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.055em;
}

.auth-manifesto p {
  max-width: 510px;
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  line-height: 1.9;
}

.auth-feature-list {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.auth-feature-list span {
  padding: 7px 10px;
  color: rgba(255, 255, 255, 0.67);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 9px;
  font-weight: 600;
}

.auth-atmosphere {
  position: absolute;
  z-index: 0;
  border: 1px solid rgba(218, 234, 145, 0.11);
  border-radius: 50%;
  pointer-events: none;
}

.auth-atmosphere-one {
  top: -210px;
  left: 34%;
  width: 560px;
  height: 560px;
}

.auth-atmosphere-two {
  bottom: -280px;
  left: 12%;
  width: 620px;
  height: 620px;
}

.auth-form-panel {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 36px clamp(24px, 6vw, 88px);
  background:
    radial-gradient(circle at 100% 0, rgba(218, 234, 145, 0.28), transparent 21rem),
    var(--surface);
}

.auth-form,
.auth-loading {
  width: min(100%, 420px);
}

.auth-form h2 {
  margin: 7px 0 9px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.auth-intro {
  margin: 0 0 28px;
  color: var(--muted-strong);
  font-size: 11px;
  line-height: 1.75;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}

.auth-field label {
  font-size: 11px;
  font-weight: 600;
}

.auth-field small {
  color: var(--muted);
  font-size: 8px;
}

.auth-field input {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  color: var(--ink);
  background: var(--surface-alt);
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  outline: none;
}

.auth-field input:focus {
  background: white;
  border-color: #dc9d8f;
  box-shadow: 0 0 0 4px rgba(240, 107, 79, 0.08);
}

.consent-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: flex-start;
  padding: 12px;
  margin: 7px 0 14px;
  color: var(--muted-strong);
  background: #fbf8ef;
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 9px;
  line-height: 1.7;
}

.consent-check input {
  width: 15px;
  height: 15px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.consent-check a {
  color: var(--accent-deep);
  font-weight: 600;
}

.auth-submit {
  min-height: 49px;
}

.auth-error {
  min-height: 20px;
  margin: 0 0 8px;
  color: #b54b38;
  font-size: 10px;
}

.form-message {
  min-height: 0;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.form-message.is-error {
  color: #b54b38;
}

.form-message.is-success {
  color: #2e7558;
}

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

.auth-loading {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 12px;
  color: var(--muted-strong);
  text-align: center;
}

.auth-loading strong {
  color: var(--ink);
  font-size: 15px;
}

.auth-loading p {
  margin: 0;
  font-size: 11px;
}

.loading-spinner {
  width: 27px;
  height: 27px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: auth-spin 750ms linear infinite;
}

@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  padding: 28px 20px 22px;
  background: rgba(255, 254, 249, 0.92);
  border-right: 1px solid rgba(216, 208, 193, 0.75);
  backdrop-filter: blur(16px);
}

.brand,
.mobile-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  text-align: left;
  background: transparent;
  border: 0;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  flex: 0 0 auto;
  color: var(--forest);
  background: var(--lime);
  border-radius: 15px 15px 15px 5px;
  box-shadow: 0 8px 18px rgba(112, 134, 42, 0.16);
}

.brand-mark::after {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 7px;
  height: 7px;
  content: "";
  background: var(--accent);
  border: 2px solid var(--lime);
  border-radius: 50%;
}

.brand-mark span {
  font-size: 18px;
  font-weight: 700;
  transform: translateY(-1px);
}

.brand-copy,
.mobile-brand > span:last-child {
  display: flex;
  flex-direction: column;
}

.brand-copy strong,
.mobile-brand strong {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.04em;
}

.brand-copy small,
.mobile-brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.desktop-nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 42px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 12px 14px;
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 13px;
  transition:
    color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.nav-item:hover {
  color: var(--ink);
  background: var(--surface-alt);
  transform: translateX(2px);
}

.nav-item.is-active {
  color: var(--forest);
  background: #edf4d8;
  border-color: #e0eabd;
}

.nav-item svg {
  width: 20px;
  height: 20px;
}

.sidebar-spacer {
  flex: 1;
}

.coach-availability {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  margin-bottom: 12px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 15px;
}

.coach-availability div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.coach-availability strong {
  font-size: 12px;
  font-weight: 600;
}

.coach-availability small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  background: #57a976;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(87, 169, 118, 0.12);
}

.status-dot.is-demo {
  background: #e6a93f;
  box-shadow: 0 0 0 4px rgba(230, 169, 63, 0.14);
}

.status-dot.is-offline {
  background: #b7635b;
  box-shadow: 0 0 0 4px rgba(183, 99, 91, 0.13);
}

.sidebar-profile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 14px;
}

.sidebar-profile:hover {
  background: var(--surface-alt);
  border-color: var(--line);
}

.sidebar-profile > svg {
  width: 16px;
  color: var(--muted);
}

.sidebar-profile-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.sidebar-profile-copy strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-profile-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  flex: 0 0 auto;
  color: white;
  background: var(--forest);
  border-radius: 50% 50% 50% 15%;
  font-size: 13px;
  font-weight: 700;
}

.avatar-large {
  width: 50px;
  height: 50px;
  font-size: 17px;
}

.main-content {
  width: calc(100% - var(--sidebar-width));
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  z-index: 15;
  top: 0;
  display: flex;
  align-items: center;
  min-height: 72px;
  padding: 12px clamp(24px, 4vw, 64px);
  background: rgba(244, 241, 232, 0.83);
  border-bottom: 1px solid rgba(216, 208, 193, 0.3);
  backdrop-filter: blur(16px);
}

.mobile-brand {
  display: none;
}

.topbar-spacer {
  flex: 1;
}

.connection-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 6px 12px;
  color: var(--muted-strong);
  background: rgba(255, 254, 249, 0.76);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.connection-pill .status-dot {
  width: 6px;
  height: 6px;
  box-shadow: none;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 12px;
  margin-left: 9px;
  color: var(--forest);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.icon-button svg {
  width: 16px;
  height: 16px;
}

.account-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 4px 10px 4px 5px;
  margin-left: 8px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.account-pill:hover {
  background: var(--surface-alt);
}

.account-avatar {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: white;
  background: var(--forest);
  border-radius: 50% 50% 50% 9px;
  font-size: 9px;
  font-weight: 700;
}

.account-copy {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  flex-direction: column;
}

.account-copy strong {
  overflow: hidden;
  max-width: 100px;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy small {
  color: var(--muted);
  font-size: 8px;
}

.logout-button {
  display: grid;
  width: 34px;
  height: 34px;
  margin-left: 5px;
  place-items: center;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 9px;
}

.logout-button:hover {
  color: var(--accent-deep);
  background: var(--accent-soft);
}

.logout-button svg {
  width: 17px;
  height: 17px;
}

.is-student .student-roster {
  display: none;
}

.is-student .coach-only {
  display: none !important;
}

.view {
  display: none;
  width: min(100%, 1360px);
  padding: clamp(28px, 4vw, 52px) clamp(24px, 4vw, 64px) 70px;
  margin: 0 auto;
  animation: view-in 320ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.view.is-active {
  display: block;
}

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

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 30px;
}

.page-heading h1 {
  max-width: 780px;
  margin: 5px 0 8px;
  font-size: clamp(27px, 3vw, 40px);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.04em;
}

.page-intro {
  max-width: 650px;
  margin: 0;
  color: var(--muted-strong);
  font-size: 14px;
}

.eyebrow {
  display: inline-block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.primary-button,
.secondary-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 17px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 13px;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.primary-button {
  color: white;
  background: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: 0 8px 18px rgba(219, 83, 56, 0.19);
}

.primary-button:hover {
  background: var(--accent-deep);
  box-shadow: 0 10px 24px rgba(219, 83, 56, 0.25);
  transform: translateY(-1px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.secondary-button {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
}

.secondary-button:hover {
  background: #f6f3e9;
  transform: translateY(-1px);
}

.text-button,
.mini-link,
.clear-chat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px;
  color: var(--accent-deep);
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 700;
}

.text-button svg {
  width: 15px;
}

.full-width {
  width: 100%;
}

.student-roster {
  padding: 22px;
  margin-bottom: 16px;
  background: rgba(255, 254, 249, 0.75);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.alert-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 15px;
  margin-bottom: 14px;
  color: #774d21;
  background: #fff4d4;
  border: 1px solid #efd99e;
  border-radius: 14px;
}

.quick-checkin {
  padding: 18px;
  margin-bottom: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-small);
}

.week-overview {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.85fr);
  gap: 20px;
  align-items: center;
  padding: clamp(24px, 4vw, 38px);
  margin-bottom: 14px;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 95% 0, rgba(218, 234, 145, 0.25), transparent 17rem),
    linear-gradient(135deg, #15392f, #1f5143);
  border-radius: 27px;
  box-shadow: 0 24px 60px rgba(23, 60, 52, 0.18);
}

.plan-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.plan-title-row h1 {
  margin: 4px 0 3px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.25;
  letter-spacing: -0.045em;
}

.cycle-badge {
  flex: 0 0 auto;
  padding: 8px 12px;
  margin-top: 8px;
  color: var(--forest);
  background: var(--lime);
  border: 1px solid var(--lime-deep);
  border-radius: 999px;
  font-size: 10px;
}

.cycle-badge strong {
  font-size: 13px;
}

.weight-progress-card {
  position: relative;
  padding: 18px 24px 22px;
  margin-bottom: 12px;
  background:
    radial-gradient(circle at 50% 0, rgba(218, 234, 145, 0.22), transparent 16rem),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-small);
}

.weight-progress-card .semi-progress {
  width: min(100%, 360px);
}

.weight-progress-card .semi-track {
  stroke: #edf0e5;
}

.weight-progress-card .semi-center strong {
  color: var(--forest);
  font-size: 34px;
}

.weight-progress-card .semi-center span {
  color: var(--muted);
}

.weight-progress-card .weight-labels {
  margin-top: -10px;
}

.weight-progress-card .weight-labels small {
  color: var(--muted);
}

.weight-progress-card .weight-labels strong {
  color: var(--ink);
  font-size: 13px;
}

.weight-progress-card .weight-label-target strong {
  color: var(--accent-deep);
}

.weight-progress-card > .week-pill {
  position: absolute;
  top: 17px;
  left: 18px;
  color: #58712e;
  background: #eef6d7;
  border-color: #dbe8b1;
}

.weekly-report-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 11px;
  align-items: center;
  width: 100%;
  padding: 13px 15px;
  margin-bottom: 12px;
  text-align: left;
  background: linear-gradient(110deg, #f9fbf2, #fffef9);
  border: 1px solid #dfe8c7;
  border-radius: 15px;
}

.weekly-report-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--forest);
  background: var(--lime);
  border-radius: 10px;
}

.weekly-report-icon svg {
  width: 16px;
  height: 16px;
}

.weekly-report-banner > span:nth-child(2) {
  display: flex;
  flex-direction: column;
}

.weekly-report-banner small {
  color: var(--muted);
  font-size: 8px;
}

.weekly-report-banner strong {
  font-size: 10px;
}

.weekly-report-action {
  color: var(--accent-deep);
  font-size: 8px;
  font-weight: 700;
}

.weekly-report-banner > svg {
  width: 15px;
  color: var(--muted);
}

.week-overview::after {
  position: absolute;
  right: -90px;
  bottom: -160px;
  width: 330px;
  height: 330px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.week-overview-copy {
  position: relative;
  z-index: 1;
}

.week-overview-copy .eyebrow {
  color: var(--lime);
}

.week-overview-copy h1 {
  margin: 7px 0 9px;
  font-size: clamp(34px, 4.7vw, 58px);
  line-height: 1.15;
  letter-spacing: -0.05em;
}

.week-overview-copy .page-intro {
  max-width: 500px;
  color: rgba(255, 255, 255, 0.64);
}

.week-status-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
}

.week-pill {
  padding: 5px 9px;
  color: var(--lime);
  background: rgba(218, 234, 145, 0.1);
  border: 1px solid rgba(218, 234, 145, 0.18);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
}

.week-status-row .text-button {
  color: rgba(255, 255, 255, 0.82);
}

.semi-progress {
  position: relative;
  z-index: 1;
  width: min(100%, 360px);
  margin: 0 auto;
}

.semi-progress svg {
  width: 100%;
  height: auto;
}

.semi-track,
.semi-value {
  fill: none;
  stroke-width: 14;
  stroke-linecap: round;
}

.semi-track {
  stroke: rgba(255, 255, 255, 0.11);
}

.semi-value {
  stroke: url("#weightProgressGradient");
  transition: stroke-dasharray 500ms ease;
}

.semi-center {
  position: absolute;
  top: 44%;
  left: 50%;
  display: flex;
  align-items: center;
  flex-direction: column;
  transform: translate(-50%, -50%);
}

.semi-center strong {
  color: var(--lime);
  font-size: 29px;
  line-height: 1.1;
}

.semi-center span {
  color: rgba(255, 255, 255, 0.52);
  font-size: 8px;
}

.weight-labels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: -18px;
  text-align: center;
}

.weight-labels > span {
  display: flex;
  flex-direction: column;
}

.weight-labels small {
  color: rgba(255, 255, 255, 0.46);
  font-size: 8px;
}

.weight-labels strong {
  font-size: 11px;
}

.weight-label-target strong {
  color: var(--lime);
}

.coach-care-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 13px;
  align-items: center;
  padding: 17px 19px;
  margin-bottom: 14px;
  background: linear-gradient(110deg, #fffaf0, #fffef9 65%);
  border: 1px solid #ece1ca;
  border-radius: 18px;
  box-shadow: var(--shadow-small);
}

.coach-care-avatar {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  color: var(--forest);
  background: var(--lime);
  border-radius: 50% 50% 50% 14px;
  font-size: 12px;
  font-weight: 700;
}

.coach-care-copy {
  min-width: 0;
}

.coach-care-copy h2 {
  margin: 2px 0;
  font-size: 13px;
  font-weight: 700;
}

.coach-care-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.voice-play-button {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 10px;
  color: var(--forest);
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.voice-play-button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.voice-play-button small {
  color: var(--muted);
  font-size: 8px;
}

.voice-wave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 15px;
}

.voice-wave i {
  width: 2px;
  height: 5px;
  background: var(--forest);
  border-radius: 2px;
}

.voice-play-button.is-playing .voice-wave i {
  animation: voice-bar 700ms ease-in-out infinite alternate;
}

.voice-play-button.is-playing .voice-wave i:nth-child(2) {
  animation-delay: 100ms;
}

.voice-play-button.is-playing .voice-wave i:nth-child(3) {
  animation-delay: 200ms;
}

.voice-play-button.is-playing .voice-wave i:nth-child(4) {
  animation-delay: 300ms;
}

.voice-play-button.is-playing .voice-wave i:nth-child(5) {
  animation-delay: 400ms;
}

@keyframes voice-bar {
  to {
    height: 15px;
  }
}

.care-expand {
  padding: 7px 9px;
  color: var(--accent-deep);
  background: transparent;
  border: 0;
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.care-task-details {
  grid-column: 2 / -1;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.care-task-details p {
  margin: 5px 0;
  color: var(--muted-strong);
  font-size: 9px;
}

.legacy-home-dashboard {
  display: none;
}

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

.quick-checkin-heading h2 {
  margin: 2px 0 2px;
  font-size: 18px;
}

.quick-checkin-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.quick-checkin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.weight-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  padding: 5px 0;
}

.weight-number-input {
  width: 130px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: none;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  appearance: textfield;
}

.weight-number-input::-webkit-inner-spin-button,
.weight-number-input::-webkit-outer-spin-button {
  appearance: none;
}

.weight-display > span {
  color: var(--muted);
  font-size: 10px;
}

.quick-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
}

.scale-sync-button {
  min-height: 32px;
  color: var(--ink-soft);
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-size: 8px;
  font-weight: 700;
}

.quick-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.quick-card-weight {
  background: #f7f3e9;
}

.quick-card-water {
  background: #eef7f5;
}

.quick-card-diet {
  background: #f8f5e5;
}

.quick-card-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}

.quick-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  flex: 0 0 auto;
  color: var(--forest);
  background: white;
  border-radius: 9px;
}

.quick-icon svg {
  width: 15px;
  height: 15px;
}

.quick-card-head > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.quick-card-head strong {
  font-size: 10px;
}

.quick-card-head span {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-input-row,
.quick-diet-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: end;
}

.quick-input-row input,
.quick-diet-row textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  font-size: 11px;
}

.quick-diet-row textarea {
  resize: vertical;
}

.quick-save {
  min-height: 38px;
  padding: 8px 10px;
  color: white;
  background: var(--forest);
  border: 1px solid var(--forest);
  border-radius: 9px;
  font-size: 9px;
  font-weight: 700;
}

.quick-save:hover {
  background: var(--forest-light);
}

.water-quick-actions {
  display: flex;
  gap: 6px;
}

.water-quick-circles {
  justify-content: space-around;
}

.water-quick-circles button {
  display: flex;
  width: 62px;
  height: 62px;
  min-height: 62px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  flex-direction: column;
  color: #28685d;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #c7ddd8;
  border-radius: 50%;
}

.water-quick-circles button strong {
  font-size: 10px;
}

.water-quick-circles button small {
  font-size: 7px;
}

.photo-checkin-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 58px;
  color: var(--forest);
  background: rgba(255, 255, 255, 0.78);
  border: 1px dashed #d9c88f;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

.photo-checkin-button > span {
  font-size: 18px;
}

.photo-checkin-button small {
  color: var(--muted);
  font-size: 7px;
  font-weight: 400;
}

.meal-chips {
  display: flex;
  gap: 4px;
  margin: 7px 0;
}

.meal-chips button {
  flex: 1;
  padding: 4px 5px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 7px;
}

.calorie-budget-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  margin: 7px 0;
}

.calorie-budget-row span {
  color: var(--muted);
  font-size: 8px;
}

.calorie-budget-row input {
  min-height: 30px;
  padding: 5px 8px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 9px;
}

.calorie-budget-row button {
  min-height: 30px;
  padding: 5px 8px;
  color: var(--forest);
  background: var(--lime);
  border: 1px solid var(--lime-deep);
  border-radius: 7px;
  font-size: 8px;
  font-weight: 700;
}

.quick-card-training {
  color: white;
  background: linear-gradient(145deg, #315d50, #1b3d34);
  border-color: transparent;
}

.quick-card-fasting {
  order: 1;
  color: white;
  background: linear-gradient(145deg, #315d50, #1b3d34);
  border-color: transparent;
}

.quick-card-diet {
  order: 2;
}

.quick-card-weight {
  order: 3;
}

.quick-card-water {
  order: 4;
}

.quick-card-fasting .quick-icon {
  color: var(--lime);
  background: rgba(255, 255, 255, 0.1);
}

.quick-card-fasting .quick-card-head span {
  color: rgba(255, 255, 255, 0.52);
}

.fasting-timer {
  padding: 5px 0 2px;
  color: var(--lime);
  font-size: 34px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.04em;
}

.fasting-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.fasting-actions span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 8px;
}

.fasting-actions button {
  min-height: 34px;
  padding: 6px 11px;
  color: var(--forest);
  background: var(--lime);
  border: 0;
  border-radius: 9px;
  font-size: 9px;
  font-weight: 700;
}

.recipe-link {
  padding: 3px 0;
  color: var(--accent-deep);
  background: transparent;
  border: 0;
  font-size: 8px;
  font-weight: 700;
}

.health-record-section {
  padding: 18px;
  margin-top: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-small);
}

.health-record-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.health-card {
  background: #faf9f4;
}

.health-card-value {
  min-height: 30px;
  margin: 4px 0 9px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.health-score-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 3px 0 8px;
}

.health-score-row strong {
  color: var(--forest);
  font-size: 25px;
}

.health-score-row span {
  color: var(--muted);
  font-size: 8px;
}

.bowel-options {
  display: flex;
  gap: 5px;
}

.bowel-options button {
  flex: 1;
  padding: 6px 4px;
  color: var(--muted-strong);
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 8px;
}

.bowel-options button.is-selected {
  color: var(--forest);
  background: var(--lime);
  border-color: var(--lime-deep);
  font-weight: 700;
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.recipe-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.recipe-card > span {
  color: var(--accent-deep);
  font-size: 8px;
  font-weight: 700;
}

.recipe-card h2 {
  margin: 6px 0;
  font-size: 15px;
}

.recipe-card p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.weekly-report-dialog {
  width: min(560px, calc(100% - 28px));
  padding: 28px;
}

.weekly-report-dates {
  margin: 8px 0 17px;
  color: var(--muted);
  font-size: 10px;
}

.weekly-report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.weekly-report-stat {
  padding: 13px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.weekly-report-stat span {
  display: block;
  color: var(--muted);
  font-size: 8px;
}

.weekly-report-stat strong {
  font-size: 18px;
}

.weekly-report-note {
  padding: 12px;
  margin-top: 12px;
  color: var(--muted-strong);
  background: #f4f8e9;
  border-radius: 10px;
  font-size: 9px;
}

.quick-card-training .quick-icon {
  color: var(--lime);
  background: rgba(255, 255, 255, 0.1);
}

.quick-card-training .quick-card-head span {
  color: rgba(255, 255, 255, 0.52);
}

.training-quick-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}

.training-start {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: var(--forest);
  background: var(--lime);
  border: 0;
  border-radius: 50%;
}

.training-start svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.training-quick-actions > div {
  display: flex;
  flex-direction: column;
}

.training-quick-actions > div strong {
  font-size: 10px;
}

.training-quick-actions > div span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 7px;
}

.training-downgrade {
  padding: 6px 8px;
  color: var(--lime);
  background: rgba(218, 234, 145, 0.08);
  border: 1px solid rgba(218, 234, 145, 0.18);
  border-radius: 7px;
  font-size: 8px;
  font-weight: 700;
}

.fab-container {
  position: fixed;
  z-index: 35;
  right: 28px;
  bottom: 28px;
}

.fab-main {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: white;
  background: var(--forest);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 15px 35px rgba(23, 60, 52, 0.3);
}

.fab-main svg {
  width: 26px;
  height: 26px;
  transition: transform 180ms ease;
}

.fab-main[aria-expanded="true"] svg {
  transform: rotate(45deg);
}

.fab-menu {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.fab-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  color: var(--ink);
  background: rgba(255, 254, 249, 0.97);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-small);
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
}

.camp-placeholder {
  display: flex;
  min-height: 360px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 40px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.camp-placeholder-icon {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  color: var(--forest);
  background: var(--lime);
  border-radius: 20px;
}

.camp-placeholder h2 {
  margin: 18px 0 6px;
}

.camp-placeholder p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
}

.mine-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mine-profile-card {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 13px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.mine-profile-card > div {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.mine-profile-card strong {
  font-size: 16px;
}

.mine-profile-card span {
  color: var(--muted);
  font-size: 9px;
}

.mine-link-card {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  padding: 19px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.mine-link-card strong {
  font-size: 12px;
}

.mine-link-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.water-quick-actions button {
  flex: 1;
  min-height: 38px;
  padding: 7px 5px;
  color: #28685d;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #cfe2de;
  border-radius: 9px;
  font-size: 8px;
  font-weight: 700;
}

.water-quick-actions button:hover {
  background: white;
}

.quick-card .water-quick-circles button {
  flex: 0 0 70px;
  width: 70px;
  height: 70px;
  min-height: 70px;
  padding: 0;
  border-radius: 50%;
}

.quick-checkin .form-message {
  margin-bottom: 0;
}

.live-monitor {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 13px;
  margin-bottom: 10px;
  color: var(--ink-soft);
  background: rgba(237, 244, 216, 0.72);
  border: 1px solid #dfe8be;
  border-radius: 13px;
}

.live-monitor-dot {
  width: 8px;
  height: 8px;
  background: #58a36e;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(88, 163, 110, 0.12);
  animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {
  50% {
    box-shadow: 0 0 0 7px rgba(88, 163, 110, 0.04);
  }
}

.live-monitor > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.live-monitor strong {
  font-size: 9px;
}

.live-monitor > div span,
.live-monitor-time {
  color: var(--muted);
  font-size: 8px;
}

.live-monitor button {
  padding: 5px 8px;
  color: var(--forest);
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  font-size: 8px;
  font-weight: 700;
}

.checkin-gentle-note {
  padding: 11px 13px;
  margin-bottom: 12px;
  color: var(--muted-strong);
  background: #f8f6ed;
  border: 1px dashed var(--line-strong);
  border-radius: 11px;
  font-size: 9px;
  line-height: 1.7;
}

.alert-banner-icon {
  display: grid;
  width: 33px;
  height: 33px;
  place-items: center;
  color: #986722;
  background: #ffe7a4;
  border-radius: 10px;
}

.alert-banner-icon svg {
  width: 16px;
  height: 16px;
}

.alert-banner > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.alert-banner strong {
  font-size: 10px;
}

.alert-banner span {
  overflow: hidden;
  color: #977746;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alert-banner button {
  padding: 6px 9px;
  color: #835b24;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(151, 103, 34, 0.2);
  border-radius: 8px;
  font-size: 8px;
  font-weight: 700;
}

.roster-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 15px;
}

.roster-heading h2 {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

.roster-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.student-count {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}

.add-student-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  color: var(--forest);
  background: var(--lime);
  border: 1px solid var(--lime-deep);
  border-radius: 10px;
  font-size: 9px;
  font-weight: 700;
}

.add-student-button:hover {
  background: #d3e57e;
}

.add-student-button svg {
  width: 14px;
  height: 14px;
}

.student-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 9px;
}

.student-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 88px;
  padding: 13px;
  text-align: left;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.student-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-small);
  transform: translateY(-1px);
}

.student-card.is-selected {
  background: linear-gradient(135deg, #f8fbeb, white 72%);
  border-color: var(--lime-deep);
  box-shadow: 0 0 0 2px rgba(185, 211, 90, 0.16);
}

.student-card.is-selected::after {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 7px;
  height: 7px;
  content: "";
  background: var(--accent);
  border-radius: 50%;
}

.student-card .avatar {
  width: 38px;
  height: 38px;
  color: var(--forest);
  background: #e8f0ca;
  border-radius: 12px 12px 12px 4px;
}

.student-card.is-selected .avatar {
  color: white;
  background: var(--forest);
}

.student-card-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.student-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

.student-card-name {
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-card-status {
  flex: 0 0 auto;
  padding: 2px 5px;
  color: #5c7330;
  background: #eef5d8;
  border-radius: 5px;
  font-size: 7px;
  font-weight: 700;
}

.student-card-status.is-attention {
  color: #a54e3a;
  background: var(--accent-soft);
}

.student-card-meta {
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-empty-card {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px;
  color: var(--muted);
  background: var(--surface-alt);
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  font-size: 10px;
}

.student-empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.student-empty-card {
  flex: 1;
  border-style: solid;
  cursor: pointer;
}

.student-empty-card:hover {
  color: var(--ink);
  background: #f8f6ed;
  border-color: var(--lime-deep);
}

.demo-roster-button {
  min-height: 88px;
  padding: 13px 15px;
  color: var(--muted-strong);
  background: white;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  font-size: 9px;
  font-weight: 600;
}

.demo-roster-button:hover {
  color: var(--accent-deep);
  border-color: #e6aa9c;
}

.student-empty-card svg {
  width: 18px;
  height: 18px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(260px, 0.72fr);
  gap: 18px;
}

.hero-card {
  position: relative;
  display: grid;
  min-height: 304px;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 1fr auto;
  gap: 24px;
  padding: clamp(28px, 3.5vw, 42px);
  overflow: hidden;
  color: white;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 40%),
    var(--forest);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 65px rgba(23, 60, 52, 0.19);
}

.hero-card::before {
  position: absolute;
  inset: auto -50px -110px auto;
  width: 330px;
  height: 330px;
  content: "";
  background: radial-gradient(circle, rgba(218, 234, 145, 0.23), transparent 68%);
  border-radius: 50%;
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-self: start;
}

.hero-label {
  display: inline-flex;
  padding: 5px 10px;
  color: var(--lime);
  background: rgba(218, 234, 145, 0.1);
  border: 1px solid rgba(218, 234, 145, 0.18);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero-copy h2 {
  max-width: 560px;
  margin: 22px 0 12px;
  font-size: clamp(25px, 3vw, 37px);
  font-weight: 700;
  line-height: 1.33;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 515px;
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
}

.hero-action {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  align-self: end;
  gap: 6px;
  justify-self: start;
  padding: 8px 0;
  color: white;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 12px;
  font-weight: 600;
}

.hero-action svg {
  width: 15px;
  transition: transform 160ms ease;
}

.hero-action:hover svg {
  transform: translateX(4px);
}

.hero-progress {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: end;
  gap: 7px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  font-weight: 600;
}

.progress-ring {
  position: relative;
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
}

.progress-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progress-ring .ring-track {
  stroke: rgba(255, 255, 255, 0.11);
  stroke-width: 6;
}

.progress-ring .ring-value {
  stroke: var(--lime);
  stroke-width: 6;
  transition: stroke-dashoffset 420ms ease;
}

.progress-ring > span {
  color: white;
  font-size: 14px;
  font-weight: 700;
}

.hero-orbit {
  position: absolute;
  z-index: 1;
  border: 1px solid rgba(218, 234, 145, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

.orbit-one {
  top: -100px;
  right: -70px;
  width: 280px;
  height: 280px;
}

.orbit-two {
  top: -40px;
  right: -10px;
  width: 160px;
  height: 160px;
}

.profile-card {
  display: flex;
  min-height: 304px;
  flex-direction: column;
  padding: 27px;
  background: var(--surface);
  border: 1px solid rgba(231, 225, 212, 0.86);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-small);
}

.profile-card-head {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.profile-card-head h2 {
  margin: 3px 0 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}

.profile-card > p {
  margin: 19px 0;
  color: var(--muted-strong);
  font-size: 12px;
}

.goal-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 13px;
  margin-top: auto;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 11px;
}

.goal-summary span {
  color: var(--muted);
}

.goal-summary strong {
  font-size: 12px;
  font-weight: 700;
}

.profile-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.ai-followup-button {
  display: inline-flex;
  min-height: 35px;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  color: var(--forest);
  background: var(--lime);
  border: 1px solid var(--lime-deep);
  border-radius: 10px;
  font-size: 9px;
  font-weight: 700;
}

.ai-followup-button:hover {
  background: #d4e77e;
}

.ai-followup-button svg {
  width: 14px;
  height: 14px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.metric-card {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 88px;
  padding: 17px 19px;
  background: rgba(255, 254, 249, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.metric-icon {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
}

.metric-icon svg {
  width: 19px;
}

.metric-icon-green {
  color: #3b755a;
  background: var(--green-soft);
}

.metric-icon-coral {
  color: var(--accent-deep);
  background: var(--accent-soft);
}

.metric-icon-yellow {
  color: #896824;
  background: var(--yellow-soft);
}

.metric-card > div:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.metric-card span {
  color: var(--muted);
  font-size: 10px;
}

.metric-card strong {
  overflow: hidden;
  margin-top: -1px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-card strong small {
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 500;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.panel {
  padding: 25px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-small);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.panel-heading h2 {
  margin: 3px 0 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

.tiny-badge,
.date-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.tiny-badge-soft {
  color: var(--muted-strong);
  background: var(--surface-alt);
  border: 1px solid var(--line);
}

.date-badge {
  color: var(--forest);
  background: var(--lime);
  font-size: 11px;
}

.task-list {
  border-top: 1px solid var(--line);
}

.task-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px 1px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.task-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.custom-check {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: transparent;
  background: white;
  border: 1.5px solid var(--line-strong);
  border-radius: 7px;
  transition:
    color 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.custom-check svg {
  width: 14px;
}

.task-item input:checked + .custom-check {
  color: var(--forest);
  background: var(--lime);
  border-color: var(--lime-deep);
}

.task-item input:focus-visible + .custom-check {
  outline: 3px solid rgba(240, 107, 79, 0.4);
  outline-offset: 2px;
}

.task-copy {
  display: flex;
  flex-direction: column;
}

.task-copy strong {
  font-size: 12px;
  font-weight: 600;
  transition: color 160ms ease;
}

.task-copy small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
}

.task-item:has(input:checked) .task-copy strong {
  color: var(--muted);
  text-decoration: line-through;
}

.today-panel .secondary-button {
  margin-top: 17px;
}

.chart-frame {
  position: relative;
  display: grid;
  min-height: 154px;
  place-items: center;
}

.chart-frame-large {
  min-height: 230px;
}

.chart-empty {
  display: flex;
  align-items: center;
  flex-direction: column;
  color: var(--muted);
  text-align: center;
}

.chart-empty-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 10px;
  place-items: center;
  color: var(--muted-strong);
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.chart-empty-icon svg {
  width: 19px;
}

.chart-empty strong {
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 600;
}

.chart-empty span:last-child {
  margin-top: 1px;
  font-size: 9px;
}

.chart-note {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-top: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 9px;
}

.note-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  background: var(--lime-deep);
  border-radius: 50%;
}

.weight-chart {
  width: 100%;
  height: auto;
  overflow: visible;
}

.weight-chart text {
  fill: var(--muted);
  font-family: var(--font-sans);
  font-size: 10px;
  stroke: none;
}

.weight-chart .chart-grid {
  stroke: #eee9dd;
  stroke-width: 1;
}

.weight-chart .chart-line {
  stroke: var(--accent);
  stroke-width: 2.5;
}

.weight-chart .chart-area {
  fill: url("#areaGradient");
  opacity: 0.28;
  stroke: none;
}

.weight-chart .chart-dot {
  fill: var(--surface);
  stroke: var(--accent);
  stroke-width: 2.5;
}

.chat-page-heading {
  margin-bottom: 23px;
}

.chat-shell {
  max-width: 970px;
  min-height: calc(100vh - 245px);
  margin: 0 auto;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 21px;
  border-bottom: 1px solid var(--line);
}

.coach-identity {
  display: flex;
  align-items: center;
  gap: 11px;
}

.coach-avatar {
  color: var(--forest);
  background: var(--lime);
  border-radius: 50% 50% 50% 20%;
}

.coach-identity > div {
  display: flex;
  flex-direction: column;
}

.coach-identity strong {
  font-size: 12px;
  font-weight: 700;
}

.coach-identity span:last-child {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
}

.online-dot {
  width: 6px;
  height: 6px;
  background: #57a976;
  border-radius: 50%;
}

.clear-chat {
  color: var(--muted);
  font-size: 10px;
}

.clear-chat:hover {
  color: var(--accent-deep);
}

.chat-messages {
  display: flex;
  height: min(55vh, 510px);
  min-height: 330px;
  flex-direction: column;
  gap: 18px;
  padding: 26px;
  overflow-y: auto;
  background:
    linear-gradient(rgba(250, 248, 241, 0.72), rgba(255, 254, 249, 0.4)),
    radial-gradient(circle at 100% 0, rgba(218, 234, 145, 0.2), transparent 20rem);
  scrollbar-color: #d8d0c1 transparent;
  scrollbar-width: thin;
}

.chat-message {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  max-width: 84%;
  animation: message-in 250ms ease;
}

@keyframes message-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
}

.message-avatar {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  flex: 0 0 auto;
  color: var(--forest);
  background: var(--lime);
  border-radius: 9px 9px 9px 3px;
  font-size: 10px;
  font-weight: 700;
}

.message-bubble {
  padding: 12px 15px;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px 16px 16px 16px;
  box-shadow: 0 4px 14px rgba(43, 57, 49, 0.04);
  font-size: 12px;
  line-height: 1.75;
}

.chat-message.is-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-message.is-user .message-bubble {
  color: white;
  background: var(--forest);
  border-color: var(--forest);
  border-radius: 16px 4px 16px 16px;
}

.chat-message.is-user .message-avatar {
  color: white;
  background: var(--accent);
  border-radius: 9px 9px 3px 9px;
}

.rich-text > :first-child {
  margin-top: 0;
}

.rich-text > :last-child {
  margin-bottom: 0;
}

.rich-text h2,
.rich-text h3,
.rich-text h4 {
  margin: 16px 0 7px;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.45;
}

.chat-message.is-user .rich-text h2,
.chat-message.is-user .rich-text h3,
.chat-message.is-user .rich-text h4 {
  color: white;
}

.rich-text h2 {
  font-size: 16px;
}

.rich-text h3 {
  font-size: 14px;
}

.rich-text h4 {
  font-size: 13px;
}

.rich-text p {
  margin: 8px 0;
}

.rich-text ul,
.rich-text ol {
  padding-left: 20px;
  margin: 8px 0;
}

.rich-text li {
  margin: 4px 0;
}

.rich-text strong {
  color: var(--ink);
  font-weight: 700;
}

.chat-message.is-user .rich-text strong {
  color: white;
}

.rich-text code {
  padding: 1px 5px;
  background: var(--surface-alt);
  border-radius: 5px;
  font-family: Consolas, monospace;
  font-size: 0.9em;
}

.rich-text blockquote {
  padding: 7px 11px;
  margin: 10px 0;
  color: var(--muted-strong);
  background: var(--surface-alt);
  border-left: 3px solid var(--lime-deep);
  border-radius: 0 8px 8px 0;
}

.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 42px;
  min-height: 20px;
}

.typing-dots span {
  width: 5px;
  height: 5px;
  background: var(--muted);
  border-radius: 50%;
  animation: typing 1s ease-in-out infinite;
}

.typing-dots span:nth-child(2) {
  animation-delay: 120ms;
}

.typing-dots span:nth-child(3) {
  animation-delay: 240ms;
}

@keyframes typing {
  0%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.quick-prompts {
  display: flex;
  gap: 8px;
  padding: 11px 21px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  scrollbar-width: none;
}

.quick-prompts::-webkit-scrollbar {
  display: none;
}

.quick-prompts button {
  flex: 0 0 auto;
  padding: 7px 10px;
  color: var(--muted-strong);
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 600;
}

.quick-prompts button:hover {
  color: var(--accent-deep);
  border-color: #f1b6a9;
}

.chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 11px 15px 6px;
  margin: 0 16px;
  background: var(--surface-alt);
  border: 1px solid var(--line-strong);
  border-radius: 17px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.chat-composer:focus-within {
  border-color: #e3a497;
  box-shadow: 0 0 0 4px rgba(240, 107, 79, 0.08);
}

.chat-composer textarea {
  min-height: 37px;
  max-height: 130px;
  padding: 7px 2px;
  resize: none;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 12px;
  line-height: 1.6;
}

.chat-composer textarea::placeholder {
  color: #9aa49f;
}

.send-button {
  display: grid;
  width: 37px;
  height: 37px;
  margin-bottom: 2px;
  place-items: center;
  color: white;
  background: var(--accent);
  border: 0;
  border-radius: 11px;
}

.send-button:hover {
  background: var(--accent-deep);
}

.send-button:disabled {
  cursor: wait;
  opacity: 0.5;
}

.send-button svg {
  width: 18px;
}

.composer-note {
  margin: 7px 0 13px;
  color: var(--muted);
  font-size: 8px;
  text-align: center;
}

.plan-context-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.7fr) auto;
  gap: 24px;
  align-items: center;
  padding: 25px;
  margin-bottom: 16px;
  background:
    radial-gradient(circle at 80% 0, rgba(218, 234, 145, 0.34), transparent 15rem),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-small);
}

.plan-context-main h2 {
  margin: 4px 0 5px;
  font-size: 18px;
  font-weight: 700;
}

.plan-context-main p {
  max-width: 560px;
  margin: 0;
  color: var(--muted-strong);
  font-size: 11px;
}

.profile-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.profile-chip {
  padding: 6px 9px;
  color: var(--muted-strong);
  background: rgba(255, 254, 249, 0.78);
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 9px;
  font-weight: 600;
}

.plan-output-card {
  min-height: 430px;
  padding: clamp(22px, 3vw, 32px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-small);
}

.plan-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

.plan-status {
  padding: 4px 8px;
  color: #8a6324;
  background: #fff1c8;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 700;
}

.plan-status.is-approved {
  color: #28604c;
  background: var(--green-soft);
}

.approve-plan-button {
  min-height: 32px;
  padding: 6px 10px;
  color: white;
  background: var(--forest);
  border: 1px solid var(--forest);
  border-radius: 9px;
  font-size: 8px;
  font-weight: 700;
}

.approve-plan-button:hover {
  background: var(--forest-light);
}

.plan-output {
  max-width: 860px;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.8;
}

.plan-output.rich-text h2 {
  padding-bottom: 7px;
  margin-top: 25px;
  font-size: 21px;
  border-bottom: 1px solid var(--line);
}

.plan-output.rich-text h3 {
  margin-top: 19px;
  font-size: 16px;
}

.plan-output.rich-text h4 {
  font-size: 14px;
}

.empty-plan {
  display: flex;
  min-height: 350px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.empty-plan h3 {
  margin: 18px 0 7px;
  color: var(--ink);
  font-size: 17px;
}

.empty-plan p {
  max-width: 390px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.empty-plan-art {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
}

.empty-plan-art::before {
  position: absolute;
  top: 50%;
  left: -30px;
  width: calc(100% + 60px);
  height: 1px;
  content: "";
  background: var(--line);
}

.empty-day {
  position: relative;
  display: grid;
  width: 44px;
  height: 52px;
  place-items: center;
  color: var(--muted-strong);
  background: var(--surface-alt);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

.empty-day:nth-child(2) {
  color: var(--forest);
  background: var(--lime);
  border-color: var(--lime-deep);
  transform: translateY(-8px);
}

.checkin-card {
  padding: clamp(22px, 3vw, 31px);
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-small);
}

.checkin-form,
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}

.field-group {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.field-group label,
.range-label label {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
}

.field-group label span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
}

.field-group input,
.field-group select,
.field-group textarea {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--surface-alt);
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  outline: 0;
  font-size: 12px;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.field-group textarea {
  resize: vertical;
  line-height: 1.65;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  background: white;
  border-color: #e3a497;
  box-shadow: 0 0 0 4px rgba(240, 107, 79, 0.07);
}

.field-group input::placeholder,
.field-group textarea::placeholder {
  color: #a0aaa5;
}

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

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

.input-with-unit > span {
  position: absolute;
  top: 50%;
  right: 13px;
  color: var(--muted);
  font-size: 9px;
  pointer-events: none;
  transform: translateY(-50%);
}

.field-span-2,
.form-span-full {
  grid-column: 1 / -1;
}

.range-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.range-label output {
  color: var(--accent-deep);
  font-size: 11px;
  font-weight: 700;
}

input[type="range"] {
  min-height: auto;
  padding: 0;
  accent-color: var(--accent);
  background: transparent;
  border: 0;
}

.range-scale {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 8px;
}

.checkin-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 6px;
}

.checkin-actions > span {
  color: var(--muted);
  font-size: 10px;
}

.progress-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(270px, 0.9fr);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.history-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.history-date {
  display: flex;
  width: 38px;
  height: 40px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--muted-strong);
  background: white;
  border-radius: 9px;
}

.history-date strong {
  font-size: 14px;
  line-height: 1.2;
}

.history-date span {
  font-size: 8px;
}

.history-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.history-main strong {
  overflow: hidden;
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-main span {
  color: var(--muted);
  font-size: 8px;
}

.makeup-tag {
  padding: 1px 4px;
  margin-right: 4px;
  color: #8a6324 !important;
  background: #fff1c8;
  border-radius: 4px;
  font-size: 7px !important;
  font-weight: 700;
}

.history-weight {
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.history-empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  color: var(--muted);
  font-size: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 13px;
}

.sheet-dialog,
.small-dialog {
  width: min(740px, calc(100% - 28px));
  max-height: min(88vh, 840px);
  padding: 0;
  overflow-y: auto;
  color: var(--ink);
  background: var(--surface);
  border: 0;
  border-radius: 24px;
  box-shadow: 0 32px 100px rgba(21, 42, 36, 0.25);
}

.sheet-dialog::backdrop,
.small-dialog::backdrop {
  background: rgba(18, 38, 33, 0.54);
  backdrop-filter: blur(5px);
}

.profile-form {
  padding: clamp(22px, 4vw, 34px);
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.dialog-head h2 {
  margin: 3px 0 0;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.dialog-close {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  flex: 0 0 auto;
  color: var(--muted-strong);
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 50%;
}

.dialog-close svg {
  width: 17px;
}

.dialog-intro {
  margin: 10px 0 22px;
  color: var(--muted);
  font-size: 10px;
}

.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 23px;
  margin-top: 23px;
  border-top: 1px solid var(--line);
}

.danger-button {
  padding: 8px 10px;
  margin-right: auto;
  color: #af4f3b;
  background: transparent;
  border: 1px solid #edc5bb;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 700;
}

.danger-button:hover {
  background: #fff2ee;
}

.safety-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  color: #7c5c2c;
  background: #fff7dc;
  border: 1px solid #f1dfaa;
  border-radius: 11px;
}

.safety-note svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-top: 2px;
}

.safety-note p {
  margin: 0;
  font-size: 9px;
  line-height: 1.7;
}

.screening-fieldset {
  padding: 16px;
  background: #fbfaf4;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.screening-fieldset legend {
  padding: 0 5px;
  font-size: 12px;
  font-weight: 700;
}

.screening-fieldset > p {
  margin: 0 0 11px;
  color: var(--muted);
  font-size: 8px;
}

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

.screening-grid label,
.screening-confirm {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: var(--muted-strong);
  font-size: 9px;
  line-height: 1.55;
}

.screening-grid input,
.screening-confirm input {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  margin-top: 1px;
  accent-color: var(--accent);
}

.screening-confirm {
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.student-account-fields {
  padding: 16px;
  background: #f3f7e8;
  border: 1px solid #dce5bc;
  border-radius: 13px;
}

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

.account-fields-heading h3 {
  margin: 2px 0 0;
  font-size: 14px;
}

.account-fields-heading > span,
.student-account-fields > p {
  color: var(--muted);
  font-size: 8px;
}

.student-account-fields > p {
  margin: 10px 0 0;
}

.reset-password-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 13px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.reset-password-panel > div:first-child {
  display: flex;
  flex-direction: column;
}

.reset-password-panel strong {
  font-size: 10px;
}

.reset-password-panel span {
  color: var(--muted);
  font-size: 8px;
}

.reset-password-controls {
  display: flex;
  gap: 7px;
}

.reset-password-controls input {
  width: 170px;
  min-height: 36px;
  padding: 8px 10px;
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  font-size: 9px;
}

.account-dialog {
  width: min(600px, calc(100% - 28px));
  max-height: min(88vh, 780px);
  padding: 28px;
  overflow-y: auto;
  color: var(--ink);
  background: var(--surface);
  border: 0;
  border-radius: 23px;
  box-shadow: 0 32px 100px rgba(21, 42, 36, 0.25);
}

.account-dialog::backdrop {
  background: rgba(18, 38, 33, 0.54);
  backdrop-filter: blur(5px);
}

.account-summary {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px;
  margin: 19px 0 14px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 15px;
}

.account-summary > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.account-summary strong {
  font-size: 13px;
}

.account-summary span,
.account-summary small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-action-row,
.account-delete-form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px;
  margin-top: 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.account-action-row > div,
.account-delete-form > div:first-child {
  display: flex;
  flex-direction: column;
}

.account-action-row strong,
.account-delete-form strong {
  font-size: 10px;
}

.account-action-row span,
.account-delete-form span {
  color: var(--muted);
  font-size: 8px;
}

.account-security-form {
  padding: 17px 15px;
  margin-top: 10px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.account-security-form h3 {
  margin: 0 0 13px;
  font-size: 12px;
}

.account-security-form .secondary-button {
  margin-top: 12px;
}

.account-delete-form {
  background: #fffaf8;
  border-color: #efd3cb;
}

.delete-account-controls {
  display: flex;
  gap: 7px;
  align-items: center;
}

.delete-account-controls input {
  width: 140px;
  min-height: 34px;
  padding: 7px 9px;
  background: white;
  border: 1px solid #e5c5bd;
  border-radius: 8px;
  font-size: 9px;
}

.small-dialog {
  width: min(430px, calc(100% - 28px));
  padding: 28px;
}

.install-copy {
  margin: 18px 0 24px;
  color: var(--muted-strong);
  font-size: 12px;
}

.toast {
  position: fixed;
  z-index: 80;
  bottom: 28px;
  left: 50%;
  max-width: min(420px, calc(100% - 30px));
  padding: 11px 16px;
  color: white;
  background: var(--forest);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(23, 60, 52, 0.28);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.legal-body {
  padding: 40px 20px 80px;
  background: var(--canvas);
}

.legal-page {
  width: min(100%, 820px);
  padding: clamp(28px, 6vw, 60px);
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 25px;
  box-shadow: var(--shadow);
}

.legal-back {
  display: inline-block;
  margin-bottom: 35px;
  color: var(--accent-deep);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.legal-page h1 {
  margin: 8px 0 8px;
  font-size: clamp(27px, 5vw, 43px);
  line-height: 1.25;
  letter-spacing: -0.04em;
}

.legal-page h2 {
  margin: 30px 0 8px;
  font-size: 17px;
}

.legal-page p {
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.9;
}

.legal-updated {
  color: var(--muted) !important;
  font-size: 9px !important;
}

.legal-warning {
  padding: 14px 16px;
  margin: 24px 0;
  color: #77531f;
  background: #fff6d9;
  border: 1px solid #efdca5;
  border-radius: 12px;
  font-size: 10px;
  line-height: 1.8;
}

.mobile-nav {
  display: none;
}

@media (max-width: 1120px) {
  .dashboard-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(235px, 0.7fr);
  }

  .hero-card {
    min-height: 320px;
  }

  .plan-context-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .profile-chip-grid {
    grid-row: 2;
    grid-column: 1 / -1;
  }
}

@media (max-width: 940px) {
  :root {
    --sidebar-width: 0px;
  }

  body {
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
  }

  .sidebar {
    display: none;
  }

  .main-content {
    width: 100%;
    margin-left: 0;
  }

  .topbar {
    min-height: calc(68px + env(safe-area-inset-top));
    padding: calc(10px + env(safe-area-inset-top)) 22px 10px;
  }

  .mobile-brand {
    display: flex;
  }

  .mobile-brand .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 13px 13px 13px 5px;
  }

  .mobile-brand strong {
    font-size: 16px;
  }

  .view {
    padding: 27px 22px 36px;
  }

  .mobile-nav {
    position: fixed;
    z-index: 30;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 12px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    min-height: 58px;
    padding: 5px;
    background: rgba(255, 254, 249, 0.94);
    border: 1px solid rgba(216, 208, 193, 0.85);
    border-radius: 19px;
    box-shadow: 0 15px 40px rgba(43, 57, 49, 0.17);
    backdrop-filter: blur(18px);
  }

  .mobile-nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex-direction: column;
    padding: 5px;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 13px;
    font-size: 8px;
    font-weight: 600;
  }

  .mobile-nav-item svg {
    width: 19px;
    height: 19px;
  }

  .mobile-nav-item.is-active {
    color: var(--forest);
    background: #edf4d8;
  }

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

@media (max-width: 860px) {
  .auth-screen {
    grid-template-columns: 1fr;
  }

  .auth-brand-panel {
    min-height: 285px;
    padding: calc(28px + env(safe-area-inset-top)) 24px 24px;
  }

  .auth-manifesto {
    padding: 42px 0 26px;
  }

  .auth-manifesto h1 {
    margin: 14px 0 10px;
    font-size: clamp(32px, 9vw, 48px);
  }

  .auth-manifesto p {
    font-size: 11px;
    line-height: 1.7;
  }

  .auth-feature-list {
    display: none;
  }

  .auth-form-panel {
    min-height: auto;
    padding: 35px 22px 55px;
  }
}

@media (max-width: 760px) {
  input,
  textarea,
  select {
    font-size: 16px !important;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 22px;
  }

  .page-heading h1 {
    margin-top: 3px;
    font-size: 28px;
  }

  .week-overview {
    grid-template-columns: 1fr;
    padding: 24px 20px 18px;
  }

  .week-overview-copy h1 {
    font-size: 35px;
  }

  .semi-progress {
    width: min(100%, 310px);
  }

  .coach-care-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .care-expand {
    grid-column: 2 / -1;
    justify-self: start;
    padding-left: 0;
  }

  .care-task-details {
    grid-column: 1 / -1;
  }

  .quick-checkin-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .desktop-only {
    display: none !important;
  }

  .dashboard-grid,
  .split-grid,
  .progress-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    min-height: 340px;
    grid-template-columns: 1fr auto;
    padding: 27px;
    border-radius: 24px;
  }

  .hero-copy h2 {
    font-size: clamp(25px, 8vw, 33px);
  }

  .hero-copy p {
    max-width: 90%;
  }

  .profile-card {
    min-height: 250px;
  }

  .student-roster {
    padding: 17px 15px;
  }

  .roster-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .roster-actions {
    width: 100%;
    justify-content: space-between;
  }

  .student-list {
    display: flex;
    margin: 0 -15px;
    padding: 0 15px 4px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .live-monitor {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .quick-checkin {
    padding: 15px;
  }

  .quick-checkin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .fab-container {
    right: 20px;
    bottom: calc(86px + env(safe-area-inset-bottom));
  }

  .fab-main {
    width: 52px;
    height: 52px;
  }

  .mine-grid {
    grid-template-columns: 1fr;
  }

  .mine-profile-card {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .plan-title-row {
    align-items: flex-start;
  }

  .plan-title-row h1 {
    font-size: 27px;
  }

  .cycle-badge {
    padding: 7px 10px;
    font-size: 9px;
  }

  .weight-progress-card {
    padding: 16px 14px 20px;
  }

  .weight-progress-card .semi-progress {
    width: min(100%, 310px);
  }

  .weekly-report-banner {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .weekly-report-action {
    display: none;
  }

  .quick-card {
    padding: 11px;
  }

  .weight-number-input {
    width: 82px;
    font-size: 28px;
  }

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

  .quick-card .water-quick-circles {
    justify-content: space-between;
    gap: 4px;
  }

  .quick-card .water-quick-circles button {
    width: 42px;
    height: 42px;
    min-height: 42px;
    flex-basis: 42px;
  }

  .water-quick-circles button strong {
    font-size: 8px;
  }

  .water-quick-circles button small {
    font-size: 6px;
  }

  .fasting-timer {
    font-size: 26px;
  }

  .photo-checkin-button {
    min-height: 50px;
    flex-direction: column;
    gap: 1px;
  }

  .photo-checkin-button small {
    font-size: 6px;
  }

  .health-record-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .recipe-grid {
    grid-template-columns: 1fr;
  }

  .weekly-report-dialog {
    width: 100%;
    max-width: none;
    margin: auto 0 0;
    border-radius: 24px 24px 0 0;
  }

  .live-monitor-time {
    display: none;
  }

  .student-list::-webkit-scrollbar {
    display: none;
  }

  .student-card,
  .student-empty-card {
    min-width: 215px;
    scroll-snap-align: start;
  }

  .stats-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .metric-card {
    min-height: 96px;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 13px;
  }

  .metric-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .metric-icon svg {
    width: 16px;
  }

  .metric-card strong {
    font-size: 16px;
  }

  .panel {
    padding: 21px;
  }

  .chat-shell {
    display: flex;
    height: calc(100dvh - 340px);
    min-height: 460px;
    flex-direction: column;
    border-radius: 22px;
  }

  .chat-page-heading {
    gap: 9px;
    margin-bottom: 12px;
  }

  .chat-page-heading .page-intro {
    display: none;
  }

  .chat-page-heading h1 {
    font-size: 25px;
  }

  .chat-messages {
    height: auto;
    min-height: 0;
    flex: 1;
    padding: 19px 15px;
  }

  .chat-message {
    max-width: 92%;
  }

  .chat-header {
    padding: 13px 15px;
  }

  .quick-prompts {
    padding: 10px 14px;
  }

  .chat-composer {
    margin: 0 11px;
  }

  .plan-context-card {
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 21px;
  }

  .profile-chip-grid {
    grid-row: auto;
    grid-column: auto;
  }

  .plan-context-card .primary-button {
    width: 100%;
  }

  .checkin-form,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .field-span-2,
  .form-span-full {
    grid-column: auto;
  }

  .checkin-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .checkin-actions .primary-button {
    width: 100%;
  }

  .profile-form {
    padding: 22px 19px 102px;
  }

  .profile-form .dialog-actions {
    position: fixed;
    z-index: 6;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 13px 19px calc(13px + env(safe-area-inset-bottom));
    margin: 0;
    background: rgba(255, 254, 249, 0.96);
    border-top: 1px solid var(--line);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -12px 28px rgba(43, 57, 49, 0.07);
    backdrop-filter: blur(12px);
  }

  .sheet-dialog {
    width: 100%;
    max-width: none;
    max-height: calc(100vh - 22px);
    margin: auto 0 0;
    border-radius: 24px 24px 0 0;
  }

  .account-dialog {
    width: 100%;
    max-width: none;
    max-height: calc(100vh - 22px);
    padding: 22px 19px;
    margin: auto 0 0;
    border-radius: 24px 24px 0 0;
  }

  .account-action-row,
  .account-delete-form {
    align-items: stretch;
    flex-direction: column;
  }

  .delete-account-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .delete-account-controls input {
    width: 100%;
  }

  .reset-password-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .reset-password-controls {
    flex-direction: column;
  }

  .reset-password-controls input {
    width: 100%;
  }

  .screening-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .topbar {
    padding: calc(9px + env(safe-area-inset-top)) 16px 9px;
  }

  .mobile-brand small {
    display: none;
  }

  .connection-pill {
    padding: 5px 9px;
    font-size: 9px;
  }

  .icon-button span {
    display: none;
  }

  .account-copy {
    display: none;
  }

  .account-pill {
    padding: 4px;
  }

  .connection-pill {
    display: none;
  }

  .view {
    padding-right: 16px;
    padding-left: 16px;
  }

  .page-heading h1 {
    font-size: 25px;
  }

  .hero-card {
    min-height: 370px;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
    gap: 14px;
  }

  .hero-progress {
    position: absolute;
    right: 22px;
    bottom: 24px;
  }

  .hero-action {
    align-self: end;
  }

  .hero-copy {
    padding-right: 5px;
  }

  .hero-copy h2 {
    margin-top: 18px;
    font-size: 26px;
  }

  .stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-card:last-child {
    grid-column: 1 / -1;
    min-height: 80px;
    align-items: center;
    flex-direction: row;
  }

  .panel-heading {
    margin-bottom: 17px;
  }

  .chat-page-heading .secondary-button {
    width: 100%;
    min-height: 38px;
  }

  .chat-messages {
    height: auto;
    min-height: 0;
    flex: 1;
  }

  .dialog-head h2 {
    font-size: 20px;
  }
}

@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;
  }
}
