:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  color: #1f2933;
  background: #f2f4f6;
  --line: #d9e0e7;
  --muted: #5d6975;
  --accent: #475569;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
header { background: #fff; border-bottom: 1px solid var(--line); }
.bar, .tools, .brand { display: flex; align-items: center; }
.bar { gap: 14px; padding: 10px clamp(14px, 3vw, 34px); justify-content: space-between; flex-wrap: wrap; }
.brand { gap: 10px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; }
.brand small { font-size: 11px; color: var(--muted); margin-top: 2px; }
.tools { flex-wrap: wrap; gap: 5px 13px; font-size: 13px; }
#model-status { color: var(--muted); }
.notice, .shell-message { margin: 0; padding: 8px clamp(14px, 3vw, 34px); background: #fff4e5; color: #78450d; font-size: 13px; line-height: 1.5; }
.notice { border-top: 1px solid #f1dfc4; }
.center { min-height: calc(100vh - 62px); display: grid; place-items: center; padding: 32px 16px; }
.card { width: min(100%, 390px); padding: clamp(22px, 5vw, 32px); background: #fff; border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 8px 28px #0f172a0d; }
h1 { margin: 0 0 23px; font-size: 24px; }
h2 { font-size: 16px; margin: 0 0 9px; }
form { display: grid; }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 7px; }
input { width: 100%; min-width: 0; padding: 10px 12px; font: inherit; border: 1px solid #aab5c1; border-radius: 7px; background: white; color: inherit; }
form input { margin-bottom: 16px; }
button { font: inherit; cursor: pointer; border: 1px solid transparent; border-radius: 7px; padding: 9px 14px; }
button:disabled { cursor: wait; opacity: .55; }
:focus-visible { outline: 3px solid #b45309; outline-offset: 2px; }
.primary { background: var(--accent); color: #fff; font-weight: 600; }
.primary:hover { background: #334155; }
.secondary, .quiet { color: #334155; background: #fff; border-color: #bdc8d4; }
.quiet { padding: 5px 9px; }
.secondary:hover, .quiet:hover { background: #f2f4f6; }
#back { margin-top: 8px; }
#guest-area { margin-top: 23px; border-top: 1px solid var(--line); padding-top: 19px; }
.helper, .message { line-height: 1.6; font-size: 14px; }
.helper { color: var(--muted); margin: 0 0 12px; }
.message { margin: 12px 0 0; }
.message.error, .shell-message { color: #992e1e; }
body.signed-in { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
.signed-in main, #shell { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#workspace { width: 100%; border: 0; flex: 1; min-height: 0; background: #fff; }
.panel { background: #fff; padding: 16px clamp(14px, 3vw, 34px); border-bottom: 1px solid var(--line); max-height: 50vh; overflow: auto; }
.panel .message { margin: 6px 0; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 6px 0 9px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
th { background: #f9fafb; }
#link-area { margin-top: 10px; max-width: 650px; }
#model-config { margin-top: 12px; }
#model-config summary { color: #334155; font-weight: 600; cursor: pointer; }
#model-form { max-width: 440px; padding-top: 12px; }
@media (max-width: 480px) {
  .bar { gap: 6px; padding: 8px 12px; }
  .tools { width: 100%; gap: 5px 9px; }
  .center { align-items: start; padding-top: 28px; }
  .notice { font-size: 12px; }
}
