:root {
  color-scheme: light;
  --paper: #ffffff;
  --sheet: #ffffff;
  --ink: #263742;
  --muted: #526370;
  --line: #cad4d5;
  --amber: #355f73;
  --amber-light: #dce7e8;
  --serif: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  --sans: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  font-family: var(--sans);
  background: var(--paper);
}

html { scroll-behavior: auto; }
body {
  background: #ffffff;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { letter-spacing: 0; }
:focus-visible { outline-color: #376b82; }
.muted { color: var(--muted); }
.eyebrow { color: #526370; font-family: var(--sans); font-size: 12px; font-weight: 600; }
.text-link, .auth-help, .account-support { color: #1769b5; text-decoration: none; }
.text-link:hover, .auth-help:hover, .account-support:hover { color: #0a4c8c; text-decoration: underline; }

.brand-mark {
  width: 38px; height: 38px; flex-basis: 38px; border: 1px solid #cad6d8; border-radius: 8px;
  background: linear-gradient(145deg, #edf2f1, #a9bec3 56%, #91a9b0);
  box-shadow: inset 0 1px #ffffff80, inset 0 -1px #6e858a55, 0 3px 9px #52697024;
  color: #223e57; font-family: var(--sans); font-size: 19px;
}
.brand { gap: 10px; min-width: auto; color: #243549; font-family: var(--sans); font-size: 16px; font-weight: 750; }
.brand-suffix { color: #556773; font-family: var(--sans); font-size: 10px; }
.boot-screen { background: var(--paper); }

.app-shell { display: grid; grid-template-columns: 180px minmax(0, 1fr); min-height: 100dvh; }
.topbar {
  position: sticky; z-index: 12; top: 0; grid-column: 1; grid-row: 1;
  min-height: 100dvh; height: 100dvh; border: 0; border-right: 1px solid #cdd6d5;
  background: #ffffff;
  box-shadow: inset 1px 0 #ffffff75, 4px 0 16px #5269700d;
  backdrop-filter: blur(20px) saturate(100%);
  -webkit-backdrop-filter: blur(20px) saturate(100%);
}
.topbar-inner { display: flex; width: 100%; min-height: 100%; flex-direction: column; align-items: stretch; padding: 25px 14px 22px; }
.topbar .brand { padding: 0 3px; }
.topbar .brand-text { display: grid; min-width: 0; gap: 2px; }
.topbar .brand-title { font-size: 15px; }
.topbar .brand-suffix { display: block; margin-left: 0; font-size: 10px; }
.desktop-nav { display: flex; align-self: stretch; flex-direction: column; gap: 5px; margin: 43px 0 0; }
.nav-button { min-height: 44px; border: 1px solid transparent; border-radius: 7px; padding: 10px 13px; color: #485d70; font-size: 13px; font-weight: 650; text-align: left; }
.nav-button:hover { border-color: #ffffffbd; background: #ffffff6b; color: #1f425f; }
.nav-button.active { border-color: #d8e0e5; background: #f3f6f8; box-shadow: inset 0 1px #ffffff8c, 0 3px 8px #59758e12; color: #2e5366; }
.nav-button.active::after { top: 10px; right: auto; bottom: 10px; left: -1px; width: 3px; height: auto; background: #638b9a; box-shadow: none; }
.topbar-actions { display: flex; width: 100%; flex-direction: column; align-items: stretch; gap: 12px; margin: auto 0 0; }
.balance-mini { gap: 3px; border-top: 1px solid #cdd7d7; padding: 16px 4px 0; color: #526370; font-family: var(--sans); font-size: 11px; }
.balance-mini strong { color: #2b4055; font-family: var(--sans); font-size: 20px; font-weight: 750; }
.account-button {
  width: 100%; min-height: 39px; border-color: #cbd7d7; border-radius: 7px; padding: 8px 14px;
  background: linear-gradient(155deg, #ffffff, #f1f4f7);
  box-shadow: inset 0 1px #ffffff8c, 0 3px 8px #5e75891c;
  color: #2b465d; font-size: 12px;
}
.account-button:hover { background: linear-gradient(155deg, #fff, #d7eaf4); }
.account-menu {
  top: auto; right: auto; bottom: 0; left: calc(100% + 14px); min-width: 220px; gap: 0;
  border-color: #ffffffde; border-radius: 8px; padding: 14px;
  background: #f8fbfcf7; box-shadow: 0 15px 30px #334f6647;
  backdrop-filter: blur(24px);
}
.account-menu > strong { margin-bottom: 2px; font-size: 14px; }
.account-menu > .muted { margin-bottom: 9px; font-size: 11px; }
.account-menu .account-menu-link {
  width: 100%; margin: 0; border: 0; border-radius: 5px; padding: 10px 8px;
  color: var(--ink); font-size: 13px; font-weight: 600; text-align: left;
}
.account-menu .account-menu-link:hover { background: #f2f6fa; }
.account-support { display: block; padding: 9px 8px; font-size: 13px; }
.account-menu #logout-button { margin-top: 8px; color: #a33b3b; }

.main-content {
  grid-column: 2; grid-row: 1; align-self: start; width: min(100% - 36px, 1320px);
  min-height: calc(100dvh - 36px); margin: 18px auto; border: 1px solid #d2dcd9;
  border-radius: 8px; padding: 27px 30px 85px;
  background: #ffffff;
  box-shadow: inset 0 1px #ffffff8c, 0 14px 32px #617b921c;
  backdrop-filter: blur(18px) saturate(100%);
  -webkit-backdrop-filter: blur(18px) saturate(100%);
}
.page-heading { min-height: 0; align-items: end; margin-bottom: 22px; }
.page-heading h1 { font-family: var(--sans); font-size: 28px; font-weight: 750; line-height: 1.35; }
.heading-actions { gap: 8px; }
.catalog-hero { border-bottom: 1px solid #cdd8d7; margin-bottom: 24px; padding-bottom: 19px; }
.catalog-hero .page-heading { margin-bottom: 16px; }
.account-strip { border: 0; padding: 0; }
.account-strip > div { gap: 12px; }
.account-strip span, .ledger-summary .muted { font-family: var(--sans); font-size: 12px; }
.account-strip strong, .ledger-summary strong { font-family: var(--sans); font-size: 22px; font-weight: 750; }

.button {
  min-height: 40px; border-radius: 8px; padding: 9px 15px; font-size: 13px; font-weight: 700;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 2px 4px #1c3a5640; }
.button-primary {
  border-color: #416a7b; background: linear-gradient(155deg, #4a7287, #365c70 58%, #2d5266);
  box-shadow: inset 0 1px #ffffff66, inset 0 -1px #1c40504d, 0 2px 0 #476b78, 0 5px 11px #395b6840;
  color: #fff;
}
.button-primary:hover:not(:disabled) { background: linear-gradient(155deg, #416a7e, #30576a 58%, #294b5e); box-shadow: inset 0 1px #ffffff75, 0 3px 0 #476b78, 0 7px 14px #395b6847; }
.button-secondary {
  border-color: #cbd8d8; background: linear-gradient(150deg, #ffffff, #f1f4f7 62%, #e9eff3);
  box-shadow: inset 0 1px #ffffff9c, inset 0 -1px #8aa6b933, 0 2px 0 #d1ddda, 0 5px 12px #596f8024;
  color: #2a445a;
}
.button-secondary:hover:not(:disabled) { background: linear-gradient(150deg, #ffffff, #e9eff3); box-shadow: inset 0 1px #ffffffad, 0 3px 0 #d1ddda, 0 7px 15px #596f8030; }
.button-danger { border-color: #b53d3d; background: #b53d3d; }
.button-register { border-color: #8a572f; background: linear-gradient(180deg, #966644, #785032); box-shadow: inset 0 1px #ffffff66, 0 2px 0 #65442e, 0 5px 11px #6d51332e; color: #fff; }
.button-register:hover:not(:disabled) { background: linear-gradient(180deg, #895c3d, #70472e); }

label { color: #394a5d; font-size: 13px; font-weight: 650; }
input, select, textarea {
  min-height: 43px; border-color: #cbd6d6; border-radius: 8px; background: #ffffff; color: var(--ink);
  box-shadow: inset 0 1px 3px #617d9018;
}
input:focus, select:focus, textarea:focus { border-color: #547d8c; box-shadow: 0 0 0 3px #a9c6c26b, inset 0 1px 3px #617d901e; }
select:disabled { border-color: #e2e8ef; background: #f5f7fa; color: #7b8898; cursor: not-allowed; }
input::placeholder, textarea::placeholder { color: #5b6d76; }
select option { background: #fff; color: var(--ink); }
.form-error { color: #b03838; }

.auth-screen { min-height: 100dvh; padding: 26px 20px; background: #ffffff; }
.auth-wrap { width: min(100%, 590px); grid-template-columns: 1fr; gap: 22px; margin: auto; }
.auth-heading { align-self: auto; justify-content: center; gap: 10px; border: 0; padding: 0; }
.auth-heading .brand-name { font-family: var(--sans); font-size: 20px; font-weight: 750; }
.auth-heading .muted { font-family: var(--sans); font-size: 11px; }
.auth-panel { grid-column: 1; grid-row: auto; border-color: #e0e6ed; border-radius: 8px; padding: 28px 38px 30px; background: #fff; box-shadow: 0 14px 36px #243e5c18; }
.auth-tabs { justify-content: flex-end; gap: 0; border: 0; }
.auth-tab { min-height: 34px; border: 1px solid #e0e6ed; padding: 5px 15px; color: #58687b; font-size: 12px; }
.auth-tab:first-child { border-radius: 5px 0 0 5px; }
.auth-tab:last-child { border-radius: 0 5px 5px 0; border-left: 0; }
.auth-tab.active { background: #eaf3fc; color: #1769b5; }
.auth-tab.active::after { display: none; }
.auth-panel h1 { margin: 25px 0 5px; font-family: var(--sans); font-size: 24px; font-weight: 750; text-align: center; }
.auth-panel > .muted { margin-bottom: 22px; text-align: center; }
.auth-panel label { margin: 14px 0 6px; }
.auth-panel input { min-height: 47px; }
.auth-panel .button-block { min-height: 47px; margin-top: 20px; }
.auth-help { justify-self: center; font-size: 12px; }
.auth-switch { display: flex; justify-content: center; gap: 8px; margin: 17px 0 0; color: #748195; font-size: 13px; }
.auth-switch button { border: 0; padding: 0; background: none; color: #1769b5; font-weight: 700; }
.password-field { position: relative; }
.password-field input { padding-right: 65px; }
.password-toggle { position: absolute; top: 2px; right: 3px; bottom: 2px; border: 0; padding: 0 12px; background: transparent; color: #1769b5; font-size: 12px; font-weight: 650; }

.catalog-browser { display: block; border: 0; padding: 0; background: transparent; }
.platform-sidebar {
  border: 0; padding: 0; background: transparent; box-shadow: none;
}
.platform-sidebar h2 { margin: 0 0 11px; color: #526370; font-family: var(--sans); font-size: 12px; font-weight: 700; }
.platform-tabs { display: flex; gap: 9px; overflow-x: auto; padding: 3px 2px 9px; scrollbar-width: none; }
.platform-tabs::-webkit-scrollbar { display: none; }
.platform-tab {
  display: flex; width: auto; min-height: 51px; flex: 0 0 auto; align-items: center; gap: 9px;
  border: 1px solid #cedad8; border-radius: 8px; padding: 9px 13px;
  background: #ffffff;
  box-shadow: inset 0 1px #ffffff91, 0 3px 8px #607d911c;
  color: #344d62; font-size: 12px; font-weight: 650; text-align: left; white-space: nowrap;
  backdrop-filter: blur(15px);
  transition: transform .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.platform-tab:hover { transform: translateY(-2px); border-color: #adbec0; background: #f5f7f9; box-shadow: inset 0 1px #ffffff91, 0 6px 12px #607d9128; }
.platform-tab.active {
  border-color: #aebfc1; background: #edf3f6;
  box-shadow: inset 0 1px #ffffff91, 0 4px 9px #5b819c24;
  color: #2e5869;
}
.platform-tab-icon { width: 18px; height: 18px; flex: 0 0 18px; opacity: .66; }
.platform-tab.active .platform-tab-icon { opacity: .9; }
.catalog-results { min-width: 0; margin-top: 22px; }
.catalog-controls { width: 100%; margin: 0 0 21px; }
.catalog-controls label { margin: 0 0 8px; }
.search-row { gap: 9px; }
.search-row input { min-width: 0; min-height: 51px; border-color: #c9d5d4; background: #ffffff; box-shadow: inset 0 1px 3px #58748717, 0 4px 10px #708a9a16; backdrop-filter: blur(12px); }
.search-row .button { min-width: 96px; }
.catalog-list-heading { align-items: center; border-bottom: 1px solid #cdd8d7; margin-bottom: 15px; padding-bottom: 13px; }
.list-heading h2 { font-family: var(--sans); font-size: 17px; font-weight: 750; }
.list-heading .muted { font-family: var(--sans); font-size: 12px; }
.catalog-tools { gap: 9px; }
.catalog-tools label { color: #526174; font-family: var(--sans); font-size: 12px; }
.catalog-tools select { width: min(300px, 30vw); min-height: 37px; border-color: #cbd6d6; background: #ffffff; }
.catalog-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; border: 0; }
.data-list { border-top: 1px solid var(--line); }
.catalog-row {
  display: flex; min-width: 0; min-height: 180px; flex-direction: column; align-items: stretch; gap: 9px;
  border: 1px solid #d1dcda; border-radius: 8px; padding: 16px 16px 15px;
  background: #ffffff;
  box-shadow: inset 0 1px #ffffff9c, 0 5px 13px #5a728d1c;
  backdrop-filter: blur(12px) saturate(100%);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.catalog-row:nth-child(even) { background: #fafbfc; }
.catalog-row:hover { transform: translateY(-3px); border-color: #acbfc0; padding-left: 16px; background: #f5f8fa; box-shadow: inset 0 1px #ffffff9c, 0 9px 18px #5a728d2a; }
.catalog-main strong { display: block; font-size: 14px; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; }
.catalog-main .muted { display: block; margin-top: 7px; color: #526370; font-family: var(--sans); font-size: 11px; }
.catalog-code { color: #315f72; font-weight: 750; }
.catalog-category { color: #526370; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.catalog-card-footer { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin-top: auto; border-top: 1px solid #cdd8d7; padding-top: 12px; }
.catalog-price { color: #27445b; font-family: var(--sans); font-size: 15px; font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1.25; white-space: normal; overflow-wrap: anywhere; }
.catalog-row .button { min-width: 88px; min-height: 34px; flex: 0 0 auto; padding: 6px 10px; }
.pagination { color: #526370; font-family: var(--sans); font-size: 12px; }
.state-message { border-color: var(--line); }
.state-message.error { color: #b03838; }

.view:not(#catalog-view) > .page-heading { border-bottom: 1px solid #cdd8d7; padding: 0 0 19px; }
.segmented { border-color: #cdd8d7; border-radius: 8px; background: #f2f5f7; box-shadow: inset 0 1px #ffffff8c, 0 3px 9px #61798a15; backdrop-filter: blur(15px); }
.segmented button { border-radius: 4px; color: #536378; }
.segmented button.active { background: #ffffff; color: #315f72; box-shadow: inset 0 1px #ffffff91, 0 2px 6px #5d7a8b20; }
.work-form { border: 1px solid #d1dcda; border-radius: 8px; padding: 18px 22px 24px; background: #ffffff; box-shadow: inset 0 1px #ffffff91, 0 5px 13px #5a728d17; backdrop-filter: blur(18px); }
.work-form textarea { font-family: Consolas, "Microsoft YaHei", monospace; }
.field-hint { font-family: var(--sans); }
.preview-list, .preview-total { border-color: var(--line); }
.preview-index { color: #1769b5; }
.preview-right strong, .preview-total strong { font-family: var(--sans); }
.preview-status.done, .amount-positive { color: #127254; }
.preview-status.failed, .amount-negative { color: #b03838; }
.data-list { overflow: hidden; border: 1px solid #d1dcda; border-radius: 8px; background: #ffffff; box-shadow: inset 0 1px #ffffff91, 0 5px 13px #5a728d17; backdrop-filter: blur(18px); }
.data-header { border-color: var(--line); color: #526370; font-family: var(--sans); }
.data-row { border-color: #e8edf2; }
.data-row:nth-child(odd) { background: #fafbfc; }
.data-row:hover { background: #f1f5f8; }
.cell-link { color: #1769b5; }
.status { border-color: #dce4ec; border-radius: 4px; background: #f1f4f7; }
.status.done { border-color: #b9dfcf; background: #e9f7f0; color: #1c7255; }
.status.pending { border-color: #f0d8a7; background: #fff5de; color: #8b5a12; }
.status.failed { border-color: #ebc6c6; background: #fdf0f0; color: #a33b3b; }
.ledger-summary { border-color: var(--line); }

.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 30px; border: 1px solid #d1dcda; border-radius: 8px; padding: 24px 26px; background: #ffffff; box-shadow: inset 0 1px #ffffff91, 0 5px 13px #5a728d17; backdrop-filter: blur(18px); }
.profile-layout h2 { margin: 0 0 15px; color: #526174; font-size: 13px; font-weight: 700; }
.profile-balance > strong { display: block; margin-bottom: 22px; font-size: 34px; font-weight: 750; font-variant-numeric: tabular-nums; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.profile-account dl { margin: 0; }
.profile-account dl > div { display: flex; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); padding: 11px 0; font-size: 13px; }
.profile-account dt { color: var(--muted); }
.profile-account dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; text-align: right; }
.profile-links { margin-top: 22px; border-top: 1px solid var(--line); }
.profile-link { display: flex; width: 100%; justify-content: space-between; gap: 12px; border: 0; border-bottom: 1px solid var(--line); padding: 17px 12px; background: transparent; color: var(--ink); font-size: 14px; font-weight: 650; text-align: left; }
.profile-link:hover { color: #1769b5; }
.profile-logout { margin-top: 26px; }

.recharge-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; margin-bottom: 32px; }
.recharge-layout .work-form { width: 100%; max-width: none; margin: 0; }
.recharge-layout h2, .api-console h2, .api-docs h2 { margin: 0 0 17px; font-size: 17px; font-weight: 700; }
.recharge-layout input[type="number"] { width: 100%; }
.recharge-presets { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 23px; }
.recharge-presets button { border: 1px solid #cbd8d6; border-radius: 5px; padding: 6px 12px; background: #eaf0ed; color: var(--ink); font-size: 12px; }
.recharge-presets button:hover { background: #dce9e5; }
.recharge-methods { display: flex; flex-wrap: wrap; gap: 10px; border: 0; padding: 0; margin: 0; }
.recharge-methods legend { margin-bottom: 9px; color: #394a5d; font-size: 13px; font-weight: 650; }
.recharge-methods label { display: flex; min-width: 138px; flex: 0 0 auto; align-items: center; gap: 8px; border: 1px solid #cbd8d6; border-radius: 6px; padding: 10px 12px; background: #f2f6f3; white-space: nowrap; cursor: pointer; }
.recharge-methods input { width: 16px; height: 16px; min-height: 0; flex: 0 0 16px; margin: 0; accent-color: #365c70; }
.recharge-layout .field-hint { margin: 15px 0; color: var(--muted); font-size: 12px; }
.recharge-invoice { min-width: 0; border: 1px solid #cbd8d6; border-radius: 8px; padding: 18px 20px; background: #ffffff; box-shadow: inset 0 1px #ffffff91, 0 5px 13px #5a728d17; }
.recharge-invoice img { width: 190px; height: 190px; margin: 12px auto; border: 8px solid #fff; background: #fff; }
.recharge-invoice dl { margin: 14px 0; }
.recharge-invoice dl > div { display: flex; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); padding: 10px 0; font-size: 13px; }
.recharge-invoice dt { color: var(--muted); white-space: nowrap; }
.recharge-invoice dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; text-align: right; }
.recharge-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.recharge-history-row, .api-key-row { display: flex; min-width: 0; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); padding: 13px 17px; font-size: 13px; }
.recharge-history-row:last-child, .api-key-row:last-child { border-bottom: 0; }
.recharge-history-row > div, .api-key-row > div { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.recharge-history-row small, .api-key-row small { display: block; margin-top: 4px; font-size: 11px; }
.recharge-history-row .button, .api-key-row .button { min-height: 34px; }
.api-console { max-width: 800px; margin-bottom: 29px; }
.api-console .search-row { margin-top: 8px; }
.api-console input { min-width: 0; flex: 1; }
.api-secret { margin: 16px 0; border: 1px solid #bdcecb; border-radius: 6px; padding: 12px; background: #e9f0ec; }
.api-secret p { margin: 0 0 8px; font-size: 12px; }
.api-secret code { display: block; margin-bottom: 10px; font-size: 13px; overflow-wrap: anywhere; user-select: all; }
.api-keys-list { margin-top: 18px; border-top: 1px solid var(--line); }
.api-docs { border-top: 1px solid var(--line); padding: 30px 0 70px; color: var(--ink); font-size: 13px; line-height: 1.65; }
.api-docs code, .api-action { font-family: Consolas, "Courier New", monospace; }
.api-docs code { color: #2e5365; overflow-wrap: anywhere; }
.api-docs-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.api-docs-heading h2 { margin: 3px 0 7px; font-size: 24px; }
.api-docs-heading p { margin: 0; color: var(--muted); }
.api-overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 15px; }
.api-overview > div { display: flex; min-width: 0; gap: 15px; border-bottom: 1px solid var(--line); padding: 11px 10px; }
.api-overview > div:nth-last-child(-n+2) { border-bottom: 0; }
.api-overview span { flex: 0 0 75px; color: var(--muted); }
.api-overview strong { font-weight: 700; }
.api-callout, .api-note { border-left: 3px solid #7c9aa4; padding: 8px 14px; background: #eaf1ef; color: #455a68; }
.api-callout { margin: 15px 0 30px; }
.api-doc-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 36px; }
.api-doc-nav { display: flex; position: sticky; top: 24px; height: max-content; flex-direction: column; border-left: 1px solid var(--line); }
.api-doc-nav a { border-left: 2px solid transparent; margin-left: -1px; padding: 8px 15px; color: #526575; font-weight: 650; text-decoration: none; }
.api-doc-nav a:hover, .api-doc-nav a:focus-visible { border-left-color: #557989; background: #e9f0ed; color: #193746; }
.api-doc-content { min-width: 0; }
.api-doc-section { scroll-margin-top: 28px; border-bottom: 1px solid var(--line); padding: 0 0 29px; margin-bottom: 31px; }
.api-doc-section:last-child { border-bottom: 0; }
.api-section-heading { margin-bottom: 12px; }
.api-action { color: #53707e; font-size: 11px; font-weight: 700; }
.api-section-heading h3 { margin: 4px 0 0; color: var(--ink); font-size: 19px; font-weight: 730; }
.api-doc-section > p { max-width: 760px; margin: 9px 0 16px; }
.api-table-wrap { max-width: 100%; overflow-x: auto; border-top: 1px solid var(--line); margin: 15px 0 19px; }
.api-docs table { width: 100%; min-width: 480px; border-collapse: collapse; text-align: left; }
.api-docs th, .api-docs td { border-bottom: 1px solid var(--line); padding: 9px 12px; vertical-align: top; }
.api-docs th { color: #566b7a; font-size: 12px; font-weight: 700; }
.api-docs td:first-child { white-space: nowrap; }
.api-example { overflow: hidden; border: 1px solid #cbd8d6; border-radius: 6px; margin: 10px 0; background: #e9efec; }
.api-example > div { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #cfdbd8; padding: 6px 12px; color: #506476; font-size: 12px; font-weight: 650; }
.api-copy { min-height: 29px; border: 1px solid #c2d2d1; border-radius: 4px; padding: 3px 11px; background: #f4f7f5; color: #2b4b59; font-weight: 700; }
.api-copy:hover { background: #fff; }
.api-docs pre { max-width: 100%; overflow-x: auto; padding: 13px 15px; margin: 0; font-size: 12px; line-height: 1.6; }
.api-docs pre code { white-space: pre; }

.dialog { border-color: #cbd8d5; border-radius: 8px; background: #ffffff; box-shadow: inset 0 1px #ffffff91, 0 20px 45px #354c6052; backdrop-filter: blur(20px) saturate(100%); }
.dialog::backdrop { background: #293b506b; backdrop-filter: blur(5px); }
.dialog-close { border-color: #dce4ed; border-radius: 5px; color: #526174; }
.dialog-close:hover { background: #f1f6fb; }
.dialog h2 { font-family: var(--sans); font-size: 21px; }
.product-id { color: #1769b5; }
.product-facts, .confirm-list, .confirm-list div { border-color: var(--line); }
.product-facts strong, .confirm-list .confirm-charge dd { color: var(--ink); font-family: var(--sans); }
.product-description { color: #3e4d5d; }
.toast { border-color: #dce4ed; border-radius: 7px; background: #fff; box-shadow: 0 10px 25px #1c345233; }
.toast.error { border-color: #db8f8f; color: #a33b3b; }

@media (max-width: 1100px) {
  .brand-suffix { display: none; }
}

@media (max-width: 1199px) {
  .catalog-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 899px) {
  .app-shell { display: block; }
  .desktop-nav { display: none; }
  .topbar { position: sticky; top: 0; min-height: 60px; height: auto; border-right: 0; border-bottom: 1px solid #cdd8d7; background: #ffffff; }
  .topbar-inner { width: min(100% - 28px, 1180px); min-height: 59px; height: auto; flex-direction: row; align-items: center; padding: 0; margin: auto; }
  .topbar .brand { padding: 0; }
  .topbar-actions { width: auto; flex-direction: row; align-items: center; gap: 12px; margin: 0 0 0 auto; }
  .balance-mini { border: 0; padding: 0; }
  .account-button { width: auto; }
  .account-menu { top: calc(100% + 10px); right: 0; bottom: auto; left: auto; }
  .main-content { width: min(100% - 20px, 1180px); min-height: calc(100dvh - 80px); margin: 10px auto; padding: 22px 17px 96px; }
  .main-content { backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  .mobile-nav { position: fixed; z-index: 12; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); height: calc(60px + env(safe-area-inset-bottom)); border-top: 1px solid #cdd8d7; padding-bottom: env(safe-area-inset-bottom); background: #ffffff; box-shadow: 0 -4px 12px #60788a16; backdrop-filter: blur(18px); }
  .mobile-nav button { border: 0; background: transparent; color: #536a7a; font-size: 12px; font-weight: 650; }
  .mobile-nav button.active { color: #315f72; box-shadow: inset 0 2px #73969c; }
  .catalog-list { grid-template-columns: 1fr; }
  .recharge-layout { grid-template-columns: 1fr; }
  .catalog-row { backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px); }
  .catalog-browser { display: block; }
  .platform-sidebar { margin-bottom: 19px; }
  .platform-tabs { gap: 7px; }
  .platform-tab { min-height: 44px; gap: 7px; padding: 6px 10px; }
  .catalog-tools select { width: min(220px, 37vw); }
  .data-header { display: none; }
  .data-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .data-cell::before { display: block; margin-bottom: 4px; color: var(--muted); content: attr(data-label); font-size: 10px; }
  .data-cell:first-child { grid-column: 1 / -1; }
  .cell-link { white-space: normal; }
}

@media (max-width: 600px) {
  .brand { font-size: 15px; }
  .brand-mark { width: 32px; height: 32px; flex-basis: 32px; font-size: 17px; }
  .balance-mini { display: none; }
  .main-content { width: calc(100% - 12px); margin: 6px auto; padding: 18px 12px 90px; }
  .page-heading { align-items: flex-start; gap: 12px; }
  .page-heading h1 { font-size: 22px; }
  .catalog-hero .page-heading { flex-wrap: wrap; }
  .heading-actions { width: 100%; }
  .heading-actions .button { flex: 1; min-width: 0; }
  .account-strip { gap: 8px; }
  .account-strip strong { font-size: 19px; }
  .catalog-hero { margin-bottom: 20px; }
  .catalog-browser { margin: 0; padding: 0; }
  .platform-sidebar { margin-right: -12px; margin-left: -12px; padding: 0 12px; }
  .catalog-controls { margin-bottom: 18px; }
  .catalog-list-heading { align-items: center; }
  .catalog-tools label, .catalog-tools .muted { display: none; }
  .catalog-tools select { width: min(185px, 40vw); }
  .catalog-row { min-height: 0; gap: 8px; padding: 15px; }
  .catalog-row:hover { padding-left: 15px; }
  .catalog-main strong { font-size: 13px; }
  .catalog-price { font-size: 15px; }
  .profile-layout { grid-template-columns: 1fr; gap: 25px; }
  .profile-layout { padding: 19px 17px; }
  .work-form { padding: 14px 15px 20px; }
  .recharge-invoice { padding: 15px; }
  .recharge-history-row { flex-wrap: wrap; }
  .api-endpoints code { width: auto; flex-basis: 100%; }
  .api-doc-layout { display: block; }
  .api-doc-nav { position: static; flex-direction: row; overflow-x: auto; border-left: 0; border-bottom: 1px solid var(--line); margin-bottom: 26px; white-space: nowrap; }
  .api-doc-nav a { border-left: 0; border-bottom: 2px solid transparent; margin: 0; padding: 9px 12px; }
  .api-doc-nav a:hover, .api-doc-nav a:focus-visible { border-left: 0; border-bottom-color: #557989; }
  .api-overview { grid-template-columns: 1fr; }
  .api-overview > div:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .auth-wrap { gap: 16px; }
  .auth-panel { padding: 22px 20px 25px; }
  .dialog { width: min(100% - 20px, 540px); padding: 20px 18px 24px; }
  .toast { bottom: calc(75px + env(safe-area-inset-bottom)); }
}

@media (max-width: 390px) {
  .search-row .button { min-width: 70px; }
  .catalog-tools select { width: 130px; }
  .catalog-row .button { min-width: 78px; }
  .account-strip > div { gap: 6px; }
  .account-strip strong { font-size: 17px; }
  .product-actions { grid-template-columns: 1fr; }
}

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

@media (prefers-reduced-transparency: reduce) {
  .topbar, .main-content, .catalog-row, .platform-tab, .work-form, .data-list, .profile-layout, .dialog { backdrop-filter: none; -webkit-backdrop-filter: none; background: #ffffff; }
}

@supports not (backdrop-filter: blur(1px)) {
  .topbar, .main-content, .catalog-row, .platform-tab, .work-form, .data-list, .profile-layout, .dialog { background: #ffffff; }
}
