:root {
  --bg-canvas: #f8f4ea;
  --bg-surface: #ffffff;
  --text-primary: #1f2523;
  --text-secondary: #66706b;
  --brand-green: #1f6b57;
  --brand-gold: #c49a45;
  --river-cyan: #2f8f9d;
  --lychee-red: #c94a3a;
  --warning-amber: #d9822b;
  --success-green: #2e7d4f;
  --line-soft: #e7ded0;
  --surface-tint: #eef7f3;
  --shadow-soft: 0 6px 18px rgba(31, 37, 35, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #ece5d8;
}

button {
  border: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.phone {
  position: relative;
  width: 390px;
  height: 844px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 10px solid #171b1a;
  border-radius: 32px;
  background: var(--bg-canvas);
  box-shadow: 0 28px 80px rgba(31, 37, 35, 0.25);
}

.status-bar {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  padding: 0 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(248, 244, 234, 0.96);
}

.status-dots {
  color: var(--text-secondary);
}

.screen {
  display: none;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px 16px 96px;
  scrollbar-width: none;
}

.screen::-webkit-scrollbar {
  display: none;
}

.screen.active {
  display: block;
}

.hidden {
  display: none !important;
}

.app-header,
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.page-header {
  min-height: 48px;
}

.page-header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.page-header.sticky {
  position: sticky;
  top: -14px;
  z-index: 5;
  margin: -14px -16px 14px;
  padding: 14px 16px 10px;
  background: rgba(248, 244, 234, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(231, 222, 208, 0.7);
}

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

h1 {
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0;
}

h2 {
  font-size: 17px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0;
}

h3 {
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
}

p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.55;
}

.eyebrow,
.mini-label,
.source {
  color: var(--brand-gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.source {
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: none;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-secondary);
}

.icon-btn.active {
  color: var(--brand-gold);
  background: #fff9ec;
}

.icon-btn.small {
  width: 32px;
  height: 32px;
}

#profileSaveBtn {
  width: 48px;
  height: 48px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 2;
}

.icon-btn svg,
.primary-btn svg,
.secondary-btn svg,
.quick-icon svg,
.deadline-card svg,
.advisor-card svg,
.summary-pill svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.hero-card,
.plan-card,
.deadline-card,
.school-hero,
.compare-card,
.chart-card,
.advisor-card,
.editor-summary,
.batch-card,
.report-hero,
.distribution-card,
.risk-card,
.advice-card,
.evidence-card,
.next-card {
  border: 1px solid rgba(231, 222, 208, 0.9);
  border-radius: 8px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-soft);
}

.hero-card {
  min-height: 188px;
  padding: 16px;
  overflow: hidden;
}

.hero-copy {
  position: relative;
  z-index: 1;
  min-height: 156px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 118px;
}

.score-row {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.score-row strong {
  color: var(--brand-green);
  font-size: 42px;
  line-height: 0.95;
  font-weight: 800;
}

.score-row span {
  padding-bottom: 4px;
  color: var(--text-secondary);
  font-size: 13px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.tag.green,
.tag.low {
  color: var(--brand-green);
  background: #e8f4ef;
}

.tag.gold,
.tag.mid {
  color: #8a6425;
  background: #fff4dc;
}

.tag.cyan {
  color: #206d78;
  background: #e9f7f8;
}

.tag.high {
  color: var(--lychee-red);
  background: #fff0ed;
}

.progress-block {
  margin-top: auto;
  width: 100%;
  max-width: none;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.progress-meta b {
  color: var(--brand-green);
}

.progress {
  height: 7px;
  width: 100%;
  overflow: hidden;
  border-radius: 999px;
  background: #efe6d7;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand-green);
}

.school-photo {
  border-radius: 8px;
  background-image:
    linear-gradient(180deg, rgba(31, 107, 87, 0.08), rgba(196, 154, 69, 0.16)),
    url("https://images.unsplash.com/photo-1509062522246-3755977927d7?auto=format&fit=crop&w=700&q=80");
  background-position: center;
  background-size: cover;
}

.student-illustration {
  position: relative;
  min-height: 156px;
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 20%, rgba(196, 154, 69, 0.2), transparent 24%),
    linear-gradient(180deg, #edf7f3 0%, #fff7e8 100%);
}

.student-illustration::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  height: 8px;
  border-radius: 50%;
  background: rgba(31, 37, 35, 0.08);
}

.student {
  position: absolute;
  bottom: 14px;
  width: 54px;
  height: 132px;
}

.student-girl {
  left: 8px;
  transform: scale(0.92);
  transform-origin: bottom center;
}

.student-boy {
  right: 8px;
}

.student .face {
  position: absolute;
  left: 14px;
  top: 18px;
  width: 28px;
  height: 32px;
  border-radius: 42% 42% 48% 48%;
  background: #f6cda9;
  box-shadow: inset 0 -2px 0 rgba(159, 105, 68, 0.12);
  z-index: 3;
}

.student .face::before,
.student .face::after {
  content: "";
  position: absolute;
  top: 13px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #3a2b24;
}

.student .face::before {
  left: 8px;
}

.student .face::after {
  right: 8px;
}

.student .hair {
  position: absolute;
  left: 11px;
  top: 10px;
  width: 34px;
  height: 24px;
  border-radius: 15px 15px 10px 10px;
  background: #2e2621;
  z-index: 4;
}

.student-girl .hair {
  left: 8px;
  width: 40px;
  height: 42px;
  border-radius: 18px 18px 14px 14px;
}

.student-boy .hair::after {
  content: "";
  position: absolute;
  right: 2px;
  top: -3px;
  width: 18px;
  height: 14px;
  border-radius: 50% 50% 0 50%;
  background: #2e2621;
  transform: rotate(16deg);
}

.student .neck {
  position: absolute;
  left: 22px;
  top: 48px;
  width: 12px;
  height: 12px;
  border-radius: 0 0 6px 6px;
  background: #edbc92;
  z-index: 2;
}

.student .uniform {
  position: absolute;
  left: 7px;
  top: 58px;
  width: 42px;
  height: 68px;
  border-radius: 14px 14px 10px 10px;
  background: #f8fbff;
  border: 2px solid #2e6da4;
  overflow: hidden;
  z-index: 2;
}

.student .uniform::before,
.student .uniform::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 9px;
  background: #2e6da4;
}

.student .uniform::before {
  left: 0;
}

.student .uniform::after {
  right: 0;
}

.student .collar {
  position: absolute;
  left: 13px;
  top: 0;
  width: 16px;
  height: 12px;
  border-radius: 0 0 8px 8px;
  background: #2e6da4;
  z-index: 3;
}

.student .zipper {
  position: absolute;
  left: 20px;
  top: 9px;
  bottom: 6px;
  width: 2px;
  border-radius: 2px;
  background: #dbe8f4;
  z-index: 4;
}

.student .sleeve {
  position: absolute;
  top: 12px;
  width: 10px;
  height: 45px;
  border-radius: 7px;
  background: #2e6da4;
  z-index: 1;
}

.student .sleeve.left {
  left: -8px;
  transform: rotate(12deg);
}

.student .sleeve.right {
  right: -8px;
  transform: rotate(-12deg);
}

.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0 20px;
}

.quick-card {
  display: flex;
  min-height: 116px;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 14px;
  text-align: left;
  border: 1px solid rgba(231, 222, 208, 0.9);
  border-radius: 8px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-soft);
}

.quick-card.wide {
  grid-column: 1 / -1;
  min-height: 96px;
  position: relative;
}

.quick-card b {
  font-size: 15px;
}

.quick-card small {
  color: var(--text-secondary);
  line-height: 1.4;
}

.quick-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.quick-icon.green {
  color: var(--brand-green);
  background: #e8f4ef;
}

.quick-icon.gold {
  color: #8a6425;
  background: #fff4dc;
}

.quick-icon.cyan {
  color: #206d78;
  background: #e9f7f8;
}

.arrow-chip {
  position: absolute;
  right: 14px;
  bottom: 14px;
  color: var(--brand-green);
  font-size: 12px;
  font-weight: 700;
}

.section {
  margin-top: 18px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.text-btn {
  color: var(--brand-green);
  font-size: 13px;
  font-weight: 700;
}

.plan-card {
  padding: 14px;
}

.plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.plan-badge {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--brand-green);
  background: var(--surface-tint);
  font-size: 12px;
  font-weight: 700;
}

.muted {
  color: var(--text-secondary);
  font-size: 12px;
}

.risk-strip {
  height: 30px;
  display: flex;
  overflow: hidden;
  border-radius: 8px;
  background: #f1eadf;
}

.risk-strip.large {
  height: 38px;
}

.risk {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.risk.high {
  background: var(--lychee-red);
}

.risk.mid {
  background: var(--warning-amber);
}

.risk.low {
  background: var(--success-green);
}

.plan-summary {
  margin: 12px 0 14px;
}

.primary-btn,
.secondary-btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}

.primary-btn {
  color: #fff;
  background: var(--brand-green);
}

.secondary-btn {
  color: var(--brand-green);
  border: 1px solid #cfe2d9;
  background: #f5fbf8;
}

.secondary-btn:disabled,
.secondary-btn.disabled {
  color: var(--text-secondary);
  cursor: not-allowed;
  border-color: var(--line-soft);
  background: #f5efe5;
}

.plan-card .primary-btn,
.advisor-card .primary-btn {
  width: 100%;
}

.deadline-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  background: #fffaf0;
}

.deadline-card svg {
  color: var(--brand-gold);
}

.school-mini-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.school-mini {
  min-height: 58px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "name score"
    "meta score";
  align-items: center;
  padding: 12px;
  text-align: left;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.school-mini span {
  grid-area: name;
  font-size: 14px;
  font-weight: 700;
}

.school-mini b {
  grid-area: score;
  color: var(--brand-green);
  font-size: 24px;
}

.school-mini small {
  grid-area: meta;
  color: var(--text-secondary);
}

.school-hero {
  overflow: hidden;
  margin-bottom: 14px;
}

.school-photo {
  height: 148px;
  border-radius: 0;
}

.school-info {
  padding: 14px;
}

.school-info p {
  margin-top: 8px;
}

.compare-card {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 12px;
  align-items: center;
  padding: 14px;
}

.compare-card h2 {
  margin: 4px 0 5px;
  color: var(--lychee-red);
}

.compare-score {
  display: flex;
  min-height: 112px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #fff0ed;
}

.compare-score span {
  color: var(--text-secondary);
  font-size: 11px;
}

.compare-score b {
  color: var(--text-primary);
  font-size: 30px;
  line-height: 1.1;
}

.compare-score em {
  color: var(--lychee-red);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.plan-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.plan-info-grid div {
  min-width: 0;
  border: 1px solid rgba(231, 222, 208, 0.9);
  border-radius: 8px;
  padding: 10px;
  background: #fffcf7;
}

.plan-info-grid span,
.school-contact-card span {
  display: block;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.4;
}

.plan-info-grid b {
  display: block;
  margin-top: 4px;
  color: var(--canton-green);
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.school-contact-card {
  border: 1px solid rgba(231, 222, 208, 0.9);
  border-radius: 8px;
  padding: 11px 12px;
  background: var(--bg-soft);
}

.school-contact-card p {
  margin: 0 0 4px;
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.5;
}

.chart-card {
  position: relative;
  height: 220px;
  padding: 16px 16px 38px;
}

.chart-grid {
  position: absolute;
  inset: 18px 16px 42px;
  display: grid;
  grid-template-rows: repeat(4, 1fr);
}

.chart-grid span {
  border-bottom: 1px dashed #eadfce;
}

.line-chart {
  position: relative;
  height: 150px;
  margin: 6px 20px 0;
}

.point {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 3px solid var(--river-cyan);
  border-radius: 50%;
  background: #fff;
  z-index: 2;
}

.point b {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  color: var(--river-cyan);
  font-size: 12px;
}

.p1 {
  left: 0;
  top: 92px;
}

.p2 {
  left: 48%;
  top: 55px;
}

.p3 {
  right: 0;
  top: 36px;
}

.line {
  position: absolute;
  height: 3px;
  border-radius: 99px;
  background: var(--river-cyan);
  transform-origin: left center;
}

.l1 {
  left: 10px;
  top: 97px;
  width: 128px;
  transform: rotate(-16deg);
}

.l2 {
  left: 145px;
  top: 62px;
  width: 126px;
  transform: rotate(-8deg);
}

.my-line {
  position: absolute;
  left: -10px;
  right: -10px;
  top: 63px;
  border-top: 2px dashed var(--brand-green);
}

.my-line span {
  position: absolute;
  right: 0;
  top: -22px;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--brand-green);
  background: #e8f4ef;
  font-size: 11px;
  font-weight: 700;
}

.chart-years {
  position: absolute;
  left: 34px;
  right: 34px;
  bottom: 14px;
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
  font-size: 12px;
}

.data-table {
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.table-row {
  display: grid;
  grid-template-columns: 0.8fr 0.8fr 0.8fr 1.2fr;
  min-height: 44px;
  align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid #f0e8dc;
  font-size: 13px;
}

.table-row:last-child {
  border-bottom: 0;
}

.table-head {
  color: var(--text-secondary);
  background: #fbf7ef;
  font-size: 12px;
  font-weight: 700;
}

.table-row b {
  color: var(--brand-green);
}

.advisor-card {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: #fffaf0;
}

.advisor-card svg {
  flex: 0 0 auto;
  color: var(--brand-gold);
}

.editor-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  margin-bottom: 12px;
}

.editor-summary h2 {
  margin-top: 2px;
  color: var(--brand-green);
  font-size: 26px;
}

.summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--brand-green);
  background: var(--surface-tint);
  font-size: 12px;
  font-weight: 700;
}

.batch-card {
  margin-bottom: 12px;
  padding: 14px;
}

.batch-card.collapsed {
  box-shadow: none;
}

.volunteer-header-actions {
  flex-wrap: wrap;
  max-width: min(44vw, 280px);
}

.page-action-btn {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  white-space: nowrap;
}

.page-action-btn span {
  line-height: 1;
}

.batch-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.batch-title > div:first-child {
  min-width: 0;
}

.batch-title p {
  margin-top: 4px;
}

.batch-title-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.volunteer-list.compact-preview {
  margin-top: 12px;
}

.batch-title-actions .tag,
.batch-edit-btn span {
  white-space: nowrap;
}

.batch-edit-btn {
  display: inline-flex;
  min-width: 54px;
  height: 34px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid #cfe2d9;
  border-radius: 999px;
  color: var(--brand-green);
  background: var(--surface-tint);
  font-size: 12px;
  font-weight: 800;
}

.batch-edit-btn svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.4;
}

.batch-edit-btn:hover,
.batch-edit-btn:focus-visible {
  border-color: var(--brand-green);
  outline: none;
}

.volunteer-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.vol-card {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 82px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-left-width: 4px;
  border-radius: 8px;
  background: #fff;
}

.risk-high {
  border-left-color: var(--lychee-red);
}

.risk-mid {
  border-left-color: var(--warning-amber);
}

.risk-low {
  border-left-color: var(--success-green);
}

.vol-index {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--brand-green);
  background: var(--surface-tint);
  font-weight: 800;
}

.risk-tag {
  display: inline-flex;
  margin-top: 5px;
  padding: 3px 8px;
  border: 0;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.risk-analysis-btn {
  cursor: pointer;
}

.risk-analysis-btn:focus-visible,
.risk-analysis-btn:hover {
  outline: 2px solid rgba(201, 74, 58, 0.22);
  outline-offset: 2px;
}

.vol-replace-btn {
  display: inline-flex;
  min-width: 54px;
  height: 36px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid #dacfbf;
  border-radius: 8px;
  color: var(--brand-green);
  background: #fffdf8;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.vol-replace-btn svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.4;
}

.vol-replace-btn:hover,
.vol-replace-btn:focus-visible {
  border-color: var(--brand-green);
  background: var(--surface-tint);
  outline: none;
}

.risk-tag.high {
  color: var(--lychee-red);
  background: #fff0ed;
}

.risk-tag.mid {
  color: #8a4e18;
  background: #fff4dc;
}

.risk-tag.low {
  color: var(--success-green);
  background: #e8f4ef;
}

.empty-vol {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px dashed #d8cdbd;
  border-radius: 8px;
  color: var(--brand-green);
  background: #fffdf7;
  font-size: 14px;
  font-weight: 700;
}

.empty-vol.warning {
  color: #8a4e18;
  background: #fff9ee;
}

.batch-edit-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(231, 222, 208, 0.9);
  border-radius: 8px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-soft);
}

.batch-edit-hero h2 {
  margin: 4px 0 6px;
  font-size: 22px;
}

.batch-edit-hero p:last-child {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
}

.batch-edit-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(231, 222, 208, 0.9);
  border-radius: 8px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-soft);
}

.batch-edit-list {
  display: grid;
  gap: 10px;
}

.batch-edit-card {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 76px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-left-width: 4px;
  border-radius: 8px;
  background: #fff;
}

.batch-edit-card.empty {
  grid-template-columns: 34px 1fr;
  border-style: dashed;
  color: var(--text-secondary);
  background: #fffdf7;
}

.batch-edit-card h3 {
  margin-bottom: 3px;
  font-size: 16px;
}

.batch-edit-card p {
  color: var(--text-secondary);
  font-size: 13px;
}

.batch-edit-controls {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.batch-edit-action,
.batch-edit-readonly {
  display: inline-flex;
  min-width: 54px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  color: var(--text-secondary);
  background: #f5efe5;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.batch-edit-action:hover,
.batch-edit-action:focus-visible,
.batch-edit-readonly:hover,
.batch-edit-readonly:focus-visible {
  color: var(--brand-green);
  background: #ede5d7;
  outline: none;
}

.batch-edit-remove {
  display: inline-flex;
  min-width: 54px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  color: var(--lychee-red);
  background: #fff1ed;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.batch-edit-remove:hover,
.batch-edit-remove:focus-visible {
  color: #fff;
  background: var(--lychee-red);
  outline: none;
}

.batch-edit-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.bottom-action {
  position: sticky;
  z-index: 10;
  bottom: -1px;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 10px;
  margin: 12px -16px -96px;
  padding: 12px 16px 18px;
  border-top: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.bottom-action.three {
  grid-template-columns: 1fr 0.8fr 1fr;
}

#report {
  padding-bottom: 142px;
}

.report-fab-wrap {
  position: sticky;
  z-index: 9;
  bottom: 78px;
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
  padding-bottom: 4px;
  pointer-events: none;
}

.report-fab {
  width: 72px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(31, 107, 87, 0.18);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #2a7f68, var(--brand-green));
  box-shadow: 0 16px 30px rgba(31, 107, 87, 0.24);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
  pointer-events: auto;
}

.report-fab:hover,
.report-fab:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(31, 107, 87, 0.28);
  outline: none;
}

.report-hero {
  padding: 16px;
  color: #fff;
  border: 0;
  background:
    linear-gradient(135deg, rgba(31, 107, 87, 0.96), rgba(39, 92, 79, 0.94)),
    url("https://images.unsplash.com/photo-1523240795612-9a054b0db644?auto=format&fit=crop&w=700&q=80");
  background-position: center;
  background-size: cover;
}

.report-hero p,
.report-hero .mini-label {
  color: rgba(255, 255, 255, 0.84);
}

.report-score {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 10px;
}

.report-score h2 {
  color: #fff;
  font-size: 30px;
  line-height: 1;
}

.report-score span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  font-size: 12px;
  font-weight: 700;
}

.report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.report-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.14);
  font-size: 11px;
}

.distribution-card {
  padding: 14px;
}

.legend-row {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 12px;
}

.dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  margin-right: 4px;
  border-radius: 50%;
}

.dot.high {
  background: var(--lychee-red);
}

.dot.mid {
  background: var(--warning-amber);
}

.dot.low {
  background: var(--success-green);
}

.risk-cards {
  display: grid;
  gap: 9px;
}

.risk-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  box-shadow: none;
}

.clickable-card {
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.clickable-card:hover,
.clickable-card:focus-visible {
  border-color: #d9c38e;
  box-shadow: 0 8px 20px rgba(31, 37, 35, 0.11);
  outline: none;
  transform: translateY(-1px);
}

.risk-card span {
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.risk-card.warn span {
  color: #8a4e18;
  background: #fff4dc;
}

.risk-card.danger span {
  color: var(--lychee-red);
  background: #fff0ed;
}

.risk-card.ok span {
  color: var(--success-green);
  background: #e8f4ef;
}

.advice-list {
  display: grid;
  gap: 9px;
}

.advice-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding: 13px;
  box-shadow: none;
}

.advice-card button {
  grid-column: 2;
  justify-self: start;
  margin-top: 2px;
  color: var(--brand-green);
  font-size: 13px;
  font-weight: 800;
}

.advice-type {
  width: 40px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.advice-type.keep {
  color: var(--success-green);
  background: #e8f4ef;
}

.advice-type.replace {
  color: #8a4e18;
  background: #fff4dc;
}

.advice-type.add {
  color: var(--brand-green);
  background: #e9f7f8;
}

.evidence-card,
.next-card {
  margin-top: 18px;
  padding: 14px;
}

.evidence-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.evidence-grid div {
  min-height: 86px;
  padding: 12px;
  border-radius: 8px;
  background: #fbf7ef;
}

.evidence-grid span,
.evidence-grid small {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
}

.evidence-grid b {
  display: block;
  margin: 5px 0 3px;
  color: var(--brand-green);
  font-size: 25px;
}

.next-card ol {
  margin: 10px 0 0;
  padding-left: 22px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.8;
}

.last-section {
  margin-bottom: 96px;
}

.tabbar {
  height: 68px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  flex: 0 0 auto;
  border-top: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
}

.tab span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab svg {
  width: 20px;
  height: 20px;
}

.tab.active {
  color: var(--brand-green);
}

.beian-footer {
  flex: 0 0 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-top: 1px solid rgba(231, 222, 208, 0.7);
  background: rgba(255, 255, 255, 0.92);
}

.beian-footer a {
  display: inline-flex;
  align-items: center;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
}

.toast {
  position: absolute;
  left: 22px;
  right: 22px;
  top: 42px;
  z-index: 20;
  padding: 12px 14px;
  border-radius: 8px;
  color: #fff;
  background: rgba(31, 37, 35, 0.92);
  box-shadow: var(--shadow-soft);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.mini-action {
  position: absolute;
  top: 0;
  right: 0;
  margin-top: 0;
  padding: 8px 12px;
  border-radius: 8px;
  color: #fff;
  background: var(--brand-green);
  font-size: 13px;
  font-weight: 700;
}

.profile-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.step {
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 68px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  color: var(--text-secondary);
  box-shadow: var(--shadow-soft);
}

.step span {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f1eadf;
  font-size: 12px;
  font-weight: 800;
}

.step b {
  font-size: 12px;
}

.step.active {
  color: var(--brand-green);
}

.step.active span {
  color: #fff;
  background: var(--brand-green);
}

.form-card,
.search-panel,
.school-result,
.compare-table-card,
.plan-template-card,
.plan-list-card,
.selector-card,
.check-summary,
.issue-card,
.prompt-grid,
.chat-bubble,
.account-card,
.menu-list,
.data-version-card,
.deploy-card,
.data-source-card,
.auth-cta-card,
.account-stats {
  border: 1px solid rgba(231, 222, 208, 0.9);
  border-radius: 8px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-soft);
}

.form-card,
.search-panel,
.compare-table-card,
.plan-template-card,
.plan-list-card,
.selector-card,
.check-summary,
.data-version-card,
.deploy-card,
.data-source-card,
.auth-cta-card,
.account-stats {
  padding: 14px;
  margin-bottom: 12px;
}

.field-grid,
.score-input-grid,
.version-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

label span {
  display: block;
  margin-bottom: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.profile-field-hidden {
  display: none !important;
}

input,
select {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--text-primary);
  background: #fffdf8;
  font: inherit;
}

.switch-list {
  display: grid;
  gap: 9px;
}

.switch-list label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  background: #fbf7ef;
}

.switch-list input {
  width: 20px;
  height: 20px;
  accent-color: var(--brand-green);
}

.preference-cloud,
.filter-chips,
.template-grid,
.compare-school-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preference-cloud button,
.filter-chips button,
.template-grid button,
.compare-school-tabs span {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--text-secondary);
  background: #fffdf8;
  font-size: 13px;
  font-weight: 700;
}

.preference-cloud .selected,
.filter-chips .active,
.template-grid .selected,
.compare-school-tabs span {
  color: var(--brand-green);
  border-color: #cfe2d9;
  background: var(--surface-tint);
}

.search-box {
  height: 46px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fffdf8;
}

.search-box svg {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
}

.search-box input {
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.search-box button {
  color: var(--brand-green);
  font-size: 13px;
  font-weight: 800;
}

.filter-chips {
  margin-top: 10px;
}

.school-list,
.plan-list,
.selector-list,
.issue-list,
.chat-thread {
  display: grid;
  gap: 10px;
}

.school-result {
  position: relative;
  padding: 14px;
  overflow: hidden;
  cursor: pointer;
}

.school-result.featured {
  border-color: #d9c38e;
}

.result-main {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.result-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.result-metrics div {
  min-height: 64px;
  padding: 9px;
  border-radius: 8px;
  background: #fbf7ef;
}

.result-metrics span {
  display: block;
  color: var(--text-secondary);
  font-size: 11px;
}

.result-metrics b {
  display: block;
  margin-top: 4px;
  color: var(--brand-green);
  font-size: 20px;
}

.danger-text {
  color: var(--lychee-red) !important;
}

.mini-spark {
  height: 42px;
  display: flex;
  align-items: end;
  gap: 6px;
  margin-top: 10px;
}

.mini-spark span {
  width: 26px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--river-cyan), #cdecef);
}

.card-actions {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 12px;
}

.school-result.expanded .card-actions {
  display: grid;
}

.data-source-card {
  display: flex;
  gap: 12px;
  background: #fffaf0;
}

.data-source-card svg {
  color: var(--brand-gold);
}

.empty-search-state {
  display: none;
  place-items: center;
  gap: 8px;
  min-height: 180px;
  margin-top: 12px;
  padding: 24px;
  text-align: center;
  border: 1px dashed #d8cdbd;
  border-radius: 8px;
  background: #fffdf8;
}

.empty-search-state.show {
  display: grid;
}

.empty-search-state.loading {
  border-style: solid;
}

.empty-search-state.loading svg {
  animation: soft-spin 1.4s linear infinite;
}

.empty-search-state svg {
  width: 28px;
  height: 28px;
  color: var(--brand-gold);
}

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

.compare-table {
  min-width: 540px;
  margin: 12px 0;
}

.compare-table-card {
  overflow-x: auto;
}

.compare-row {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  min-height: 44px;
  align-items: center;
  border-bottom: 1px solid #f0e8dc;
  font-size: 13px;
}

.compare-row.head {
  color: var(--text-secondary);
  font-weight: 800;
}

.compare-row span {
  color: var(--text-secondary);
}

.compare-table-card .primary-btn {
  width: 100%;
}

.plan-template-card {
  background: #fffaf0;
}

.template-grid {
  margin-top: 12px;
}

.plan-list-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  border-left: 4px solid var(--line-soft);
}

.active-plan {
  border-left-color: var(--brand-gold);
}

.add-plan-card {
  min-height: 96px;
  display: grid;
  place-items: center;
  gap: 5px;
  padding: 16px;
  border: 1px dashed #d8cdbd;
  border-radius: 8px;
  color: var(--brand-green);
  background: #fffdf8;
  text-align: center;
  box-shadow: none;
}

.add-plan-card svg {
  width: 22px;
  height: 22px;
}

.add-plan-card span {
  font-weight: 800;
}

.add-plan-card small {
  color: var(--text-secondary);
}

.add-plan-card:disabled {
  color: var(--text-secondary);
  cursor: not-allowed;
  background: #f5efe5;
}

.selector-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

.selector-card.recommended {
  border-color: #d9c38e;
  background: #fffaf0;
}

.selector-card.disabled {
  opacity: 0.72;
}

.check-summary {
  display: flex;
  gap: 12px;
  background: var(--surface-tint);
}

.check-summary svg {
  width: 28px;
  height: 28px;
  color: var(--brand-green);
}

.issue-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding: 13px;
}

.issue-card span {
  width: 64px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.issue-card.warn span {
  color: #8a4e18;
  background: #fff4dc;
}

.issue-card.danger span {
  color: var(--lychee-red);
  background: #fff0ed;
}

.issue-card.ok span {
  color: var(--success-green);
  background: #e8f4ef;
}

.prompt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.prompt-grid button {
  min-height: 52px;
  padding: 10px;
  border-radius: 8px;
  color: var(--brand-green);
  background: var(--surface-tint);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.chat-thread {
  align-items: start;
  min-height: 220px;
  padding: 12px;
  margin-bottom: 12px;
}

.chat-bubble {
  max-width: 86%;
  padding: 12px;
  box-shadow: none;
}

.chat-bubble.user {
  justify-self: end;
  color: #fff;
  background: var(--brand-green);
}

.chat-bubble.ai {
  justify-self: start;
}

.chat-bubble.loading {
  opacity: 0.9;
}

.chat-empty-state {
  max-width: 100%;
  color: var(--text-secondary);
  background: #fff;
}

.chat-composer-card {
  display: grid;
  gap: 10px;
}

.chat-composer {
  display: grid;
  gap: 10px;
}

.chat-composer textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text-primary);
  background: #fff;
  font: inherit;
}

.chat-composer textarea:disabled {
  color: var(--text-secondary);
  background: var(--surface-tint);
}

.chat-quota-bar {
  margin-bottom: 12px;
}

.inline-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.inline-actions button {
  padding: 7px 9px;
  border-radius: 8px;
  color: var(--brand-green);
  background: var(--surface-tint);
  font-size: 12px;
  font-weight: 800;
}

.account-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
}

.account-card small {
  display: block;
  margin-top: 4px;
  color: var(--brand-green);
  font-size: 12px;
  font-weight: 700;
}

.auth-cta-card {
  background: #fffaf0;
}

.auth-cta-card h2 {
  margin-top: 6px;
}

.auth-cta-card p:last-of-type {
  margin-top: 6px;
  color: var(--text-secondary);
}

.auth-cta-actions {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.account-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.account-stats div {
  min-height: 78px;
  padding: 12px;
  border-radius: 8px;
  background: #fbf7ef;
}

.account-stats span {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
}

.account-stats b {
  display: block;
  margin-top: 8px;
  color: var(--brand-green);
  font-size: 22px;
}

.ai-entitlement-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.ai-entitlement-grid div,
.payment-note-card,
.order-card {
  min-height: 88px;
  padding: 12px;
  border-radius: 8px;
  background: #fbf7ef;
}

.ai-entitlement-grid span,
.payment-note-card span,
.order-card small {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
}

.ai-entitlement-grid b {
  display: block;
  margin-top: 8px;
  color: var(--brand-green);
  font-size: 20px;
}

.payment-note-card p {
  margin-top: 8px;
  color: var(--text-primary);
  line-height: 1.6;
}

.payment-summary-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
  margin-top: 10px;
}

.payment-summary-row small,
.payment-steps li {
  color: var(--text-secondary);
  font-size: 12px;
}

.payment-summary-row strong {
  display: block;
  margin-top: 4px;
  color: var(--brand-green);
  font-size: 20px;
}

.payment-amount-block {
  text-align: right;
}

.payment-qr-card {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(31, 107, 87, 0.12);
  border-radius: 10px;
  background: #fff;
}

.payment-qr-image {
  width: min(100%, 320px);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  justify-self: center;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(31, 37, 35, 0.08);
}

.payment-qr-copy h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.payment-steps {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding-left: 18px;
}

.product-option-list,
.order-list {
  display: grid;
  gap: 12px;
}

.product-option {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 104px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fff;
  text-align: left;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.product-option.selected {
  border-color: rgba(31, 107, 87, 0.4);
  box-shadow: 0 0 0 3px rgba(31, 107, 87, 0.12);
  transform: translateY(-1px);
}

.product-option h3 {
  margin: 4px 0 6px;
  font-size: 22px;
}

.product-option p {
  color: var(--text-secondary);
}

.product-option strong {
  color: var(--brand-green);
  font-size: 22px;
  white-space: nowrap;
}

.product-option-list.compact .product-option {
  min-height: 88px;
}

.product-option-list.compact .product-option h3 {
  font-size: 18px;
}

.report-entitlement-bar {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
}

.report-entitlement-bar h2 {
  margin: 4px 0 6px;
  font-size: 22px;
}

.report-entitlement-bar p {
  color: var(--text-secondary);
}

.report-entitlement-bar .primary-btn,
.report-entitlement-bar .secondary-btn {
  width: auto;
  min-width: 148px;
}

.order-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

.order-card h3 {
  margin: 4px 0 4px;
}

.order-card p {
  color: var(--text-secondary);
}

.order-card.empty {
  grid-template-columns: 1fr;
}

.order-side {
  text-align: right;
}

.order-side strong {
  display: block;
  color: var(--brand-green);
  font-size: 20px;
}

.ai-quota-modal .inline-actions {
  margin-top: 14px;
  justify-content: flex-end;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.inline-note {
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.avatar {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: var(--brand-green);
  font-weight: 800;
}

.menu-list {
  display: grid;
  margin-top: 12px;
  overflow: hidden;
}

.menu-list button {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 14px;
  border-bottom: 1px solid #f0e8dc;
  text-align: left;
}

.menu-list button:last-child {
  border-bottom: 0;
}

.menu-list svg {
  width: 18px;
  height: 18px;
  color: var(--brand-green);
}

.menu-list b {
  color: var(--text-secondary);
  font-size: 12px;
}

.version-grid {
  margin: 12px 0;
}

.version-grid div {
  min-height: 76px;
  padding: 12px;
  border-radius: 8px;
  background: #fbf7ef;
}

.version-grid span {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
}

.version-grid b {
  display: block;
  margin-top: 7px;
  color: var(--brand-green);
  font-size: 15px;
}

.dns-box {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #fbf7ef;
}

.dns-box span,
.dns-box code {
  display: block;
}

.dns-box span {
  color: var(--text-secondary);
  font-size: 12px;
}

.dns-box code {
  margin-top: 5px;
  color: var(--brand-green);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: normal;
}

.secondary-btn.full {
  width: 100%;
  margin-top: 12px;
}

.highlight-batch {
  border-color: #d9c38e !important;
  box-shadow: 0 0 0 3px rgba(196, 154, 69, 0.18), var(--shadow-soft) !important;
}

.duplicate-volunteer {
  border-color: var(--lychee-red) !important;
  box-shadow: 0 0 0 3px rgba(205, 74, 61, 0.16), var(--shadow-soft) !important;
}

.modal-mask {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background: rgba(31, 37, 35, 0.38);
  backdrop-filter: blur(8px);
}

.modal-mask.show {
  display: flex;
}

.risk-modal {
  width: 100%;
  max-width: 520px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 16px 16px 8px 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(31, 37, 35, 0.25);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-body p {
  color: var(--text-primary);
}

.analysis-points {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 14px 0;
}

.analysis-points div {
  min-height: 72px;
  padding: 11px;
  border-radius: 8px;
  background: #fbf7ef;
}

.analysis-points span,
.analysis-points small {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
}

.analysis-points b {
  display: block;
  margin: 4px 0 2px;
  color: var(--brand-green);
  font-size: 18px;
}

.primary-btn.full {
  width: 100%;
}

.profile-submit-wrap {
  padding: 4px 4px 0;
}

@media (min-width: 860px) {
  body {
    background:
      radial-gradient(circle at 10% 10%, rgba(196, 154, 69, 0.16), transparent 28%),
      radial-gradient(circle at 90% 20%, rgba(31, 107, 87, 0.14), transparent 30%),
      #ece5d8;
  }

  .stage {
    padding: 24px;
  }

  .phone {
    width: min(1240px, calc(100vw - 48px));
    height: min(900px, calc(100vh - 48px));
    display: grid;
    grid-template-columns: 224px 1fr;
    grid-template-rows: 1fr 28px;
    border: 0;
    border-radius: 18px;
    background: var(--bg-canvas);
    box-shadow: 0 28px 80px rgba(31, 37, 35, 0.2);
  }

  .status-bar {
    display: none;
  }

  .tabbar {
    grid-column: 1;
    grid-row: 1 / 3;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 22px 14px;
    border-top: 0;
    border-right: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.72);
  }

  .tab {
    height: 48px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14px;
  }

  .tab.active {
    background: var(--surface-tint);
  }

  .screen {
    grid-column: 2;
    grid-row: 1;
    padding: 28px 32px 128px;
  }

  .beian-footer {
    grid-column: 2;
    grid-row: 2;
    border-top: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.72);
  }

  .screen.active {
    display: block;
  }

  .app-header,
  .page-header {
    max-width: 1040px;
  }

  .hero-card,
  .school-hero,
  .report-hero {
    min-height: 220px;
  }

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

  .hero-copy {
    min-height: 208px;
    gap: 14px;
    padding-right: 132px;
  }

  .quick-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .quick-card.wide {
    grid-column: auto;
  }

  .school-list,
  .plan-list,
  .selector-list,
  .risk-cards,
  .advice-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .school-result.featured,
  .plan-list-card.active-plan,
  .selector-card.recommended {
    grid-column: span 2;
  }

  .form-card,
  .search-panel,
  .section,
  .deadline-card,
  .editor-summary,
  .batch-card,
  .batch-edit-hero,
  .batch-edit-panel,
  .batch-edit-tools,
  .report-hero,
  .distribution-card,
  .evidence-card,
  .next-card,
  .check-summary,
  .account-card,
  .menu-list,
  .data-version-card,
  .deploy-card,
  .data-source-card,
  .compare-table-card {
    max-width: 1040px;
  }

  .field-grid,
  .score-input-grid,
  .version-grid,
  .evidence-grid,
  .ai-entitlement-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .ai-entitlement-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .payment-qr-card {
    grid-template-columns: minmax(240px, 320px) 1fr;
    align-items: center;
  }

  .bottom-action {
    left: 224px;
    right: 0;
    max-width: none;
    margin-left: -32px;
    margin-right: -32px;
    padding-left: 32px;
    padding-right: 32px;
  }

  .report-fab-wrap {
    bottom: 30px;
    margin-right: 4px;
  }

  .toast {
    top: 24px;
    left: 50%;
    right: auto;
    width: 420px;
    transform: translate(-50%, -10px);
  }

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

  .modal-mask {
    align-items: center;
    padding-left: 248px;
  }

  .risk-modal {
    border-radius: 8px;
  }

  .analysis-points {
    grid-template-columns: repeat(3, 1fr);
  }

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

@media (max-width: 520px) {
  .stage {
    padding: 0;
  }

  .phone {
    width: 100vw;
    height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .mini-action {
    padding-inline: 14px;
  }
}
