:root {
  color-scheme: light;
  --paper: #faf9f6;
  --sidebar: #efeee8;
  --ink: #30312c;
  --muted: #8b8a80;
  --line: #e5e3da;
  --accent: #b96b50;
  --green: #6f8767;
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
}
button,
input {
  font: inherit;
}
button {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.icons {
  display: none;
}
[hidden] {
  display: none !important;
}
.shell {
  display: flex;
  height: 100dvh;
  min-height: 500px;
}
.sidebar {
  width: 274px;
  flex: none;
  background: var(--sidebar);
  border-right: 1px solid #e3e1d8;
  display: flex;
  flex-direction: column;
  padding: 24px 15px 0;
  transition: margin 0.2s;
  z-index: 30;
}
.brand-row {
  padding: 0 12px 27px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 650;
  font-size: 23px;
  letter-spacing: -0.9px;
}
.mark {
  color: var(--accent);
  font-size: 35px;
  line-height: 1;
  font-weight: 400;
}
.version {
  font-size: 9px;
  letter-spacing: 0.4px;
  color: #9b978c;
  background: #e5e2d9;
  border: 1px solid #dcd8cc;
  border-radius: 4px;
  padding: 3px 5px;
  margin-left: 1px;
  font-weight: 400;
}
.new-chat {
  height: 43px;
  padding: 0 13px;
  display: flex;
  gap: 11px;
  align-items: center;
  width: 100%;
  border-radius: 8px;
  background: #fbfaf7;
  border: 1px solid #dfdcd2;
  box-shadow: 0 1px 2px #423d2d04;
  text-align: left;
  font-size: 13px;
  font-weight: 550;
}
.new-chat:hover {
  background: white;
}
.new-chat kbd {
  margin-left: auto;
  font-weight: 400;
  font-size: 10px;
  color: #aaa79e;
  font-family: inherit;
}
.search {
  height: 36px;
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 14px 8px 24px;
  color: #98968a;
}
.search svg {
  width: 15px;
}
.search input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: none;
  outline: none;
  font-size: 12px;
  color: var(--ink);
}
.search input::placeholder {
  color: #99978b;
}
.search kbd {
  font-family: inherit;
  border: 1px solid #dedbd1;
  border-radius: 4px;
  padding: 0 5px;
  font-size: 11px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 11px;
  font-size: 11px;
  letter-spacing: 0.8px;
  color: #939083;
}
.icon-button {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #89887e;
  flex: none;
}
.icon-button:hover {
  background: #e9e6dc;
  color: #4b4c42;
}
.icon-button.small {
  width: 23px;
  height: 23px;
}
.icon-button.small svg {
  width: 14px;
  height: 14px;
}
.project-list {
  flex: 1;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #d2cec1 transparent;
}
.project-group {
  margin-bottom: 5px;
}
.project-row {
  display: flex;
  align-items: center;
  gap: 3px;
  border-radius: 7px;
  height: 39px;
  padding: 0 5px;
}
.project-row:hover {
  background: #e6e3d9;
}
.project-row.selected {
  background: #e5e2d7;
}
.project-toggle {
  width: 18px;
  height: 26px;
  display: flex;
  align-items: center;
  padding: 1px;
  color: #9c998e;
}
.project-toggle svg {
  width: 13px;
  height: 13px;
  transition: transform 0.15s;
}
.expanded .project-toggle svg {
  transform: rotate(90deg);
}
.project-select {
  display: flex;
  gap: 9px;
  align-items: center;
  flex: 1;
  min-width: 0;
  padding: 0 3px;
  text-align: left;
  font-size: 13px;
}
.project-select svg {
  color: #888777;
  width: 17px;
  height: 17px;
}
.project-select span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-add {
  opacity: 0;
  width: 25px;
  height: 27px;
}
.project-add svg {
  width: 14px;
  height: 14px;
}
.project-row:hover .project-add,
.project-add:focus-visible {
  opacity: 1;
}
.project-count {
  font-size: 10px;
  color: #a7a292;
  margin-left: 5px;
}
.session-list {
  margin: 3px 0 11px 29px;
  border-left: 1px solid #d9d6ca;
  padding-left: 9px;
}
.session-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  margin: 2px 0;
  border-radius: 6px;
  text-align: left;
  font-size: 12px;
  color: #8b887c;
}
.session-row:hover {
  background: #e7e4db;
  color: #4f5046;
}
.session-row.active {
  background: #faf8f2;
  color: #5d5a4e;
  box-shadow: 0 1px 2px #3d352c05;
}
.session-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.session-row svg {
  width: 13px;
  height: 13px;
  opacity: 0.65;
}
.session-row .dot {
  width: 5px;
  height: 5px;
  background: #8b9a7c;
  flex: none;
}
.no-sessions {
  font-size: 11px;
  color: #a19b8d;
  padding: 8px 10px;
}
.empty {
  font-size: 12px;
  color: #a29c8e;
  padding: 13px 12px;
  line-height: 1.8;
}
.sidebar-bottom {
  padding: 15px 10px 13px;
  border-top: 1px solid #e0ddd1;
}
.workspace-info {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 10px;
  padding: 5px 0 15px;
  text-align: left;
}
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 31px;
  height: 31px;
  border: 1px solid #dcd5c5;
  border-radius: 9px;
  background: #e7e0d1;
  color: #82745d;
  font-family: Georgia, serif;
  font-size: 16px;
}
.workspace-info strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
}
.workspace-info small {
  display: block;
  font-size: 10px;
  color: #9c978b;
  margin-top: 4px;
}
.workspace-info > svg {
  margin-left: auto;
  width: 15px;
  height: 15px;
  color: #a8a294;
}
.sidebar-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: #9c9789;
  border-top: 1px solid #e2ded2;
  padding-top: 12px;
}
.sidebar-foot > span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.sidebar-foot button {
  padding: 0;
  color: #a39d90;
}
.sidebar-foot svg {
  width: 14px;
  height: 14px;
}
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #aaa697;
}
.dot.green {
  background: var(--green);
}
.main {
  min-width: 0;
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 66px;
  flex: none;
  border-bottom: 1px solid #eeece6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  gap: 12px;
}
.breadcrumb {
  display: flex;
  gap: 15px;
  align-items: center;
  font-size: 12px;
  min-width: 0;
}
.breadcrumb > span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}
.breadcrumb .icon-button {
  margin-left: -8px;
  margin-right: 5px;
}
.divider {
  color: #d4cfc2;
}
#breadcrumb-session {
  color: #9b978b;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}
.native-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #999487;
  font-size: 10px;
}
.spark {
  font-size: 19px;
  color: var(--accent);
  line-height: 1;
}
.welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: auto;
}
.welcome-content {
  width: min(660px, calc(100% - 64px));
  margin: auto;
  padding: 64px 0 68px;
}
.eyebrow {
  display: flex;
  gap: 9px;
  align-items: center;
  color: #9c9688;
  font-size: 9px;
  letter-spacing: 2.6px;
  margin-bottom: 28px;
}
.eyebrow > span {
  width: 17px;
  height: 1px;
  background: #b9ad94;
}
.hero-mark {
  font-size: 58px;
  line-height: 1;
  color: var(--accent);
  font-family: Georgia, serif;
  margin-bottom: 21px;
}
.welcome h1 {
  font-family: Georgia, "Songti SC", "Noto Serif CJK SC", "SimSun", serif;
  font-size: 40px;
  letter-spacing: 1px;
  font-weight: 400;
  margin: 0 0 19px;
  line-height: 1.45;
  color: #36362f;
}
.hero-description {
  font-size: 13px;
  color: #999384;
  line-height: 2;
  margin: 0 0 39px;
  letter-spacing: 0.3px;
}
.start-card {
  background: #fffefa;
  border: 1px solid #e4dfd3;
  border-radius: 13px;
  box-shadow:
    0 6px 22px #50453304,
    0 1px 2px #50453305;
  padding: 23px 25px 19px;
}
.start-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: #6e695b;
  font-weight: 500;
}
.start-heading svg {
  width: 17px;
  height: 17px;
  color: #aaa18e;
}
.hint {
  margin-left: auto;
  color: #b7af9e;
  font-size: 10px;
  font-weight: 400;
}
.start-card > p {
  font-size: 13px;
  color: #a39c8d;
  margin: 18px 0 30px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.start-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.environment {
  font-size: 10px;
  color: #a39b8c;
  display: flex;
  align-items: center;
  gap: 6px;
}
.environment .dot {
  width: 5px;
  height: 5px;
}
.primary {
  background: var(--accent);
  color: #fff9f2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px solid #ac5f46;
  border-radius: 7px;
  min-height: 38px;
  padding: 9px 15px;
  font-size: 12px;
  box-shadow: 0 1px 2px #77402212;
  transition: background 0.15s;
}
.primary:hover {
  background: #a55c44;
}
.primary svg {
  width: 15px;
  height: 15px;
}
.secondary {
  border: 1px solid var(--line);
  background: #f7f5ee;
  border-radius: 6px;
  padding: 9px 14px;
  font-size: 12px;
}
.secondary:hover {
  background: #ece8dc;
}
.principles {
  display: flex;
  justify-content: space-between;
  margin-top: 23px;
  gap: 12px;
  color: #aaa293;
  font-size: 10px;
}
.principles > span {
  display: flex;
  gap: 7px;
  align-items: center;
}
.principles svg {
  width: 13px;
  height: 13px;
  color: #b4aa97;
}
.welcome-footer {
  padding: 0 36px 25px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #b1a998;
  font-size: 10px;
  letter-spacing: 0.3px;
}
.welcome-footer > span {
  letter-spacing: 1.8px;
  font-size: 8px;
}
.conversation {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 31px 36px 15px;
  gap: 24px;
}
.conversation-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  flex: none;
}
.kicker {
  font-size: 8px;
  letter-spacing: 1.8px;
  color: #aaa08d;
  display: flex;
  align-items: center;
  gap: 7px;
}
.kicker .spark {
  font-size: 15px;
}
.conversation h2 {
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: 25px;
  font-weight: 400;
  margin: 8px 0 7px;
  overflow-wrap: anywhere;
}
.project-path {
  color: #a49b8a;
  font-size: 10px;
  text-align: left;
  padding: 0;
  overflow-wrap: anywhere;
}
.project-path:hover {
  color: var(--accent);
}
.terminal-card {
  flex: 1;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  border: 1px solid #ded8cc;
  border-radius: 11px;
  overflow: hidden;
  box-shadow: 0 3px 16px #4a3b2406;
}
.terminal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  background: #f3f0e9;
  border-bottom: 1px solid #e2dccf;
  padding: 0 13px;
  color: #938a77;
  font-size: 10px;
  gap: 10px;
}
.terminal-toolbar > span,
.terminal-toolbar > div {
  display: flex;
  align-items: center;
  gap: 7px;
}
.terminal-toolbar svg {
  width: 14px;
  height: 14px;
}
.terminal-toolbar .icon-button {
  width: 25px;
  height: 25px;
}
#terminal-status {
  font-size: 9px;
  color: #aaa08e;
}
#terminal-status.online {
  color: #74826c;
}
.terminal-wrap {
  position: relative;
  min-height: 0;
  flex: 1;
  background: #171816;
  padding: 16px 18px;
}
#terminal {
  height: 100%;
  width: 100%;
}
.xterm {
  height: 100%;
}
.xterm-viewport {
  scrollbar-width: thin;
  scrollbar-color: #45473e transparent;
}
.terminal-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--paper);
  padding: 30px;
}
.terminal-placeholder .hero-mark {
  font-size: 43px;
  opacity: 0.75;
  margin-bottom: 15px;
}
.terminal-placeholder h3 {
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: 25px;
  font-weight: 400;
  margin: 0 0 10px;
}
.terminal-placeholder p {
  font-size: 12px;
  color: #a19886;
  line-height: 2;
  margin: 0 0 24px;
  max-width: 480px;
}
.conversation-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #aaa18f;
  font-size: 9px;
  flex: none;
}
.conversation-footer > span:first-child {
  display: flex;
  align-items: center;
  gap: 7px;
}
.conversation-footer .dot {
  width: 4px;
  height: 4px;
}
.toast {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #38372f;
  color: #faf5e9;
  padding: 12px 18px;
  max-width: calc(100% - 40px);
  font-size: 12px;
  border-radius: 8px;
  z-index: 100;
  box-shadow: 0 5px 25px #28231520;
  line-height: 1.8;
}
dialog {
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #e1dbcd;
  border-radius: 16px;
  box-shadow: 0 25px 100px #3f382d25;
  padding: 30px;
  width: min(450px, calc(100% - 40px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
}
dialog::backdrop {
  background: #302b224a;
  backdrop-filter: blur(5px);
}
dialog h2 {
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: 25px;
  font-weight: 400;
  line-height: 1.5;
  margin: 12px 0;
}
dialog p {
  font-size: 12px;
  color: #9a907e;
  line-height: 1.95;
  white-space: pre-line;
}
dialog label {
  display: block;
  font-size: 11px;
  color: #968b78;
  margin: 24px 0 9px;
}
dialog input {
  width: 100%;
  border: 1px solid #dcd5c6;
  border-radius: 7px;
  background: #fffef9;
  padding: 12px;
  font-size: 13px;
  color: var(--ink);
}
dialog .error {
  color: #bd5e49;
  font-size: 11px;
  min-height: 10px;
  margin: 9px 0;
}
.login-dialog {
  padding: 38px 35px;
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin-bottom: 36px;
}
.login-brand .mark {
  font-size: 38px;
}
.dialog-eyebrow {
  font-size: 9px;
  color: #ac9b80;
  letter-spacing: 1.7px;
}
.login-dialog .primary {
  width: 100%;
  margin: 0 0 14px;
  height: 42px;
}
.login-dialog small {
  display: block;
  text-align: center;
  font-size: 10px;
  color: #b3aa99;
}
.dialog-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
dialog code {
  display: block;
  font-size: 11px;
  overflow-wrap: anywhere;
  color: #9e7f5f;
  background: #f0ebe0;
  padding: 14px;
  border-radius: 6px;
  white-space: pre-wrap;
  margin: 20px 0;
}
dialog .secondary {
  margin-top: 10px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 25px;
}
.dialog-actions .secondary {
  margin: 0;
}
.shade {
  display: none;
}
.shell.collapsed .sidebar {
  margin-left: -274px;
}
@media (min-width: 1550px) {
  .welcome-content {
    width: 690px;
  }
  .welcome h1 {
    font-size: 45px;
  }
  .hero-description {
    font-size: 14px;
  }
  .start-card {
    padding: 26px 28px 22px;
  }
  .topbar {
    height: 72px;
  }
}
@media (max-height: 800px) and (min-width: 751px) {
  .welcome-content { padding-top: 30px; padding-bottom: 35px; }
  .eyebrow { margin-bottom: 20px; }
  .hero-mark { font-size: 50px; margin-bottom: 15px; }
  .hero-description { margin-bottom: 28px; }
  .start-card > p { margin-bottom: 23px; }
}
@media (max-width: 1050px) {
  .sidebar {
    width: 245px;
  }
  .shell.collapsed .sidebar {
    margin-left: -245px;
  }
  .welcome-content {
    width: calc(100% - 60px);
  }
  .principles {
    font-size: 9px;
    gap: 7px;
  }
  .conversation {
    padding: 25px 23px 15px;
  }
  .conversation-footer > span:last-child {
    display: none;
  }
}
@media (max-width: 750px) {
  .shell {
    min-height: 420px;
  }
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 274px;
    transform: translateX(-100%);
    transition: transform 0.2s;
    margin: 0 !important;
  }
  .shell.mobile-sidebar .sidebar {
    transform: translateX(0);
  }
  .shell.mobile-sidebar .shade {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 25;
    background: #302b2250;
    backdrop-filter: blur(2px);
  }
  .topbar {
    height: 58px;
    padding: 0 19px;
  }
  .native-badge {
    display: none;
  }
  .breadcrumb {
    gap: 9px;
    font-size: 11px;
  }
  .breadcrumb > span {
    max-width: 140px;
  }
  .welcome-content {
    width: calc(100% - 42px);
    padding: 45px 0;
  }
  .welcome h1 {
    font-size: 31px;
    letter-spacing: 0;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 2px;
  }
  .hero-mark {
    font-size: 49px;
  }
  .hero-description {
    font-size: 12px;
  }
  .start-card {
    padding: 19px 18px 17px;
  }
  .hint {
    display: none;
  }
  .start-card > p {
    font-size: 12px;
    margin: 17px 0 25px;
  }
  .environment {
    font-size: 9px;
  }
  .primary {
    font-size: 11px;
    padding: 9px 12px;
    gap: 8px;
  }
  .principles {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 14px;
    font-size: 9px;
  }
  .welcome-footer {
    padding: 0 22px 20px;
    font-size: 9px;
  }
  .welcome-footer > span {
    font-size: 7px;
  }
  .conversation {
    padding: 20px 14px 12px;
    gap: 17px;
  }
  .conversation h2 {
    font-size: 22px;
  }
  .terminal-wrap {
    padding: 10px 8px;
  }
  .conversation-footer {
    font-size: 8px;
  }
  .project-add {
    opacity: 1;
  }
  .terminal-placeholder {
    padding: 20px;
  }
  .terminal-placeholder p {
    font-size: 11px;
  }
}
