:root {
  --green: #049d79;
  --green-dark: #087761;
  --mint: #dffaf1;
  --blue: #3179f5;
  --purple: #6658f4;
  --ink: #24313d;
  --muted: #708091;
  --line: #d7e6e3;
  --surface: rgba(255, 255, 255, 0.88);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(197, 247, 231, .7), transparent 28%),
    radial-gradient(circle at 85% 25%, rgba(194, 245, 230, .62), transparent 30%),
    linear-gradient(180deg, #eefff9, #f7fffd 75%, #eafff8);
  color: var(--ink);
}
button, input, textarea { font: inherit; }
button { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.page-wrap { width: min(1080px, calc(100% - 48px)); margin: 34px auto 48px; }
.product-nav {
  position: relative;
  z-index: 2;
  display: flex;
  width: max-content;
  max-width: calc(100% - 24px);
  margin: -18px auto -8px;
  padding: 4px;
  border: 1px solid #d9e4e2;
  border-radius: 20px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 4px 14px rgba(35, 88, 73, .16);
  overflow-x: auto;
}
.product-tab { height: 28px; padding: 0 12px; border: 0; border-radius: 16px; background: transparent; font-size: 11px; font-weight: 700; white-space: nowrap; }
.product-tab.active { background: var(--green); color: white; box-shadow: 0 4px 10px rgba(4,157,121,.25); }
.product-tab:disabled { opacity: .72; }

.hero-panel {
  min-height: 355px;
  border: 1px solid rgba(177, 224, 211, .8);
  border-radius: 18px;
  background:
    linear-gradient(110deg, rgba(255,255,255,.96) 0%, rgba(240,255,249,.88) 54%, rgba(151,232,207,.68) 100%);
  box-shadow: 0 15px 34px rgba(47, 119, 97, .14);
}
.hero-content { width: 100%; max-width: 100%; padding: 51px 64px 47px; }
.hero-content h1 { margin: 0 0 23px; color: #069d7e; font-family: Georgia, "Noto Serif SC", serif; font-size: 32px; font-weight: 600; letter-spacing: 0; }
.hero-content h1 span { color: #063f39; }
.hero-content h1::after { display: block; width: 48px; height: 2px; margin-top: 7px; background: #3fbd9d; content: ""; }
.hero-content > p { margin: 0 0 16px; color: #4f6764; font-size: 13px; }
.notice-bar { display: inline-flex; align-items: center; gap: 9px; margin-left: 215px; padding: 11px 17px; border: 1px solid #8de7ae; border-radius: 9px; background: rgba(241,255,245,.72); color: #267d48; font-size: 12px; line-height: 1.4; }
.notice-bar span { display: grid; width: 18px; height: 18px; place-items: center; background: #078cd5; color: white; font-size: 13px; }
.stats-row { display: flex; gap: 14px; margin-top: 24px; }
.stats-row > div { display: flex; width: 136px; height: 64px; align-items: center; gap: 11px; padding: 10px 15px; border: 1px solid #c1e7de; border-radius: 13px; background: rgba(255,255,255,.65); }
.stat-icon { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border-radius: 9px; background: #079f7d; color: white; box-shadow: 0 4px 8px rgba(0,125,96,.2); }
.stat-icon svg { width: 21px; height: 21px; stroke-width: 1.55; }
.stat-icon.stat-emoji { font-size: 21px; line-height: 1; }
.stats-row strong, .stats-row small { display: block; }
.stats-row strong { color: #0d2f2d; font-size: 18px; line-height: 1; }
.stats-row small { margin-top: 6px; color: #516d68; font-size: 10px; font-weight: 500; white-space: nowrap; }

.main-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.guide-card, .recharge-card { min-height: 510px; border: 1px solid #d7e9e4; border-radius: 14px; background: var(--surface); box-shadow: 0 12px 28px rgba(43,103,84,.12); overflow: hidden; }
.guide-card h2 { height: 60px; margin: 0; padding: 20px 22px; border-bottom: 1px solid var(--line); font-size: 18px; }
.guide-card h2 span { display: inline-block; width: 4px; height: 18px; margin-right: 8px; border-radius: 3px; background: var(--green); vertical-align: -2px; }
.guide-step { display: grid; grid-template-columns: 30px 1fr; gap: 12px; min-height: 130px; padding: 20px 21px 17px 16px; border-bottom: 1px solid var(--line); border-left: 3px solid var(--blue); }
.guide-step.green { border-left-color: #18bb91; }
.guide-step.teal { border-left-color: #0fb59d; }
.guide-step.amber { border-left-color: #ffb21c; }
.guide-step.red { border-bottom: 0; border-left-color: #ff6464; }
.guide-step:last-child { border-bottom: 0; }
.step-no { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid #81dec4; border-radius: 50%; background: #e1fbf2; color: #078b6d; font-size: 13px; }
.guide-step h3 { margin: 0 0 10px; font-size: 17px; line-height: 1.25; }
.guide-step p { margin: 0; color: #60707e; font-size: 14px; line-height: 1.55; }
.guide-step a { display: inline-flex; min-width: 100px; height: 36px; align-items: center; justify-content: center; margin-top: 12px; border: 1px solid #86d9bd; border-radius: 8px; background: #e9fff7; color: #087b61; font-size: 12px; font-weight: 700; text-decoration: none; }

.recharge-card { display: flex; flex-direction: column; padding: 20px 18px; }
.mode-tabs { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 4px; border: 1px solid #d2d9fc; border-radius: 8px; background: #eef1ff; }
.mode-tab { height: 40px; border: 0; border-radius: 6px; background: #f2f4ff; font-size: 13px; font-weight: 700; }
.mode-tab.active { background: linear-gradient(135deg, #5b7af7, #6b52ee); color: white; box-shadow: 0 4px 8px rgba(91,83,238,.26); }
.mode-tab:disabled { opacity: .75; }
.plan-pills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 12px; }
.plan-pills > div { min-height: 59px; padding: 11px 6px 8px; border: 1px solid #dde4ef; border-radius: 8px; background: white; text-align: center; box-shadow: 0 3px 7px rgba(65,81,105,.07); }
.plan-pills strong, .plan-pills small { display: block; }
.plan-pills strong { color: #4566f1; font-size: 14px; }
.plan-pills small { margin-top: 7px; color: #16aa6a; font-size: 10px; }
.plan-pills > div.active { border-color: #6a5af2; background: #f3f1ff; box-shadow: 0 0 0 1px #6a5af2; }
.form-tip { margin: 12px 2px 9px; color: #667689; font-size: 12px; line-height: 1.5; }
.compact-label { display: flex; align-items: center; gap: 8px; margin: 11px 0 7px; font-size: 13px; font-weight: 700; }
.compact-label span { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: #6658f4; color: white; font-size: 11px; }
.verify-row { display: grid; grid-template-columns: minmax(0,1fr) 72px; gap: 8px; }
input, textarea { width: 100%; border: 1px solid #dce2eb; border-radius: 5px; outline: none; background: white; color: var(--ink); }
input { height: 30px; padding: 0 9px; font-size: 8px; }
textarea { padding: 9px; resize: vertical; font-family: Consolas, monospace; font-size: 8px; line-height: 1.5; }
input:focus, textarea:focus { border-color: #6c5cf2; box-shadow: 0 0 0 2px rgba(108,92,242,.1); }
.recharge-card input { height: 42px; padding: 0 12px; font-size: 13px; }
.recharge-card textarea { min-height: 158px; padding: 12px; font-size: 12px; line-height: 1.6; }
.verify-row button { border: 0; border-radius: 6px; background: #695af2; color: white; font-size: 13px; font-weight: 700; cursor: pointer; }
.verify-row button:disabled { opacity: .55; cursor: wait; }
.inline-status { margin-top: 7px; padding: 8px 10px; border-radius: 5px; background: #e7faf2; color: #078661; font-size: 12px; }
.inline-status.error { background: #fff0f0; color: #b83d3d; }
.session-meta { display: flex; min-height: 30px; align-items: center; justify-content: space-between; gap: 8px; color: #68798a; font-size: 12px; }
.session-meta strong { overflow: hidden; color: #087b61; text-overflow: ellipsis; white-space: nowrap; }
.submit-note { margin-top: 11px; padding: 11px 13px; border-left: 3px solid #81d8bc; border-radius: 5px; background: #f2fffa; color: #526b68; font-size: 12px; line-height: 1.65; }
.submit-note p { margin: 0; }
.submit-note p + p { margin-top: 2px; }
.submit-note a { color: #2867d8; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.submit-note a:hover { text-decoration: underline; }
.submit-note strong { color: #087c62; }
.form-error { margin-top: 8px; padding: 9px 10px; border: 1px solid #f1c3c3; border-radius: 5px; background: #fff0f0; color: #b83d3d; font-size: 12px; }
.submit-recharge { width: 100%; height: 43px; margin-top: 9px; border: 0; border-radius: 7px; background: linear-gradient(135deg, #5f76f1, #6a54ed); color: white; font-size: 13px; font-weight: 700; cursor: pointer; }
.submit-recharge:disabled { background: #c9d0df; cursor: not-allowed; }

.compact-result { margin-top: 12px; padding: 12px; border: 1px solid #d8e7e2; border-radius: 8px; background: #f8fffc; }
.result-state { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.result-state > span { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: #e1faf1; color: var(--green); font-weight: 800; }
.result-state small, .result-state strong { display: block; }
.result-state small { color: #758395; font-size: 7px; }
.result-state strong { margin-top: 2px; font-size: 11px; }
.result-state.success > span { background: #dff9ed; color: #08a16c; }
.result-state.failed > span { background: #ffeded; color: #d14a4a; }
.compact-result dl, .query-result dl { margin: 0; }
.compact-result dl div, .query-result dl div { display: grid; grid-template-columns: 72px minmax(0,1fr); gap: 8px; padding: 5px 0; border-bottom: 1px solid #e8efec; font-size: 8px; }
.compact-result dt, .query-result dt { color: #758395; }
.compact-result dd, .query-result dd { margin: 0; overflow: hidden; font-weight: 700; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.compact-result > p { margin: 8px 0; color: #6e7c89; font-size: 8px; }
.result-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.result-buttons button { height: 27px; border: 1px solid #c9ddd6; border-radius: 5px; background: white; color: #087b61; font-size: 8px; font-weight: 700; cursor: pointer; }

.query-bar { margin-top: 20px; padding: 12px; border: 1px solid #d8e2e8; border-radius: 12px; background: rgba(247,248,253,.94); box-shadow: 0 8px 20px rgba(42,80,70,.11); text-align: center; }
.query-bar > div { display: flex; justify-content: center; gap: 12px; }
.query-button { display: inline-flex; height: 32px; align-items: center; justify-content: center; gap: 7px; padding: 0 17px; border: 0; border-radius: 7px; color: white; font-size: 9px; font-weight: 700; cursor: pointer; box-shadow: 0 5px 12px rgba(49,121,245,.2); }
.query-button svg { width: 13px; height: 13px; }
.query-button.blue,
.dialog-action.blue,
.dialog-input-row .blue { background: var(--blue); color: white; }
.query-button.green,
.dialog-action.green,
.dialog-submit.green { background: var(--green); color: white; }
.query-bar p { margin: 9px 0 0; color: #8899ad; font-size: 8px; }

dialog { width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid #d5e5e0; border-radius: 18px; background: white; box-shadow: 0 24px 70px rgba(20,55,45,.28); }
dialog::backdrop { background: rgba(27,51,44,.5); backdrop-filter: blur(3px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid #e1ebe8; }
.dialog-head small { color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.dialog-head h2 { margin: 5px 0 0; font-size: 21px; }
.dialog-head button { width: 28px; height: 28px; border: 1px solid #dce5e2; border-radius: 6px; background: white; font-size: 19px; cursor: pointer; }
.dialog-body { padding: 22px 24px 25px; }
.dialog-body > label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 700; }
.dialog-body > textarea { display: block; width: 100%; min-height: 148px; padding: 13px 14px; border: 2px solid #6d8cff; border-radius: 14px; font-size: 14px; line-height: 1.6; }
.dialog-input-row { display: grid; grid-template-columns: minmax(0,1fr) 72px; gap: 7px; }
.dialog-input-row input { height: 36px; font-size: 10px; }
.dialog-input-row button, .dialog-submit { border: 0; border-radius: 6px; font-size: 9px; font-weight: 700; cursor: pointer; }
.dialog-tip { margin: 0 0 14px; color: #667582; font-size: 13px; line-height: 1.6; }
.dialog-tip a { color: var(--green); text-decoration: none; }
.dialog-submit { width: 100%; height: 35px; margin-top: 8px; }
.dialog-actions { display: flex; gap: 10px; margin-top: 14px; }
.dialog-action, .dialog-close { min-width: 62px; height: 36px; padding: 0 18px; border-radius: 9px; font-size: 14px; font-weight: 700; cursor: pointer; }
.dialog-action { border: 0; }
.dialog-close { border: 1px solid #d7dfe7; background: #fff; color: #42505d; }
.query-result { margin-top: 14px; padding: 13px; border: 1px solid #d9e9e3; border-radius: 8px; background: #f7fffc; }
.query-detail-list { overflow:hidden; border:1px solid #e1e6ed; border-radius:10px; background:#fff; }
.query-result .query-detail-list div { display:block; padding:0; border-bottom:1px solid #e7ebf0; }
.query-result .query-detail-list div:last-child { border-bottom:0; }
.query-result .query-detail-list dt { padding:10px 12px; background:#f8f9fb; color:#344155; font-size:12px; }
.query-result .query-detail-list dd { display:flex; min-height:40px; align-items:center; justify-content:space-between; gap:10px; padding:10px 12px; overflow-wrap:anywhere; color:#172235; font-size:12px; font-weight:500; text-align:left; white-space:normal; }
.inline-copy { flex:0 0 auto; height:25px; padding:0 9px; border:0; border-radius:6px; background:#3978f6; color:#fff; font-size:11px; font-weight:700; }
.query-result-title { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.query-result-title > span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: #dcf8ed; color: var(--green); font-weight: 800; }
.query-result-title small, .query-result-title strong { display: block; }
.query-result-title small { color: #7d8b98; font-size: 7px; }
.query-result-title strong { margin-top: 2px; font-size: 11px; }
.valid-text { color: #078b65; }
.invalid-text { color: #c64b4b; }
.batch-summary { margin-bottom: 10px; color: #627281; font-size: 13px; }
.batch-results { display: grid; gap: 7px; max-height: 260px; overflow: auto; }
.batch-result-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 10px; border: 1px solid #dfeae6; border-radius: 8px; background: #fff; font-size: 13px; }
.batch-result-row strong { color: #24313d; }
.batch-result-row small { color: #68798a; text-align: right; }

.toast { position: fixed; z-index: 50; right: 18px; bottom: 18px; max-width: min(330px, calc(100vw - 36px)); padding: 10px 13px; border-radius: 6px; background: #153c31; color: white; font-size: 9px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .18s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 680px) {
  .page-wrap { margin-top: 25px; }
  .product-nav { justify-content: center; overflow: hidden; }
  .hero-content { padding: 34px 22px 25px; }
  .hero-panel { min-height: 0; }
  .hero-content h1 { font-size: 27px; }
  .hero-content > p { font-size: 11px; }
  .notice-bar { margin-left: 0; font-size: 9px; }
  .stats-row { display: grid; grid-template-columns: 1fr 1fr; }
  .stats-row > div { min-width: 0; }
  .stats-row strong { font-size: 14px; }
  .stats-row small { font-size: 8px; }
  .main-grid { grid-template-columns: 1fr; }
  .main-grid > *, .mode-tabs > *, .plan-pills > * { min-width: 0; }
  .guide-card, .recharge-card { min-height: 0; }
  .recharge-card { min-width: 0; }
  .mode-tab { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .guide-card { order: 2; }
  .guide-card h2 { height: 52px; padding: 17px 17px; font-size: 15px; }
  .guide-card h2 span { height: 16px; }
  .guide-step { min-height: 120px; padding: 18px 16px 16px 12px; grid-template-columns: 29px 1fr; gap: 12px; }
  .guide-step h3 { font-size: 15px; }
  .guide-step p { font-size: 12px; }
  .guide-step a { height: 34px; min-width: 100px; font-size: 11px; }
  .recharge-card { order: 1; }
  .query-bar > div { flex-direction: column; }
  .query-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
