:root {
  --surface: #e0e5ec;
  --surface-deep: #d1d9e6;
  --shadow-dark: #b8bcc2;
  --shadow-light: #ffffff;
  --text: #3c4351;
  --muted: #70798a;
  --faint: #929aa8;
  --violet: #6d5dfc;
  --coral: #ff6b6b;
  --teal: #38a99f;
  --amber: #c69518;
  --danger: #c54858;
  --success: #248c7f;
  --radius: 16px;
  --radius-small: 12px;
  --convex: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
  --convex-small: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
  --concave: inset 5px 5px 10px var(--shadow-dark), inset -5px -5px 10px var(--shadow-light);
  --concave-deep: inset 8px 8px 16px var(--shadow-dark), inset -8px -8px 16px var(--shadow-light);
  --content-width: 1180px;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; background: var(--surface); }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--surface); font-family: "Microsoft YaHei UI", "PingFang SC", sans-serif; letter-spacing: 0; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin-top: 0; }
[hidden] { display: none !important; }

.site-header { position: sticky; top: 0; z-index: 20; min-height: 72px; display: grid; grid-template-columns: 280px minmax(0, 1fr) 180px; align-items: center; gap: 24px; padding: 12px clamp(20px, 4vw, 54px); background: var(--surface); box-shadow: 0 8px 16px rgba(184, 188, 194, .72), 0 -8px 16px var(--shadow-light); }
.site-brand { display: inline-flex; align-items: center; justify-self: start; gap: 12px; padding: 0; border: 0; background: transparent; cursor: pointer; text-align: left; }
.site-brand strong, .site-brand small { display: block; }
.site-brand strong { font-size: 15px; }
.site-brand small { margin-top: 3px; color: var(--muted); font: 700 9px/1.2 Consolas, monospace; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; color: var(--violet); border-radius: 50%; box-shadow: var(--convex-small); font: 700 18px/1 Consolas, monospace; }
.site-navigation { display: flex; align-items: center; justify-content: center; gap: 8px; }
.site-navigation button, .site-navigation a, .session-button { min-height: 38px; display: inline-flex; align-items: center; padding: 9px 15px; border: 0; border-radius: var(--radius-small); color: var(--muted); background: var(--surface); cursor: pointer; white-space: nowrap; transition: box-shadow 300ms ease-in-out, color 300ms ease-in-out; }
.site-navigation button:hover, .site-navigation a:hover, .session-button:hover { color: var(--text); box-shadow: var(--convex-small); }
.site-navigation button.active, .site-navigation a:active { color: var(--violet); box-shadow: var(--concave); }
.session-button { display: inline-flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 150px; justify-self: end; box-shadow: var(--convex-small); font-weight: 700; }
.session-button:active { box-shadow: var(--concave); }

.eyebrow { margin-bottom: 10px; color: var(--muted); font: 700 11px/1.4 Consolas, monospace; text-transform: uppercase; }
.muted { color: var(--muted); line-height: 1.7; }
.button, .nav-button, .icon-button, .surface-button { min-height: 42px; border: 0; border-radius: var(--radius-small); color: var(--text); background: var(--surface); box-shadow: var(--convex-small); cursor: pointer; transition: box-shadow 300ms ease-in-out, color 300ms ease-in-out, opacity 300ms ease-in-out; }
.button { padding: 10px 17px; font-weight: 700; }
.button:hover, .nav-button:hover, .icon-button:hover, .surface-button:hover { box-shadow: 2px 2px 5px var(--shadow-dark), -2px -2px 5px var(--shadow-light); }
.button:active, .nav-button:active, .icon-button:active, .surface-button:active, .surface-button.active, .nav-button.active { box-shadow: var(--concave); }
.button:focus-visible, .nav-button:focus-visible, .icon-button:focus-visible, .surface-button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; }
.button.primary { color: var(--violet); }
.button.danger { color: var(--danger); }
.button:disabled { cursor: not-allowed; opacity: .45; box-shadow: none; }

label { display: grid; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
input, select, textarea { width: 100%; min-height: 44px; padding: 11px 14px; border: 0; border-radius: var(--radius-small); outline: 0; color: var(--text); background: var(--surface); box-shadow: var(--concave); }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--faint); }
code { display: block; overflow-wrap: anywhere; padding: 15px; border-radius: var(--radius-small); color: #515a69; background: var(--surface); box-shadow: var(--concave); font: 12px/1.65 Consolas, monospace; }

.message { min-height: 20px; margin: 12px 0 0; font-size: 13px; }
.error { color: var(--danger); }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; max-width: min(390px, calc(100% - 48px)); padding: 14px 18px; border-radius: var(--radius-small); color: var(--text); background: var(--surface); box-shadow: var(--convex); }
.toast.error { color: var(--danger); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
