:root {
  --bg: #0b1120;
  --bg2: #111a2e;
  --card: rgba(255, 255, 255, 0.05);
  --card2: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.09);
  --fg: #e2e8f0;
  --dim: #94a3b8;
  --dimmer: #64748b;
  --acc: #818cf8;
  --acc2: #22d3ee;
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #f87171;
  --radius: 12px;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, "Liberation Mono", monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg);
  font: 14px/1.55 system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  overflow: hidden; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { background: radial-gradient(1200px 600px at 10% -10%, #1e1b4b 0%, transparent 60%), radial-gradient(900px 500px at 110% 10%, #083344 0%, transparent 55%), var(--bg); background-attachment: fixed; }
#app { height: 100dvh; display: flex; flex-direction: column; width: 100%; max-width: 100vw; overflow: hidden; }
a { color: var(--acc2); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
.hidden { display: none !important; }
/* iOS Safari 聚焦字号 < 16px 的输入框会自动放大整页且不缩回，触屏设备统一 16px */
@media (pointer: coarse) {
  input, textarea, select, .input, .preview-bar .input, .composer textarea, .chat-tools select { font-size: 16px !important; line-height: 1.3; }
  /* 小按钮视觉 26px，触屏点击区域向外扩到 ≥ 32px */
  .btn.sm::after { content: ""; position: absolute; inset: -4px -2px; }
}

/* —— 通用组件 —— */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 32px; padding: 0 13px; border-radius: 8px;
  font-size: 13.5px; position: relative; text-decoration: none; color: var(--fg);
  background: var(--card2); border: 1px solid var(--line); white-space: nowrap; transition: background .15s, opacity .15s; }
.btn svg { width: 16px; height: 16px; }
.btn:hover { background: rgba(255,255,255,.12); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: linear-gradient(135deg, #6366f1, #0891b2); border-color: transparent; color: #fff; font-weight: 600; }
.btn.danger { color: var(--err); }
.btn.sm { height: 26px; padding: 0 9px; font-size: 12.5px; border-radius: 7px; }
.btn.icon { padding: 0; width: 32px; height: 32px; }
.input, .textarea, select.input { width: 100%; padding: 7px 10px; border-radius: 8px; background: rgba(0,0,0,.25);
  border: 1px solid var(--line); outline: none; }
.input:focus, .textarea:focus { border-color: var(--acc); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.muted { color: var(--dim); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); font-size: 12px; }
.row { display: flex; align-items: center; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dimmer); display: inline-block; flex: none; }
.dot.running { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.dot.starting, .dot.installing { background: var(--warn); animation: pulse 1s infinite; }
.dot.error { background: var(--err); }
@keyframes pulse { 50% { opacity: .3; } }
.spin { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.2); border-top-color: var(--acc2); border-radius: 50%; animation: rot .8s linear infinite; flex: none; }
@keyframes rot { to { transform: rotate(360deg); } }
.empty { text-align: center; color: var(--dim); padding: 40px 20px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

#toast { position: fixed; left: 50%; bottom: calc(90px + var(--safe-b)); transform: translateX(-50%); z-index: 100; pointer-events: none;
  display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(92vw, 520px); }
#toast div { background: rgba(15,23,42,.95); border: 1px solid var(--line); padding: 10px 16px; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.4);
  animation: toastIn .2s; white-space: pre-wrap; word-break: break-word; max-height: 40vh; overflow: auto; pointer-events: auto; }
#toast div.err { border-color: rgba(248,113,113,.5); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

/* —— 顶栏 —— */
.topbar { display: flex; align-items: center; gap: 8px; padding: calc(6px + var(--safe-t)) 10px 6px; border-bottom: 1px solid var(--line);
  background: rgba(11,17,32,.75); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); flex: none; min-height: 48px; }
.topbar h1 { font-size: 15.5px; margin: 0; font-weight: 650; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-title { display:flex; align-items:center; gap:7px; min-width:0; text-align:left; color:inherit; }.project-title h1 { flex:0 1 auto; }.project-title>span { flex:none; color:var(--dim); font-size:13px; opacity:.7; }.project-title:hover>span { color:var(--acc); opacity:1; }
.logo { display: flex; align-items: center; gap: 7px; font-weight: 700; letter-spacing: .3px; }
.logo img { width: 22px; height: 22px; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--dim); padding: 2px 8px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); }

/* —— 登录 —— */
.login { margin: auto; width: min(92vw, 360px); padding: 22px; }
.login h2 { margin: 0 0 4px; font-size: 20px; }
.login-qr { position:relative; display: grid; place-items: center; width: 100%; min-height: 220px; background: #fff; border-radius: 12px; overflow:hidden; }
.login-qr img { width: 220px; height: 220px; max-width: 100%; object-fit: contain; }
.login-qr.loading:after { content:'正在获取登录码…'; position:absolute; inset:auto 12px 12px; padding:7px 10px; border-radius:8px; background:#202c49e8; color:#fff; font-size:11px; text-align:center; }
.login-qr.loading img:not(.hidden) { opacity:.72; }
.hero-title { font-size: 23px; font-weight: 750; background: linear-gradient(90deg, #a5b4fc, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* —— 项目列表 —— */
.page { flex: 1; overflow: auto; padding: 14px 12px calc(20px + var(--safe-b)); }
.page-inner { max-width: 860px; margin: 0 auto; }
.projects { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.project-card { padding: 12px 14px; display: block; text-decoration: none; color: inherit; transition: transform .15s, border-color .15s; }
.project-card:hover { transform: translateY(-2px); border-color: rgba(129,140,248,.4); }
.project-card .name { font-weight: 650; font-size: 14.5px; }
.tag { font-size: 11px; padding: 1px 8px; border-radius: 99px; background: rgba(129,140,248,.15); color: #c7d2fe; }

/* —— 弹层 —— */
.sheet-mask { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: min(100vw, 520px); max-height: 88dvh; overflow: auto; background: var(--bg2); border: 1px solid var(--line); border-radius: 16px 16px 0 0;
  padding: 14px 14px calc(14px + var(--safe-b)); animation: up .2s; }
@media (min-width: 700px) { .sheet-mask { align-items: center; } .sheet { border-radius: 16px; } }
@keyframes up { from { transform: translateY(30px); opacity: .5; } }
.sheet h3 { margin: 0 0 10px; font-size: 16px; }
.seg { display: flex; gap: 3px; padding: 3px; background: rgba(0,0,0,.25); border-radius: 10px; overflow-x: auto; }
.seg button { flex: 1; padding: 5px 9px; border-radius: 7px; color: var(--dim); white-space: nowrap; font-size: 13px; }
.seg button.on { background: var(--card2); color: var(--fg); }
.repo-list { max-height: 42dvh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.repo-item { padding: 8px 11px; border-bottom: 1px solid var(--line); cursor: pointer; }
.repo-item:last-child { border-bottom: 0; }
.repo-item:hover, .repo-item.on { background: rgba(129,140,248,.12); }

/* —— 工作区布局 —— */
.workspace-page { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.workspace { flex: 1; display: flex; min-height: 0; }
.panel { display: flex; flex-direction: column; min-height: 0; min-width: 0; flex: 1; }
.workspace-dock { display: flex; align-items: center; flex: none; min-width: 0; border-top: 1px solid var(--line); background: var(--bg2); }
.tabs-top { display: none; }
.bottom-nav { display: flex; border-top: 1px solid var(--line); background: rgba(11,17,32,.92); backdrop-filter: blur(16px); padding-bottom: var(--safe-b); flex: none; }
.bottom-nav button { flex: 1; padding: 6px 0 5px; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 10.5px; line-height: 1.3; color: var(--dimmer); position: relative; }
.bottom-nav button span { display: inline-flex; }
.bottom-nav button svg { width: 20px; height: 20px; }
.bottom-nav button.on { color: var(--fg); }
.bottom-nav button.on svg { color: var(--acc); }
.badge { position: absolute; top: 4px; left: calc(50% + 8px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--acc); color: #fff; font-size: 10.5px; line-height: 16px; text-align: center; }

@media (min-width: 1024px) {
  .workspace-page { display: grid; grid-template-columns: min(440px, 38vw) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .workspace-page > .topbar { grid-column: 1; grid-row: 1; min-width: 0; flex-wrap: wrap; border-right: 1px solid var(--line); }
  .workspace-page > .topbar > .grow { flex-basis: calc(100% - 48px); }
  .workspace-page > .topbar > .row { width: 100%; justify-content: flex-end; }
  .workspace { display: contents; }
  .panel.chat-panel { grid-column: 1; grid-row: 2; border-right: 1px solid var(--line); display: flex !important; }
  .panel.side { grid-column: 2; grid-row: 1 / 3; display: flex !important; }
  .bottom-nav { display: none; }
  .workspace-dock { padding: 5px 8px; gap: 12px; min-height: 44px; padding-bottom: calc(5px + var(--safe-b)); }
  .tabs-top { display: flex; flex: none; gap: 3px; }
  .tabs-top button { padding: 4px 12px; border-radius: 7px; color: var(--dim); font-size: 13px; }
  .tabs-top button.on { background: var(--card2); color: var(--fg); }
}

/* —— 对话 —— */
.chat-scroll { flex: 1; overflow: auto; padding: 14px 12px 8px; overscroll-behavior: contain; }
.msg { margin-bottom: 14px; max-width: 100%; }
.msg.user { display: flex; justify-content: flex-end; }
.msg.user .bubble { background: linear-gradient(135deg, rgba(99,102,241,.35), rgba(8,145,178,.3)); border: 1px solid rgba(129,140,248,.3); border-radius: 14px 14px 4px 14px;
  padding: 7px 11px; max-width: 86%; white-space: pre-wrap; word-break: break-word; }
.msg.ai .text { word-break: break-word; overflow-wrap: anywhere; min-width: 0; }
.msg.ai .text p { margin: 0 0 8px; }
.msg.ai .text p:last-child { margin-bottom: 0; }
.msg.ai .text pre { background: rgba(0,0,0,.35); border: 1px solid var(--line); border-radius: 10px; padding: 10px; overflow: auto; font: 12.5px/1.5 var(--mono); }
.msg.ai .text code { font-family: var(--mono); font-size: .9em; background: rgba(255,255,255,.08); padding: 1px 5px; border-radius: 5px; }
.msg.ai .text pre code { background: none; padding: 0; }
.msg.ai .text ul, .msg.ai .text ol { margin: 4px 0 8px; padding-left: 22px; }
.msg.ai .text h1, .msg.ai .text h2, .msg.ai .text h3 { font-size: 14.5px; margin: 10px 0 6px; }
.msg.ai .text table { border-collapse: collapse; margin: 6px 0; font-size: 13px; display: block; overflow-x: auto; }
.msg.ai .text td, .msg.ai .text th { border: 1px solid var(--line); padding: 4px 8px; }
.tool { margin: 5px 0; border: 1px solid var(--line); border-radius: 8px; background: rgba(0,0,0,.18); font-size: 12.5px; overflow: hidden; }
.tool-head { display: flex; align-items: center; gap: 7px; padding: 5px 9px; cursor: pointer; color: var(--dim); }
.tool-head .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool .ico { width: 16px; text-align: center; flex: none; }
.tool.ok .ico { color: var(--ok); }
.tool.bad .ico { color: var(--err); }
.tool pre { margin: 0; padding: 8px 10px; border-top: 1px solid var(--line); max-height: 280px; overflow: auto; font: 12px/1.5 var(--mono); white-space: pre-wrap; word-break: break-all; color: #cbd5e1; }
.thinking { font-size: 12.5px; color: var(--dimmer); border-left: 2px solid var(--line); padding: 2px 0 2px 10px; margin: 6px 0; max-height: 120px; overflow: auto; white-space: pre-wrap; cursor: pointer; }
.thinking.collapsed { max-height: 22px; overflow: hidden; }
.notice { font-size: 12.5px; color: var(--warn); margin: 6px 0; }
.err-line { color: var(--err); font-size: 13px; margin: 6px 0; white-space: pre-wrap; }
.working { display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 13px; padding: 4px 0; }
.composer { padding: 6px 8px 8px; border-top: 1px solid var(--line); background: rgba(11,17,32,.6); flex: none; }
.composer-box { display: flex; align-items: flex-end; gap: 6px; background: rgba(0,0,0,.3); border: 1px solid var(--line); border-radius: 12px; padding: 3px 3px 3px 11px; }
.composer-box:focus-within { border-color: rgba(129,140,248,.6); }
.composer textarea { flex: 1; resize: none; border: 0; outline: 0; background: none; max-height: 160px; min-height: 22px; padding: 5px 0; line-height: 1.4; }
.send { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, #6366f1, #0891b2); color: #fff; display: grid; place-items: center; flex: none; }
.send.stop { background: var(--err); }
.send:disabled { opacity: .4; }
.send svg { width: 16px; height: 16px; }
.chat-tools { display: flex; align-items: center; gap: 6px; padding: 0 2px 5px; font-size: 12px; color: var(--dim); }
.chat-tools select { background: transparent; border: 0; color: var(--dim); max-width: 60vw; font-size: 12px; }
.suggests { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
.suggests button { padding: 4px 11px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); font-size: 12.5px; }

/* —— 预览 —— */
.preview-bar { display: flex; flex: 1; min-width: 0; gap: 5px; padding: 6px 8px; align-items: center; }
.preview-bar .btn { flex: none; }
@media (min-width: 1024px) { .preview-bar { padding: 0; } }
.preview-bar .input { height: 32px; padding: 0 9px; font-family: var(--mono); font-size: 12.5px; }
.preview-wrap { flex: 1; position: relative; background: #fff; overflow: hidden; min-width: 0; }
/* width:1px + min-width:100%：防止 iOS Safari 按页面内容撑宽 iframe */
.preview-wrap iframe { position: absolute; inset: 0; width: 1px; min-width: 100%; height: 100%; border: 0; background: #fff; }
.preview-wrap.phone { background: #0b1120; display: grid; place-items: center; }
.preview-wrap.phone iframe { position: static; width: min(390px, 100%); min-width: 0; height: min(844px, 100%); border-radius: 18px; box-shadow: 0 0 0 8px #1e293b; }
.preview-empty { position: absolute; inset: 0; display: grid; place-items: center; background: var(--bg); text-align: center; padding: 20px; }

/* —— 文件 —— */
.files { flex: 1; overflow: auto; }
.crumbs { display: flex; flex-wrap: wrap; gap: 2px; padding: 7px 10px; font-size: 12.5px; border-bottom: 1px solid var(--line); align-items: center; }
.crumbs button { color: var(--acc2); padding: 2px 4px; }
.file-row { display: flex; align-items: center; gap: 9px; padding: 8px 12px; font-size: 13.5px; border-bottom: 1px solid rgba(255,255,255,.04); cursor: pointer; }
.file-row:hover { background: var(--card); }
.file-row .sz { color: var(--dimmer); font-size: 12px; }
.editor { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.editor textarea { flex: 1; resize: none; border: 0; outline: 0; background: rgba(0,0,0,.3); padding: 12px; font: 13px/1.55 var(--mono); tab-size: 2; white-space: pre; overflow: auto; }

/* —— 运行 / Git —— */
.pane { flex: 1; overflow: auto; padding: 10px; }
.pane > .card { padding: 12px; margin-bottom: 10px; }
.logs { background: #020617; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font: 12px/1.5 var(--mono); height: 46dvh; overflow: auto; white-space: pre-wrap; word-break: break-all; color: #cbd5e1; }
.kv { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 10px; align-items: center; font-size: 13px; }
.change { display: flex; gap: 9px; align-items: center; padding: 6px 4px; border-bottom: 1px solid rgba(255,255,255,.05); cursor: pointer; font-size: 13px; }
.change .st { font: 12px var(--mono); width: 22px; text-align: center; border-radius: 5px; padding: 1px 0; flex: none; }
.st.M { color: var(--warn); background: rgba(251,191,36,.12); }
.st.A, .st.\? { color: var(--ok); background: rgba(52,211,153,.12); }
.st.D { color: var(--err); background: rgba(248,113,113,.12); }
.diff { font: 12px/1.5 var(--mono); white-space: pre; overflow: auto; background: #020617; border-radius: 10px; padding: 8px 0; max-height: 60dvh; }
.diff div { padding: 0 10px; min-width: max-content; }
.diff .a { background: rgba(52,211,153,.12); color: #a7f3d0; }
.diff .d { background: rgba(248,113,113,.12); color: #fecaca; }
.diff .h { color: var(--acc2); }
.commit { display: flex; gap: 9px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.05); font-size: 12.5px; }
.commit .h { font-family: var(--mono); color: var(--acc); flex: none; }

/* —— 数据 —— */
.db-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.db-head select.input { padding: 6px 10px; font: 13px var(--mono); flex: 1; min-width: 0; }
.db-head .sz { color: var(--dimmer); font-size: 12px; }
.db-note { padding: 7px 12px; font-size: 12.5px; color: var(--warn); background: rgba(251,191,36,.07); border-bottom: 1px solid var(--line); }
.db-grid { overflow: auto; -webkit-overflow-scrolling: touch; }
.db-grid table { border-collapse: collapse; font: 12.5px/1.45 var(--mono); min-width: 100%; }
.db-grid th, .db-grid td { padding: 7px 10px; border-bottom: 1px solid rgba(255,255,255,.05); border-right: 1px solid rgba(255,255,255,.04);
  text-align: left; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.db-grid th { position: sticky; top: 0; background: var(--bg2); color: var(--dim); font-weight: 600; z-index: 1; }
.db-grid .db-type { margin-left: 6px; color: var(--dimmer); font-weight: 400; font-size: 11px; }
.db-grid td { cursor: pointer; }
.db-grid tr:hover td { background: var(--card); }
.db-grid td.num { text-align: right; color: var(--acc2); }
.db-grid td.null { color: var(--dimmer); font-style: italic; }
.db-full { margin: 0; white-space: pre-wrap; word-break: break-all; font: 13px/1.5 var(--mono); background: rgba(0,0,0,.3); padding: 12px; border-radius: 10px; max-height: 60dvh; overflow: auto; }
.db-sql { margin: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.db-sql summary { cursor: pointer; color: var(--dim); font-size: 13.5px; }
.db-sql[open] summary { margin-bottom: 10px; }
.db-sql .db-grid { margin-top: 8px; max-height: 50dvh; border: 1px solid var(--line); border-radius: 10px; }
/* DeepSeek wish studio */
:root { --bg:#fff; --bg2:#fff; --card:#f8f9fc; --card2:#f1f3f8; --line:#e8eaf0; --fg:#20232e; --dim:#7b8092; --dimmer:#9499aa; --acc:#4d6bfe; --acc2:#4564ee; --ok:#29a47a; --warn:#c78e24; --err:#db5363; }
body { background:#fff; }
button,a,input,textarea,select { outline-offset:4px; }
button:focus-visible,a:focus-visible { outline:2px solid var(--acc); }
.btn.primary,.send { background:var(--acc); color:#fff; border-color:var(--acc); }
.btn.primary:hover,.send:hover { background:#3858ed; }
.topbar,.bottom-nav { background:#fff; }
.topbar { padding:12px 18px; min-height:60px; }
.tag { color:#4d6bfe; background:#eef1ff; }
.hero-title { background:none; color:#283047; }
.input,.textarea { background:#fff; color:var(--fg); border-color:var(--line); }
.composer-box { background:#f8f9fc; }
.chat-tools select { background:#f6f7fa; color:#4d6bfe; max-width:230px; }
.msg.user .bubble { background:#edf1ff; color:#26365e; }
.msg.ai pre,.logs { background:#f5f6fa; color:#343b50; }
.seg { background:#f1f3f8; }.seg button.on { background:white; }
#toast div { background:#fff; color:#283047; box-shadow:0 8px 40px #1c2d6720; }
.spin { border-color:#dce3ff; border-top-color:var(--acc); }
.sheet-mask { background:#19234155; backdrop-filter:blur(5px); }
.sheet { padding:24px; box-shadow:0 24px 100px #14215020; }
.sheet label { display:grid; gap:8px; font-size:13px; }
.release-copy p { line-height:1.9; margin:0 0 12px; color:#747c90; }.release-copy h2 { font-size:28px; margin:0; }.release-date { color:#4d6bfe; font-size:11px; letter-spacing:2px; }
.studio-shell { display:flex; height:100%; min-height:0; }
.studio-sidebar { flex:0 0 232px; background:#f8f9fc; border-right:1px solid #eff0f5; padding:32px 20px 18px; display:flex; flex-direction:column; }
.studio-brand { display:flex; align-items:center; gap:11px; color:#4262ec; text-decoration:none; margin:0 8px 36px; }
.studio-brand img { width:38px; height:38px; }.studio-brand>span { font-size:25px; font-weight:720; letter-spacing:-1px; line-height:1.1; }.studio-brand small { display:block; font-size:11px; letter-spacing:3px; font-weight:500; color:#898fa3; margin-top:9px; }
.new-wish { padding:13px 12px; color:#4864dc; background:#e9eeff; border:1px solid #dce4ff; border-radius:12px; text-align:left; font-weight:600; margin-bottom:24px; font-size:13px; }
.studio-sidebar nav { display:grid; gap:7px; }.studio-nav-item { display:flex; width:100%; align-items:center; gap:12px; color:#777e90; text-decoration:none; padding:12px; text-align:left; border-radius:10px; font-size:13px; }.studio-nav-item:first-child { background:#eef0f6; color:#2c344c; }.studio-nav-item:hover { background:#eceff8; }.studio-nav-item svg { width:19px; height:19px; }
.sidebar-note { margin-top:auto; padding:24px 10px; color:#8e96aa; font-size:11px; line-height:1.7; }.sidebar-note p { margin:4px 0; }
.studio-account { display:flex; align-items:center; gap:9px; border-top:1px solid #e7eaf2; padding-top:18px; margin-top:auto; text-decoration:none; color:#777e90; font-size:11px; }.studio-account>span:nth-child(2) { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.avatar { display:grid; place-items:center; width:30px; height:30px; border-radius:50%; background:#e7ecff; color:#5270e8; }
.studio-main { flex:1; min-width:0; overflow:auto; scroll-behavior:smooth; }.studio-top { display:flex; justify-content:space-between; align-items:center; padding:24px 38px 12px; color:#202c49; font-size:14px; }.studio-top>b { font-weight:650; }.version-link { display:flex; align-items:center; gap:9px; color:#72798d; font-size:11px; }.version-link span { background:#edf2ff; color:#5472ec; padding:2px 6px; font-size:8px; border-radius:4px; }
.studio-content { max-width:1230px; padding:0 52px; margin:auto; }.wish-hero { text-align:left; padding:34px 0 42px; max-width:860px; margin:auto; }
.release-pill { display:inline-flex; align-items:center; gap:10px; background:#f6f8ff; color:#6a7db8; border:1px solid #e9edff; border-radius:30px; font-size:10px; padding:7px 13px; }.blue-dot { width:5px; height:5px; border-radius:50%; background:#6281ff; box-shadow:0 0 0 3px #e9eeff; }
.wish-hero h1 { font-size:clamp(32px,3.6vw,51px); font-weight:650; letter-spacing:-2px; margin:26px 0 12px; color:#202c49; line-height:1.3; }.wish-hero h1>span { color:#4d6bfe; }.hero-description { font-size:13px; color:#969bad; letter-spacing:.5px; margin:0 0 30px; }
.wish-title { display:flex; align-items:baseline; gap:12px; margin-bottom:14px; }.wish-title h2 { margin:0; font-size:20px; }.wish-title span { color:#9aa2b6; font-size:11px; }.wish-composer { border:1px solid #dce2f3; border-radius:16px; text-align:left; box-shadow:0 8px 32px #4d6bfe0a,0 2px 8px #354a8c05; padding:17px 18px; background:#fff; transition:box-shadow .2s; }.wish-composer:focus-within { border-color:#a8b7ff; box-shadow:0 8px 40px #4d6bfe10; }.wish-input { width:100%; resize:vertical; border:0; outline:none; min-height:62px; max-height:260px; padding:2px 1px; line-height:1.8; font-size:14px; color:#3b4359; background:transparent; }.wish-input::placeholder { color:#a0a6b8; }.wish-toolbar { display:flex; justify-content:flex-end; align-items:center; gap:10px; margin-top:10px; }.wish-model { border:1px solid #e9ecf5; background:#f8f9fd; border-radius:9px; color:#6376ad; padding:7px 9px; font-size:10px; max-width:80%; }.wish-key-hint { margin-left:auto; color:#b0b6c6; font-size:9px; }.wish-submit { background:#4d6bfe; color:white; border-radius:11px; width:36px; height:36px; flex:none; display:grid; place-items:center; }.wish-submit:disabled { opacity:.45; cursor:wait; }.wish-chips { display:flex; flex-wrap:wrap; justify-content:flex-start; gap:9px; margin-top:13px; }.wish-chips button { border:1px solid #eceef5; border-radius:8px; color:#7a8298; font-size:11px; padding:6px 12px; }.wish-chips button:hover { border-color:#c3d0ff; color:#4d6bfe; background:#f8f9ff; }.hero-footnote { color:#b0b6c5; margin-top:22px; font-size:10px; letter-spacing:1px; }
.studio-section { margin-bottom:42px; scroll-margin-top:22px; }.section-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:19px; }.eyebrow { color:#a2a9bc; font-size:8px; letter-spacing:2px; }.section-heading h2 { font-size:18px; font-weight:600; letter-spacing:-.3px; margin:6px 0 0; }.section-heading>.small { font-size:10px; color:#a7adbc; }
.inspiration-grid,.showcase-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:17px; }.inspiration-card { padding:0; border:1px solid #e9ecf3; border-radius:13px; overflow:hidden; text-align:left; transition:transform .2s,box-shadow .2s; }.inspiration-card:hover { transform:translateY(-4px); box-shadow:0 12px 30px #30427012; }.idea-art { position:relative; height:155px; overflow:hidden; }.art-label { position:absolute; left:18px; top:16px; font-size:7px; letter-spacing:2px; z-index:2; }.idea-art>b { position:absolute; font-size:80px; font-weight:300; right:22px; bottom:5px; line-height:1; }.garden { background:#eeeae1; color:#6b756b; }.garden:before { content:'quiet things,\a made with care.'; white-space:pre; position:absolute; left:20px; top:52px; font:italic 25px/1.1 Georgia,serif; color:#626956; }.garden i { position:absolute; width:92px; height:100px; border-radius:50% 50% 0 0; background:linear-gradient(125deg,#b8bcb0,#7d8978); right:24px; top:40px; transform:rotate(13deg); }.garden b { color:#e3e6d9; font-size:75px; right:39px; bottom:19px; }
.racing { color:#c8b0ff; background:linear-gradient(165deg,#1e1b38,#393466); }.racing:before { content:''; position:absolute; width:240px; height:200px; left:12%; top:52px; border:2px solid #9a78fc; transform:perspective(100px) rotateX(45deg) rotate(-15deg); box-shadow:0 0 20px #9c73ff77,inset 0 0 20px #9c73ff55; border-radius:40%; }.racing i { position:absolute; width:45px; height:24px; background:#b7a7fb; top:83px; left:44%; transform:rotate(-15deg); box-shadow:-4px 7px 0 #5a3b92,0 0 24px #c1a3ff; border-radius:7px 12px 5px 5px; }.racing b { color:#8f7cc8; font-size:40px; }
.space { background:radial-gradient(ellipse at 70% 50%,#34556f,#172c43 65%); color:#b1d0df; }.space:before { content:''; position:absolute; width:86px; height:86px; border-radius:50%; background:radial-gradient(circle at 30% 30%,#ecddbc,#b99b71 40%,#345575 80%); left:40%; top:40px; box-shadow:0 0 50px #a3cffb22; }.space i { position:absolute; width:180px; height:54px; border:1px solid #c3d5dc66; border-radius:50%; left:20%; top:60px; transform:rotate(-30deg); }.space b { color:#a5b3c3; font-size:28px; }
.idea-caption { display:flex; align-items:center; gap:9px; padding:13px 15px; background:#fff; }.idea-caption>div { flex:1; min-width:0; }.idea-caption .small { font-size:9px; color:#a4aabc; }.idea-caption h3 { font-size:11px; margin:5px 0 0; color:#4b5367; font-weight:500; }.idea-caption>span { color:#a1acc9; font-size:16px; }
.gallery-first { padding-top:18px; }.gallery-heading { align-items:flex-end; margin-bottom:16px; }.gallery-heading h1 { font-size:clamp(25px,3vw,36px); line-height:1.15; letter-spacing:-1px; margin:0; color:#202c49; }.gallery-heading p { margin:8px 0 0; color:#969daf; font-size:12px; }.gallery-filters { display:flex; gap:8px; margin:0 0 17px; overflow:auto; }.gallery-filters button { padding:7px 14px; border-radius:8px; color:#777f94; font-size:11px; white-space:nowrap; }.gallery-filters .on { background:#e9eeff; color:#3e5fe5; }.gallery-empty { grid-column:1/-1; border:1px dashed #e3e7f1; border-radius:16px; padding:48px 20px; text-align:center; color:#a7afc2; font-size:12px; background:#fcfcff; }.gallery-empty>span { font-size:25px; color:#adbfff; }.gallery-empty h3 { font-size:14px; font-weight:600; color:#65718e; }.gallery-empty p { font-size:10px; }
.published-card { background:#fff; border:1px solid #e4e8f1; border-radius:15px; overflow:hidden; text-decoration:none; color:inherit; transition:transform .2s,box-shadow .2s,border-color .2s; }.published-card:hover { transform:translateY(-4px); border-color:#cbd5ff; box-shadow:0 16px 38px #263e7616; }.published-art { height:130px; background:linear-gradient(120deg,#e8edff,#f7f2ff); display:flex; align-items:center; justify-content:center; position:relative; }.published-art>span { font-size:40px; color:#97a8ec; }.published-art small { position:absolute; right:12px; bottom:10px; font-size:9px; font-weight:600; color:#43547b; }.category-1 { background:#e8f4ed; }.category-2 { background:#efebff; }.category-3 { background:#e5f0fb; }.published-body { padding:15px 16px 17px; }.published-body h3 { font-size:14px; overflow-wrap:anywhere; margin:9px 0 6px; }.published-body p { font-size:11px; color:#8d94a7; min-height:31px; overflow-wrap:anywhere; margin:0 0 10px; line-height:1.5; }.published-body .small { font-size:9px; }
.project-card { background:#fff; border-color:#e9ecf3; padding:18px; }.project-card:hover { border-color:#cbd5ff; }.project-card .name { font-size:13px; }.project-card .small { font-size:10px; }
.join-strip { padding:22px 0; display:flex; align-items:center; justify-content:space-between; color:#9aa2b6; font-size:12px; border-top:1px solid #edf0f7; }.studio-footer { padding:18px 0 25px; border-top:1px solid #eff1f7; display:flex; justify-content:space-between; font-size:9px; color:#abb2c4; }.studio-footer button { font-size:9px; color:#8f9ab5; }
@media(min-width:1500px) { .wish-hero { padding-top:70px; }.idea-art { height:180px; } }
@media(max-width:1100px) { .studio-sidebar { flex-basis:200px; padding:28px 15px 18px; }.studio-content { padding:0 28px; }.studio-top { padding:24px 28px; }.wish-hero { padding-top:36px; }.idea-caption { padding:12px 10px; }.idea-caption h3 { font-size:10px; }.idea-art { height:140px; }.garden i { right:10px; }.garden:before { z-index:1; font-size:22px; } }
@media(max-width:760px) { .studio-sidebar { display:none; }.studio-top { padding:19px 20px; }.studio-top>span { font-size:10px; }.studio-content { padding:0 20px; }.wish-hero { padding:30px 0 40px; }.wish-hero h1 { letter-spacing:-1px; font-size:36px; }.hero-description { font-size:11px; line-height:1.8; margin-bottom:25px; }.wish-composer { padding:16px; }.wish-key-hint { display:none; }.wish-submit { margin-left:auto; }.wish-model { font-size:10px!important; max-width:82%; }.wish-input { font-size:14px!important; }.wish-chips { gap:6px; }.wish-chips button { font-size:10px; padding:6px 9px; }.hero-footnote { font-size:8px; }.inspiration-grid { grid-template-columns:1fr; gap:12px; }.inspiration-card { display:flex; }.idea-art { width:115px; flex:none; height:100px; }.idea-caption { padding:16px; flex:1; }.idea-caption h3 { font-size:12px; }.art-label { font-size:5px; left:10px; top:10px; letter-spacing:1px; }.garden:before { font-size:15px; left:10px; top:35px; }.garden i { width:55px; height:60px; right:8px; top:30px; }.garden b { font-size:40px; right:18px; bottom:15px; }.racing:before { width:100px; top:40px; left:10px; height:90px; }.racing i { left:45px; top:60px; width:28px; height:16px; }.racing b { font-size:20px; right:8px; }.space:before { width:50px; height:50px; top:30px; left:35px; }.space i { width:100px; height:30px; top:40px; left:7px; }.space b { font-size:15px; right:7px; }.section-heading h2 { font-size:16px; }.section-heading>.small { display:none; }.showcase-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }.studio-section { margin-bottom:32px; }.join-strip { gap:10px; font-size:10px; }.join-strip .btn { font-size:11px; }.studio-footer { font-size:8px; gap:10px; }.topbar { padding:10px 8px; gap:4px; }.topbar .row { gap:5px; }.topbar .btn.sm { font-size:11px; padding:0 8px; }.status-pill { display:none; }.studio-brand { margin:0; } }
@media(prefers-reduced-motion:reduce) { *,*:before,*:after { scroll-behavior:auto!important; animation:none!important; transition:none!important; } }
.mobile-account { display:none; }
.view-mine .home-only { display:none; }
.view-mine #my-creations { padding-top:28px; min-height:60vh; }
.studio-nav-item.on { background:#e9edff; color:#4c63ee; }
.view-mine .studio-nav-item:first-child { background:transparent; color:#777e90; }
.published-art { height:auto; aspect-ratio:16/9; overflow:hidden; }
.published-art>img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:1; }
.published-art small { z-index:2; background:#ffffffdc; border-radius:4px; padding:4px 6px; }
.share-cover-preview { width:100%; aspect-ratio:16/9; overflow:hidden; border:1px solid var(--line); border-radius:12px; background:#f2f4ff; display:grid; place-items:center; color:var(--muted); font-size:12px; }
.share-cover-preview img { width:100%; height:100%; object-fit:cover; }
.composer { background:#fff; }.tool { background:#f8f9fc; }.tool pre { color:#47516b; }.editor textarea { background:#f8f9fc; }.msg.ai .text pre { background:#f5f6fa; }
.version-file-list { max-height:260px; overflow:auto; border:1px solid var(--line); border-radius:8px; }
.sheet:has(.version-detail) { width:min(100vw,960px); }
.version-restore { position:sticky; bottom:0; background:var(--bg2); z-index:1; }
.version-file { width:100%; padding:9px 10px; text-align:left; border-bottom:1px solid var(--line); }
.version-file:last-child { border-bottom:0; }
.version-file:hover { background:var(--card2); }
.version-compare { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.version-compare pre { max-height:300px; overflow:auto; padding:10px; font-size:11px; background:#f5f6fa; border:1px solid var(--line); border-radius:8px; white-space:pre; }
@media(max-width:760px) { .version-compare { grid-template-columns:minmax(0,1fr); } }
@media(max-width:760px) { .gallery-first { padding-top:8px; }.gallery-heading h1 { font-size:27px; }.gallery-heading p { font-size:11px; }.showcase-grid { grid-template-columns:minmax(0,1fr); }.published-body p { min-height:0; }.wish-hero { padding:22px 0 32px; }.wish-title { display:block; }.wish-title span { display:block; margin-top:5px; }.studio-top { gap:10px; }.studio-top>b { margin-right:auto; }.mobile-account { display:inline-flex; color:#7c8dbb; }.mobile-account svg { width:17px; height:17px; } }

.pick-layer { position: absolute; inset: 0; z-index: 6; cursor: crosshair; touch-action: none; background: rgba(15,23,42,.18); }
.pick-tip { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); background: rgba(15,23,42,.85); color: #fff; font-size: 12px; padding: 6px 12px; border-radius: 16px; pointer-events: none; white-space: nowrap; }
.pick-box { position: absolute; z-index: 7; border: 2px solid #f97316; background: rgba(249,115,22,.15); border-radius: 4px; pointer-events: none; }
.pick-box.done { box-shadow: 0 0 0 2000px rgba(15,23,42,.12); }
.pick-chip { display: flex; align-items: center; gap: 8px; justify-content: space-between; font-size: 12px; padding: 6px 10px; margin-bottom: 6px; border-radius: 8px; background: rgba(249,115,22,.14); color: #c2410c; }
.pick-chip.hidden { display: none; }
.btn.on { background: #f97316; color: #fff; }

.attach { position: relative; cursor: pointer; align-self: center; flex: none; width: 32px; height: 32px; padding: 0; }
.img-chip { flex-wrap: wrap; justify-content: flex-start; background: rgba(99,102,241,.12); color: var(--acc, #4f46e5); }
.img-chip .img-item { display: inline-flex; align-items: center; gap: 6px; }

.file-hidden { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.cover-picker { display:block; flex:0 1 360px; min-width:0; max-width:100%; margin:0; }
.cover-file-input { display:block; position:static; width:100%; max-width:100%; height:auto; min-height:40px; opacity:1; cursor:pointer; color:var(--fg); font:inherit; }
.cover-file-input::file-selector-button { padding:9px 12px; margin-right:10px; border:1px solid var(--line); border-radius:9px; background:var(--bg2); color:var(--fg); cursor:pointer; font:inherit; }
.cover-file-input:disabled::file-selector-button { cursor:wait; opacity:.6; }
.cover-picker:focus-within { outline:2px solid var(--acc); outline-offset:3px; border-radius:8px; }
.billing-page { width:min(940px,100%); margin:0 auto; padding:36px 24px 60px; color:var(--fg); }
.billing-hero { padding:32px; background:linear-gradient(125deg,#eef1e8,#fff6ed); border:1px solid #dfe3d7; border-radius:22px; color:#202b22; }
.billing-eyebrow { font-size:10px; letter-spacing:2.5px; color:#69785e; }
.billing-hero h2 { font-size:clamp(28px,5vw,42px); margin:18px 0 12px; font-weight:600; }
.billing-hero em { color:#718169; font-style:normal; }
.billing-hero>p { color:#6f786b; line-height:1.8; font-size:14px; }
.billing-balances { display:grid; grid-template-columns:1fr 1fr; gap:24px; margin-top:30px; padding-top:24px; border-top:1px solid #d9dfd1; }
.billing-balances span { display:block; font-size:12px; color:#6d7866; }
.billing-balances strong { display:block; font-size:38px; margin-top:8px; }
.billing-balances small { font-size:13px; font-weight:400; color:#6d7866; }
.billing-balances p { grid-column:1/-1; font-size:12px; line-height:1.8; margin:0; color:#6d7866; }
.billing-page>section+section { margin-top:32px; }
.billing-packages { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.billing-package { display:flex; flex-direction:column; align-items:flex-start; padding:23px; gap:18px; border:1px solid var(--line); border-radius:14px; background:var(--bg); color:var(--fg); text-align:left; }
.billing-package.selected { border:2px solid #6c805e; padding:22px; background:#eef3e8; color:#24321e; }
.billing-package:disabled { cursor:default; opacity:.7; }
.billing-package strong { font-size:32px; }.billing-package strong small { font-size:12px; font-weight:400; }
.billing-package>small { font-size:11px; color:var(--dim); }
.billing-product-image { width:100px; height:100px; object-fit:contain; border-radius:12px; align-self:center; }
.billing-order { display:flex; gap:18px; justify-content:space-between; align-items:center; padding:16px; border:1px solid var(--line); border-radius:10px; }
.billing-order small { display:block; margin-top:6px; font-size:11px; }.billing-order>div { flex:1; }
.billing-payment:empty { display:none; }.billing-payment { padding:20px; border:1px solid var(--line); border-radius:12px; }
.billing-qr { display:flex; flex-direction:column; align-items:center; gap:12px; padding:16px; }.billing-qr img { width:240px; height:240px; max-width:100%; background:white; border-radius:12px; }
@media(max-width:600px) { .billing-page { padding:20px 16px 40px; }.billing-hero { padding:24px; }.billing-packages { grid-template-columns:1fr; }.billing-package { display:grid; grid-template-columns:1fr 1fr; gap:12px; }.billing-package strong { grid-row:span 2; }.billing-order { flex-wrap:wrap; gap:10px; } }
