:root {
  --primary: #7c49ca;
  --primary-dark: #6835b3;
  --primary-soft: #f4effd;
  --ink: #171a20;
  --muted: #8f9997;
  --line: #eceeee;
  --surface: #ffffff;
  --page: #f5f6f7;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: #d9dce1;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: #d9dce1; }
button, input { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }

.app-shell {
  position: relative;
  width: min(100%, 430px);
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--page);
  box-shadow: 0 0 34px rgba(26, 23, 37, .12);
}

.screen { display: none; min-height: 100dvh; padding-bottom: 90px; }
.screen.active { display: block; }

.status-bar {
  height: 35px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 28px 5px;
  color: #fff;
  font-size: 12px;
}
.status-bar strong { font-size: 16px; line-height: 1; }

.page-header {
  height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 18px;
  color: #fff;
}
.page-header h1 { margin: 0; font-size: 20px; font-weight: 500; letter-spacing: 0; }
.mini-capsule {
  justify-self: end;
  width: 100px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
  border-radius: 20px;
  background: rgba(69, 31, 126, .42);
  font-size: 16px;
}
.mini-capsule span { letter-spacing: 2px; transform: translateY(-2px); }
.mini-capsule i { width: 1px; height: 22px; background: rgba(255,255,255,.09); }
.mini-capsule b { font-size: 20px; }
.brand-inline { opacity: 0; pointer-events: none; }
.brand-inline.has-logo { opacity: 1; }
.brand-inline img { width: 30px; height: 30px; object-fit: cover; border-radius: 6px; }

.home-hero {
  height: 360px;
  background: linear-gradient(180deg, #7d4ac9 0%, #8651d0 45%, #c5aee8 78%, #f5f6f7 100%);
}
.banner-image {
  display: block;
  width: calc(100% - 38px);
  height: 207px;
  object-fit: cover;
  margin: 8px auto 0;
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(73, 38, 120, .12);
}
.home-content { padding: 0 20px 24px; }
.panel {
  background: var(--surface);
  border-radius: 7px;
  box-shadow: 0 4px 16px rgba(29, 39, 48, .025);
}
.notice-panel { min-height: 151px; padding: 14px 18px 8px; margin-bottom: 18px; }
.query-panel { min-height: 220px; padding: 14px 18px 28px; }
.section-heading { display: flex; align-items: center; min-height: 36px; }
.heading-icon {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  margin-right: 8px;
  color: white;
  border-radius: 15px;
  background: var(--primary);
}
.heading-icon svg { width: 20px; height: 20px; }
.section-heading h2 { margin: 0; font-size: 22px; line-height: 1; }
.more-button {
  display: flex;
  align-items: center;
  gap: 1px;
  margin-left: auto;
  padding: 5px 0 5px 10px;
  color: #949896;
  border: 0;
  background: none;
  font-size: 16px;
}
.more-button svg { width: 17px; }
.notice-list { margin-top: 8px; }
.notice-item {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  border-bottom: 1px dashed #e6e7e7;
  font-size: 16px;
  padding: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  border-top: 0;
  border-right: 0;
  border-left: 0;
}
.notice-item:last-child { border-bottom: 0; }
.notice-tag { padding: 3px 6px; color: white; background: var(--primary); }
.notice-item time { color: #a5a8a7; font-size: 14px; }

.query-panel .section-heading { margin-bottom: 28px; }
.search-box {
  height: 61px;
  display: grid;
  grid-template-columns: 35px 1fr 108px;
  align-items: center;
  border: 1px solid #cfd1d1;
  border-radius: 33px;
  overflow: hidden;
}
.search-box > svg { width: 21px; margin-left: 17px; color: #c5c9c8; }
.search-box input { width: 100%; min-width: 0; padding: 0 11px; border: 0; outline: 0; font-size: 19px; }
.search-box button {
  align-self: stretch;
  border: 0;
  border-radius: 32px;
  color: white;
  background: var(--primary);
  font-size: 18px;
  font-weight: 700;
}
.query-hint { margin: 13px 18px 0; color: #a3aaa8; font-size: 12px; }

.orders-top, .contact-topbar { background: var(--primary); }
.orders-top { height: 93px; }
.orders-top .page-header, .contact-topbar .page-header { height: 58px; }
.order-tabs {
  height: 50px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: #fff;
}
.order-tabs button {
  position: relative;
  padding: 0 2px;
  border: 0;
  background: none;
  font-size: 15px;
  white-space: nowrap;
}
.order-tabs button.active { color: var(--primary); }
.order-tabs button.active::after {
  content: "";
  position: absolute;
  width: 40px;
  height: 3px;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  background: var(--primary);
}
.orders-content { padding: 17px; }
.order-card {
  margin-bottom: 14px;
  padding: 16px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(28, 35, 43, .04);
}
.order-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  margin-bottom: 13px;
  border-bottom: 1px solid var(--line);
}
.order-title h2 { margin: 0; font-size: 18px; }
.order-title strong { color: var(--primary); font-size: 17px; }
.order-info { display: grid; gap: 9px; margin: 0; }
.order-info div { display: grid; grid-template-columns: 84px 1fr; align-items: baseline; }
.order-info dt { color: #7e8987; font-size: 15px; }
.order-info dd { margin: 0; text-align: right; font-size: 15px; overflow-wrap: anywhere; }
.order-info .price { color: #e54848; font-size: 18px; font-weight: 700; }
.order-actions {
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: 12px;
  align-items: center;
  padding-top: 13px;
  margin-top: 13px;
  border-top: 1px solid var(--line);
}
.order-actions button { height: 36px; border: 0; color: #86918f; background: transparent; }
.order-actions .pay-button { border-radius: 20px; color: #fff; background: var(--primary); font-weight: 700; }
.empty-state { padding: 70px 20px; text-align: center; color: #9ba4a2; }
.empty-state svg { width: 44px; height: 44px; margin-bottom: 8px; }

.contact-topbar { height: 93px; }
.contact-hero {
  height: 230px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f4f0fd;
}
.contact-hero img { width: 88px; height: 88px; object-fit: cover; border-radius: 50%; }
.contact-hero h1 { margin: 18px 0 5px; font-size: 25px; }
.contact-hero p { margin: 0; color: #9376c4; font-size: 15px; }
.contact-details { padding: 25px 20px; background: #fff; min-height: 480px; }
.contact-row {
  min-height: 104px;
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.contact-row > svg { width: 24px; color: var(--primary); }
.contact-row div { display: flex; flex-direction: column; gap: 6px; }
.contact-row span { color: #919b99; font-size: 15px; }
.contact-row strong { font-size: 22px; font-weight: 500; }
.call-button {
  width: 212px;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 29px auto 0;
  color: white;
  text-decoration: none;
  border-radius: 28px;
  background: var(--primary);
  font-size: 19px;
  font-weight: 700;
}
.call-button svg { width: 20px; fill: currentColor; }

.bottom-nav {
  position: fixed;
  z-index: 20;
  bottom: 0;
  left: 50%;
  width: min(100%, 430px);
  height: calc(80px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid #f0f0f0;
  background: rgba(255,255,255,.98);
  box-shadow: 0 -4px 14px rgba(22, 26, 30, .04);
}
.bottom-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  color: #aeb5b3;
  background: none;
  font-size: 14px;
}
.bottom-nav svg { width: 27px; height: 27px; stroke-width: 1.8; }
.bottom-nav button.active { color: var(--primary); }

dialog {
  width: min(calc(100% - 32px), 390px);
  max-height: 76dvh;
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 20px 70px rgba(17, 15, 27, .28);
}
dialog::backdrop { background: rgba(22, 18, 30, .45); }
.dialog-header { height: 58px; display: flex; align-items: center; padding: 0 18px; border-bottom: 1px solid var(--line); }
.dialog-header h3 { margin: 0; font-size: 18px; }
.dialog-header button { display: grid; place-items: center; margin-left: auto; border: 0; background: none; }
.dialog-header svg { width: 21px; }
.dialog-content { max-height: calc(76dvh - 58px); padding: 16px 18px 20px; overflow: auto; }
.company-result { padding: 14px 0; border-bottom: 1px solid var(--line); }
.company-result:first-child { padding-top: 0; }
.company-result:last-child { border-bottom: 0; }
.company-result h4 { margin: 0 0 9px; font-size: 17px; }
.company-result p { margin: 5px 0; color: #77817f; font-size: 13px; }
.company-result button { width: 100%; height: 38px; margin-top: 10px; border: 0; border-radius: 4px; color: white; background: var(--primary); }
.package-company { margin-bottom: 12px; color: #737c7a; font-size: 13px; }
.package-list { display: grid; gap: 10px; }
.package-option { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 7px; }
.package-option h4 { margin: 0 0 5px; font-size: 16px; }
.package-option p { margin: 0; color: #7f8886; font-size: 12px; line-height: 1.55; }
.package-option > strong { color: #e54848; font-size: 19px; }
.package-option > button { grid-column: 1 / -1; height: 38px; border: 0; border-radius: 4px; color: #fff; background: var(--primary); }
.notice-dialog-item { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 15px 0; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); text-align: left; background: transparent; }
.notice-dialog-item strong { font-size: 16px; }
.notice-dialog-item time { color: #9aa09f; font-size: 13px; }
.notice-dialog-item span { grid-column: 1 / -1; color: #79817f; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-detail time { display: block; margin-bottom: 16px; color: #9aa09f; font-size: 13px; }
.notice-detail div { color: #444b4a; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 108px;
  max-width: calc(100% - 40px);
  padding: 10px 16px;
  transform: translate(-50%, 20px);
  color: white;
  border-radius: 4px;
  background: rgba(20, 21, 23, .9);
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
  font-size: 14px;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 700px) {
  body { padding: 22px 0; }
  .app-shell { min-height: calc(100dvh - 44px); border-radius: 12px; }
  .screen { min-height: calc(100dvh - 44px); }
  .bottom-nav { bottom: 22px; border-radius: 0 0 12px 12px; }
}

@media (max-width: 360px) {
  .home-content { padding-inline: 14px; }
  .orders-content { padding-inline: 12px; }
  .notice-item { font-size: 14px; }
  .notice-date { font-size: 12px; }
  .search-box { grid-template-columns: 31px 1fr 88px; }
  .search-box input { font-size: 16px; }
  .contact-hero p { font-size: 13px; }
}
