:root {
  --font-display: 38px;
  --font-title: 24px;
  --font-body: 14px;
  color: #151515;
  background: #f6f2ea;
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  font-size: var(--font-body);
  background-color: #f6f2ea;
  background-image: linear-gradient(rgba(20, 20, 20, 0.032) 1px, transparent 1px), linear-gradient(90deg, rgba(20, 20, 20, 0.032) 1px, transparent 1px);
  background-size: 44px 44px;
}

[hidden] {
  display: none !important;
}

.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  border-bottom: 1px solid #ded6c9;
  background: rgba(246, 242, 234, 0.9);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: #151515;
  text-decoration: none;
  font-size: 16px;
}

.brand::before {
  content: "号";
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fffaf2;
  background: #151515;
  font-size: 13px;
  line-height: 1;
}

nav {
  display: flex;
  gap: 22px;
}

nav a {
  display: inline-flex;
  color: #555;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}

[data-auth-link] {
  display: none;
}

body[data-logged-in="true"] [data-auth-link] {
  display: inline-flex;
}

nav a.active {
  color: #0f5a43;
}

button,
.primary {
  border: 0;
  border-radius: 999px;
  padding: 10px 17px;
  background: #0f5a43;
  color: white;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.secondary {
  background: transparent;
  color: #151515;
  border: 1px solid #d8d0c2;
}

.shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 34px;
}

.home-stage {
  max-width: none;
  margin: 0;
  padding-left: clamp(48px, 6vw, 92px);
  padding-right: clamp(48px, 5vw, 88px);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
  gap: clamp(42px, 8vw, 150px);
}

.home-layout {
  min-height: calc(100vh - 60px);
  align-items: center;
  padding-top: 28px;
  padding-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.home-hero-copy {
  align-self: center;
  max-width: 680px;
  position: relative;
  z-index: 2;
  transform: translateY(-156px);
}

.home-layout .purchase-panel {
  justify-self: end;
  width: min(420px, 100%);
  min-width: 0;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.home-ambient-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.ambient-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(15, 90, 67, 0.1);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.52);
  box-shadow: 0 10px 28px rgba(50, 43, 31, 0.035);
  color: rgba(21, 21, 21, 0.36);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(4px);
  transform: translate3d(0, 0, 0) rotate(var(--chip-rotate, 0deg));
  animation: ambientBreath 11s ease-in-out infinite;
}

.ambient-chip:nth-child(1) {
  left: 4%;
  top: 11%;
  --chip-rotate: -2deg;
}

.ambient-chip:nth-child(2) {
  left: 21%;
  top: 12%;
  --chip-rotate: 1.5deg;
  animation-delay: -4s;
}

.ambient-chip:nth-child(3) {
  left: 48%;
  top: 13%;
  --chip-rotate: -1deg;
  animation-delay: -7s;
}

.ambient-chip:nth-child(4) {
  right: 18%;
  top: 12%;
  --chip-rotate: 2deg;
  animation-delay: -3s;
}

.ambient-chip:nth-child(5) {
  right: 5%;
  top: 24%;
  --chip-rotate: -1.5deg;
  animation-delay: -8s;
}

.ambient-chip:nth-child(6) {
  left: 1%;
  top: 44%;
  --chip-rotate: 1deg;
  animation-delay: -2s;
}

.ambient-chip:nth-child(7) {
  left: 28%;
  top: 34%;
  --chip-rotate: -1.4deg;
  animation-delay: -9s;
}

.ambient-chip:nth-child(8) {
  left: 52%;
  top: 31%;
  --chip-rotate: 1.2deg;
  animation-delay: -5s;
}

.ambient-chip:nth-child(9) {
  right: 3%;
  top: 48%;
  --chip-rotate: -2deg;
  animation-delay: -6s;
}

.ambient-chip:nth-child(10) {
  left: 3%;
  top: 76%;
  --chip-rotate: 2deg;
  animation-delay: -1s;
}

.ambient-chip:nth-child(11) {
  left: 22%;
  top: 68%;
  --chip-rotate: -1deg;
  animation-delay: -10s;
}

.ambient-chip:nth-child(12) {
  left: 46%;
  top: 74%;
  --chip-rotate: 1.8deg;
  animation-delay: -2.8s;
}

.ambient-chip:nth-child(13) {
  right: 25%;
  top: 66%;
  --chip-rotate: -1.6deg;
  animation-delay: -6.5s;
}

.ambient-chip:nth-child(14) {
  right: 2%;
  top: 86%;
  --chip-rotate: 1deg;
  animation-delay: -11s;
}

.ambient-chip:nth-child(15) {
  left: 17%;
  top: 56%;
  --chip-rotate: 1.7deg;
  animation-delay: -7.5s;
}

.ambient-chip:nth-child(16) {
  left: 58%;
  top: 54%;
  --chip-rotate: -1.2deg;
  animation-delay: -3.5s;
}

.ambient-chip:nth-child(17) {
  right: 17%;
  top: 36%;
  --chip-rotate: 1.2deg;
  animation-delay: -9.5s;
}

.ambient-chip:nth-child(18) {
  left: 36%;
  top: 91%;
  --chip-rotate: -1deg;
  animation-delay: -5.8s;
}

.ambient-chip.ambient-strong {
  border-color: rgba(15, 90, 67, 0.14);
  background: rgba(225, 241, 234, 0.58);
  color: rgba(15, 90, 67, 0.6);
}

.ambient-chip.ambient-muted {
  background: rgba(238, 232, 221, 0.5);
  color: rgba(81, 77, 71, 0.42);
}

@keyframes ambientBreath {
  0% {
    opacity: 0.26;
    transform: translate3d(0, 0, 0) rotate(var(--chip-rotate, 0deg));
  }
  50% {
    opacity: 0.64;
    transform: translate3d(0, -7px, 0) rotate(var(--chip-rotate, 0deg));
  }
  100% {
    opacity: 0.26;
    transform: translate3d(0, 0, 0) rotate(var(--chip-rotate, 0deg));
  }
}

.home-hero-copy h1 {
  max-width: 620px;
  font-size: clamp(42px, 4.4vw, 64px);
}

.home-hero-copy p:not(.eyebrow) {
  max-width: 520px;
}

.keyword-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 560px;
  margin-top: 20px;
}

.keyword-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid #d8d0c2;
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.72);
  color: #514d47;
  font-size: 13px;
  font-weight: 800;
}

.hero h1,
.page-title {
  max-width: 780px;
  margin: 0;
  font-size: var(--font-display);
  line-height: 1.06;
  letter-spacing: 0;
}

.hero.small h1 {
  font-size: 32px;
}

.hero p {
  max-width: 760px;
  color: #666;
  font-size: 16px;
  line-height: 1.6;
}

.eyebrow {
  color: #0f5a43;
  font-weight: 900;
}

.panel {
  background: rgba(255, 252, 246, 0.9);
  border: 1px solid #ddd4c6;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 10px 28px rgba(50, 43, 31, 0.055);
}

.purchase-panel h2 {
  margin: 0;
  font-size: var(--font-title);
  line-height: 1.15;
}

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

.full-row {
  grid-column: 1 / -1;
}

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

.section-head h2 {
  margin: 0;
}

.split-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.metric-grid {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

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

.account-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.console-stack {
  display: grid;
  gap: 44px;
  margin-top: 42px;
}

.console-section {
  display: grid;
  gap: 16px;
}

.console-section .section-head {
  margin-bottom: 0;
}

.console-number-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  min-height: 120px;
}

.console-number-list .empty {
  grid-column: 1 / -1;
}

.console-orders-panel {
  padding: 0;
  overflow-x: auto;
}

.console-orders-panel .empty {
  padding: 24px;
}

.metric {
  display: grid;
  gap: 10px;
}

.metric span {
  color: #666;
  font-weight: 800;
}

.metric strong {
  font-size: 28px;
}

.status-pill {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-radius: 999px;
  color: #0f5a43;
  background: #dfeee7;
  font-weight: 900;
}

.compact {
  align-self: start;
}

.form {
  display: grid;
  gap: 16px;
  min-width: 0;
}

label {
  display: grid;
  gap: 8px;
  color: #555;
  font-weight: 800;
}

.field-helper {
  color: #777;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid #d9d0c2;
  border-radius: 8px;
  padding: 0 16px;
  box-sizing: border-box;
  background: white;
  font: inherit;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(15, 90, 67, 0.35);
  outline-offset: 2px;
}

textarea {
  min-height: 112px;
  padding-top: 12px;
  padding-bottom: 12px;
  resize: vertical;
}

.service-picker {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.app-picker {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.app-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #555;
  font-weight: 800;
}

.app-search-toggle {
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #0f5a43;
  font-size: 12px;
  box-shadow: none;
}

.app-search-panel {
  display: grid;
  gap: 6px;
}

.region-picker {
  display: grid;
  gap: 8px;
  color: #555;
  font-weight: 800;
}

.region-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.region-option {
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid #d9d0c2;
  border-radius: 999px;
  background: #fffdf8;
  color: #2d2d2d;
  box-shadow: none;
}

.region-option.selected {
  border-color: #0f5a43;
  background: #0f5a43;
  color: white;
}

.region-option.more {
  background: #eee8dd;
  color: #0f5a43;
}

.quote {
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
  background: #eee8dd;
  border-radius: 8px;
}

.hint,
.empty {
  color: #666;
}

.notice,
.grid,
.account-actions {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}

.account-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-actions.single {
  grid-template-columns: minmax(280px, 520px);
}

.notice {
  padding: 16px 18px;
  background: rgba(255, 252, 246, 0.9);
  border: 1px solid #ddd4c6;
  border-radius: 8px;
}

.notice span,
.notice-body {
  color: #555;
  line-height: 1.7;
}

.home-notice {
  position: relative;
  max-width: 720px;
  margin-top: 24px;
  padding: 26px 22px 19px;
  overflow: hidden;
  border-color: #d8d0c2;
  border-left: 4px solid #0f5a43;
  background: rgba(255, 252, 246, 0.82);
  box-shadow: 0 10px 22px rgba(50, 43, 31, 0.045);
}

.home-notice::before {
  content: "最新公告";
  position: absolute;
  left: 22px;
  top: 10px;
  color: #0f5a43;
  font-size: 12px;
  font-weight: 900;
}

.home-notice strong {
  display: block;
  margin-top: 8px;
  color: #151515;
  font-size: 18px;
  line-height: 1.35;
}

.home-notice span {
  display: block;
  margin-top: 10px;
  color: #5b5650;
  font-size: 15px;
  line-height: 1.7;
}

.payment-layout {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.qr-canvas {
  width: 176px;
  height: 176px;
  padding: 10px;
  background: #fff;
  border: 1px solid #ddd4c6;
  border-radius: 8px;
  box-sizing: border-box;
}

.payment-detail {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.payment-detail p {
  margin: 0;
  display: grid;
  gap: 4px;
}

.payment-detail span {
  color: #666;
  font-size: 13px;
  font-weight: 800;
}

.payment-detail code {
  display: block;
  padding: 10px 12px;
  background: #eee8dd;
  border-radius: 8px;
}

.manual-recharge {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #ddd4c6;
}

.manual-recharge strong {
  font-size: 18px;
}

.manual-recharge span {
  color: #625b52;
  line-height: 1.6;
}

.support-recharge-button {
  min-height: 42px;
  border: 1px solid #9f5b14;
  color: #fffaf2;
  background: #9f5b14;
  box-shadow: 0 12px 28px rgba(159, 91, 20, 0.16);
}

.support-recharge-button:hover {
  background: #874c10;
}

.action {
  color: #151515;
  text-align: left;
  background: rgba(255, 252, 246, 0.9);
  text-decoration: none;
  cursor: pointer;
}

.action span,
.action em {
  display: block;
  color: #666;
  font-style: normal;
  font-size: 14px;
}

.action strong {
  display: block;
  margin: 8px 0;
  font-size: 22px;
}

.number-card {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(360px, 1fr) max-content;
  align-items: center;
  gap: 18px;
  padding: 8px 12px;
  border: 1px solid #ddd4c6;
  border-radius: 8px;
  background: rgba(255, 252, 246, 0.92);
  box-shadow: 0 5px 14px rgba(50, 43, 31, 0.035);
}

.number-main {
  min-width: 0;
}

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

.number-service {
  flex: 1 1 auto;
  min-width: 0;
  color: #625b52;
  font-size: 14px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.number-card strong {
  display: block;
  margin: 0;
  font-size: 19px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.number-detailline {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
  margin-top: 4px;
}

.number-meta {
  flex: 0 0 auto;
  margin: 0;
  color: #555;
  font-size: 13px;
  font-weight: 800;
}

.number-help {
  min-width: 0;
  margin: 0;
  color: #666;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-box {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 14px;
  row-gap: 2px;
  align-self: center;
  align-items: center;
  align-content: center;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  min-height: 50px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #eee8dd;
  font-weight: 900;
}

.code-box span {
  color: #625b52;
  font-size: 13px;
}

.code-box strong {
  margin: 0;
  color: #0b5a43;
  font-size: 19px;
}

.code-box small {
  grid-column: 2;
  min-width: 0;
  color: #625b52;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-box.received small {
  grid-column: 1 / -1;
  white-space: normal;
}

.code-box.received {
  background: #e0f0e9;
}

.code-box.waiting {
  background: #eee8dd;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.number-actions {
  justify-content: flex-end;
  min-width: 206px;
}

.number-actions button {
  min-height: 36px;
  padding: 8px 13px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(140px, 0.8fr)) auto auto;
  gap: 12px;
  align-items: end;
}

.toolbar-panel {
  margin-top: 24px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #ddd4c6;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: #666;
  font-size: 13px;
}

code {
  overflow-wrap: anywhere;
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 20, 20, 0.42);
  z-index: 10;
}

.auth-dialog {
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 24px;
  background: #fffaf2;
  border: 1px solid #ddd4c6;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.dialog-head h2 {
  margin: 0;
  font-size: 26px;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid #d8d0c2;
  border-radius: 999px;
  overflow: hidden;
  margin: 18px 0;
}

.tabs button {
  border-radius: 0;
  background: transparent;
  color: #151515;
}

.tabs button.active {
  background: #0f5a43;
  color: white;
}

.notice-dialog h2 {
  max-width: 560px;
}

.renew-summary {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 16px;
  align-items: baseline;
  padding: 16px;
  border-radius: 8px;
  background: #eee8dd;
}

.release-summary {
  display: grid;
  gap: 8px;
  padding: 15px;
  border: 1px solid #ddd4c6;
  border-radius: 8px;
  background: #eee8dd;
}

.release-summary strong {
  color: #151515;
  font-size: 16px;
}

.release-summary span {
  color: #625b52;
  line-height: 1.6;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.support-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 18;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid rgba(15, 90, 67, 0.18);
  border-radius: 999px;
  color: #fffaf2;
  background: #0f5a43;
  box-shadow: 0 16px 40px rgba(15, 90, 67, 0.18);
  text-decoration: none;
  font-weight: 900;
}

.support-chat-panel {
  position: fixed;
  right: 22px;
  bottom: 78px;
  z-index: 18;
  width: min(360px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid #ddd4c6;
  border-radius: 10px;
  background: #fffaf2;
  box-shadow: 0 24px 70px rgba(50, 43, 31, 0.18);
}

.support-chat-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 16px;
  border-bottom: 1px solid #e6ddcf;
  background: #f6f0e6;
}

.support-chat-head strong,
.support-empty strong {
  display: block;
  color: #151515;
  font-size: 16px;
}

.support-chat-head span,
.support-empty span {
  display: block;
  margin-top: 4px;
  color: #625b52;
  font-size: 13px;
  line-height: 1.55;
}

.support-close {
  min-height: 34px;
  padding: 6px 10px;
  border-color: transparent;
  background: transparent;
  color: #625b52;
}

.support-chat-messages {
  display: grid;
  gap: 10px;
  max-height: 300px;
  overflow: auto;
  padding: 14px 16px;
}

.support-empty {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  background: #eee8dd;
}

.support-message {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #eee8dd;
}

.support-message.staff {
  background: #e0f0e9;
}

.support-message div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #625b52;
  font-size: 12px;
  font-weight: 900;
}

.support-message p {
  margin: 0;
  color: #151515;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.support-chat-form {
  display: grid;
  gap: 10px;
  padding: 14px 16px 16px;
  border-top: 1px solid #e6ddcf;
}

.support-chat-form textarea {
  min-height: 76px;
}

.renew-summary span,
.renew-summary small {
  color: #625b52;
  font-size: 13px;
  font-weight: 800;
}

.renew-summary strong {
  justify-self: end;
  font-size: 24px;
}

.renew-summary small {
  grid-column: 1 / -1;
}

@media (max-width: 860px) {
  .topbar {
    padding: 0 20px;
  }

  nav {
    gap: 12px;
  }

  .two-column {
    grid-template-columns: 1fr;
  }

  .split-head,
  .metric-grid,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .console-number-list {
    grid-template-columns: 1fr;
  }

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

  .number-detailline {
    flex-wrap: wrap;
    gap: 4px 10px;
  }

  .number-help,
  .code-box small {
    white-space: normal;
  }

  .number-actions {
    justify-content: flex-start;
    min-width: 0;
  }

  .split-head {
    display: grid;
    align-items: start;
  }

  .home-layout {
    min-height: auto;
  }

  .home-ambient-layer {
    display: none;
  }

  .home-stage {
    padding: 36px 20px;
  }

  .home-layout .purchase-panel {
    justify-self: stretch;
    width: auto;
  }

  .home-hero-copy {
    transform: none;
  }

  .account-actions {
    grid-template-columns: 1fr;
  }

  .payment-layout {
    grid-template-columns: 1fr;
  }

  .hero h1,
  .hero.small h1 {
    font-size: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-chip {
    animation: none;
    opacity: 0.48;
  }
}
