:root {
  --bg:var(--sws-canvas);
  --panel:var(--sws-surface);
  --panel2:var(--sws-surface-raised);
  --line:var(--sws-line);
  --text:var(--sws-text);
  --soft:var(--sws-text-soft);
  --muted:var(--sws-text-muted);
  --blue:var(--sws-focus);
  --green:var(--sws-positive);
  --yellow:var(--sws-warning);
  --red:var(--sws-danger);
  --shadow:var(--sws-shadow)
}

* {
  box-sizing:border-box
}

html,body {
  height:100%
}

body {
  margin:0;
  overflow:hidden;
  background:var(--bg);
  color:var(--text);
  font-family:"Inter","Microsoft YaHei",Arial,sans-serif;
  letter-spacing:0
}

button,input,textarea,select {
  font:inherit
}

button {
  cursor:pointer
}

button:disabled {
  cursor:not-allowed;
  opacity:.48
}

.app {
  height:100vh;
  height:100dvh;
  display:grid;
  grid-template-rows:72px minmax(0,1fr);
  background:var(--bg)
}

.topbar {
  position:relative;
  z-index:50;
  display:flex;
  align-items:center;
  gap:24px;
  padding:0 24px;
  border-bottom:1px solid var(--line);
  background:var(--sws-surface-strong)
}

.brand {
  display:flex;
  align-items:center;
  gap:11px;
  flex-shrink:0;
  padding:0;
  border:0;
  background:transparent;
  color:var(--text);
  text-align:left;
  min-height:44px
}

.mark {
  width:36px;
  height:36px;
  border-radius:11px;
  background:linear-gradient(145deg,#30343c,#20242d);
  border:1px solid var(--sws-line-strong);
  position:relative;
  box-shadow:inset 0 1px rgba(255,255,255,.08)
}

.mark:after {
  content:"";
  position:absolute;
  left:10px;
  top:10px;
  width:6px;
  height:6px;
  border-radius:1.5px;
  background:var(--sws-accent);
  box-shadow:9px 0 0 var(--sws-accent),0 9px 0 var(--sws-accent),9px 9px 0 var(--sws-accent)
}

.brand-title {
  display:flex;
  flex-direction:column;
  line-height:1.3;
  white-space:nowrap
}

.brand-title strong {
  font-size:14px;
  font-weight:650;
  letter-spacing:.2px
}

.brand-title span {
  color:var(--muted);
  font-size:10px;
  margin-top:2px;
  letter-spacing:.8px
}

.project-title {
  display:grid;
  grid-template-columns:minmax(0,1fr) 14px;
  align-items:center;
  column-gap:10px;
  min-width:100px;
  max-width:260px;
  flex:1;
  margin:0 auto;
  padding:7px 12px;
  border:1px solid transparent;
  border-radius:12px;
  color:var(--text);
  background:transparent;
  text-align:left;
  transition:border-color var(--sws-motion-fast),background-color var(--sws-motion-fast)
}

.project-title strong {
  display:block;
  font-size:13px;
  font-weight:550;
  white-space:nowrap;
  text-overflow:ellipsis;
  overflow:hidden
}

.project-title span {
  display:block;
  color:var(--muted);
  font-size:10px;
  letter-spacing:.8px;
  grid-column:1;
  margin-bottom:4px
}

.top-actions {
  display:flex;
  align-items:center;
  gap:7px;
  flex-shrink:0
}

.user-wrap {
  position:relative
}

.avatar-btn {
  width:36px;
  height:36px;
  border-radius:12px;
  border:1px solid rgba(245,173,118,.24);
  background:var(--sws-accent-soft);
  color:var(--sws-accent);
  font-weight:600;
  display:grid;
  place-items:center;
  transition:background-color var(--sws-motion-fast),border-color var(--sws-motion-fast)
}

.account-menu {
  position:absolute;
  right:0;
  top:48px;
  width:280px;
  border:1px solid var(--sws-line-strong);
  border-radius:18px;
  background:var(--sws-surface-strong);
  box-shadow:var(--shadow);
  padding:18px;
  display:none;
  z-index:90
}

.account-menu.open {
  display:block
}

.account-menu strong {
  display:block;
  font-size:14px
}

.account-menu span {
  display:block;
  color:var(--muted);
  font-size:12px;
  margin-top:4px;
  overflow-wrap:anywhere
}

.account-menu .menu-row {
  margin-top:10px;
  display:grid;
  gap:8px
}

.account-menu button {
  height:40px;
  border-radius:10px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.035);
  color:var(--text);
  font-weight:500
}

.account-menu button.danger {
  color:#ffb6b6;
  border-color:rgba(255,92,92,.25)
}

.btn,.icon-btn,.pill {
  position:relative;
  border:1px solid var(--line);
  background:rgba(255,255,255,.035);
  color:var(--text);
  border-radius:11px;
  height:38px;
  padding:0 14px;
  font-size:12px;
  font-weight:550;
  transition:background-color var(--sws-motion-fast),border-color var(--sws-motion-fast),color var(--sws-motion-fast)
}

.works-link {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none
}

.icon-btn {
  width:38px;
  padding:0;
  border-radius:12px
}

.btn.primary {
  min-width:68px;
  background:#e8edf4;
  border-color:transparent;
  color:#121722
}

.btn.blue {
  background:var(--sws-focus);
  border-color:transparent;
  color:#0a1729
}

.pill {
  display:inline-flex;
  gap:7px;
  align-items:center;
  border-radius:11px;
  max-width:172px;
  font-variant-numeric:tabular-nums
}

.pill span {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}

.workspace {
  position:relative;
  overflow:hidden
}

.canvas {
  position:absolute;
  inset:0;
  overflow:clip;
  cursor:default
}

.canvas.is-panning {
  cursor:grabbing
}

.board {
  position:absolute;
  left:0;
  top:0;
  width:3000px;
  height:1900px;
  transform-origin:0 0
}

.curve-layer {
  position:absolute;
  inset:0;
  width:3000px;
  height:1900px;
  overflow:visible;
  pointer-events:none
}

.node {
  z-index:22;
  position:absolute;
  user-select:none;
  touch-action:none;
  cursor:grab
}

.compare-toolbar {
  grid-template-columns:repeat(3,minmax(0,1fr))
}

.compare-toolbar [data-compare-mode="press"] {
  display:none
}

.compare-stage.split::after {
  display:none
}

.compare-stage.split {
  cursor:ew-resize
}

.node:active {
  cursor:grabbing
}

.image-frame {
  aspect-ratio:16/10;
  min-height:230px;
  overflow:hidden;
  border-radius:6px;
  background:#07080c;
  border:1px solid rgba(255,255,255,.07);
  display:grid;
  place-items:center;
  color:var(--muted);
  position:relative
}

.image-frame img,.image-frame video {
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  -webkit-user-drag:none;
  user-drag:none;
  user-select:none
}

.caption {
  margin-top:8px;
  padding-top:8px;
  border-top:1px solid rgba(255,255,255,.075);
  color:rgba(255,255,255,.78);
  font-size:12px;
  line-height:1.58;
  user-select:text
}

.note {
  margin-top:7px;
  color:rgba(255,255,255,.45);
  font-size:11px;
  line-height:1.5
}

.close-node {
  position:absolute;
  right:-9px;
  top:-9px;
  width:22px;
  height:22px;
  border-radius:50%;
  border:2px solid #080a0f;
  color:#fff;
  background:var(--red);
  font-size:12px;
  display:none;
  align-items:center;
  justify-content:center;
  z-index:9
}

.node.selected .close-node {
  display:flex
}

.empty-node {
  height:210px;
  border:1px dashed rgba(255,255,255,.18);
  border-radius:8px;
  display:grid;
  place-items:center;
  color:rgba(255,255,255,.45);
  text-align:center;
  font-weight:600
}

.story-grid {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:5px
}

.story-cell {
  aspect-ratio:1.42/1;
  border-radius:4px;
  overflow:hidden;
  position:relative;
  border:1px solid rgba(255,255,255,.08);
  background:#090a0d
}

.story-cell img {
  width:100%;
  height:100%;
  object-fit:cover;
  -webkit-user-drag:none;
  user-drag:none;
  user-select:none
}

.story-cell span {
  position:absolute;
  top:4px;
  left:4px;
  background:rgba(0,0,0,.66);
  border-radius:999px;
  padding:2px 5px;
  font-size:10px;
  font-weight:600
}

.story-controls {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-bottom:10px
}

.story-controls label {
  display:grid;
  gap:5px;
  color:var(--muted);
  font-size:11px;
  font-weight:600
}

.story-controls select {
  width:100%
}

.story-actions {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:10px
}

.story-prompt {
  margin-top:10px;
  font-size:11px;
  line-height:1.55;
  color:rgba(255,255,255,.56);
  max-height:96px;
  overflow:auto;
  border:1px solid rgba(255,255,255,.08);
  border-radius:7px;
  padding:8px;
  background:rgba(0,0,0,.22);
  user-select:text
}

.story-meta {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-top:8px;
  color:var(--muted);
  font-size:11px
}

.story-meta b {
  color:#fff
}

.leftbar {
  position:absolute;
  left:20px;
  top:50%;
  transform:translateY(-50%);
  width:56px;
  border-radius:20px;
  border:1px solid var(--line);
  z-index:32;
  padding:7px;
  display:flex;
  flex-direction:column;
  gap:6px
}

.leftbar button {
  position:relative;
  width:40px;
  height:44px;
  border:1px solid transparent;
  border-radius:12px;
  background:transparent;
  color:var(--soft);
  display:grid;
  place-items:center;
  box-shadow:inset 0 1px 0 transparent;
  transition:background-color var(--sws-motion-fast),color var(--sws-motion-fast),border-color var(--sws-motion-fast),box-shadow var(--sws-motion-fast)
}

.leftbar button:hover,.leftbar button:focus-visible,.leftbar button.active {
  background:var(--sws-surface-raised);
  border-color:var(--sws-line-strong);
  box-shadow:inset 0 1px 0 #ffffff08,0 3px 10px #0003;
  color:var(--text)
}
.leftbar button:focus-visible {outline:2px solid var(--sws-focus);outline-offset:3px;}
.leftbar button::before {
  content:attr(aria-label);position:absolute;left:calc(100% + 13px);top:50%;z-index:50;
  width:max-content;max-width:180px;padding:7px 10px;border:1px solid var(--sws-line-strong);border-radius:8px;
  background:var(--sws-surface-strong);box-shadow:0 6px 18px #0004;color:var(--sws-text);font-size:11px;font-weight:500;line-height:1.4;
  opacity:0;visibility:hidden;transform:translate(-4px,-50%);pointer-events:none;
  transition:opacity var(--sws-motion-fast),transform var(--sws-motion-fast),visibility var(--sws-motion-fast);
}
.leftbar button:hover::before,.leftbar button:focus-visible::before {opacity:1;visibility:visible;transform:translate(0,-50%);}
.leftbar button::after {
  content:"";position:absolute;left:calc(50% - 7px);bottom:3px;width:14px;height:2px;border-radius:2px;
  background:var(--sws-accent);transform:scaleX(.3);opacity:0;transition:transform var(--sws-motion-fast),opacity var(--sws-motion-fast);
}
.leftbar button:hover::after,.leftbar button:focus-visible::after,.leftbar button.active::after {transform:scaleX(1);opacity:1;}
.leftbar .ui-icon,.leftbar img {transition:transform var(--sws-motion-fast) cubic-bezier(.2,.7,.2,1);}
.leftbar button:hover .ui-icon,.leftbar button:hover img {transform:translateY(-2px) scale(1.08);}
.leftbar button:active .ui-icon,.leftbar button:active img {transform:translateY(0) scale(.96);}
.leftbar img {width:21px;height:21px;filter:invert(1);}
#addBtn {color:var(--text);background:var(--sws-surface-raised);}
#addBtn:hover,#addBtn:focus-visible {color:var(--sws-accent);background:var(--sws-accent-soft);border-color:color-mix(in srgb,var(--sws-accent) 32%,transparent);}

.leftbar .sep {
  height:1px;
  background:var(--line);
  margin:4px 6px
}

.panel {
  position:absolute;
  left:90px;
  top:24px;
  bottom:84px;
  width:360px;
  z-index:33;
  border:1px solid var(--line);
  border-radius:20px;
  box-shadow:var(--shadow);
  display:none;
  overflow:hidden
}

.panel.active {
  display:block
}

.panel-head {
  height:62px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 20px;
  border-bottom:1px solid var(--line);
  font-weight:600;
  font-size:14px
}

.panel-body {
  height:calc(100% - 62px);
  overflow:auto;
  padding:16px
}

.tabs,.chips {
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  margin-bottom:12px
}

.chip,.tab {
  border:1px solid transparent;
  background:rgba(255,255,255,.075);
  color:var(--soft);
  border-radius:999px;
  padding:7px 11px;
  font-size:12px;
  font-weight:600
}

.chip.active,.tab.active {
  background:#fff;
  color:#08090d
}

.search {
  width:100%;
  height:38px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.055);
  color:var(--text);
  outline:none;
  padding:0 13px;
  margin-bottom:12px
}

.asset-grid {
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:10px
}

.asset {
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.045);
  border-radius:8px;
  overflow:hidden;
  cursor:grab;
  transition:.15s
}

.asset:hover {
  border-color:rgba(110,168,255,.48);
  background:rgba(110,168,255,.1);
  transform:translateY(-1px)
}

.asset img {
  width:100%;
  height:94px;
  object-fit:cover;
  display:block;
  background:#050608
}

.asset-title {
  padding:8px;
  color:rgba(255,255,255,.78);
  font-size:12px;
  font-weight:600
}

.template-card {
  min-height:138px;
  border:1px solid var(--line);
  border-radius:16px;
  background:rgba(255,255,255,.025);
  padding:16px;
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-bottom:12px
}

.template-card strong {
  font-size:14px
}

.template-card p {
  margin:0;
  color:var(--muted);
  font-size:12px;
  line-height:1.55;
  flex:1
}

.mini-btn {
  height:30px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  color:#fff;
  background:rgba(255,255,255,.08);
  font-size:12px;
  font-weight:650
}

.upload-card {
  width:68px;
  height:68px;
  border-radius:8px;
  border:1px dashed rgba(255,255,255,.22);
  flex:0 0 68px;
  overflow:hidden;
  position:relative;
  display:grid;
  place-items:center;
  background:rgba(0,0,0,.28);
  color:var(--muted);
  font-size:11px;
  font-weight:800
}

.tool-square {
  height:36px;
  min-width:36px;
  border-radius:8px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.055);
  color:#fff;
  font-weight:600
}

.tool-square.text {
  width:auto;
  padding:0 12px;
  font-size:12px
}

.tool-square.active {
  background:#fff;
  color:#08090d;
  border-color:#fff
}

.tool-square.upload-primary {
  height:42px;
  min-width:116px;
  padding:0 14px;
  border-radius:10px;
  background:linear-gradient(135deg,#fff,#dceaff);
  border-color:#fff;
  color:#071015;
  box-shadow:0 10px 24px rgba(110,168,255,.22);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px
}

.tool-square.upload-primary span {
  width:22px;
  height:22px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#111722;
  color:#fff;
  font-size:18px;
  line-height:1
}

.ref-label {
  height:36px;
  border-radius:8px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.055);
  color:#fff;
  font-weight:600;
  padding:0 12px;
  display:inline-flex;
  align-items:center;
  gap:6px
}

.inpaint-tools {
  display:grid;
  grid-template-columns:minmax(148px,1fr) auto repeat(4,44px);
  align-items:center;
  gap:6px;
  margin-top:10px
}

.inpaint-tools label {
  display:flex;
  align-items:center;
  gap:6px;
  color:var(--muted);
  font-size:12px;
  font-weight:600;
  min-width:0
}

.inpaint-tools input[type=range] {
  width:82px;
  min-width:0
}

.inpaint-tools .brush-size-number {
  width:42px;
  height:28px;
  border-radius:7px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.32);
  color:#fff;
  padding:0 5px;
  font-size:12px;
  font-weight:600
}

.inpaint-tools input[type=color] {
  width:28px;
  height:28px;
  border:0;
  border-radius:7px;
  background:transparent;
  padding:0
}

.inpaint-tools .mini-btn {
  height:28px;
  padding:0 6px;
  font-size:11px;
  white-space:nowrap
}

.inpaint-tools .mini-btn.active {
  background:#fff;
  color:#08090d
}

.inpaint-tools input,.inpaint-tools label,.node textarea[data-inpaint-prompt] {
  cursor:auto;
  user-select:text
}

.node textarea[data-inpaint-prompt] {
  height:86px;
  min-height:86px;
  max-height:180px;
  font-size:14px;
  line-height:1.55;
  font-weight:700;
  resize:vertical;
  overflow:auto
}

.brush-preview {
  position:absolute;
  z-index:4;
  display:none;
  pointer-events:none;
  border:2px solid rgba(255,255,255,.92);
  border-radius:50%;
  background:rgba(255,62,62,.12);
  box-shadow:0 0 0 1px rgba(0,0,0,.45),0 0 14px rgba(255,255,255,.28);
  transform:translate(-50%,-50%)
}

.brush-preview.eraser {
  background:rgba(255,255,255,.08);
  border-style:dashed;
  border-color:#fff
}

textarea {
  width:100%;
  min-height:78px;
  max-height:240px;
  resize:vertical;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.38);
  border-radius:8px;
  color:var(--text);
  outline:none;
  padding:12px;
  line-height:1.55
}

select,.short-input {
  height:34px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.32);
  color:#fff;
  outline:none;
  padding:0 9px;
  font-size:12px;
  font-weight:800
}

.short-input {
  width:70px
}

.switch {
  display:inline-flex;
  align-items:center;
  gap:6px;
  color:var(--muted);
  font-size:12px;
  font-weight:800
}

.cost {
  color:var(--green);
  font-weight:650
}

.mode-image .video-control {
  display:none
}

.mode-video .image-control {
  display:none
}

.mini-panel {
  position:absolute;
  z-index:34;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px;
  border:1px solid var(--line);
  background:rgba(27,28,33,.82);
  border-radius:14px;
  box-shadow:var(--shadow)
}

.mini-panel button {
  width:30px;
  height:30px;
  border:0;
  border-radius:9px;
  background:transparent;
  color:rgba(255,255,255,.72);
  font-weight:600
}

.mini-panel strong {
  display:inline-flex;
  width:58px;
  justify-content:center;
  font-size:12px
}

.minimap {
  position:absolute;
  right:calc(var(--sws-canvas-right-inset,0px) + 16px);
  top:16px;
  bottom:auto;
  width:160px;
  height:92px;
  z-index:34;
  border:1px solid var(--line);
  border-radius:8px;
  background:rgba(0,0,0,.46);
  box-shadow:var(--shadow);
  overflow:hidden
}

.mini-node {
  position:absolute;
  background:rgba(110,168,255,.65);
  border-radius:2px
}

.mini-node.alt {
  background:rgba(255,255,255,.45)
}

.mini-node.story {
  background:rgba(255,210,92,.78)
}

.mini-view {
  position:absolute;
  border:1px solid rgba(255,255,255,.72);
  background:rgba(255,255,255,.07);
  border-radius:2px
}

.context-menu,.add-menu {
  position:absolute;
  z-index:80;
  border:1px solid var(--sws-line-strong);
  border-radius:16px;
  box-shadow:var(--shadow);
  display:none;
  overflow:hidden;
  padding:6px
}

.context-menu button,.add-menu button {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  width:250px;
  min-height:40px;
  border:0;
  border-radius:9px;
  background:transparent;
  color:var(--soft);
  padding:0 13px;
  font-size:12px;
  font-weight:500;
  text-align:left
}

.context-menu button:hover,.add-menu button:hover {
  background:rgba(110,168,255,.14);
  color:#fff
}

.context-menu kbd {
  color:rgba(255,255,255,.42);
  font-size:11px
}

.mention-empty {
  padding:14px;
  color:var(--muted);
  font-size:12px;
  line-height:1.7
}

.modal {
  position:fixed;
  inset:0;
  z-index:100;
  background:rgba(3,6,11,.72);
  backdrop-filter:blur(8px);
  display:none;
  align-items:center;
  justify-content:center;
  padding:24px
}

.modal.active {
  display:flex
}

.modal-card {
  width:min(900px,100%);
  max-height:88vh;
  overflow:auto;
  border-radius:24px;
  border:1px solid var(--sws-line-strong);
  background:var(--sws-surface-strong);
  box-shadow:var(--shadow);
  padding:28px
}

.modal-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:16px
}

.modal-head h2 {
  margin:0;
  font-size:23px;
  font-weight:600;
  letter-spacing:-.5px
}

.task-list {
  display:grid;
  gap:10px
}

.task {
  display:grid;
  grid-template-columns:64px 1fr auto;
  gap:12px;
  align-items:center;
  border:1px solid rgba(255,255,255,.08);
  border-radius:8px;
  background:rgba(255,255,255,.045);
  padding:10px
}

.task-thumb {
  width:64px;
  height:46px;
  border-radius:7px;
  background:rgba(255,255,255,.08);
  overflow:hidden
}

.task-thumb img {
  width:100%;
  height:100%;
  object-fit:cover;
  display:block
}

.task strong {
  display:block;
  font-size:13px
}

.task span {
  display:block;
  color:var(--muted);
  font-size:11px;
  margin-top:3px
}

.progress {
  width:140px;
  height:7px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  overflow:hidden
}

.progress i {
  display:block;
  height:100%;
  width:var(--p);
  background:linear-gradient(90deg,var(--blue),var(--green));
  border-radius:inherit
}

.profile-grid {
  display:grid;
  grid-template-columns:minmax(0,1.1fr) minmax(320px,.9fr);
  gap:12px
}

.account-card,.reward-card,.plan-card {
  border:1px solid rgba(255,255,255,.09);
  border-radius:8px;
  background:rgba(255,255,255,.045);
  padding:16px
}

.account-line {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-top:14px
}

.account-line label {
  display:block;
  color:var(--muted);
  font-size:11px;
  margin-bottom:6px
}

.account-line strong {
  display:block;
  overflow-wrap:anywhere;
  font-size:15px
}

.account-line .points {
  font-size:25px;
  color:var(--yellow);
  line-height:1.1
}

.copy-row {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
  margin-top:10px;
  padding:9px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:8px;
  background:rgba(0,0,0,.22)
}

.copy-row span {
  color:rgba(255,255,255,.82);
  font-size:12px;
  overflow-wrap:anywhere
}

.copy-row button {
  height:30px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.08);
  color:#fff;
  font-size:12px;
  font-weight:600;
  padding:0 12px
}

.plans {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-top:12px
}

.plan-card {
  min-height:220px;
  display:flex;
  flex-direction:column
}

.plan-card.current {
  border-color:rgba(255,210,92,.42)
}

.plan-card h3 {
  margin:0 0 14px;
  font-size:20px
}

.price {
  font-size:30px;
  font-weight:650;
  margin-bottom:10px
}

.plan-points {
  color:var(--yellow);
  font-weight:600;
  line-height:1.45
}

.plan-card p {
  margin:12px 0 18px;
  color:var(--muted);
  font-size:12px;
  line-height:1.55;
  flex:1
}

.pay-row {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px
}

.toast {
  position:fixed;
  left:50%;
  bottom:26px;
  transform:translate(-50%,16px);
  z-index:220;
  min-width:220px;
  max-width:min(520px,calc(100vw - 32px));
  padding:12px 16px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(18,19,24,.96);
  box-shadow:var(--shadow);
  color:#fff;
  font-size:13px;
  font-weight:600;
  text-align:center;
  opacity:0;
  pointer-events:none;
  transition:.18s
}

.toast.show {
  opacity:1;
  transform:translate(-50%,0)
}

.assistant-button {
  display:none!important;
  position:fixed;
  right:22px;
  bottom:124px;
  z-index:90;
  height:48px;
  padding:0 16px;
  border:1px solid rgba(110,168,255,.35);
  border-radius:999px;
  background:linear-gradient(135deg,rgba(110,168,255,.26),rgba(55,217,140,.14)),rgba(18,20,26,.94);
  color:#fff;
  box-shadow:var(--shadow);
  font-weight:650;
  display:flex;
  align-items:center;
  gap:9px
}

.assistant-button i {
  width:8px;
  height:8px;
  border-radius:50%;
  background:var(--green);
  box-shadow:0 0 12px rgba(55,217,140,.9)
}

.assistant-panel {
  position:fixed;
  right:22px;
  bottom:184px;
  z-index:95;
  width:400px;
  height:min(620px,calc(100vh - 220px));
  border:1px solid var(--line);
  border-radius:12px;
  background:rgba(22,24,31,.98);
  box-shadow:var(--shadow);
  display:none;
  overflow:hidden
}

.assistant-panel.open {
  display:grid;
  grid-template-rows:58px 1fr auto
}

.assistant-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 14px;
  border-bottom:1px solid var(--line)
}

.assistant-head strong {
  display:block
}

.assistant-head span {
  display:block;
  color:var(--muted);
  font-size:11px;
  margin-top:3px
}

.assistant-tools {
  display:flex;
  gap:8px
}

.assistant-messages {
  overflow:auto;
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:12px
}

.msg {
  display:flex;
  gap:9px;
  align-items:flex-start
}

.msg.user {
  justify-content:flex-end
}

.bubble {
  max-width:82%;
  padding:10px 12px;
  border-radius:12px;
  background:rgba(255,255,255,.075);
  font-size:13px;
  line-height:1.65;
  white-space:pre-wrap;
  overflow-wrap:anywhere
}

.msg.user .bubble {
  background:rgba(110,168,255,.24);
  border:1px solid rgba(110,168,255,.22)
}

.quick-row {
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  margin-top:8px
}

.quick-row button {
  height:30px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:#fff;
  font-size:12px;
  padding:0 10px
}

.typing {
  display:flex;
  gap:4px;
  align-items:center
}

.typing i {
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--blue);
  animation:blink 1s infinite
}

.typing i:nth-child(2) {
  animation-delay:.15s
}

.typing i:nth-child(3) {
  animation-delay:.3s
}

@keyframes blink {
0%,80%,100% {
  opacity:.25;
  transform:translateY(0)
}

40% {
  opacity:1;
  transform:translateY(-3px)
}
}

.assistant-input {
  border-top:1px solid var(--line);
  padding:10px;
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px
}

.assistant-input textarea {
  min-height:44px;
  max-height:120px
}

.assistant-input button {
  height:44px;
  border-radius:10px;
  border:0;
  background:#fff;
  color:#08090d;
  font-weight:650;
  padding:0 14px
}

@media(max-width:900px) {
.panel {
  position:absolute;
  left:90px;
  top:24px;
  bottom:84px;
  width:360px;
  z-index:33;
  border:1px solid var(--line);
  border-radius:20px;
  box-shadow:var(--shadow);
  display:none;
  overflow:hidden
}

.minimap {
  display:none
}

.profile-grid,.account-line,.plans {
  grid-template-columns:1fr
}
}

.ui-icon {
  width:18px;
  height:18px;
  display:block;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
  pointer-events:none
}

.icon-btn .ui-icon,.leftbar .ui-icon {
  margin:auto
}

.member-nav .ui-icon {
  width:17px;
  height:17px
}

.workspace-nav { flex-shrink: 0; }
.project-title img { grid-column: 2; grid-row: 1 / 3; width: 14px; opacity: .55; filter: invert(1); }
.project-title:hover { background: rgba(255,255,255,.04); border-color: var(--line); }
.top-actions #projectBtn { background: transparent; color: var(--soft); }
.top-actions .icon-btn::after {
  content: ""; position: absolute; left: calc(50% - 7px); bottom: 3px; width: 14px; height: 2px;
  background: var(--sws-accent); border-radius: 2px; transform: scaleX(.3); opacity: 0;
  transition: transform var(--sws-motion-fast), opacity var(--sws-motion-fast);
}
.top-actions .icon-btn:hover::after { transform: scaleX(1); opacity: 1; }
.top-actions button:hover { border-color: var(--sws-line-strong); background: var(--sws-surface-raised); }
.top-actions .primary:hover { background: white; color: #121722; }
.top-actions .ui-icon { transition: transform var(--sws-motion-fast); }
.top-actions .icon-btn:hover .ui-icon { transform: translateY(-2px); }
#pointsText { color: var(--sws-warning); }
.points-label { color: var(--muted); font-size: 10px; }
.butler-intro { margin: 0 0 16px; color: var(--muted); font-size: 12px; line-height: 1.7; }
@media (max-width: 1280px) {
  .topbar { gap: 14px; padding: 0 20px; }
  .workspace-nav a { padding: 0 10px; }
  .brand-title span { display: none; }
  .pill { max-width: 132px; }
}
@media (max-width: 1024px) {
  .workspace-nav { display: none; }
  .project-title { margin-left: 0; max-width: 240px; }
}
@media (max-width: 640px) {
  .app { grid-template-rows: 64px minmax(0,1fr); }
  .topbar { gap: 10px; padding: 0 12px; }
  .brand-title { display: none; }
  .mark { width: 34px; height: 34px; }
  .project-title { padding: 6px; min-width: 0; }
  .project-title span { font-size: 9px; }
  .project-title strong { max-width: 112px; font-size: 12px; }
  .top-actions { gap: 5px; }
  .top-actions #projectBtn, .top-actions .pill { display: none; }
  .top-actions .btn.primary { min-width: 52px; padding: 0 10px; }
  .top-actions .icon-btn { width: 32px; }
  .avatar-btn { width: 32px; height: 34px; }
  .leftbar { left: 12px; width: 48px; padding: 5px; border-radius: 17px; }
  .leftbar button { width: 36px; height: 40px; }
  .panel { left: 70px; top: 12px; bottom: 74px; width: calc(100vw - 82px); border-radius: 18px; }
  .modal { padding: 12px; }
  .modal-card { padding: 20px; border-radius: 20px; }
  .modal-head h2 { font-size: 20px; }
  .task { grid-template-columns: 48px minmax(0,1fr); }
  .task-thumb { width: 48px; }
  .task .progress { grid-column: 2; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .leftbar button,.leftbar button::before,.leftbar button::after,.leftbar .ui-icon,.leftbar img {transition:none;}
  .leftbar button:hover img,.leftbar button:hover .ui-icon,.leftbar button:active img,.leftbar button:active .ui-icon,.top-actions .icon-btn:hover .ui-icon { transform: none; }
  .leftbar button::before {transform:translate(0,-50%);}
}
