:root {
  --bg: #edf6ff;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --glass: rgba(255, 255, 255, 0.18);
  --text: #101421;
  --muted: #8b929e;
  --line: rgba(32, 74, 125, 0.1);
  --blue: #1677ff;
  --blue-soft: #e9f3ff;
  --rose: #ff2b61;
  --green: #13aa67;
  --amber: #f5a623;
  --shadow: 0 18px 52px rgba(35, 83, 132, 0.14);
  --glass-shadow: 0 18px 60px rgba(31, 55, 92, 0.18);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--bg);
  overflow-x: hidden;
  touch-action: pan-y;
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
}

body {
  width: 100%;
  max-width: 100vw;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  touch-action: pan-y;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 4%, rgba(56, 168, 255, 0.18), transparent 24rem),
    radial-gradient(circle at 86% 1%, rgba(255, 142, 194, 0.2), transparent 22rem),
    linear-gradient(180deg, #eff8ff 0%, #f5f6f8 45%, #f7f7f8 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

.mobile-shell {
  width: min(100%, 430px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 34px 14px calc(116px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}

.mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 94px;
  padding: 0 2px 8px;
}

.mascot-stage {
  position: relative;
  flex: 1;
  height: 92px;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  overflow: visible;
}

.mascot-stage::before {
  content: "";
  position: absolute;
  left: 8px;
  bottom: 2px;
  width: 110px;
  height: 38px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(22, 119, 255, 0.16), transparent 70%);
  filter: blur(1px);
}

.mascot-stage img {
  position: relative;
  z-index: 1;
  width: 118px;
  height: 118px;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(31, 55, 92, 0.14));
  transform-origin: 50% 86%;
  transition: opacity 0.18s ease, transform 0.28s ease, filter 0.28s ease;
}

.mascot-stage img.is-swapping {
  opacity: 0;
  transform: translateY(5px) scale(0.94);
}

.mascot-stage[data-mood="category"] img {
  transform: translateX(2px) rotate(-3deg);
}

.mascot-stage[data-mood="loading"] img {
  animation: mascot-breathe 1.05s ease-in-out infinite;
}

.mascot-stage[data-mood="paying"] img {
  transform: translateY(-2px) scale(1.04);
}

.mascot-stage[data-mood="back"] img {
  transform: translateX(2px) rotate(2deg);
}

@keyframes mascot-breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-7px) scale(1.04); }
}

.text-button {
  min-width: 58px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 18px;
  color: #253047;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 8px 22px rgba(35, 83, 132, 0.08);
  font-weight: 750;
}

.page-view {
  display: none;
}

.page-view.active {
  display: block;
}

.category-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  overflow: visible;
  padding: 2px 0 48px;
}

.category-tab {
  position: relative;
  isolation: isolate;
  min-height: 72px;
  padding: 13px 10px;
  text-align: left;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  box-shadow: 0 10px 28px rgba(44, 73, 111, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.92);
  transition: transform 0.18s ease, background 0.22s ease, box-shadow 0.22s ease, color 0.22s ease;
}

.category-tab:active,
.tab-bar button:active,
.customer-float:active {
  transform: scale(0.98);
}

.category-tab strong {
  position: relative;
  z-index: 2;
  display: block;
  font-size: clamp(16px, 4.4vw, 18px);
  line-height: 1.1;
  white-space: nowrap;
}

.category-tab span {
  position: relative;
  z-index: 2;
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.category-tab .cat-icon {
  position: absolute;
  right: 8px;
  top: 12px;
  z-index: 1;
  width: 26px;
  height: 26px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #267cff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.2)),
    #eaf4ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 8px 18px rgba(22, 119, 255, 0.12);
  opacity: 0.82;
}

.cat-icon svg {
  width: 17px;
  height: 17px;
}

.cat-icon.custom {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
}

.cat-icon.custom img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-tab.active {
  z-index: 3;
  color: #ffffff;
  background:
    radial-gradient(circle at 76% 12%, rgba(255, 255, 255, 0.68), transparent 1.85rem),
    linear-gradient(135deg, #1677ff, #4dc4ff);
  box-shadow: 0 15px 34px rgba(22, 119, 255, 0.22);
  transform: translateY(-2px);
  animation: category-tab-hop 0.46s cubic-bezier(0.22, 1.24, 0.36, 1) both;
}

.category-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -35px;
  z-index: 1;
  width: 100%;
  height: 40px;
  border: 0;
  border-radius: 0;
  background: url("/assets/mascot/bridge-body.png") center bottom / 100% auto no-repeat;
  filter: drop-shadow(0 12px 14px rgba(35, 83, 132, 0.1));
  pointer-events: none;
  transform-origin: 50% 86%;
  animation: penguin-bridge-hop 0.52s cubic-bezier(0.22, 1.25, 0.36, 1) both;
}

.category-tab.active span,
.category-tab.active .cat-icon {
  color: rgba(255, 255, 255, 0.9);
}

.category-tab.active .cat-icon {
  background: rgba(255, 255, 255, 0.24);
}

@keyframes penguin-bridge-hop {
  0% { opacity: 0; transform: translateY(-12px) scale(0.9); }
  45% { opacity: 1; transform: translateY(4px) scale(1.05); }
  72% { transform: translateY(-3px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes category-tab-hop {
  0% { transform: translateY(0) scale(0.98); }
  44% { transform: translateY(-7px) scale(1.025); }
  76% { transform: translateY(1px) scale(0.995); }
  100% { transform: translateY(-2px) scale(1); }
}

.recharge-card,
.future-card,
.notice-bar,
.orders-head,
.order-card-item {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  background: var(--surface-strong);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.recharge-card {
  position: relative;
  z-index: 1;
  margin-top: -18px;
  padding: 20px 18px 18px;
  transition: transform 0.26s ease, box-shadow 0.26s ease;
}

.recharge-card.category-switching {
  box-shadow: 0 24px 64px rgba(35, 83, 132, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  animation: recharge-card-hop 0.52s cubic-bezier(0.22, 1.18, 0.36, 1) both;
}

@keyframes recharge-card-hop {
  0% { transform: translateY(0); }
  42% { transform: translateY(-7px); }
  72% { transform: translateY(2px); }
  100% { transform: translateY(0); }
}

.phone-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 10px;
  align-items: end;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding-left: 0;
}

.field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.field input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: clamp(29px, 7.6vw, 34px) !important;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.08;
  font-variant-numeric: tabular-nums;
}

.field input::placeholder {
  color: #c7cfdb;
  font-size: 22px;
  font-weight: 700;
}

.icon-button {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(32, 74, 125, 0.1);
  border-radius: 18px;
  color: #6f7a89;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 10px 24px rgba(31, 55, 92, 0.08);
  font-weight: 900;
}

.contact-glyph {
  position: relative;
  display: block;
  width: 24px;
  height: 24px;
  border: 2px solid currentColor;
  border-radius: 7px;
}

.contact-glyph::before,
.contact-glyph::after {
  content: "";
  position: absolute;
  background: currentColor;
}

.contact-glyph::before {
  left: 7px;
  top: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.contact-glyph::after {
  left: 5px;
  bottom: 5px;
  width: 10px;
  height: 6px;
  border-radius: 8px 8px 4px 4px;
}

.phone-history {
  position: absolute;
  top: 84px;
  right: 18px;
  z-index: 20;
  width: min(318px, calc(100% - 36px));
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  box-shadow: var(--glass-shadow);
}

.phone-history button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.phone-history button:active {
  background: rgba(22, 119, 255, 0.08);
}

.phone-history strong {
  font-size: 16px;
}

.phone-history span,
.empty-history {
  color: var(--muted);
  font-size: 13px;
}

.empty-history {
  padding: 14px;
  text-align: center;
}

.location-line {
  min-height: 24px;
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.location-line.ready {
  color: var(--blue);
}

.ported-alert {
  margin: -8px 0 14px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 139, 36, 0.25);
  border-radius: 14px;
  color: #b86500;
  background: rgba(255, 246, 221, 0.88);
  font-size: 13px;
  font-weight: 850;
}

.coupon-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  color: #5b6675;
  background: linear-gradient(90deg, #fff0f5, #fff8fa);
  overflow: hidden;
}

.coupon-strip strong {
  color: var(--text);
  font-size: 16px;
}

.coupon-strip b {
  color: var(--rose);
  font-size: 16px;
  letter-spacing: 0;
}

.product-grid {
  display: grid;
  gap: 16px;
}

.product-section {
  display: grid;
  gap: 10px;
}

.product-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}

.product-section-head strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 950;
}

.product-section-head span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.product-grid-inner {
  display: grid;
  gap: 8px;
}

.direct-grid-inner {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.coupon-grid-inner {
  grid-template-columns: 1fr;
}

.product-card {
  position: relative;
  min-height: 106px;
  padding: 20px 7px 12px;
  border: 1px solid rgba(32, 74, 125, 0.08);
  border-radius: 18px;
  background: rgba(247, 249, 252, 0.92);
  text-align: center;
  overflow: hidden;
  appearance: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.product-card:active {
  transform: scale(0.985);
}

.product-card.active {
  z-index: 2;
  border-color: var(--blue);
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.16), 0 12px 28px rgba(22, 119, 255, 0.14);
}

.product-card.active::after {
  content: "✓";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 16px 0 17px 0;
  color: #ffffff;
  background: var(--blue);
  font-weight: 900;
}

.product-card strong {
  display: block;
  color: var(--text);
  font-size: clamp(23px, 7vw, 30px);
  line-height: 1.08;
}

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

.product-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.product-card span b {
  color: var(--rose);
  font-size: 16px;
}

.product-card.coupon-product span b {
  color: var(--blue);
}

.product-card.coupon-product {
  min-height: 128px;
  padding: 17px 16px 15px;
  border-color: rgba(22, 119, 255, 0.14);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(239, 247, 255, 0.86)),
    rgba(255, 255, 255, 0.72);
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94), 0 12px 28px rgba(32, 74, 125, 0.07);
}

.product-card.coupon-product strong {
  max-width: calc(100% - 58px);
  color: #0f2f62;
  font-size: 22px;
  line-height: 1.18;
}

.product-card.coupon-product p {
  margin: 6px 0 0;
  color: #637084;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.coupon-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.coupon-benefits span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin: 0;
  padding: 4px 9px;
  border: 1px solid rgba(255, 122, 70, 0.24);
  border-radius: 999px;
  color: #d46016;
  background: rgba(255, 247, 229, 0.82);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.product-card.coupon-product small {
  display: block;
  margin-top: 12px;
  color: var(--blue);
  font-size: 15px;
  font-weight: 950;
}

.product-tag {
  position: absolute;
  right: -1px;
  top: -1px;
  min-width: 42px;
  max-width: 66px;
  padding: 4px 7px 5px;
  border-radius: 0 18px 0 13px;
  color: #ffffff;
  background: linear-gradient(135deg, #ff5f8f, #ff8a34);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 34px 14px;
  color: var(--muted);
  text-align: center;
}

.service-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.service-row span {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 4px;
  border: 1px solid rgba(32, 74, 125, 0.08);
  border-radius: 15px;
  color: #5f6875;
  background: rgba(250, 252, 255, 0.78);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.mini-icon {
  position: relative;
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 20px;
  color: var(--blue);
}

.mini-icon.shield,
.mini-icon.bolt {
  border: 2px solid currentColor;
  border-radius: 50%;
}

.mini-icon.shield::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  width: 8px;
  height: 5px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.mini-icon.bolt::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 4px;
  width: 7px;
  height: 12px;
  background: currentColor;
  clip-path: polygon(60% 0, 12% 54%, 50% 54%, 36% 100%, 90% 42%, 53% 42%);
}

.mini-icon.search::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 2px;
  width: 11px;
  height: 11px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.mini-icon.search::after {
  content: "";
  position: absolute;
  right: 2px;
  bottom: 3px;
  width: 7px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: rotate(45deg);
}

.notice-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 20px;
}

.notice-bar strong {
  color: var(--blue);
  font-size: 15px;
}

.notice-bar span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #3a4350;
}

.future-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 18px;
  box-shadow: none;
}

.future-card h2,
.orders-head h2 {
  margin: 0;
  font-size: 22px;
}

.future-card p,
.orders-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.future-card button {
  width: 86px;
  height: 46px;
  border-radius: 15px;
  color: var(--muted);
  background: #eef2f8;
  font-weight: 800;
}

.soft-banner {
  min-height: 88px;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.95), rgba(235, 249, 255, 0.95) 48%, rgba(255, 242, 247, 0.95));
}

.orders-page {
  display: none;
}

.orders-page.active {
  display: block;
}

.orders-head {
  padding: 18px;
  margin-bottom: 14px;
}

.order-search {
  display: grid;
  grid-template-columns: 1fr 86px;
  gap: 10px;
  margin-bottom: 14px;
}

.order-search input {
  min-width: 0;
  height: 48px;
  padding: 0 15px;
  border: 1px solid rgba(32, 74, 125, 0.1);
  border-radius: 24px;
  outline: 0;
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.order-search button,
.pay-links a,
.secondary-wide,
.order-actions button,
.customer-link {
  height: 46px;
  border-radius: 16px;
  color: #ffffff;
  background: var(--blue);
  font-weight: 850;
}

.order-search button:active,
.pay-links a:active,
.secondary-wide:active,
.order-actions button:active {
  transform: translateY(1px);
}

.order-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 12px;
  scrollbar-width: none;
}

.order-filters::-webkit-scrollbar {
  display: none;
}

.order-filters button {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 14px;
  border-radius: 19px;
  color: #6f7784;
  background: rgba(255, 255, 255, 0.66);
  font-weight: 800;
}

.order-filters button.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 -3px 0 var(--text);
}

.order-list {
  display: grid;
  gap: 14px;
}

.order-card-item {
  padding: 0;
  overflow: hidden;
}

.order-open {
  width: 100%;
  padding: 18px;
  color: inherit;
  background: transparent;
  text-align: left;
}

.order-card-top {
  display: flex;
  align-items: center;
  gap: 9px;
}

.phone-mini {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #ffffff;
  background: #101421;
  font-size: 12px;
  font-weight: 900;
}

.order-card-top strong {
  font-size: 18px;
}

.status-text {
  margin-left: auto;
  color: var(--blue);
  font-size: 15px;
}

.status-text.failed,
.status-text.needs_config,
.status-text.cancelled {
  color: var(--rose);
}

.status-text.success {
  color: var(--green);
}

.order-main {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 14px;
  margin-top: 14px;
}

.order-product-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(150deg, #ffad21, #ff6a00);
  font-size: 34px;
  font-weight: 950;
}

.order-main h3 {
  margin: 0 0 7px;
  font-size: 18px;
  line-height: 1.25;
}

.order-main p {
  margin: 3px 0;
  color: var(--muted);
  font-size: 15px;
}

.after-sale {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: #c97522;
  font-size: 14px;
  font-weight: 800;
}

.order-money {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  color: #8e95a1;
  font-size: 14px;
}

.order-money b {
  color: #707987;
  font-size: 18px;
}

.order-money strong {
  color: var(--text);
  font-size: 18px;
}

.order-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 0 18px 18px;
}

.order-actions button {
  width: auto;
  min-width: 82px;
  height: 40px;
  padding: 0 13px;
  color: #343b48;
  background: rgba(245, 247, 251, 0.95);
}

.order-actions button[data-pay-order] {
  color: #101421;
  background: #ffe300;
}

.status-badge {
  justify-self: end;
  align-self: start;
  max-width: 96px;
  padding: 7px 10px;
  border-radius: 12px;
  color: var(--blue);
  background: #eaf3ff;
  font-size: 12px;
  font-weight: 850;
  white-space: normal;
  text-align: center;
}

.status-badge.success {
  color: var(--green);
  background: #e9fff4;
}

.status-badge.failed,
.status-badge.needs_config,
.status-badge.cancelled {
  color: var(--rose);
  background: #fff0f5;
}

.status-badge.paid,
.status-badge.processing {
  color: #a56a00;
  background: #fff6dd;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: end center;
  padding: 16px;
  background: rgba(13, 20, 32, 0.48);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.modal-sheet {
  width: min(100%, 430px);
  max-height: min(82dvh, 720px);
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 80px rgba(16, 28, 45, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.modal-sheet h3 {
  margin: 0 0 12px;
  font-size: 25px;
  line-height: 1.25;
}

.modal-sheet p {
  margin: 0;
  color: #5d6673;
  line-height: 1.75;
  font-size: 17px;
}

.modal-sheet > button:not(.plain-close),
.secondary-wide {
  width: 100%;
  margin-top: 18px;
}

.modal-sheet > button:not(.plain-close) {
  min-height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(52, 140, 255, 0.94), rgba(58, 199, 255, 0.88)),
    var(--blue);
  box-shadow: 0 16px 36px rgba(22, 119, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  font-size: 16px;
  font-weight: 850;
  transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}

.modal-sheet > button:not(.plain-close):active {
  transform: scale(0.985);
}

.modal-sheet button:disabled {
  color: #7f8b9b;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(235, 241, 248, 0.88)),
    #edf1f6;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84), 0 10px 22px rgba(31, 55, 92, 0.08);
}

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

.sheet-head h3 {
  margin: 0;
}

.plain-close {
  width: auto !important;
  height: 36px !important;
  margin: 0 !important;
  padding: 0 12px;
  border-radius: 18px;
  color: #677282 !important;
  background: #f2f5f9 !important;
  font-weight: 800;
}

.loading-backdrop {
  place-items: center;
}

.loading-sheet {
  width: min(92%, 380px);
  text-align: center;
  overflow: hidden;
}

.loading-mascot {
  position: relative;
  width: 112px;
  height: 112px;
  margin: -4px auto 10px;
  border-radius: 36px;
  background:
    radial-gradient(circle at 35% 20%, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.12) 45%, transparent 70%),
    linear-gradient(135deg, rgba(220, 239, 255, 0.94), rgba(255, 255, 255, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94), 0 18px 38px rgba(22, 119, 255, 0.16);
}

.loading-mascot img {
  width: 118px;
  height: 118px;
  margin: -3px 0 0 -3px;
  object-fit: contain;
  animation: mascot-breathe 1.05s ease-in-out infinite;
}

.loading-mascot span {
  position: absolute;
  right: -2px;
  top: 8px;
  width: 24px;
  height: 24px;
  border-radius: 9px;
  background: linear-gradient(135deg, #ffffff, #dbeeff);
  box-shadow: 0 10px 22px rgba(22, 119, 255, 0.18);
}

.loading-mascot span::before {
  content: "";
  position: absolute;
  inset: 6px 8px;
  background: var(--blue);
  clip-path: polygon(58% 0, 6% 55%, 46% 55%, 30% 100%, 94% 39%, 55% 39%);
}

.loading-sheet h3 {
  margin-bottom: 8px;
}

.loading-sheet p {
  font-size: 15px;
  line-height: 1.55;
}

.progress-rail {
  position: relative;
  height: 12px;
  margin: 18px 0 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(222, 233, 247, 0.92);
  box-shadow: inset 0 2px 5px rgba(31, 55, 92, 0.08);
}

.progress-rail i {
  position: absolute;
  left: 0;
  top: 0;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, #1677ff, #4fc3ff),
    var(--blue);
  box-shadow: 0 8px 18px rgba(22, 119, 255, 0.2);
  transition: width 0.42s ease;
}

.progress-rail i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.58), transparent);
  animation: progress-sheen 1.15s linear infinite;
}

.loading-sheet small {
  display: block;
  color: #708098;
  font-size: 13px;
  font-weight: 750;
}

@keyframes progress-sheen {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

.order-detail-card {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 14px;
  border: 1px solid rgba(32, 74, 125, 0.08);
  border-radius: 18px;
  background: rgba(247, 249, 252, 0.9);
}

.order-detail-top {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) minmax(68px, auto);
  align-items: start;
  gap: 10px;
  margin-bottom: 12px;
}

.category-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(150deg, #ffad21, #ff6a00);
  font-weight: 950;
}

.order-detail-card h3 {
  margin: 0 0 3px;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.order-detail-card p {
  color: #6f7784;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.ported-detail,
.ported-order {
  color: #b86500 !important;
  font-weight: 850;
}

.price-line {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(32, 74, 125, 0.08);
  color: #8d95a1;
  font-size: 13px;
}

.price-line strong {
  color: var(--text);
}

.upstream-fields {
  margin-top: 10px !important;
  padding: 9px 10px;
  border-radius: 12px;
  color: #697384 !important;
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px !important;
  word-break: break-all;
}

.hint-text,
.error-text {
  margin-top: 12px !important;
  font-size: 14px !important;
}

.hint-text {
  color: #8b929e !important;
}

.error-text {
  color: var(--rose) !important;
}

.pay-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.pay-links a {
  display: grid;
  place-items: center;
  text-decoration: none;
}

.pay-links a.alipay {
  background: #1677ff;
}

.pay-links a.wechat {
  background: #12b56d;
}

.coupon-flow {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(22, 119, 255, 0.12);
  border-radius: 18px;
  color: #253047;
  background: linear-gradient(180deg, rgba(247, 251, 255, 0.96), rgba(238, 246, 255, 0.84));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.coupon-flow strong {
  font-size: 15px;
  font-weight: 950;
}

.coupon-flow p {
  margin: 0 !important;
  color: #697384 !important;
  font-size: 13px !important;
  line-height: 1.55;
}

.coupon-flow.done {
  color: var(--blue);
  font-weight: 900;
}

.coupon-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 8px;
}

.coupon-code-row input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(32, 74, 125, 0.12);
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.92);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
}

.coupon-code-row button,
.primary-wide {
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #1677ff, #4dbdff);
  font-size: 15px;
  font-weight: 950;
  box-shadow: 0 12px 24px rgba(22, 119, 255, 0.22);
}

.coupon-code-row button:disabled,
.primary-wide:disabled {
  color: #8b95a5;
  background: #eef3fa;
  box-shadow: none;
}

.secondary-wide {
  color: #253047;
  background: rgba(238, 243, 250, 0.96);
}

.order-timeline {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(32, 74, 125, 0.08);
}

.order-timeline div {
  color: #6b7482;
  font-size: 13px;
}

.customer-float {
  position: fixed;
  right: max(14px, calc((100vw - 430px) / 2 + 14px));
  bottom: calc(92px + env(safe-area-inset-bottom));
  z-index: 760;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  color: #16774a;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 14px 38px rgba(31, 55, 92, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  font-size: 13px;
  font-weight: 900;
}

.customer-float i {
  position: absolute;
  right: 3px;
  top: 3px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.96);
  border-radius: 999px;
  color: #ffffff;
  background: #ff2b61;
  font-size: 11px;
  font-style: normal;
  line-height: 1;
}

.wechat-glyph {
  position: relative;
  width: 32px;
  height: 27px;
  display: block;
}

.wechat-glyph::before,
.wechat-glyph::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: #16bf61;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

.wechat-glyph::before {
  left: 0;
  top: 2px;
  width: 23px;
  height: 19px;
}

.wechat-glyph::after {
  right: 0;
  bottom: 0;
  width: 21px;
  height: 17px;
  background: #0fa853;
}

.tab-bar {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 720;
  width: min(398px, calc(100vw - 28px));
  height: 72px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.16)),
    rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(30px) saturate(190%) contrast(1.04);
  -webkit-backdrop-filter: blur(30px) saturate(190%) contrast(1.04);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(255, 255, 255, 0.14),
    var(--glass-shadow);
  transform: translateX(-50%);
}

.tab-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.66), transparent 34%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.2), transparent 42%, rgba(255, 255, 255, 0.16));
  pointer-events: none;
}

.tab-bar button {
  display: grid;
  place-items: center;
  gap: 2px;
  border-radius: 22px;
  color: rgba(33, 42, 57, 0.66);
  background: transparent;
  transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.2, 1), background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.tab-bar button:active {
  background: rgba(255, 255, 255, 0.44);
  box-shadow: inset 0 1px 8px rgba(255, 255, 255, 0.7);
}

.tab-bar button.active {
  color: #101421;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 10px 26px rgba(31, 55, 92, 0.11);
}

.tab-bar b {
  font-size: 12px;
  line-height: 1;
}

.tab-icon {
  position: relative;
  width: 25px;
  height: 25px;
  display: block;
}

.tab-icon.home::before {
  content: "";
  position: absolute;
  inset: 6px 4px 3px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 5px;
}

.tab-icon.home::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 15px;
  height: 15px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
}

.tab-icon.orders::before {
  content: "";
  position: absolute;
  inset: 3px 5px;
  border: 2px solid currentColor;
  border-radius: 5px;
}

.tab-icon.orders::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  top: 9px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.tab-icon.user::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 3px;
  width: 9px;
  height: 9px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.tab-icon.user::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 3px;
  height: 11px;
  border: 2px solid currentColor;
  border-radius: 14px 14px 7px 7px;
}

.customer-content {
  margin-top: 16px;
}

.customer-content img {
  width: 100%;
  display: block;
  border-radius: 20px;
  background: #fff;
}

.customer-link {
  display: grid;
  place-items: center;
  text-decoration: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(102px + env(safe-area-inset-bottom));
  z-index: 1200;
  transform: translateX(-50%);
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 15px;
  border-radius: 16px;
  color: #fff;
  background: rgba(17, 21, 34, 0.92);
  box-shadow: 0 14px 40px rgba(17, 21, 34, 0.25);
  font-weight: 800;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101722;
    --surface: rgba(24, 33, 48, 0.78);
    --surface-strong: rgba(24, 33, 48, 0.92);
    --text: #f6f8fb;
    --muted: #9aa8ba;
    --line: rgba(255, 255, 255, 0.12);
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
    --glass-shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
  }

  body {
    background:
      radial-gradient(circle at 18% 4%, rgba(56, 168, 255, 0.14), transparent 24rem),
      radial-gradient(circle at 86% 1%, rgba(255, 78, 142, 0.12), transparent 22rem),
      #101722;
  }

  .category-tab,
  .recharge-card,
  .future-card,
  .notice-bar,
  .orders-head,
  .order-card-item,
  .modal-sheet,
  .order-detail-card,
  .phone-history,
  .icon-button,
  .order-search input {
    background: rgba(24, 33, 48, 0.9);
  }

  .product-card,
  .service-row span,
  .order-actions button,
  .secondary-wide {
    color: var(--text);
    background: rgba(31, 43, 61, 0.88);
  }

  .product-card.active {
    background: rgba(27, 39, 57, 0.96);
  }

  .notice-bar span,
  .mobile-header h1,
  .future-card h2,
  .orders-head h2,
  .product-card strong {
    color: var(--text);
  }

  .tab-bar {
    border-color: rgba(255, 255, 255, 0.18);
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
      rgba(15, 23, 42, 0.52);
  }

  .tab-bar button {
    color: rgba(246, 248, 251, 0.66);
  }

  .tab-bar button.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
  }
}
