:root {
  color-scheme: light;
  font-family: "Geist", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #211c17;
  background: #f7f5ef;
  font-synthesis: none;
  --ink: #1c1917;
  --orange: #ff962e;
  --orange-hover: #ffad55;
  --accent: #874009;
  --blue: #75bde8;
  --blue-ink: #174f70;
  --muted: #665c51;
  --line: #e4ded3;
  --surface: #fffdfa;
  --focus: #176e9c;
  --radius: 16px;
  --page-pad: clamp(20px, 3.2vw, 44px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 300px; line-height: 1.5; }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
button, summary { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 1.25rem; letter-spacing: -.03em; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 5; top: 12px; left: 12px; padding: 12px; background: white; border-radius: 8px; }

.shell { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 25px 16px 18px;
  background: var(--ink);
  color: #f7efe3;
}
.sidebar :focus-visible { outline-color: var(--blue); }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-height: 44px;
  margin: 0 0 35px 4px;
}
.brand-icon { display: block; width: 44px; height: 44px; flex: none; object-fit: contain; }
.brand-name { font-size: 1.2rem; line-height: 1.15; font-weight: 820; }
.brand-name-en { display: block; margin-top: 4px; color: var(--orange); font-size: .8125rem; font-weight: 690; letter-spacing: .035em; }
nav { display: grid; gap: 6px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 47px;
  padding: 0 13px;
  border-radius: 9px;
  font-size: .94rem;
  font-weight: 640;
  color: #ded2c4;
  transition: background-color 160ms ease, color 160ms ease;
}
.nav-link:hover { background: #383028; color: #fff6ea; }
.nav-link[aria-current] { background: var(--orange); color: var(--ink); }
.nav-icon { position: relative; display: inline-block; width: 16px; height: 16px; flex: none; border: 1.6px solid currentColor; border-radius: 4px; }
.icon-grid::before, .icon-grid::after, .icon-card::after, .icon-nodes::before, .icon-nodes::after, .icon-wallet::after { content: ""; position: absolute; background: currentColor; }
.icon-grid::before { width: 1px; height: 100%; left: calc(50% - .5px); }
.icon-grid::after { height: 1px; width: 100%; top: calc(50% - .5px); }
.icon-card, .icon-wallet { height: 12px; border-radius: 3px; }
.icon-card::after { height: 1px; width: 100%; top: 3px; left: 0; }
.icon-wallet::after { width: 4px; height: 4px; right: 1px; top: 2.3px; border-radius: 50%; }
.icon-nodes { width: 7px; height: 7px; margin: 0 5px 7px 4px; border-radius: 50%; }
.icon-nodes::before, .icon-nodes::after { width: 6px; height: 6px; top: 8px; border-radius: 50%; }
.icon-nodes::before { left: -5px; }
.icon-nodes::after { right: -5px; }
.sidebar-end { margin-top: auto; padding-top: 24px; }
.lab-note { padding: 13px; border: 1px solid #4a3d32; border-radius: 12px; background: #2b2520; }
.lab-note strong { display: block; color: #ffbd7c; font-size: .875rem; }
.lab-note p { margin-top: 5px; color: #d5c6b5; font-size: .8125rem; line-height: 1.6; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 68px;
  padding: 0 max(var(--page-pad), calc((100% - 1272px) / 2));
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  font-size: .9375rem;
  font-weight: 700;
}
.account {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 4px 11px 4px 5px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--surface);
  color: var(--ink);
  font-size: .875rem;
  font-weight: 680;
}
.account:hover:not(:disabled) { background: #f0f8fc; border-color: #94bed5; }
.account-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #def0fa; color: var(--blue-ink); }
#account-label { max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content { max-width: 1360px; margin: 0 auto; padding: 28px var(--page-pad) 0; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(245px, .78fr);
  align-items: center;
  min-height: 226px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid #352820;
  border-radius: 20px;
  color: #fff7ed;
  background: linear-gradient(110deg, #201a17, #2c211a 62%, #69401f);
}
.hero-copy { z-index: 1; padding: 30px 0 30px clamp(24px, 4vw, 54px); }
.hero h1 { font-size: clamp(2.45rem, 4.4vw, 3.6rem); font-weight: 850; letter-spacing: -.06em; line-height: 1.08; }
.hero-copy > p { max-width: 26rem; margin-top: 11px; color: #e1cdbc; line-height: 1.7; }
.hero .button { margin-top: 18px; }
.hero :focus-visible { outline-color: #ffd2a3; }
.hero-art { position: relative; display: grid; min-height: 100%; place-items: center; isolation: isolate; }
.hero-art::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 132%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, #ffbf7940 0 1px, transparent 1px 28px), radial-gradient(circle, #c66a29 0%, #c66a2900 64%);
}
.hero-art img { display: block; width: min(77%, 216px); height: auto; margin: 10px 0; filter: drop-shadow(0 8px 0 #1c191752); }

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: .9rem;
  font-weight: 720;
  text-align: center;
  transition: background-color 160ms ease, border-color 160ms ease;
}
.button-primary { background: var(--orange); color: var(--ink); border-color: #ec8422; }
.button-primary:hover:not(:disabled) { background: var(--orange-hover); }
.button-outline { background: var(--surface); border-color: #d7cdbf; color: var(--ink); }
.button-outline:hover:not(:disabled) { background: #fff1df; border-color: #db9a61; }

.summary { display: grid; grid-template-columns: 1.2fr 1fr .95fr; gap: 14px; margin-top: 16px; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.summary .panel { display: flex; flex-direction: column; min-height: 188px; padding: 17px 19px 12px; }
.summary .panel-foot { min-height: 51px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 29px; }
.panel-heading h2 { font-size: .95rem; }
.metric-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 6px 0 9px; }
.metric-row strong, .subscription-title, #wallet-balance {
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-weight: 810;
  letter-spacing: -.055em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.metric-row small { font-size: 1rem; letter-spacing: 0; }
.metric-row > span, .panel-foot, .subscription-date, #wallet-note, #wallet-empty { color: var(--muted); font-size: .875rem; }
progress { display: block; appearance: none; width: 100%; height: 8px; border: 0; border-radius: 8px; overflow: hidden; background: #e5edf1; color: #2782b4; accent-color: #2782b4; }
progress::-webkit-progress-bar { background: #e5edf1; }
progress::-webkit-progress-value { background: #2782b4; border-radius: 8px; }
progress::-moz-progress-bar { background: #2782b4; border-radius: 8px; }
.panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 7px; line-height: 1.45; }
.text-button { flex: none; min-height: 44px; padding: 4px 0; border: 0; background: none; color: var(--blue-ink); font-size: .875rem; font-weight: 690; }
.text-button:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 3px; }
.subscription-panel { background: #fffcf5; }
.subscription-title { margin: 7px 0 9px; }
.subscription-date { margin-top: 10px; }
.status { display: inline-flex; width: fit-content; align-items: center; padding: 4px 9px; border-radius: 20px; font-size: .8125rem; font-weight: 690; white-space: nowrap; }
.neutral { background: #eeeae3; color: #5d5349; }
.good { background: #dff4e8; color: #17593e; }
.warning { background: #ffead0; color: #7c3a0a; }

.wallet-panel { background: #eff7fb; border-color: #d3e4ed; scroll-margin-top: 20px; }
.wallet-main { margin: 7px 0 3px; }
#wallet-balance { display: block; color: var(--blue-ink); }
#wallet-note { margin-top: 9px; }
#wallet-history { width: min(calc(100% - 28px), 570px); }
.wallet-table { max-height: min(55dvh, 30rem); margin-top: 14px; border: 1px solid var(--line); border-radius: 10px; overflow: auto; }
.wallet-table th { position: sticky; top: 0; }
.wallet-table td:nth-child(2) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.wallet-table .credit { color: #17593e; }
.wallet-table .debit { color: var(--accent); }

.section { margin-top: 34px; scroll-margin-top: 20px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.section-heading h2 { font-size: clamp(1.35rem, 2vw, 1.7rem); }
.section-heading p { margin-top: 2px; color: var(--muted); font-size: .9375rem; }
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.plan { display: flex; flex-direction: column; gap: 12px; padding: 19px; }
.plan-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.plan h3 { font-size: 1.1rem; }
.plan-price { font-size: clamp(1.6rem, 3vw, 2.15rem); line-height: 1.08; font-weight: 820; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.plan-price small { font-size: .875rem; color: var(--muted); letter-spacing: 0; font-weight: 530; white-space: nowrap; }
.plan-features { color: var(--muted); font-size: .9rem; line-height: 1.55; }
.plan .button { width: 100%; margin-top: auto; }
.subscription-empty { padding: 18px; color: var(--muted); font-size: .9375rem; }
.subscription-access-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 15px 19px; }
.subscription-access-row + .subscription-access-row { border-top: 1px solid var(--line); }
.subscription-access-row h3 { font-size: 1rem; }
.subscription-access-row p { margin-top: 3px; color: var(--muted); font-size: .875rem; }
.subscription-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.test-controls { margin-top: 22px; border-top: 1px solid var(--line); }
.test-controls summary { width: fit-content; padding: 10px 0; color: var(--muted); font-size: .875rem; font-weight: 650; }
.test-controls div { display: flex; flex-wrap: wrap; gap: 3px 17px; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 12px 17px; border-bottom: 1px solid var(--line); text-align: left; font-size: .9rem; }
th { color: var(--muted); font-weight: 690; background: #f6f2e9; }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 650; }
footer { padding: 25px 0; color: var(--muted); font-size: .8125rem; }

dialog { width: min(calc(100% - 28px), 450px); padding: 24px; border: 1px solid var(--line); border-radius: 19px; background: var(--surface); color: inherit; box-shadow: 0 24px 80px #1c191745; }
dialog::backdrop { background: #1c191798; }
dialog h2 { margin-right: 40px; }
dialog p { margin: 9px 0 14px; color: var(--muted); line-height: 1.65; }
.dialog-close { position: absolute; right: 11px; top: 11px; width: 44px; height: 44px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-size: 1.6rem; }
.dialog-close:hover { background: #f3e9da; }
dialog label { display: block; margin-bottom: 6px; font-weight: 640; }
dialog input { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid #a79a8c; border-radius: 8px; background: white; color: var(--ink); }
.field { margin-top: 10px; }
#dialog-error { margin: 10px 0 0; color: #9d2635; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 16px; }
#recharge-options { min-width: 0; border: 0; padding: 0; margin: 0; }
#recharge-options legend { margin-bottom: 7px; font-size: .9rem; font-weight: 670; }
.recharge-amounts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.recharge-amounts label { position: relative; margin: 0; cursor: pointer; }
.recharge-amounts input { position: absolute; opacity: 0; width: 1px; min-height: 0; height: 1px; }
.recharge-amounts span { display: grid; place-items: center; min-height: 44px; padding: 4px; border: 1px solid #d7cdbf; border-radius: 9px; }
.recharge-amounts input:checked + span { background: #fff0dc; border-color: var(--accent); color: var(--accent); }
.recharge-amounts input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.toast { position: fixed; z-index: 4; right: 18px; bottom: 18px; max-width: calc(100% - 36px); padding: 12px 16px; border-radius: 10px; background: var(--ink); color: #fff6e9; box-shadow: 0 8px 30px #1c191738; }
.noscript { padding: 16px; background: #fff1d7; }

@media (max-width: 1140px) {
  .shell { grid-template-columns: 182px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .summary .panel { padding-inline: 14px; }
  .summary .panel-foot { flex-wrap: wrap; }
}

@media (max-width: 940px) {
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary .wallet-panel { grid-column: 1 / -1; min-height: 0; }
  .hero { min-height: 210px; }
}

@media (max-width: 720px) {
  :root { --page-pad: 16px; }
  .shell { display: block; }
  .sidebar { position: static; height: auto; padding: 10px var(--page-pad) 7px; }
  .brand { margin: 0 0 6px; }
  .sidebar nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .nav-link { min-height: 44px; gap: 6px; padding-inline: 8px; font-size: .875rem; }
  .sidebar-end { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding-top: 3px; }
  .lab-note { padding: 6px 0; border: 0; background: transparent; }
  .lab-note strong { display: none; }
  .lab-note p { margin: 0; }
  .topbar { min-height: 56px; }
  .content { padding-top: 16px; }
  .hero-copy { padding-left: 23px; }
  .section { margin-top: 26px; }
}

@media (max-width: 540px) {
  .sidebar nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sidebar nav .nav-link { justify-content: center; padding-inline: 3px; }
  .sidebar nav .nav-icon { display: none; }
  .hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); min-height: 185px; }
  .hero-copy { padding: 22px 0 22px 16px; }
  .hero h1 { font-size: clamp(1.85rem, 8.1vw, 2.55rem); }
  .hero-copy > p { margin-top: 9px; font-size: .92rem; }
  .hero .button { margin-top: 13px; }
  .hero-art img { width: min(93%, 180px); }
  .summary, .plan-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .summary .panel { min-height: 144px; padding: 13px 15px 9px; }
  .summary .panel-foot { flex-wrap: nowrap; }
  .section-heading { flex-wrap: wrap; align-items: flex-start; }
  .section-heading .button { flex: none; }
  .subscription-access-row { padding: 13px 15px; }
  th, td { padding: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nav-link, .button { transition: none; }
}
