/* Zekai: warm paper, ink and the gold from the supplied identity. */
:root {
  --bg: #f6f5f1;
  --sidebar: #fff;
  --surface: #fff;
  --surface-raised: #f8f7f3;
  --surface-soft: #f0eee7;
  --surface-input: #fff;
  --line: #e5e1d7;
  --line-strong: #bcb5a5;
  --ink: #24241f;
  --muted: #656358;
  --dim: #747064;
  --lime: #936c16;
  --lime-deep: #79540a;
  --lime-soft: #f5edda;
  --sidebar-width: 240px;
  --shadow: 0 14px 42px rgb(58 44 14 / 8%);
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}
body { background: var(--bg); }
button, input, textarea, select { font-family: inherit; }
* { scrollbar-color: #c6bfaf #f5f3ed; }
*::-webkit-scrollbar-track { background: #f5f3ed; }
*::-webkit-scrollbar-thumb { background: #c6bfaf; border-color: #f5f3ed; }
::selection { background: #f1d894; color: #24241f; }
:is(button,a,input,textarea,select,summary):focus-visible { outline: 3px solid #a77a16; outline-offset: 3px; }
.sidebar { padding: 28px 16px 20px; border-right: 1px solid var(--line); }
.brand { min-height: 66px; padding: 8px 3px 20px; }
.brand .zekai-wordmark { width: 202px; height: auto; max-width: 100%; border-radius: 0; }
.side-label { font-size: 12px; margin: 28px 13px 14px; }
.nav-item { min-height: 46px; border-radius: 10px; padding: 0 14px; }
.nav-item.active { background: #292a24; border-color: #292a24; color: #f6d68c; }
.nav-item:hover:not(.active) { background: #f4f0e6; color: #765719; }
.nav-section { color: #767064; font-size: 12px; }
.avatar { background: #eee4ca; color: #674c16; }
.main { background: var(--bg); }
.topbar { min-height: 104px; padding: 25px 36px; background: #f6f5f1; border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 26px; font-weight: 650; }
.topbar-subtitle { color: var(--muted); }
.content { padding: 28px 36px 56px; }
.panel, .metric-strip { background: #fff; border-radius: 14px; box-shadow: none; }
.panel { border: 1px solid var(--line); }
.metric strong { font-variant-numeric: tabular-nums; letter-spacing: -.025em; }
.metric-label { font-size: 13px; }
.button { min-height: 42px; border-radius: 8px; font-weight: 600; }
.button.primary, button.primary { color: #fff; background: #292a24; border-color: #292a24; }
.button.primary:hover:not(:disabled) { color: #fff; background: #46422f; border-color: #46422f; }
.button.secondary { background: #fff; color: var(--ink); border-color: #d8d3c8; }
.button:disabled { opacity: .5; cursor: not-allowed; }
.role-tag { color: #765719; background: #f2e8cf; }
.top-balance { background: #fff; border-color: var(--line); }
input, select, textarea { color: var(--ink); background: #fff; border-color: #d8d3c8; }
input::placeholder, textarea::placeholder { color: #7c776b; opacity: 1; }
label { color: #464337; }
.table-wrap { border-radius: 10px; }
table { font-variant-numeric: tabular-nums; }
thead, th { background: #f7f6f1; color: #656052; }
.status.good { color: #166e59; background: #e9f5ed; }
.status.bad { color: #b43d35; background: #fbece9; }
.status.pending { color: #805906; background: #faf0d9; }
.notice { background: #fbf4e3; color: #795818; border-color: #e6d4a4; }
.toast { background: #292a24; color: #fff; box-shadow: 0 12px 32px rgb(0 0 0 / 16%); }
.task-video-wrap, .canvas-stage, .drama-scene-node video, .video-frame { background: #22241f; color: #fff; }
.canvas-content strong, .canvas-content p, .canvas-footer { color: #e6dfcf; }
.canvas-grid { opacity: .08; }
.canvas-mark { color: #dfba62; background: #343328; }
.auth-shell { min-height: 100dvh; padding: 48px; background: #f6f5f1; }
.auth-frame {
  width: min(1160px, 100%); min-height: 690px;
  grid-template-columns: minmax(0, 1.2fr) minmax(380px, 1fr);
  border: 0; border-radius: 20px; background: #fff;
  box-shadow: 0 20px 70px rgb(65 52 24 / 8%);
}
.auth-identity { padding: 48px; background: #f0eadb; border: 0; }
.auth-identity::after { display: none; }
.auth-brand { display: block; width: 262px; max-width: 100%; }
.auth-brand img { width: 100%; height: auto; border-radius: 0; mix-blend-mode: multiply; }
.auth-identity-copy { max-width: 460px; margin: 66px 0 36px; }
.auth-identity-copy h1 { color: #252720; font-size: clamp(34px, 3.7vw, 52px); font-weight: 700; line-height: 1.32; text-wrap: balance; letter-spacing: -.035em; }
.auth-identity-copy h1 span { color: #947023; white-space: nowrap; }
.auth-identity-copy p { margin-top: 24px; color: #646050; font-size: 15px; line-height: 1.9; }
.zekai-workflow { display: flex; align-items: center; max-width: 400px; margin: 0 0 36px; }
.zekai-workflow > div { display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 64px; color: #6b6046; font-size: 12px; }
.zekai-workflow .icon { width: 24px; height: 24px; flex-basis: 24px; color: #827047; }
.flow-link { flex: 1; height: 1px; margin: -28px 12px 0; background: #c9b98f; }
.auth-signature { margin: auto 0 0; font-size: 12px; color: #716957; }
.auth-panel { padding: 64px 54px; }
.auth-panel-head { margin-bottom: 28px; }
.auth-panel-head h2 { font-size: 30px; letter-spacing: -.025em; }
.auth-panel-head p { font-size: 14px; margin-top: 10px; }
.auth-tabs { gap: 24px; margin-bottom: 28px; }
.auth-tab { min-height: 44px; font-size: 13px; border-width: 0 0 2px; }
.auth-tab.active { color: #785719; border-color: #a88028; }
.auth-panel form { gap: 20px; }
.auth-panel input { min-height: 48px; border-radius: 8px; font-size: 15px; margin-top: 6px; }
.auth-panel label { font-size: 13px; }
.auth-panel .button.primary { min-height: 49px; margin-top: 4px; }
.zekai-auth-note { color: #787062; font-size: 12px; line-height: 1.7; margin: 30px 0 16px; }
.zekai-entry-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: #806022; font-size: 13px; text-decoration: none; }
.zekai-entry-link:hover { color: #26251d; text-decoration: underline; }
.zekai-entry-link .icon { width: 16px; height: 16px; }
.zekai-setup-notice { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; padding: 13px 18px; margin: 0 0 24px; border-radius: 8px; background: #f3ead3; color: #75571a; font-size: 13px; }
.zekai-setup-notice strong { color: #5e4818; }
.canvas-eyebrow { font-size: 13px; }
@media(min-width:761px) {
  .side-nav { overflow-y: auto; }
}
@media(max-width:1000px) {
  .auth-shell { padding: 26px; }
  .auth-frame { grid-template-columns: minmax(0, 1fr) minmax(340px, 1fr); min-height: 630px; }
  .auth-identity { padding: 34px; }
  .auth-panel { padding: 40px 30px; }
  .auth-identity-copy h1 { font-size: 36px; }
}
@media(max-width:760px) {
  .sidebar { padding: 0; }
  .sidebar .brand { display: none; }
  .topbar { padding: 20px; }
  .content { padding: 22px 18px 100px; }
  .auth-shell { padding: 20px; }
  .auth-frame { display: flex; flex-direction: column; min-height: 0; border-radius: 14px; }
  .auth-identity { display: block; padding: 28px; }
  .auth-brand { width: 210px; }
  .auth-identity-copy { margin: 25px 0 0; }
  .auth-identity-copy h1 { max-width: none; width: auto; text-wrap: initial; }
  .auth-identity-copy h1 { font-size: 29px; }
  .auth-identity-copy p { margin-top: 14px; font-size: 13px; }
  .zekai-workflow, .auth-signature { display: none; }
  .auth-panel { padding: 32px 28px; }
  .auth-panel-head h2 { font-size: 25px; }
  .top-actions { flex-wrap: wrap; }
}
@media(prefers-reduced-motion:reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
