:root {
    color-scheme: dark;
    --bg: #0a0f14;
    --surface: #10191f;
    --surface-raised: #152128;
    --line: #26373d;
    --line-active: #487d6b;
    --text: #eff7f4;
    --muted: #a5b5b6;
    --accent: #8af1bd;
    --accent-soft: #142c24;
    --danger: #ffaaa3;
    --mono: ui-monospace, "SF Mono", Consolas, monospace;
    --sans: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    --radius: 14px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-family: var(--sans); scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.55; }
body > main { min-height: calc(100vh - 152px); }
h1, h2, h3, p, ul, ol, dl, dd, figure, pre { margin: 0; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.035em; }
h2 { font-size: clamp(1.2rem, 2.2vw, 1.75rem); }
h3 { font-size: 1rem; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .6; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { background: var(--accent); color: #071a12; }
.frame { width: min(1232px, calc(100% - 72px)); margin-inline: auto; }
.topbar { border-bottom: 1px solid var(--line); background: #0b1217; }
.topbar-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 28px; min-height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 10px; width: max-content; font-size: 1.23rem; font-weight: 740; letter-spacing: -.055em; }
.brand > span > span { color: var(--accent); }
.brand-mark { position: relative; width: 29px; height: 29px; display: inline-block; border: 1px solid #4e9579; border-radius: 8px; background: #153328; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; width: 9px; height: 9px; border: 1px solid var(--accent); }
.brand-mark::before { top: 6px; left: 6px; }
.brand-mark::after { bottom: 6px; right: 6px; background: var(--accent); }
.topbar nav { display: flex; gap: 24px; align-items: center; height: 100%; }
.topbar nav a { display: flex; align-items: center; position: relative; color: var(--muted); font-size: .9rem; height: 100%; white-space: nowrap; }
.topbar nav a:hover, .topbar nav a[aria-current] { color: var(--text); }
.topbar nav a[aria-current]::after { content: ""; position: absolute; bottom: -1px; inset-inline: 0; height: 2px; background: var(--accent); }
.topbar-actions { justify-self: end; }
.footer { border-top: 1px solid var(--line); margin-top: 76px; color: var(--muted); }
.footer-inner { display: flex; min-height: 81px; gap: 22px; align-items: center; }
.footer-inner > a:last-child { margin-left: auto; white-space: nowrap; font-size: .9rem; }
.footer .brand { color: var(--text); }
.footer .brand-mark { transform: scale(.85); }
.skip { position: fixed; transform: translateY(-120%); z-index: 9; background: var(--accent); color: #071a12; padding: 10px 20px; }
.skip:focus { transform: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.eyebrow { color: var(--accent); font-size: .8rem; font-weight: 680; letter-spacing: .105em; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.button { min-height: 41px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 15px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--surface-raised); font-size: .89rem; font-weight: 630; line-height: 1.25; }
.button:hover { border-color: var(--line-active); background: #1a302d; }
.button:active { transform: translateY(1px); }
.button.primary { background: var(--accent); border-color: var(--accent); color: #082419; }
.button.primary:hover { background: #b0f8d3; border-color: #b0f8d3; }
.button.subtle { background: transparent; }
.button.subtle:hover { background: #18262b; }
.button.compact { min-height: 34px; padding: 6px 11px; font-size: .8rem; }
.button.danger { color: var(--danger); }
.text-link { color: var(--accent); font-size: .9rem; font-weight: 600; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.panel { min-width: 0; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); }
.panel-title, .panel-bar { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.panel-bar { min-height: 54px; padding: 12px 20px; border-bottom: 1px solid var(--line); font-size: .91rem; }
.panel-bar h2, .panel-title h2 { font-size: 1.18rem; }
.stack { display: grid; gap: 17px; }
.status { color: var(--accent); font-size: .86rem; min-height: 1.25em; }
.status:empty { display: none; }
.status[data-tone="error"] { color: var(--danger); }
.status[data-tone="busy"] { color: var(--muted); }
input:not([type="radio"], [type="checkbox"]), select, textarea { min-width: 0; color: var(--text); background: #0d151a; border: 1px solid #34464b; border-radius: 8px; padding: 10px 11px; }
input::placeholder, textarea::placeholder { color: #849397; }
textarea { resize: vertical; }
input[type="file"] { max-width: 100%; }
input[type="file"]::file-selector-button { font: inherit; color: var(--text); background: #202e34; border: 0; border-radius: 5px; padding: 4px 8px; margin-right: 10px; }
.field { display: grid; gap: 6px; color: var(--text); font-size: .9rem; font-weight: 620; }
.field small, .compact-field { color: var(--muted); font-weight: 450; }
.compact-field { display: inline-flex; align-items: center; gap: 8px; }
.compact-field select { padding: 5px 8px; font-size: .82rem; }
fieldset { margin: 0; min-inline-size: 0; padding: 0; border: 0; }
legend { font-size: .9rem; margin-bottom: 9px; padding: 0; font-weight: 620; }
.channel-buttons { display: flex; flex-wrap: wrap; gap: 7px; }
.channel-buttons button[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); border-color: var(--line-active); }
@media (max-width: 820px) {
    .frame { width: min(100% - 36px, 1232px); }
    .topbar-inner { grid-template-columns: 1fr 1fr; gap: 0 12px; min-height: 0; padding-top: 12px; }
    .topbar nav { grid-row: 2; grid-column: 1 / -1; gap: 0; justify-content: space-between; }
    .topbar nav a { padding: 11px 0; }
}
@media (max-width: 420px) {
    .frame { width: calc(100% - 28px); }
    .topbar nav a, .footer-inner small { font-size: .79rem; }
    .footer-inner { gap: 11px; }
    .footer-inner > a:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
