:root { --side: 260px; --line: #ececef; --ink: #1d1d1f; --muted: #8e8e93; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { color: var(--ink); background: #fff; font: 14px/1.5 "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif; overflow: hidden; }
#app { display: flex; height: 100%; min-height: 0; }
button, textarea, input { font: inherit; color: inherit; }
button { cursor: pointer; }
.side { width: var(--side); background: #f5f5f6; display: flex; flex-direction: column; flex: none; min-height: 100%; overflow: hidden; }
body.side-closed .side { display: none; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 14px 8px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; text-decoration: none; color: inherit; }
.brand img { width: 26px; height: 26px; border-radius: 50%; }
.ghost { border: 0; background: transparent; border-radius: 8px; width: 28px; height: 28px; color: #666; }
.ghost:hover, .item:hover { background: #ececef; }
.seg { display: flex; background: #ececef; border-radius: 999px; padding: 3px; margin: 4px 12px 10px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 999px; padding: 7px 0; color: #3a3a3c; font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
.seg button.on { background: #fff; color: #111; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.item { width: calc(100% - 16px); margin: 1px 8px; border: 0; background: transparent; border-radius: 10px; display: flex; align-items: center; gap: 10px; padding: 8px 10px; text-align: left; color: #262626; font-size: 14px; font-weight: 400; text-decoration: none; }
.item.plain { gap: 0; }
.item svg, .item .ico { flex: none; }
.item .chev { margin-left: auto; color: #999; display: inline-flex; }
.tools-head { justify-content: space-between; color: #737373; font-size: 13px; font-weight: 600; }
.tools-head svg { color: #737373; }
#tools .item { padding-left: 10px; }
.label { color: #8e8e93; font-size: 12px; margin: 14px 18px 4px; }
.sub { padding-left: 28px; font-size: 13px; }
.scroll { flex: 1; min-height: 80px; min-width: 0; overflow-x: hidden; overflow-y: auto; scrollbar-width: none; }
.scroll::-webkit-scrollbar { width: 0; height: 0; display: none; }
.side-foot { flex: none; padding: 8px 12px 14px; border-top: 1px solid #e4e4e7; }
.side-login { width: 100%; border: 1px solid #ececef; background: #fff; border-radius: 12px; padding: 10px 12px; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; }
.side-account { position: relative; display: block; min-height: 36px; }
.side-account .side-user { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: #111; color: #fff; }
.side-account .side-user svg { display: block; }
.side-upgrade { position: absolute; left: 70%; top: 50%; transform: translateY(-50%); border: 0; border-radius: 999px; background: #111; padding: 6px 14px; white-space: nowrap; }
.side-upgrade span { font-weight: 700; background: linear-gradient(90deg, #ffffff 0%, #60a5fa 52%, #a855f7 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.side-upgrade:hover { filter: brightness(1.08); }
.menu.user-pop { min-width: 0; width: 240px; max-width: 240px; padding: 12px 10px 8px; }
.user-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; }
.nick-text { font-weight: 650; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-act { border: 0; background: transparent; color: #a1a1aa; font-size: 13px; padding: 4px 0; flex: none; }
.user-act.save { color: #111; font-weight: 650; }
.nick-input { width: 108px; border: 1px solid #ececef; border-radius: 8px; padding: 4px 8px; font-weight: 650; }
.user-id { color: #8e8e93; font-size: 12px; min-width: 0; }
.user-line { height: 1px; background: #ececef; margin: 6px 2px; }
.menu .user-item { justify-content: flex-start; }
.menu .user-item > span { flex: 1; min-width: 0; text-align: left; }
.menu .user-item .user-end { flex: none; margin-left: auto; color: #111; display: inline-flex; }
.menu .user-item svg { flex: none; color: #666; }
.login-code { margin: 8px 0; font-size: 32px; letter-spacing: .28em; font-weight: 700; }
.point-list { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow: auto; }
.point-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #f1f1f3; }
.point-row span { flex: 1; min-width: 0; }
.point-row b { font-weight: 650; }
.point-row em { color: #888; font-style: normal; font-size: 12px; }
.empty { text-align: center; color: #b0b0b6; margin-top: 28px; font-size: 13px; padding: 0 16px; }
.empty b { display: block; font-weight: 500; color: #9a9aa1; margin-bottom: 4px; }
.chat-row { display: flex; align-items: center; position: relative; width: 100%; max-width: 100%; min-width: 0; overflow: hidden; }
.chat-row .item { flex: 1; width: 0; min-width: 0; margin-right: 0; }
.chat-row .item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row .item > span:first-of-type { flex: 1; min-width: 0; }
.count { flex: none; color: #8e8e93; font-size: 12px; }
.back-link { border: 0; background: transparent; color: #444; border-radius: 8px; padding: 6px 8px; }
.back-link:hover { background: #f2f2f4; }
.project-block .item > span { flex: 0 1 auto; }
.project-block .count { margin-left: 2px; font-style: normal; }
.project-line { gap: 0; padding: 2px 4px 2px 2px; }
.project-line .fold,
.project-line .pname { border: 0; background: transparent; color: inherit; font: inherit; }
.project-line .fold { width: 32px; height: 32px; padding: 0; border-radius: 8px; display: grid; place-items: center; flex: none; }
.project-line .fold:hover { background: rgba(0,0,0,.06); }
.project-line .pname { flex: 1; min-width: 0; text-align: left; padding: 6px 6px 6px 2px; border-radius: 8px; }
.project-line .pname span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-chats { padding-left: 26px; }
.project-files { border-top: 1px solid #ececef; padding-top: 6px; }
.project-file { width: 100%; border: 0; background: transparent; border-radius: 12px; display: flex; align-items: center; gap: 10px; padding: 12px 8px; text-align: left; color: #262626; }
.project-file:hover { background: #f5f5f6; }
.project-file span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-file .when { margin-left: auto; color: #a1a1aa; font-size: 13px; flex: none; }
body.project-view.center-compose #dock { margin-bottom: 0; }
body.project-view.center-compose #below { margin-bottom: auto; }
body.project-view .main { overflow: auto; }
body.project-view .stage { overflow: visible; }
.wait-row, .reply-head { display: flex; align-items: center; gap: 8px; color: #262626; min-height: 28px; }
.wait-row b, .reply-head b { font-weight: 600; }
.reply-head { margin-bottom: 10px; }
.wait-label { color: #8a8a90; }
.ellipsis { display: inline-block; width: 1.4em; text-align: left; }
.ellipsis:after { content: ""; animation: wait-ellipsis 1.2s steps(4, end) infinite; }
@keyframes wait-ellipsis { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.wait-dots { display: flex; gap: 6px; margin: 14px 0 4px 4px; }
.wait-dots i { width: 7px; height: 7px; border-radius: 50%; background: #8d93a3; animation: wait-bob 1s infinite; }
.wait-dots i:nth-child(2) { animation-delay: .15s; }
.wait-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes wait-bob { 0%, 80%, 100% { transform: translateY(0); opacity: .45; } 40% { transform: translateY(-5px); opacity: 1; } }
.think { background: #f6f7f8; border: 1px solid #ececef; border-radius: 14px; padding: 10px 12px; margin-bottom: 14px; color: #666; }
.think-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.think-bar button { border: 0; background: transparent; color: #666; padding: 0; }
.think-body { max-height: 72px; overflow: hidden; white-space: pre-wrap; font-size: 13px; line-height: 1.6; }
.think.open .think-body { max-height: none; }
.msg-actions { display: flex; gap: 2px; margin-top: 10px; }
.msg-actions button { width: 32px; height: 32px; border: 0; background: transparent; color: #8a8a90; border-radius: 8px; display: grid; place-items: center; }
.msg-actions button:hover { background: #f4f4f5; color: #111; }
.project-home { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 16px 4px; }
.project-home h1 { margin: 10px 0 4px; font-size: 28px; font-weight: 650; letter-spacing: -.03em; }
.project-home p { margin: 0; color: #888; font-size: 13px; }
.folder-hero { width: 56px; height: 56px; display: grid; place-items: center; color: #111; }
.folder-hero svg { width: 40px; height: 40px; }
.project-note { width: min(820px, calc(100% - 32px)); margin: 10px auto 0; border: 1px solid #ececef; border-radius: 12px; padding: 10px 14px; color: #666; font-size: 13px; text-align: center; }
.project-note button { border: 0; background: transparent; padding: 0; text-decoration: underline; color: #111; }
.finder { align-items: flex-start; padding-top: 12vh; }
.finder-card { width: min(640px, calc(100% - 32px)); background: #fff; border: 1px solid #ececef; border-radius: 20px; box-shadow: 0 18px 50px rgba(0,0,0,.12); overflow: hidden; }
.finder-search { display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 16px; border-bottom: 1px solid #f0f0f2; color: #a3a3a3; }
.finder-search svg { flex: none; }
.finder-search input { flex: 1; width: 100%; min-width: 0; border: 0; outline: none; box-shadow: none; appearance: none; margin: 0; padding: 16px 0; font-size: 16px; line-height: 1.4; background: transparent; color: #171717; }
.finder-search input:focus { outline: none; box-shadow: none; }
.finder-search input::placeholder { color: #b0b0b6; }
.finder-search button { width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; font-size: 20px; line-height: 1; color: #8a8a90; }
.finder-search button:hover { background: #f4f4f5; color: #3f3f46; }
.finder-label { display: flex; align-items: center; gap: 8px; padding: 14px 18px 6px; color: #8a8a90; font-size: 13px; }
.finder .hit { display: flex; width: calc(100% - 16px); margin: 0 8px; border: 0; background: transparent; padding: 10px 14px; border-radius: 10px; align-items: center; gap: 10px; text-align: left; }
.finder .hit.on, .finder .hit:hover { background: #f4f4f5; }
.finder .hit .when { margin-left: auto; color: #a1a1aa; font-size: 13px; flex: none; }
.finder-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 16px; border-top: 1px solid #f0f0f2; background: #fafafa; color: #8a8a90; font-size: 12px; }
.finder-foot span { display: inline-flex; align-items: center; gap: 6px; }
.finder-foot kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding: 0 6px; border: 1px solid #e4e4e7; border-radius: 6px; background: #fff; color: #52525b; font: 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; box-shadow: 0 1px 0 #eee; }
.finder-empty { padding: 28px 16px; text-align: center; color: #999; }
#hits { max-height: 360px; overflow: auto; }
.chat-row .more { border: 0; background: transparent; color: #71717a; width: 28px; height: 28px; border-radius: 8px; opacity: 0; }
.chat-row:hover .more, .chat-row .more:focus { opacity: 1; background: #ececef; }
.side-q { width: calc(100% - 16px); margin: 4px 8px 8px; border: 1px solid #ececef; border-radius: 10px; padding: 8px 10px; background: #fff; }
.foot { padding: 12px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; background: #fff; }
.top { height: 58px; display: flex; align-items: center; padding: 0 16px; gap: 8px; }
.model { border: 0; background: #f2f2f4; border-radius: 999px; padding: 6px 12px 6px 6px; display: inline-flex; align-items: center; gap: 8px; }
.grow { flex: 1; }
.stage { flex: 1; overflow: auto; display: flex; flex-direction: column; min-height: 0; }
body[data-page="work"] .main,
body[data-page="design"] .main,
body[data-page="explore"] .main { overflow: auto; }
body[data-page="work"] .stage,
body[data-page="design"] .stage,
body[data-page="explore"] .stage { flex: none; overflow: visible; }
body[data-page="work"] .hello,
body[data-page="design"] .hello,
body[data-page="explore"] .hello { min-height: 38vh; }
.hello { flex: 1; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px 12px; text-align: center; }
.hello h1 { font-size: 32px; font-weight: 600; letter-spacing: -.03em; margin: 0 0 22px; line-height: 1.25; }
.pills { display: inline-flex; background: #f2f2f4; border-radius: 999px; padding: 4px; gap: 2px; }
.pills button { border: 0; background: transparent; border-radius: 999px; padding: 7px 12px; color: #444; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pills button.on { background: #fff; color: #111; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.temp-note { margin-top: 10px; color: #888; font-size: 13px; }
.dock-wrap { width: min(820px, calc(100% - 32px)); margin: 0 auto 18px; }
.dock { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.layouts { display: flex; gap: 0; color: #3a3a3c; padding: 3px; flex: none; align-self: flex-start; background: #f2f2f4; border-radius: 12px; }
body.center-compose .stage { flex: 0 0 auto; overflow: visible; margin-top: auto; }
body.center-compose #dock { margin-bottom: auto; }
body.center-compose .hello { flex: none; padding-bottom: 28px; }
body.multi-col .thread.tall { flex: 1; min-height: 0; width: calc(100% - 28px); max-width: none; padding: 12px 0; }
body.multi-col .cols { flex: 1; min-height: calc(100vh - 360px); align-items: stretch; }
body.multi-col .col-card { min-height: calc(100vh - 360px); }
.layouts button { width: 28px; height: 28px; border: 0; background: transparent; border-radius: 8px; color: #3a3a3c; display: grid; place-items: center; }
.layouts button.on { background: #fff; }
.card { flex: 1; min-width: 0; border: 1px solid #ececf1; border-radius: 24px; box-shadow: 0 8px 30px rgba(0,0,0,.04); background: #fff; overflow: hidden; }
.card .notice { margin: 0; border-radius: 0; background: #f4f4f5; padding: 10px 14px; font-size: 13px; color: #666; display: flex; gap: 8px; align-items: center; }
.tag { background: #f5d98a; color: #7a5b12; border-radius: 999px; font-size: 11px; padding: 1px 6px; font-weight: 600; }
textarea { width: 100%; border: 0; resize: none; outline: none; min-height: 52px; max-height: 180px; padding: 14px 16px 4px; font-size: 15px; background: transparent; }
.bar { display: flex; align-items: center; gap: 2px; padding: 4px 8px 10px; }
.bar button.tool { border: 0; background: transparent; border-radius: 8px; padding: 6px 8px; color: #444; display: inline-flex; align-items: center; gap: 6px; }
.bar button.tool.on, .bar button.tool.open { background: #f2f2f4; }
.send { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; border: 0; background: #dedee3; color: #fff; }
.send.ready { background: #111; }
.hint { margin: 8px 4px 0; color: #9a9aa1; font-size: 12px; text-align: center; }
.below { width: min(820px, calc(100% - 32px)); margin: 8px auto 32px; }
.tabs { display: flex; justify-content: flex-end; gap: 16px; font-size: 14px; }
.tabs button { border: 0; background: transparent; color: #888; padding: 4px 0; border-bottom: 2px solid transparent; }
.tabs button.on { color: #111; border-color: #111; }
.heat { border: 1px solid #ececef; border-radius: 16px; padding: 16px; margin-top: 8px; }
.heat p { margin: 0 0 12px; font-size: 13px; }
.heat p b { color: #3146c8; font-weight: 600; }
.weeks { display: flex; gap: 3px; overflow: auto; }
.week { display: flex; flex-direction: column; gap: 3px; }
.cell { width: 11px; height: 11px; border-radius: 2px; background: #ebedf0; }
.cell.l1 { background: #c6e4ff; }
.cell.l2 { background: #7eb6f0; }
.cell.l3 { background: #3b82d6; }
.cell.l4 { background: #1d4f91; }
.legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; color: #888; font-size: 12px; margin-top: 8px; }
.guides { margin-top: 12px; display: grid; gap: 10px; }
.guide { border: 1px solid #ececef; border-radius: 14px; padding: 14px 16px; }
.guide b { display: block; margin-bottom: 4px; }
.guide span { color: #666; font-size: 13px; }
.thread { width: min(980px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 12px; display: flex; flex-direction: column; gap: 16px; }
.col-card .bubble.user { align-self: flex-end; margin: 0 0 12px; }
.bubble.user { align-self: flex-end; background: #f4f4f5; border-radius: 18px; padding: 10px 14px; max-width: 80%; white-space: pre-wrap; }
.bubble.bot { white-space: pre-wrap; line-height: 1.7; }
.bubble.bot.md { white-space: normal; line-height: 1.85; letter-spacing: .2px; color: #0d0d0d; }
.bubble.bot.md p { margin: 1em 0; }
.bubble.bot.md p:first-child { margin-top: 0; }
.bubble.bot.md p:last-child { margin-bottom: 0; }
.bubble img, .shot img { max-width: min(480px, 100%); border-radius: 16px; display: block; }
.cols { display: grid; gap: 12px; width: 100%; }
.cols.c2 { grid-template-columns: 1fr 1fr; }
.cols.c3 { grid-template-columns: 1fr 1fr 1fr; }
.col-card { border: 1px solid #ececef; border-radius: 16px; min-height: 220px; padding: 12px; display: flex; flex-direction: column; overflow: auto; }
.col-head { margin-bottom: 8px; }
.col-model { border: 1px solid #ececef; background: #fff; border-radius: 999px; padding: 4px 10px 4px 4px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.col-empty { flex: 1; display: grid; place-items: center; color: #262626; font-size: 20px; line-height: 28px; font-weight: 400; text-align: center; padding: 0 16px; }
.menu { position: fixed; z-index: 80; background: #fff; border: 1px solid #ececef; border-radius: 16px; box-shadow: 0 16px 50px rgba(0,0,0,.12); padding: 8px; min-width: 280px; max-width: min(420px, calc(100vw - 16px)); }
.menu.scroll-menu { max-height: 70vh; overflow: auto; }
.menu h3 { margin: 6px 8px; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.menu p { margin: 0 8px 8px; color: #888; font-size: 12px; line-height: 1.45; }
.menu p a, .linkish { color: #3146c8; background: none; border: 0; padding: 0; }
.menu button.row, .menu .row, .src { width: 100%; border: 0; background: transparent; border-radius: 10px; text-align: left; padding: 8px 10px; display: flex; align-items: center; gap: 8px; }
    .menu button.row:hover, .menu .row:hover, .src:hover { background: #f5f5f6; }
.group { color: #8e8e93; font-size: 11px; letter-spacing: .06em; margin: 10px 10px 4px; }
.m-ico, .avatar { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 11px; flex: none; font-weight: 700; overflow: hidden; }
.m-ico img { width: 22px; height: 22px; object-fit: cover; display: block; }
.m-ico svg { display: block; }
.side-toggle { display: none; }
body.side-closed .side-toggle { display: grid; }
.mini-btn { border: 1px solid #ececef; background: #fff; border-radius: 999px; padding: 9px 16px; font-size: 16px; display: inline-flex; align-items: center; gap: 8px; }
.mini-btn svg { width: 20px; height: 20px; }
.top [data-act=share-chat] { width: 40px; height: 40px; display: grid; place-items: center; }
.top [data-act=share-chat] svg { width: 22px; height: 22px; }
.mini-sheet { text-align: center; }
.mini-sheet .qr { width: min(260px, 100%); height: auto; border-radius: 12px; }
.msg-actions .split { width: auto; padding: 0 4px 0 6px; display: inline-flex; align-items: center; }
.msg-actions .caret { margin-left: -1px; }
.share-bar { width: min(820px, calc(100% - 32px)); margin: 0 auto 16px; display: flex; align-items: center; gap: 12px; border: 1px solid #ececef; border-radius: 16px; padding: 12px 14px; background: #fff; }
.share-bar b { display: block; }
.share-bar span { color: #888; font-size: 12px; }
.share-count { margin-left: auto; background: #f4f4f5; border-radius: 999px; padding: 6px 10px; }
.share-bar .primary { width: auto; border-radius: 999px; padding: 8px 14px; display: inline-flex; align-items: center; gap: 6px; }
.share-list { width: min(760px, calc(100% - 32px)); margin: 16px auto 24px; display: flex; flex-direction: column; gap: 14px; }
.share-row { display: flex; gap: 10px; align-items: flex-start; }
.share-user { margin-left: auto; background: #f4f4f5; border-radius: 16px; padding: 10px 14px; max-width: 70%; }
.share-bot { flex: 1; border: 1px solid #ececef; border-radius: 18px; padding: 14px 16px; background: #fff; }
.share-model { display: flex; align-items: center; gap: 8px; font-weight: 650; margin-bottom: 8px; }
.tick { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #d4d4d8; background: #fff; flex: none; margin-top: 8px; }
.tick.on { background: #111; border-color: #111; box-shadow: inset 0 0 0 4px #fff; }
.badge { font-size: 11px; border-radius: 999px; padding: 1px 7px; }
.badge.free { background: #e7f8ee; color: #137a3a; }
.badge.pro { background: #eef2ff; color: #3146c8; }
.badge.max { background: #fff4d6; color: #8a5a00; }
.mult { margin-left: auto; color: #8a8a90; font-size: 12px; }
.switch { width: 32px; height: 18px; border-radius: 999px; background: #e4e4e7; position: relative; flex: none; }
.switch:after { content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%; background: #fff; top: 2px; left: 2px; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.switch.on { background: #111; }
.switch.on:after { left: 16px; }
.menu .source-row { gap: 8px; }
.menu .src-ico { width: 20px; height: 20px; display: grid; place-items: center; flex: none; color: #737373; }
.menu .src-ico svg { display: block; }
.menu .src-name { flex: 1; min-width: 0; font-size: 14px; color: #374151; }
.menu .src-side { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; position: relative; }
.menu .providers { width: 30px; height: 16px; margin: 0; display: flex; align-items: center; justify-content: flex-end; flex: none; }
.menu .providers .p-ico { width: 16px; height: 16px; border-radius: 50%; object-fit: contain; background: #fff; box-shadow: 0 0 0 1px #e5e5e5; margin-left: -2px; flex: none; position: relative; }
.menu .providers .p-ico:first-child { margin-left: 0; }
.menu .src-gear { position: absolute; right: calc(100% + 4px); top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border: 0; background: transparent; color: #a3a3a3; display: grid; place-items: center; padding: 0; border-radius: 6px; }
.menu .src-gear:hover { background: #e5e5e5; color: #525252; }
.menu.sub-menu { min-width: 220px; }
.menu.image-models { min-width: 280px; }
.menu .secs { margin-left: auto; background: #f4f4f5; color: #737373; border-radius: 999px; padding: 2px 8px; font-size: 12px; flex: none; }
.img-mark { width: 22px; height: 22px; border-radius: 50%; background: #1c1c1c; display: grid; place-items: center; flex: none; }
.img-mark.banana { background: transparent; }
.img-mark svg { display: block; }
.menu button.row.on { background: #f5f5f6; }
.pinfo { width: 16px; height: 16px; border-radius: 50%; border: 1px solid #ddd; background: #fff; color: #888; font-size: 11px; }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.28); z-index: 90; display: grid; place-items: center; padding: 24px; }
.sheet { width: min(440px, calc(100% - 32px)); background: #fff; border-radius: 18px; padding: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.16); position: relative; }
.sheet.wide { width: min(720px, calc(100% - 32px)); }
.sheet h2 { margin: 0 0 6px; font-size: 20px; }
.sheet .subhead { color: #666; margin: 0 0 14px; }
.sheet input, .sheet textarea { width: 100%; border: 1px solid #ececef; border-radius: 12px; padding: 10px; margin-bottom: 8px; }
.sheet .hit, .sheet .choice { width: 100%; text-align: left; border: 0; background: transparent; padding: 8px; border-radius: 8px; }
.sheet .hit:hover, .sheet .choice:hover, .ratio.on { background: #f5f5f6; }
.gbtn { width: 100%; border: 1px solid #ececef; background: #fff; border-radius: 12px; padding: 10px; margin-bottom: 8px; }
.primary { width: 100%; border: 0; background: #111; color: #fff; border-radius: 12px; padding: 10px; }
.primary:disabled { background: #dedee3; }
.close-x { position: absolute; right: 12px; top: 12px; border: 0; background: transparent; font-size: 18px; }
.ratios { display: flex; flex-wrap: wrap; gap: 6px; }
.ratio { border: 1px solid #ececef; background: #fff; border-radius: 10px; padding: 8px 10px; }
.new { background: #2f6bff; color: #fff; border-radius: 999px; font-size: 10px; padding: 1px 6px; margin-left: 6px; }
.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }
.filters button, .more { border: 0; background: #f2f2f4; border-radius: 999px; padding: 6px 10px; }
.filters button.on { background: #111; color: #fff; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.shot { position: relative; border: 0; background: #f6f6f7; border-radius: 16px; overflow: hidden; padding: 0; text-align: left; }
.shot img { width: 100%; height: 210px; max-width: none; object-fit: cover; border-radius: 0; display: block; }
.shot .title { position: absolute; left: 12px; right: 12px; bottom: 12px; color: #fff; font-size: 14px; text-shadow: 0 1px 3px rgba(0,0,0,.45); }
.shot .cap { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: 8px; padding: 36px 10px 10px; background: linear-gradient(transparent, rgba(0,0,0,.62)); opacity: 0; }
.shot:hover .cap, .shot:focus-within .cap { opacity: 1; }
.shot:hover .title, .shot:focus-within .title { opacity: 0; }
.shot .cap button, .shot .cap span { background: #fff; color: #111; border: 0; border-radius: 8px; padding: 4px 8px; font-size: 12px; }
.shot.mine .cap { position: static; opacity: 1; background: transparent; padding: 8px 10px 12px; }
.shot.mine img { height: 160px; }
.creating { text-align: center; color: #888; font-size: 13px; margin-bottom: 8px; }
.fine { font-size: 12px; color: #888; }
.shot-wait { height: 210px; display: grid; place-items: center; background: #f6f6f7; color: #888; padding: 12px; text-align: center; }
.item.on { background: #e4e4e7; }
.bubble.bot.md h1, .bubble.bot.md h2, .bubble.bot.md h3, .bubble.bot.md h4 { margin: 1.25em 0 .5em; line-height: 1.35; font-weight: 600; color: #111827; }
.bubble.bot.md h1 { font-size: 1.5em; }
.bubble.bot.md h2 { font-size: 1.3em; }
.bubble.bot.md h3 { font-size: 1.1em; }
.bubble.bot.md h4 { font-size: 1em; }
.bubble.bot.md ul, .bubble.bot.md ol { margin: 1em 0; padding-left: 1.5em; }
.bubble.bot.md li { margin: .45em 0; }
.bubble.bot.md li > ul { margin: .35em 0; }
.bubble.bot.md hr { border: 0; border-top: 1px solid #e6e6ea; margin: 1.25em 0; }
.bubble.bot.md .inline-code, .bubble.bot.md code.inline-code { background: #f5f5f5; border-radius: .3rem; padding: .15em .4em; font-family: "JetBrains Mono", Monaco, Menlo, Consolas, monospace; font-size: .85em; }
.bubble.bot.md a { color: #2563eb; text-underline-offset: 2px; }
.bubble.bot.md blockquote { margin: 1.1em 0; padding: .75em 1em; border-left: 4px solid #e5e7eb; background: #f9fafb; color: #374151; }
.bubble.bot.md .table-scroll { overflow-x: auto; margin: 1.1em 0; }
.bubble.bot.md table { border-collapse: collapse; width: 100%; min-width: 420px; font-size: .92em; }
.bubble.bot.md th, .bubble.bot.md td { border: 1px solid #e5e5e5; padding: .5rem .8rem; text-align: left; vertical-align: top; }
.bubble.bot.md th { background: #f3f4f5; font-weight: 600; }
.bubble.bot.md .code-block { margin: 1.1em 0; border: 1px solid #e5e7eb; border-radius: 12px; background: #fafafa; overflow: hidden; }
.bubble.bot.md .code-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px 0; color: #6b7280; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.bubble.bot.md .code-head button { border: 0; background: transparent; color: #6b7280; border-radius: 8px; padding: 4px 8px; text-transform: none; letter-spacing: 0; }
.bubble.bot.md .code-head button:hover { background: #e5e7eb; }
.bubble.bot.md pre { margin: 0; padding: 12px 14px 14px; overflow: auto; background: transparent; }
.bubble.bot.md pre code { font-family: "JetBrains Mono", Monaco, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.bubble.bot.md .reply-box { width: 100%; min-height: 88px; margin: 8px 0; border: 1px solid #e5e5e5; border-radius: 12px; padding: 10px 12px; resize: vertical; background: #fff; }
.bubble.bot.md .reply-btn { border: 0; background: #111; color: #fff; border-radius: 10px; padding: 8px 14px; margin: 4px 0 10px; }
.know { display: flex; min-height: 70vh; }
.know-list { width: 240px; flex: none; border-right: 1px solid #ececef; padding: 12px; overflow: auto; }
.know-edit { flex: 1; min-width: 0; padding: 16px; }
.know-list input, .know-edit input, .know-edit textarea { width: 100%; border: 1px solid #ececef; border-radius: 12px; padding: 10px; margin: 0 0 8px; font: inherit; background: #fff; }
.know-edit textarea { min-height: 280px; }
.note-on { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.sheet-actions { display: flex; gap: 8px; }
.sheet-actions button { flex: 1; min-width: 0; border: 1px solid #ececef; background: #fff; color: #111; border-radius: 12px; padding: 10px; }
.sheet-actions .primary { width: auto; background: #111; color: #fff; border: 0; }
.sheet-actions .primary:disabled { background: #ececef; color: #a1a1aa; cursor: not-allowed; }
@media (max-width: 800px) {
  html, body, #app { height: 100dvh; }
  body { overflow: hidden; }
  .main { overflow: hidden; }
  .chat-row .more { opacity: 1; }
  .side-toggle, body.side-closed .side-toggle { display: grid; place-items: center; width: 40px; height: 40px; }
  .top {
    height: auto;
    min-height: 52px;
    gap: 6px;
    padding-top: max(8px, env(safe-area-inset-top));
    padding-left: max(8px, env(safe-area-inset-left));
    padding-right: max(8px, env(safe-area-inset-right));
  }
  .mini-btn { width: 40px; height: 40px; padding: 0; justify-content: center; font-size: 0; gap: 0; }
  .mini-btn svg { width: 20px; height: 20px; }
  .top [data-act=share-chat] { width: 40px; height: 40px; }
  .model { max-width: calc(100vw - 148px); min-width: 0; padding-right: 8px; }
  #model-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side {
    position: fixed;
    z-index: 40;
    height: 100dvh;
    width: min(86vw, 320px);
    box-shadow: 8px 0 30px rgba(0,0,0,.12);
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
  body:not(.show-side) .side { display: none; }
  body.show-side::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 35;
  }
  .side .side-upgrade { left: auto; right: 12px; }
  .hello { padding: 12px 12px 8px; }
  .hello h1 { font-size: 24px; margin-bottom: 14px; }
  .pills { max-width: calc(100vw - 24px); flex-wrap: wrap; justify-content: center; }
  .pills button { padding: 8px 10px; }
  body.center-compose .stage { flex: 1 1 auto; margin-top: 0; overflow: auto; }
  body.center-compose #dock { margin-bottom: 0; }
  body.center-compose .hello { flex: none; padding-bottom: 12px; }
  .stage { -webkit-overflow-scrolling: touch; }
  .dock-wrap {
    width: calc(100% - 16px);
    margin-bottom: max(8px, env(safe-area-inset-bottom));
  }
  .below { width: calc(100% - 16px); margin-bottom: 16px; }
  .thread, body.multi-col .thread.tall { width: calc(100% - 16px); padding-left: 0; padding-right: 0; }
  .reply-head { flex-wrap: wrap; }
  .bubble.bot.md { font-size: 15px; }
  .bubble.bot.md .code-block, .bubble.bot.md .table-scroll { max-width: 100%; }
  .card .notice { flex-wrap: wrap; }
  .bar { flex-wrap: nowrap; overflow-x: auto; }
  .bar button.tool { font-size: 0; gap: 0; padding: 8px; flex: none; }
  .bar button.tool svg, .bar button.tool .m-ico { width: 18px; height: 18px; }
  textarea { font-size: 16px; }
  .ghost, .layouts button, .send { min-width: 36px; min-height: 36px; }
  .cols.c2, .cols.c3 { grid-template-columns: 1fr; }
  body.multi-col .col-card, body.multi-col .cols { min-height: 280px; }
  .menu { min-width: 0; width: min(420px, calc(100vw - 16px)); }
  .menu.user-pop { width: min(240px, calc(100vw - 24px)); }
  .sheet { width: calc(100vw - 24px); max-height: calc(100dvh - 32px); overflow: auto; }
  .share-bar, .share-list, .project-note { width: calc(100% - 16px); flex-wrap: wrap; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .shot img { height: 140px; }
  .know { flex-direction: column; min-height: 0; }
  .know-list { width: auto; max-height: 180px; border-right: 0; border-bottom: 1px solid #ececef; }
}
