:root {
  --ink: #123f3d;
  --deep: #083d3b;
  --deep-2: #0d5450;
  --gold: #b98a42;
  --gold-light: #e6cf9f;
  --paper: #fffdf7;
  --cream: #f5efe2;
  --muted: #6f7d77;
  --line: rgba(17, 72, 68, .16);
  --danger: #a24d43;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #e9e4d7;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 85% 0, rgba(205, 174, 104, .24), transparent 32%), linear-gradient(160deg, #e4ede7, #f4ead8 62%, #e8e1cf); }
button, input, select { font: inherit; }
button { cursor: pointer; }
#app { width: min(100%, 520px); min-height: 100vh; margin: 0 auto; background: rgba(255, 253, 247, .94); box-shadow: 0 0 70px rgba(13, 55, 52, .16); }

.page { min-height: 100vh; padding: 24px 20px calc(36px + env(safe-area-inset-bottom)); }
.hero { margin: -24px -20px 24px; padding: 42px 26px 34px; color: #fff8e9; background: radial-gradient(circle at 85% 16%, rgba(231, 200, 135, .34), transparent 32%), linear-gradient(145deg, #073b39, #0e5a55); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -38px; bottom: -62px; width: 210px; height: 210px; border: 1px solid rgba(232, 205, 148, .27); border-radius: 50%; box-shadow: 0 0 0 28px rgba(232, 205, 148, .06), 0 0 0 58px rgba(232, 205, 148, .04); }
.brand { color: var(--gold-light); font-size: 13px; letter-spacing: .18em; }
.hero h1 { margin: 14px 0 12px; font-family: "Songti SC", "STSong", serif; font-size: clamp(32px, 9vw, 44px); line-height: 1.18; letter-spacing: .04em; position: relative; z-index: 1; }
.hero p { margin: 0; max-width: 390px; color: rgba(255, 250, 237, .82); line-height: 1.8; position: relative; z-index: 1; }
.eyebrow { color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.intro-copy { margin: 0 2px 20px; color: #5c6e68; line-height: 1.8; }

.entry-grid { display: grid; gap: 15px; }
.entry-card { width: 100%; padding: 22px; text-align: left; border: 1px solid var(--line); border-radius: 20px; color: var(--ink); background: rgba(255, 255, 255, .84); box-shadow: 0 14px 38px rgba(22, 62, 58, .08); transition: transform .16s ease, border-color .16s ease; }
.entry-card:active { transform: scale(.985); }
.entry-card.parent { border-left: 5px solid #b88a43; }
.entry-card.student { border-left: 5px solid #2a8079; }
.entry-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; margin-bottom: 15px; color: #fff; font-size: 23px; background: var(--deep-2); }
.entry-card.parent .entry-icon { background: var(--gold); }
.entry-card strong { display: block; font-family: "Songti SC", "STSong", serif; font-size: 25px; }
.entry-card span { display: block; margin-top: 7px; color: var(--muted); line-height: 1.65; }
.entry-card small { display: block; margin-top: 14px; color: var(--gold); font-weight: 700; }

.soft-card, .report-card { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.8); box-shadow: 0 10px 28px rgba(23,64,60,.06); }
.soft-card { margin-top: 18px; }
.soft-card p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.topbar { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; margin-bottom: 24px; }
.topbar button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: #fff; font-size: 22px; }
.topbar strong { text-align: center; font-size: 15px; }
.section-head h1 { margin: 8px 0 8px; font-family: "Songti SC", "STSong", serif; font-size: 30px; }
.section-head p { margin: 0 0 22px; color: var(--muted); line-height: 1.7; }

.form { display: grid; gap: 16px; }
.field { display: grid; gap: 8px; font-size: 14px; font-weight: 650; }
.field input, .field select { width: 100%; height: 50px; padding: 0 14px; border: 1px solid var(--line); border-radius: 13px; outline: none; color: var(--ink); background: #fff; }
.field input:focus, .field select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(185,138,66,.12); }
.form-note { padding: 14px; border-radius: 13px; color: #60716b; background: #edf4f0; font-size: 13px; line-height: 1.7; }
.check { display: grid; grid-template-columns: 20px 1fr; gap: 9px; align-items: start; color: #53645e; font-size: 13px; line-height: 1.6; }
.check input { width: 18px; height: 18px; accent-color: var(--deep-2); }
.error { min-height: 20px; color: var(--danger); font-size: 13px; }
.primary, .secondary, .text-action { width: 100%; min-height: 50px; border-radius: 14px; font-weight: 750; }
.primary { border: 0; color: #fffaf0; background: linear-gradient(135deg, #0b4a47, #127069); box-shadow: 0 12px 28px rgba(10,75,70,.2); }
.primary:disabled { opacity: .5; cursor: default; }
.secondary { border: 1px solid rgba(13,83,78,.22); color: var(--deep-2); background: #fff; }
.text-action { min-height: 42px; border: 0; color: var(--muted); background: transparent; }

.assessment-page { padding-bottom: calc(116px + env(safe-area-inset-bottom)); }
.assessment-meta { display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.assessment-meta span { color: var(--gold); font-size: 13px; font-weight: 750; }
.assessment-meta b { font-size: 26px; }
.assessment-meta small { color: var(--muted); font-size: 13px; }
.progress { height: 7px; margin: 12px 0 25px; overflow: hidden; border-radius: 99px; background: #e5e4dc; }
.progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), #e1bd74); transition: width .25s ease; }
.question { min-height: 168px; padding: 24px 20px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(145deg, #fffef9, #f4f0e5); box-shadow: 0 16px 34px rgba(22, 64, 59, .08); }
.question small { color: var(--gold); font-weight: 700; }
.question h1 { margin: 14px 0 0; font-family: "Songti SC", "STSong", serif; font-size: 23px; line-height: 1.65; }
.options { display: grid; gap: 10px; margin-top: 18px; }
.option { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 11px; min-height: 54px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-align: left; background: rgba(255,255,255,.84); }
.option i { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--deep-2); background: #edf3ef; font-style: normal; font-weight: 800; }
.option.selected { border-color: var(--gold); background: #fff9ea; box-shadow: 0 0 0 2px rgba(185,138,66,.1); }
.option.selected i { color: #fff; background: var(--gold); }
.assessment-actions { position: fixed; z-index: 5; left: 50%; bottom: 0; width: min(100%, 520px); transform: translateX(-50%); display: grid; grid-template-columns: 90px 1fr; gap: 10px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,253,247,.96); backdrop-filter: blur(14px); }

.loading { display: grid; place-items: center; min-height: 100vh; padding: 30px; text-align: center; }
.spinner { width: 46px; height: 46px; border: 4px solid #e0ddd2; border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.report-page { background: linear-gradient(180deg, #f7f1e4, #fffdf8 25%); }
.report-cover { margin: -24px -20px 22px; padding: 40px 24px 28px; color: #fff9ec; background: linear-gradient(145deg, #073d3a, #10625d); }
.report-cover h1 { margin: 10px 0; font-family: "Songti SC", "STSong", serif; font-size: 32px; }
.report-cover p { margin: 0; color: rgba(255,251,239,.82); line-height: 1.7; }
.report-stack { display: grid; gap: 16px; }
.report-card h2 { margin: 8px 0 8px; font-family: "Songti SC", "STSong", serif; font-size: 23px; }
.report-card p { margin: 0; color: var(--muted); line-height: 1.72; }
.score-orb { display: grid; place-items: center; width: 118px; height: 118px; margin: 10px auto 15px; border: 1px solid rgba(220,190,126,.65); border-radius: 50%; color: #fff7e7; background: radial-gradient(circle, #176d66, #073d3a); box-shadow: 0 0 0 9px #f5ead3; }
.score-orb b { font-size: 38px; }
.score-orb small { font-size: 12px; }
.dimension-list { display: grid; gap: 12px; margin-top: 15px; }
.dimension-row header { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; font-size: 13px; }
.dimension-row header span { color: var(--muted); }
.bar { height: 8px; overflow: hidden; border-radius: 99px; background: #e8e5dc; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1d7770, #c99a4d); }
.family-code { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px; margin: 14px 0; border: 1px dashed rgba(185,138,66,.62); border-radius: 14px; background: #fff9ea; }
.family-code b { display: block; margin-top: 3px; color: var(--deep); font-size: 27px; letter-spacing: .16em; }
.family-code button { padding: 9px 12px; border: 0; border-radius: 10px; color: #fff; background: var(--gold); }
.status-pill { display: inline-flex; padding: 6px 10px; border-radius: 99px; color: #157067; background: #e7f3ee; font-size: 12px; font-weight: 700; }
.bridge { padding: 14px 0; border-bottom: 1px solid var(--line); }
.bridge:last-child { border-bottom: 0; }
.bridge-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.bridge-title b { color: var(--gold); font-size: 18px; }
.dual-bars { display: grid; gap: 8px; }
.dual-row { display: grid; grid-template-columns: 42px 1fr 34px; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; }
.dual-row .bar i.parent { background: #b88a43; }
.dual-row .bar i.student { background: #247b75; }
.action-list { display: grid; gap: 10px; margin-top: 12px; }
.action-item { padding: 13px; border-left: 3px solid var(--gold); border-radius: 0 10px 10px 0; background: #f8f2e6; }
.action-item b { display: block; margin-bottom: 5px; }
.action-item span { color: var(--muted); font-size: 13px; line-height: 1.6; }
.compliance { color: #7c827e; font-size: 11px; line-height: 1.65; }
.plan7-conversion { border: 1px solid rgba(185,138,66,.45); background: linear-gradient(145deg,#fffaf0,#f2ead8); }
.plan7-conversion ul { display: grid; gap: 7px; padding-left: 22px; color: var(--muted); line-height: 1.55; }
.plan7-conversion .primary { display: grid; place-items: center; margin-top: 16px; padding: 0 14px; text-align: center; text-decoration: none; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 28px; transform: translateX(-50%); max-width: calc(100% - 40px); padding: 11px 16px; border-radius: 12px; color: #fff; background: rgba(8,51,49,.94); box-shadow: 0 12px 32px rgba(0,0,0,.2); }

@media (min-width: 560px) {
  body { padding: 24px 0; }
  #app { min-height: calc(100vh - 48px); border-radius: 26px; overflow: hidden; }
  .assessment-actions { bottom: 24px; border-radius: 0 0 26px 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
