/* =========================================================
   辽阳市新竹学校 · 家长服务平台
   Design tokens + shared components + parent-facing UI
   ========================================================= */

:root {
  --green-950: #102f21;
  --green-900: #173f2c;
  --green-800: #1b5b3b;
  --green-700: #1f7a4d;
  --green-600: #2c8b5b;
  --green-500: #4a9f72;
  --green-100: #dfeee3;
  --green-50: #edf5ef;
  --orange-700: #c56422;
  --orange-600: #d9762d;
  --orange-500: #e78238;
  --orange-100: #fbe8d6;
  --cream: #f7f3e9;
  --cream-deep: #f0eadb;
  --paper: #fffdf8;
  --white: #ffffff;
  --ink: #1c2b23;
  --ink-soft: #3f5147;
  --muted: #6b786f;
  --muted-light: #8b978f;
  --line: #e2e8df;
  --line-strong: #ccd8ce;
  --red: #b63a32;
  --red-soft: #fbeae7;
  --amber-soft: #fdf3df;
  --blue: #356f9f;
  --shadow-xs: 0 1px 2px rgba(20, 47, 33, 0.06);
  --shadow-sm: 0 8px 24px -14px rgba(20, 47, 33, 0.28);
  --shadow-md: 0 22px 55px -30px rgba(20, 47, 33, 0.4);
  --shadow-lg: 0 40px 100px -42px rgba(20, 47, 33, 0.55);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-serif: "Songti SC", "STSong", "STZhongsong", "SimSun", "Noto Serif SC", serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(1100px 620px at 88% -12%, rgba(231, 130, 56, 0.13), transparent 62%),
    radial-gradient(900px 640px at -8% 26%, rgba(31, 122, 77, 0.1), transparent 60%),
    var(--cream);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#app {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

#app > main {
  flex: 1 0 auto;
}

.site-footer {
  margin-top: auto;
}

body.no-scroll {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

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

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

button {
  cursor: pointer;
}

h1, h2, h3, h4, p {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 3px solid rgba(231, 130, 56, 0.55);
  outline-offset: 2px;
  border-radius: 6px;
}

::selection {
  background: var(--orange-100);
  color: var(--green-950);
}

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

.icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  vertical-align: -0.16em;
}

.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 2000;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--green-900);
  color: var(--white);
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.container-narrow {
  width: min(880px, calc(100% - 48px));
  margin-inline: auto;
}

/* ---------- Boot / no-js ---------- */
.boot-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.boot-logo {
  width: min(300px, 70vw);
  opacity: 0.82;
}

.boot-mark {
  width: 86px;
  opacity: 0.9;
}

.boot-screen-dark {
  background: var(--green-950);
  color: #cfe0d5;
}

.boot-spinner {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(31, 122, 77, 0.2);
  border-top-color: var(--green-700);
  animation: spin 0.8s linear infinite;
}

.boot-screen-dark .boot-spinner {
  border-color: rgba(255, 255, 255, 0.18);
  border-top-color: var(--orange-500);
}

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

.noscript {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 32px;
  background: var(--cream);
  color: var(--ink);
  font-size: 16px;
  text-align: center;
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-align: center;
  white-space: nowrap;
  transition:
    transform 0.18s var(--ease),
    background 0.18s var(--ease),
    border-color 0.18s var(--ease),
    box-shadow 0.18s var(--ease),
    color 0.18s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn[disabled],
.btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  background: var(--green-700);
  color: var(--white);
  box-shadow: 0 12px 26px -14px rgba(31, 122, 77, 0.85);
}

.btn-primary:hover {
  background: var(--green-800);
  box-shadow: 0 16px 30px -14px rgba(31, 122, 77, 0.9);
}

.btn-accent {
  background: var(--orange-500);
  color: var(--white);
  box-shadow: 0 12px 26px -14px rgba(217, 118, 45, 0.9);
}

.btn-accent:hover {
  background: var(--orange-600);
}

.btn-ghost {
  border-color: var(--line-strong);
  background: rgba(255, 253, 248, 0.6);
  color: var(--green-900);
}

.btn-ghost:hover {
  border-color: var(--green-500);
  background: var(--white);
}

.btn-soft {
  background: var(--green-50);
  color: var(--green-800);
}

.btn-soft:hover {
  background: var(--green-100);
}

.btn-danger {
  background: var(--red-soft);
  color: var(--red);
  border-color: rgba(182, 58, 50, 0.16);
}

.btn-danger:hover {
  background: #f7ded9;
}

.btn-dark {
  background: var(--green-900);
  color: var(--white);
}

.btn-dark:hover {
  background: var(--green-950);
}

.btn-text {
  min-height: 32px;
  padding: 4px 6px;
  border-radius: 8px;
  color: var(--green-700);
  font-weight: 600;
}

.btn-text:hover {
  background: var(--green-50);
}

.btn-sm {
  min-height: 34px;
  padding: 6px 13px;
  font-size: 13px;
}

.btn-lg {
  min-height: 52px;
  padding: 14px 28px;
  font-size: 15px;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  width: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 50%;
  border-color: var(--line);
  background: var(--white);
}

.btn .icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.btn.is-loading {
  color: transparent !important;
  pointer-events: none;
}

.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: var(--white);
  animation: spin 0.75s linear infinite;
}

.btn-ghost.is-loading::after,
.btn-soft.is-loading::after,
.btn-text.is-loading::after {
  border-color: rgba(31, 122, 77, 0.2);
  border-top-color: var(--green-700);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(204, 216, 206, 0.65);
  background: rgba(247, 243, 233, 0.82);
  backdrop-filter: saturate(1.25) blur(16px);
  -webkit-backdrop-filter: saturate(1.25) blur(16px);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.brand-full img {
  width: clamp(190px, 21vw, 244px);
  height: auto;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--white);
}

.brand-mark img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand-mark strong {
  display: block;
  font-size: 16px;
  letter-spacing: 0.04em;
  line-height: 1.25;
}

.brand-mark span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.62);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a:not(.btn) {
  position: relative;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
}

.site-nav a:not(.btn):hover {
  color: var(--green-800);
  background: rgba(255, 255, 255, 0.5);
}

.site-nav .nav-login {
  margin-left: 6px;
}

.mobile-nav-toggle {
  display: none;
}

/* ---------- Landing hero ---------- */
.landing {
  overflow: clip;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  align-items: center;
  gap: clamp(36px, 5vw, 76px);
  padding: clamp(38px, 6vw, 82px) 0 clamp(50px, 7vw, 92px);
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -12%;
  right: -18%;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 122, 77, 0.09), transparent 68%);
  pointer-events: none;
}

.hero::after {
  content: "1993";
  position: absolute;
  z-index: -1;
  right: -10px;
  bottom: 2%;
  font-family: var(--font-serif);
  font-size: clamp(100px, 15vw, 210px);
  font-weight: 700;
  line-height: 1;
  color: rgba(31, 122, 77, 0.055);
  letter-spacing: -0.05em;
  pointer-events: none;
}

.hero-copy {
  position: relative;
  max-width: 620px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--green-800);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: var(--orange-500);
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(42px, 5.2vw, 72px);
  font-weight: 700;
  line-height: 1.13;
  letter-spacing: -0.015em;
  color: var(--green-950);
}

.hero h1 .accent {
  position: relative;
  display: inline-block;
  isolation: isolate;
  color: var(--green-700);
  font-style: normal;
  white-space: nowrap;
}

.hero h1 .accent::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -2%;
  right: -2%;
  bottom: 6%;
  height: 28%;
  border-radius: 40% 60% 50% 45%;
  background: rgba(231, 130, 56, 0.22);
  transform: rotate(-1deg);
}

.hero-lead {
  max-width: 520px;
  margin-top: 22px;
  color: var(--ink-soft);
  font-size: clamp(15px, 1.45vw, 17px);
  line-height: 1.9;
}

.hero-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 32px;
}

.hero-point {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 12px 12px 0;
}

.hero-point-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-top: 1px;
  border-radius: 11px;
  background: var(--white);
  color: var(--green-700);
  box-shadow: var(--shadow-xs);
}

.hero-point-icon .icon {
  width: 18px;
  height: 18px;
}

.hero-point strong {
  display: block;
  font-size: 14px;
  color: var(--green-950);
  line-height: 1.35;
}

.hero-point span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  color: var(--muted-light);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.hero-meta::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--line-strong);
}

/* ---------- Auth card ---------- */
.auth-wrap {
  position: relative;
  width: 100%;
  max-width: 470px;
  justify-self: end;
}

.auth-card {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid rgba(204, 216, 206, 0.8);
  border-radius: var(--radius-xl);
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow-lg);
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--green-700), var(--green-500) 54%, var(--orange-500));
}

.auth-head {
  margin-bottom: 20px;
}

.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--orange-700);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.auth-kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange-500);
}

.auth-head h2 {
  margin-top: 7px;
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 700;
  color: var(--green-950);
  line-height: 1.3;
}

.auth-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 22px;
  padding: 4px;
  border-radius: 13px;
  background: #eef2ea;
}

.auth-tab {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s var(--ease);
}

.auth-tab[aria-selected="true"] {
  background: var(--white);
  color: var(--green-800);
  box-shadow: 0 2px 10px rgba(20, 47, 33, 0.08);
}

.auth-panel[hidden] {
  display: none;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field > label,
.field-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-left: 2px;
  color: var(--green-900);
  font-size: 13px;
  font-weight: 600;
}

.field > label a {
  color: var(--green-700);
  font-size: 11.5px;
  font-weight: 600;
}

.field > label a:hover {
  color: var(--orange-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.field-label small,
.field > label small {
  color: var(--muted-light);
  font-weight: 400;
  font-size: 11px;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease);
  appearance: none;
}

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

.select {
  padding-right: 42px;
  background-image: linear-gradient(45deg, transparent 50%, var(--green-700) 50%),
    linear-gradient(135deg, var(--green-700) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.input::placeholder,
.textarea::placeholder {
  color: #a0aaa3;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: #b8c8bc;
  background: var(--white);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--green-600);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(31, 122, 77, 0.11);
}

.input[aria-invalid="true"] {
  border-color: rgba(182, 58, 50, 0.6);
  box-shadow: 0 0 0 4px rgba(182, 58, 50, 0.07);
}

.input-wrap {
  position: relative;
}

.input-wrap .input {
  padding-right: 62px;
}

.input-action {
  position: absolute;
  top: 50%;
  right: 6px;
  min-width: 48px;
  min-height: 36px;
  padding: 4px 8px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--green-700);
  font-size: 12px;
  font-weight: 600;
}

.input-action:hover {
  background: var(--green-50);
}

.field-hint {
  padding-left: 2px;
  color: var(--muted-light);
  font-size: 11.5px;
  line-height: 1.55;
}

.lookup-hint {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 8px 11px;
  border-radius: 9px;
  background: var(--green-50);
  color: var(--green-800);
  font-size: 12px;
  line-height: 1.55;
}

.lookup-hint.is-warning {
  background: var(--amber-soft);
  color: #8a5a16;
}

.lookup-hint.is-error {
  background: var(--red-soft);
  color: var(--red);
}

.lookup-hint .icon {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin-top: 2px;
}

.form-error {
  display: none;
  align-items: flex-start;
  gap: 8px;
  padding: 11px 13px;
  border: 1px solid rgba(182, 58, 50, 0.16);
  border-radius: 11px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 12.5px;
  line-height: 1.55;
}

.form-error.is-visible {
  display: flex;
}

.form-error .icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 1px;
}

.form-error.is-success {
  border-color: rgba(31, 122, 77, 0.16);
  background: var(--green-50);
  color: var(--green-800);
}

.auth-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: -2px;
  font-size: 12.5px;
}

.auth-meta a,
.link {
  color: var(--green-700);
  font-weight: 600;
}

.auth-meta a:hover,
.link:hover {
  color: var(--orange-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted-light);
  font-size: 11.5px;
  line-height: 1.6;
}

.field > label.consent {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted-light);
  font-weight: 400;
}

.consent .icon {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  color: var(--green-600);
}

.auth-alt {
  margin-top: 17px;
  padding-top: 15px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}

.auth-alt button {
  border: 0;
  background: transparent;
  color: var(--green-700);
  font-weight: 600;
}

.auth-alt button:hover {
  color: var(--orange-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.demo-card {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px dashed #e8c79e;
  border-radius: 13px;
  background: rgba(253, 243, 223, 0.7);
  color: #78562b;
  font-size: 11.5px;
  line-height: 1.65;
}

.demo-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  color: #8b5b1d;
  font-weight: 700;
  font-size: 12px;
}

.demo-card code {
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.72);
  color: #6b4718;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}

.demo-fill {
  min-height: 28px;
  padding: 3px 9px;
  border: 1px solid #e0bf94;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.55);
  color: #7a4d14;
  font-size: 11px;
  font-weight: 600;
}

.demo-fill:hover {
  background: var(--white);
}

.privacy-note {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding: 11px 12px;
  border-radius: 11px;
  background: rgba(237, 245, 239, 0.75);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.privacy-note .icon {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  color: var(--green-600);
}

/* ---------- Features / landing sections ---------- */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-kicker {
  color: var(--orange-700);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section-head h2 {
  margin-top: 7px;
  font-family: var(--font-serif);
  font-size: clamp(26px, 3vw, 36px);
  color: var(--green-950);
  line-height: 1.3;
}

.section-head p {
  max-width: 380px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.features {
  padding: 0 0 clamp(54px, 7vw, 96px);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-card {
  position: relative;
  overflow: hidden;
  padding: 28px 26px;
  border: 1px solid rgba(204, 216, 206, 0.75);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.7);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}

.feature-card:hover {
  transform: translateY(-4px);
  background: var(--paper);
  box-shadow: var(--shadow-md);
}

.feature-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--green-50);
  color: var(--green-700);
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
}

.feature-card:nth-child(2) .feature-index {
  background: var(--amber-soft);
  color: var(--orange-700);
}

.feature-card h3 {
  margin-top: 18px;
  color: var(--green-950);
  font-size: 17px;
  font-weight: 700;
}

.feature-card p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.feature-line {
  position: absolute;
  right: -30px;
  bottom: -42px;
  width: 130px;
  height: 130px;
  border: 1px solid rgba(31, 122, 77, 0.1);
  border-radius: 50%;
}

.feature-line::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(31, 122, 77, 0.08);
  border-radius: 50%;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 42px 0 26px;
  background: var(--green-950);
  color: rgba(232, 242, 235, 0.74);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.7fr;
  gap: 30px;
}

.footer-brand .brand-mark strong {
  font-size: 17px;
}

.footer-brand p {
  max-width: 360px;
  margin-top: 13px;
  color: rgba(232, 242, 235, 0.56);
  font-size: 12px;
  line-height: 1.75;
}

.footer-col h4 {
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.footer-col a,
.footer-col span {
  display: block;
  padding: 4px 0;
  color: rgba(232, 242, 235, 0.58);
  font-size: 12px;
}

.footer-col a:hover {
  color: var(--white);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(232, 242, 235, 0.4);
  font-size: 11px;
}

/* =========================================================
   Parent portal
   ========================================================= */
.portal-header {
  background: rgba(247, 243, 233, 0.9);
}

.portal-header .header-inner {
  min-height: 70px;
}

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

.account-menu {
  position: relative;
}

.account-menu > summary {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 4px 10px 4px 5px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.72);
  color: var(--green-900);
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  font-weight: 600;
}

.account-menu > summary::-webkit-details-marker {
  display: none;
}

.account-menu > summary:hover {
  background: var(--white);
  border-color: var(--green-500);
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--green-700);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
}

.account-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 80;
  width: 220px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.account-popover .account-info {
  padding: 9px 10px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}

.account-popover .account-info strong {
  display: block;
  color: var(--green-950);
  font-size: 13px;
}

.account-popover .account-info span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
}

.account-popover button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13px;
  text-align: left;
}

.account-popover button:hover {
  background: var(--green-50);
  color: var(--green-800);
}

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

.account-popover button.danger:hover {
  background: var(--red-soft);
}

.account-popover .icon {
  width: 16px;
  height: 16px;
}

.portal-main {
  padding: 30px 0 70px;
}

.welcome-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  padding: clamp(26px, 4vw, 42px);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(420px 270px at 90% -40%, rgba(255, 255, 255, 0.18), transparent 70%),
    linear-gradient(135deg, var(--green-800), var(--green-700) 54%, #2b8257);
  color: var(--white);
  box-shadow: 0 30px 70px -42px rgba(20, 47, 33, 0.65);
}

.welcome-card::before,
.welcome-card::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  pointer-events: none;
}

.welcome-card::before {
  width: 280px;
  height: 280px;
  right: -80px;
  top: -130px;
}

.welcome-card::after {
  width: 420px;
  height: 420px;
  right: -180px;
  top: -210px;
}

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

.welcome-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 11.5px;
  letter-spacing: 0.13em;
}

.welcome-eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--orange-500);
}

.welcome-card h1 {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 700;
  line-height: 1.3;
}

.welcome-card h1 small {
  font-family: var(--font-sans);
  font-size: 0.55em;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.72);
}

.welcome-sub {
  margin-top: 9px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12.5px;
}

.welcome-side {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.child-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.child-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 6px 13px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.76);
  font-size: 12.5px;
  font-weight: 500;
  transition: all 0.18s var(--ease);
}

.child-pill:hover {
  background: rgba(255, 255, 255, 0.16);
}

.child-pill.is-active {
  border-color: rgba(255, 255, 255, 0.8);
  background: var(--white);
  color: var(--green-800);
  font-weight: 700;
}

.child-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange-500);
}

.add-child-btn {
  min-height: 38px;
  padding: 6px 12px;
  border: 1px dashed rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.add-child-btn:hover {
  border-color: rgba(255, 255, 255, 0.7);
  color: var(--white);
}

.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.82);
  font-size: 10.5px;
  letter-spacing: 0.04em;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.stat-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border: 1px solid rgba(204, 216, 206, 0.75);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.78);
  box-shadow: var(--shadow-xs);
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
}

.stat-value {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 3px;
  color: var(--green-950);
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
}

.stat-value small {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 400;
  color: var(--muted-light);
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 13px;
  background: var(--green-50);
  color: var(--green-700);
}

.stat-card:nth-child(2) .stat-icon {
  background: var(--amber-soft);
  color: var(--orange-700);
}

.stat-card:nth-child(3) .stat-icon {
  background: #edf2f7;
  color: var(--blue);
}

.stat-icon .icon {
  width: 20px;
  height: 20px;
}

.content-panel {
  margin-top: 30px;
}

.content-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.tab-list {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid rgba(204, 216, 206, 0.65);
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.62);
}

.tab-button {
  min-height: 36px;
  padding: 6px 17px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.18s var(--ease);
}

.tab-button[aria-selected="true"] {
  background: var(--white);
  color: var(--green-800);
  box-shadow: 0 2px 8px rgba(20, 47, 33, 0.08);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--green-950);
  font-size: 15px;
  font-weight: 700;
}

.section-title .count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--green-50);
  color: var(--green-700);
  font-size: 11px;
}

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

.report-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border: 1px solid rgba(204, 216, 206, 0.75);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.82);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}

.report-card:hover {
  transform: translateY(-2px);
  border-color: rgba(31, 122, 77, 0.32);
  box-shadow: var(--shadow-sm);
}

.report-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.report-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 13px;
  background: var(--green-50);
  color: var(--green-700);
}

.report-icon.is-pdf {
  background: var(--red-soft);
  color: var(--red);
}

.report-icon.is-image {
  background: var(--amber-soft);
  color: var(--orange-700);
}

.report-icon .icon {
  width: 21px;
  height: 21px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--green-50);
  color: var(--green-700);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}

.badge.orange {
  background: var(--amber-soft);
  color: var(--orange-700);
}

.badge.blue {
  background: #edf2f7;
  color: var(--blue);
}

.badge.gray {
  background: #f0f2ef;
  color: var(--muted);
}

.badge.red {
  background: var(--red-soft);
  color: var(--red);
}

.report-title {
  margin-top: 11px;
  color: var(--green-950);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.report-note {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  color: var(--muted-light);
  font-size: 11.5px;
}

.report-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.report-meta .icon {
  width: 13px;
  height: 13px;
}

.report-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.report-file {
  color: var(--muted-light);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-footer .btn {
  flex: 0 0 auto;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.panel {
  border: 1px solid rgba(204, 216, 206, 0.75);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.82);
}

.panel-pad {
  padding: 22px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.panel-head h3 {
  color: var(--green-950);
  font-size: 14px;
  font-weight: 700;
}

.panel-link {
  border: 0;
  background: transparent;
  color: var(--green-700);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.panel-link:hover {
  color: var(--orange-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mini-report-list {
  padding: 4px 10px 10px;
}

.mini-report {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  text-align: left;
  transition: background 0.18s var(--ease);
}

.mini-report:hover {
  background: var(--green-50);
}

.mini-report .report-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.mini-report .report-icon .icon {
  width: 18px;
  height: 18px;
}

.mini-report-body {
  min-width: 0;
  flex: 1;
}

.mini-report-title {
  display: block;
  color: var(--green-950);
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-report-meta {
  display: block;
  margin-top: 2px;
  color: var(--muted-light);
  font-size: 11px;
}

.mini-report .chevron {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: var(--muted-light);
}

.tip-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, #fff7ec, #fdf0dd);
  border: 1px solid #f0dcc0;
}

.tip-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -50px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(231, 130, 56, 0.08);
}

.tip-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--orange-700);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.tip-card h3 {
  margin-top: 10px;
  color: #5d3b17;
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.4;
}

.tip-card p {
  margin-top: 8px;
  color: #80613d;
  font-size: 12px;
  line-height: 1.8;
}

.tip-card .btn {
  margin-top: 16px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  padding: 36px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.5);
  text-align: center;
}

.empty-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--green-50);
  color: var(--green-600);
}

.empty-icon::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px dashed rgba(31, 122, 77, 0.18);
  border-radius: 50%;
}

.empty-icon .icon {
  width: 28px;
  height: 28px;
}

.empty-state h3 {
  color: var(--green-950);
  font-size: 16px;
  font-weight: 700;
}

.empty-state p {
  max-width: 340px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.75;
}

/* ---------- Modal / toast ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(14, 33, 23, 0.56);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  animation: fadeIn 0.18s ease both;
}

.modal {
  width: min(520px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.5);
  animation: modalIn 0.28s var(--ease) both;
}

.modal.modal-wide {
  width: min(860px, 100%);
}

.modal.modal-preview {
  width: min(920px, 100%);
  max-height: min(92vh, 980px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal.modal-preview .modal-head {
  position: static;
  flex: 0 0 auto;
}

.modal.modal-preview .modal-body {
  flex: 1 1 auto;
  overflow: auto;
}

.modal.modal-preview .modal-actions {
  flex: 0 0 auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 16px;
  background: var(--paper);
  border-bottom: 1px solid rgba(226, 232, 223, 0.7);
}

.modal-head h2 {
  color: var(--green-950);
  font-family: var(--font-serif);
  font-size: 23px;
  line-height: 1.35;
}

.modal-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

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

.modal-close:hover {
  background: var(--green-50);
  color: var(--green-800);
}

.modal-close .icon {
  width: 17px;
  height: 17px;
}

.modal-body {
  padding: 22px 24px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 24px 24px;
}

.modal-actions.split {
  justify-content: space-between;
}

.modal-note {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--green-50);
  color: var(--green-800);
  font-size: 12px;
  line-height: 1.7;
}

.modal-note.warning {
  background: var(--amber-soft);
  color: #7d5416;
}

.preview-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  border-radius: 14px;
  background:
    linear-gradient(45deg, #edf1ea 25%, transparent 25%),
    linear-gradient(-45deg, #edf1ea 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #edf1ea 75%),
    linear-gradient(-45deg, transparent 75%, #edf1ea 75%),
    #f7f8f5;
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
  overflow: hidden;
}

.preview-stage img {
  max-width: 100%;
  max-height: calc(92vh - 250px);
  object-fit: contain;
}

.preview-stage iframe {
  width: 100%;
  height: calc(92vh - 250px);
  min-height: 300px;
  border: 0;
  background: var(--white);
}

.preview-unavailable {
  padding: 40px 24px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.temp-password {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border: 1px dashed #e2bd8d;
  border-radius: 14px;
  background: var(--amber-soft);
}

.temp-password code {
  color: #6e4714;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 700;
  letter-spacing: 0.06em;
  word-break: break-all;
}

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

.reset-flow {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  padding: 14px;
  border-radius: 13px;
  background: var(--green-50);
}

.reset-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.reset-step > span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--green-700);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
}

.reset-step strong {
  display: block;
  color: var(--green-900);
  font-size: 12px;
  line-height: 1.5;
}

.reset-step small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
}

.reset-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 4px 4px;
  text-align: center;
}

.reset-success-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--green-50);
  color: var(--green-700);
}

.reset-success-icon .icon {
  width: 28px;
  height: 28px;
}

.reset-success h3 {
  color: var(--green-950);
  font-family: var(--font-serif);
  font-size: 22px;
}

.reset-success p {
  max-width: 340px;
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.reset-success .modal-note {
  width: 100%;
  margin-bottom: 16px;
  text-align: left;
}

.portal-footer {
  padding: 22px 0 max(22px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(204, 216, 206, 0.7);
  color: var(--muted-light);
  font-size: 10.5px;
}

.portal-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

@media (max-width: 760px) {
  .portal-footer .container {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

.toast-region {
  position: fixed;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(440px, calc(100% - 32px));
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 100%;
  padding: 11px 16px;
  border-radius: 11px;
  background: var(--green-950);
  color: var(--white);
  box-shadow: var(--shadow-md);
  font-size: 12.5px;
  line-height: 1.55;
  animation: toastIn 0.25s var(--ease) both;
}

.toast.is-error {
  background: #7f2a25;
}

.toast.is-success {
  background: var(--green-800);
}

.toast .icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 1px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1120px) {
  .hero {
    gap: 36px;
  }

  .hero-points {
    grid-template-columns: 1fr;
    gap: 4px;
    margin-top: 26px;
  }

  .hero-point {
    padding: 7px 0;
  }
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 42px;
  }

  .hero-copy {
    max-width: 720px;
  }

  .auth-wrap {
    max-width: 540px;
    justify-self: stretch;
  }

  .hero::after {
    right: 0;
    bottom: 30%;
  }

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

  .feature-card {
    padding: 22px;
  }

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

  .footer-brand {
    grid-column: 1 / -1;
  }

  .welcome-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .welcome-side {
    align-items: flex-start;
  }

  .child-switch {
    justify-content: flex-start;
  }

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

@media (max-width: 760px) {
  .container,
  .container-narrow {
    width: min(100% - 32px, 680px);
  }

  /* 手机端只保留登录卡片，避免登录前看到过长的介绍内容 */
  .hero-copy,
  .features {
    display: none;
  }

  .hero {
    padding-top: 22px;
    padding-bottom: 36px;
  }

  .auth-wrap {
    max-width: none;
    justify-self: stretch;
  }

  .hero::after {
    display: none;
  }

  .header-inner {
    min-height: 66px;
    gap: 12px;
  }

  .brand-full img {
    width: 178px;
  }

  .site-nav > a:not(.btn) {
    display: none;
  }

  .site-nav .nav-login {
    display: inline-flex;
    margin-left: 0;
  }

  .site-nav .nav-register {
    display: none;
  }

  .site-nav .btn {
    min-height: 38px;
    padding: 8px 14px;
    font-size: 12.5px;
  }

  .hero {
    padding-top: 34px;
    padding-bottom: 50px;
  }

  .hero h1 {
    font-size: clamp(38px, 10vw, 52px);
  }

  .hero-lead {
    font-size: 14px;
  }

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

  .hero-actions .btn {
    width: 100%;
  }

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

  .auth-card {
    padding: 22px 18px;
    border-radius: 22px;
  }

  .input,
  .select,
  .textarea {
    font-size: 16px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .section-head p {
    max-width: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .portal-main {
    padding-top: 18px;
  }

  .welcome-card {
    padding: 24px 20px;
    border-radius: 22px;
  }

  .stat-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .stat-card {
    padding: 15px 17px;
  }

  .stat-value {
    font-size: 25px;
  }

  .content-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .tab-list {
    width: 100%;
  }

  .tab-button {
    flex: 1;
    padding-inline: 8px;
  }

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

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-height: 92vh;
    border-radius: 22px 22px 0 0;
    border-bottom: 0;
    animation: sheetIn 0.28s var(--ease) both;
  }

  .modal.modal-wide,
  .modal.modal-preview {
    width: 100%;
  }

  .modal-head {
    padding: 18px 18px 14px;
  }

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

  .modal-body {
    padding: 18px;
  }

  .modal-actions {
    padding: 0 18px 20px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }

  .preview-stage iframe {
    height: 62vh;
  }

  @keyframes sheetIn {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (max-width: 480px) {
  .container,
  .container-narrow {
    width: calc(100% - 28px);
  }

  .brand-full img {
    width: 158px;
  }

  .site-nav .btn .btn-label-long {
    display: none;
  }

  .hero::after {
    display: none;
  }

  .hero h1 {
    font-size: 38px;
  }

  .eyebrow {
    font-size: 11.5px;
  }

  .hero-points {
    gap: 0;
  }

  .auth-head h2 {
    font-size: 24px;
  }

  .welcome-card h1 {
    font-size: 25px;
  }

  .child-pill {
    font-size: 11.5px;
  }

  .report-card {
    padding: 16px;
  }

  .panel-head {
    padding: 15px 16px;
  }

  .account-menu > summary .account-name {
    display: none;
  }

  .footer-brand .brand-mark strong {
    font-size: 15px;
  }
}

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