:root {
  color-scheme: dark;
  font-family: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #111014;
  color: #f4f0f8;
  --panel: #1a1720;
  --border: #3a3542;
  --muted: #b1a6bd;
  --accent: #ff829d;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.app-header {
  min-height: 64px; display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 10px max(20px, env(safe-area-inset-right)) 10px max(20px, env(safe-area-inset-left));
  background: #141218; border-bottom: 1px solid var(--border);
}
.brand { font-size: 1.15rem; font-weight: 750; white-space: nowrap; }
.brand span { color: var(--accent); margin-right: 4px; }
nav { display: flex; gap: 4px; }
nav :where(button) { background: transparent; border-color: transparent; padding-inline: 9px; }
nav button[aria-current] { background: #302632; color: #f4f0f8; }
main { margin: auto; }
main > :not(#chat-view) { margin-inline: auto; max-width: 1152px; }
h1, h2 { margin: 0; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1.05rem; }
p { margin: 0; }
button, input, textarea { font: inherit; }
 :where(.app-header, .card) :where(button, input, textarea) { border: 1px solid var(--border); border-radius: 9px; color: inherit; }
:where(.app-header, .card) button { background: #201c26; padding: 9px 12px; cursor: pointer; min-height: 44px; }
button:disabled { cursor: default; }
.card .primary { background: var(--accent); color: #301c28; border-color: transparent; font-weight: 700; }
.card input { width: 100%; background: #17141c; padding: 10px 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
label { display: grid; gap: 6px; }
.center { min-height: 72dvh; display: grid; place-items: center; padding: 20px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 20px; display: grid; gap: 14px; }
.center .card { width: min(100%, 420px); }
#feedback { position: fixed; bottom: max(72px, calc(env(safe-area-inset-bottom) + 60px)); left: 50%; transform: translateX(-50%); max-width: calc(100% - 30px); padding: 10px 14px; border: 1px solid #687ca9; border-radius: 10px; background: #202f49; z-index: 2; }
@media (max-width: 640px) {
  .app-header { padding-inline: 10px; }
  nav button { padding-inline: 5px; font-size: .875rem; }
}
