:root {
  color-scheme: light;
  --shell-bg:#fff; --shell-fg:#202122; --shell-muted:#606163;
  --shell-line:#e6e6e7; --shell-soft:#f3f3f4; --shell-selected:#e8e8ea;
  --shell-accent:#145ce6; --shell-action:#155ed4; --shell-on-action:#fff;
  --shell-header:64px; --sidebar:200px;
}
:root[data-mantine-color-scheme="dark"] {
  color-scheme:dark;
  --shell-bg:#191b1e; --shell-fg:#f2f3f6; --shell-muted:#babcbe;
  --shell-line:#393b3e; --shell-soft:#282a2d; --shell-selected:#383a3d;
  --shell-accent:#91b6ff; --shell-action:#a0bfff; --shell-on-action:#15233a;
}
* {box-sizing:border-box}
body {margin:0;background:var(--shell-bg);color:var(--shell-fg);font:14px/1.5 "Segoe UI","Microsoft YaHei",system-ui,sans-serif}
button,input,select,textarea {font:inherit}
button,a,input { -webkit-tap-highlight-color:transparent }
button {cursor:pointer}
a {color:inherit}
:focus-visible {outline:2px solid var(--shell-accent);outline-offset:3px}
::selection {background:#a9c8ff;color:#102644}
[data-icon] {display:inline-block;flex:none;width:18px;height:18px;background:currentColor;mask:var(--icon) center/contain no-repeat}
.skip-content {position:fixed;left:8px;top:-60px;z-index:10000;padding:6px 10px;background:var(--shell-bg)}
.skip-content:focus {top:4px}
.studio-header {
  position:fixed;inset:0 0 auto;z-index:220;height:var(--shell-header);
  display:grid;grid-template-columns:184px minmax(0,1fr) auto auto;
  align-items:center;gap:16px;padding:0 16px;background:var(--shell-bg)
}
.studio-identity {display:flex;align-items:center;justify-content:space-between;gap:8px;padding-right:8px}
.studio-brand {display:inline-flex;align-items:center;gap:7px;color:var(--shell-fg);text-decoration:none;white-space:nowrap}
.studio-brand img {display:block;flex:none}
.studio-wordmark {font:700 20px/1.2 "Songti SC","STSong","Noto Serif CJK SC","SimSun",serif}
.shell-icon-btn {display:grid;place-items:center;flex:none;padding:0;width:36px;height:36px;border:0;border-radius:6px;background:transparent;color:var(--shell-muted)}
.shell-icon-btn:hover {background:var(--shell-soft);color:var(--shell-fg)}
.studio-search {
  display:flex;align-items:center;gap:10px;width:100%;max-width:700px;height:44px;
  padding:4px 5px 4px 14px;border-radius:24px;background:var(--shell-soft);color:var(--shell-muted)
}
.studio-search:focus-within {outline:2px solid var(--shell-accent);outline-offset:1px}
.studio-search .search-hint {width:16px;height:16px}
.studio-search input {flex:1;min-width:0;height:100%;padding:0;border:0;outline:0;background:transparent;color:var(--shell-fg);caret-color:var(--shell-accent)}
.studio-search input::placeholder {color:var(--shell-muted);opacity:1}
.studio-search .shell-icon-btn {border-radius:50%;background:var(--shell-bg)}
.studio-search .shell-icon-btn:hover {background:var(--shell-selected)}
.header-tools {display:flex;align-items:center;justify-content:flex-end;gap:6px}
.header-link {display:grid;place-items:center;min-height:34px;padding:2px 12px;border-radius:18px;color:var(--shell-fg);font-weight:600;text-decoration:none;white-space:nowrap}
.header-link[hidden] {display:none}
.header-link:is(:hover,[aria-current]) {background:var(--shell-selected)}
#header-register {background:var(--shell-action);color:var(--shell-on-action);padding-inline:16px}
#header-register:hover {filter:brightness(.92)}
#service-mode {display:flex;align-items:center;gap:6px;color:var(--shell-muted);font-size:12px;white-space:nowrap}
#service-mode:not(:empty)::before {content:"";background:#909092;width:6px;height:6px;border-radius:50%}
#service-mode[data-mode="upstream"]::before {background:#378563}
.access-denied {margin:18vh auto;max-width:32rem;padding:1rem 2rem}
#account-root {max-width:760px;padding:4px 0 24px}
#account-root [hidden],#account-root[hidden],body.account-view .studio-dock {display:none}
#account-root > h1 {margin-bottom:16px}
#account-title:focus {outline:none}
#account-root p:empty {display:none}
#account-status:not(:empty) {margin:10px 0;color:var(--lg-muted)}
#account-settings {max-width:440px}
.account-form {display:grid;align-items:start;gap:6px}
.account-form label {font-weight:600}
.account-form label:not(:first-of-type) {margin-top:12px}
.account-form input:not([hidden]) {width:100%;min-height:40px;padding:8px 10px;border:1px solid var(--shell-muted);border-radius:6px;background:var(--shell-bg);color:var(--shell-fg);caret-color:var(--shell-accent)}
.account-form small {color:var(--lg-muted);font-size:12px}
.account-form button {justify-self:start;min-width:84px;min-height:36px;margin-top:14px}
.account-error {color:#aa2839}
.dark .account-error {color:#ffafb5}
.account-profile {display:flex;align-items:center;justify-content:space-between;gap:16px;margin:8px 0}
.account-profile h2 {font-size:17px}
.account-profile button {flex:none}
#account-root .account-section-title {margin:24px 0 14px;padding-top:16px;border-top:1px solid var(--lg-line);font-size:16px}
#studio-nav {top:var(--shell-header);width:var(--sidebar);background:var(--shell-bg);border:0;gap:2px;padding:16px 12px}
#studio-nav .lbgen-nav-title {flex:none;margin:12px 0 2px;padding:14px 12px 4px;border-top:1px solid var(--shell-line);font-size:12px;color:var(--shell-muted)}
#studio-nav .lbgen-nav-title:first-child {display:none}
#studio-nav .lbgen-nav-item {flex:none;height:36px;border-radius:8px;color:var(--shell-fg);gap:12px}
#studio-nav .lbgen-nav-item:hover {background:var(--shell-soft)}
#studio-nav .lbgen-nav-item.active {background:var(--shell-selected);font-weight:600}
.studio-main {margin:var(--shell-header) 0 0 var(--sidebar);min-width:0;padding:16px 16px 88px;min-height:calc(100dvh - var(--shell-header))}
.studio-main:focus {outline:none}
#gallery-root .lg-search,#discovery-strip[hidden] {display:none}
.shell-diagnostics {display:block;overflow-wrap:anywhere;font:12px/1.5 monospace}
.studio-dock {
  position:fixed;bottom:max(20px,env(safe-area-inset-bottom));left:calc(50% + var(--sidebar)/2);
  transform:translateX(-50%);z-index:130;display:flex;align-items:center;justify-content:space-between;
  width:min(224px,calc(100vw - 32px));min-height:44px;padding:5px 6px 5px 16px;
  border:1px solid var(--shell-line);border-radius:24px;background:var(--shell-bg);color:var(--shell-muted);
  box-shadow:0 3px 12px rgb(0 0 0 / 12%);text-decoration:none
}
.studio-dock .dock-send {width:32px;height:32px;position:relative;border-radius:50%;background:var(--shell-soft);mask:none}
.dock-send::after {position:absolute;inset:8px;content:"";background:var(--shell-fg);mask:var(--icon) center/contain no-repeat}
.studio-dock:hover .dock-send {background:var(--shell-selected)}
.sidebar-mask {display:none}
.rail-only {--sidebar:62px}
.rail-only #studio-nav {padding-inline:8px}
.rail-only .lbgen-nav-item {justify-content:center;padding:0}
.rail-only #studio-nav .lbgen-nav-title {height:1px;font-size:0;padding:0;margin:14px 5px 7px}
.rail-only .lbgen-nav-item span {display:none}
.rail-only .lbgen-panel,.rail-only .lbgen-toast {left:calc(50% + 31px)}
@media(max-width:760px) {
  body {--sidebar:0px;--shell-header:104px}
  .studio-header {
    grid-template-columns:auto minmax(0,1fr) auto;grid-template-rows:44px 44px;
    gap:2px 8px;padding:4px 12px 10px;border-bottom:1px solid var(--shell-line)
  }
  .studio-identity {grid-area:1/1/2/2;gap:4px;padding:0}
  .studio-wordmark {font-size:18px}
  .studio-brand img {width:24px;height:24px}
  .header-tools {grid-area:1/2/2/4;gap:2px}
  .header-link,#header-register {padding-inline:9px}
  .studio-search {grid-area:2/1/3/3;max-width:none;gap:6px;padding-left:12px}
  .studio-search input,.account-form input:not([hidden]) {font-size:16px}
  .studio-search .search-hint {display:none}
  #service-mode {grid-area:2/3/3/4}
  .studio-main {padding:14px 12px 88px}
  #studio-nav {visibility:hidden;transform:translateX(-102%);width:min(246px,calc(100vw - 50px));z-index:210;border-right:1px solid var(--shell-line);transition:transform .16s}
  #studio-nav .lbgen-nav-item {height:44px}
  .drawer-open #studio-nav {visibility:visible;transform:none}
  .drawer-open .sidebar-mask {display:block;position:fixed;inset:var(--shell-header) 0 0;background:rgb(13 18 30 / 36%);z-index:205;border:0}
  .lbgen-toast {left:50%;white-space:normal;width:max-content;max-width:90vw}
}
@media(max-width:370px) {
  .studio-header {padding-inline:8px;column-gap:4px}
  .studio-brand {gap:4px}
  .header-link,#header-register {padding-inline:5px;font-size:13px}
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {scroll-behavior:auto!important;transition-duration:0s!important;animation-duration:.001s!important}
}
