:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #111;
  color: #ececec;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, textarea:focus-visible { outline: 2px solid #8eb5ff; outline-offset: 3px; }
a { color: inherit; }
.app-shell { display: flex; height: 100dvh; min-height: 500px; overflow: hidden; background: #111; }
.sidebar { display: flex; width: 220px; flex: none; flex-direction: column; border-right: 1px solid #292929; background: #111; }
.sidebar-top { display: flex; min-height: 78px; align-items: center; justify-content: space-between; padding: 0 18px; }
.brand { display: flex; align-items: center; gap: 9px; color: #f1f1f1; font-size: 15px; font-weight: 700; letter-spacing: -.045em; text-decoration: none; }
.brand img { width: 21px; height: 21px; }
.collapse-button { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid transparent; border-radius: 6px; background: none; color: #a4a4a4; font-size: 18px; }
.collapse-button:hover { border-color: #353535; background: #202020; color: #fff; }
.sidebar.collapsed { width: 68px; }
.sidebar.collapsed .brand span, .sidebar.collapsed .primary-nav a:not(.current), .sidebar.collapsed .primary-nav a.current, .sidebar.collapsed .primary-nav button { font-size: 0; gap: 0; justify-content: center; padding: 0; }
.sidebar.collapsed .brand { display: none; }
.sidebar.collapsed .sidebar-top { justify-content: center; }
.sidebar.collapsed .primary-nav { padding-right: 10px; padding-left: 10px; }
.sidebar.collapsed .primary-nav a span, .sidebar.collapsed .primary-nav button span { font-size: 18px; }
.sidebar.collapsed .history-heading, .sidebar.collapsed .chat-list, .sidebar.collapsed .sidebar-bottom { display: none; }
.primary-nav { display: grid; gap: 3px; padding: 9px 18px 23px; }
.primary-nav a, .primary-nav button { display: flex; min-height: 41px; align-items: center; gap: 13px; width: 100%; padding: 0 11px; border: 0; border-radius: 9px; background: transparent; color: #ddd; font: inherit; font-size: 14px; text-align: left; text-decoration: none; }
.primary-nav a span, .primary-nav button span { width: 19px; color: #c4c4c4; font-size: 18px; text-align: center; }
.primary-nav a:hover, .primary-nav button:hover, .primary-nav a.current, .primary-nav button.current { background: #272727; color: #fff; }
.history-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 18px 6px 27px; }
.section-label { color: #858585; font-size: 12px; font-weight: 600; }
.new-chat { display: grid; width: 27px; height: 27px; place-items: center; border: 0; border-radius: 6px; background: transparent; color: #aaa; font-size: 21px; }
.new-chat:hover { background: #282828; color: #fff; }
.chat-list { display: grid; align-content: start; gap: 2px; flex: 1; min-height: 0; overflow: auto; padding: 0 18px; }
.chat-item { display: flex; min-height: 41px; align-items: center; gap: 8px; width: 100%; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: #a8a8a8; text-align: left; font-size: 13px; }
.chat-item:hover, .chat-item.active { background: #262626; color: #f2f2f2; }
.chat-item .bubble-icon { display: none; }
.chat-item span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-bottom { padding: 12px 17px 17px; }
.square-link { display: flex; min-height: 54px; align-items: center; gap: 10px; padding: 7px 8px; border: 1px solid #2f2f2f; border-radius: 9px; color: #ddd; text-decoration: none; }
.square-link:hover { background: #202020; }
.square-mini { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 8px; background: #292929; color: #b8c7ff; }
.square-link-copy { display: grid; flex: 1; gap: 2px; }
.square-link-copy strong { font-size: 11px; font-weight: 600; }
.square-link-copy small { color: #888; font-size: 10px; }
.square-link>span:last-child { color: #888; font-size: 12px; }
.clear-chats { margin: 10px 8px 0; padding: 0; border: 0; background: none; color: #737373; text-align: left; font-size: 10px; }
.clear-chats:hover { color: #ddd; }
.main-panel { position: relative; display: flex; min-width: 0; flex: 1; flex-direction: column; background: #111; }
.topbar { display: flex; height: 0; flex: none; align-items: center; justify-content: space-between; gap: 20px; padding: 0; overflow: visible; }
.mobile-menu-button { display: none; border: 0; background: none; color: #ddd; font-size: 18px; }
.square-button { display: inline-flex; min-height: 32px; align-items: center; gap: 8px; padding: 0 9px; border: 1px solid #303030; border-radius: 8px; background: #1d1d1d; color: #ccc; font-size: 11px; }
.composer-toolbar .square-button { position: relative; display: grid; width: 36px; height: 36px; min-height: 36px; flex: none; place-items: center; padding: 0; border: 0; border-radius: 50%; background: #3b3b3b; }
.composer-toolbar .square-button:hover, .composer-plus:hover { background: #515151; }
.composer-toolbar .square-button .square-count { position: absolute; top: -2px; right: -2px; min-width: 13px; height: 13px; padding: 0 2px; border: 1px solid #242424; border-radius: 50%; background: #777; color: #fff; font-size: 8px; line-height: 11px; }
.square-orbit { color: #c3c9db; font-size: 14px; }
.square-count { display: grid; min-width: 17px; height: 17px; place-items: center; border-radius: 5px; background: #333; color: #ddd; font-size: 9px; }
.chat-stage { position: relative; flex: 1; min-height: 0; overflow: auto; scrollbar-color: #393939 transparent; }
.square-home { flex: 1; min-height: 0; overflow: auto; scrollbar-color: #393939 transparent; }
.square-home-content { width: min(1160px, 100%); margin: 0 auto; padding: clamp(24px, 5vh, 58px) clamp(18px, 4vw, 48px) 52px; }
.square-home-hero { display: flex; align-items: end; justify-content: space-between; gap: 28px; }
.square-home-hero h1 { margin: 11px 0 8px; color: #f3f3f3; font-size: clamp(30px, 4vw, 42px); font-weight: 600; letter-spacing: -.055em; }
.square-home-intro { max-width: 620px; margin: 0; color: #a2a2a2; font-size: 13px; line-height: 1.65; }
.square-home-actions { display: flex; flex: none; flex-direction: column; align-items: stretch; gap: 8px; min-width: 156px; }
.home-add-computer { display: grid; min-height: 40px; place-items: center; padding: 0 14px; border-radius: 8px; background: #e6e6e6; color: #151515; font-size: 12px; font-weight: 650; text-decoration: none; }
.home-add-computer:hover { background: #fff; }
.home-account-link { color: #aaa; font-size: 10px; text-align: center; text-underline-offset: 3px; }
.home-connection { margin: 24px 0 0; padding: 13px 15px; border: 1px solid #333; border-radius: 9px; background: #191919; color: #bdbdbd; font-size: 11px; line-height: 1.5; }
.home-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 11px 0 30px; }
.home-metric { display: grid; gap: 7px; min-height: 78px; align-content: center; padding: 13px 15px; border: 1px solid #303030; border-radius: 9px; background: #171717; }
.home-metric span { color: #8f8f8f; font-size: 10px; }
.home-metric strong { color: #eee; font-size: 20px; font-weight: 600; letter-spacing: -.035em; }
.home-section { min-width: 0; }
.home-section-heading { display: flex; align-items: end; justify-content: space-between; margin: 0 0 12px; }
.home-section-heading h2 { margin: 5px 0 0; color: #ececec; font-size: 17px; font-weight: 600; letter-spacing: -.03em; }
.home-workloads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.home-workload-card { display: grid; min-height: 172px; align-content: start; justify-items: start; gap: 8px; padding: 16px; border: 1px solid #343434; border-radius: 11px; background: #191919; color: #aaa; text-align: left; }
.home-workload-card:hover { border-color: #5a5a5a; background: #1e1e1e; }
.home-workload-card strong { color: #eee; font-size: 14px; font-weight: 600; }
.home-workload-card > span:not(.home-workload-icon):not(.home-workload-link) { max-width: 390px; font-size: 11px; line-height: 1.5; }
.home-workload-icon { color: #c7d2f5; font-size: 19px; }
.home-workload-link { align-self: end; padding-top: 2px; color: #d7d7d7; font-size: 10px; }
.home-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; margin-top: 34px; }
.home-computer-list { margin: 0; }
.home-empty { margin: 0; color: #888; font-size: 11px; line-height: 1.5; }
.home-recent-title { margin: 23px 0 8px; color: #ddd; font-size: 12px; font-weight: 600; }
.image-stage { flex: 1; min-height: 0; overflow: auto; scrollbar-color: #393939 transparent; }
.image-workspace { width: min(920px, 100%); margin: 0 auto; padding: clamp(24px, 5vh, 58px) clamp(18px, 4vw, 42px) 48px; }
.image-workspace h1 { margin: 12px 0 8px; color: #f1f1f1; font-size: clamp(25px, 3vw, 34px); font-weight: 600; letter-spacing: -.045em; }
.image-intro { max-width: 650px; margin: 0; color: #999; font-size: 13px; line-height: 1.65; }
.image-prompt-label { display: block; margin: 25px 0 8px; color: #ddd; font-size: 11px; font-weight: 600; }
.image-workspace textarea { display: block; width: min(680px, 100%); min-height: 94px; resize: vertical; padding: 13px 14px; border: 1px solid #393939; border-radius: 10px; background: #1d1d1d; color: #f2f2f2; font: inherit; font-size: 13px; line-height: 1.55; }
.image-workspace textarea:focus { border-color: #6d6d6d; outline: 2px solid #8eb5ff; outline-offset: 2px; }
.image-workspace textarea::placeholder { color: #777; }
.image-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.image-actions button { min-height: 38px; padding: 0 13px; border: 1px solid #414141; border-radius: 8px; background: #252525; color: #e5e5e5; font-size: 11px; }
.image-actions button:hover:not(:disabled) { background: #343434; }
.image-actions button:disabled { cursor: not-allowed; opacity: .5; }
.image-actions .image-primary { border-color: #e5e5e5; background: #e5e5e5; color: #151515; font-weight: 650; }
.image-actions .image-primary:hover:not(:disabled) { background: #fff; }
.image-status { min-height: 22px; margin: 11px 0; color: #aaa; font-size: 11px; line-height: 1.5; }
.image-result { width: min(100%, 680px); margin: 18px auto 0; padding: 12px; border: 1px solid #333; border-radius: 12px; background-color: #191919; background-image: linear-gradient(45deg,#222 25%,transparent 25%),linear-gradient(-45deg,#222 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#222 75%),linear-gradient(-45deg,transparent 75%,#222 75%); background-position: 0 0,0 8px,8px -8px,-8px 0; background-size: 16px 16px; }
.image-result[hidden] { display: none; }
.generated-image { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 6px; background: #fff; }
.image-result figcaption { padding: 10px 3px 1px; color: #999; font-size: 10px; line-height: 1.5; }
.image-proof-note { width: min(680px, 100%); margin: 10px auto 0; color: #777; font-size: 10px; line-height: 1.55; text-align: center; }
.image-generator-frame { display: block; width: 100%; min-height: min(1050px, 78vh); margin: 20px auto 0; border: 1px solid #333; border-radius: 12px; background: #111; }
.empty-state { display: flex; min-height: 100%; flex-direction: column; align-items: center; justify-content: center; padding: 30px 24px 90px; text-align: center; }
.eyebrow { margin: 0; color: #929292; font-size: 10px; font-weight: 650; letter-spacing: .14em; }
.empty-state h1 { margin: 14px 0 10px; font-size: clamp(28px, 3vw, 38px); font-weight: 600; letter-spacing: -.045em; line-height: 1.16; }
.sign-in-link { margin: -4px 0 15px; color: #d5dfff; font-size: 12px; text-underline-offset: 3px; }
.hero-copy { max-width: 440px; margin: 0; color: #929292; font-size: 13px; line-height: 1.65; }
.suggestions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 26px; }
.suggestions button { display: flex; min-height: 35px; align-items: center; gap: 10px; padding: 0 11px; border: 1px solid #343434; border-radius: 9px; background: #1c1c1c; color: #ccc; font-size: 11px; }
.suggestions button:hover { border-color: #575757; background: #252525; }
.suggestions span { color: #888; }
.messages { width: min(850px, 100%); margin: 0 auto; padding: 24px 26px 42px; }
.message { display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 17px 0; }
.message-avatar { display: none; }
.message-body { max-width: 100%; min-width: 0; padding: 0; color: #e8e8e8; font-size: 15px; line-height: 1.72; overflow-wrap: anywhere; white-space: pre-wrap; }
.message-body p { margin: 0 0 13px; }
.message-body p:last-child { margin-bottom: 0; }
.message-body h2, .message-body h3, .message-body h4 { margin: 22px 0 10px; font-weight: 650; line-height: 1.35; }
.message-body h2 { font-size: 21px; }
.message-body h3 { font-size: 18px; }
.message-body h4 { font-size: 16px; }
.message-body ul, .message-body ol { display: grid; gap: 6px; margin: 7px 0 14px; padding-left: 25px; }
.message-body blockquote { margin: 8px 0 14px; padding: 2px 0 2px 16px; border-left: 3px solid #484848; color: #c8c8c8; }
.message-body code { padding: 2px 5px; border-radius: 4px; background: #292929; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
.message.user { align-items: flex-end; }
.message.user .message-body { max-width: min(76%, 620px); padding: 10px 16px; border-radius: 22px; background: #383838; color: #f0f0f0; line-height: 1.55; }
.message-body.empty:after { content: attr(data-wait-message); color: #898989; }
.composer-wrap { z-index: 1; width: min(880px, calc(100% - 44px)); flex: none; align-self: center; padding: 0 0 13px; }
.model-status { min-height: 15px; margin: 0 7px 6px; color: #858585; font-size: 10px; line-height: 1.4; }
.composer { display: flex; min-height: 112px; flex-direction: column; align-items: stretch; gap: 0; padding: 11px 12px 10px 18px; border: 1px solid #303030; border-radius: 23px; background: #242424; box-shadow: 0 5px 22px #0004; }
.composer:focus-within { border-color: #454545; }
.composer textarea { width: 100%; max-height: 180px; min-height: 43px; resize: none; padding: 3px 5px; border: 0; outline: 0; background: none; color: #f4f4f4; font-size: 14px; line-height: 1.55; }
.composer textarea::placeholder { color: #8a8a8a; }
.composer-toolbar { display: flex; min-height: 38px; align-items: center; gap: 7px; }
.mode-switch { display: flex; align-items: center; gap: 3px; padding: 3px; border-radius: 18px; background: #333; }
.mode-switch button { min-height: 29px; padding: 0 11px; border: 0; border-radius: 16px; background: transparent; color: #aaa; font-size: 11px; white-space: nowrap; }
.mode-switch button.selected { background: #555; color: #f1f1f1; }
.mode-switch button:disabled { cursor: not-allowed; color: #777; }
.mode-switch span { display: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.composer-model { display: flex; min-height: 35px; align-items: center; gap: 9px; margin-left: auto; padding: 0 12px; border-radius: 18px; background: #3b3b3b; color: #e2e2e2; font-size: 12px; white-space: nowrap; }
.composer-model span { color: #999; }
.composer-model #modelName { color: #e2e2e2; }
.composer-model #modelDevice { color: #9b9b9b; }
.send-button, .stop-button { display: grid; width: 36px; height: 36px; flex: none; place-items: center; border: 0; border-radius: 50%; background: #444; color: #8a8a8a; font-size: 21px; font-weight: 600; }
.send-button:not(:disabled) { background: #eee; color: #222; }
.send-button:disabled { cursor: not-allowed; }
.stop-button { background: #eee; color: #222; font-size: 13px; }
.composer-note { margin: 7px 0 0; color: #6f6f6f; text-align: center; font-size: 9px; line-height: 1.4; }
.square-panel { width: 330px; flex: none; overflow: auto; border-left: 1px solid #303030; background: #171717; padding: 25px 22px; }
.square-panel[hidden] { display: none; }
.panel-head { display: flex; align-items: start; justify-content: space-between; gap: 15px; }
.panel-head .eyebrow { font-size: 9px; }
.panel-head h2 { margin: 8px 0 0; font-size: 22px; letter-spacing: -.05em; }
.panel-head button { border: 0; background: none; color: #aaa; font-size: 27px; }
.panel-intro { margin: 22px 0 24px; color: #aaa; font-size: 12px; line-height: 1.7; }
.square-model-choice { display: grid; gap: 6px; margin: -8px 0 18px; }
.square-model-choice label { color: #ddd; font-size: 11px; font-weight: 600; }
.square-model-choice select { min-height: 36px; padding: 0 9px; border: 1px solid #3b3b3b; border-radius: 7px; background: #222; color: #eee; font: inherit; font-size: 11px; }
.square-model-choice p { margin: 0; color: #888; font-size: 10px; line-height: 1.45; }
.square-status { display: grid; gap: 10px; padding: 12px; border: 1px solid #363636; border-radius: 9px; background: #202020; color: #bbb; font-size: 11px; line-height: 1.5; }
.square-retry { justify-self: start; padding: 6px 9px; border: 1px solid #444; border-radius: 7px; background: #2b2b2b; color: #eee; font-size: 11px; }
.square-retry:hover { background: #3a3a3a; }
.computer-list { display: grid; gap: 7px; margin: 17px 0; }
.computer-row { display: flex; min-height: 49px; align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid #363636; border-radius: 10px; background: #202020; font-size: 11px; }
.computer-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #666; }
.computer-dot.ready { background: #7fdaa1; }
.computer-name { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.computer-state { color: #999; font-size: 10px; }
.square-activity-section { margin-top: 19px; }
.square-activity-section h3 { margin: 0 0 8px; color: #ddd; font-size: 12px; font-weight: 600; }
.square-activity-list { display: grid; gap: 7px; }
.square-activity-row { display: grid; gap: 4px; padding: 10px 11px; border: 1px solid #363636; border-radius: 9px; background: #202020; font-size: 10px; line-height: 1.45; }
.square-activity-row strong { color: #eee; font-size: 11px; font-weight: 600; }
.square-activity-status { color: #c8c8c8; }
.square-activity-meta, .square-activity-empty { margin: 0; color: #888; font-size: 10px; }
.square-route-benchmark > p:not(.square-activity-empty) { margin: 0 0 10px; color: #999; font-size: 10px; line-height: 1.55; }
.square-route-benchmark button { min-height: 34px; padding: 0 11px; border: 1px solid #4b4b4b; border-radius: 7px; background: #292929; color: #eee; font-size: 10px; }
.square-route-benchmark button:disabled { cursor: not-allowed; opacity: .55; }
.square-route-benchmark #routeBenchmarkStatus { margin-top: 8px; line-height: 1.5; }
.square-panel square65-add-computer { --square65-add-button-background: #dedede; --square65-add-button-color: #141414; --square65-add-button-border: 0; --square65-add-button-height: 42px; --square65-add-button-weight: 700; }
.image-square-button { justify-self: start; margin: -6px 0 18px; padding: 7px 10px; border: 1px solid #383838; border-radius: 999px; background: #191919; color: #d8d8d8; font: inherit; font-size: 11px; cursor: pointer; }
.image-square-button:hover { border-color: #666; background: #222; }
.panel-footnote { margin-top: 25px; padding-top: 20px; border-top: 1px solid #333; color: #888; font-size: 11px; line-height: 1.7; }
@media (max-width: 1000px) { .square-panel { position: absolute; z-index: 10; top: 0; right: 0; height: 100dvh; box-shadow: -24px 0 60px #0008; } }
@media (max-width: 700px) {
  .sidebar { position: absolute; z-index: 11; top: 0; left: 0; height: 100dvh; box-shadow: 20px 0 55px #0008; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-top { min-height: 63px; }
  .topbar { height: 52px; padding: 0 12px; }
  .square-home-content { padding-top: 25px; }
  .square-home-hero { align-items: start; flex-direction: column; gap: 17px; }
  .square-home-actions { width: 100%; flex-direction: row; align-items: center; }
  .home-add-computer { min-width: 142px; }
  .home-account-link { flex: 1; }
  .home-columns { grid-template-columns: 1fr; gap: 25px; }
  .home-workload-card { min-height: 184px; padding: 12px; }
  .home-metrics { gap: 6px; }
  .home-metric { min-height: 70px; padding: 10px; }
  .home-metric span { font-size: 9px; }
  .mobile-menu-button { display: block; }
  .square-button .square-orbit { font-size: 13px; }
  .empty-state { padding: 30px 18px 60px; }
  .empty-state h1 { font-size: 32px; }
  .suggestions { display: grid; }
  .composer-wrap { width: calc(100% - 20px); padding-bottom: 8px; }
  .composer { min-height: 102px; padding: 9px; border-radius: 19px; }
  .composer-toolbar { gap: 5px; }
  .mode-switch { gap: 1px; }
  .mode-switch button { min-height: 29px; padding: 0 7px; font-size: 9px; }
  .composer-model { max-width: 118px; overflow: hidden; padding: 0 9px; font-size: 10px; }
  .composer-toolbar .square-button, .send-button, .stop-button { width: 33px; height: 33px; }
  .messages { padding: 12px 16px 26px; }
  .message.user .message-body { max-width: 88%; }
  .square-panel { width: min(330px, 100vw); }
}
@media (max-width: 390px) { .mode-switch button { position: relative; width: 34px; padding: 0; font-size: 0; } .mode-switch button::before { font-size: 13px; } #localMode::before { content: "◉"; } #squareMode::before { content: "✦"; } .composer-model { max-width: 100px; } }
[hidden] { display: none !important; }
