:root {
  --ink: #17232b;
  --muted: #6b777d;
  --line: #e0e5e6;
  --page: #f4f6f6;
  --surface: #ffffff;
  --navy: #153d69;
  --navy-soft: #eaf1f8;
  --teal: #16756d;
  --green: #28865d;
  --green-soft: #e8f5ee;
  --amber: #d28a1e;
  --amber-soft: #fff3dc;
  --red: #c54f48;
  --red-soft: #fbeae7;
  --gold: #efb941;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: #dfe6e7;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.miniapp-shell {
  position: relative;
  width: min(430px, 100%);
  height: min(900px, calc(100vh - 44px));
  min-height: 680px;
  overflow: hidden;
  background: var(--page);
  border: 1px solid #cbd4d6;
  border-radius: 24px;
  box-shadow: 0 22px 60px rgba(26, 47, 56, 0.19);
}

.miniapp-header {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  padding: 12px 14px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

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

.brand-lockup > div:last-child {
  min-width: 0;
}

.brand-lockup strong,
.brand-lockup span {
  display: block;
}

.brand-lockup strong {
  color: #233449;
  font-size: 18px;
  line-height: 1.2;
}

.brand-lockup span {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.brand-logo {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: block;
  object-fit: cover;
  border: 1px solid #d8cda9;
  border-radius: 7px;
}

.compass-logo,
.empty-compass {
  position: relative;
  flex: 0 0 auto;
  border: 2px solid var(--navy);
  border-radius: 50%;
  background: #fff;
}

.compass-logo {
  width: 40px;
  height: 40px;
}

.compass-logo::before,
.compass-logo::after,
.empty-compass::before,
.empty-compass::after {
  content: "";
  position: absolute;
  background: #c7d3da;
}

.compass-logo::before,
.empty-compass::before {
  top: 4px;
  bottom: 4px;
  left: 50%;
  width: 1px;
}

.compass-logo::after,
.empty-compass::after {
  top: 50%;
  left: 4px;
  right: 4px;
  height: 1px;
}

.compass-logo i,
.empty-compass i {
  position: absolute;
  z-index: 1;
  top: 5px;
  left: 14px;
  width: 8px;
  height: 27px;
  background: var(--gold);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  transform: rotate(32deg);
}

.miniapp-controls {
  width: 82px;
  height: 34px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 82px;
  border: 1px solid #d6dcde;
  border-radius: 18px;
  color: #3d474c;
}

.miniapp-controls span {
  font-size: 14px;
  letter-spacing: 1px;
}

.miniapp-controls i {
  width: 15px;
  height: 15px;
  border: 2px solid #3d474c;
  border-radius: 50%;
}

.app-viewport {
  position: absolute;
  top: 72px;
  bottom: 64px;
  left: 0;
  right: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.miniapp-shell.plan-mode .miniapp-header {
  display: none;
}

.miniapp-shell.plan-mode .app-viewport {
  top: 0;
}

.app-page {
  min-height: 100%;
  padding: 18px 14px 26px;
}

.page-heading {
  margin: -18px -14px 14px;
  padding: 22px 18px 20px;
  color: #fff;
  background: var(--navy);
  border-bottom: 4px solid var(--gold);
}

.page-heading.compact {
  padding-bottom: 17px;
}

.page-heading h1,
.page-heading p {
  margin: 0;
}

.page-heading h1 {
  margin: 7px 0 7px;
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: 0;
}

.page-heading p {
  max-width: 360px;
  color: #d8e3ed;
  font-size: 12px;
  line-height: 1.65;
}

.step-chip {
  display: inline-block;
  color: #f5ca73;
  font-size: 11px;
  font-weight: 800;
}

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

.form-section,
.rate-panel,
.consultation-panel,
.school-plan-hero,
.profile-card,
.profile-data-grid {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.form-section {
  padding: 15px;
}

.form-section-title,
.section-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.form-section-title {
  margin-bottom: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.form-section-title span {
  font-size: 15px;
  font-weight: 800;
}

.form-section-title small,
.score-input small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.form-field {
  display: block;
  margin-top: 12px;
}

.form-field:first-of-type {
  margin-top: 0;
}

.form-field > span,
.field-question {
  display: block;
  margin-bottom: 7px;
  color: #405159;
  font-size: 12px;
  font-weight: 700;
}

.field-question {
  margin-top: 17px;
}

input,
select {
  width: 100%;
  height: 43px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #bcc8cb;
  border-radius: 5px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(22, 117, 109, 0.12);
}

.live-total-panel {
  padding: 15px 17px;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 14px;
  color: #fff;
  background: var(--navy);
  border-left: 4px solid var(--gold);
  border-radius: 7px;
}

.live-total-panel > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.live-total-panel > div + div {
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
}

.live-total-panel span {
  color: #d5e0e8;
  font-size: 11px;
}

.live-total-panel strong {
  font-size: 22px;
  line-height: 1.1;
}

.live-total-panel b {
  color: #f4c968;
  font-size: 29px;
}

.live-total-panel small {
  font-size: 12px;
}

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

.score-input {
  min-width: 0;
  padding: 10px;
  background: #f8fafa;
  border: 1px solid #e2e7e8;
  border-radius: 6px;
}

.score-input > span {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 800;
}

.score-input input {
  height: 38px;
  font-size: 17px;
  font-weight: 800;
}

.rank-input-grid .form-field {
  margin-top: 0;
}

.segmented-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid #bdc7ca;
  border-radius: 5px;
}

.segmented-options label {
  position: relative;
}

.segmented-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.segmented-options span {
  min-height: 40px;
  padding: 7px 4px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #fff;
  border-right: 1px solid #bdc7ca;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.segmented-options label:last-child span {
  border-right: 0;
}

.segmented-options input:checked + span {
  color: #fff;
  background: var(--teal);
}

.primary-action,
.secondary-action,
.danger-action {
  width: 100%;
  min-height: 45px;
  padding: 10px 14px;
  border-radius: 5px;
  font-weight: 800;
  white-space: nowrap;
}

.primary-action {
  color: #fff;
  background: var(--navy);
  border: 1px solid var(--navy);
}

.primary-action:active {
  background: #0e3157;
}

.secondary-action {
  color: var(--navy);
  background: #fff;
  border: 1px solid #91a4ad;
}

.danger-action {
  margin-top: 16px;
  color: var(--red);
  background: #fff;
  border: 1px solid #e8b7b2;
}

.form-disclaimer,
.list-note {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
  text-align: center;
}

.student-score-strip {
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.student-score-strip > div {
  padding: 12px 6px;
  text-align: center;
  border-right: 1px solid var(--line);
}

.student-score-strip > div:last-child {
  border-right: 0;
}

.student-score-strip span,
.student-score-strip strong {
  display: block;
}

.student-score-strip span {
  color: var(--muted);
  font-size: 10px;
}

.student-score-strip strong {
  margin-top: 4px;
  color: var(--navy);
  font-size: 18px;
}

.filter-tabs {
  margin-bottom: 12px;
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #e8ecee;
  border-radius: 6px;
}

.filter-tabs button {
  min-height: 34px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
}

.filter-tabs button.active {
  color: var(--navy);
  background: #fff;
  box-shadow: 0 1px 5px rgba(23, 35, 43, 0.1);
}

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

.school-item {
  width: 100%;
  padding: 13px 12px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid #8b989d;
  border-radius: 7px;
  text-align: left;
}

.school-item.steady { border-left-color: var(--green); }
.school-item.possible { border-left-color: var(--amber); }
.school-item.reach { border-left-color: var(--red); }
.school-item.verify { border-left-color: var(--navy); }

.school-emblem {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--navy);
  background: var(--navy-soft);
  border: 1px solid #b9cee0;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 900;
}

.school-copy {
  min-width: 0;
}

.school-copy strong,
.school-copy small {
  display: block;
}

.school-copy strong {
  overflow: hidden;
  font-size: 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.school-result {
  min-width: 80px;
  text-align: right;
}

.school-result strong,
.school-result span {
  display: block;
}

.school-result strong {
  font-size: 14px;
}

.school-result span {
  margin-top: 4px;
  padding: 3px 5px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 800;
}

.school-result span.steady { color: var(--green); background: var(--green-soft); }
.school-result span.possible { color: #87570f; background: var(--amber-soft); }
.school-result span.reach { color: var(--red); background: var(--red-soft); }
.school-result span.verify { color: var(--navy); background: var(--navy-soft); }

.list-note {
  margin-top: 13px;
  padding: 0 10px;
}

.empty-state {
  min-height: 520px;
  padding: 60px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.empty-state.small {
  min-height: 400px;
}

.empty-state h1,
.empty-state h2,
.empty-state p {
  margin: 0;
}

.empty-state h1,
.empty-state h2 {
  margin-top: 18px;
  font-size: 20px;
}

.empty-state p {
  margin: 9px 0 22px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.empty-compass {
  width: 82px;
  height: 82px;
}

.empty-compass i {
  top: 11px;
  left: 30px;
  width: 16px;
  height: 56px;
}

.school-plan-hero,
.rate-panel,
.consultation-panel {
  padding: 16px;
  margin-bottom: 12px;
}

.plan-school-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.plan-school-name > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  color: #fff;
  background: var(--navy);
  border-radius: 50%;
  font-size: 16px;
  font-weight: 900;
}

.plan-school-name strong,
.plan-school-name small {
  display: block;
}

.plan-school-name strong {
  font-size: 17px;
}

.plan-school-name small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.score-scale {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 65px 1fr 65px;
  align-items: center;
  gap: 8px;
}

.score-scale > div:first-child,
.score-scale > div:last-child {
  text-align: center;
}

.score-scale span,
.score-scale strong {
  display: block;
}

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

.score-scale strong {
  margin-top: 3px;
  font-size: 19px;
}

.scale-line {
  position: relative;
  height: 5px;
  background: #e1e6e8;
  border-radius: 3px;
}

.scale-line i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  background: var(--gold);
  border-radius: 3px;
}

.scale-line b {
  position: absolute;
  top: -26px;
  left: 50%;
  padding: 3px 5px;
  color: #7b5316;
  background: var(--amber-soft);
  border-radius: 3px;
  font-size: 9px;
  transform: translateX(-50%);
  white-space: nowrap;
}

.plan-guidance {
  margin: 20px 0 0;
  padding: 11px 12px;
  color: #49575e;
  background: #f3f6f6;
  border-left: 3px solid var(--teal);
  font-size: 11px;
  line-height: 1.65;
}

.section-title-row {
  margin-bottom: 8px;
}

.section-title-row span,
.consultation-panel > span {
  color: var(--teal);
  font-size: 10px;
  font-weight: 800;
}

.section-title-row h2,
.consultation-panel h2 {
  margin: 4px 0 0;
  font-size: 17px;
}

.section-title-row > strong {
  color: var(--navy);
  font-size: 24px;
}

.subject-rate-item {
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.subject-rate-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}

.subject-rate-heading strong {
  font-size: 12px;
}

.subject-rate-heading span {
  color: var(--muted);
  font-size: 10px;
}

.subject-rate-heading b {
  min-width: 42px;
  color: var(--teal);
  font-size: 12px;
  text-align: right;
}

.rate-bar {
  height: 5px;
  margin-top: 7px;
  overflow: hidden;
  background: #e7ebec;
  border-radius: 3px;
}

.rate-bar span {
  height: 100%;
  display: block;
  background: var(--teal);
  border-radius: 3px;
}

.rate-bar span.high { background: var(--green); }
.rate-bar span.middle { background: var(--amber); }
.rate-bar span.low { background: var(--red); }

.subject-rate-detail {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.consultation-panel {
  border-top: 4px solid var(--gold);
}

.consultation-panel p {
  margin: 9px 0 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.profile-card {
  padding: 14px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}

.avatar-placeholder {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--navy);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}

.profile-card strong,
.profile-card span {
  display: block;
}

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

.profile-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.text-action {
  padding: 5px 0;
  color: var(--teal);
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 800;
}

.profile-data-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  overflow: hidden;
}

.profile-data-grid > div {
  min-height: 86px;
  padding: 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.profile-data-grid > div:nth-child(2n) {
  border-right: 0;
}

.profile-data-grid > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.profile-data-grid span,
.profile-data-grid strong {
  display: block;
}

.profile-data-grid span {
  color: var(--muted);
  font-size: 10px;
}

.profile-data-grid strong {
  margin-top: 7px;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.bottom-nav {
  position: absolute;
  z-index: 12;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64px;
  padding: 5px 8px 6px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fff;
  border-top: 1px solid var(--line);
}

.bottom-nav button {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #78858a;
  background: transparent;
  border: 0;
}

.bottom-nav i {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  font-size: 19px;
  font-style: normal;
  line-height: 1;
}

.bottom-nav span {
  font-size: 10px;
  white-space: nowrap;
}

.bottom-nav button.active {
  color: var(--navy);
  font-weight: 800;
}

.booking-dialog {
  width: min(400px, calc(100% - 24px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(22, 38, 47, 0.32);
}

.booking-dialog::backdrop {
  background: rgba(12, 26, 34, 0.62);
}

.booking-dialog form {
  padding: 20px;
}

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

.dialog-heading span {
  color: var(--teal);
  font-size: 10px;
  font-weight: 800;
}

.dialog-heading h2 {
  margin: 4px 0 0;
  font-size: 18px;
}

.dialog-heading button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #edf1f1;
  border: 0;
  border-radius: 50%;
  font-size: 22px;
}

.booking-dialog .primary-action {
  margin-top: 18px;
}

.booking-message {
  min-height: 18px;
  margin: 9px 0 0;
  color: var(--green);
  font-size: 11px;
  text-align: center;
}

.toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: 84px;
  max-width: calc(100% - 40px);
  padding: 9px 13px;
  color: #fff;
  background: rgba(20, 35, 43, 0.92);
  border-radius: 5px;
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

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

/* Reference three-screen path */
.reference-home {
  padding-top: 28px;
  background: #fff;
}

.quick-hero {
  min-height: 190px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 126px;
  align-items: center;
  gap: 8px;
}

.quick-hero h1,
.quick-hero p {
  margin: 0;
}

.home-region-label {
  margin-bottom: 9px;
  padding-left: 9px;
  display: block;
  color: #8f722a;
  border-left: 3px solid #b3923d;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
}

.quick-hero h1 {
  color: #17365e;
  font-size: 27px;
  line-height: 1.25;
  letter-spacing: 0;
}

.quick-hero p {
  margin-top: 13px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.hero-compass {
  position: relative;
  width: 118px;
  height: 118px;
  border: 12px solid var(--navy);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 53%, transparent 54%),
    repeating-conic-gradient(#aebbc3 0 1deg, transparent 1deg 10deg),
    #fff;
  box-shadow: inset 0 0 0 2px #ccd7df;
}

.hero-compass::before {
  content: "";
  position: absolute;
  inset: 22px;
  opacity: 0.45;
  background: #d9e1e6;
  clip-path: polygon(50% 0, 57% 43%, 100% 50%, 57% 57%, 50% 100%, 43% 57%, 0 50%, 43% 43%);
}

.hero-compass i {
  position: absolute;
  z-index: 1;
  top: 10px;
  bottom: 10px;
  left: calc(50% - 10px);
  width: 20px;
  background: linear-gradient(to bottom, #eea11b 0 49%, #123b83 51% 100%);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  transform: rotate(40deg);
}

.hero-compass > span {
  position: absolute;
  z-index: 4;
  top: -17px;
  right: -13px;
  font-size: 28px;
  line-height: 1;
  filter: drop-shadow(0 2px 2px rgba(69, 45, 5, 0.18));
}

.hero-compass::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: calc(50% - 7px);
  left: calc(50% - 7px);
  width: 14px;
  height: 14px;
  background: #f2a91d;
  border: 5px solid #123b83;
  border-radius: 50%;
  box-sizing: border-box;
}

.quick-score-card {
  min-height: 116px;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 78px;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #d9e0e4;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(23, 61, 105, 0.08);
}

.quick-score-card > div span,
.quick-score-card > div strong {
  display: block;
}

.quick-score-card > div span {
  color: #4a5a62;
  font-size: 12px;
  font-weight: 800;
}

.quick-score-card > div strong {
  margin-top: 12px;
  color: #a7b0b5;
  font-size: 22px;
  white-space: nowrap;
}

.quick-score-card > div strong.has-score {
  color: var(--navy);
  font-size: 31px;
}

.quick-score-card > b {
  font-size: 12px;
  white-space: nowrap;
}

.quick-score-card > button {
  height: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--navy);
  border-radius: 7px;
}

.quick-score-card > button span {
  font-size: 13px;
  font-weight: 900;
}

.quick-score-card > button small {
  font-size: 10px;
}

.number-keypad {
  margin: 14px -14px 12px;
  padding: 13px 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  background: #f3f5f6;
}

.number-keypad button {
  height: 55px;
  color: #222;
  background: #fff;
  border: 0;
  border-radius: 7px;
  box-shadow: 0 2px 7px rgba(27, 45, 55, 0.08);
  font-size: 22px;
}

.number-keypad button:active {
  background: #e8eef4;
}

.number-keypad .zero {
  grid-column: span 2;
}

.reference-primary {
  min-height: 53px;
  font-size: 14px;
}

.detail-entry {
  width: 100%;
  min-height: 38px;
  margin-top: 5px;
  color: var(--navy);
  background: transparent;
  border: 0;
  font-size: 11px;
  font-weight: 800;
}

.quick-note {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.reference-schools {
  padding-top: 24px;
  background: #f7f9fa;
}

.reference-page-heading {
  padding: 0 4px 16px;
}

.reference-page-heading h1,
.reference-page-heading p {
  margin: 0;
}

.reference-page-heading h1 {
  color: var(--navy);
  font-size: 28px;
  line-height: 1.25;
}

.reference-page-heading p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.reference-filters {
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dfe5e7;
  border-radius: 7px;
}

.reference-filters button {
  min-height: 42px;
  border-radius: 0;
}

.reference-filters button.active {
  color: #fff;
  background: #164aa1;
  box-shadow: none;
}

.reference-school-list {
  gap: 8px;
}

.reference-school-list .school-item {
  min-height: 70px;
  border-left-width: 0;
  box-shadow: 0 3px 12px rgba(23, 61, 105, 0.06);
}

.reference-school-list .school-result span.reach {
  color: #b94742;
  background: #fee8e6;
}

.list-bottom-tip {
  position: sticky;
  bottom: 0;
  margin-top: 12px;
  padding: 13px 10px;
  color: #fff;
  background: #164aa1;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.reference-plan {
  padding: 0 14px 24px;
  background: #f6f7f9;
}

.plan-topbar {
  height: 58px;
  margin: 0 -14px 14px;
  padding: 0 12px 0 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #fff;
  background: #0c419f;
  font-size: 15px;
  font-weight: 800;
}

.miniapp-controls.inverse {
  width: 76px;
  height: 31px;
  flex-basis: 76px;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.miniapp-controls.inverse i {
  border-color: #fff;
}

.reference-target-card,
.reference-subject-panel,
.similar-cases-panel,
.case-note {
  padding: 15px;
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid #e0e4e8;
  border-radius: 8px;
}

.target-school-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.target-school-title > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #0c419f;
  border-radius: 7px;
  font-weight: 900;
}

.target-school-title strong,
.target-school-title small {
  display: block;
}

.target-school-title strong {
  font-size: 17px;
}

.target-school-title small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.reference-score-row {
  margin-top: 21px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
}

.reference-score-row span,
.reference-score-row strong {
  display: block;
}

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

.reference-score-row strong {
  margin-top: 4px;
  color: #132f5f;
  font-size: 27px;
}

.reference-score-row strong.orange {
  color: #d88818;
}

.reference-score-row small {
  margin-left: 2px;
  font-size: 10px;
}

.admission-compass {
  position: relative;
  width: 214px;
  height: 214px;
  margin: 18px auto 0;
  overflow: visible;
  background:
    radial-gradient(circle at center, #fff 0 54%, transparent 55%),
    repeating-conic-gradient(from -5deg, #8fa0ac 0 1deg, transparent 1deg 10deg),
    #fff;
  border: 11px solid #123f8c;
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px #d4dde4, 0 6px 18px rgba(18, 63, 140, 0.12);
}

.admission-compass::before {
  content: "";
  position: absolute;
  inset: 44px;
  opacity: 0.48;
  background: #d7e0e6;
  clip-path: polygon(50% 0, 57% 43%, 100% 50%, 57% 57%, 50% 100%, 43% 57%, 0 50%, 43% 43%);
}

.school-target-needle,
.difference-needle {
  position: absolute;
  z-index: 3;
  left: calc(50% - 9px);
  width: 18px;
  clip-path: polygon(50% 0, 100% 100%, 50% 82%, 0 100%);
  transform-origin: 50% 100%;
}

.school-target-needle {
  top: 17px;
  height: 90px;
  background: #f0a21a;
  transform: rotate(45deg);
}

.difference-needle {
  top: 28px;
  height: 79px;
  background: #123b83;
  transform: rotate(var(--compass-angle));
  transition: transform 500ms ease;
}

.admission-hub {
  position: absolute;
  z-index: 5;
  top: calc(50% - 12px);
  left: calc(50% - 12px);
  width: 24px;
  height: 24px;
  background: #e5a21f;
  border: 7px solid #123b83;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #fff;
  box-sizing: border-box;
}

.compass-target-marker {
  position: absolute;
  z-index: 6;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  transform: rotate(45deg) translateY(-91px);
  transform-origin: 0 0;
}

.compass-target-marker > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: #fff8dc;
  border: 2px solid #e5a21f;
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(67, 45, 8, 0.2);
  font-size: 20px;
  line-height: 1;
  transform: translate(-50%, -50%) rotate(-45deg);
}

.compass-target-marker b {
  min-width: 66px;
  max-width: 104px;
  padding: 3px 6px;
  position: absolute;
  top: 20px;
  left: 0;
  color: #fff;
  background: #d8890a;
  border: 1px solid #fff;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  transform: translateX(-50%) rotate(-45deg);
  transform-origin: 50% 0;
  white-space: normal;
}

.difference-label {
  position: absolute;
  z-index: 2;
  color: #566773;
  font-size: 8px;
  font-weight: 800;
}

.difference-zero {
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
}

.difference-minus-30 {
  bottom: 31px;
  left: 17px;
}

.difference-minus-60 {
  top: 31px;
  left: 17px;
}

.difference-plus-30 {
  bottom: 31px;
  right: 17px;
}

.difference-plus-60 {
  top: 31px;
  right: 17px;
}

.compass-caption {
  margin-top: 10px;
  text-align: center;
}

.compass-caption strong,
.compass-caption span {
  display: block;
}

.compass-caption strong {
  color: #173663;
  font-size: 13px;
}

.compass-caption span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.target-guidance {
  margin: 18px 0 0;
  padding: 10px 12px;
  color: #4d5c63;
  background: #f3f7fb;
  border-radius: 5px;
  font-size: 10px;
  line-height: 1.65;
}

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

.reference-section-title h2 {
  margin: 0;
  font-size: 17px;
}

.reference-section-title span {
  color: var(--muted);
  font-size: 9px;
}

.reference-subject-list .subject-rate-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.similar-cases-panel {
  padding: 15px;
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid #e0e4e8;
  border-radius: 8px;
}

.similar-case-list {
  margin-top: 12px;
}

.similar-case-empty {
  min-height: 82px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #52606a;
  background: #f4f7fa;
  border-radius: 6px;
}

.similar-case-empty > span {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  color: #164aa1;
  background: #fff;
  border: 1px solid #cdd8e5;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 900;
}

.similar-case-empty strong,
.similar-case-empty p {
  display: block;
}

.similar-case-empty strong {
  color: #1d2c39;
  font-size: 13px;
}

.similar-case-empty p {
  margin: 5px 0 0;
  font-size: 10px;
  line-height: 1.55;
}

.similar-case-item {
  padding: 12px 0;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  border-top: 1px solid #e8ecef;
}

.similar-case-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.similar-case-score {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #164aa1;
}

.similar-case-score i {
  width: 14px;
  height: 1px;
  position: relative;
  background: #d2942b;
}

.similar-case-score i::after {
  content: "";
  position: absolute;
  top: -2px;
  right: 0;
  border-width: 3px 0 3px 4px;
  border-style: solid;
  border-color: transparent transparent transparent #d2942b;
}

.similar-case-copy strong {
  font-size: 12px;
}

.similar-case-copy p {
  margin: 4px 0;
  color: #52606a;
  font-size: 10px;
  line-height: 1.55;
}

.similar-case-copy span {
  color: var(--muted);
  font-size: 9px;
}

.case-note {
  color: #59471e;
  background: #fff8df;
  border-color: #f2df9c;
}

.case-note span {
  font-size: 15px;
  font-weight: 900;
}

.case-note p {
  margin: 8px 0 0;
  font-size: 10px;
  line-height: 1.65;
}

.booking-action {
  min-height: 48px;
  background: #164aa1;
}

.detail-dialog {
  width: min(430px, calc(100% - 20px));
  max-height: calc(100vh - 24px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(22, 38, 47, 0.32);
}

.detail-dialog::backdrop {
  background: rgba(11, 25, 34, 0.66);
}

.detail-dialog form {
  max-height: calc(100vh - 24px);
  padding: 18px;
  overflow-y: auto;
}

.dialog-intro {
  margin: -5px 0 13px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.dialog-section {
  margin-bottom: 12px;
  padding: 12px;
  background: #f8fafa;
  border: 1px solid #e1e6e8;
  border-radius: 6px;
}

.dialog-section-title {
  margin-bottom: 9px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.dialog-section-title strong {
  font-size: 13px;
}

.dialog-section-title span {
  color: var(--muted);
  font-size: 9px;
}

.dialog-live-total {
  margin-bottom: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #fff;
  background: var(--navy);
  border-radius: 6px;
}

.dialog-live-total span {
  font-size: 10px;
}

.dialog-live-total strong {
  font-size: 12px;
}

.dialog-live-total b {
  color: #f4c968;
  font-size: 21px;
}

.dialog-live-total i {
  font-style: normal;
}

@media (max-width: 380px) {
  .quick-hero {
    grid-template-columns: minmax(0, 1fr) 102px;
  }

  .hero-compass {
    width: 96px;
    height: 96px;
    border-width: 10px;
  }

  .hero-compass i {
    top: 9px;
    left: 30px;
    width: 15px;
    height: 56px;
  }

  .quick-hero h1,
  .reference-page-heading h1 {
    font-size: 24px;
  }
}

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

  .miniapp-shell {
    width: 100%;
    height: 100vh;
    min-height: 620px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (max-width: 360px) {
  .miniapp-controls {
    width: 72px;
    flex-basis: 72px;
  }

  .score-input-grid {
    gap: 7px;
  }

  .score-input {
    padding: 8px;
  }
}

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