:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;color:#f4f9ff;background:#12293e;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;--ui-scale: 1;--panel-text: rgba(246, 251, 255, .94);--muted: rgba(222, 237, 249, .68);--line: rgba(220, 242, 255, .22);--line-strong: rgba(226, 247, 255, .42);--deep: rgba(11, 32, 50, .7);--danger: #ffc1ca;--accent: #9ee7ff}*{box-sizing:border-box}html,body,#root{width:100%;min-height:100%;margin:0}body{overflow:hidden;user-select:none}input,textarea,select,button{font:inherit}input,textarea{user-select:text}button{color:inherit}a{color:#d9f5ff;text-decoration:underline;text-underline-offset:3px}.app-root{position:relative;min-height:100dvh;overflow:hidden;isolation:isolate}.bg-layer{position:fixed;inset:0;z-index:0;overflow:hidden;pointer-events:none}.bg-layer video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.bg-mask{position:absolute;inset:0;background:radial-gradient(circle at 22% 18%,rgba(173,221,245,.2),transparent 32%),radial-gradient(circle at 74% 42%,rgba(101,165,207,.16),transparent 36%),#46718f52;backdrop-filter:blur(1.7px) saturate(112%)}.fx{position:absolute;inset:0;z-index:3;width:100%;height:100%;pointer-events:none;mix-blend-mode:screen;opacity:.92}.liquid-surface{position:relative;isolation:isolate;overflow:hidden;border:0;border-radius:var(--glass-radius, 28px);background:transparent;box-shadow:none}.liquid-surface__filter{position:absolute;inset:0 auto auto 0;width:100%;height:100%;pointer-events:none}.liquid-surface__over,.liquid-surface__glass,.liquid-surface__warp,.liquid-surface__edge,.liquid-surface__hover{position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:0}.liquid-surface__glass{display:block;overflow:hidden;background:transparent;box-shadow:none;transition:all .2s ease-in-out}.liquid-surface__over{background:#000;opacity:calc(.16 * var(--glass-over-light, 0));transition:opacity .15s ease-in-out}.liquid-surface__over--blend{opacity:var(--glass-over-light, 0);mix-blend-mode:overlay}.liquid-surface__warp{background:transparent;transform:translateZ(0)}.liquid-surface__edge{padding:1.5px;-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);mask-composite:exclude;box-shadow:0 0 0 .5px #ffffff75 inset,0 1px 3px #ffffff38 inset,0 1px 4px #00000042}.liquid-surface__edge--screen{mix-blend-mode:screen;opacity:.2}.liquid-surface__edge--overlay{mix-blend-mode:overlay;opacity:1}.liquid-surface__hover{opacity:0;background-image:radial-gradient(circle at 50% 0%,#ffffff9e,#fff0 68%);mix-blend-mode:overlay;transition:opacity .24s ease}.liquid-surface__content{display:contents}.liquid-surface__content>*{position:relative;z-index:1}.liquid-surface.is-clickable,.liquid-surface.is-elastic{transition:transform .42s cubic-bezier(.16,1.24,.28,1),border-color .25s,background .25s,box-shadow .25s}.liquid-surface.is-clickable:hover,.liquid-surface.is-elastic:hover{transform:translateY(-2px);border-color:#ebfbff94}.liquid-surface.is-clickable:hover .liquid-surface__hover,.liquid-surface.is-elastic:hover .liquid-surface__hover,.liquid-surface.is-hovered .liquid-surface__hover{opacity:.28}.liquid-surface.is-active .liquid-surface__hover{opacity:.5}.loading-screen,.gate-shell{position:relative;z-index:2;min-height:100dvh;display:grid;place-items:center}.human-card{width:min(620px,calc(100vw - 40px));padding:28px 34px;display:flex;align-items:center;justify-content:space-between;gap:24px;color:#f4f9ff;text-align:left;cursor:pointer;appearance:none;border:0;user-select:none}.human-card:hover .human-spinner{background:#2e5b7a85}.human-card__main{display:flex;align-items:center;gap:18px}.human-card__main strong{display:block;font-size:22px}.human-card__main span{display:block;color:var(--muted);margin-top:5px}.human-spinner{width:56px;height:56px;border-radius:50%;border:2px solid rgba(197,234,255,.36);background:#0f283e61;display:grid;place-items:center;cursor:pointer}.human-spinner svg{display:block}.human-spinner.is-running{border-color:#8edfff2e;border-top-color:#98e9ff;animation:spin 1.2s linear infinite}.human-brand{text-align:right}.human-brand strong{display:block;letter-spacing:.08em}.human-brand span{color:var(--muted);font-size:12px;font-weight:700}@keyframes spin{to{transform:rotate(360deg)}}.downloads-stage{position:relative;z-index:2;min-height:100dvh;display:flex;align-items:flex-start;padding:clamp(42px,5.4vh,72px) 0 0 clamp(42px,5vw,96px);transition:opacity .26s ease,transform .34s cubic-bezier(.18,.86,.28,1),filter .26s ease,visibility .26s ease}.downloads-drag-shell{transform:translate3d(var(--panel-drag-x, 0),var(--panel-drag-y, 0),0);transition:transform .34s cubic-bezier(.18,.86,.28,1);touch-action:none}.downloads-drag-shell.is-dragging{transition:none;cursor:default}.downloads-drag-shell.is-dragging .downloads-panel,.downloads-panel:hover{cursor:default}.downloads-panel{width:min(calc(540px * var(--ui-scale)),calc(100vw - 64px));max-height:calc(100dvh - 78px);overflow:hidden;display:flex;flex-direction:column}.downloads-header{display:grid;grid-template-columns:auto minmax(210px,1fr) auto;align-items:center;gap:14px;padding:24px 28px 8px}.library-chip,.search-box,.category-strip,.tool-card,.download-button,.ai-floating,.copyright,.round-button,.icon-button{border:1px solid rgba(226,244,255,.26);box-shadow:inset 0 1px #ffffff38;background:rgba(255,255,255,calc(var(--glass-card-opacity, .18) * .78));backdrop-filter:blur(14px) saturate(140%)}.library-chip{height:36px;min-width:194px;padding:0 16px;border-radius:999px;display:inline-flex;align-items:center;gap:9px;white-space:nowrap}.library-chip span,.section-title span{width:8px;height:8px;border-radius:50%;background:#b9f1ff;box-shadow:0 0 18px #8be9ff}.search-box{height:42px;border-radius:999px;display:flex;align-items:center;padding:0 12px 0 18px;gap:8px;background:rgba(16,42,64,calc(.2 + var(--glass-card-opacity, .18)))}.search-box input{width:100%;min-width:0;color:#eef9ff;background:transparent;border:0;outline:0;font-weight:800}.search-box input::placeholder{color:#e4f2fcb8}.tool-count{white-space:nowrap;font-size:14px;letter-spacing:.05em;color:#f3faffe0}.downloads-title{padding:2px 28px 18px}.downloads-title h1{margin:0;font-size:clamp(42px,3.1vw,58px);line-height:.95;letter-spacing:0}.downloads-title p{margin:12px 0 0;color:var(--muted);font-size:17px}.category-strip{margin:0 24px 20px;padding:10px;border-radius:22px;display:grid;grid-template-columns:repeat(5,1fr);gap:8px}.category-strip button{position:relative;min-width:0;min-height:58px;border:0;border-radius:16px;color:#ebf7ffb8;background:rgba(15,43,67,calc(var(--glass-card-opacity, .18) * .7));cursor:pointer;transition:transform .32s cubic-bezier(.16,1.24,.28,1),background .25s,color .25s,box-shadow .25s}.category-strip button:hover{transform:translateY(-2px);background:rgba(255,255,255,calc(var(--glass-card-opacity, .18) * .82));color:#fff}.category-strip button.is-active{color:#fff;background:rgba(220,242,255,calc(.18 + var(--glass-card-opacity, .18) * .72));box-shadow:0 12px 30px #96dcff2e,inset 0 1px #ffffff52}.cat-en,.cat-zh{display:block;line-height:1.05;font-weight:900;text-align:center}.cat-en{font-size:13px}.cat-zh{margin-top:3px;font-size:12px;color:#eef8ffc7}.cat-count{position:absolute;top:7px;right:8px;min-width:19px;height:19px;display:grid;place-items:center;border-radius:999px;font-size:11px;font-weight:900;color:#f5fbffdb;background:#c7e4f352}.tool-section{border-top:1px solid rgba(226,244,255,.14);padding:22px 18px 18px;min-height:0;display:flex;flex-direction:column}.section-title{display:flex;align-items:center;gap:10px;margin:0 0 12px 8px;color:#e8f4fcbf;letter-spacing:.08em;font-size:13px}.tool-list{flex:1;min-height:0;overflow:auto;padding:0 4px 4px;display:grid;gap:10px;scrollbar-width:thin;scrollbar-color:rgba(206,237,255,.48) transparent}.tool-card{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center;min-height:86px;padding:13px 14px 13px 18px;border-radius:18px;background:rgba(255,255,255,calc(var(--glass-card-opacity, .18) + .04))}.tool-card h2{margin:0;font-size:18px;line-height:1.1}.tool-card p{margin:6px 0 8px;color:#e4f0f9c2;font-size:13px;line-height:1.25}.tag-row{display:flex;flex-wrap:wrap;gap:5px}.tag-row span{border-radius:999px;padding:3px 8px;background:#0f263b52;color:#f1f9ffc7;font-size:11px;font-weight:800}.download-button{min-width:104px;height:48px;border-radius:16px;display:inline-flex;align-items:center;justify-content:center;gap:7px;font-weight:950;cursor:pointer;transition:transform .28s cubic-bezier(.16,1.24,.28,1),background .25s,box-shadow .25s}.download-button:hover{transform:translateY(-2px) scale(1.02);background:#ebf9ff42;box-shadow:0 10px 28px #95dcff2e,inset 0 1px #ffffff5c}.empty-tools{padding:44px 12px;text-align:center;color:var(--muted)}.ai-floating{position:fixed;z-index:4;right:clamp(230px,18vw,360px);bottom:142px;min-width:160px;height:58px;border-radius:22px;font-weight:950;font-size:18px;cursor:pointer;background:rgba(255,255,255,calc(var(--glass-card-opacity, .18) * .86));transition:transform .36s cubic-bezier(.16,1.24,.28,1),background .25s}.ai-floating:hover{transform:translateY(-4px);background:rgba(235,248,255,calc(.16 + var(--glass-card-opacity, .18) * .78))}.app-root.is-chat-open .downloads-stage,.app-root.is-chat-open .ai-floating,.app-root.is-chat-open .design-mark,.app-root.is-chat-open .copyright{opacity:0;visibility:hidden;pointer-events:none;filter:blur(8px)}.app-root.is-chat-open .downloads-stage{transform:scale(.972)}.design-mark{position:fixed;z-index:1;right:10vw;bottom:88px;display:flex;align-items:center;gap:13px;color:#f0f9ffbf;letter-spacing:.18em}.design-mark span{width:52px;height:1px;background:#ffffff80}.design-mark strong{font-size:28px;letter-spacing:.09em}.copyright{position:fixed;z-index:2;left:50%;bottom:22px;transform:translate(-50%);border-radius:999px;padding:5px 18px;color:#f0f9ffb8;font-size:12px}.modal-backdrop{position:fixed;inset:0;z-index:20;display:grid;place-items:center;padding:22px;background:#06142057;backdrop-filter:blur(9px)}.modal-close{position:absolute;top:16px;right:16px;width:38px;height:38px;border:1px solid rgba(226,244,255,.26);border-radius:14px;background:#ffffff1a;display:grid;place-items:center;cursor:pointer}.download-confirm,.account-modal{width:min(520px,calc(100vw - 36px));padding:34px}.account-modal{display:grid;gap:16px;background:#0a1e30b8}.account-modal .avatar-editor{display:grid;grid-template-columns:78px minmax(0,1fr);align-items:center;gap:16px}.account-modal .auth-actions{margin-top:4px}.confirm-kicker{color:#c8f5ff;font-weight:900;letter-spacing:.12em;font-size:12px}.download-confirm h2,.account-modal h2{margin:10px 0 8px;font-size:32px}.download-confirm p{margin:0 0 24px;color:var(--muted);overflow-wrap:anywhere}.confirm-actions,.auth-actions{display:flex;gap:12px;justify-content:flex-end}.primary-button,.ghost-button,.danger-button,.small-button{min-height:42px;border-radius:14px;border:1px solid rgba(226,244,255,.24);padding:0 18px;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:900;cursor:pointer}.primary-button{background:#d2efff47}.ghost-button{background:#ffffff17}.danger-button{background:#ff687e24;color:#ffd7dd}.small-button{min-height:34px;padding:0 11px}.admin-page .small-button,.admin-page .ghost-button,.admin-page .primary-button{color:#f3fbff;background:#3363849e;border-color:#ddf4ff47}.admin-page .primary-button{background:#72a4c5b8}.admin-page .small-button:hover,.admin-page .ghost-button:hover,.admin-page .primary-button:hover{background:#89b8d3b8}.chat-overlay{position:fixed;inset:0;z-index:12;display:grid;place-items:center;padding:20px;background:#06131f94;backdrop-filter:blur(12px) saturate(118%)}.chat-shell{width:min(clamp(1120px,78vw,1540px),calc(100vw - 88px));height:min(clamp(720px,82dvh,920px),calc(100dvh - 88px));display:grid;grid-template-columns:300px 1fr;overflow:hidden;contain:layout paint;will-change:transform,opacity;transition:grid-template-columns .34s cubic-bezier(.18,.86,.28,1);background:rgba(13,37,57,calc(.46 + var(--glass-panel-opacity, .34) * .64))}.chat-shell.is-sidebar-collapsed{grid-template-columns:0 1fr}.chat-shell.is-sidebar-collapsed .chat-sidebar{transform:translate(-104%);opacity:0;pointer-events:none}.chat-sidebar{min-width:0;padding:28px 20px 24px;display:flex;flex-direction:column;border-right:1px solid rgba(226,244,255,.13);background:rgba(9,31,51,calc(.18 + var(--glass-panel-opacity, .34) * .42));transition:transform .34s cubic-bezier(.18,.86,.28,1),opacity .2s}.sidebar-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:18px;color:#e5f1fab8}.sidebar-actions{display:flex;gap:8px}.icon-button,.delete-chat,.sidebar-restore,.mobile-menu,.chat-close{display:grid;place-items:center;border:1px solid rgba(226,244,255,.22);background:rgba(255,255,255,calc(var(--glass-card-opacity, .18) * .78));cursor:pointer;line-height:0}.icon-button{width:40px;height:40px;border-radius:14px}.session-list{flex:1;min-height:0;overflow:auto;padding-right:4px}.session-row{position:relative;display:grid;grid-template-columns:1fr 42px;gap:8px;align-items:center;margin-bottom:10px}.session-row>button:first-child{min-width:0;height:46px;padding:0 13px;border-radius:14px;border:1px solid rgba(226,244,255,.15);background:rgba(255,255,255,calc(var(--glass-card-opacity, .18) * .56));color:#f2f9ffc7;font-weight:850;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.session-row>button.is-active:first-child{color:#fff;border-color:#97e2ff7a;background:#a6ddfa29}.delete-chat{width:42px;height:42px;border-radius:14px;color:#ffcfd8cc}.delete-popover{position:absolute;z-index:4;right:52px;top:2px;width:184px;border:1px solid rgba(226,244,255,.22);border-radius:16px;background:#122a3ef0;padding:12px;box-shadow:0 14px 28px #030c1638}.delete-popover span{display:block;margin:4px 0 10px;color:var(--muted);font-size:12px}.delete-popover div{display:flex;gap:8px}.delete-popover button{flex:1;border:0;border-radius:10px;height:30px;background:#ffffff14;cursor:pointer}.delete-popover .danger{color:var(--danger);background:#ff708021}.empty-history{color:var(--muted);padding:10px}.account-card{border:1px solid rgba(226,244,255,.22);border-radius:18px;background:rgba(255,255,255,calc(var(--glass-card-opacity, .18) * .74));padding:12px 14px;display:flex;align-items:center;gap:12px;text-align:left;cursor:pointer;min-width:0;overflow:hidden}.avatar{width:46px;height:46px;border-radius:50%;overflow:hidden;display:grid;place-items:center;flex:0 0 auto;background:linear-gradient(145deg,#c1e8ff61,#3a7ba53d);border:1px solid rgba(226,244,255,.26)}.avatar.large{width:78px;height:78px}.avatar img{width:100%;height:100%;object-fit:cover}.account-card>span:last-child{min-width:0}.account-card strong,.masked-phone{display:block}.account-card strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.masked-phone{color:#edf6fcd6;font-weight:850;white-space:nowrap;letter-spacing:.01em}.masked-phone span{display:inline-block;min-width:3.2em;margin:0 2px;padding:0 8px;color:transparent;text-align:center;text-shadow:0 0 10px rgba(238,249,255,.86),0 0 22px rgba(185,226,255,.5);filter:blur(4.5px);transition:color .22s,filter .22s,text-shadow .22s;-webkit-mask-image:linear-gradient(90deg,transparent 0,#000 28%,#000 72%,transparent 100%);mask-image:linear-gradient(90deg,transparent 0,#000 28%,#000 72%,transparent 100%)}.account-card:hover .masked-phone,.account-card:hover .masked-phone span{color:#edf6fce6}.account-card:hover .masked-phone span{filter:none;text-shadow:none;-webkit-mask-image:none;mask-image:none}.sidebar-restore{position:absolute;z-index:3;top:22px;left:22px;width:40px;height:40px;border-radius:14px;opacity:0;pointer-events:none;transition:opacity .2s}.chat-shell.is-sidebar-collapsed .sidebar-restore{opacity:1;pointer-events:auto}.chat-main{position:relative;min-width:0;display:grid;grid-template-rows:84px 1fr auto;overflow:hidden}.chat-header{display:flex;align-items:center;gap:16px;padding:0 34px;border-bottom:1px solid rgba(226,244,255,.12)}.chat-shell.is-sidebar-collapsed .chat-header{padding-left:86px}.chat-header h2{margin:0;font-size:26px;line-height:1.05}.chat-header p{margin:6px 0 0;color:var(--muted)}.chat-close{margin-left:auto;width:52px;height:52px;border-radius:18px}.mobile-menu{display:none;width:48px;height:48px;border-radius:18px}.chat-messages{min-height:0;overflow:auto;padding:34px max(52px,8vw) 188px;scrollbar-width:thin;scrollbar-color:rgba(206,237,255,.48) transparent}.chat-shell.is-sidebar-collapsed .chat-messages{padding-inline:max(40px,4.5vw)}.chat-empty{height:100%;display:grid;place-content:center;text-align:center;color:var(--muted)}.chat-empty h3{margin:0 0 10px;color:#fff;font-size:28px}.chat-empty p{margin:0}.chat-message{display:flex;width:100%;margin:0 auto 26px;max-width:920px}.chat-shell.is-sidebar-collapsed .chat-message{max-width:min(1340px,calc(100% - 24px))}.chat-message.user{justify-content:flex-end}.chat-message.assistant{justify-content:flex-start}.message-bubble{position:relative;max-width:min(760px,86%);border:1px solid rgba(226,244,255,.22);border-radius:18px;padding:17px 20px 17px 18px;background:rgba(218,240,255,calc(.07 + var(--glass-card-opacity, .18) * .56));box-shadow:inset 0 1px #ffffff26;overflow-wrap:anywhere}.chat-shell.is-sidebar-collapsed .message-bubble{max-width:min(1080px,92%)}.chat-message.user .message-bubble{background:rgba(158,216,248,calc(.1 + var(--glass-card-opacity, .18) * .62))}.message-bubble.is-thinking{min-width:150px}.thinking-text{position:relative;display:inline-block;color:#e0f3ffa8;background:linear-gradient(100deg,#e0f3ff94,#c9f6ff 42%,#e0f3ff94 76%);background-size:230% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:textShimmer 2.8s cubic-bezier(.45,0,.25,1) infinite}@keyframes textShimmer{0%{background-position:150% 0}to{background-position:-80% 0}}.message-copy{position:absolute;top:10px;right:-44px;width:34px;height:34px;border-radius:12px;border:1px solid rgba(226,244,255,.18);background:#ffffff14;color:#edf8ffad;display:grid;place-items:center;opacity:0;cursor:pointer;transition:opacity .2s,background .2s;z-index:2}.chat-message.user .message-copy{right:auto;left:-44px}.message-bubble:hover .message-copy{opacity:1}.attachment-stack{display:grid;gap:10px;margin-bottom:10px}.image-attachment{border:0;padding:0;background:transparent;cursor:zoom-in;text-align:left}.image-attachment img{display:block;max-width:250px;max-height:270px;border-radius:14px;object-fit:cover;border:1px solid rgba(226,244,255,.2)}.image-attachment span{display:block;margin-top:5px;color:var(--muted);font-size:12px}.file-attachment{width:min(350px,100%);display:grid;grid-template-columns:44px 1fr;grid-template-areas:"icon name" "icon meta";gap:2px 12px;align-items:center;padding:12px 14px;border-radius:16px;border:1px solid rgba(226,244,255,.2);background:#ffffff1c;text-decoration:none}.file-attachment span{grid-area:icon;width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:#7cc2eb52;font-weight:950}.file-attachment strong{grid-area:name;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.file-attachment small{grid-area:meta;color:var(--muted)}.chat-composer{position:absolute;left:max(52px,8vw);right:max(52px,8vw);bottom:26px;min-height:116px;border:1px solid rgba(226,244,255,.32);border-radius:28px;background:rgba(13,37,57,calc(.58 + var(--glass-panel-opacity, .34) * .48));box-shadow:0 -24px 44px #122d42b8,inset 0 1px #ffffff2e;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;gap:8px 12px;padding:16px 16px 14px 20px;z-index:4;transition:border-color .2s,box-shadow .2s,background .2s}.chat-shell.is-sidebar-collapsed .chat-composer{left:max(40px,4.5vw);right:max(40px,4.5vw)}.chat-composer:focus-within{border-color:#b2ebff8c;box-shadow:0 -24px 44px #122d42bd,0 0 0 1px #b2ebff2e inset}.chat-composer textarea{grid-column:1 / 2;grid-row:2;min-height:54px;max-height:150px;resize:none;border:0;outline:0;color:#eef9ff;background:transparent;line-height:1.45;scrollbar-width:none}.chat-composer textarea::-webkit-scrollbar{display:none}.chat-composer textarea::placeholder{color:#e0eef88c}.composer-actions{grid-column:2;grid-row:2;align-self:end;display:flex;gap:10px}.round-button{width:52px;height:52px;border-radius:18px;display:grid;place-items:center;cursor:pointer}.round-button:disabled{opacity:.45;cursor:default}.round-button.is-stop{background:#b9e2f633;color:#e8fbff}.pending-file{grid-column:1 / -1;display:grid;grid-template-columns:40px minmax(0,1fr) auto;grid-template-areas:"icon name close" "icon meta close";gap:2px 10px;align-items:center;width:min(420px,100%);padding:10px;border:1px solid rgba(226,244,255,.18);border-radius:16px;background:#ffffff17}.pending-file span{grid-area:icon;width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:#8bcef247;font-weight:950}.pending-file strong{grid-area:name;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.pending-file small{grid-area:meta;color:var(--muted)}.pending-file button{grid-area:close;border:0;border-radius:50%;background:#00000059;width:24px;height:24px;display:grid;place-items:center;cursor:pointer}.md{line-height:1.72}.md p{margin:0 0 12px}.md p:last-child{margin-bottom:0}.md h1,.md h2,.md h3{margin:14px 0 8px;line-height:1.25}.md ul,.md ol{margin:8px 0 12px;padding-left:1.35em}.md li{margin:4px 0}.md hr{border:0;border-top:1px solid rgba(226,244,255,.14);margin:16px 0}.md code{border-radius:6px;padding:2px 6px;background:#0a1c2c6b;font-family:ui-monospace,SFMono-Regular,Consolas,monospace}.code-block{position:relative;overflow:visible;border:1px solid rgba(226,244,255,.18);border-radius:14px;background:#07162485;margin:12px 0}.code-head{height:38px;display:flex;align-items:center;justify-content:space-between;padding:0 12px;color:var(--muted);border-bottom:1px solid rgba(226,244,255,.12)}.code-copy{position:relative;width:32px;height:32px;border-radius:10px;border:1px solid rgba(226,244,255,.18);background:#ffffff14;display:grid;place-items:center;cursor:pointer}.code-copy:after{content:"已复制";position:absolute;right:0;bottom:calc(100% + 8px);border-radius:999px;padding:4px 9px;background:#0d2539f0;opacity:0;pointer-events:none;white-space:nowrap}.code-copy.is-copied:after{opacity:1}.code-copy svg,.message-copy svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2}.code-block code{display:block;min-width:100%;overflow:auto;padding:16px;background:transparent;white-space:pre}.auth-panel{width:min(520px,calc(100% - 40px));align-self:center;justify-self:center;display:grid;gap:12px;padding:34px;border:1px solid rgba(226,244,255,.24);border-radius:28px;background:#0d253985}.auth-panel--wide{max-height:calc(100dvh - 130px);overflow:auto}.auth-panel h2{margin:0;font-size:32px}.auth-panel p{margin:0 0 6px;color:var(--muted)}.auth-panel input,.account-modal input,.admin-page input:not([type=radio]):not([type=checkbox]):not([type=range]),.admin-page textarea,.admin-page select{width:100%;min-height:46px;border:1px solid rgba(226,244,255,.18);border-radius:14px;background:#091b2b6b;color:#f3fbff;padding:0 13px;outline:0}.auth-panel textarea,.admin-page textarea{padding-top:10px;resize:vertical}.form-status{color:#ffd7dd;min-height:20px;font-size:13px}.avatar-editor{display:flex;align-items:center;gap:14px}.auth-actions.stacked{display:grid}.image-lightbox{position:relative;max-width:92vw;max-height:88dvh}.image-lightbox img{max-width:100%;max-height:88dvh;border-radius:18px}.image-lightbox button{position:absolute;top:12px;right:12px;width:42px;height:42px;border-radius:14px;border:0;background:#0000007a;display:grid;place-items:center}.drawer-scrim{display:none}.admin-page{position:relative;z-index:2;height:100dvh;padding:42px clamp(24px,4vw,70px);overflow-y:auto;overflow-x:hidden;background:#030d175c}.admin-page .liquid-surface{transform:none!important;transition:none!important}.admin-page .liquid-surface__hover{display:none}.admin-login{position:relative;z-index:2;min-height:100dvh;display:grid;place-items:center;padding:20px}.admin-login-card{width:min(640px,calc(100vw - 40px));padding:34px}.admin-login-card h1{margin:0 0 8px}.admin-login-card p{color:var(--muted);margin:0 0 20px}.human-row,.admin-password{width:100%;min-height:78px;border:1px solid rgba(226,244,255,.22);border-radius:18px;background:#ffffff1a;display:flex;align-items:center;gap:12px;padding:12px 18px}.human-row small{color:var(--muted)}.admin-password input{flex:1;min-height:48px;border-radius:14px;border:1px solid rgba(226,244,255,.2);background:#0818266b;color:#fff;padding:0 14px}.admin-head,.admin-tabs,.admin-head-actions{display:flex;align-items:center;gap:12px}.admin-head{justify-content:space-between;margin-bottom:18px}.admin-head h1{margin:0}.admin-head p{margin:6px 0 0;color:var(--muted)}.admin-tabs{margin-bottom:18px}.admin-tabs button{min-height:42px;border-radius:14px;border:1px solid rgba(226,244,255,.18);background:#ffffff14;color:#eef9ff;display:inline-flex;gap:8px;align-items:center;padding:0 16px;cursor:pointer}.admin-tabs button.is-active{background:#b1e2ff38;border-color:#cef0ff6b}.admin-grid{display:grid;grid-template-columns:minmax(280px,410px) minmax(0,1fr);gap:18px;align-items:start}.admin-card{padding:18px;border-radius:22px;background:#0e233694;border:1px solid rgba(226,244,255,.16)}.admin-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.admin-card h2{margin:0 0 12px}.category-edit-row,.tool-edit-row,.admin-user-row,.account-create{display:grid;gap:8px}.category-edit-row{grid-template-columns:1fr 1fr auto auto;margin-bottom:8px}.category-edit-row button,.admin-category-pills button,.admin-session-pills button{border:1px solid rgba(226,244,255,.16);border-radius:12px;background:#ffffff14;color:#eef9ff}.category-edit-row button.is-active,.admin-category-pills button.is-active,.admin-session-pills button.is-active{background:#b1e2ff38}.danger-mini{color:var(--danger)!important;background:#ff70801c!important}.upload-grid{display:grid;grid-template-columns:1.1fr 1fr .8fr;gap:8px;margin-bottom:20px}.upload-grid textarea,.upload-grid input:nth-of-type(4),.upload-progress{grid-column:1 / -1}.admin-category-pills,.admin-session-pills{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}.admin-category-pills button,.admin-session-pills button{min-height:36px;padding:0 12px;cursor:pointer}.admin-tools-list{display:grid;gap:10px}.tool-edit-row{grid-template-columns:1fr 150px 1.4fr 1fr 1fr;padding:10px;border-radius:16px;background:#ffffff0d}.tool-edit-row textarea{min-height:52px}.accounts-panel{display:grid;gap:12px;max-height:calc(100dvh - 190px);overflow:auto}.account-create{grid-template-columns:1fr 1fr 1fr auto}.account-list{display:grid;gap:8px}.admin-user-row{grid-template-columns:minmax(160px,1fr) minmax(160px,1fr) 150px minmax(180px,1fr) auto auto auto;align-items:center;padding:10px;border-radius:16px;background:#ffffff0d}.admin-user-row.is-disabled{opacity:.55}.admin-chat-view{margin-top:12px;padding:18px}.admin-chat-messages{display:grid;gap:12px}.admin-chat-message{display:grid;grid-template-columns:120px 1fr auto;gap:8px;align-items:start;padding:12px;border-radius:16px;background:#ffffff0d}.admin-chat-message textarea{min-height:90px}.admin-chat-render{grid-column:2 / -1;padding:12px;border-radius:14px;background:#ffffff0a}.glass-lab{display:grid;grid-template-columns:minmax(0,1fr) 390px;gap:18px;align-items:start;min-height:0}.glass-preview{position:relative;min-height:640px;max-height:calc(100dvh - 150px);border-radius:26px;overflow:auto;background:#f7f8fa;color:#111827;display:block}.glass-preview:before,.glass-preview:after{content:"";display:block;width:100%;background-image:url(/assets/bg-video-poster.webp);background-size:cover;background-position:center 38%;filter:saturate(.15) contrast(1.18) brightness(.76)}.glass-preview:before{height:250px}.glass-preview:after{height:300px;margin-top:46px;background-position:center 72%;filter:saturate(.82) contrast(1.08) brightness(.86)}.preview-card{position:absolute;z-index:3;top:112px;left:50%;translate:-50% 0;width:min(460px,72%);padding:36px;color:#fff;text-shadow:0 2px 16px rgba(0,0,0,.42)}.preview-card-native{z-index:4;width:min(460px,72%);padding:34px;color:#fff;text-shadow:0 2px 16px rgba(0,0,0,.42);translate:-50% 0}.preview-card-content{width:100%;color:#fff;text-shadow:0 2px 16px rgba(0,0,0,.42)}.preview-card-content h2{margin:0 0 18px;font-size:26px}.glass-preview-copy{position:relative;z-index:1;padding:154px clamp(34px,7vw,82px) 0;text-align:center;font:500 20px/1.45 system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}.glass-preview-copy h2{margin:0 0 22px;font-size:30px}.glass-preview-copy p{margin:4px 0}.preview-user{display:flex;align-items:center;gap:14px;margin:18px 0}.preview-user span{width:58px;height:58px;border-radius:50%;background:#fff3;display:grid;place-items:center;font-weight:950}.preview-user strong,.preview-user small{display:block}.glass-controls{padding:26px;overflow:auto;max-height:calc(100dvh - 150px)}.glass-warning{margin:12px 0 18px;color:#ffe15a;font-size:13px;line-height:1.35;font-weight:900}.control-range,.control-select,.check-row{display:grid;gap:8px;margin:22px 0;color:#f1f8ffd6}.control-range strong{color:#9feaff;font-size:24px}.control-range small,.control-select+p{color:#f1f8ff85;font-size:12px}.control-range input{accent-color:#97b8ff}.control-select input[type=radio],.check-row input[type=checkbox]{width:16px;height:16px;min-height:0;accent-color:#7fb2ff;flex:0 0 auto}.control-select{border:0;padding:0}.control-select legend{font-weight:900;margin-bottom:8px}.control-select label,.check-row{display:flex;align-items:center;gap:10px}.admin-toast{position:fixed;right:24px;bottom:24px;z-index:30;border-radius:999px;padding:10px 16px;background:#0d2539e0;border:1px solid rgba(226,244,255,.2)}@media(min-width:821px){:root{--ui-scale: clamp(1, min(calc(100vw / 1800), calc(100dvh / 980)), 1.28)}}@media(max-width:820px){body,.app-root{overflow:hidden}.bg-mask{background:#3258746b;backdrop-filter:blur(2.2px) saturate(112%)}.human-card{width:calc(100vw - 28px);padding:18px 20px;gap:14px}.human-card__main{min-width:0}.human-card__main strong{font-size:20px;white-space:nowrap}.human-card__main span{font-size:14px}.human-brand{display:none}.downloads-stage{padding:8px;align-items:stretch;min-height:100dvh}.downloads-drag-shell{transform:none!important;width:100%}.downloads-panel{width:100%;max-height:none;height:calc(100dvh - 16px);border-radius:28px}.downloads-header{grid-template-columns:1fr auto;gap:10px;padding:20px 18px 6px}.library-chip{min-width:0;width:fit-content;max-width:100%;height:34px;grid-column:1 / 2}.tool-count{grid-column:2;grid-row:1;font-size:12px}.search-box{grid-column:1 / -1;grid-row:3;height:46px}.downloads-title{padding:8px 18px 12px}.downloads-title h1{font-size:clamp(40px,14vw,56px)}.downloads-title p{font-size:14px}.category-strip{margin:0 14px 14px;display:flex;overflow-x:auto;gap:8px;padding:8px;scrollbar-width:none}.category-strip::-webkit-scrollbar{display:none}.category-strip button{flex:0 0 104px;min-height:62px}.tool-section{padding:16px 10px 92px;flex:1;min-height:0}.tool-list{gap:9px;padding-bottom:122px}.tool-card{grid-template-columns:1fr;min-height:auto;padding:14px}.tool-card h2{font-size:18px}.download-button{width:100%;height:46px;justify-self:stretch}.ai-floating{right:18px;bottom:22px;min-width:132px;height:54px;border-radius:20px;font-size:16px}.design-mark,.copyright{display:none}.chat-overlay{padding:0;place-items:stretch}.chat-shell{width:100vw;height:100dvh;border-radius:0;grid-template-columns:1fr}.chat-shell.is-sidebar-collapsed{grid-template-columns:1fr}.chat-sidebar{position:absolute;z-index:9;inset:0 auto 0 0;width:min(82vw,330px);transform:translate(-104%);opacity:0;pointer-events:none;border-radius:0 26px 26px 0;background:#0a1f31f0}.chat-shell.is-mobile-drawer-open .chat-sidebar{transform:translate(0);opacity:1;pointer-events:auto}.drawer-scrim{display:block;position:fixed;inset:0;z-index:13;border:0;background:#05101a5c}.chat-shell.is-mobile-drawer-open{z-index:14}.sidebar-restore{display:none}.mobile-menu{display:grid}.chat-main{grid-template-rows:78px 1fr auto}.chat-header{padding:max(8px,env(safe-area-inset-top)) 16px 0;height:78px}.chat-header h2{font-size:25px}.chat-header p{font-size:14px}.chat-close{width:48px;height:48px;border-radius:18px}.chat-messages{padding:22px 14px 156px}.chat-message{max-width:100%;margin-bottom:18px}.message-bubble{max-width:86%;padding:14px 48px 14px 15px}.chat-composer{left:12px;right:12px;bottom:max(10px,env(safe-area-inset-bottom));min-height:82px;border-radius:24px;padding:12px}.chat-composer textarea{min-height:44px;font-size:16px}.round-button{width:48px;height:48px}.auth-panel{width:calc(100vw - 24px);max-height:calc(100dvh - 112px);overflow:auto;padding:24px}.auth-panel input,.account-modal input{min-height:48px}.account-modal{width:calc(100vw - 24px);max-height:calc(100dvh - 32px);overflow:auto;padding:28px}.admin-page{padding:18px 10px}.admin-head{display:grid}.admin-tabs{overflow-x:auto}.admin-grid,.glass-lab,.upload-grid,.tool-edit-row,.admin-user-row,.account-create,.admin-chat-message{grid-template-columns:1fr}.category-edit-row{grid-template-columns:1fr 1fr}.glass-preview{min-height:360px}}


/* admin simple frosted glass: disables heavy liquid layers on /admin */
.app-root.is-admin .liquid-surface__filter,
.app-root.is-admin .liquid-surface__over,
.app-root.is-admin .liquid-surface__glass,
.app-root.is-admin .liquid-surface__warp,
.app-root.is-admin .liquid-surface__edge,
.app-root.is-admin .liquid-surface__hover {
  display: none !important;
}

.app-root.is-admin .liquid-surface {
  isolation: auto !important;
  overflow: visible !important;
  transform: none !important;
  transition: none !important;
  box-shadow: none !important;
  background: transparent !important;
  filter: none !important;
}

.app-root.is-admin .liquid-surface__content {
  display: contents !important;
}

.app-root.is-admin .admin-card,
.app-root.is-admin .admin-login-card,
.app-root.is-admin .admin-chat-view,
.app-root.is-admin .account-modal,
.app-root.is-admin .download-confirm {
  background: rgba(12, 32, 50, .62) !important;
  border: 1px solid rgba(226, 244, 255, .24) !important;
  box-shadow: 0 16px 38px rgba(2, 8, 14, .18), inset 0 1px rgba(255, 255, 255, .16) !important;
  backdrop-filter: blur(14px) saturate(130%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(130%) !important;
  border-radius: 18px !important;
}

.app-root.is-admin button,
.app-root.is-admin .small-button,
.app-root.is-admin .ghost-button,
.app-root.is-admin .primary-button,
.app-root.is-admin .admin-tabs button,
.app-root.is-admin .admin-category-pills button,
.app-root.is-admin .admin-session-pills button {
  background: rgba(232, 246, 255, .18) !important;
  border: 1px solid rgba(226, 244, 255, .28) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .18) !important;
  backdrop-filter: blur(10px) saturate(125%) !important;
  -webkit-backdrop-filter: blur(10px) saturate(125%) !important;
  color: #f3fbff !important;
  border-radius: 12px !important;
  transform: none !important;
  transition: background .15s ease, border-color .15s ease !important;
}

.app-root.is-admin .admin-tabs button.is-active,
.app-root.is-admin .admin-category-pills button.is-active,
.app-root.is-admin .admin-session-pills button.is-active {
  background: rgba(177, 226, 255, .28) !important;
  border-color: rgba(226, 244, 255, .42) !important;
}

.app-root.is-admin .bg-mask {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}


/* solid pale frosted glass, no liquid refraction or dark cast */
.app-root:not(.is-admin) .liquid-surface__filter,
.app-root:not(.is-admin) .liquid-surface__over,
.app-root:not(.is-admin) .liquid-surface__glass,
.app-root:not(.is-admin) .liquid-surface__warp,
.app-root:not(.is-admin) .liquid-surface__edge,
.app-root:not(.is-admin) .liquid-surface__hover {
  display: none !important;
}

.app-root:not(.is-admin) .liquid-surface {
  background: rgba(198, 229, 247, .58) !important;
  border: 1px solid rgba(246, 253, 255, .58) !important;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .36),
    0 14px 36px rgba(75, 140, 184, .10) !important;
  backdrop-filter: blur(16px) saturate(122%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(122%) !important;
}

.app-root:not(.is-admin) .liquid-surface__content {
  display: contents !important;
}

.app-root:not(.is-admin) .downloads-panel,
.app-root:not(.is-admin) .chat-shell,
.app-root:not(.is-admin) .account-modal,
.app-root:not(.is-admin) .download-confirm,
.app-root:not(.is-admin) .auth-panel {
  background: rgba(198, 229, 247, .58) !important;
  border: 1px solid rgba(246, 253, 255, .58) !important;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .36),
    0 18px 46px rgba(75, 140, 184, .12) !important;
  backdrop-filter: blur(16px) saturate(122%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(122%) !important;
}

.app-root:not(.is-admin) .chat-overlay {
  background: rgba(84, 136, 174, .24) !important;
  backdrop-filter: blur(8px) saturate(112%) !important;
  -webkit-backdrop-filter: blur(8px) saturate(112%) !important;
}

.app-root:not(.is-admin) .chat-sidebar,
.app-root:not(.is-admin) .chat-header,
.app-root:not(.is-admin) .chat-main {
  background: transparent !important;
}

.app-root:not(.is-admin) .library-chip,
.app-root:not(.is-admin) .search-box,
.app-root:not(.is-admin) .category-strip,
.app-root:not(.is-admin) .category-strip button,
.app-root:not(.is-admin) .tool-card,
.app-root:not(.is-admin) .download-button,
.app-root:not(.is-admin) .ai-floating,
.app-root:not(.is-admin) .copyright,
.app-root:not(.is-admin) .round-button,
.app-root:not(.is-admin) .icon-button,
.app-root:not(.is-admin) .delete-chat,
.app-root:not(.is-admin) .sidebar-restore,
.app-root:not(.is-admin) .mobile-menu,
.app-root:not(.is-admin) .chat-close,
.app-root:not(.is-admin) .account-card,
.app-root:not(.is-admin) .session-row > button:first-child,
.app-root:not(.is-admin) .message-bubble,
.app-root:not(.is-admin) .chat-composer,
.app-root:not(.is-admin) .pending-file,
.app-root:not(.is-admin) .file-attachment,
.app-root:not(.is-admin) .primary-button,
.app-root:not(.is-admin) .ghost-button,
.app-root:not(.is-admin) .small-button {
  background: rgba(198, 229, 247, .66) !important;
  border: 1px solid rgba(246, 253, 255, .60) !important;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .34),
    0 8px 22px rgba(75, 140, 184, .08) !important;
  backdrop-filter: blur(14px) saturate(120%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(120%) !important;
}

.app-root:not(.is-admin) .chat-composer {
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .36),
    0 -12px 28px rgba(75, 140, 184, .10) !important;
}

.app-root:not(.is-admin) .search-box,
.app-root:not(.is-admin) .chat-composer,
.app-root:not(.is-admin) .auth-panel input,
.app-root:not(.is-admin) .account-modal input {
  background: rgba(198, 229, 247, .62) !important;
}

.app-root:not(.is-admin) .tag-row span {
  background: rgba(116, 170, 205, .38) !important;
}

.app-root:not(.is-admin) .chat-message.user .message-bubble {
  background: rgba(187, 224, 246, .72) !important;
}

.app-root:not(.is-admin) .modal-backdrop {
  background: rgba(73, 120, 157, .28) !important;
  backdrop-filter: blur(8px) saturate(112%) !important;
  -webkit-backdrop-filter: blur(8px) saturate(112%) !important;
}

.app-root:not(.is-admin) .chat-composer textarea {
  color: #f7fcff !important;
}

.app-root:not(.is-admin) .chat-composer textarea::placeholder {
  color: rgba(247, 252, 255, .72) !important;
}

.app-root:not(.is-admin) button:focus,
.app-root:not(.is-admin) button:active {
  outline: none !important;
}


/* solid frost tuning: slightly darker and soft elastic interactions */
.app-root:not(.is-admin) .liquid-surface,
.app-root:not(.is-admin) .downloads-panel,
.app-root:not(.is-admin) .chat-shell,
.app-root:not(.is-admin) .account-modal,
.app-root:not(.is-admin) .download-confirm,
.app-root:not(.is-admin) .auth-panel {
  background: rgba(165, 205, 230, .54) !important;
  border-color: rgba(235, 249, 255, .52) !important;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .28),
    0 18px 44px rgba(45, 100, 145, .14) !important;
}

.app-root:not(.is-admin) .library-chip,
.app-root:not(.is-admin) .search-box,
.app-root:not(.is-admin) .category-strip,
.app-root:not(.is-admin) .category-strip button,
.app-root:not(.is-admin) .tool-card,
.app-root:not(.is-admin) .download-button,
.app-root:not(.is-admin) .ai-floating,
.app-root:not(.is-admin) .copyright,
.app-root:not(.is-admin) .round-button,
.app-root:not(.is-admin) .icon-button,
.app-root:not(.is-admin) .delete-chat,
.app-root:not(.is-admin) .sidebar-restore,
.app-root:not(.is-admin) .mobile-menu,
.app-root:not(.is-admin) .chat-close,
.app-root:not(.is-admin) .account-card,
.app-root:not(.is-admin) .session-row > button:first-child,
.app-root:not(.is-admin) .message-bubble,
.app-root:not(.is-admin) .chat-composer,
.app-root:not(.is-admin) .pending-file,
.app-root:not(.is-admin) .file-attachment,
.app-root:not(.is-admin) .primary-button,
.app-root:not(.is-admin) .ghost-button,
.app-root:not(.is-admin) .small-button {
  background: rgba(164, 204, 229, .62) !important;
  border-color: rgba(238, 250, 255, .54) !important;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .28),
    0 8px 22px rgba(43, 96, 138, .10) !important;
  transition:
    transform .42s cubic-bezier(.18, 1.38, .28, 1),
    background-color .24s ease,
    border-color .24s ease,
    box-shadow .34s ease,
    filter .24s ease !important;
  will-change: transform;
}

.app-root:not(.is-admin) .search-box,
.app-root:not(.is-admin) .chat-composer,
.app-root:not(.is-admin) .auth-panel input,
.app-root:not(.is-admin) .account-modal input {
  background: rgba(151, 193, 222, .56) !important;
}

.app-root:not(.is-admin) .downloads-panel:hover,
.app-root:not(.is-admin) .chat-shell:hover,
.app-root:not(.is-admin) .account-modal:hover,
.app-root:not(.is-admin) .download-confirm:hover {
  transform: translateY(-1px) scale(1.002) !important;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .32),
    0 22px 52px rgba(43, 96, 138, .16) !important;
}

.app-root:not(.is-admin) .library-chip:hover,
.app-root:not(.is-admin) .search-box:hover,
.app-root:not(.is-admin) .category-strip button:hover,
.app-root:not(.is-admin) .tool-card:hover,
.app-root:not(.is-admin) .download-button:hover,
.app-root:not(.is-admin) .ai-floating:hover,
.app-root:not(.is-admin) .round-button:hover,
.app-root:not(.is-admin) .icon-button:hover,
.app-root:not(.is-admin) .chat-close:hover,
.app-root:not(.is-admin) .account-card:hover,
.app-root:not(.is-admin) .session-row > button:first-child:hover,
.app-root:not(.is-admin) .primary-button:hover,
.app-root:not(.is-admin) .ghost-button:hover {
  transform: translateY(-2px) scale(1.018) !important;
  background: rgba(183, 220, 240, .70) !important;
  border-color: rgba(250, 254, 255, .68) !important;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .38),
    0 12px 28px rgba(43, 96, 138, .16) !important;
  filter: brightness(1.035);
}

.app-root:not(.is-admin) .tool-card:hover {
  transform: translateY(-3px) scale(1.006) !important;
}

.app-root:not(.is-admin) .category-strip button.is-active {
  background: rgba(185, 222, 242, .76) !important;
  border-color: rgba(250, 254, 255, .72) !important;
}

.app-root:not(.is-admin) .category-strip button:active,
.app-root:not(.is-admin) .download-button:active,
.app-root:not(.is-admin) .ai-floating:active,
.app-root:not(.is-admin) .round-button:active,
.app-root:not(.is-admin) .icon-button:active,
.app-root:not(.is-admin) .chat-close:active,
.app-root:not(.is-admin) .account-card:active,
.app-root:not(.is-admin) .session-row > button:first-child:active,
.app-root:not(.is-admin) .primary-button:active,
.app-root:not(.is-admin) .ghost-button:active {
  transform: translateY(1px) scale(.972) !important;
  background: rgba(144, 188, 218, .66) !important;
  box-shadow:
    inset 0 2px 6px rgba(50, 105, 145, .16),
    0 5px 14px rgba(43, 96, 138, .08) !important;
  transition-duration: .12s !important;
}

.app-root:not(.is-admin) .tool-card:active {
  transform: translateY(0) scale(.992) !important;
}

.app-root:not(.is-admin) .chat-composer:focus-within,
.app-root:not(.is-admin) .search-box:focus-within {
  transform: translateY(-1px) scale(1.004) !important;
  background: rgba(178, 217, 239, .70) !important;
  border-color: rgba(250, 254, 255, .76) !important;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .40),
    0 0 0 1px rgba(222, 246, 255, .28),
    0 14px 32px rgba(43, 96, 138, .15) !important;
}

.app-root:not(.is-admin) .tag-row span {
  background: rgba(86, 139, 178, .38) !important;
}

@media (prefers-reduced-motion: reduce) {
  .app-root:not(.is-admin) * {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}


/* chat polish: hide messages under composer and show drag upload hint */
.app-root:not(.is-admin) .chat-main::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 178px;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(165, 205, 230, 0) 0%,
    rgba(165, 205, 230, .72) 28%,
    rgba(165, 205, 230, .92) 100%
  );
  backdrop-filter: blur(7px) saturate(112%);
  -webkit-backdrop-filter: blur(7px) saturate(112%);
}

.app-root:not(.is-admin) .chat-composer {
  z-index: 5 !important;
  overflow: hidden;
}

.app-root:not(.is-admin) .chat-composer::before {
  content: "松开即可上传文件";
  position: absolute;
  inset: 10px;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(250, 254, 255, .78);
  border-radius: 22px;
  background: rgba(186, 224, 245, .82);
  color: #f8fdff;
  font-weight: 950;
  letter-spacing: .04em;
  opacity: 0;
  transform: scale(.985);
  pointer-events: none;
  transition: opacity .18s ease, transform .28s cubic-bezier(.18, 1.28, .28, 1);
}

.app-root:not(.is-admin) .chat-composer.is-dragging-file::before {
  opacity: 1;
  transform: scale(1);
}

.app-root:not(.is-admin) .chat-composer.is-dragging-file {
  border-color: rgba(250, 254, 255, .86) !important;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .42),
    0 0 0 1px rgba(239, 252, 255, .34),
    0 14px 34px rgba(43, 96, 138, .18) !important;
}

@media (max-width: 820px) {
  .app-root:not(.is-admin) .chat-main::after {
    height: 134px;
  }
}


/* density and tone pass: darker, clearer, more compact home cards */
.app-root:not(.is-admin) .liquid-surface,
.app-root:not(.is-admin) .downloads-panel,
.app-root:not(.is-admin) .chat-shell,
.app-root:not(.is-admin) .account-modal,
.app-root:not(.is-admin) .download-confirm,
.app-root:not(.is-admin) .auth-panel {
  background: rgba(112, 169, 205, .44) !important;
  border-color: rgba(232, 249, 255, .44) !important;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .22),
    0 18px 46px rgba(35, 86, 126, .16) !important;
  backdrop-filter: blur(17px) saturate(118%) !important;
  -webkit-backdrop-filter: blur(17px) saturate(118%) !important;
}

.app-root:not(.is-admin) .library-chip,
.app-root:not(.is-admin) .search-box,
.app-root:not(.is-admin) .category-strip,
.app-root:not(.is-admin) .category-strip button,
.app-root:not(.is-admin) .tool-card,
.app-root:not(.is-admin) .download-button,
.app-root:not(.is-admin) .ai-floating,
.app-root:not(.is-admin) .copyright,
.app-root:not(.is-admin) .round-button,
.app-root:not(.is-admin) .icon-button,
.app-root:not(.is-admin) .delete-chat,
.app-root:not(.is-admin) .sidebar-restore,
.app-root:not(.is-admin) .mobile-menu,
.app-root:not(.is-admin) .chat-close,
.app-root:not(.is-admin) .account-card,
.app-root:not(.is-admin) .session-row > button:first-child,
.app-root:not(.is-admin) .message-bubble,
.app-root:not(.is-admin) .chat-composer,
.app-root:not(.is-admin) .pending-file,
.app-root:not(.is-admin) .file-attachment,
.app-root:not(.is-admin) .primary-button,
.app-root:not(.is-admin) .ghost-button,
.app-root:not(.is-admin) .small-button {
  background: rgba(113, 171, 208, .50) !important;
  border-color: rgba(234, 250, 255, .48) !important;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .24),
    0 8px 22px rgba(35, 86, 126, .12) !important;
}

.app-root:not(.is-admin) .downloads-panel {
  width: min(calc(500px * var(--ui-scale)), calc(100vw - 64px)) !important;
}

.app-root:not(.is-admin) .downloads-header {
  padding: 18px 22px 6px !important;
  gap: 10px !important;
  grid-template-columns: auto minmax(190px, 1fr) auto !important;
}

.app-root:not(.is-admin) .library-chip {
  height: 32px !important;
  min-width: 172px !important;
  padding: 0 14px !important;
}

.app-root:not(.is-admin) .search-box {
  height: 38px !important;
}

.app-root:not(.is-admin) .downloads-title {
  padding: 0 22px 14px !important;
}

.app-root:not(.is-admin) .downloads-title h1 {
  font-size: clamp(38px, 2.7vw, 52px) !important;
}

.app-root:not(.is-admin) .downloads-title p {
  margin-top: 8px !important;
  font-size: 15px !important;
}

.app-root:not(.is-admin) .category-strip {
  margin: 0 20px 14px !important;
  padding: 8px !important;
  border-radius: 18px !important;
  gap: 7px !important;
}

.app-root:not(.is-admin) .category-strip button {
  min-height: 48px !important;
  border-radius: 14px !important;
}

.app-root:not(.is-admin) .cat-en {
  font-size: 12px !important;
}

.app-root:not(.is-admin) .cat-zh {
  margin-top: 2px !important;
  font-size: 11px !important;
}

.app-root:not(.is-admin) .cat-count {
  top: 5px !important;
  right: 6px !important;
  min-width: 18px !important;
  height: 18px !important;
  font-size: 10px !important;
}

.app-root:not(.is-admin) .tool-section {
  padding: 16px 14px 14px !important;
}

.app-root:not(.is-admin) .section-title {
  margin: 0 0 9px 6px !important;
  font-size: 12px !important;
}

.app-root:not(.is-admin) .tool-list {
  gap: 8px !important;
}

.app-root:not(.is-admin) .tool-card {
  min-height: 72px !important;
  padding: 10px 12px 10px 14px !important;
  border-radius: 16px !important;
  gap: 10px !important;
}

.app-root:not(.is-admin) .tool-card h2 {
  font-size: 16px !important;
}

.app-root:not(.is-admin) .tool-card p {
  margin: 4px 0 6px !important;
  font-size: 12px !important;
}

.app-root:not(.is-admin) .tag-row {
  gap: 4px !important;
}

.app-root:not(.is-admin) .tag-row span {
  padding: 2px 7px !important;
  font-size: 10px !important;
  background: rgba(62, 121, 164, .42) !important;
}

.app-root:not(.is-admin) .download-button {
  min-width: 88px !important;
  height: 42px !important;
  border-radius: 14px !important;
}

.app-root:not(.is-admin) .tool-count {
  font-size: 13px !important;
}

.app-root:not(.is-admin) .chat-main::after {
  background: linear-gradient(
    180deg,
    rgba(112, 169, 205, 0) 0%,
    rgba(112, 169, 205, .70) 30%,
    rgba(112, 169, 205, .88) 100%
  ) !important;
}

@media (max-width: 820px) {
  .app-root:not(.is-admin) .downloads-panel {
    width: 100% !important;
  }

  .app-root:not(.is-admin) .downloads-header {
    padding: 16px 16px 6px !important;
  }

  .app-root:not(.is-admin) .category-strip button {
    flex-basis: 94px !important;
    min-height: 54px !important;
  }

  .app-root:not(.is-admin) .tool-card {
    min-height: 0 !important;
  }
}


/* transparency, unclipped elastic cards, and hard composer boundary */
.app-root:not(.is-admin) .liquid-surface,
.app-root:not(.is-admin) .downloads-panel,
.app-root:not(.is-admin) .chat-shell,
.app-root:not(.is-admin) .account-modal,
.app-root:not(.is-admin) .download-confirm,
.app-root:not(.is-admin) .auth-panel {
  background: rgba(92, 154, 196, .34) !important;
  border-color: rgba(232, 249, 255, .42) !important;
}

.app-root:not(.is-admin) .library-chip,
.app-root:not(.is-admin) .search-box,
.app-root:not(.is-admin) .category-strip,
.app-root:not(.is-admin) .category-strip button,
.app-root:not(.is-admin) .tool-card,
.app-root:not(.is-admin) .download-button,
.app-root:not(.is-admin) .ai-floating,
.app-root:not(.is-admin) .copyright,
.app-root:not(.is-admin) .round-button,
.app-root:not(.is-admin) .icon-button,
.app-root:not(.is-admin) .delete-chat,
.app-root:not(.is-admin) .sidebar-restore,
.app-root:not(.is-admin) .mobile-menu,
.app-root:not(.is-admin) .chat-close,
.app-root:not(.is-admin) .account-card,
.app-root:not(.is-admin) .session-row > button:first-child,
.app-root:not(.is-admin) .message-bubble,
.app-root:not(.is-admin) .chat-composer,
.app-root:not(.is-admin) .pending-file,
.app-root:not(.is-admin) .file-attachment,
.app-root:not(.is-admin) .primary-button,
.app-root:not(.is-admin) .ghost-button,
.app-root:not(.is-admin) .small-button {
  background: rgba(96, 158, 199, .38) !important;
  border-color: rgba(234, 250, 255, .44) !important;
}

.app-root:not(.is-admin) .downloads-panel {
  overflow: visible !important;
}

.app-root:not(.is-admin) .tool-section {
  overflow: visible !important;
}

.app-root:not(.is-admin) .tool-list {
  padding: 5px 8px 10px !important;
  margin: -5px -6px -8px !important;
  overflow-y: auto !important;
  overflow-x: visible !important;
  clip-path: inset(-14px -18px -14px -18px);
}

.app-root:not(.is-admin) .tool-card,
.app-root:not(.is-admin) .category-strip button,
.app-root:not(.is-admin) .download-button,
.app-root:not(.is-admin) .ai-floating {
  transform-origin: center center;
}

.app-root:not(.is-admin) .category-strip {
  overflow: visible !important;
}

.app-root:not(.is-admin) .chat-main {
  overflow: hidden !important;
}

.app-root:not(.is-admin) .chat-main::after {
  display: none !important;
}

.app-root:not(.is-admin) .chat-messages {
  padding-bottom: 176px !important;
  clip-path: inset(0 0 176px 0);
  overflow-y: auto !important;
}

.app-root:not(.is-admin) .chat-composer {
  border-top-color: rgba(248, 253, 255, .68) !important;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .36),
    0 -1px 0 rgba(248, 253, 255, .34),
    0 10px 26px rgba(35, 86, 126, .10) !important;
}

@media (max-width: 820px) {
  .app-root:not(.is-admin) .downloads-panel {
    overflow: hidden !important;
  }

  .app-root:not(.is-admin) .tool-list {
    clip-path: none;
    overflow-x: hidden !important;
  }

  .app-root:not(.is-admin) .chat-messages {
    padding-bottom: 132px !important;
    clip-path: inset(0 0 132px 0);
  }
}


/* smoother chat history collapse and restore */
.app-root:not(.is-admin) .chat-shell {
  --sidebar-w: 300px;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) !important;
  transition:
    grid-template-columns .46s cubic-bezier(.18, .9, .22, 1),
    transform .34s cubic-bezier(.18, .9, .22, 1),
    box-shadow .28s ease !important;
}

.app-root:not(.is-admin) .chat-shell.is-sidebar-collapsed {
  --sidebar-w: 0px;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) !important;
}

.app-root:not(.is-admin) .chat-sidebar {
  overflow: hidden;
  transform: translateX(0) scale(1);
  opacity: 1;
  filter: blur(0);
  transition:
    transform .46s cubic-bezier(.18, .9, .22, 1),
    opacity .26s ease,
    filter .28s ease,
    padding .46s cubic-bezier(.18, .9, .22, 1) !important;
}

.app-root:not(.is-admin) .chat-shell.is-sidebar-collapsed .chat-sidebar {
  transform: translateX(-18px) scale(.985) !important;
  opacity: 0 !important;
  filter: blur(3px);
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.app-root:not(.is-admin) .chat-main,
.app-root:not(.is-admin) .chat-header,
.app-root:not(.is-admin) .chat-messages,
.app-root:not(.is-admin) .chat-composer {
  transition:
    padding .46s cubic-bezier(.18, .9, .22, 1),
    left .46s cubic-bezier(.18, .9, .22, 1),
    right .46s cubic-bezier(.18, .9, .22, 1),
    transform .34s cubic-bezier(.18, .9, .22, 1),
    opacity .24s ease !important;
}

.app-root:not(.is-admin) .sidebar-restore {
  transform: translateX(-8px) scale(.92);
  opacity: 0;
  transition:
    transform .38s cubic-bezier(.18, 1.28, .28, 1),
    opacity .22s ease,
    background-color .22s ease,
    box-shadow .28s ease !important;
}

.app-root:not(.is-admin) .chat-shell.is-sidebar-collapsed .sidebar-restore {
  transform: translateX(0) scale(1);
  opacity: 1;
}

@media (max-width: 820px) {
  .app-root:not(.is-admin) .chat-shell,
  .app-root:not(.is-admin) .chat-shell.is-sidebar-collapsed {
    --sidebar-w: 1fr;
    grid-template-columns: 1fr !important;
  }

  .app-root:not(.is-admin) .chat-shell.is-sidebar-collapsed .chat-sidebar {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-root:not(.is-admin) .chat-shell,
  .app-root:not(.is-admin) .chat-sidebar,
  .app-root:not(.is-admin) .sidebar-restore {
    transition-duration: .01ms !important;
  }
}

/* human verification icon centering */
.app-root:not(.is-admin) .human-card__main {
  align-items: center !important;
}

.app-root:not(.is-admin) .human-spinner {
  position: relative !important;
  flex: 0 0 56px !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  line-height: 0 !important;
}

.app-root:not(.is-admin) .human-spinner svg {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  width: 24px !important;
  height: 24px !important;
  margin: 0 !important;
  transform: translate(-50%, -50%) !important;
}


/* final UI pass: darker tone, smoother chat, admin density, readonly chat records */
.app-root:not(.is-admin) .liquid-surface,
.app-root:not(.is-admin) .downloads-panel,
.app-root:not(.is-admin) .chat-shell,
.app-root:not(.is-admin) .account-modal,
.app-root:not(.is-admin) .download-confirm,
.app-root:not(.is-admin) .auth-panel {
  background: rgba(72, 134, 178, .38) !important;
  border-color: rgba(224, 246, 255, .40) !important;
}

.app-root:not(.is-admin) .library-chip,
.app-root:not(.is-admin) .search-box,
.app-root:not(.is-admin) .category-strip,
.app-root:not(.is-admin) .category-strip button,
.app-root:not(.is-admin) .tool-card,
.app-root:not(.is-admin) .download-button,
.app-root:not(.is-admin) .ai-floating,
.app-root:not(.is-admin) .copyright,
.app-root:not(.is-admin) .round-button,
.app-root:not(.is-admin) .icon-button,
.app-root:not(.is-admin) .delete-chat,
.app-root:not(.is-admin) .sidebar-restore,
.app-root:not(.is-admin) .mobile-menu,
.app-root:not(.is-admin) .chat-close,
.app-root:not(.is-admin) .account-card,
.app-root:not(.is-admin) .session-row > button:first-child,
.app-root:not(.is-admin) .message-bubble,
.app-root:not(.is-admin) .chat-composer,
.app-root:not(.is-admin) .pending-file,
.app-root:not(.is-admin) .file-attachment,
.app-root:not(.is-admin) .primary-button,
.app-root:not(.is-admin) .ghost-button,
.app-root:not(.is-admin) .small-button {
  background: rgba(76, 139, 183, .42) !important;
  border-color: rgba(226, 247, 255, .42) !important;
}

.app-root:not(.is-admin) .chat-message.user .message-bubble,
.app-root:not(.is-admin) .chat-message.assistant .message-bubble {
  background: rgba(76, 139, 183, .42) !important;
  border-color: rgba(226, 247, 255, .42) !important;
}

.app-root:not(.is-admin) .chat-message {
  transition:
    max-width .46s cubic-bezier(.18, .9, .22, 1),
    transform .42s cubic-bezier(.18, 1.24, .28, 1),
    opacity .22s ease !important;
}

.app-root:not(.is-admin) .message-bubble {
  transition:
    max-width .46s cubic-bezier(.18, .9, .22, 1),
    transform .32s cubic-bezier(.18, 1.24, .28, 1),
    background-color .22s ease,
    border-color .22s ease !important;
}

.app-root:not(.is-admin) .message-bubble:hover {
  transform: translateY(-1px) scale(1.006);
}

.app-root:not(.is-admin) .chat-composer {
  transition:
    left .48s cubic-bezier(.18, .9, .22, 1),
    right .48s cubic-bezier(.18, .9, .22, 1),
    width .48s cubic-bezier(.18, .9, .22, 1),
    transform .34s cubic-bezier(.18, 1.2, .28, 1),
    background-color .22s ease,
    border-color .22s ease,
    box-shadow .26s ease !important;
}

.app-root:not(.is-admin) .message-copy,
.app-root:not(.is-admin) .code-copy {
  position: absolute;
  overflow: visible;
}

.app-root:not(.is-admin) .message-copy {
  z-index: 12;
}

.app-root:not(.is-admin) .message-copy::after,
.app-root:not(.is-admin) .code-copy::after {
  content: "\5df2\590d\5236";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(6px) scale(.94);
  min-width: 54px;
  padding: 5px 10px;
  border: 1px solid rgba(236, 249, 255, .48);
  border-radius: 999px;
  background: rgba(102, 169, 211, .9);
  color: #f8fdff;
  box-shadow: 0 10px 26px rgba(38, 91, 126, .26), inset 0 1px rgba(255, 255, 255, .38);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .22s cubic-bezier(.18, 1.25, .28, 1);
}

.app-root:not(.is-admin) .message-copy.is-copied::after,
.app-root:not(.is-admin) .code-copy.is-copied::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.app-root:not(.is-admin) .chat-main::after {
  display: none !important;
}

.app-root:not(.is-admin) .chat-messages {
  padding-bottom: 166px !important;
  clip-path: inset(0 0 166px 0);
}

.app-root:not(.is-admin) .chat-composer {
  border-top: 1px solid rgba(244, 252, 255, .62) !important;
}

.app-root:not(.is-admin) .account-modal {
  width: min(620px, calc(100vw - 36px)) !important;
  padding: 30px !important;
}

.app-root:not(.is-admin) .account-modal h2 {
  margin: 0 0 18px !important;
}

.app-root:not(.is-admin) .account-modal .avatar-editor {
  grid-template-columns: 92px minmax(0, 1fr) !important;
  gap: 18px !important;
  margin-bottom: 8px;
}

.app-root:not(.is-admin) .account-modal .avatar.large {
  width: 82px !important;
  height: 82px !important;
}

.app-root:not(.is-admin) .account-modal input {
  min-height: 54px !important;
}

.app-root:not(.is-admin) .account-modal .auth-actions.stacked {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.app-root:not(.is-admin) .account-modal .danger-button {
  grid-column: 1 / -1;
}

/* admin uses the same compact frosted visual language */
.app-root.is-admin .admin-page {
  background: rgba(38, 85, 120, .34) !important;
}

.app-root.is-admin .admin-card,
.app-root.is-admin .admin-login-card,
.app-root.is-admin .admin-chat-view,
.app-root.is-admin .accounts-panel {
  background: rgba(58, 112, 150, .44) !important;
  border: 1px solid rgba(226, 247, 255, .38) !important;
  box-shadow: inset 0 1px rgba(255,255,255,.20), 0 12px 30px rgba(28,72,105,.14) !important;
  backdrop-filter: blur(15px) saturate(116%) !important;
  -webkit-backdrop-filter: blur(15px) saturate(116%) !important;
  border-radius: 16px !important;
}

.app-root.is-admin .admin-page input:not([type=radio]):not([type=checkbox]):not([type=range]),
.app-root.is-admin .admin-page textarea,
.app-root.is-admin .admin-page select,
.app-root.is-admin .admin-page button {
  background: rgba(45, 96, 132, .48) !important;
  border: 1px solid rgba(226, 247, 255, .34) !important;
  border-radius: 12px !important;
  min-height: 38px !important;
}

.app-root.is-admin .admin-grid {
  grid-template-columns: 460px minmax(0, 1fr) !important;
  gap: 14px !important;
}

.app-root.is-admin .admin-card {
  padding: 14px !important;
}

.app-root.is-admin .category-edit-row {
  grid-template-columns: 1fr 1fr 54px 48px !important;
  gap: 7px !important;
}

.app-root.is-admin .upload-grid {
  grid-template-columns: 1fr 1fr 210px !important;
  gap: 8px !important;
}

.app-root.is-admin .tool-edit-row {
  grid-template-columns: 1.1fr 160px 1.6fr 1.2fr 1.2fr 58px !important;
  gap: 8px !important;
  padding: 8px !important;
  border-radius: 14px !important;
  background: rgba(58, 112, 150, .32) !important;
}

.app-root.is-admin .admin-chat-message {
  display: block !important;
  padding: 12px 14px !important;
  border: 1px solid rgba(226, 247, 255, .30);
  border-radius: 16px;
  background: rgba(76, 139, 183, .34) !important;
}

.app-root.is-admin .admin-chat-message select,
.app-root.is-admin .admin-chat-message textarea,
.app-root.is-admin .admin-chat-message .small-button {
  display: none !important;
}

.app-root.is-admin .admin-chat-message.user {
  margin-left: auto;
  max-width: 76%;
}

.app-root.is-admin .admin-chat-message.assistant {
  margin-right: auto;
  max-width: 76%;
}

.app-root.is-admin .admin-chat-render {
  grid-column: auto !important;
  padding: 0 !important;
  background: transparent !important;
}

@media (max-width: 820px) {
  .app-root:not(.is-admin) .chat-messages {
    padding-bottom: 126px !important;
    clip-path: inset(0 0 126px 0);
  }

  .app-root:not(.is-admin) .account-modal .auth-actions.stacked {
    grid-template-columns: 1fr;
  }
}


/* stream text motion: visual-only, does not affect streaming transport */
.app-root:not(.is-admin) .message-text {
  transform-origin: left top;
  will-change: opacity, transform;
  transition: opacity .16s ease, transform .16s ease;
}

.app-root:not(.is-admin) .message-text.is-stream-update {
  animation: streamTextPulse .22s ease-out both;
}

.app-root:not(.is-admin) .chat-message.user .message-text {
  transform-origin: right top;
}

@keyframes messageEnter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.988);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes streamTextPulse {
  0% {
    opacity: .86;
    transform: translateY(1px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-root:not(.is-admin) .message-text.is-stream-update {
    animation: none !important;
  }
}

/* Long chat bubbles should feel responsive without visibly growing. */
.app-root:not(.is-admin) .message-bubble:hover {
  transform: translateY(-1px) scale(1.002) !important;
}

.app-root:not(.is-admin) .message-bubble:has(.code-block):hover,
.app-root:not(.is-admin) .message-bubble:has(pre):hover,
.app-root:not(.is-admin) .message-bubble:has(ul):hover,
.app-root:not(.is-admin) .message-bubble:has(ol):hover {
  transform: translateY(-1px) scale(1) !important;
}

.app-root:not(.is-admin) .message-bubble:active {
  transform: translateY(0) scale(.998) !important;
}

/* Final polish: dim the whole glass system slightly without hurting text contrast. */
.app-root:not(.is-admin) .bg-mask {
  background:
    linear-gradient(rgba(28, 80, 121, .16), rgba(28, 80, 121, .16)),
    radial-gradient(circle at 22% 18%, rgba(120, 185, 222, .12), transparent 32%),
    radial-gradient(circle at 74% 42%, rgba(70, 132, 178, .12), transparent 36%),
    rgba(36, 91, 134, .48) !important;
}

.app-root:not(.is-admin) .liquid-surface,
.app-root:not(.is-admin) .downloads-panel,
.app-root:not(.is-admin) .chat-shell,
.app-root:not(.is-admin) .account-modal,
.app-root:not(.is-admin) .download-confirm,
.app-root:not(.is-admin) .auth-panel {
  background: rgba(58, 120, 166, .38) !important;
  border-color: rgba(215, 240, 251, .36) !important;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .20),
    0 18px 42px rgba(34, 83, 118, .16) !important;
}

.app-root:not(.is-admin) .category-strip button,
.app-root:not(.is-admin) .tool-card,
.app-root:not(.is-admin) .download-button,
.app-root:not(.is-admin) .library-chip,
.app-root:not(.is-admin) .search-box,
.app-root:not(.is-admin) .round-button,
.app-root:not(.is-admin) .icon-button,
.app-root:not(.is-admin) .account-card,
.app-root:not(.is-admin) .session-row > button:first-child,
.app-root:not(.is-admin) .message-bubble,
.app-root:not(.is-admin) .chat-composer,
.app-root:not(.is-admin) .pending-file,
.app-root:not(.is-admin) .primary-button,
.app-root:not(.is-admin) .ghost-button,
.app-root:not(.is-admin) .small-button {
  background: rgba(58, 122, 168, .36) !important;
  border-color: rgba(220, 244, 254, .34) !important;
}

.app-root:not(.is-admin) .chat-message.user .message-bubble,
.app-root:not(.is-admin) .chat-message.assistant .message-bubble {
  background: rgba(58, 122, 168, .34) !important;
}

.app-root:not(.is-admin) .category-strip button:hover,
.app-root:not(.is-admin) .tool-card:hover,
.app-root:not(.is-admin) .download-button:hover,
.app-root:not(.is-admin) .primary-button:hover,
.app-root:not(.is-admin) .ghost-button:hover {
  background: rgba(72, 139, 186, .46) !important;
}

/* Keep the downloads panel inside the viewport when a category has many tools. */
.app-root:not(.is-admin) .downloads-panel {
  height: min(800px, calc(100dvh - 78px)) !important;
  max-height: calc(100dvh - 78px) !important;
  overflow: hidden !important;
}

.app-root:not(.is-admin) .tool-section {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding-bottom: 14px !important;
}

.app-root:not(.is-admin) .tool-list {
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto !important;
  padding-right: 10px !important;
  padding-bottom: 8px !important;
  overscroll-behavior: contain;
}

.app-root:not(.is-admin) .tool-list::-webkit-scrollbar {
  width: 7px;
}

.app-root:not(.is-admin) .tool-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(218, 243, 255, .42);
}

.app-root:not(.is-admin) .message-bubble.is-streaming {
  animation: streamingBubbleGlow 1.8s ease-in-out infinite;
}

@keyframes streamingBubbleGlow {
  0%, 100% {
    box-shadow: inset 0 1px rgba(255, 255, 255, .20), 0 10px 26px rgba(38, 90, 126, .08);
  }
  50% {
    box-shadow: inset 0 1px rgba(255, 255, 255, .28), 0 12px 30px rgba(72, 144, 190, .14);
  }
}

/* Desktop downloads should shrink to content, then scroll only when needed. */
@media (min-width: 821px) {
  .app-root:not(.is-admin) .downloads-panel {
    height: auto !important;
    max-height: calc(100dvh - 78px) !important;
    overflow: hidden !important;
  }

  .app-root:not(.is-admin) .tool-section {
    flex: 0 1 auto !important;
    min-height: 0 !important;
    max-height: clamp(210px, calc(100dvh - 455px), 520px) !important;
    overflow: hidden !important;
    padding-bottom: 16px !important;
  }

  .app-root:not(.is-admin) .tool-list {
    flex: 0 1 auto !important;
    max-height: clamp(150px, calc(100dvh - 520px), 455px) !important;
    overflow-y: auto !important;
  }

  .app-root:not(.is-admin) .tool-card {
    min-height: 72px !important;
  }
}

/* Chat UX polish: restrained focus, obvious active session, custom rename dialog. */
.app-root:not(.is-admin) .chat-composer:focus-within {
  background: rgba(50, 111, 158, .40) !important;
  border-color: rgba(205, 235, 248, .42) !important;
  box-shadow:
    0 -18px 36px rgba(24, 68, 100, .18),
    inset 0 1px rgba(255, 255, 255, .18) !important;
  transform: translateY(-1px) scale(1.001) !important;
}

.app-root:not(.is-admin) .session-row > button:first-child {
  position: relative;
  transition:
    background .2s ease,
    border-color .2s ease,
    box-shadow .24s ease,
    transform .28s cubic-bezier(.18, 1.15, .28, 1) !important;
}

.app-root:not(.is-admin) .session-row > button.is-active:first-child {
  color: #f8fdff !important;
  background: rgba(82, 151, 198, .58) !important;
  border-color: rgba(232, 249, 255, .62) !important;
  box-shadow:
    inset 3px 0 rgba(190, 236, 255, .92),
    inset 0 1px rgba(255, 255, 255, .26),
    0 10px 24px rgba(33, 88, 126, .16) !important;
}

.app-root:not(.is-admin) .session-row > button.is-active:first-child::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(203, 244, 255, .96);
  box-shadow: 0 0 14px rgba(174, 232, 255, .75);
  transform: translateY(-50%);
}

.rename-modal-backdrop {
  z-index: 36;
}

.rename-modal {
  width: min(460px, calc(100vw - 36px));
  display: grid;
  gap: 16px;
  padding: 26px;
  border: 1px solid rgba(222, 244, 255, .38);
  border-radius: 24px;
  background: rgba(55, 119, 165, .56);
  backdrop-filter: blur(18px) saturate(125%);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, .24),
    0 24px 52px rgba(22, 65, 96, .26);
  color: #f7fcff;
}

.rename-modal h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}

.rename-modal input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(224, 246, 255, .44);
  border-radius: 16px;
  background: rgba(42, 101, 146, .42);
  color: #f8fdff;
  padding: 0 14px;
  outline: none;
  font-weight: 850;
}

.rename-modal input:focus {
  border-color: rgba(217, 245, 255, .66);
  background: rgba(50, 113, 160, .48);
  box-shadow: inset 0 1px rgba(255, 255, 255, .20);
}

.rename-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Chat fixes: copy feedback, code-toolbar placement, composer alignment, active title clipping. */
.app-root:not(.is-admin) .chat-main {
  --chat-content-width: min(920px, calc(100% - 104px));
}

.app-root:not(.is-admin) .chat-shell.is-sidebar-collapsed .chat-main {
  --chat-content-width: min(1080px, calc(100% - 80px));
}

.app-root:not(.is-admin) .chat-messages {
  padding-bottom: 178px !important;
}

.app-root:not(.is-admin) .chat-composer {
  left: 50% !important;
  right: auto !important;
  width: var(--chat-content-width) !important;
  transform: translateX(-50%) !important;
  bottom: 28px !important;
}

.app-root:not(.is-admin) .chat-composer:focus-within {
  background: rgba(48, 108, 150, .48) !important;
  border-color: rgba(214, 241, 252, .44) !important;
  box-shadow:
    0 -18px 34px rgba(24, 67, 98, .18),
    inset 0 1px rgba(255, 255, 255, .16) !important;
}

.app-root:not(.is-admin) .session-list {
  padding: 6px 8px 6px 4px !important;
}

.app-root:not(.is-admin) .session-row {
  overflow: visible !important;
  padding: 2px 0 2px 2px !important;
}

.app-root:not(.is-admin) .session-row > button:first-child:hover {
  transform: translateY(-1px) scale(1.012) !important;
}

.app-root:not(.is-admin) .session-row > button.is-active:first-child,
.app-root:not(.is-admin) .session-row > button.is-active:first-child:hover {
  transform: translateY(0) scale(1.006) !important;
}

.app-root:not(.is-admin) .message-copy,
.app-root:not(.is-admin) .code-copy {
  overflow: visible !important;
}

.app-root:not(.is-admin) .message-copy::after,
.app-root:not(.is-admin) .code-copy::after {
  content: attr(data-copied);
  position: absolute;
  z-index: 8;
  right: 0;
  bottom: calc(100% + 8px);
  padding: 5px 10px;
  border: 1px solid rgba(223, 245, 255, .32);
  border-radius: 999px;
  color: rgba(248, 253, 255, .96);
  background: rgba(51, 112, 154, .86);
  box-shadow: 0 10px 24px rgba(26, 69, 101, .22), inset 0 1px rgba(255, 255, 255, .20);
  backdrop-filter: blur(12px) saturate(120%);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px) scale(.96);
  transition: opacity .16s ease, transform .22s cubic-bezier(.18, 1.1, .28, 1);
  pointer-events: none;
}

.app-root:not(.is-admin) .message-copy.is-copied,
.app-root:not(.is-admin) .code-copy.is-copied {
  opacity: 1 !important;
  color: #f9feff !important;
  border-color: rgba(229, 248, 255, .52) !important;
  background: rgba(94, 158, 198, .72) !important;
  transform: translateY(-1px) scale(1.03) !important;
}

.app-root:not(.is-admin) .message-copy.is-copied::after,
.app-root:not(.is-admin) .code-copy.is-copied::after {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.app-root:not(.is-admin) .code-block {
  overflow: hidden !important;
  border-radius: 15px !important;
}

.app-root:not(.is-admin) .code-head {
  width: 100% !important;
  min-height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 0 10px 0 14px !important;
}

.app-root:not(.is-admin) .code-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-root:not(.is-admin) .code-copy {
  position: relative !important;
  inset: auto !important;
  flex: 0 0 34px !important;
  width: 34px !important;
  height: 34px !important;
  margin-left: auto !important;
  transform: none !important;
}

@media (max-width: 820px) {
  .app-root:not(.is-admin) .chat-main {
    --chat-content-width: calc(100% - 24px);
  }

  .app-root:not(.is-admin) .chat-composer {
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
  }
}
