:root {
  --red: #e60012;
  --red-dark: #b9000e;
  --ink: #191b20;
  --muted: #6d717a;
  --line: #e7e8eb;
  --soft: #f5f6f7;
  --green: #087f5b;
  --blue: #1769aa;
  --white: #ffffff;
  --shadow: 0 10px 28px rgba(25, 27, 32, 0.09);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { background: #eceef0; scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #eceef0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { display: block; width: 20px; height: 20px; stroke-width: 2; }

.app-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--white);
  box-shadow: 0 0 40px rgba(25, 27, 32, 0.08);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: calc(64px + env(safe-area-inset-top));
  padding: calc(10px + env(safe-area-inset-top)) 18px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid rgba(231,232,235,0.9);
  backdrop-filter: blur(16px);
}
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: var(--red);
  border-radius: 8px;
}
.brand-mark svg { width: 21px; height: 21px; }
.brand-copy { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.brand-copy strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-copy span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.icon-button {
  width: 40px;
  height: 40px;
  padding: 0;
  margin-left: auto;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
}
.icon-button:active { background: var(--soft); }

main { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
.view { display: none; }
.view.is-active { display: block; }

.home-hero {
  min-height: 268px;
  padding: 32px 20px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(105px, .75fr);
  gap: 12px;
  align-items: center;
  overflow: hidden;
  background: #f7f8fa;
  border-bottom: 1px solid var(--line);
}
.hero-copy { position: relative; z-index: 2; }
.eyebrow, .section-kicker {
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}
.hero-copy h1 {
  margin: 8px 0 10px;
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: 0;
}
.hero-copy p { margin: 0 0 18px; color: #575c65; font-size: 13px; line-height: 1.7; }
.home-hero img {
  width: 148px;
  height: 148px;
  max-width: none;
  justify-self: center;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 12px 26px rgba(23,105,170,0.18);
}
.primary-button, .submit-button {
  min-height: 46px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: var(--red);
  font-weight: 700;
}
.primary-button { padding: 0 16px; display: inline-flex; align-items: center; gap: 8px; }
.primary-button svg { width: 17px; height: 17px; }
.primary-button:active, .submit-button:active { background: var(--red-dark); }

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}
.trust-strip div { min-width: 0; padding: 15px 6px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.trust-strip div + div { border-left: 1px solid var(--line); }
.trust-strip svg { width: 17px; height: 17px; color: var(--red); flex: 0 0 auto; }
.trust-strip span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.trust-strip b { color: var(--ink); display: block; font-size: 12px; }

.section-block { padding: 26px 18px; border-bottom: 8px solid var(--soft); }
.section-heading { margin-bottom: 16px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.section-heading h2 { margin: 4px 0 0; font-size: 21px; line-height: 1.2; }
.text-button { padding: 8px 0 0; display: inline-flex; align-items: center; gap: 2px; color: var(--muted); background: transparent; border: 0; font-size: 12px; }
.text-button svg { width: 15px; height: 15px; }

.campus-chips { margin: 0 -18px 14px; padding: 0 18px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.campus-chips::-webkit-scrollbar { display: none; }
.campus-chips.full { margin: 14px 0; padding: 0 18px; }
.chip {
  min-height: 34px;
  padding: 0 13px;
  flex: 0 0 auto;
  background: var(--soft);
  border: 1px solid transparent;
  border-radius: 6px;
  color: #555a63;
  font-size: 12px;
}
.chip.is-active { color: var(--red); background: #fff2f3; border-color: #ffc9ce; font-weight: 700; }

.hall-list { display: grid; gap: 10px; }
.hall-list.full { padding: 0 18px 20px; }
.hall-card {
  padding: 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.hall-card-head { display: flex; gap: 10px; align-items: flex-start; }
.hall-number {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--red);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
}
.hall-card-copy { min-width: 0; flex: 1; }
.hall-card-copy h3 { margin: 0 0 5px; font-size: 15px; line-height: 1.42; }
.hall-card-copy p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.hall-meta { margin-top: 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.hall-meta span { padding: 3px 6px; color: #555a63; background: var(--soft); border-radius: 4px; font-size: 10px; }
.hall-meta .verified { color: var(--green); background: #edf9f4; }
.hall-actions { margin-top: 13px; padding-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border-top: 1px solid var(--line); }
.hall-actions a { min-height: 38px; display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.hall-actions a:first-child { color: var(--red); background: #fff2f3; }
.hall-actions a:last-child { color: var(--blue); background: #edf6fc; }
.hall-actions svg { width: 15px; height: 15px; }

.plan-list { display: grid; gap: 12px; }
.plan-card { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; }
.plan-card-top { padding: 17px; display: flex; justify-content: space-between; gap: 10px; background: #1e2026; color: #fff; }
.plan-card-top span { color: #ff98a0; font-size: 11px; font-weight: 700; }
.plan-card-top h3 { margin: 5px 0 0; font-size: 19px; }
.plan-price { align-self: center; white-space: nowrap; font-size: 14px; font-weight: 700; }
.plan-features { padding: 15px 17px 6px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.plan-features div { text-align: center; color: #4f545d; font-size: 11px; line-height: 1.45; }
.plan-features svg { width: 17px; height: 17px; margin: 0 auto 6px; color: var(--red); }
.plan-note { margin: 4px 17px 13px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.plan-card .primary-button { width: calc(100% - 34px); margin: 0 17px 17px; justify-content: center; }

.process-band { padding: 26px 18px; background: #f7f8fa; border-bottom: 1px solid var(--line); }
.process-list { margin: 0; padding: 0; list-style: none; }
.process-list li { padding: 10px 0; display: flex; gap: 13px; align-items: center; }
.process-list li + li { border-top: 1px solid var(--line); }
.process-list > li > span { width: 35px; flex: 0 0 auto; color: var(--red); font-size: 11px; font-weight: 800; }
.process-list b { font-size: 14px; }
.process-list p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.compliance-note { margin: 16px 18px 24px; padding: 13px; display: flex; gap: 10px; color: #5f646d; background: #fff9e9; border: 1px solid #f2dfaa; border-radius: 7px; }
.compliance-note svg { width: 18px; height: 18px; flex: 0 0 auto; color: #9b6d00; }
.compliance-note p { margin: 0; font-size: 11px; line-height: 1.65; }

.page-header { padding: 30px 18px 8px; }
.page-header.compact { padding-bottom: 18px; }
.page-header h1 { margin: 6px 0 8px; font-size: 28px; }
.page-header p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.search-box { height: 44px; margin: 16px 18px 0; padding: 0 13px; display: flex; align-items: center; gap: 9px; background: var(--soft); border: 1px solid var(--line); border-radius: 7px; }
.search-box svg { width: 18px; height: 18px; color: #8a8f98; }
.search-box input { min-width: 0; flex: 1; border: 0; outline: none; background: transparent; font-size: 13px; }
.support-row { margin: 0 18px 28px; padding: 14px; display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 8px; }
.support-row > svg { width: 18px; height: 18px; color: var(--muted); margin-left: auto; }
.support-icon { width: 38px; height: 38px; display: grid; place-items: center; color: #fff; background: var(--red); border-radius: 7px; }
.support-row > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.support-row b { font-size: 13px; }
.support-row small { margin-top: 4px; color: var(--muted); font-size: 11px; }

.orders-list { padding: 0 18px 26px; display: grid; gap: 12px; }
.empty-state { padding: 58px 20px; text-align: center; border: 1px dashed #d5d7db; border-radius: 8px; }
.empty-state .empty-icon { width: 54px; height: 54px; margin: 0 auto 14px; display: grid; place-items: center; color: var(--red); background: #fff2f3; border-radius: 50%; }
.empty-state h2 { margin: 0 0 7px; font-size: 17px; }
.empty-state p { margin: 0 0 18px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.order-card { padding: 16px; border: 1px solid var(--line); border-radius: 8px; }
.order-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.order-card-head span { color: var(--muted); font-size: 11px; }
.order-card-head h2 { margin: 5px 0 0; font-size: 16px; }
.order-status { padding: 4px 7px; color: #966800; background: #fff6dc; border-radius: 4px; font-style: normal; font-size: 10px; white-space: nowrap; }
.order-details { margin-top: 14px; padding-top: 12px; display: grid; gap: 7px; border-top: 1px solid var(--line); }
.order-details p { margin: 0; display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
.order-details b { color: var(--ink); font-weight: 600; text-align: right; }
.order-delete { width: 100%; min-height: 38px; margin-top: 13px; padding: 0; display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 6px; font-size: 11px; }
.order-delete svg { width: 15px; height: 15px; }
.order-delete:active { color: var(--red); background: #fff2f3; border-color: #ffc9ce; }

.profile-head { padding: 38px 18px 30px; text-align: center; background: #f7f8fa; border-bottom: 8px solid var(--soft); }
.profile-symbol { width: 62px; height: 62px; margin: 0 auto 14px; display: grid; place-items: center; color: #fff; background: var(--red); border-radius: 14px; }
.profile-symbol svg { width: 30px; height: 30px; }
.profile-head h1 { margin: 0 0 7px; font-size: 20px; }
.profile-head p { margin: 0; color: var(--muted); font-size: 12px; }
.settings-list { border-bottom: 8px solid var(--soft); }
.settings-list button, .settings-list a { width: 100%; min-height: 54px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; background: #fff; border: 0; border-bottom: 1px solid var(--line); text-align: left; }
.settings-list span { display: flex; align-items: center; gap: 11px; font-size: 13px; }
.settings-list span svg { width: 19px; height: 19px; color: var(--red); }
.settings-list > * > svg { width: 17px; height: 17px; color: #a2a6ad; }
.settings-list em { color: var(--muted); font-size: 12px; font-style: normal; }
.profile-note { margin: 18px; padding: 14px; background: #f7f8fa; border: 1px solid var(--line); border-radius: 7px; }
.profile-note b { font-size: 13px; }
.profile-note p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 30;
  width: 100%;
  max-width: 480px;
  height: calc(62px + env(safe-area-inset-bottom));
  padding: 6px 8px env(safe-area-inset-bottom);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(255,255,255,0.97);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.bottom-nav button { position: relative; min-width: 0; padding: 2px 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #858992; background: transparent; border: 0; font-size: 10px; }
.bottom-nav button svg { width: 21px; height: 21px; }
.bottom-nav button.is-active { color: var(--red); font-weight: 700; }
.bottom-nav em { position: absolute; top: 1px; left: calc(50% + 7px); min-width: 16px; height: 16px; padding: 0 4px; display: grid; place-items: center; color: #fff; background: var(--red); border: 2px solid #fff; border-radius: 9px; font-size: 9px; font-style: normal; }

.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,0.46); }
.bottom-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 51;
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  padding: 0 18px calc(20px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  overflow-y: auto;
  background: #fff;
  border-radius: 8px 8px 0 0;
  box-shadow: var(--shadow);
}
.sheet-handle { width: 38px; height: 4px; margin: 8px auto 14px; background: #d9dadd; border-radius: 2px; }
.sheet-header { position: sticky; top: 0; z-index: 2; padding: 5px 0 14px; display: flex; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid var(--line); }
.sheet-header h2 { margin: 4px 0 0; font-size: 21px; }
.sheet-header .icon-button { flex: 0 0 auto; }
.form-fields { padding: 16px 0 4px; display: grid; gap: 14px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 12px; font-weight: 700; }
.field label em { margin-left: 3px; color: var(--red); font-style: normal; }
.field input, .field select, .field textarea { width: 100%; min-height: 44px; padding: 10px 12px; color: var(--ink); background: #fff; border: 1px solid #d9dbe0; border-radius: 6px; outline: none; font-size: 13px; }
.field textarea { min-height: 82px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(230,0,18,0.08); }
.field .field-error { color: var(--red); font-size: 10px; }
.consent-row { margin: 12px 0; display: flex; align-items: flex-start; gap: 9px; color: #5c616a; font-size: 11px; line-height: 1.6; }
.consent-row input { width: 17px; height: 17px; margin: 0; flex: 0 0 auto; accent-color: var(--red); }
.payment-preview { min-height: 60px; margin: 14px 0; padding: 11px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #f7f8fa; border: 1px solid var(--line); border-radius: 7px; }
.payment-preview > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.payment-preview svg { color: #07a357; flex: 0 0 auto; }
.payment-preview b, .payment-preview small { display: block; }
.payment-preview b { font-size: 12px; }
.payment-preview small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.status-tag { padding: 4px 7px; color: #8b6200; background: #fff0c2; border-radius: 4px; font-size: 10px; white-space: nowrap; }
.submit-button { width: 100%; min-height: 48px; }
.info-sheet { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.info-content { padding: 18px 0 4px; }
.info-content h3 { margin: 18px 0 7px; font-size: 14px; }
.info-content h3:first-child { margin-top: 0; }
.info-content p, .info-content li { color: #5c616a; font-size: 12px; line-height: 1.75; }
.info-content ul { margin: 6px 0; padding-left: 20px; }
.toast { position: fixed; left: 50%; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 80; max-width: calc(100% - 48px); padding: 10px 15px; transform: translateX(-50%); color: #fff; background: rgba(25,27,32,0.94); border-radius: 6px; font-size: 12px; box-shadow: var(--shadow); }
[hidden] { display: none !important; }
body.sheet-open { overflow: hidden; }

@media (max-width: 360px) {
  .home-hero { grid-template-columns: minmax(0, 1fr) 104px; padding-left: 16px; padding-right: 16px; }
  .home-hero img { width: 126px; height: 126px; }
  .hero-copy h1 { font-size: 30px; }
  .trust-strip span { font-size: 9px; }
}

@media (min-width: 700px) {
  .app-shell { min-height: 100vh; }
}
