:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --ink: #16202a;
  --muted: #64717d;
  --line: #dde3e8;
  --line-strong: #cbd3da;
  --accent: #ff7a18;
  --accent-dark: #db5d00;
  --accent-soft: #fff1e6;
  --green: #15825e;
  --green-soft: #e8f7f1;
  --red: #c83d45;
  --red-soft: #fff0f1;
  --amber: #a66005;
  --amber-soft: #fff5dc;
  --blue: #2867b2;
  --blue-soft: #ebf3ff;
  --shadow: 0 16px 44px rgba(25, 36, 46, .08);
  --radius: 18px;
  --radius-sm: 10px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--bg); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid rgba(255, 122, 24, .3);
  outline-offset: 2px;
}

.site-header {
  width: min(1180px, calc(100% - 40px));
  height: 84px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, #ff9b45, var(--accent-dark));
  box-shadow: 0 8px 18px rgba(231, 95, 0, .22);
  font-size: 20px;
  font-weight: 800;
}

.brand strong, .brand small { display: block; line-height: 1.15; }
.brand strong { font-size: 17px; letter-spacing: .02em; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 600; }
.text-link, .back-link { color: var(--muted); font-size: 14px; font-weight: 650; text-decoration: none; }
.text-link:hover, .back-link:hover { color: var(--accent-dark); }

.public-page {
  background:
    radial-gradient(circle at 82% 12%, rgba(255, 166, 87, .16), transparent 27rem),
    radial-gradient(circle at 8% 55%, rgba(242, 183, 130, .12), transparent 25rem),
    var(--bg);
}

.public-main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.hero { min-height: 610px; padding: 74px 0 90px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, 500px); gap: 90px; align-items: center; }
.hero-copy { max-width: 570px; }
.eyebrow { display: inline-block; color: var(--accent-dark); font-size: 11px; font-weight: 800; letter-spacing: .17em; }
.hero h1 { margin: 15px 0 20px; font-size: clamp(42px, 5vw, 68px); line-height: 1.07; letter-spacing: -.045em; }
.hero-copy > p { max-width: 540px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.8; }
.feature-list { display: flex; flex-wrap: wrap; gap: 20px; margin: 36px 0 0; padding: 0; list-style: none; }
.feature-list li { display: flex; align-items: center; gap: 8px; color: #46525d; font-size: 13px; font-weight: 650; }
.feature-list span { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid #f0cbaa; border-radius: 50%; color: var(--accent-dark); font-size: 9px; }

.panel { border: 1px solid rgba(211, 219, 225, .9); border-radius: var(--radius); background: rgba(255, 255, 255, .96); box-shadow: var(--shadow); }
.redeem-panel { padding: 28px; }
.field-heading { margin-bottom: 11px; display: flex; align-items: center; justify-content: space-between; }
.field-heading label, .field-label { color: #34404b; font-size: 13px; font-weight: 750; }
.count-pill { padding: 4px 9px; border-radius: 999px; color: var(--accent-dark); background: var(--accent-soft); font-size: 11px; font-weight: 750; }

textarea, input:not([type="checkbox"]):not([type="file"]) {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: #fff;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
textarea { min-height: 205px; padding: 15px 16px; resize: vertical; line-height: 1.65; }
input:not([type="checkbox"]):not([type="file"]) { height: 42px; padding: 0 12px; }
textarea::placeholder, input::placeholder { color: #9aa5ae; }
textarea:hover, input:not([type="checkbox"]):hover { border-color: #abb6bf; }
textarea:focus, input:not([type="checkbox"]):focus { border-color: var(--accent); outline: 0; box-shadow: 0 0 0 3px rgba(255, 122, 24, .12); }
.field-help { margin: 9px 0 17px; color: #85909a; font-size: 12px; }

.button {
  min-height: 42px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  transition: transform .12s, background .18s, border-color .18s, color .18s, opacity .18s;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:active:not(:disabled) { transform: translateY(0); }
.button:disabled, .button.busy { cursor: wait; opacity: .58; }
.button-primary { color: #fff; background: linear-gradient(180deg, #ff882e, var(--accent)); box-shadow: 0 7px 15px rgba(226, 95, 0, .16); }
.button-primary:hover:not(:disabled) { background: linear-gradient(180deg, #ff7719, #e86400); }
.button-secondary { border-color: var(--line); color: #35414c; background: #fff; }
.button-secondary:hover:not(:disabled) { border-color: #b7c1c9; background: #fafbfc; }
.button-danger { border-color: #f0bdc0; color: var(--red); background: var(--red-soft); }
.button-wide { width: 100%; }
.button-small { min-height: 36px; padding: 0 13px; font-size: 12px; }
.button-loader { display: none; width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.48); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.button.busy .button-loader { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.message { margin-top: 14px; padding: 12px 14px; border: 1px solid; border-radius: 10px; font-size: 13px; line-height: 1.55; }
.message.info { border-color: #c7dcf6; color: var(--blue); background: var(--blue-soft); }
.message.success { border-color: #bfe5d6; color: var(--green); background: var(--green-soft); }
.message.error { border-color: #f2c2c6; color: var(--red); background: var(--red-soft); }

.results-section { padding: 34px 0 86px; border-top: 1px solid rgba(204, 213, 220, .7); }
.section-heading { margin-bottom: 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.section-heading h2 { margin: 8px 0 6px; font-size: 31px; letter-spacing: -.025em; }
.section-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.download-actions, .toolbar-group { display: flex; flex-wrap: wrap; gap: 9px; }
.account-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.account-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 6px 22px rgba(25, 36, 46, .045); }
.account-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.account-card h3 { min-width: 0; margin: 0; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.account-meta { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; color: var(--muted); font-size: 12px; }
.account-meta strong { display: block; margin-top: 3px; color: #35414c; font-size: 13px; font-weight: 700; }
.code-results { margin-bottom: 16px; display: grid; gap: 7px; }
.code-result { padding: 10px 13px; display: flex; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); font-size: 12px; }
.code-result-code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.site-footer { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 22px 0 30px; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid rgba(206, 214, 220, .8); color: #84909a; font-size: 11px; }

.badge { display: inline-flex; min-height: 23px; padding: 3px 8px; align-items: center; border-radius: 999px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.badge.green { color: var(--green); background: var(--green-soft); }
.badge.red { color: var(--red); background: var(--red-soft); }
.badge.amber { color: var(--amber); background: var(--amber-soft); }
.badge.blue { color: var(--blue); background: var(--blue-soft); }
.badge.gray { color: #66727d; background: #edf0f2; }

/* Admin login */
.admin-page { background: #eef1f4; }
.login-shell { min-height: 100vh; padding: 30px 18px; display: grid; place-items: center; background: radial-gradient(circle at 50% 10%, #fff5ea 0, transparent 35rem), #eef1f4; }
.session-check-panel { display: flex; align-items: center; gap: 13px; color: #4c5964; }
.session-check-panel strong, .session-check-panel span { display: block; }
.session-check-panel strong { font-size: 14px; }
.session-check-panel span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.login-panel { width: min(100%, 430px); padding: 34px; }
.brand-centered { margin-bottom: 36px; }
.login-copy h1 { margin: 10px 0 8px; font-size: 30px; letter-spacing: -.025em; }
.login-copy p { margin: 0 0 26px; color: var(--muted); font-size: 13px; }
.login-panel form { display: grid; gap: 9px; }
.login-panel form .button { margin-top: 10px; }
.back-link { margin-top: 24px; display: inline-block; }

/* Admin dashboard */
.dashboard-shell { min-height: 100vh; display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; width: 230px; padding: 24px 17px; display: flex; flex-direction: column; color: #dfe6eb; background: #18232c; }
.sidebar-brand { margin: 0 8px 36px; color: #fff; }
.sidebar-brand small { color: #8fa0ad; }
.sidebar-nav { display: grid; gap: 5px; }
.nav-item { width: 100%; min-height: 44px; padding: 0 13px; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 9px; color: #aebbc5; background: transparent; cursor: pointer; font-size: 13px; font-weight: 650; text-align: left; }
.nav-item span { width: 20px; color: #7e909d; font-size: 17px; text-align: center; }
.nav-item:hover { color: #fff; background: rgba(255, 255, 255, .055); }
.nav-item.active { color: #fff; background: rgba(255, 134, 42, .15); }
.nav-item.active span { color: #ff9c50; }
.sidebar-public-link { margin-top: auto; padding: 12px 10px; border-top: 1px solid rgba(255,255,255,.08); color: #9dabb5; font-size: 11px; text-decoration: none; }
.sidebar-public-link:hover { color: #fff; }
.dashboard-main { min-width: 0; grid-column: 2; }
.dashboard-header { height: 92px; padding: 0 34px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.86); backdrop-filter: blur(12px); }
.dashboard-header h1 { margin: 5px 0 0; font-size: 24px; letter-spacing: -.025em; }
.header-actions { display: flex; align-items: center; gap: 13px; }
.session-user { color: var(--muted); font-size: 12px; }
.dashboard-message { margin: 20px 34px -4px; }
.dashboard-view { padding: 28px 34px 50px; }
.dashboard-view.active { display: block; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.summary-card { min-height: 134px; padding: 19px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.summary-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.summary-icon { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 10px; color: var(--accent-dark); background: var(--accent-soft); font-size: 15px; font-weight: 800; }
.summary-card-label { color: var(--muted); font-size: 12px; font-weight: 650; }
.summary-card-value { margin-top: 13px; font-size: 29px; font-weight: 790; letter-spacing: -.035em; }
.summary-card-note { margin-top: 4px; color: #85909a; font-size: 10px; }
.skeleton-card { background: linear-gradient(100deg, #fff 20%, #f4f6f7 40%, #fff 60%); background-size: 220% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position-x: -220%; } }
.dashboard-columns { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.compact-panel { padding: 21px; }
.card-heading { min-height: 42px; display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.card-heading h2 { margin: 0 0 5px; font-size: 16px; letter-spacing: -.015em; }
.card-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.text-button { padding: 3px; border: 0; color: var(--accent-dark); background: transparent; cursor: pointer; font-size: 11px; font-weight: 750; }
.status-breakdown { margin-top: 20px; display: grid; gap: 14px; }
.status-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) 38px; gap: 10px; align-items: center; font-size: 11px; }
.status-bar { height: 7px; overflow: hidden; border-radius: 99px; background: #edf0f2; }
.status-bar span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.status-row strong { text-align: right; }
.mini-list { margin-top: 12px; display: grid; }
.mini-row { padding: 12px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #edf0f2; }
.mini-row:last-child { border-bottom: 0; }
.mini-row strong { display: block; font-size: 12px; }
.mini-row span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }

.toolbar-panel { margin-bottom: 15px; padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; gap: 15px; box-shadow: none; }
.toolbar-right { justify-content: flex-end; }
.file-button { position: relative; overflow: hidden; }
.table-panel { overflow: hidden; box-shadow: none; }
.table-heading { padding: 19px 20px 15px; align-items: center; border-bottom: 1px solid var(--line); }
.table-tools { width: min(100%, 300px); }
.search-input { height: 36px !important; font-size: 12px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 11px; }
th { height: 40px; padding: 0 12px; color: #78848e; background: #fafbfc; font-size: 10px; font-weight: 750; text-align: left; white-space: nowrap; }
td { min-height: 54px; padding: 11px 12px; border-top: 1px solid #edf0f2; color: #46525d; vertical-align: middle; }
tbody tr:hover { background: #fcfcfd; }
.check-cell { width: 42px; text-align: center; }
.check-cell input { width: 15px; height: 15px; accent-color: var(--accent); }
.action-cell { width: 78px; text-align: right; }
.primary-cell { max-width: 260px; color: var(--ink); font-weight: 680; word-break: break-all; }
.secondary-line { margin-top: 3px; display: block; color: #8b959d; font-size: 9px; font-weight: 500; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.usage-cell { min-width: 145px; }
.usage-values { display: flex; justify-content: space-between; gap: 10px; font-size: 10px; }
.usage-track { height: 5px; margin-top: 6px; overflow: hidden; border-radius: 99px; background: #eceff1; }
.usage-track span { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.pct-0 { width: 0; }
.pct-5 { width: 5%; }
.pct-10 { width: 10%; }
.pct-15 { width: 15%; }
.pct-20 { width: 20%; }
.pct-25 { width: 25%; }
.pct-30 { width: 30%; }
.pct-35 { width: 35%; }
.pct-40 { width: 40%; }
.pct-45 { width: 45%; }
.pct-50 { width: 50%; }
.pct-55 { width: 55%; }
.pct-60 { width: 60%; }
.pct-65 { width: 65%; }
.pct-70 { width: 70%; }
.pct-75 { width: 75%; }
.pct-80 { width: 80%; }
.pct-85 { width: 85%; }
.pct-90 { width: 90%; }
.pct-95 { width: 95%; }
.pct-100 { width: 100%; }
.empty-state { padding: 52px 20px; color: #89949c; font-size: 12px; text-align: center; }
.cards-layout { margin-top: 0; grid-template-columns: minmax(270px, 340px) minmax(0, 1fr); }
.sticky-card { position: sticky; top: 20px; }
.stack-form { margin-top: 19px; display: grid; gap: 8px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stack-form .button { margin-top: 9px; }
.created-cards { max-height: 250px; margin-top: 14px; padding: 12px; overflow: auto; border: 1px solid #f1d3b9; border-radius: 9px; background: var(--accent-soft); }
.created-cards h3 { margin: 0 0 8px; font-size: 12px; }
.created-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.created-code { padding: 5px 0; display: block; color: #86420d; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; word-break: break-all; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fff; cursor: pointer; }
.mobile-only { display: none; }

@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr 440px; gap: 45px; }
  .account-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards-layout { grid-template-columns: 1fr; }
  .sticky-card { position: static; }
}

@media (max-width: 820px) {
  .site-header, .public-main, .site-footer { width: min(100% - 28px, 650px); }
  .hero { padding: 42px 0 65px; grid-template-columns: 1fr; gap: 43px; }
  .hero-copy { max-width: none; }
  .hero h1 { font-size: clamp(39px, 12vw, 58px); }
  .redeem-panel { padding: 22px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .account-grid { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; }

  .dashboard-shell { display: block; }
  .sidebar { transform: translateX(-102%); transition: transform .2s ease; box-shadow: 15px 0 45px rgba(0,0,0,.2); }
  .sidebar.open { transform: translateX(0); }
  .dashboard-main { width: 100%; }
  .dashboard-header { height: 82px; padding: 0 18px; justify-content: flex-start; }
  .dashboard-header .header-actions { margin-left: auto; }
  .session-user { display: none; }
  .dashboard-view { padding: 20px 16px 40px; }
  .dashboard-message { margin: 16px 16px 0; }
  .mobile-only { display: inline-grid; place-items: center; }
  .dashboard-columns { grid-template-columns: 1fr; }
  .toolbar-panel { align-items: stretch; flex-direction: column; }
  .toolbar-right { justify-content: flex-start; }
}

@media (max-width: 540px) {
  .site-header { height: 72px; }
  .text-link { font-size: 12px; }
  .hero { padding-top: 30px; }
  .feature-list { align-items: flex-start; flex-direction: column; gap: 11px; }
  .download-actions { width: 100%; }
  .download-actions .button { flex: 1; }
  .account-meta { grid-template-columns: 1fr; }
  .login-panel { padding: 25px 21px; }
  .summary-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  #refresh-current { display: none; }
  .header-actions .button { padding: 0 10px; }
  .dashboard-header h1 { font-size: 20px; }
}

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

/* Public secure claim portal */
body.public-page {
  --public-bg: #06101e;
  --public-bg-deep: #030914;
  --public-surface: rgba(12, 26, 43, .72);
  --public-surface-strong: rgba(15, 31, 51, .92);
  --public-line: rgba(151, 195, 214, .18);
  --public-line-strong: rgba(115, 225, 236, .35);
  --public-ink: #f4f8f7;
  --public-muted: #8fa4b8;
  --public-cyan: #66e7df;
  --public-cyan-bright: #8cf9ef;
  --public-gold: #d7b66b;
  --public-gold-bright: #f1d68e;
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--public-ink);
  background:
    radial-gradient(circle at 74% 12%, rgba(59, 200, 214, .13), transparent 28rem),
    radial-gradient(circle at 11% 72%, rgba(202, 161, 80, .1), transparent 30rem),
    linear-gradient(148deg, #09192b 0%, var(--public-bg) 42%, var(--public-bg-deep) 100%);
}

body.public-page::before,
body.public-page::after {
  position: fixed;
  z-index: -3;
  inset: 0;
  pointer-events: none;
  content: "";
}

body.public-page::before {
  opacity: .72;
  background-image:
    radial-gradient(circle at center, rgba(143, 230, 237, .58) 0 1px, transparent 1.4px),
    radial-gradient(circle at center, rgba(232, 206, 139, .4) 0 1px, transparent 1.4px);
  background-position: 0 0, 33px 17px;
  background-size: 73px 73px, 109px 109px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .45) 64%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .45) 64%, transparent 100%);
}

body.public-page::after {
  z-index: -2;
  opacity: .65;
  background:
    linear-gradient(90deg, rgba(119, 193, 211, .035) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(rgba(119, 193, 211, .028) 1px, transparent 1px) 0 0 / 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 72% 24%, #000 0%, transparent 69%);
  mask-image: radial-gradient(ellipse at 72% 24%, #000 0%, transparent 69%);
}

.public-page :focus-visible {
  outline: 2px solid var(--public-cyan-bright);
  outline-offset: 3px;
}

.public-atmosphere {
  position: fixed;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.ambient-orb {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(2px);
  opacity: .8;
}

.ambient-orb-cyan {
  top: 9%;
  right: -10rem;
  width: 31rem;
  height: 31rem;
  border: 1px solid rgba(104, 230, 225, .12);
  box-shadow: inset 0 0 10rem rgba(29, 180, 203, .08), 0 0 10rem rgba(29, 180, 203, .05);
}

.ambient-orb-gold {
  bottom: -14rem;
  left: -11rem;
  width: 36rem;
  height: 36rem;
  border: 1px solid rgba(220, 185, 107, .09);
  box-shadow: inset 0 0 12rem rgba(220, 185, 107, .05);
}

.public-page .site-header,
.public-page .public-main,
.public-page .site-footer {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100% - 48px));
  margin-right: auto;
  margin-left: auto;
}

.public-page .site-header {
  height: 86px;
  border-bottom: 1px solid rgba(149, 200, 218, .1);
}

.public-page .brand {
  gap: 13px;
  color: var(--public-ink);
}

.public-page .brand-mark {
  position: relative;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid rgba(127, 236, 234, .34);
  border-radius: 12px 4px 12px 4px;
  color: var(--public-gold-bright);
  background:
    linear-gradient(135deg, rgba(122, 245, 239, .13), transparent 52%),
    rgba(9, 24, 40, .9);
  box-shadow: inset 0 0 0 4px rgba(6, 17, 30, .55), 0 12px 34px rgba(0, 0, 0, .32);
  font-size: 17px;
  font-weight: 800;
}

.public-page .brand-mark::before,
.public-page .brand-mark::after {
  position: absolute;
  content: "";
  background: linear-gradient(90deg, transparent, var(--public-cyan), transparent);
  opacity: .8;
}

.public-page .brand-mark::before { top: 5px; right: 7px; left: 7px; height: 1px; }
.public-page .brand-mark::after { right: 5px; bottom: 7px; top: 7px; width: 1px; background: linear-gradient(0deg, transparent, var(--public-gold), transparent); }
.public-page .brand-mark > span { position: relative; z-index: 1; }

.public-page .brand-copy { display: block; }
.public-page .brand strong { color: var(--public-ink); font-size: 15px; letter-spacing: .04em; }
.public-page .brand small { margin-top: 5px; color: #71889f; font-size: 9px; font-weight: 700; letter-spacing: .16em; }

.trust-status {
  min-height: 34px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(109, 222, 211, .18);
  border-radius: 999px;
  color: #9db6c4;
  background: rgba(9, 24, 40, .48);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .02em;
}

.trust-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--public-cyan);
  box-shadow: 0 0 0 4px rgba(102, 231, 223, .09), 0 0 12px rgba(102, 231, 223, .7);
}

.public-page .hero {
  min-height: calc(100vh - 150px);
  padding: 58px 0 84px;
  grid-template-columns: minmax(0, 1.06fr) minmax(410px, .94fr);
  gap: clamp(54px, 7vw, 96px);
  align-items: center;
}

.public-page .hero-copy { max-width: 590px; }
.eyebrow-line { display: flex; align-items: center; gap: 14px; }
.public-page .eyebrow { color: var(--public-gold); font-size: 10px; font-weight: 800; letter-spacing: .22em; }
.eyebrow-rule { width: 54px; height: 1px; background: linear-gradient(90deg, rgba(215, 182, 107, .8), transparent); }

.public-page .hero h1 {
  margin: 21px 0 23px;
  color: var(--public-ink);
  font-size: clamp(48px, 5.8vw, 76px);
  font-weight: 730;
  line-height: 1.1;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.public-page .hero h1 > span {
  color: transparent;
  background: linear-gradient(100deg, var(--public-gold-bright) 4%, #d8c28c 42%, var(--public-cyan-bright) 96%);
  -webkit-background-clip: text;
  background-clip: text;
}

.public-page .hero-lead {
  max-width: 545px;
  margin: 0;
  color: var(--public-muted);
  font-size: 15px;
  line-height: 1.9;
}

.public-page .feature-list {
  margin: 38px 0 0;
  display: grid;
  gap: 9px;
}

.public-page .feature-list li {
  position: relative;
  min-height: 65px;
  padding: 12px 15px;
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(142, 190, 207, .11);
  border-radius: 11px;
  color: var(--public-ink);
  background: linear-gradient(95deg, rgba(16, 35, 55, .58), rgba(9, 22, 37, .23));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

.public-page .feature-list li::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  content: "";
  background: linear-gradient(var(--public-cyan), rgba(215, 182, 107, .18));
  opacity: .62;
}

.public-page .feature-number {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(114, 226, 225, .23);
  border-radius: 8px 3px 8px 3px;
  color: var(--public-cyan);
  background: rgba(75, 210, 218, .055);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9px;
  font-weight: 800;
}

.public-page .feature-copy {
  width: auto;
  height: auto;
  min-width: 0;
  display: grid;
  place-items: start;
  gap: 4px;
  border: 0;
  border-radius: 0;
  color: inherit;
  background: none;
  font-size: inherit;
}
.feature-copy strong { color: #eaf3f4; font-size: 12px; font-weight: 700; }
.feature-copy small { color: #71899d; font-size: 10px; }
.public-page .feature-state {
  width: auto;
  height: auto;
  min-width: 0;
  padding: 4px 7px;
  display: inline-flex;
  place-items: center;
  border: 1px solid rgba(215, 182, 107, .32);
  border-radius: 999px;
  color: rgba(222, 196, 131, .72);
  background: rgba(215, 182, 107, .045);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .14em;
}

.public-page .panel {
  border: 1px solid var(--public-line);
  background: linear-gradient(145deg, rgba(17, 38, 61, .8), rgba(8, 20, 35, .72));
  box-shadow: 0 35px 90px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .055);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
}

.public-page .redeem-panel {
  position: relative;
  padding: 30px;
  overflow: hidden;
  border-radius: 18px 5px 18px 5px;
}

.public-page .redeem-panel::before {
  position: absolute;
  top: -6rem;
  right: -5rem;
  width: 15rem;
  height: 15rem;
  border-radius: 50%;
  content: "";
  pointer-events: none;
  background: rgba(70, 211, 219, .08);
  filter: blur(55px);
}

.panel-corner { position: absolute; z-index: 2; width: 24px; height: 24px; pointer-events: none; }
.panel-corner-top { top: 8px; right: 8px; border-top: 1px solid var(--public-cyan); border-right: 1px solid var(--public-cyan); }
.panel-corner-bottom { bottom: 8px; left: 8px; border-bottom: 1px solid var(--public-gold); border-left: 1px solid var(--public-gold); }

.redeem-panel-header {
  position: relative;
  margin-bottom: 27px;
  padding-bottom: 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(139, 190, 207, .12);
}

.console-label { display: inline-flex; align-items: center; gap: 7px; color: var(--public-cyan); font-size: 8px; font-weight: 800; letter-spacing: .2em; }
.console-label > span { width: 5px; height: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 9px rgba(102, 231, 223, .75); }
.redeem-panel-header h2 { margin: 11px 0 7px; color: #f4f9f8; font-size: 24px; font-weight: 690; letter-spacing: -.025em; }
.redeem-panel-header p { margin: 0; color: #7790a4; font-size: 11px; }

.security-seal {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(215, 182, 107, .22);
  border-radius: 50%;
  color: var(--public-gold-bright);
  background: radial-gradient(circle, rgba(215, 182, 107, .09), transparent 67%);
  box-shadow: 0 0 24px rgba(215, 182, 107, .06);
}

.security-seal svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
.public-page .field-heading { margin-bottom: 10px; }
.public-page .field-heading label { color: #c9d8df; font-size: 11px; font-weight: 700; letter-spacing: .04em; }

.public-page .count-pill {
  min-width: 47px;
  padding: 4px 9px;
  color: var(--public-cyan);
  border: 1px solid rgba(102, 231, 223, .12);
  background: rgba(102, 231, 223, .06);
  font-size: 9px;
  text-align: center;
}

.textarea-shell { position: relative; }
.textarea-shell::before {
  position: absolute;
  z-index: 1;
  top: 12px;
  left: 0;
  width: 2px;
  height: 34px;
  content: "";
  pointer-events: none;
  background: linear-gradient(var(--public-cyan), transparent);
}

.public-page textarea {
  min-height: 190px;
  padding: 15px 16px;
  border-color: rgba(134, 179, 198, .19);
  border-radius: 10px 3px 10px 3px;
  color: #e8f1f2;
  background: rgba(3, 13, 25, .67);
  caret-color: var(--public-cyan);
  box-shadow: inset 0 1px 14px rgba(0, 0, 0, .16);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  letter-spacing: .025em;
  line-height: 1.75;
  scrollbar-color: rgba(102, 231, 223, .28) transparent;
}

.public-page textarea::placeholder { color: #445f74; }
.public-page textarea:hover { border-color: rgba(134, 211, 220, .3); }
.public-page textarea:focus { border-color: rgba(102, 231, 223, .62); background: rgba(4, 15, 28, .82); box-shadow: 0 0 0 3px rgba(102, 231, 223, .07), inset 0 1px 14px rgba(0, 0, 0, .2); }

.public-page .field-help {
  margin: 10px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #627b90;
  font-size: 9px;
}

.field-help-secure { display: inline-flex; align-items: center; gap: 5px; color: #71958f; white-space: nowrap; }
.field-help-secure > span { color: var(--public-cyan); font-size: 6px; }

.public-page .button {
  border-radius: 9px 3px 9px 3px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .035em;
}

.public-page .button-primary {
  position: relative;
  min-height: 48px;
  overflow: hidden;
  color: #06161d;
  border-color: rgba(153, 248, 238, .36);
  background: linear-gradient(102deg, var(--public-gold-bright) 0%, #d9d293 33%, var(--public-cyan) 100%);
  box-shadow: 0 13px 30px rgba(66, 205, 208, .13), inset 0 1px 0 rgba(255, 255, 255, .42);
}

.public-page .button-primary::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, .34) 48%, transparent 72%);
  transform: translateX(-115%);
  transition: transform .55s ease;
}

.public-page .button-primary:hover:not(:disabled) {
  color: #03131a;
  border-color: rgba(196, 255, 248, .7);
  background: linear-gradient(102deg, #f5da93 0%, #d9d99d 36%, #78eee7 100%);
  box-shadow: 0 16px 36px rgba(66, 205, 208, .18), inset 0 1px 0 rgba(255, 255, 255, .5);
}

.public-page .button-primary:hover:not(:disabled)::before { transform: translateX(115%); }
.public-page .button-icon { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.public-page .button-arrow { position: absolute; right: 17px; font-size: 17px; font-weight: 400; }
.public-page .button.busy .button-icon,
.public-page .button.busy .button-arrow { display: none; }
.public-page .button-loader { border-color: rgba(4, 23, 28, .25); border-top-color: #07191e; }

.public-page .button-secondary {
  min-height: 44px;
  color: #b7cbd3;
  border-color: rgba(142, 192, 208, .22);
  background: rgba(14, 32, 50, .78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}
.public-page .button-secondary:hover:not(:disabled) { color: var(--public-cyan-bright); border-color: rgba(102, 231, 223, .37); background: rgba(18, 43, 62, .9); }

.public-page .message {
  margin-top: 15px;
  padding: 12px 14px;
  border-radius: 8px 3px 8px 3px;
  background: rgba(4, 14, 25, .54);
  font-size: 11px;
}
.public-page .message.info { color: #91d9ea; border-color: rgba(86, 194, 220, .25); background: rgba(40, 129, 157, .09); }
.public-page .message.success { color: #8ae2bd; border-color: rgba(92, 219, 164, .24); background: rgba(50, 166, 117, .09); }
.public-page .message.error { color: #ff9f9d; border-color: rgba(255, 130, 125, .24); background: rgba(193, 61, 67, .09); }

.panel-assurance {
  margin: 23px -30px -30px;
  padding: 13px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border-top: 1px solid rgba(139, 190, 207, .09);
  color: #607a8d;
  background: rgba(2, 11, 21, .25);
  font-size: 8px;
  letter-spacing: .02em;
}
.panel-assurance > span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.panel-assurance i { width: 4px; height: 4px; border-radius: 50%; background: var(--public-cyan); box-shadow: 0 0 7px rgba(102, 231, 223, .62); }

.public-page .results-section {
  margin-bottom: 70px;
  padding: 34px;
  border: 1px solid var(--public-line);
  border-radius: 18px 5px 18px 5px;
  background: rgba(9, 23, 39, .72);
  box-shadow: 0 28px 70px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .035);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.public-page .section-heading { margin-bottom: 26px; }
.public-page .section-heading h2 { margin: 9px 0 7px; color: var(--public-ink); font-size: 28px; }
.public-page .section-heading p { color: var(--public-muted); font-size: 12px; }
.public-page .download-actions { justify-content: flex-end; }
.public-page .download-actions .button-primary { min-height: 44px; }

.public-page .code-results { gap: 8px; }
.public-page .code-result {
  padding: 11px 14px;
  align-items: center;
  border-color: rgba(140, 190, 207, .13);
  border-radius: 8px 3px 8px 3px;
  color: #a9bec8;
  background: rgba(5, 17, 30, .56);
}

.public-page .account-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.public-page .account-card {
  padding: 18px;
  border-color: rgba(140, 190, 207, .14);
  border-radius: 11px 3px 11px 3px;
  color: var(--public-ink);
  background: linear-gradient(135deg, rgba(17, 36, 56, .78), rgba(6, 18, 31, .64));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .028);
}
.public-page .account-card h3 { color: #e5eff1; font-size: 13px; }
.public-page .account-meta { color: #647d91; font-size: 9px; }
.public-page .account-meta strong { color: #a9bdc7; font-size: 11px; }

.public-page .badge { border: 1px solid transparent; background: rgba(255, 255, 255, .04); font-size: 8px; }
.public-page .badge.green { color: #82e3b8; border-color: rgba(116, 224, 174, .16); background: rgba(116, 224, 174, .07); }
.public-page .badge.red { color: #ff9693; border-color: rgba(255, 130, 125, .16); background: rgba(255, 130, 125, .07); }
.public-page .badge.amber { color: var(--public-gold-bright); border-color: rgba(215, 182, 107, .16); background: rgba(215, 182, 107, .07); }
.public-page .badge.blue { color: #84d9e8; border-color: rgba(102, 201, 222, .16); background: rgba(102, 201, 222, .07); }

.public-page .site-footer {
  min-height: 70px;
  padding: 22px 0;
  align-items: center;
  border-top-color: rgba(149, 200, 218, .09);
  color: #50687d;
  font-size: 9px;
}
.footer-brand { display: inline-flex; align-items: center; gap: 7px; color: #688094; font-weight: 700; letter-spacing: .06em; }
.footer-brand > span { color: var(--public-gold); font-size: 6px; }

@media (max-width: 980px) {
  .public-page .hero { grid-template-columns: minmax(0, 1fr) minmax(390px, .92fr); gap: 42px; }
  .public-page .hero h1 { font-size: clamp(45px, 6vw, 62px); }
  .public-page .account-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  .public-page .site-header,
  .public-page .public-main,
  .public-page .site-footer { width: min(100% - 30px, 650px); }
  .public-page .site-header { height: 76px; }
  .public-page .hero { min-height: 0; padding: 48px 0 66px; grid-template-columns: 1fr; gap: 45px; }
  .public-page .hero-copy { max-width: none; }
  .public-page .hero h1 { font-size: clamp(44px, 11vw, 66px); }
  .public-page .feature-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .public-page .feature-list li { padding: 14px 12px; grid-template-columns: 32px minmax(0, 1fr); }
  .public-page .feature-state { display: none; }
  .public-page .redeem-panel { padding: 28px; }
  .panel-assurance { margin-right: -28px; margin-left: -28px; }
  .public-page .results-section { padding: 27px; }
}

@media (max-width: 600px) {
  .public-page .site-header,
  .public-page .public-main,
  .public-page .site-footer { width: min(100% - 24px, 520px); }
  .public-page .site-header { height: 70px; }
  .public-page .brand-mark { width: 38px; height: 38px; }
  .public-page .brand strong { font-size: 13px; }
  .public-page .brand small { font-size: 8px; }
  .trust-status { min-height: 30px; padding: 0 10px; font-size: 0; }
  .trust-status::after { content: "安全通道"; font-size: 9px; }
  .public-page .hero { padding: 37px 0 54px; gap: 36px; }
  .public-page .hero h1 { margin: 17px 0 18px; font-size: clamp(40px, 12.5vw, 56px); letter-spacing: -.045em; }
  .public-page .hero-lead { font-size: 13px; line-height: 1.8; }
  .public-page .feature-list { margin-top: 29px; grid-template-columns: 1fr; }
  .public-page .feature-list li { min-height: 60px; grid-template-columns: 34px minmax(0, 1fr) auto; }
  .public-page .feature-state { display: inline; }
  .public-page .redeem-panel { padding: 22px; }
  .redeem-panel-header { margin-bottom: 22px; }
  .redeem-panel-header h2 { font-size: 21px; }
  .security-seal { width: 41px; height: 41px; }
  .public-page textarea { min-height: 174px; }
  .panel-assurance { margin: 21px -22px -22px; padding: 12px 18px; flex-wrap: wrap; gap: 8px 14px; justify-content: flex-start; }
  .public-page .results-section { margin-bottom: 45px; padding: 22px; }
  .public-page .section-heading { align-items: stretch; }
  .public-page .download-actions { width: 100%; flex-direction: column; }
  .public-page .download-actions .button { width: 100%; }
  .public-page .account-grid { grid-template-columns: 1fr; }
  .public-page .site-footer { min-height: 0; align-items: flex-start; flex-direction: column; gap: 9px; }
}

@media (max-width: 380px) {
  .trust-status { display: none; }
  .public-page .field-help { align-items: flex-start; flex-direction: column; gap: 5px; }
  .public-page .feature-state { display: none; }
}
