:root {
  --bg: #ffffff;
  --soft: #f4f6f9;
  --soft-2: #eef1f6;
  --text: #17202e;
  --muted: #8d8f96;
  --line: #dfe5ed;
  --blue: #35aaf4;
  --blue-light: #86c7f3;
  --green: #08a895;
  --danger: #d84d5b;
  --success: #15915b;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app {
  min-height: 100vh;
  padding-bottom: 88px;
}

.hold-badge img,
.pay-logo,
.current-avatar,
.query-avatar,
.result-avatar {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.language-option {
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: transparent;
  color: #222b38;
  font-size: 13px;
  text-align: left;
}

.language-option strong::before {
  content: "";
}

.language-option.active,
.language-option:hover {
  background: #eef7ff;
}

.screen {
  max-width: 760px;
  margin: 0 auto;
  padding: 12px 16px 0;
}

.home-view {
  display: block;
}

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

.user-pill {
  flex: 1 1 auto;
  min-width: 168px;
  max-width: min(100%, 430px);
  min-height: 50px;
  padding: 7px 14px 7px 7px;
  border-radius: 26px;
  display: inline-grid;
  grid-template-columns: 36px minmax(0, 1fr) 10px;
  align-items: center;
  gap: 10px;
  background: var(--soft);
  color: var(--text);
  text-align: left;
}

.current-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #dbeafe;
}

.user-pill-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.user-pill-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 17px;
  line-height: 1.05;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-pill-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pill-chevron,
.chevron {
  width: 10px;
  height: 10px;
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
  border-radius: 2px;
  color: #182231;
  transform: rotate(45deg);
}

.stack {
  display: grid;
  gap: 11px;
}

.soft-card {
  border-radius: 22px;
  background: var(--soft);
}

.hero-card {
  min-height: 96px;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.hold-badge {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: #eef8ff;
  box-shadow: 0 0 0 8px rgba(52, 170, 244, 0.08);
}

.hold-badge img {
  width: 40px;
  height: 40px;
  border-radius: 14px;
}

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

.hero-copy h2 {
  margin: 0 0 5px;
  color: var(--text);
  font-size: 19px;
  line-height: 1.12;
  font-weight: 500;
  letter-spacing: 0;
}

.hero-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.32;
  letter-spacing: 0;
}

.field {
  min-height: 52px;
  padding: 0 10px 0 20px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.input-prefix-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.input-prefix {
  color: var(--muted);
  font-size: 17px;
  font-weight: 700;
}

.query-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #dbeafe;
}

.field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  letter-spacing: 0;
}

.field input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.username-card button {
  min-width: 54px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 17px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.username-card button:disabled,
.buy-btn:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.coupon-card {
  grid-template-columns: auto minmax(0, 1fr);
}

.result-card {
  min-height: 66px;
  padding: 13px 16px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
}

.result-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

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

.eyebrow,
.section-label {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.result-copy h2 {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 17px;
  line-height: 1.1;
}

.result-copy p:last-child,
.result-copy #resultMeta {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
}

.purchase-status {
  width: fit-content;
  max-width: 100%;
  min-height: 22px;
  margin: 7px 0 0;
  padding: 4px 8px;
  border-radius: 7px;
  overflow-wrap: anywhere;
  background: #eef8ff;
  color: var(--blue);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
}

.purchase-status.purchased_active {
  background: #eaf8ef;
  color: #1f8f4d;
}

.purchase-status.expired_repurchase_available {
  background: #fff3e6;
  color: #b56210;
}

.pay-select {
  overflow: hidden;
  border-radius: 22px;
  background: var(--soft);
}

.pay-item {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 12px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.pay-item + .pay-item {
  border-top: 1px solid var(--line);
}

.pay-item.active {
  background: linear-gradient(180deg, #f8faff 0%, #f1f4f8 100%);
}

.pay-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.text-logo {
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.usdt-logo {
  background: #26a17b;
}

.pay-item strong {
  display: block;
  color: var(--text);
  font-size: 17px;
  line-height: 1.04;
  font-weight: 500;
}

.pay-item small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.1;
}

.pay-check {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px #d4dde8;
}

.pay-item.active .pay-check {
  background: var(--blue);
  box-shadow: inset 0 0 0 4px #e8f6ff;
}

.pricing-card {
  overflow: hidden;
  padding: 14px 18px;
}

.price-row {
  min-height: 54px;
  padding-bottom: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.price-row + .price-row {
  border-top: 1px solid var(--line);
  padding-top: 11px;
}

.product-row.active .item-title,
.product-row.active .current {
  color: var(--blue);
}

.item-title {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: 0;
}

.discount {
  height: 18px;
  padding: 0 7px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.duration {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.price {
  text-align: right;
  white-space: nowrap;
}

.current {
  color: var(--text);
  font-size: 17px;
  line-height: 1.12;
  font-weight: 500;
}

.old {
  color: #8f9299;
  font-weight: 400;
  text-decoration: line-through;
}

.invite-page {
  display: grid;
  gap: 11px;
}

.invite-hero {
  margin-bottom: 2px;
}

.invite-badge {
  background: #eef8ff;
}

.invite-stat {
  min-height: 96px;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.invite-stat-item {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.invite-stat-item span,
.invite-link-field > span:first-child {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.invite-stat-item strong {
  flex: 0 0 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  text-align: right;
}

.invite-link-field {
  padding: 14px 16px;
  display: grid;
  gap: 8px;
}

.invite-link-field input {
  width: 100%;
  min-height: 40px;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
}

.invite-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}

.share-button,
.copy-button,
.withdraw-button {
  min-height: 44px;
  border-radius: 22px;
  font-size: 14px;
  font-weight: 800;
}

.share-button,
.withdraw-button {
  background: var(--blue-light);
  color: #fff;
}

.withdraw-button {
  width: 100%;
  display: block;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  text-align: center;
}

.copy-button {
  background: var(--soft);
  color: var(--text);
}

.share-button:disabled,
.copy-button:disabled,
.withdraw-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.invite-message {
  min-height: 18px;
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.invite-message.error {
  color: var(--danger);
}

.invite-message.success {
  color: var(--success);
}

.status-message {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.status-message.error {
  color: var(--danger);
}

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

.buy-area {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 7px 16px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid #e6ebf0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.buy-btn {
  width: min(720px, 100%);
  height: 50px;
  margin: 0 auto;
  border-radius: 25px;
  display: block;
  background: linear-gradient(180deg, var(--blue-light) 0%, #66baf1 100%);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  box-shadow: none;
  transition: background 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.buy-btn.available:not(:disabled) {
  background: linear-gradient(180deg, var(--blue) 0%, #1e90eb 100%);
  box-shadow: 0 12px 24px rgba(53, 170, 244, 0.3);
}

.buy-btn.unavailable,
.buy-btn:disabled {
  background: linear-gradient(180deg, var(--blue-light) 0%, #66baf1 100%);
  box-shadow: none;
}

[hidden] {
  display: none !important;
}

/* Updated single-screen shell */
.app {
  padding-bottom: 88px;
}

.screen {
  padding-top: 16px;
}

.account-row {
  margin-bottom: 18px;
}

/* Collapsed payment selector */
.pay-select {
  transition: box-shadow 0.2s ease;
}

.pay-select:not(.open) .payment-option:not(.active) {
  display: none;
}

.pay-item {
  grid-template-columns: 38px minmax(0, 1fr) 14px 10px;
}

.pay-chevron {
  width: 10px;
  height: 10px;
  display: none;
  border-top: 3px solid #c8d2dd;
  border-right: 3px solid #c8d2dd;
  border-radius: 2px;
  transform: rotate(135deg);
  transition: transform 0.2s ease;
}

.pay-item.active .pay-check {
  display: none;
}

.pay-item.active .pay-chevron {
  display: block;
}

.pay-select.open .pay-item.active .pay-chevron {
  transform: rotate(-45deg);
}

.pay-select.open .payment-option:not(.active) .pay-chevron {
  display: none;
}

.pay-select.open {
  box-shadow: 0 12px 28px rgba(28, 45, 70, 0.06);
}

.usdt-chain-options {
  display: none;
  background: linear-gradient(180deg, #f8faff 0%, #f1f4f8 100%);
}

.pay-select.usdt-active .usdt-chain-options {
  display: block;
}

.usdt-chain-option {
  border-top: 1px solid var(--line);
  padding-left: 28px;
}

.usdt-chain-option.active {
  background: rgba(38, 161, 123, 0.08);
}

.usdt-chain-option.active .pay-check {
  background: #26a17b;
  box-shadow: inset 0 0 0 4px #e8f6ff;
}

.usdt-chain-option.active strong {
  color: #15835f;
}

.terms-row {
  padding: 0 6px 10px;
  margin-top: -2px;
}

.terms-link {
  width: fit-content;
  padding: 0;
  background: transparent;
  color: var(--blue);
  font-size: 15px;
  font-weight: 800;
  text-align: left;
}

/* Mine and sub pages */
.subpage {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  overflow: auto;
  padding-bottom: 88px;
  background: #fff;
}

.subpage.open {
  display: block;
}

.subpage {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.subpage::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.sub-top {
  height: 58px;
  padding: 0 18px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  border-bottom: 1px solid #eef1f4;
  overflow: visible;
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
}

.sub-back {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f3f6fa;
}

.back-icon {
  width: 15px;
  height: 15px;
  margin-left: 4px;
  border-left: 4px solid #17202e;
  border-bottom: 4px solid #17202e;
  border-radius: 2px;
  transform: rotate(45deg);
}

.sub-top h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  text-align: center;
}

.sub-title-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.sub-title-logo img {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: block;
  object-fit: cover;
}

.sub-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 16px;
  overflow: visible;
}

.mine-header {
  min-height: 86px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.mine-avatar {
  width: 46px;
  height: 46px;
}

.mine-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 19px;
  line-height: 1.15;
  font-weight: 800;
}

.mine-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.mine-actions {
  display: grid;
  gap: 12px;
}

.menu-item {
  width: 100%;
  min-height: 84px;
  padding: 14px 16px;
  border-radius: 22px;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  background: linear-gradient(180deg, #f8faff 0%, #f1f5fa 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 12px 28px rgba(28, 45, 70, 0.06);
  color: inherit;
  text-align: left;
  overflow: visible;
}

.menu-item:active {
  transform: scale(0.99);
}

.menu-icon {
  width: 48px;
  height: 48px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 10px 18px rgba(39, 143, 219, 0.2);
}

.menu-icon.status {
  background: linear-gradient(145deg, #37b5f8, #1887e8);
}

.menu-icon.order {
  background: linear-gradient(145deg, #28caa0, #11a37d);
}

.menu-icon.invite {
  background: linear-gradient(145deg, #ffbd59, #ff8a3d);
  box-shadow: 0 10px 18px rgba(255, 138, 61, 0.2);
}

.menu-icon.withdrawal {
  background: linear-gradient(145deg, #8cccf8, #4aa8e6);
  box-shadow: 0 10px 18px rgba(74, 168, 230, 0.2);
}

.menu-icon.language {
  background: linear-gradient(145deg, #8b9cf6, #5265d8);
  box-shadow: 0 10px 18px rgba(82, 101, 216, 0.18);
}

.menu-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-item h3 {
  margin: 0 0 4px;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 17px;
  line-height: 1.15;
  font-weight: 800;
}

.menu-item p {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.menu-side {
  display: inline-flex;
  align-items: center;
  justify-items: end;
  justify-content: flex-end;
  gap: 10px;
  align-self: center;
}

.menu-chip {
  min-width: 46px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e8f7ef;
  color: #15915b;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.menu-side .chevron {
  width: 10px;
  height: 10px;
  border-width: 3px;
  color: #c8d2dd;
}

.language-menu-wrap {
  position: relative;
  justify-self: end;
  flex: 0 0 auto;
  overflow: visible;
}

.language-menu-button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 5px;
  background: #f3f6fa;
  color: var(--blue);
  overflow: hidden;
}

.language-menu-button img {
  width: 32px;
  height: 32px;
  display: block;
  border-radius: 50%;
  object-fit: contain;
}

.language-menu {
  position: fixed;
  top: 58px;
  right: 16px;
  z-index: 80;
  display: none;
  min-width: 136px;
  padding: 7px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 34px rgba(15, 28, 45, 0.16);
  overflow: visible;
}

.language-menu.open {
  display: grid;
  gap: 4px;
}

.language-menu .language-option {
  justify-content: center;
  min-height: 34px;
  font-weight: 800;
  text-align: center;
}

.home-language-menu {
  top: 68px;
}

.language-card {
  display: none !important;
}

.language-inline {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.language-inline .language-option {
  min-height: 34px;
  border-radius: 17px;
  justify-content: center;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.language-inline .language-option.active {
  background: #e8f6ff;
  color: var(--blue);
}

.language-option.active strong::before {
  content: "";
}

.status-list,
.order-list,
.withdrawal-list {
  padding: 4px 18px;
}

.status-item,
.order-item,
.withdrawal-item {
  min-height: 72px;
  padding: 16px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.status-item + .status-item,
.order-item + .order-item,
.withdrawal-item + .withdrawal-item {
  border-top: 1px solid var(--line);
}

.status-name,
.order-name {
  margin: 0 0 5px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.2;
  font-weight: 700;
}

.status-meta,
.order-meta {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.order-item,
.withdrawal-item {
  align-items: start;
}

.order-copy,
.withdrawal-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.order-order-no,
.order-username,
.withdrawal-order-no {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
}

.order-meta-row,
.withdrawal-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.order-status,
.withdrawal-status {
  min-width: 68px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #edf1f5;
  color: #6d7785;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
  text-align: center;
}

.order-status.paid,
.withdrawal-status.approved,
.withdrawal-status.paid {
  background: #e8f7ef;
  color: var(--success);
}

.order-status.callback {
  background: #eaf4ff;
  color: #2578c8;
}

.order-status.failed,
.withdrawal-status.rejected {
  background: #fff1f1;
  color: var(--danger);
}

.order-created-at,
.withdrawal-created-at {
  flex: 1 1 auto;
}

.order-summary {
  min-width: 132px;
  padding: 10px 12px;
  border-radius: 16px;
  display: grid;
  gap: 8px;
  background: var(--soft);
}

.order-summary-row {
  display: grid;
  gap: 2px;
}

.order-summary-label {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
}

.order-summary-value {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 800;
}

.order-summary-value.final {
  color: var(--blue);
}

.order-summary-value.coupon {
  font-size: 12px;
}

.withdrawal-amount {
  color: var(--text);
  font-weight: 800;
  white-space: nowrap;
  align-self: start;
  padding-top: 2px;
  text-align: right;
}

.status-badge {
  min-width: 56px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e8f7ef;
  color: #15915b;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.status-badge.expired,
.status-badge.invalid {
  background: #fff1f1;
  color: #c94242;
}

.loading-state,
.empty-state,
.error-state {
  min-height: 96px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

.error-state {
  color: #c94242;
}

.order-pagination {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(84px, 1fr) auto minmax(84px, 1fr);
  align-items: center;
  gap: 10px;
}

.order-pagination button {
  min-height: 40px;
  border: 0;
  border-radius: 20px;
  background: #17202e;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.order-pagination button:disabled {
  background: #d8e0e8;
  color: #8290a0;
}

.order-pagination span {
  min-width: 72px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

/* Terms bottom sheet */
.terms-sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  background: rgba(18, 28, 42, 0.34);
}

.terms-sheet.open {
  display: block;
}

.terms-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 82vh;
  border-radius: 24px 24px 0 0;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 -18px 45px rgba(18, 28, 42, 0.16);
  transform: translateY(100%);
  transition: transform 0.24s ease;
}

.terms-sheet.open .terms-panel {
  transform: translateY(0);
}

.terms-head {
  min-height: 64px;
  padding: 16px 20px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: start;
  gap: 12px;
  border-bottom: 1px solid #eef1f4;
}

.terms-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.24;
  font-weight: 800;
}

.terms-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.terms-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f3f6fa;
  color: #556170;
  font-size: 24px;
  line-height: 1;
}

.terms-body {
  max-height: calc(82vh - 66px);
  overflow: auto;
  padding: 18px 20px 30px;
  color: #293342;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-line;
}

.withdrawal-panel {
  overflow: visible;
}

.withdrawal-body {
  padding: 18px 20px 24px;
  display: grid;
  gap: 14px;
}

.withdrawal-field {
  min-height: 78px;
  padding: 13px 16px;
  border-radius: 20px;
  display: grid;
  gap: 8px;
  background: var(--soft);
}

.withdrawal-field span,
.withdrawal-balance {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.withdrawal-field input {
  width: 100%;
  min-height: 32px;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
}

.withdrawal-field input::placeholder {
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
  opacity: 1;
}

.withdrawal-balance strong {
  color: var(--text);
  font-size: 14px;
}

.withdrawal-message {
  min-height: 18px;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.withdrawal-message.error {
  color: var(--danger);
}

.withdrawal-message.success {
  color: var(--success);
}

.withdrawal-actions {
  display: grid;
  grid-template-columns: minmax(108px, auto) minmax(0, 1fr);
  gap: 9px;
}

.payment-detail-sheet {
  z-index: 65;
}

.payment-detail-panel {
  max-height: min(92vh, 720px);
  display: flex;
  flex-direction: column;
}

.payment-detail-body {
  min-height: 0;
  overflow-y: auto;
  padding: 16px 20px calc(42px + env(safe-area-inset-bottom));
}

.payment-detail-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.payment-detail-row {
  min-height: 46px;
  padding: 11px 14px;
  border-radius: 16px;
  display: grid;
  grid-template-columns: minmax(86px, auto) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  background: var(--soft);
}

.payment-detail-row dt,
.payment-detail-row dd {
  margin: 0;
}

.payment-detail-row dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.payment-detail-row dd {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  text-align: right;
  overflow-wrap: anywhere;
}

.payment-detail-row dd.copy-value {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.payment-qr-card {
  padding: 16px;
  border-radius: 16px;
  display: grid;
  justify-items: center;
  gap: 10px;
  background: var(--soft);
}

.payment-qr-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.payment-qr-card canvas {
  width: 180px;
  height: 180px;
  max-width: 100%;
  border: 10px solid #fff;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(23, 32, 46, 0.08);
}

.inline-copy {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  background: #17202e;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.coupon-status {
  display: inline-block;
  justify-self: end;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 7px;
  background: #f0f3f7;
  color: #6b7280;
  white-space: normal;
  text-align: right;
}

.coupon-status.applied {
  background: #eaf8ef;
  color: #1f8f4d;
}

.coupon-status.used,
.coupon-status.invalid {
  background: #fff3e6;
  color: #b56210;
}

.payment-detail-row.final {
  background: linear-gradient(180deg, #edf8ff 0%, #e5f4ff 100%);
}

.payment-detail-row.final dd {
  color: #1687d9;
  font-size: 18px;
}

.payment-go-button {
  width: 100%;
  min-height: 52px;
  margin-top: 14px;
  border-radius: 26px;
  font-size: 17px;
}

.notice-sheet {
  z-index: 70;
}

.notice-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(calc(100% - 32px), 360px);
  padding: 22px 20px 20px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 24px 56px rgba(18, 28, 42, 0.2);
  transform: translate(-50%, calc(-50% + 20px)) scale(0.96);
  transition: transform 0.24s ease, opacity 0.24s ease;
  opacity: 0;
  text-align: center;
}

.notice-sheet.open .notice-panel {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.debug-guard-sheet {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(18, 28, 42, 0.72);
  pointer-events: auto;
}

.debug-guard-sheet.open {
  display: grid;
}

.debug-guard-panel {
  width: min(100%, 360px);
  padding: 28px 22px 24px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
  color: var(--text);
  text-align: center;
}

.debug-guard-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #fff1f2;
  color: var(--danger);
  font-size: 30px;
  font-weight: 900;
}

.debug-guard-panel h2 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.25;
}

.debug-guard-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.notice-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f3f6fa;
  color: #556170;
  font-size: 22px;
  line-height: 1;
}

.notice-icon {
  width: 72px;
  height: 72px;
  margin: 4px auto 16px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #eaf7ff 0%, #d8efff 100%);
}

.notice-icon span {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  position: relative;
  display: block;
  background: linear-gradient(180deg, var(--blue) 0%, #1e90eb 100%);
  box-shadow: 0 10px 22px rgba(53, 170, 244, 0.24);
}

.notice-icon span::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 11px;
  width: 10px;
  height: 18px;
  border-right: 4px solid #fff;
  border-bottom: 4px solid #fff;
  transform: rotate(40deg);
}

.notice-panel h2 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  line-height: 1.25;
  font-weight: 800;
}

.notice-text {
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.notice-button {
  width: 100%;
  min-height: 48px;
  border-radius: 24px;
}

.buy-area {
  padding-top: 10px;
}

@media (max-width: 620px) {
  .screen {
    padding-left: 14px;
    padding-right: 14px;
  }

  .account-row {
    margin-bottom: 14px;
  }

  .user-pill {
    min-width: 156px;
    min-height: 48px;
    grid-template-columns: 34px minmax(0, 1fr) 10px;
    gap: 9px;
  }

  .withdrawal-item {
    gap: 10px;
  }

  .order-item {
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) 124px;
  }

  .order-summary {
    min-width: 124px;
    padding: 10px;
  }

  .order-summary-value {
    font-size: 12px;
  }

  .withdrawal-order-no {
    font-size: 12px;
  }

  .order-status,
  .withdrawal-status {
    min-width: 64px;
  }

  .payment-detail-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .payment-detail-row {
    grid-template-columns: minmax(72px, auto) minmax(0, 1fr);
    gap: 10px;
    padding: 11px 12px;
  }

  .payment-detail-row dd {
    font-size: 13px;
  }

  .current-avatar {
    width: 34px;
    height: 34px;
  }

  .user-pill-copy strong {
    font-size: 16px;
  }

  .hero-card {
    min-height: 92px;
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 13px;
    padding: 15px 18px;
  }

  .hold-badge {
    width: 60px;
    height: 60px;
    border-radius: 19px;
  }

  .hold-badge img {
    width: 38px;
    height: 38px;
  }

  .hero-copy h2 {
    font-size: 18px;
  }

  .hero-copy p {
    font-size: 13px;
  }

  .field {
    min-height: 50px;
    padding-left: 18px;
  }

  .field input,
  .input-prefix {
    font-size: 16px;
  }

  .username-card button {
    min-width: 52px;
    min-height: 31px;
    padding: 0 11px;
    font-size: 13px;
  }

  .pay-item {
    min-height: 52px;
    grid-template-columns: 36px minmax(0, 1fr) 14px;
    gap: 11px;
    padding: 0 15px;
  }

  .pay-logo {
    width: 36px;
    height: 36px;
  }

  .pay-item strong,
  .item-title,
  .current {
    font-size: 16px;
  }

  .pay-item small,
  .duration {
    font-size: 13px;
  }

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

  .pricing-card {
    padding: 13px 16px;
  }

  .buy-area {
    padding-left: 14px;
    padding-right: 14px;
  }

  .buy-btn {
    height: 48px;
    font-size: 17px;
  }
}

@media (max-width: 380px) {
  .hero-card {
    grid-template-columns: 54px minmax(0, 1fr);
    padding: 14px;
  }

  .hold-badge {
    width: 54px;
    height: 54px;
    border-radius: 17px;
  }

  .hold-badge img {
    width: 34px;
    height: 34px;
  }

  .hero-copy h2 {
    font-size: 17px;
  }

  .hero-copy p {
    font-size: 12px;
  }

  .price-row {
    grid-template-columns: 1fr;
  }

  .price {
    text-align: left;
  }
}

/* Final responsive overrides for the updated layout. */
.pay-item {
  grid-template-columns: 38px minmax(0, 1fr) 14px 10px;
}

.mine-avatar {
  width: 46px;
  height: 46px;
}

@media (max-width: 620px) {
  .pay-item {
    grid-template-columns: 36px minmax(0, 1fr) 14px 10px;
  }

  .sub-content {
    padding-left: 14px;
    padding-right: 14px;
  }

  .menu-item {
    min-height: 80px;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 13px 14px;
  }

  .menu-chip {
    min-width: 42px;
    padding-left: 7px;
    padding-right: 7px;
    font-size: 12px;
  }
}

@media (max-width: 420px) {
  .menu-item {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .menu-side {
    gap: 8px;
  }

  .menu-chip {
    min-width: 38px;
    padding: 4px 7px;
  }
}
