:root{--bg:#eef9ff;--ink:#17445c;--muted:#5f7f90;--line:#cbeaf7;--panel:#fff;--side:#e7f7ff;--hover:#d8f1fc;--soft:#f3fbff;--accent:#8fd7f1;--accent-strong:#55b8dc;--accent-deep:#258bb7;--danger:#991b1b;--success:#247a3d}*{box-sizing:border-box}html,body{height:100%;overflow:hidden}body{background:var(--bg);color:var(--ink);margin:0;font-family:Inter,Arial,PingFang SC,Microsoft YaHei,sans-serif}body.auth-mode{min-height:100%;overflow:auto}button,textarea,input{font:inherit}button{border:none}.app-shell{grid-template-columns:var(--history-width,260px) minmax(380px, 520px) minmax(0, 1fr);height:100vh;min-height:0;transition:grid-template-columns .18s;display:grid;overflow:hidden}.app-shell.history-collapsed{grid-template-columns:var(--history-width,64px) minmax(380px, 520px) minmax(0, 1fr)}.app-shell.history-resizing,.app-shell.history-resizing *{-webkit-user-select:none;user-select:none;cursor:ew-resize!important}.history{border-right:1px solid var(--line);background:var(--side);flex-direction:column;gap:10px;height:100vh;min-height:0;padding:10px 10px 58px;display:flex;position:relative;overflow:visible}.history-actions{grid-template-columns:38px minmax(0,1fr);gap:8px;display:grid}.history-collapsed .history-actions{grid-template-columns:1fr}.history-icon,.new-chat,.delete-session,.icon-action{color:var(--ink);cursor:pointer;background:0 0;border-radius:8px;place-items:center;display:grid}.history-icon{width:38px;height:38px}.new-chat{width:100%;height:38px;color:var(--ink);justify-content:center;align-items:center;gap:8px;font-weight:700;display:inline-flex}.history-icon:hover,.new-chat:hover,.icon-action:hover{background:var(--hover)}.history-collapsed .new-chat span{display:none}.history-resize{z-index:5;border:1px solid var(--line);width:20px;height:58px;color:var(--accent-deep);cursor:ew-resize;opacity:0;background:#fff;border-radius:8px;place-items:center;transition:opacity .14s,background .14s,color .14s;display:grid;position:absolute;top:50%;right:-10px;transform:translateY(-50%);box-shadow:0 4px 18px #258bb71f}.history:hover .history-resize,.history-resize:hover,.history-resizing .history-resize{opacity:1}.history-resize:hover{color:var(--ink);background:var(--soft)}.history-list{gap:2px;min-height:0;padding-right:2px;display:grid;overflow:auto}.history-row{width:100%;min-height:48px;color:var(--ink);background:0 0;border-radius:8px;grid-template-columns:minmax(0,1fr) 34px;align-items:center;display:grid}.history-row:hover,.history-row.active{background:var(--hover)}.history-item{text-align:left;min-width:0;min-height:48px;color:var(--ink);cursor:pointer;background:0 0;gap:4px;padding:8px 6px 8px 10px;display:grid}.history-item span{text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:600;overflow:hidden}.history-item small{color:var(--muted);font-size:12px}.delete-session{width:30px;height:30px;color:var(--muted);opacity:.35}.history-row:hover .delete-session,.history-row.active .delete-session,.delete-session:focus{opacity:1}.delete-session:hover{color:var(--ink);background:var(--hover)}.sidebar{border-right:1px solid var(--line);background:var(--bg);flex-direction:column;gap:18px;height:100vh;min-height:0;padding:28px;display:flex;overflow:hidden}.brand{align-items:center;gap:12px;display:flex}.brand-icon{color:#fff;background:var(--accent-strong);border-radius:8px;place-items:center;width:42px;height:42px;display:grid}h1{letter-spacing:0;margin:0;font-size:24px}.auth-shell{background:radial-gradient(circle at 18% 14%,#ffffffb8,#0000 24%),linear-gradient(#e8f8ff 0%,#f5fcff 56%,#ecf9ef 100%);grid-template-columns:minmax(360px,1fr) minmax(420px,560px);width:100vw;height:100dvh;min-height:100dvh;display:grid;position:relative;overflow:hidden}.auth-bg{z-index:0;pointer-events:none;position:absolute;inset:0;overflow:hidden}.auth-bg img{-webkit-user-select:none;user-select:none;display:block;position:absolute}.auth-bg-owl{opacity:.72;width:min(44vw,560px);max-height:42vh;top:clamp(34px,6vh,68px);left:clamp(94px,11vw,168px)}.auth-bg-kids{opacity:.7;width:min(44vw,560px);max-height:none;bottom:-22px;left:clamp(64px,7vw,104px)}.auth-intro{z-index:1;border-right:1px solid var(--line);background:linear-gradient(90deg,#e7f7ff29,#e7f7ff0a);align-content:center;gap:24px;min-height:0;padding:clamp(32px,6vw,72px);display:grid;position:relative}.auth-intro>*{z-index:2;position:relative}.auth-intro>div:last-child{-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background:#ffffffdb;border:1px solid #b7e0f1e6;border-radius:8px;width:min(520px,100%);padding:20px 22px;box-shadow:0 16px 42px #258bb71f}.auth-intro-mark{color:#fff;background:var(--accent-strong);border-radius:8px;place-items:center;width:58px;height:58px;display:grid}.auth-intro h1{font-size:clamp(34px,5vw,58px);line-height:1.05}.auth-intro p{max-width:520px;color:var(--muted);margin:18px 0 0;font-size:16px;line-height:1.7}.auth-panel{z-index:1;background:#fffffff0;border:0;border-radius:0;align-content:center;gap:20px;width:100%;height:100dvh;min-height:0;padding:clamp(24px,5vw,56px);display:grid;position:relative;overflow:auto;box-shadow:-16px 0 44px #258bb71a}.auth-brand{padding-bottom:4px}.auth-tabs{border:1px solid var(--line);background:var(--soft);border-radius:8px;grid-template-columns:1fr 1fr;height:42px;padding:3px;display:grid}.auth-tabs button{color:var(--muted);cursor:pointer;background:0 0;border-radius:6px;font-weight:700}.auth-tabs button.active{color:var(--ink);background:#fff;box-shadow:0 1px 6px #258bb71f}.auth-hint{color:var(--muted);margin:-8px 0 0;font-size:13px;line-height:1.5}.auth-form{gap:14px;display:grid}.auth-form label{color:var(--ink);gap:7px;font-size:14px;font-weight:700;display:grid}.field-label{align-items:center;gap:4px;display:inline-flex}.field-label i{color:var(--danger);font-style:normal;font-weight:900}.auth-form input{border:1px solid var(--line);width:100%;height:42px;color:var(--ink);background:#fff;border-radius:8px;outline:none;padding:0 12px}.auth-form input:focus{border-color:var(--accent-strong);box-shadow:0 0 0 3px #8fd7f152}.password-field{display:grid;position:relative}.password-field input{padding-right:46px}.password-field button{width:30px;height:30px;color:var(--muted);cursor:pointer;background:0 0;border-radius:8px;place-items:center;display:grid;position:absolute;top:50%;right:8px;transform:translateY(-50%)}.password-field button:hover{color:var(--ink);background:var(--soft)}.auth-form input[type=color]{padding:4px}.auth-form input[type=file]{height:auto;padding:10px 12px}.color-fields,.contact-fields{grid-template-columns:1fr 1fr;gap:12px;display:grid}.auth-submit{color:#fff;background:var(--accent-deep);cursor:pointer;border-radius:8px;justify-content:center;align-items:center;gap:8px;height:44px;font-weight:800;display:inline-flex}.auth-submit:disabled{cursor:not-allowed;opacity:.58}.auth-error-line{color:var(--danger);margin:-4px 0 0;font-size:12px;line-height:1.45}@media (max-width:860px){.auth-shell{grid-template-rows:auto minmax(0,1fr);grid-template-columns:1fr;height:100dvh;overflow:auto}.auth-bg-owl{opacity:.18;width:330px;top:-8px;left:auto;right:-78px}.auth-bg-kids{opacity:.16;width:560px;bottom:-92px;left:-128px}.auth-intro{border-right:0;border-bottom:1px solid var(--line);align-content:start;min-height:auto;padding:28px 22px}.auth-intro-mark{width:46px;height:46px}.auth-intro h1{font-size:30px}.auth-intro p{margin-top:10px;font-size:14px}.auth-panel{background:#fffffff5;align-content:start;height:auto;min-height:0;padding:22px;overflow:visible}}.user-strip{border:1px solid var(--line);background:var(--soft);border-radius:8px;justify-content:flex-start;align-items:center;gap:10px;min-height:46px;padding:8px 10px;display:flex}.user-logo{border:1px solid var(--line);width:34px;height:34px;color:var(--muted);background:#fff;border-radius:8px;flex:none;place-items:center;display:grid;overflow:hidden}.user-logo img{object-fit:contain;width:100%;height:100%;display:block}.user-strip>div:not(.user-actions):not(.user-logo){flex:auto;gap:2px;min-width:0;display:grid}.user-strip strong{text-overflow:ellipsis;white-space:nowrap;font-size:14px;overflow:hidden}.user-strip span{color:var(--muted);align-items:center;gap:6px;font-size:12px;display:flex}.user-strip i{border:1px solid #258bb738;border-radius:50%;flex:none;width:12px;height:12px}.user-strip button{height:32px;color:var(--ink);cursor:pointer;background:#fff;border-radius:8px;padding:0 10px}.user-actions{flex:none;align-items:center;gap:6px;display:inline-flex}.user-actions button{justify-content:center;align-items:center;gap:6px;display:inline-flex}.user-strip button:hover{background:var(--hover)}.profile-overlay{z-index:20;background:#258bb72e;justify-content:flex-end;display:flex;position:fixed;inset:0}.profile-panel{border-left:1px solid var(--line);background:#fff;align-content:start;gap:16px;width:min(420px,100%);height:100%;padding:24px;display:grid;overflow:auto;box-shadow:-18px 0 48px #258bb729}.profile-head{justify-content:space-between;align-items:flex-start;gap:12px;padding-bottom:4px;display:flex}.profile-head div{gap:4px;display:grid}.profile-head strong{font-size:18px}.profile-head span,.profile-note{color:var(--muted);font-size:13px}.profile-head button{height:34px;color:var(--ink);background:var(--soft);cursor:pointer;border-radius:8px;padding:0 12px}.profile-head button:hover{background:var(--hover)}.profile-panel label{color:var(--ink);gap:7px;font-size:14px;font-weight:700;display:grid}.profile-panel input{border:1px solid var(--line);width:100%;height:42px;color:var(--ink);background:#fff;border-radius:8px;outline:none;padding:0 12px}.profile-panel input:focus{border-color:var(--accent-strong);box-shadow:0 0 0 3px #8fd7f152}.profile-panel input[type=color]{padding:4px}.profile-panel input[type=file]{height:auto;padding:10px 12px}.profile-section{border-top:1px solid var(--line);gap:4px;padding-top:8px;display:grid}.profile-section strong{font-size:14px}.profile-note{margin:-4px 0 0;line-height:1.5}.subtitle{color:var(--muted);margin:4px 0 0;font-size:14px;line-height:1.6}.turn-bar{height:38px;color:var(--muted);justify-content:space-between;align-items:center;font-size:14px;display:flex}.session-chip{border:1px solid var(--line);color:var(--muted);background:var(--soft);border-radius:8px;padding:5px 8px;font-size:12px}.chat-log{flex-direction:column;flex:1;gap:10px;min-height:0;padding-right:4px;display:flex;overflow:auto}.message{border:1px solid var(--line);background:var(--panel);border-radius:8px;max-width:92%;padding:10px 12px}.message.menu-open{border-color:var(--accent-strong)}.message.user{background:#dff5ff;border-color:#c4eafa;align-self:flex-end}.message.assistant{align-self:flex-start}.message>span{color:var(--muted);margin-bottom:4px;font-size:12px;display:block}.message p{white-space:pre-wrap;margin:0;line-height:1.55}.message-context-menu{z-index:80;border:1px solid var(--line);background:var(--panel);border-radius:8px;min-width:132px;padding:4px;position:fixed;box-shadow:0 14px 32px #258bb729}.message-context-menu button{color:#b91c1c;cursor:pointer;background:0 0;border:0;border-radius:6px;align-items:center;gap:8px;width:100%;min-height:34px;padding:7px 9px;font-size:13px;display:flex}.message-context-menu button:hover:not(:disabled){background:#fef2f2}.message-context-menu button:disabled{opacity:.65;cursor:wait}.progress-message{width:min(92%,360px)}.plan-progress{gap:10px;display:grid}.progress-head{justify-content:space-between;align-items:center;gap:12px;display:flex}.progress-head strong{font-size:14px}.progress-head em{color:var(--muted);font-variant-numeric:tabular-nums;font-size:12px;font-style:normal}.progress-track{background:var(--soft);border-radius:999px;height:8px;position:relative;overflow:hidden}.progress-fill{border-radius:inherit;background:var(--accent-deep);min-width:18px;transition:width .28s;position:absolute;inset:0 auto 0 0}.progress-fill:after{content:"";background:linear-gradient(90deg,#0000,#ffffff59,#0000);animation:1.2s linear infinite progress-shine;position:absolute;inset:0}@keyframes progress-shine{0%{transform:translate(-100%)}to{transform:translate(100%)}}.chat-form{gap:12px;display:grid}.input-wrap{display:grid;position:relative}.input-wrap:after{content:"";pointer-events:none;background:linear-gradient(to bottom, #fff0, var(--panel) 38%);border-radius:0 0 8px 8px;height:50px;position:absolute;bottom:1px;left:1px;right:1px}textarea{resize:vertical;border:1px solid var(--line);min-height:120px;color:var(--ink);background:var(--panel);border-radius:8px;outline:none;padding:16px;line-height:1.6}.input-wrap textarea{padding-bottom:66px;padding-right:58px}textarea:focus{border-color:var(--accent-strong);box-shadow:0 0 0 3px #8fd7f152}textarea::placeholder{color:#8aaec0}.chat-form textarea:disabled{cursor:not-allowed;opacity:.68}.input-plus{z-index:2;width:28px;height:28px;color:var(--accent-deep);cursor:default;background:0 0;border:0;border-radius:50%;place-items:center;padding:0;transition:color .14s,transform .14s;display:grid;position:absolute;bottom:14px;left:14px}.input-plus:hover{color:var(--ink);transform:scale(1.05)}.pause-task{z-index:2;color:#fff;background:var(--accent-deep);cursor:pointer;border-radius:8px;place-items:center;width:36px;height:36px;transition:opacity .14s,background .14s,transform .14s;display:grid;position:absolute;bottom:10px;right:10px}.pause-task:hover:not(:disabled){background:#1c789f;transform:translateY(-1px)}.pause-task:disabled{cursor:not-allowed;color:#a1a1aa;opacity:.82;background:#eeeeef}.controls{flex-wrap:wrap;align-items:center;gap:12px;display:flex}.stepper{color:var(--muted);align-items:center;gap:8px;font-size:14px;display:flex}.stepper input{border:1px solid var(--line);background:var(--panel);border-radius:8px;width:64px;height:38px;padding:0 10px}.primary,.generate-wide{color:#fff;background:var(--accent-deep);cursor:pointer;border-radius:8px;justify-content:center;align-items:center;gap:8px;font-weight:700;display:inline-flex}.primary{height:42px;padding:0 18px}.generate-wide{width:100%;height:46px}.confirm-actions{gap:8px;display:grid}.confirm-actions p{color:var(--muted);margin:0;font-size:13px;line-height:1.5}.primary:disabled,.generate-wide:disabled{cursor:not-allowed;opacity:.55}.sample{border:1px solid var(--line);height:42px;color:var(--ink);cursor:pointer;background:0 0;border-radius:8px;padding:0 14px}.sample:hover{background:var(--soft)}.sample:disabled{cursor:not-allowed;opacity:.56}.spin{animation:1s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.main{background:var(--bg);height:100vh;min-height:0;padding:28px;display:flex;overflow:hidden}.workspace{grid-template-rows:minmax(0,1fr) auto;grid-template-columns:minmax(300px,1fr);align-items:stretch;gap:12px;width:100%;min-height:0;display:grid}.poster-frame{border:1px solid var(--line);background:#f5fcff;border-radius:8px;place-items:center;min-height:0;padding:14px;display:grid}.poster-frame img{object-fit:contain;background:#fff;border-radius:6px;width:auto;max-width:100%;height:100%;max-height:100%;display:block}.download-poster{color:#fff;background:var(--accent-deep);cursor:pointer;min-height:44px;font:inherit;border:0;border-radius:8px;justify-content:center;justify-self:center;align-items:center;gap:8px;padding:0 22px;font-weight:800;text-decoration:none;display:inline-flex}.download-poster:hover{background:#1c789f}.empty{width:100%;height:100%;min-height:0;color:var(--muted);text-align:center;border:1px dashed #aedff3;border-radius:8px;place-items:center;padding:24px;display:grid}.stack{gap:14px;display:grid}.panel{background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:16px}.panel-title{align-items:center;gap:8px;margin:0 0 12px;font-size:16px;display:flex}pre{white-space:pre-wrap;word-break:break-word;color:var(--ink);margin:0;font-size:13px;line-height:1.55}.score{color:var(--success);align-items:center;gap:8px;font-weight:800;display:inline-flex}.error{color:var(--danger);background:#fef2f2;border:1px solid #fecaca;border-radius:8px;padding:12px;line-height:1.5}.notice{color:var(--ink);background:var(--soft);border:1px solid var(--line);border-radius:8px;align-items:flex-start;gap:10px;padding:12px;line-height:1.5;display:flex}.notice strong{margin-bottom:2px;display:block}.notice p{color:var(--muted);margin:0}@media (max-width:980px){html,body{height:auto;overflow:auto}.app-shell,.app-shell.history-collapsed{grid-template-columns:1fr;height:auto;min-height:100vh;overflow:visible}.history{border-right:none;border-bottom:1px solid var(--line);height:auto;max-height:none}.history-resize{display:none}.history-collapsed .history{display:flex}.history-list{grid-auto-columns:minmax(180px,240px);grid-auto-flow:column;overflow-x:auto}.sidebar{border-right:none;border-bottom:1px solid var(--line);height:auto;min-height:70vh;max-height:none;overflow:visible}.main{height:auto;min-height:520px;overflow:visible}.workspace,.contact-fields{grid-template-columns:1fr}.empty{min-height:420px}}
