:root {
  --ink: #1a1a1a;
  --title: #111111;
  --muted: #8a8a8a;
  --faint: #b0b0b0;
  --icon: #1a1a1a;
  --chev: #c4c4c4;
  --line: #ececec;
  --elev: #ececec;
  --side: #f7f7f8;
  --hover: #efefef;
  --active: #e8e8e8;
  --bg: #ffffff;
  --bar: #ffffff;
  --sheet: #ffffff;
  --raise: #ffffff;
  --module: #ffffff;
  --card: #ffffff;
  --fill: #f4f4f5;
  --hair: #e4e4e4;
  --btn: #111111;
  --on-btn: #ffffff;
  --btn-idle: #dedede;
  --gold: #C9A227;
  --up: #d64545;
  --down: #1f8a4c;
  --warn-bg: #f4e7c3;
  --warn-ink: #8a6a1f;
  --scrim: rgba(0, 0, 0, 0.32);
  --side-scrim: rgba(0, 0, 0, 0.52);
  --sheet-scrim: rgba(0, 0, 0, 0.76);
  --input: #ffffff;
  --input-line: #e4e4e4;
  --shadow: 0 10px 36px rgba(0, 0, 0, 0.12);
  --code-tint: #fafafa;
  --chrome: rgba(255, 255, 255, 0);
  --app-h: 100dvh;
  --app-top: 0px;
  --app-bottom: 0px;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

#desktopGate { display: none; }
html.is-desktop #desktopGate {
  display: flex;
  position: fixed;
  z-index: 100;
  inset: 0;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  background: #fff;
  text-align: center;
}
.desktop-card { width: min(420px, 100%); }
.desktop-card img { width: 36px; height: 26px; }
.desktop-card strong {
  display: block;
  margin-top: 14px;
  color: #111;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.2;
}
.desktop-card p {
  margin: 22px 0 0;
  color: #111;
  font-size: 18px;
  line-height: 1.5;
}
.desktop-card .hint {
  margin-top: 8px;
  color: #8a8a8a;
  font-size: 14px;
}

body.theme-dark {
  --ink: #e6e6ea;
  --title: #ffffff;
  --muted: #a8a8b3;
  --faint: #7a7a86;
  --icon: #f0f0f4;
  --chev: #8e8e99;
  --line: #2a2a32;
  --elev: rgba(255, 255, 255, 0.10);
  --side: #0c0c0e;
  --hover: #2a2a32;
  --active: #35353f;
  --bg: #0c0c0e;
  --bar: #16161a;
  --sheet: #16161a;
  --raise: #1c1c20;
  --module: #2e2e34;
  --card: #1e1e24;
  --fill: #2a2a32;
  --hair: #3a3a44;
  --btn: #ffffff;
  --on-btn: #0c0c0e;
  --btn-idle: #3a3a44;
  --gold: #C9A227;
  --up: #ff7a7a;
  --down: #4ade80;
  --warn-bg: #3a3218;
  --warn-ink: #e8c56b;
  --scrim: rgba(0, 0, 0, 0.62);
  --side-scrim: rgba(0, 0, 0, 0.36);
  --sheet-scrim: rgba(0, 0, 0, 0.82);
  --input: #2e2e36;
  --input-line: #4e4e5a;
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  --code-tint: #25252c;
  --chrome: rgba(12, 12, 14, 0);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: var(--app-h, 100dvh); margin: 0; background: var(--bg); color: var(--ink); }
html { overflow: hidden; }
body {
  display: flex;
  position: fixed;
  top: var(--app-top, 0px);
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
}
button, textarea, input, select { font: inherit; color: inherit; background: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; color: inherit; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

#backdrop {
  position: fixed;
  top: var(--app-top, 0px);
  left: 0;
  right: 0;
  height: var(--app-h, 100dvh);
  background: var(--scrim);
  z-index: 20;
}

aside {
  width: 80vw;
  flex: none;
  display: flex;
  flex-direction: column;
  background: var(--side);
  border-right: 1px solid var(--line);
  z-index: 21;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 12px 8px;
}

#newTask {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--hair);
  border-radius: 10px;
  background: var(--card);
}

#newTask svg { width: 16px; height: 16px; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-size: 17px;
  font-weight: 400;
  text-align: left;
}

.nav-link svg { width: 22px; height: 22px; }
.nav-link:hover { background: var(--hover); }
.nav-link.on { background: var(--card); }

.side-tab {
  height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
  text-align: left;
}

.side-lower {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-top: 4px;
  border-top: 1px solid var(--line);
}

.side-tabs {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 0;
}

#taskMore {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--icon);
  display: grid;
  place-items: center;
}

#taskMore:hover, #taskMore[aria-expanded="true"] { background: var(--card); }
#taskMore svg { width: 18px; height: 18px; }

.task-menu {
  top: calc(100% + 8px);
  right: 4px;
  bottom: auto;
  width: min(248px, calc(100% - 16px));
  padding: 14px;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.12);
  z-index: 4;
}

.task-menu .block + .block { margin-top: 14px; }

.menu-k {
  display: block;
  margin: 0 2px 8px;
  color: var(--muted);
  font-size: 12px;
}

.task-menu .seg {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 11px;
  background: var(--fill);
}

.task-menu .seg button {
  width: auto;
  flex: 1;
  text-align: center;
  border-radius: 8px;
  padding: 7px 0;
  color: var(--muted);
  font-size: 13px;
}

.task-menu .seg button.on {
  background: var(--input);
  color: var(--title);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

#taskSearch {
  display: block;
  width: 100%;
  height: 36px;
  margin: 0;
  border: 1px solid var(--input-line);
  border-radius: 10px;
  padding: 0 12px;
  background: var(--input);
  outline: none;
}

.task-group {
  margin: 12px 10px 2px;
  color: var(--muted);
  font-size: 12px;
}

.task-list { flex: 1; overflow: auto; padding: 4px 8px 12px; }

.task {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task:hover { background: var(--hover); }
.task.on { background: var(--active); }

.account {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px;
  padding: 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
}

.account:hover { background: var(--hover); }

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--hair);
  display: grid;
  place-items: center;
  flex: none;
}

.avatar svg { width: 22px; height: 22px; }

.account-more {
  width: 28px;
  height: 28px;
  margin-left: auto;
  display: grid;
  place-items: center;
  flex: none;
  color: var(--muted);
}

.account-more svg { width: 24px; height: 24px; }

#phoneLabel {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.icon-btn:hover { background: var(--hover); }

.pop {
  position: absolute;
  right: 8px;
  bottom: 48px;
  min-width: 128px;
  padding: 6px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
}

.pop button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 8px 10px;
}

.pop button:hover { background: var(--hover); }

#taskMenu {
  top: calc(100% + 8px);
  right: 4px;
  bottom: auto;
  left: auto;
  width: min(248px, calc(100% - 16px));
  min-width: 0;
  padding: 14px;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.12);
}

.workspace {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg);
}

.top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 12;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  background: transparent;
  border-bottom: 0;
  pointer-events: none;
}

.top > * {
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

.top::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to top,
    transparent 0%,
    color-mix(in srgb, var(--bg) 18%, transparent) 48%,
    color-mix(in srgb, var(--bg) 46%, transparent) 100%
  );
  backdrop-filter: blur(8px) saturate(1.2);
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
  mask-image: linear-gradient(to top, transparent 0%, #000 38%, #000 100%);
  -webkit-mask-image: linear-gradient(to top, transparent 0%, #000 38%, #000 100%);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  display: grid;
  place-items: center;
  flex: none;
}

.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-act {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
}

.top-act svg {
  width: 28px;
  height: 28px;
  stroke-width: 1.85;
}

.top-act .bubble {
  fill: var(--hair);
  stroke: none;
}

.top-act .plus {
  fill: none;
  stroke: var(--ink);
}

.icon-btn.top-act:hover {
  background: transparent;
}

.top-act:hover .bubble { fill: var(--active); }

.menu-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 0;
  border: 1px solid var(--elev);
  border-radius: 50%;
  background: var(--fill);
  color: var(--icon);
}

.menu-btn svg { width: 36px; height: 36px; }
.menu-btn:hover { background: var(--active); }

.brand, .title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: var(--title);
}

.title {
  flex: 1;
  min-width: 0;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-view, .detail {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.thread, .detail { overflow: auto; }

.thread {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: 56px;
  padding-bottom: var(--dock-h, 160px);
  box-sizing: border-box;
}

.thread > .col {
  flex: 0 0 auto;
}

.welcome {
  flex: 1 0 auto;
  min-height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.hero-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero {
  width: min(220px, 58vw);
  max-height: 100%;
  height: auto;
  object-fit: contain;
}

.welcome-copy {
  width: min(760px, calc(100% - 24px));
  margin: 0 auto 68px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  flex: none;
}

.welcome h2 {
  margin: 0 0 12px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--title);
}

.welcome-copy p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
}

.welcome-copy svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--icon);
}

.col { width: min(760px, calc(100% - 32px)); margin: 0 auto; }

.row { display: flex; margin: 16px 0; }
.row.user { justify-content: flex-end; }

.bubble {
  max-width: min(80%, 560px);
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--fill);
  white-space: pre-wrap;
}

.reply, .pending { white-space: pre-wrap; }
.pending { color: var(--muted); }

.asst {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.trace {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 22px;
}

.step.on { color: var(--ink); }

.step em {
  margin-left: 6px;
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}

.step-ok, .step-spin {
  width: 16px;
  height: 16px;
  flex: none;
  display: grid;
  place-items: center;
}

.step-ok svg { width: 14px; height: 14px; }

.step-spin {
  width: 12px;
  height: 12px;
  border: 1.6px solid var(--muted);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: qb-spin 0.7s linear infinite;
}

.step-fail {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--muted);
  font-size: 16px;
  line-height: 16px;
  text-align: center;
}

@keyframes qb-spin { to { transform: rotate(360deg); } }

.think-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

.think-chev {
  width: 16px;
  height: 16px;
  flex: none;
}

.think-chev.open { transform: rotate(180deg); }

.think-body {
  margin: 2px 0 8px 24px;
  padding: 0 0 2px 10px;
  border-left: 2px solid var(--hair);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  max-height: min(28vh, 180px);
  overflow: auto;
}

.caret {
  display: inline-block;
  width: 6px;
  height: 13px;
  margin-left: 1px;
  background: currentColor;
  vertical-align: -1px;
  animation: qb-blink 1s step-end infinite;
}

@keyframes qb-blink { 50% { opacity: 0; } }

.code {
  margin-top: 2px;
  border: 1px solid var(--elev);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--fill);
  color: var(--muted);
  font-size: 12px;
}

.code-fold {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0;
  text-align: left;
}

.badge {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--warn-bg);
  color: var(--warn-ink);
}

.src, pre.src {
  margin: 0;
  max-height: 280px;
  overflow: auto;
  padding: 12px;
  background: var(--card);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.open-detail, .code-edit {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  padding: 0;
}

.src-edit {
  display: block;
  width: 100%;
  min-height: 280px;
  max-height: 50vh;
  resize: vertical;
  border: 0;
  outline: none;
  border-radius: 0;
}

.compile-ask {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.compile-ask.is-busy span,
.backtest-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.compile-ask.is-busy span::before,
.backtest-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: status-pulse 1.1s ease-in-out infinite;
}
.backtest-status {
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 14px;
}
@keyframes status-pulse {
  0%, 100% { opacity: .35; }
  50% { opacity: 1; }
}

.compile-go {
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: var(--btn);
  color: var(--on-btn);
  font-size: 14px;
  flex: none;
}

.dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12;
  padding: 0 0 max(12px, env(safe-area-inset-bottom));
  background: transparent;
  pointer-events: none;
}

.dock > * {
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

.dock::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--chrome);
  backdrop-filter: blur(8px) saturate(1.2);
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
}

.composer {
  position: relative;
  width: min(760px, calc(100% - 24px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  padding: 8px 8px 6px;
  border: 1px solid var(--elev);
  border-radius: 24px;
  background: transparent;
}

.composer::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: color-mix(in srgb, var(--card) 38%, transparent);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

body.theme-dark .composer::before {
  background: color-mix(in srgb, var(--card) 42%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.composer-main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.composer-tools {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 2px;
}

textarea {
  flex: 1;
  resize: none;
  border: 0;
  outline: none;
  max-height: 160px;
  padding: 8px 0;
  background: transparent;
  line-height: 1.5;
}

#mic, #send {
  width: 36px;
  height: 36px;
  margin: 0;
  align-self: flex-end;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
}

#mic {
  background: transparent;
  color: var(--muted);
  touch-action: none;
}

#mic.on { background: var(--btn); color: var(--on-btn); }

#send {
  background: var(--btn-idle);
  color: var(--on-btn);
}

#send.ready { background: var(--btn); color: var(--on-btn); }
#mic svg { width: 22px; height: 22px; stroke-width: 1.9; }
#send svg { width: 18px; height: 18px; stroke-width: 2.2; }

.model-pick { position: static; display: inline-flex; }

.task-tokens {
  color: var(--muted);
  font-size: 12px;
  line-height: 32px;
  white-space: nowrap;
  flex: none;
  padding-right: 6px;
}

.model-btn {
  min-width: 0;
  max-width: 196px;
  flex: 1 1 auto;
  height: 32px;
  min-height: 32px;
  max-height: 32px;
  padding: 0 12px 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--fill);
  color: var(--ink);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  overflow: hidden;
}

#modelName {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.model-btn svg { width: 14px; height: 14px; stroke-width: 2; flex: none; }

.model-menu {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: calc(100% + 8px);
  width: auto;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--elev);
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
  z-index: 6;
}

.model-opt {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  padding: 8px 10px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.model-opt span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-opt small { color: var(--muted); font-size: 12px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.model-opt.on, .model-opt:hover { background: var(--fill); }

.model-empty {
  margin: 0;
  padding: 10px;
  color: var(--muted);
  font-size: 13px;
}

.fine {
  width: min(760px, calc(100% - 24px));
  margin: 8px auto 0;
  color: var(--faint);
  font-size: 12px;
  text-align: center;
}

.beian {
  display: block;
  margin: 8px 16px 0;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
}

.detail .col { padding-top: 8px; }

.back {
  border: 0;
  background: transparent;
  padding: 4px 0 12px;
  color: var(--icon);
}

.actions { display: flex; gap: 8px; margin: 14px 0; }

.primary, .ghost, .danger {
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  border: 0;
}

.primary { background: var(--btn); color: var(--on-btn); font-weight: 600; }
.ghost {
  background: var(--fill);
  color: var(--ink);
  border: 1px solid var(--elev);
}
.danger {
  width: 100%;
  margin-top: 16px;
  background: transparent;
  color: var(--up);
}

.group { margin-top: 18px; }
.group h3, .sheet h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--title);
}

.field { display: block; margin: 8px 0; font-size: 13px; color: var(--muted); }

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}

.field-grid .field { margin: 0; min-width: 0; }

.field-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  border: 1px solid var(--input-line);
  border-radius: 10px;
  padding: 0 14px 0 10px;
  background: var(--input);
  color: var(--ink);
}

.field-inline .field-k {
  flex: none;
  max-width: 48%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.field-inline input,
.field-inline .pick-btn {
  flex: 1;
  min-width: 0;
  width: auto;
  height: 38px;
  margin: 0;
  border: 0;
  padding: 0;
  text-align: right;
  background: transparent;
  outline: none;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}

.field-inline input[type="checkbox"] {
  flex: none;
  width: 16px;
  height: 16px;
}

.field-inline .pick {
  flex: 1;
  min-width: 0;
}

.field-inline .pick-btn { justify-content: flex-end; }

.range-field { min-width: 0; }

.csv-file {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--input-line);
  border-radius: 10px;
  background: var(--input);
}

.csv-file-name {
  color: var(--title);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.csv-file-meta {
  color: var(--muted);
  font-size: 12px;
}

.param-pane[data-pane="pub"] .field-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
}

.range-box {
  display: flex;
  align-items: center;
  height: 40px;
  margin-top: 6px;
  padding: 0 4px;
  border: 1px solid var(--input-line);
  border-radius: 10px;
  background: var(--input);
}

.range-in {
  flex: 1;
  min-width: 0;
  width: auto;
  height: 38px;
  margin: 0;
  border: 0;
  padding: 0 12px;
  text-align: center;
  background: transparent;
  color: var(--ink);
}

.range-split {
  width: 1px;
  height: 20px;
  flex: none;
  background: var(--ink);
  opacity: 0.28;
}

.ymd {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 0;
}

.ymd input {
  display: block;
  width: 2.75em;
  height: 38px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: center;
  outline: none;
  box-shadow: none;
}

.ymd .ymd-y { width: 3.4em; }

.ymd-slash {
  flex: none;
  color: var(--muted);
  pointer-events: none;
  line-height: 38px;
  font-size: 12px;
  padding: 0 1px;
}

.code-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.compile-flag {
  font-style: normal;
  font-size: 12px;
  font-weight: 500;
}

.compile-flag.ok { color: var(--down); }
.compile-flag.off { color: var(--muted); }

.result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
}

.result-bar h3 { margin: 0; }

.result-bar .primary {
  height: 34px;
  padding: 0 16px;
  flex: none;
}

#compileDlg .primary,
#paramDlg .primary { width: 100%; margin-top: 14px; }

#paramDlg {
  top: var(--app-top, 0px);
  left: 0;
  right: 0;
  width: 100%;
  height: var(--app-h, 100dvh);
  max-width: none;
  max-height: none;
  margin: 0;
  transform: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#paramDlg .sheet {
  height: 100%;
  max-height: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 16px 16px max(18px, env(safe-area-inset-bottom));
  box-sizing: border-box;
}

#paramDlg .sheet-bar { flex: none; }

#paramBody {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

#paramDlg #paramStart { flex: none; }

.pick-btn span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field input, .field select, .sheet input, .pick-btn {
  display: block;
  width: 100%;
  margin-top: 6px;
  height: 40px;
  border: 1px solid var(--input-line);
  border-radius: 10px;
  padding: 0 10px;
  background: var(--input);
  color: var(--ink);
}

.param-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 18px 0 12px;
  border-bottom: 1px solid var(--line);
}

.param-tab {
  height: 42px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 400;
}

.param-tab.on {
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--ink);
}

.param-pane[data-pane="strat"] {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 0 6px;
}

.param-pane[data-pane="strat"] .param-mod h3 {
  margin: 0 0 4px;
}

.param-pane[data-pane="strat"] .field-grid.solo {
  grid-template-columns: minmax(0, 1fr);
}

.pick { position: relative; display: block; }

.pick-btn {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
}

.field-inline input,
.field-inline .pick-btn,
.range-box .range-in {
  display: block;
  width: auto;
  margin: 0;
  height: 38px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.field-inline input { text-align: right; }
.field-inline .pick-btn { justify-content: flex-end; }
.field-inline input:not([type="checkbox"]) {
  flex: none;
  width: 5.2em;
  margin-left: auto;
  padding-right: 2px;
  outline: none;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: textfield;
  caret-color: var(--ink);
}
.field-inline input:focus,
.field-inline input:focus-visible {
  outline: none;
  box-shadow: none;
  border: 0;
}
.range-box .range-in {
  flex: 1;
  min-width: 0;
  padding: 0 6px;
  text-align: center;
  outline: none;
}

.ymd input {
  display: block;
  width: 1.5em;
  height: 38px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: center;
  outline: none;
  box-shadow: none;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.ymd .ymd-y { width: 2.55em; }

.pick-btn svg { width: 16px; height: 16px; flex: none; color: var(--muted); }

.pick-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 8;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--elev);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.pick-opt {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 10px 12px;
  text-align: left;
}

.pick-opt.on, .pick-opt:hover { background: var(--fill); }

.check { display: flex; align-items: center; gap: 8px; margin: 10px 0; color: var(--ink); }
.check input { width: 16px; height: 16px; }

.note { color: var(--muted); font-size: 13px; }

.result-wrap { margin-top: 16px; }
.result-wrap h4 { margin: 0 0 4px; font-size: 14px; font-weight: 600; }
.result-wrap > .meta { color: var(--muted); font-size: 12px; margin-bottom: 8px; }

.result {
  padding: 0;
  border: 0;
  background: transparent;
}

.track-label {
  margin: 14px 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.eq-card, .stat-table {
  border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  -webkit-backdrop-filter: blur(8px) saturate(1.12);
  backdrop-filter: blur(8px) saturate(1.12);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--ink) 3%, transparent), inset 0 1px 0 color-mix(in srgb, #fff 40%, transparent);
}

.eq-card { padding: 12px 12px 8px; }

.eq-empty {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
}

.eq-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.eq-legend i {
  width: 12px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--gold);
}

.eq-legend b {
  margin-left: auto;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.eq-value {
  margin: 10px 0 12px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.3px;
  font-variant-numeric: tabular-nums;
}

.eq-plot {
  width: 100%;
  height: 200px;
  display: block;
  touch-action: none;
  cursor: crosshair;
}

.stat-table { overflow: hidden; }

.stat-row {
  display: grid;
  grid-template-columns: 96px 1fr 1fr 1fr;
  gap: 8px;
  align-items: center;
  padding: 9px 10px 9px 12px;
  border-top: 0.5px solid color-mix(in srgb, var(--line) 45%, transparent);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.stat-row.head {
  border-top: 0;
  padding-top: 10px;
  padding-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.stat-row > span:first-child { color: var(--muted); }
.stat-row > span:not(:first-child) { text-align: right; font-weight: 600; }
.stat-row .up { color: var(--up); }
.stat-row .down { color: var(--down); }

dialog {
  border: 0;
  padding: 0;
  top: calc(var(--app-top, 0px) + var(--app-h, 100dvh) / 2);
  bottom: auto;
  left: 0;
  right: 0;
  width: min(480px, calc(100% - 24px));
  max-height: calc(var(--app-h, 100dvh) - 32px);
  margin: 0 auto;
  transform: translateY(-50%);
  overflow: auto;
  border-radius: 16px;
  background: var(--sheet);
  color: var(--ink);
  border: 1px solid var(--elev);
  box-shadow: var(--shadow);
}

dialog::backdrop { background: var(--scrim); }

.device-list {
  max-height: min(52vh, calc(var(--app-h, 100dvh) - 180px), 360px);
  overflow: auto;
  margin-top: 12px;
}
.device-list .set-card { margin: 0; }
.device-list .set-note { margin: 12px 0 0; }
.device-list .set-row { min-height: 52px; padding: 8px 12px; }
.device-list .set-value { margin-left: auto; }

.sheet { padding: 16px 16px 18px; }
.sheet-bar { display: flex; align-items: center; justify-content: space-between; }
.wecom-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.wecom-list .wecom-link { width: 100%; }
.sheet h2 { margin: 0; font-size: 17px; color: var(--title); }
.hint { color: var(--muted); font-size: 13px; }
#menuLogout { width: 100%; margin-top: 8px; }

.auth-switch {
  display: flex;
  gap: 2px;
  margin: 4px 0 12px;
  padding: 3px;
  border-radius: 11px;
  background: var(--fill);
}

.auth-switch button {
  flex: 1;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}

.auth-switch button.on {
  background: var(--input);
  color: var(--title);
  font-weight: 600;
}

#pageScrim {
  position: fixed;
  top: var(--app-top, 0px);
  left: 0;
  right: 0;
  height: var(--app-h, 100dvh);
  z-index: 28;
  background: var(--sheet-scrim);
}

body.sheet-open { overflow: hidden; }

.sheet-page {
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--app-bottom, 0px);
  height: calc(var(--app-h, 100dvh) * 0.9);
  max-height: calc(var(--app-h, 100dvh) - 12px);
  z-index: 30;
  display: flex;
  flex-direction: column;
  background: var(--raise);
  border-radius: 28px 28px 0 0;
  box-shadow: var(--shadow);
  border-top: 1px solid var(--elev);
  overflow: hidden;
  padding: 0;
}

.account-page { background: var(--raise); }
.account-page.sheet-page { background: var(--raise); }
.sheet-page .page-bar { background: var(--raise); }

body.theme-dark .sheet-page,
body.theme-dark.side-on .workspace {
  --card: var(--module);
  --bar: var(--raise);
  --fill: #3a3a42;
  --hover: #3a3a42;
  --input: #3a3a42;
  --code-tint: #36363e;
}

.page-bar {
  flex: none;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  height: 56px;
  padding: 0 12px;
  background: var(--bar);
  border-bottom: 1px solid var(--line);
}

.page-bar h1 {
  margin: 0;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

.page-bar .share-btn { justify-self: end; }
.page-bar:has(.lib-backtest) { grid-template-columns: 1fr auto 1fr; }
.lib-backtest {
  justify-self: end;
  width: auto;
  height: 32px;
  margin: 0;
  padding: 0 12px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 32px;
}
.code-toggle {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 4px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: 12px;
  text-align: left;
}
.code-toggle .think-chev { width: 14px; height: 14px; transition: transform .15s; }
.code-toggle .think-chev.open { transform: rotate(180deg); }
.code.is-folded .src { display: none; }

.share-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.share-actions .ghost {
  flex: 1;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--elev);
  background: var(--card);
}

.sheet-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-bottom: 28px;
}

.close-round {
  width: 32px;
  height: 32px;
  justify-self: start;
  border: 1px solid var(--elev);
  border-radius: 50%;
  background: var(--fill);
  color: var(--icon);
  display: grid;
  place-items: center;
}

.close-round svg { width: 16px; height: 16px; stroke-width: 2; }

.set-group { margin: 8px 16px 0; }
.set-group + .set-group { margin-top: 28px; }
.page-bar h1 { color: var(--title); }
.set-ico { color: var(--icon); }
.set-name { color: var(--ink); }

.set-group h2 {
  margin: 14px 6px 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.set-card {
  background: var(--card);
  border: 1px solid var(--elev);
  border-radius: 14px;
  overflow: hidden;
}

.set-out { margin: 32px 16px 0; }
.set-out.data-clear { margin-top: 12px; }

.set-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 0 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--card);
  font-size: 16px;
  text-align: left;
}
.set-row:hover { background: var(--hover); }

.set-card .set-row:last-child { border-bottom: 0; }

.set-ico {
  width: 28px;
  height: 28px;
  border-radius: 0;
  background: none;
  color: var(--ink);
  display: grid;
  place-items: center;
  flex: none;
}

.set-ico svg { width: 24px; height: 24px; }
.set-name { flex: 1; }
.set-value { color: var(--muted); font-size: 14px; }
.chev { width: 16px; height: 16px; color: var(--chev); flex: none; }

.set-foot {
  margin-top: auto;
  padding: 36px 24px 28px;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.set-foot p { margin: 0; }

.set-body { display: flex; flex-direction: column; min-height: calc(100% - 56px); }
.sheet-page .set-body { flex: 1; min-height: 0; overflow: auto; }

.set-row.danger {
  margin-top: 0;
  height: auto;
  min-height: 54px;
  padding: 0 14px;
  border-radius: 0;
}
.set-row.danger .set-name { color: var(--up); }
.set-row .set-check {
  width: 18px;
  height: 18px;
  color: var(--btn);
  flex: none;
}
.set-note {
  margin: 12px 20px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.set-pad { padding: 4px 16px 24px; }
.token-card {
  margin: 8px 16px 0;
  padding: 16px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--elev);
}
.token-card h3 { margin: 0 0 12px; font-size: 13px; font-weight: 500; color: var(--muted); }
.token-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.token-grid span { display: block; color: var(--muted); font-size: 12px; }
.token-grid strong { display: block; margin-top: 4px; font-size: 18px; font-weight: 600; color: var(--title); }
.points-card {
  margin: 8px 16px 0;
  padding: 16px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--elev);
}
.points-card h3 { margin: 0; font-size: 13px; font-weight: 500; color: var(--muted); }
.points-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.points-now { min-width: 0; flex: 1; }
.points-bal {
  margin: 8px 0 0;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--title);
  font-variant-numeric: tabular-nums;
}
.points-unit {
  margin-left: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.points-stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: none;
  text-align: right;
}
.points-stats span { display: block; color: var(--muted); font-size: 12px; }
.points-stats strong { display: block; margin-top: 2px; font-size: 16px; }
.points-more {
  width: 100%;
  height: 44px;
  margin-top: 16px;
  border-radius: 12px;
}
.bill-seg {
  display: flex;
  gap: 8px;
  margin: 0 16px 10px;
}
.bill-seg button {
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--elev);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-size: 13px;
}
.bill-seg button.on {
  background: var(--btn);
  color: var(--on-btn);
  border-color: var(--btn);
  font-weight: 600;
}
.ledger-amt { font-variant-numeric: tabular-nums; font-weight: 600; flex: none; }
.ledger-amt.in { color: var(--down); }
.ledger-amt.out { color: var(--ink); }
.legal-doc {
  padding: 8px 20px 40px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.75;
}
.legal-doc .legal-updated { margin: 0 0 16px; color: var(--muted); font-size: 12px; }
.legal-doc h2 { margin: 28px 0 8px; font-size: 16px; font-weight: 600; color: var(--title); }
.legal-doc p { margin: 0 0 12px; }
.legal-doc a { color: var(--ink); }
.legal-doc ul, .legal-doc ol { margin: 0 0 12px; padding-left: 1.2em; }
.legal-doc li { margin: 4px 0; }
.legal-doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 16px;
  font-size: 13px;
}
.legal-doc th, .legal-doc td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.legal-doc th { background: var(--fill); color: var(--title); font-weight: 600; }
.confirm-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.confirm-actions button { flex: 1; }
.confirm-actions .danger {
  width: auto;
  margin-top: 0;
  background: var(--up);
  color: #fff;
}
.device-meta { display: block; color: var(--muted); font-size: 12px; }
.device-now { color: var(--down); font-size: 12px; }

.artifact {
  display: flex;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
}

.artifact small { display: block; color: var(--muted); font-size: 12px; }

.code-row { display: flex; gap: 8px; align-items: flex-end; }
.code-row label { flex: 1; }
#sms, #phoneSms { height: 40px; padding: 0 12px; border: 1px solid var(--input-line); border-radius: 10px; background: var(--input); color: var(--ink); white-space: nowrap; }
#loginForm { display: flex; flex-direction: column; }
#oneTap, #loginSubmit, #phoneSubmit { width: 100%; margin-top: 16px; }
#nameField { margin-top: 16px; }
#smsBox { margin-top: 4px; }
#oneTapPane[hidden], #smsBox[hidden], #loginSubmit[hidden], #oneTap[hidden], #nameField[hidden], #agreeRow[hidden] { display: none; }
.login-brand { display: flex; justify-content: center; margin: 4px 0 22px; }
.login-brand img { width: 56px; height: 40px; object-fit: contain; }
.mask-line { display: flex; align-items: center; justify-content: center; gap: 12px; }
.mask-line strong { font-size: 22px; font-weight: 650; letter-spacing: .04em; color: var(--title); }
#switchSms { border: 0; background: transparent; color: #2457d6; font-size: 15px; font-weight: 600; padding: 0; }
.carrier-note { margin: 8px 0 0; text-align: center; color: var(--muted); font-size: 12px; }
.agree { display: flex; align-items: flex-start; gap: 8px; margin-top: 18px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.agree input[type="checkbox"] {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin: 2px 0 0;
  padding: 0;
  border-radius: 4px;
}
.agree p { flex: 1; min-width: 0; margin: 0; }
.agree p label { cursor: pointer; }
html.masking body > .page-type-container-wrap { position: fixed !important; left: -1200px !important; top: 0 !important; }
.legal-link { border: 0; background: transparent; padding: 0; color: #2457d6; font-size: 13px; font-weight: 650; }
#legalDlg { width: min(560px, calc(100% - 24px)); }
#legalBody { max-height: min(62vh, calc(var(--app-h, 100dvh) - 160px), 520px); overflow: auto; margin-top: 8px; }
#pnvsMount { position: fixed; left: -1200px; top: 0; width: 360px; height: 640px; overflow: hidden; }
#phoneDlg .hint, #csvDlg .hint { margin: 8px 0 12px; }
#csvDlg .csv-pick { width: 100%; margin-top: 4px; }
#csvDlg .primary { width: 100%; margin-top: 16px; }
.csv-help {
  display: block;
  width: 100%;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2457d6;
  font-size: 13px;
  text-align: left;
}
#strategyPickList { max-height: min(52vh, 360px); overflow: auto; margin-top: 4px; }
#strategyPickList .artifact {
  background: var(--card);
  border: 1px solid var(--elev);
  border-radius: 12px;
  margin-top: 8px;
  padding: 12px;
}
.csv-meta {
  margin: 10px 0 0;
  color: var(--title);
  font-size: 13px;
  line-height: 1.5;
  word-break: break-all;
}

.empty-line { color: var(--muted); font-size: 14px; padding: 8px 0; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--app-bottom, 0px) + 28px);
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--btn);
  color: var(--on-btn);
  font-size: 13px;
  z-index: 40;
}

@media (max-width: 959px) {
  html, body { overflow: hidden; }
  body { background: var(--side); }
  aside {
    position: fixed;
    top: var(--app-top, 0px);
    bottom: var(--app-bottom, 0px);
    left: 0;
    transform: translateX(-100%);
    transition: transform 0.34s cubic-bezier(0.32, 0.72, 0, 1);
    border-right: 0;
  }
  body.side-on aside { transform: none; }
  .workspace {
    position: relative;
    z-index: 22;
    transition: transform 0.34s cubic-bezier(0.32, 0.72, 0, 1), border-radius 0.34s cubic-bezier(0.32, 0.72, 0, 1), background 0.34s cubic-bezier(0.32, 0.72, 0, 1);
  }
  .top {
    transition: background 0.34s cubic-bezier(0.32, 0.72, 0, 1);
  }
  body.side-on .workspace {
    transform: translateX(80vw);
    border-radius: 32px 0 0 32px;
    overflow: hidden;
    box-shadow: -8px 0 28px rgba(0, 0, 0, 0.28);
  }
  body.theme-dark.side-on .workspace {
    background: var(--raise);
    --chrome: rgba(28, 28, 32, 0);
  }
  .workspace::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--side-scrim);
    opacity: 0;
    pointer-events: none;
    z-index: 50;
    border-radius: inherit;
    transition: opacity 0.34s cubic-bezier(0.32, 0.72, 0, 1);
  }
  body.side-on .workspace::after { opacity: 1; }
  body.theme-dark.side-on .workspace::after { opacity: 0; }
  #backdrop {
    left: 80vw;
    background: transparent;
    z-index: 25;
  }
  .grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 960px) {
  body:not(.side-on) aside { display: none; }
}
