:root {
  color-scheme: light;
  --ink: #1e2422;
  --muted: #69716d;
  --line: #d9dedb;
  --paper: #f7f8f5;
  --surface: #ffffff;
  --deep: #203b33;
  --wood: #2f7d57;
  --fire: #c84c3a;
  --earth: #a8792d;
  --metal: #68727d;
  --water: #2b6f9f;
  --danger: #a83931;
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.app-shell {
  min-height: 100vh;
  background: rgb(247 248 245 / 90%);
}

.topbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(20px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 92%);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: block;
  object-fit: contain;
  padding: 3px;
  border: 1px solid var(--deep);
  border-radius: 6px;
  background: #fff;
  flex: none;
}

.brand-title {
  margin: 0;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 700;
}

.brand-title span {
  margin-left: 2px;
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 750;
}

.brand-en,
.en {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 400;
}

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

.top-actions .btn {
  white-space: nowrap;
}

.language-control-compact button {
  min-width: 48px;
  padding: 5px 9px;
  font-size: 12px;
}

.container {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.entry-main {
  min-height: calc(100vh - 69px);
  display: grid;
  place-items: center;
  padding: 48px 0 72px;
}

.entry-layout {
  width: min(940px, 100%);
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
  gap: clamp(36px, 7vw, 84px);
  align-items: center;
}

.element-figure {
  min-height: 440px;
  position: relative;
  display: grid;
  place-items: center;
}

.element-system {
  width: min(420px, 90vw);
  aspect-ratio: 1;
  position: relative;
  filter: drop-shadow(0 24px 36px rgb(32 59 51 / 8%));
}

.element-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.orbit,
.element-cycle,
.element-flow {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.orbit {
  stroke: #d6ddd9;
  stroke-width: 1;
}

.orbit-inner {
  stroke-dasharray: 2 7;
  transform-origin: 200px 200px;
  animation: orbit-turn 32s linear infinite;
}

.element-cycle {
  stroke: #a9b8b1;
  stroke-width: 1;
  stroke-linejoin: round;
}

.element-flow {
  stroke: var(--deep);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 7 93;
  animation: element-flow 9s linear infinite;
}

.element-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 124px;
  height: 124px;
  transform: translate(-50%, -50%);
  display: grid;
  align-content: center;
  place-items: center;
  color: var(--deep);
  z-index: 2;
  border: 1px solid #b8c6bf;
  border-radius: 50%;
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 14px 32px rgb(32 59 51 / 10%);
  animation: core-breathe 4.8s ease-in-out infinite;
}

.element-core span {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 25px;
  line-height: 1.05;
  font-weight: 700;
}

.element-core strong {
  margin-top: 2px;
  font-size: 11px;
  letter-spacing: 0;
}

.element-core small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1;
}

.element-node {
  width: 76px;
  min-height: 72px;
  padding: 10px 8px 8px;
  border: 1px solid #d2d9d5;
  border-radius: 7px;
  display: grid;
  align-content: center;
  place-items: center;
  position: absolute;
  z-index: 3;
  color: var(--ink);
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 9px 22px rgb(30 36 34 / 10%);
  animation: node-float 5s ease-in-out infinite;
}

.element-node i {
  width: 6px;
  height: 6px;
  margin-bottom: 5px;
  border-radius: 50%;
  background: var(--node-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--node-color) 14%, transparent);
}

.element-node span {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 23px;
  line-height: 1;
  font-weight: 700;
}

.element-node small {
  margin-top: 4px;
  display: block;
  color: var(--muted);
  font: 9px/1.1 Inter, sans-serif;
  text-align: center;
}

.node-wood { --node-color: var(--wood); left: 3%; top: 28%; animation-delay: -1.8s; }
.node-fire { --node-color: var(--fire); left: 50%; top: 1%; transform: translateX(-50%); animation-name: node-float-center; animation-delay: -0.7s; }
.node-earth { --node-color: var(--earth); right: 0; top: 31%; animation-delay: -3.3s; }
.node-metal { --node-color: var(--metal); right: 14%; bottom: 0; animation-delay: -2.4s; }
.node-water { --node-color: var(--water); left: 13%; bottom: 0; animation-delay: -4.1s; }

@keyframes orbit-turn {
  to { transform: rotate(360deg); }
}

@keyframes element-flow {
  to { stroke-dashoffset: -100; }
}

@keyframes core-breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 14px 32px rgb(32 59 51 / 10%); }
  50% { transform: translate(-50%, -50%) scale(1.035); box-shadow: 0 17px 38px rgb(32 59 51 / 15%); }
}

@keyframes node-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -5px; }
}

@keyframes node-float-center {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-5px); }
}

.entry-panel {
  padding: clamp(28px, 5vw, 52px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 64px rgb(32 59 51 / 9%);
}

.entry-panel h1 {
  margin: 0 0 10px;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.18;
  font-weight: 700;
}

.entry-panel h1 span {
  display: block;
  margin-top: 9px;
  color: var(--deep);
  font-size: 0.72em;
  font-weight: 600;
}

.entry-brand {
  margin: 0 0 13px;
  color: var(--deep);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 14px;
  font-weight: 700;
}

.entry-brand span {
  margin-left: 3px;
  font-family: Inter, sans-serif;
  font-size: 10px;
}

.entry-subtitle {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 14px;
}

.entry-language {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 22px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 650;
}

.entry-language small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}

.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f1f3f1;
}

.segmented button {
  min-height: 36px;
  padding: 6px 16px;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
}

.segmented button.active {
  color: var(--ink);
  background: white;
  box-shadow: 0 1px 3px rgb(0 0 0 / 10%);
}

.entry-form {
  margin-top: 24px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.field label,
.field-label {
  font-weight: 650;
  font-size: 14px;
}

.field input,
.field select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #bcc5c0;
  border-radius: 5px;
  color: var(--ink);
  background: white;
  outline: none;
}

.field input:focus,
.field select:focus {
  border-color: var(--deep);
  box-shadow: 0 0 0 3px rgb(32 59 51 / 12%);
}

.form-error {
  min-height: 20px;
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 13px;
}

.btn {
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-weight: 650;
  line-height: 1.2;
}

.btn-primary {
  color: white;
  background: var(--deep);
  border-color: var(--deep);
}

.btn-primary:hover { background: #172d27; }

.btn-secondary {
  color: var(--ink);
  background: white;
  border-color: #b8c1bc;
}

.btn-secondary:hover { background: #f2f4f2; }

.btn-quiet {
  color: var(--muted);
  background: transparent;
  border-color: transparent;
}

.btn-danger {
  color: var(--danger);
  background: white;
  border-color: #dab5b0;
}

.btn-block { width: 100%; }

.page-main {
  padding: 36px 0 72px;
}

.survey-main {
  min-height: calc(100vh - 69px);
  padding-bottom: 28px;
}

.survey-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.page-title {
  margin: 0;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.25;
}

.progress-wrap {
  min-width: 220px;
  text-align: right;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.progress-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: #dde2df;
}

.progress-bar {
  height: 100%;
  background: var(--deep);
  transition: width 160ms ease;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 24px 0 10px;
  border-top: 1px solid var(--line);
}

.conditional-field[hidden] {
  display: none;
}

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

.survey-stage {
  min-height: 400px;
  display: grid;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  animation: stage-in 220ms ease-out both;
}

.profile-stage {
  width: min(900px, 100%);
  margin: 0 auto;
}

.survey-question-list {
  width: min(1080px, 100%);
  max-height: min(64vh, 720px);
  margin: 0 auto;
  padding-right: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.survey-question-list .question-item:last-child {
  border-bottom: 0;
}

.privacy-note {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.question-item-single {
  width: min(980px, 100%);
  margin: 0 auto;
  grid-template-columns: 1fr;
  gap: 28px;
  padding: 42px 0;
  border: 0;
}

.question-item-single .question-number {
  margin-bottom: 18px;
}

.question-item-single .question-zh {
  max-width: 820px;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(22px, 2.5vw, 30px);
  line-height: 1.55;
  font-weight: 650;
}

.question-item-single .likert-option label {
  min-height: 76px;
}

.question-item-batch {
  grid-template-columns: minmax(220px, 1fr) minmax(500px, 1.75fr);
  gap: 28px;
  padding: 24px 2px;
}

.question-item-batch .likert-option label {
  min-height: 72px;
}

@keyframes stage-in {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

.question-item {
  display: grid;
  grid-template-columns: minmax(240px, 1.15fr) minmax(480px, 1.85fr);
  gap: clamp(24px, 4vw, 56px);
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.question-number {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  border: 1px solid #aeb9b3;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
}

.question-zh {
  margin: 0 0 7px;
  font-size: 17px;
  line-height: 1.65;
  font-weight: 650;
}

.question-en {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.likert {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

.likert-option {
  position: relative;
  min-width: 0;
}

.likert-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.likert-option label {
  min-height: 94px;
  height: 100%;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 10px 8px;
  border: 1px solid #c8cfcb;
  border-radius: 5px;
  background: white;
  text-align: center;
  font-size: 13px;
  line-height: 1.35;
  cursor: pointer;
}

.likert-option label .en {
  font-size: 10px;
}

.likert-option input:focus-visible + label {
  outline: 3px solid rgb(32 59 51 / 20%);
  outline-offset: 2px;
}

.likert-option input:checked + label {
  color: white;
  border-color: var(--deep);
  background: var(--deep);
}

.likert-option input:checked + label .en { color: #dfe8e4; }

.survey-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 26px;
}

.bazi-reading {
  max-width: 780px;
}

.bazi-reading p {
  margin: 0 0 14px;
}

.bazi-reading .bazi-pillars {
  padding: 14px 16px;
  border-left: 3px solid var(--deep);
  background: var(--paper);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 18px;
  font-weight: 700;
}

.bazi-reading small {
  color: var(--muted);
  line-height: 1.65;
}

.report-page {
  background: #fff;
}

.report-hero {
  padding: 42px 0 44px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.report-hero-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.locked-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.report-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.report-summary {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
  gap: clamp(36px, 7vw, 88px);
  align-items: center;
}

.radar-shell {
  width: min(100%, 520px);
  margin: 0 auto;
  aspect-ratio: 420 / 360;
}

.radar-shell svg {
  display: block;
  width: 100%;
  height: 100%;
}

.dominant-line {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.dominant-line strong {
  color: var(--ink);
  font-size: 22px;
}

.report-analysis {
  margin: 0;
  font-size: 17px;
  line-height: 1.9;
}

.score-legend {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 22px;
}

.score-item {
  padding-top: 9px;
  border-top: 3px solid var(--element-color);
}

.score-item span {
  color: var(--muted);
  font-size: 12px;
}

.score-item strong {
  display: block;
  margin-top: 2px;
  font-size: 20px;
}

.report-section {
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
}

.section-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(32px, 7vw, 96px);
}

.section-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
}

.section-body {
  max-width: 760px;
}

.section-body p {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.9;
}

.report-section-insights {
  background: #fbfcfa;
}

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

.insight-item {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 28px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.insight-item h3 {
  margin: 3px 0 0;
  font-size: 15px;
  line-height: 1.55;
}

.insight-item p {
  margin: 0;
}

.case-study p:not(.disclaimer) {
  margin-bottom: 20px;
}

.case-study p:nth-child(3),
.case-study p:nth-child(4) {
  padding-left: 18px;
  border-left: 2px solid #9aada4;
}

.quote {
  margin: 0;
  padding: 0;
  border: 0;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.55;
}

.quote cite {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font: 13px/1.5 Inter, sans-serif;
  font-style: normal;
}

.historical-section { background: #f7f5ef; }

.historical-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}

.figure-portrait {
  width: 190px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
}

.figure-portrait img {
  display: block;
  width: 1000%;
  max-width: none;
  height: 100%;
}

.historical-kicker {
  margin: 0 0 5px !important;
  color: var(--muted);
  font-size: 11px !important;
  font-weight: 700;
  text-transform: uppercase;
}

.historical-copy h3 {
  margin: 0 0 12px;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 30px;
}

.historical-copy small {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.career-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.career-list li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.career-index { color: var(--muted); font-variant-numeric: tabular-nums; }

.career-copy strong {
  display: block;
  font-size: 17px;
}

.career-copy p {
  margin: 7px 0 0;
  color: #4f5954;
  font-size: 14px;
  line-height: 1.7;
}

.career-copy p b {
  display: inline-block;
  margin-right: 9px;
  color: var(--ink);
  font-size: 12px;
}

.contact-line {
  padding: 32px 0 48px;
  font-weight: 700;
  text-align: center;
}

.report-bottom-actions {
  padding: 0 0 56px;
  text-align: center;
}

.report-bottom-actions .btn {
  min-width: 200px;
}

.disclaimer {
  color: var(--muted);
  font-size: 13px !important;
}

.admin-main {
  padding: 36px 0 72px;
}

.admin-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  overflow: hidden;
}

.stat {
  padding: 22px;
  border-right: 1px solid var(--line);
}

.stat:last-child { border-right: 0; }

.stat-label { color: var(--muted); font-size: 12px; }
.stat-value { display: block; margin-top: 5px; font-size: 30px; font-weight: 720; }

.admin-band {
  margin-top: 28px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
}

.band-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.band-head h2 { margin: 0; font-size: 18px; }

.generator-form {
  display: grid;
  grid-template-columns: 120px minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.generator-form .field { margin: 0; }

.generated-codes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.code-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 8px 6px 12px;
  border: 1px solid #bdd0c6;
  border-radius: 5px;
  background: #f3f8f5;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.copy-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: white;
  color: var(--deep);
  font-size: 16px;
}

.table-wrap { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

.data-table th,
.data-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
}

.data-table th {
  color: var(--muted);
  font-weight: 650;
  background: #f6f7f5;
}

.data-table code { font-size: 13px; }

.status {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 650;
}

.status-unused { color: #53605a; background: #edf0ee; }
.status-in_progress { color: #815a18; background: #fbf0d8; }
.status-completed { color: #246248; background: #e1f1e8; }

.empty-state {
  padding: 44px 16px;
  color: var(--muted);
  text-align: center;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  padding: 20px 0 28px;
  border-bottom: 1px solid var(--line);
}

.meta-label { color: var(--muted); font-size: 12px; }
.meta-value { display: block; margin-top: 5px; font-weight: 650; overflow-wrap: anywhere; }

.answer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.answer-list li {
  display: grid;
  grid-template-columns: 42px minmax(240px, 1fr) minmax(150px, 0.35fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.answer-value { font-weight: 700; text-align: right; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 100;
  max-width: min(440px, calc(100% - 32px));
  padding: 11px 16px;
  border-radius: 5px;
  color: white;
  background: #1e2422;
  box-shadow: 0 12px 28px rgb(0 0 0 / 22%);
  transform: translate(-50%, 24px);
  opacity: 0;
  pointer-events: none;
  transition: 160ms ease;
}

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

.loading {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--muted);
}

@media (max-width: 900px) {
  .entry-layout { grid-template-columns: 1fr; width: min(600px, 100%); }
  .element-figure { min-height: 300px; order: 2; }
  .element-system { width: min(320px, 85vw); }
  .element-node { width: 64px; min-height: 62px; padding: 8px 6px 7px; }
  .element-node span { font-size: 19px; }
  .question-item { grid-template-columns: 1fr; gap: 18px; }
  .question-item-batch { grid-template-columns: 1fr; }
  .report-summary { grid-template-columns: 1fr; }
  .section-grid { grid-template-columns: 1fr; gap: 18px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .generator-form { grid-template-columns: 110px 1fr; }
  .generator-form .btn { grid-column: 1 / -1; }
  .detail-meta { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .topbar { min-height: 60px; gap: 10px; padding: 10px 16px; }
  .brand { gap: 8px; }
  .brand-en { display: none; }
  .brand-title { font-size: 15px; white-space: nowrap; }
  .top-actions { gap: 4px; }
  .language-control-compact button { min-width: 43px; padding: 5px 6px; }
  .top-actions .btn-quiet { padding-right: 4px; padding-left: 4px; }
  .container { width: min(100% - 28px, 1160px); }
  .entry-main { padding: 22px 0 44px; align-items: start; }
  .entry-panel { padding: 24px 20px; }
  .entry-panel h1 { font-size: 29px; }
  .entry-language { align-items: flex-start; flex-direction: column; gap: 10px; }
  .element-figure { min-height: 250px; }
  .element-system { width: 250px; }
  .element-core { width: 82px; height: 82px; }
  .element-core span { font-size: 19px; }
  .element-core small { display: none; }
  .element-node { width: 50px; min-height: 48px; padding: 6px 4px 5px; }
  .element-node i { width: 4px; height: 4px; margin-bottom: 3px; }
  .element-node span { font-size: 16px; }
  .element-node small { font-size: 8px; }
  .page-main, .admin-main { padding-top: 24px; }
  .survey-head { grid-template-columns: 1fr; gap: 18px; }
  .progress-wrap { min-width: 0; text-align: left; }
  .profile-grid { grid-template-columns: 1fr; gap: 0; }
  .question-item { padding: 22px 0; }
  .survey-stage { min-height: 535px; }
  .survey-question-list { max-height: 58vh; padding-right: 6px; }
  .question-item-single { padding: 28px 0; gap: 20px; }
  .question-item-single .question-zh { font-size: 21px; }
  .likert { grid-template-columns: 1fr; }
  .likert-option label {
    min-height: 54px;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    text-align: left;
    padding: 10px 14px;
  }
  .likert-option label .en { text-align: right; }
  .survey-nav { margin: 0 -14px; padding: 16px 14px; }
  .report-hero-head, .admin-head { align-items: stretch; flex-direction: column; }
  .report-tools { justify-content: flex-start; }
  .score-legend { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .score-item strong { font-size: 16px; }
  .score-item span { font-size: 10px; }
  .report-section { padding: 36px 0; }
  .insight-item { grid-template-columns: 1fr; gap: 8px; }
  .historical-card { grid-template-columns: 1fr; gap: 18px; }
  .figure-portrait { width: min(190px, 58vw); }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat { padding: 16px; }
  .admin-band { padding: 20px 16px; margin-left: -4px; margin-right: -4px; }
  .generator-form { grid-template-columns: 1fr; }
  .generator-form .btn { grid-column: auto; }
  .detail-meta { grid-template-columns: 1fr; }
  .answer-list li { grid-template-columns: 34px 1fr; }
  .answer-value { grid-column: 2; text-align: left; }
}

@media (max-width: 360px) {
  .brand > div { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .orbit-inner,
  .element-flow,
  .element-core,
  .element-node {
    animation: none;
  }

  .survey-stage {
    animation: none;
  }
}

@media print {
  .topbar, .report-tools, .locked-note { display: none !important; }
  .report-hero { padding-top: 12px; }
  .report-section { break-inside: avoid; }
  body { background: white; }
}
