/* Self-hosted boutique Latin & Mono fonts (zero external CDN latency) */
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2-variations"),
       url("/fonts/inter-latin.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-500.woff2") format("woff2");
}

:root {
  --bg: #f7f3eb;
  --surface: rgba(255, 253, 248, 0.94);
  --surface-solid: #fffdf8;
  --surface-soft: #f6f0e6;
  --surface-2: rgba(244, 238, 228, 0.72);
  --ink: #211f1b;
  --ink-2: #6d6456;
  --ink-3: #9e9485;
  --muted: #9e9485;
  --brd: rgba(54, 47, 37, 0.12);
  --brd-2: rgba(54, 47, 37, 0.22);
  --border: rgba(54, 47, 37, 0.12);
  --border-strong: rgba(54, 47, 37, 0.22);
  --primary: #9b7650;
  --primary-hover: #876443;
  --primary-deep: #6d4f35;
  --primary-light: #b6906a;
  --primary-soft: rgba(155, 118, 80, 0.13);
  --primary-on: #ffffff;
  --ok: #257a5a;
  --ok-bg: rgba(47, 143, 107, 0.09);
  --ok-brd: rgba(47, 143, 107, 0.24);
  --warn: #b37112;
  --warn-bg: rgba(184, 117, 20, 0.1);
  --warn-brd: rgba(184, 117, 20, 0.28);
  --err: #bc392c;
  --err-bg: rgba(192, 57, 43, 0.08);
  --err-brd: rgba(192, 57, 43, 0.22);
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", Georgia, serif;
  --font-sans: "Inter Variable", "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

html.dark {
  --bg: #11100e;
  --surface: rgba(31, 28, 24, 0.94);
  --surface-solid: #1f1c18;
  --surface-soft: #26211c;
  --surface-2: rgba(40, 35, 29, 0.8);
  --ink: #fbf6ee;
  --ink-2: #cfc2af;
  --ink-3: #8f8474;
  --muted: #8f8474;
  --brd: rgba(236, 223, 202, 0.12);
  --brd-2: rgba(236, 223, 202, 0.24);
  --border: rgba(236, 223, 202, 0.12);
  --border-strong: rgba(236, 223, 202, 0.24);
  --primary: #d6b07a;
  --primary-hover: #e2be8b;
  --primary-deep: #f0d2a2;
  --primary-light: #b58a52;
  --primary-soft: rgba(214, 176, 122, 0.15);
  --primary-on: #17120e;
  --ok: #4ec497;
  --ok-bg: rgba(78, 196, 151, 0.12);
  --ok-brd: rgba(78, 196, 151, 0.28);
  --warn: #eab052;
  --warn-bg: rgba(234, 176, 82, 0.12);
  --warn-brd: rgba(234, 176, 82, 0.28);
  --err: #f07b6e;
  --err-bg: rgba(240, 123, 110, 0.12);
  --err-brd: rgba(240, 123, 110, 0.28);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-feature-settings: "cv11", "ss01";
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.28s ease, color 0.28s ease;
}

/* Boutique Ambient Backdrop (matching redeem.yunpaycard.com: breathing warm orb + ultra-fine film grain) */
.page-bg {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
  background: var(--bg);
}
.lux-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.lux-orb {
  position: absolute;
  top: -330px;
  left: calc(50% - 520px);
  width: 1040px;
  height: 650px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(155, 118, 80, 0.26), transparent 74%);
  opacity: 0.56;
  will-change: transform, opacity;
  animation: luxBreatheLight 14s ease-in-out infinite alternate;
}
html.dark .lux-orb {
  background: radial-gradient(closest-side, rgba(214, 176, 122, 0.18), transparent 74%);
  opacity: 0.52;
}
.lux-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
@keyframes luxBreatheLight {
  0% { opacity: 0.44; transform: scale(1); }
  100% { opacity: 0.64; transform: scale(1.06); }
}

a {
  color: var(--primary);
  text-decoration: none;
  text-underline-offset: 3px;
}
a:hover { text-decoration: underline; }

/* Top-Right Quiet Theme Toggle */
.lux-tools {
  position: absolute;
  top: 24px;
  right: clamp(18px, 4vw, 44px);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-toggle {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-2);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.icon-toggle:hover {
  color: var(--ink);
  background: rgba(155, 118, 80, 0.09);
  border-color: var(--brd);
}
.icon-toggle svg { width: 18px; height: 18px; }

/* Main Centered Shell — Boutique 680px proportion matching redeem.yunpaycard.com */
.lux-shell {
  width: min(680px, 100% - 32px);
  margin: 0 auto;
  padding: clamp(50px, 7vh, 78px) 0 64px;
  display: flex;
  flex-direction: column;
}
.ops-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 20px 64px;
}

/* Brand Hero & Exact GPT Squircle Emblem */
.brand-head {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: luxRise 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.gpt-emblem {
  width: 56px;
  height: 56px;
  border-radius: 17px;
  background: linear-gradient(145deg, #3c2f25 0%, #5c4532 52%, #8b6643 100%);
  color: #ffffff;
  display: grid;
  place-items: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 16px 34px -16px rgba(138, 98, 61, 0.65);
}
.gpt-emblem svg {
  width: 27px;
  height: 27px;
  display: block;
}
.gpt-emblem-sm {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 6px 14px -6px rgba(68,44,22,.4);
}
.gpt-emblem-sm svg { width: 17px; height: 17px; }

.brand-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4.4vw, 44px);
  font-weight: 600;
  letter-spacing: 0.08em;
  margin: 24px 0 0;
  padding-bottom: 0.06em;
  line-height: 1.15;
  color: transparent;
  background: linear-gradient(175deg, var(--ink) 40%, color-mix(in srgb, var(--ink) 55%, var(--primary)));
  -webkit-background-clip: text;
  background-clip: text;
}
.brand-sub {
  color: var(--ink-3);
  font-size: 13px;
  letter-spacing: 0.16em;
  margin: 12px 0 0;
  line-height: 1.7;
}

/* Iconic Breathing Champagne 4-Step Stepper */
.stepper {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 40px 0 32px;
  padding: 0;
  list-style: none;
}
.stepper::before {
  content: "";
  position: absolute;
  top: 19px;
  left: 12.5%;
  right: 12.5%;
  height: 1px;
  background: var(--brd-2);
  z-index: 0;
}
.stepper-fill {
  position: absolute;
  top: 18.5px;
  left: 12.5%;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--primary-deep), var(--primary));
  box-shadow: 0 0 14px rgba(155, 118, 80, 0.45);
  border-radius: 2px;
  z-index: 1;
  transition: width 0.75s cubic-bezier(0.65, 0, 0.35, 1);
}
.step-item {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  user-select: none;
}
.step-dot {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--brd-2);
  background: var(--surface-solid);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  color: var(--ink-3);
  transition: color 0.35s, border-color 0.35s, background 0.35s, box-shadow 0.35s, transform 0.4s;
}
.step-label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  transition: color 0.35s;
}
/* Breathing Champagne Active Step Dot */
.step-item.active .step-dot {
  --lux-breath: color-mix(in srgb, var(--primary) 78%, #e9b872);
  border-width: 1px;
  border-color: color-mix(in srgb, var(--lux-breath) 70%, var(--surface-solid));
  color: var(--primary);
  background:
    linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.75) 46%, transparent 62%) -120% 0 / 250% 100% no-repeat,
    radial-gradient(circle at 32% 26%, #ffffff 0%, rgba(255, 255, 255, 0.85) 18%, transparent 48%),
    linear-gradient(150deg, #fffaf2 20%, #f7ead7 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -2px 5px -2px rgba(155, 118, 80, 0.28),
    0 6px 14px -8px rgba(155, 118, 80, 0.55);
  animation: luxSilk 5.4s ease-in-out 1s infinite;
}
html.dark .step-item.active .step-dot {
  background:
    linear-gradient(115deg, transparent 30%, rgba(255, 244, 222, 0.22) 46%, transparent 62%) -120% 0 / 250% 100% no-repeat,
    radial-gradient(circle at 34% 28%, rgba(214, 176, 122, 0.3), transparent 50%),
    var(--surface-solid);
  border-color: rgba(214, 176, 122, 0.68);
}
.step-item.active .step-dot::after {
  content: "";
  position: absolute;
  inset: -12px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(196, 154, 102, 0.32) 52%, rgba(196, 154, 102, 0.1) 78%, transparent);
  animation: luxBreathFine 4s ease-in-out infinite;
}
.step-item.active .step-dot::before {
  content: "";
  position: absolute;
  inset: -24px;
  z-index: -2;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(196, 154, 102, 0.12), transparent 80%);
  animation: luxBreathFine 4s ease-in-out 0.6s infinite;
}
.step-item.active .step-label { color: var(--primary); }

.step-item.done .step-dot {
  border-color: transparent;
  color: var(--primary-on);
  background: linear-gradient(145deg, color-mix(in srgb, var(--primary) 80%, var(--ink)), var(--primary));
  box-shadow: 0 10px 22px -10px rgba(155, 118, 80, 0.72);
}
.step-item.done .step-label { color: var(--ink-2); }

@keyframes luxBreathFine {
  0%, 100% { opacity: 0.5; transform: scale(0.94); }
  50% { opacity: 1; transform: scale(1.05); }
}
@keyframes luxSilk {
  0%, 55% { background-position: -120% 0, 0 0, 0 0; }
  100% { background-position: 220% 0, 0 0, 0 0; }
}
@keyframes luxRise {
  0% { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: none; }
}
@keyframes luxCardIn {
  0% { opacity: 0; transform: translateY(22px) scale(0.985); }
  100% { opacity: 1; transform: none; }
}

/* Boutique Porcelain Main Card */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--brd);
  border-radius: 26px;
  padding: 40px 44px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 1px 2px rgba(33, 31, 27, 0.04),
    0 34px 80px -44px rgba(33, 31, 27, 0.30);
  animation: luxCardIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
  overflow: hidden;
}
html.dark .card {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 34px 80px -40px rgba(0, 0, 0, 0.72);
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(460px circle at var(--spot-x, 50%) var(--spot-y, 0%), rgba(155, 118, 80, 0.075), transparent 64%);
  opacity: var(--spot-o, 0);
  transition: opacity 0.45s ease;
}
.card > * { position: relative; z-index: 1; }

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.card-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin: 0;
  color: var(--ink);
  line-height: 1.25;
}
.card-desc {
  color: var(--ink-2);
  font-size: 13px;
  letter-spacing: 0.02em;
  margin: 10px 0 0;
  line-height: 1.85;
}
.card-desc a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--primary) 42%, transparent);
  text-underline-offset: 3px;
  font-weight: 500;
}
.card-desc a:hover { text-decoration-color: var(--primary); }

/* Inputs & Textarea */
.field-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  color: var(--ink);
}
.input, .textarea, .select {
  width: 100%;
  border: 1px solid var(--brd-2);
  background: var(--surface-solid);
  border-radius: 14px;
  padding: 0 18px;
  min-height: 50px;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  box-shadow: inset 0 1px 2px rgba(33, 31, 27, 0.04);
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
  font-family: inherit;
}
.input::placeholder, .textarea::placeholder {
  color: var(--ink-3);
  opacity: 0.85;
}
.textarea {
  min-height: 158px;
  padding: 16px 20px;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  word-break: break-all;
}
.input:hover, .textarea:hover, .select:hover {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--brd-2));
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--primary);
  background: var(--surface-solid);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

/* Instant Session Parsed Indicator Bar */
.session-detect {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  border: 1px solid var(--brd);
  background: var(--surface-2);
  color: var(--ink-2);
}
.session-detect.is-ok {
  border-color: var(--ok-brd);
  background: var(--ok-bg);
  color: var(--ok);
}
.session-detect.is-warn {
  border-color: var(--warn-brd);
  background: var(--warn-bg);
  color: var(--warn);
}
.link-clear {
  border: none;
  background: transparent;
  color: inherit;
  opacity: 0.72;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: opacity 0.15s, background 0.15s;
}
.link-clear:hover { opacity: 1; background: rgba(0, 0, 0, 0.05); }

/* Tactile Luxury Buttons (matching redeem.yunpaycard.com .minimal-primary / .minimal-secondary) */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: none;
  border-radius: 14px;
  padding: 0 22px;
  min-height: 54px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s, background-position 0.55s, border-color 0.22s, color 0.22s, opacity 0.25s;
  text-decoration: none !important;
  overflow: hidden;
  white-space: nowrap;
}
.btn-primary {
  color: var(--primary-on);
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 78%, var(--ink)) 0%, var(--primary) 55%, color-mix(in srgb, var(--primary) 80%, #ffffff) 100%);
  background-size: 160% 100%;
  background-position: 0 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 14px 30px -16px rgba(155, 118, 80, 0.78);
}
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skew(-20deg);
  transition: left 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.btn-primary:hover:not(:disabled) {
  background-position: 100% 0;
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 22px 40px -18px rgba(155, 118, 80, 0.85);
}
.btn-primary:hover:not(:disabled)::after { left: 130%; }
.btn-primary:active:not(:disabled) { transform: translateY(0) scale(0.985); transition-duration: 0.1s; }
.btn-primary:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
  transform: none !important;
}
.btn-primary.is-busy:disabled { opacity: 0.84; }

.btn-secondary {
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--brd-2);
  letter-spacing: 0.08em;
  font-weight: 500;
}
.btn-secondary:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--brd);
  letter-spacing: 0.05em;
  font-weight: 500;
}
.btn-ghost:hover:not(:disabled) {
  border-color: var(--brd-2);
  color: var(--ink);
  background: var(--surface-2);
}
.btn-danger { background: linear-gradient(135deg, #a82e24, #c54036); color: #fff; letter-spacing: 0.06em; }
.btn-ok { background: linear-gradient(135deg, #1d6d4d, #2b8e67); color: #fff; letter-spacing: 0.08em; box-shadow: 0 12px 24px -14px rgba(37, 122, 90, 0.7); }
.btn-sm { padding: 0 14px; min-height: 36px; font-size: 12.5px; border-radius: 10px; letter-spacing: 0.04em; }
.btn-block { width: 100%; }

/* Dual Action Footer (Back + Primary) matching redeem.yunpaycard.com */
.action-footer {
  display: grid;
  grid-template-columns: minmax(128px, 0.35fr) 1fr;
  gap: 12px;
  margin-top: 22px;
}

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Bottom Floating Shortcut Dock (matching redeem.yunpaycard.com .lux-nav) */
.lux-dock {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
  animation: luxRise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}
.lux-dock-item {
  border: 1px solid var(--brd);
  min-height: 50px;
  color: var(--ink-2);
  background: color-mix(in srgb, var(--surface-solid) 60%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s, color 0.22s, background 0.22s, box-shadow 0.35s;
}
.lux-dock-item svg { width: 16px; height: 16px; flex: none; opacity: 0.85; }
.lux-dock-item:hover {
  border-color: color-mix(in srgb, var(--primary) 50%, var(--brd-2));
  color: var(--primary);
  background: var(--surface);
  box-shadow: 0 14px 28px -18px rgba(155, 118, 80, 0.55);
  transform: translateY(-2px);
}
.lux-dock-item.active {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--brd));
  color: var(--primary);
  background: var(--surface);
  font-weight: 600;
}

/* Soft Glass Alerts & Badges */
.alert {
  border-radius: 13px;
  padding: 13px 16px;
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: 0.02em;
  margin-bottom: 18px;
  border: 1px solid transparent;
}
.alert-ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-brd); }
.alert-warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-brd); }
.alert-err { background: var(--err-bg); color: var(--err); border-color: var(--err-brd); }
.alert-info { background: var(--primary-soft); color: var(--ink-2); border-color: color-mix(in srgb, var(--primary) 24%, var(--brd)); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--primary-soft);
  color: var(--primary-deep);
}
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-err { background: var(--err-bg); color: var(--err); }
.badge-gray { background: var(--surface-2); color: var(--ink-2); }

/* Seamless Hairline-Divided 2x2 Summary Grid (matching redeem.yunpaycard.com .minimal-result-summary) */
.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--brd);
  border: 1px solid var(--brd);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 18px;
}
.meta-grid > div {
  background: color-mix(in srgb, var(--surface-soft) 58%, var(--surface-solid));
  padding: 15px 18px;
  min-width: 0;
}
.meta-k {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.meta-v {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  word-break: break-word;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

/* Plan Cards */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 11px;
  margin: 10px 0 22px;
}
.plan-card {
  position: relative;
  border: 1px solid var(--brd-2);
  border-radius: 16px;
  padding: 18px 18px 16px;
  cursor: pointer;
  background: var(--surface-solid);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s, box-shadow 0.25s, background 0.2s;
}
.plan-card:hover {
  border-color: color-mix(in srgb, var(--primary) 60%, var(--brd-2));
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -18px rgba(107, 73, 43, 0.32);
}
.plan-card.selected {
  border-color: var(--primary);
  background: linear-gradient(180deg, var(--surface-solid) 0%, color-mix(in srgb, var(--primary-soft) 45%, var(--surface-solid)) 100%);
  box-shadow: 0 0 0 3px var(--primary-soft), 0 14px 28px -18px rgba(107, 73, 43, 0.36);
}
.plan-check {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--brd-2);
  display: grid;
  place-items: center;
  font-size: 11px;
  color: transparent;
  transition: all 0.18s;
}
.plan-card.selected .plan-check {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-on);
}
.plan-name { font-size: 14.5px; font-weight: 600; letter-spacing: 0.03em; margin-bottom: 10px; color: var(--ink); }
.plan-price-cny {
  font-size: 25px;
  font-weight: 700;
  color: var(--primary-deep);
  line-height: 1.12;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.plan-price-usd {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--ink-2);
  margin-top: 5px;
}
.plan-sub {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px dashed var(--brd);
}

/* Payment Channel Cards with Crisp SVG Icons */
.pay-methods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 18px;
}
.pay-opt {
  border: 1px solid var(--brd-2);
  border-radius: 14px;
  padding: 13px 13px;
  cursor: pointer;
  background: var(--surface-solid);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pay-opt:hover { border-color: color-mix(in srgb, var(--primary) 55%, var(--brd-2)); }
.pay-opt.selected {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary-soft) 42%, var(--surface-solid));
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.pay-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.pay-ico svg { width: 18px; height: 18px; }
.pay-ico-bal { background: var(--primary-soft); color: var(--primary); }
.pay-ico-ali { background: rgba(22, 119, 255, 0.1); color: #1677ff; }
.pay-ico-usdt { background: rgba(14, 159, 110, 0.11); color: #14966e; }
.pay-opt-title { font-weight: 600; font-size: 13.5px; color: var(--ink); line-height: 1.25; }
.pay-opt-sub { font-size: 11px; color: var(--ink-3); margin-top: 2px; line-height: 1.35; }

.yunshu-box {
  background: var(--surface-2);
  border: 1px solid var(--brd);
  border-radius: 15px;
  padding: 16px 18px;
  margin-bottom: 16px;
}

/* Step 3 Payment Hero Panel */
.pay-hero {
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary-soft) 32%, var(--surface-solid)) 0%, color-mix(in srgb, var(--primary-soft) 55%, var(--surface-solid)) 100%);
  border: 1px solid color-mix(in srgb, var(--primary) 26%, var(--brd));
  border-radius: 18px;
  padding: 22px 24px;
  margin-bottom: 18px;
}
.pay-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px dashed color-mix(in srgb, var(--primary) 28%, var(--brd));
}
.pay-amount-big {
  font-size: 30px;
  font-weight: 700;
  color: var(--primary-deep);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warn);
  display: inline-block;
  animation: luxPulse 1.8s ease-out infinite;
}
@keyframes luxPulse {
  0% { box-shadow: 0 0 0 0 rgba(184, 117, 20, 0.48); }
  80%, 100% { box-shadow: 0 0 0 7px rgba(184, 117, 20, 0); }
}

.code-pill {
  font-family: var(--font-mono);
  background: var(--surface-2);
  border: 1px solid var(--brd);
  color: var(--ink);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
  word-break: break-all;
}

/* Boutique Hairline Timeline (matching redeem.yunpaycard.com .minimal-timeline) */
.timeline-box {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--brd);
}
.timeline {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}
.timeline li {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--brd);
  font-size: 12.5px;
  color: var(--ink-2);
}
.timeline li:last-child { border-bottom: none; padding-bottom: 2px; }
.timeline li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
}
.timeline-time {
  color: var(--ink-3);
  font-size: 11.5px;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.foot-note {
  text-align: center;
  font-size: 12px;
  color: var(--ink-3);
  margin: 18px 0 0;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

/* Guide Modal (matching redeem.yunpaycard.com .minimal-modal) */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(25, 20, 15, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 60;
}
.modal-box {
  position: relative;
  background: var(--surface-solid);
  border: 1px solid var(--brd);
  border-radius: 24px;
  max-width: 540px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: 0 28px 80px rgba(25, 20, 15, 0.28);
}
.ops-modal-box { max-width: 840px; }
.guide-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  gap: 10px;
}
.guide-list li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--brd);
  background: var(--surface-2);
}
.guide-num {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--primary);
  padding-top: 2px;
}
.guide-list strong {
  display: block;
  font-size: 13.5px;
  color: var(--ink);
  margin-bottom: 4px;
}
.guide-list small {
  display: block;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.65;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: rgba(33, 31, 27, 0.92);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
  opacity: 0;
  pointer-events: none;
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 999;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.hidden { display: none !important; }
.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.72s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Ops Console Styling */
#opsLoginView .brand-head { margin-bottom: 24px; }
#opsMainView .card { padding: 28px 32px; margin-bottom: 20px; animation: none; }
.ops-bar {
  background: color-mix(in srgb, var(--surface-solid) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--brd);
  padding: 11px 20px;
  position: sticky;
  top: 0;
  z-index: 30;
}
.ops-bar-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ops-nav { display: flex; gap: 3px; flex-wrap: wrap; }
.ops-nav button {
  border: 1px solid transparent;
  background: transparent;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.ops-nav button:hover:not(.active) { background: var(--primary-soft); color: var(--ink); }
.ops-nav button.active {
  background: var(--primary-soft);
  color: var(--primary-deep);
  border-color: color-mix(in srgb, var(--primary) 26%, transparent);
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.kpi-card {
  background: var(--surface-solid);
  border: 1px solid var(--brd);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 8px 24px -18px rgba(33, 31, 27, 0.16);
}
.kpi-label { font-size: 12px; color: var(--ink-3); margin-bottom: 6px; letter-spacing: 0.04em; }
.kpi-val { font-size: 26px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12px; color: var(--ink-2); margin-top: 6px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--brd); white-space: nowrap; }
th { color: var(--ink-3); font-weight: 600; font-size: 12px; background: var(--surface-2); }
tr:hover td { background: color-mix(in srgb, var(--surface-soft) 50%, transparent); }
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

@media (max-width: 640px) {
  .lux-shell { width: calc(100% - 24px); padding: 48px 0 52px; }
  .brand-title { font-size: 30px; margin-top: 18px; }
  .brand-sub { font-size: 12px; letter-spacing: 0.1em; }
  .stepper { margin: 28px 0 24px; }
  .step-dot { width: 34px; height: 34px; font-size: 12px; }
  .stepper::before { top: 17px; }
  .stepper-fill { top: 16.5px; }
  .step-label { font-size: 11px; letter-spacing: 0.04em; }
  .card { padding: 26px 20px; border-radius: 22px; }
  .meta-grid { grid-template-columns: 1fr; }
  .pay-methods { grid-template-columns: 1fr; }
  .action-footer { grid-template-columns: 1fr; }
  .lux-dock { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .lux-orb, .brand-head, .card, .lux-dock, .step-item.active .step-dot, .step-item.active .step-dot::before, .step-item.active .step-dot::after, .pulse-dot {
    animation: none !important;
  }
}
