
  :root {
    --g1: #4338ca; --g2: #3b82f6;
    --grad: linear-gradient(135deg, #4338ca, #3b82f6);
    --acc: #4338ca; --acc-tx: #4338ca;
    --accsoft: rgba(67, 56, 202, .1); --accline: rgba(67, 56, 202, .22);
    --bg: #fbfcfe; --card: #ffffff;
    --soft: #f4f5f9; --soft2: #eceef4;
    --bd: #ebedf3; --bd2: #dfe2ea;
    --t1: #171a21; --t2: #59606f; --t3: #98a0af;
    --su: #059669; --su-bg: rgba(5,150,105,.12); --su-tx: #0f7c43;
    --wa: #e0912a; --wa-bg: rgba(224,145,42,.14); --wa-tx: #a76a12;
    --er: #e5484d; --er-bg: rgba(229,72,77,.11); --er-tx: #c62a35;
    --shadow-card: 0 30px 70px -26px rgba(40,55,110,.26), 0 2px 8px rgba(40,55,110,.05);
    --shadow-sm: 0 6px 18px -10px rgba(40,55,110,.28);
    --r-card: 24px; --r-soft: 18px; --r-field: 14px; --r-btn: 999px;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  }
  html.dark {
    --g1: #6366f1; --g2: #38bdf8;
    --grad: linear-gradient(135deg, #6366f1, #38bdf8);
    --acc: #818cf8; --acc-tx: #a5b4fc;
    --accsoft: rgba(99,102,241,.16); --accline: rgba(99,102,241,.32);
    --bg: #0c0e15; --card: #151824;
    --soft: #1b1f2c; --soft2: #242a39;
    --bd: #272d3c; --bd2: #38404f;
    --t1: #eceef4; --t2: #a2a9b8; --t3: #6f7788;
    --su: #34d399; --su-bg: rgba(52,211,153,.15); --su-tx: #6ee7b7;
    --wa: #fbbf24; --wa-bg: rgba(251,191,36,.16); --wa-tx: #fcd34d;
    --er: #f87171; --er-bg: rgba(248,113,113,.16); --er-tx: #fca5a5;
    --shadow-card: 0 34px 80px -30px rgba(0,0,0,.7);
    --shadow-sm: 0 8px 22px -12px rgba(0,0,0,.6);
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  html { scroll-behavior: smooth; color-scheme: light; }
  html.dark { color-scheme: dark; }
  body {
    background: var(--bg); color: var(--t1);
    font-family: var(--sans); line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    transition: background .25s, color .25s;
    background-image:
      radial-gradient(34% 34% at 84% -2%, var(--accsoft), transparent 72%),
      radial-gradient(30% 32% at 2% 6%, rgba(59,130,246,.1), transparent 72%);
    background-repeat: no-repeat;
    padding-bottom: 56px;
  }
  ::selection { background: var(--accsoft); }
  .wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }

  .topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 2px;
  }
  .brandbox { display: flex; align-items: center; gap: 11px; }
  .logo {
    width: 42px; height: 42px; border-radius: 13px;
    background: var(--grad); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 18px;
    box-shadow: 0 14px 30px -12px var(--g1);
  }
  .brand { font-weight: 800; font-size: 16px; line-height: 1.3; }
  .brand small { display: block; font-weight: 500; font-size: 10.5px; color: var(--t3); letter-spacing: 2px; }
  .theme-btn {
    width: 40px; height: 40px; border-radius: 50%;
    border: 1.5px solid var(--bd2); background: var(--card);
    cursor: pointer; font-size: 16px; color: var(--t1);
    display: flex; align-items: center; justify-content: center;
    transition: transform .15s, background .15s;
  }
  .theme-btn:hover { transform: rotate(20deg) scale(1.06); background: var(--soft); }

  .hero { text-align: center; padding: 34px 0 6px; animation: up .5s ease both; }
  .hero h1 {
    font-size: clamp(28px, 6vw, 40px); font-weight: 800; letter-spacing: .5px;
    background: var(--grad); -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  .hero p { color: var(--t2); font-size: 14.5px; margin-top: 10px; }

  .steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin: 28px 0 4px; animation: up .6s ease both; }
  .step {
    background: var(--card); border: 1.5px solid var(--bd);
    border-radius: var(--r-soft); padding: 16px 10px; text-align: center;
    box-shadow: var(--shadow-sm); transition: transform .15s, border-color .15s;
  }
  .step:hover { transform: translateY(-3px); border-color: var(--accline); }
  .step b {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--grad); color: #fff; font-size: 13.5px; margin-bottom: 9px;
    box-shadow: 0 8px 18px -8px var(--g1);
  }
  .step span { display: block; font-size: 13px; color: var(--t2); font-weight: 600; }

  .seg {
    display: flex; gap: 5px; padding: 5px;
    background: var(--soft); border: 1.5px solid var(--bd);
    border-radius: var(--r-btn); margin: 24px 0 18px;
    animation: up .7s ease both;
  }
  .seg button {
    flex: 1; border: none; background: transparent; color: var(--t2);
    font-size: 14.5px; font-weight: 700; padding: 11px 0; border-radius: var(--r-btn);
    cursor: pointer; transition: all .2s; font-family: inherit;
  }
  .seg button.on { background: var(--grad); color: #fff; box-shadow: 0 10px 24px -10px var(--g1); }

  .card {
    background: var(--card); border: 1.5px solid var(--bd);
    border-radius: var(--r-card); box-shadow: var(--shadow-card);
    padding: 26px; animation: up .8s ease both;
  }
  .card + .card { margin-top: 18px; }
  .hidden { display: none !important; }

  label { display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--t2); margin: 20px 0 8px; font-weight: 700; }
  label:first-child { margin-top: 0; }
  label em {
    font-style: normal; width: 20px; height: 20px; border-radius: 7px;
    background: var(--accsoft); color: var(--acc-tx);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 800;
  }
  input[type=text], textarea {
    width: 100%; background: var(--soft);
    border: 1.5px solid var(--bd); border-radius: var(--r-field);
    color: var(--t1); padding: 13px 16px; font-size: 14.5px;
    font-family: inherit; transition: border .2s, box-shadow .2s, background .2s;
  }
  textarea { min-height: 132px; resize: vertical; font-family: var(--mono); font-size: 12.5px; line-height: 1.65; }
  input::placeholder, textarea::placeholder { color: var(--t3); }
  input:focus, textarea:focus {
    outline: none; background: var(--card);
    border-color: var(--acc); box-shadow: 0 0 0 4px var(--accsoft);
  }
  .btn-primary {
    width: 100%; margin-top: 24px; padding: 14px 0;
    border: 0; border-radius: var(--r-btn);
    background: var(--grad); color: #fff;
    font-size: 15.5px; font-weight: 800; letter-spacing: 3px;
    cursor: pointer; font-family: inherit;
    box-shadow: 0 16px 34px -14px var(--g1);
    transition: transform .12s, box-shadow .15s, filter .15s;
  }
  .btn-primary:hover { transform: translateY(-2px); filter: saturate(1.08); }
  .btn-primary:active { transform: none; }
  .btn-primary:disabled { opacity: .55; cursor: wait; transform: none; }

  details {
    margin-top: 14px; font-size: 13.5px; color: var(--t2);
    background: var(--soft); border: 1.5px solid var(--bd);
    border-radius: var(--r-field); padding: 13px 17px;
  }
  summary { cursor: pointer; color: var(--acc-tx); font-weight: 700; user-select: none; list-style: none; display: flex; align-items: center; gap: 8px; }
  summary::before { content: "?"; width: 19px; height: 19px; border-radius: 6px; background: var(--accsoft); color: var(--acc-tx); font-size: 11.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
  details[open] summary { margin-bottom: 4px; }
  details ol { margin: 10px 0 2px 22px; line-height: 2.1; }
  details a { color: var(--acc-tx); word-break: break-all; text-decoration: underline; text-decoration-color: var(--accline); text-underline-offset: 3px; }

  .msg { margin-top: 18px; padding: 13px 17px; border-radius: var(--r-field); font-size: 13.5px; line-height: 1.75; animation: up .3s ease both; }
  .msg.err { background: var(--er-bg); color: var(--er-tx); border: 1px solid rgba(229,72,77,.25); }
  .msg.info { background: rgba(59,130,246,.1); color: var(--acc-tx); border: 1px solid var(--accline); }
  .msg.ok { background: var(--su-bg); color: var(--su-tx); border: 1px solid rgba(5,150,105,.25); }

  .phead { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
  .phead strong { font-size: 16.5px; font-weight: 800; }
  .badge { padding: 5px 15px; border-radius: var(--r-btn); font-size: 12.5px; font-weight: 800; letter-spacing: 1px; }
  .st-unused { background: var(--soft2); color: var(--t2); }
  .st-redeeming, .st-pending, .st-processing { background: var(--wa-bg); color: var(--wa-tx); animation: pulse 1.6s ease infinite; }
  .st-done { background: var(--su-bg); color: var(--su-tx); }
  .st-failed, .st-revoked { background: var(--er-bg); color: var(--er-tx); }
  @keyframes pulse { 50% { opacity: .5; } }

  .stepper { display: flex; align-items: flex-start; margin: 30px 0 8px; }
  .snode { flex: 1; text-align: center; position: relative; }
  .snode::before {
    content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 3px;
    background: var(--soft2); border-radius: 2px;
  }
  .snode:first-child::before { display: none; }
  .snode.done::before { background: var(--grad); }
  .snode .dot {
    position: relative; z-index: 1;
    width: 30px; height: 30px; margin: 0 auto 9px; border-radius: 50%;
    background: var(--card); border: 2px solid var(--bd2);
    display: flex; align-items: center; justify-content: center;
    font-size: 12.5px; color: var(--t3); font-weight: 700;
    transition: all .3s;
  }
  .snode span { font-size: 12px; color: var(--t3); font-weight: 600; }
  .snode.done .dot { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 8px 18px -8px var(--g1); }
  .snode.done span { color: var(--t1); }
  .snode.cur .dot { animation: breathe 1.4s ease infinite; }
  .snode.cur span { color: var(--acc-tx); font-weight: 800; }
  @keyframes breathe { 50% { box-shadow: 0 0 0 8px var(--accsoft); } }

  .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 20px; }
  .cell { background: var(--soft); border: 1.5px solid var(--bd); border-radius: var(--r-field); padding: 13px 16px; }
  .cell .k { font-size: 11.5px; color: var(--t3); margin-bottom: 4px; font-weight: 600; letter-spacing: .5px; }
  .cell .v { font-size: 14.5px; font-weight: 700; word-break: break-all; line-height: 1.5; }
  .cell .v.hl { font-family: var(--mono); font-size: 13px; color: var(--acc-tx); }
  .cell .v.ok { color: var(--su-tx); }
  .cell .v.bad { color: var(--er-tx); }

  .spin {
    display: inline-block; width: 13px; height: 13px;
    border: 2px solid var(--wa); border-top-color: transparent;
    border-radius: 50%; vertical-align: -2px; margin-right: 7px;
    animation: sp 1s linear infinite;
  }
  @keyframes sp { to { transform: rotate(360deg); } }

  footer { text-align: center; color: var(--t3); font-size: 12.5px; margin-top: 50px; line-height: 2.1; }

  @keyframes up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
  @media (max-width: 560px) {
    .grid2 { grid-template-columns: 1fr; }
    .card { padding: 20px; }
    .step span { font-size: 11.5px; }
    .steps { gap: 8px; }
  }

/* GPT369: preserve the master's visual scale; separate the guide from the form. */
[hidden]{display:none!important}a{color:var(--acc-tx)}.top-actions{display:flex;gap:14px;align-items:center}.shop-link{font-size:12.5px;text-decoration:none;color:var(--t2)}.hero p{max-width:520px;margin:10px auto 0}.product-note{display:flex;justify-content:center;gap:8px;margin:18px 0 0}.product-note span{font-size:11px;font-weight:650;padding:3px 11px;color:var(--acc-tx);background:var(--accsoft);border:1px solid var(--accline);border-radius:99px}.field-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:20px}.field-head label{margin:0 0 8px}.field-head a{font-size:12px;font-weight:600;white-space:nowrap;text-decoration:none;margin-bottom:8px}.form-caption{font-size:12px;line-height:1.8;color:var(--t3);margin-top:10px}.form-caption strong{color:var(--t2);font-weight:550}.guide-card{margin-top:22px!important;padding:24px 26px;scroll-margin-top:20px}.guide-title{display:flex;align-items:center;gap:12px}.guide-mark{display:flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:12px;flex-shrink:0;background:var(--accsoft);color:var(--acc-tx);font-size:18px;font-weight:750}.guide-title h2{font-size:16px;letter-spacing:.2px;font-weight:750}.guide-title p{font-size:12px;color:var(--t3);margin-top:2px}.tutorial{list-style:none;display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:21px}.tutorial li{padding:17px 18px;background:var(--soft);border:1px solid var(--bd);border-radius:15px;min-width:0}.tutorial .num{font-family:var(--mono);font-size:11px;letter-spacing:1px;font-weight:700;color:var(--acc-tx);margin-bottom:9px;display:block}.tutorial h3{font-size:13.5px;font-weight:700;margin:0 0 6px}.tutorial p{font-size:12.5px;color:var(--t2);line-height:1.9}.tutorial a{text-underline-offset:3px}.tutorial .session-link{display:inline-flex;gap:14px;align-items:center;background:var(--card);border:1px solid var(--accline);border-radius:8px;text-decoration:none;padding:7px 11px;font-size:12px;font-weight:650;margin-top:10px}.tutorial code,.tutorial kbd{font-family:var(--mono);font-size:11px;background:var(--card);border:1px solid var(--bd2);border-radius:4px;padding:1px 4px;white-space:nowrap}.guide-trouble{margin-top:16px;padding-top:15px;border-top:1px solid var(--bd);font-size:12px;color:var(--t2);line-height:1.9}.guide-trouble strong{color:var(--t1);font-weight:650}.privacy-note{font-size:11px;color:var(--t3);line-height:1.9;margin-top:14px}.msg:empty{display:none}.btn-primary{letter-spacing:1px}.result-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}.result-title h2{font-size:16px}#resultNote{font-size:14px;color:var(--t2);white-space:pre-line}.result-reference{font-family:var(--mono);font-size:11px;color:var(--t3);margin-top:14px;overflow-wrap:anywhere}.hero{padding-top:28px}footer{margin-top:28px;font-size:11.5px}.theme-btn:focus-visible,.seg button:focus-visible,.btn-primary:focus-visible,a:focus-visible{outline:3px solid var(--acc);outline-offset:4px}@media(max-width:560px){.tutorial{grid-template-columns:1fr;gap:10px}.tutorial li{padding:15px 16px}.guide-card{padding:20px}.top-actions{gap:10px}.shop-link{font-size:11px}.brand{font-size:14px}.brand small{font-size:8px;letter-spacing:1.5px}.hero p{font-size:13px}.field-head a{font-size:11px}.guide-title h2{font-size:15px}.tutorial p{font-size:13px}.product-note{margin-top:14px}.wrap{padding:0 16px}.hero{padding-top:22px}.steps{margin-top:22px}.guide-title p{font-size:11px}.topbar{padding:20px 0}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}html{scroll-behavior:auto}}
