@charset "UTF-8";
:root{--ink:#332c40;--sub:#706678;--line:#ede5ed;--page:#fbf8f6;--panel:#fff;--pink:#dc80a3;--pink-dark:#ba5e83;--lavender:#a495ca;--blue:#cc779b;--teal:#9386b9;--rose:#cb6f94;--amber:#b28e6b;--shadow:0 12px 40px rgba(82,53,84,.045)}
*{box-sizing:border-box;margin:0;padding:0}html,body{font-family:"PingFang SC","Microsoft YaHei",system-ui,sans-serif;color:var(--ink);line-height:1.65;background:var(--page)}button,input,select,textarea{font:inherit}button{cursor:pointer;border:0}a{color:inherit;text-decoration:none}button,a,input,select,textarea{ -webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible{outline:3px solid #dec6e5;outline-offset:3px}button{transition:background .2s,transform .2s,border-color .2s}button:disabled{opacity:.5;cursor:not-allowed}svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}.brand{display:flex;align-items:center;gap:11px}.brand-mark{display:grid;place-items:center;width:35px;height:35px;color:var(--pink-dark);background:#f8e6ed;border-radius:12px}.brand-name{font-size:20px;font-weight:700;letter-spacing:1.5px}.brand-caption{font-size:10px;color:var(--sub);letter-spacing:2px}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:41px;padding:9px 19px;border-radius:12px;background:var(--pink);color:#fff;font-size:13px;font-weight:600;box-shadow:0 5px 15px #dc80a31c}.btn:hover{background:var(--pink-dark);transform:translateY(-1px)}.btn.secondary{border:1px solid var(--line);background:#fff;color:#706678;box-shadow:none}.btn.secondary:hover{background:#faf2f6;border-color:#e7c5d4}.btn.teal{background:var(--lavender)}.btn.danger{background:#c26b87}.pill{padding:7px 12px;border:1px solid #eddfe7;background:#fff9fc;border-radius:30px;color:#9b5b7a;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:260px}.muted,.notice{color:var(--sub);font-size:12px}.notice{line-height:1.8}.form-item{margin-top:15px}label{font-size:12px;color:#706678}.form-item>label{display:block;margin-bottom:7px}input,select,textarea{width:100%;padding:11px 12px;border:1px solid var(--line);border-radius:11px;background:#fefcfd;color:var(--ink);outline:0;font-size:13px}textarea{min-height:84px;resize:vertical}input::placeholder,textarea::placeholder{color:#8a7f8e}input:focus,select:focus,textarea:focus{border-color:#d8aac0;box-shadow:0 0 0 3px #f8eaf1}.row{display:flex;gap:10px}.main-btn{width:100%;margin-top:7px}.hidden{display:none!important}.modal{position:fixed;inset:0;z-index:100;display:none;align-items:center;justify-content:center;padding:20px;background:#4935496b;backdrop-filter:blur(7px)}.auth-box{width:min(440px,100%);padding:28px;border-radius:24px;background:#fff;box-shadow:0 24px 70px #422e4233;max-height:calc(100dvh - 40px);overflow:auto}.modal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.modal-head h3{font-size:19px;font-weight:600}.close{width:32px;height:32px;border-radius:50%;background:#faf1f6;color:#80638b;font-size:22px}.tabs{display:grid;grid-template-columns:1fr 1fr;padding:5px;gap:5px;border-radius:14px;background:#faf4f8;margin-bottom:18px}.tab{padding:10px;border-radius:10px;background:transparent;color:#806f88;font-size:13px}.tab.active{background:#fff;color:var(--pink-dark);box-shadow:0 2px 8px #573c4f0a}.captcha-row{display:grid;grid-template-columns:minmax(0,1fr) 132px 36px;gap:7px;align-items:center}.captcha-row img{height:42px;width:132px;border:1px solid var(--line);border-radius:9px}.captcha-refresh{padding:0;height:36px;min-height:36px;width:36px}.turnstile-wrap{display:none;margin-top:15px;min-height:65px}.captcha-fallback.hidden{display:none}.dot{display:inline-block;width:6px;height:6px;flex:0 0 6px;border-radius:50%;background:#a1b7a5}.eyebrow{display:inline-flex;align-items:center;gap:8px;color:#9d5d7e;font-size:12px;letter-spacing:1.1px}.eyebrow svg{width:14px;height:14px}
/* Welcome */
.home-page .page{min-height:100vh;background:radial-gradient(ellipse at 85% 18%,#f3e4ec88,transparent 46%),radial-gradient(ellipse at 0 56%,#e9e6f44d,transparent 44%),var(--page)}.home-page header{position:relative;z-index:10;display:flex;justify-content:space-between;align-items:center;max-width:1260px;margin:auto;padding:27px 38px;gap:20px}.home-nav{display:flex;gap:28px;margin-left:auto;margin-right:35px;color:#7a6c83;font-size:12px}.home-nav a:hover{color:var(--pink-dark)}.user-bar{display:flex;align-items:center;gap:10px;min-width:0;flex-shrink:0}.user-bar .btn{flex-shrink:0}.home-page header .brand{flex-shrink:0}.home-page .user-bar .pill{max-width:200px}.home-page main{max-width:1180px;margin:auto;padding:0 30px}.hero{display:grid;grid-template-columns:1.02fr 1fr;gap:65px;align-items:center;min-height:610px;padding:45px 0 70px}.hero-copy{min-width:0}.hero-copy .eyebrow{margin-bottom:28px}.hero h1{font-size:clamp(38px,4.3vw,53px);font-weight:600;line-height:1.38;letter-spacing:2px;margin-bottom:23px}.hero h1 span{color:var(--pink-dark);white-space:nowrap}.hero .lead{max-width:390px;color:#706678;font-size:14px;line-height:2.1}.hero-buttons{display:flex;align-items:center;gap:15px;margin-top:30px}.hero-buttons .btn{min-height:48px;padding:12px 27px;font-size:14px}.hero-buttons .soft-link{font-size:13px;color:#796387;padding:10px}.hero-note{display:flex;gap:19px;margin-top:29px;color:#807487;font-size:11px}.hero-note span{display:flex;align-items:center;gap:6px}.hero-note svg{width:13px;height:13px}.hero-art{position:relative;padding:12px 28px 23px 10px}.art-frame{position:relative;aspect-ratio:.92;overflow:hidden;border-radius:120px 120px 28px 28px;box-shadow:0 24px 60px #7f638d1a;background:#ede2ec}.art-frame>img{display:block;width:100%;height:100%;object-fit:cover;object-position:52% center}.art-frame:after{content:"";position:absolute;inset:65% 0 0;background:linear-gradient(transparent,#291e3970)}.art-label{position:absolute;bottom:23px;left:25px;z-index:1;color:#fff}.art-label small{font-size:9px;letter-spacing:3px;opacity:.8}.art-label strong{display:block;font-size:24px;font-weight:500;letter-spacing:5px}.art-orbit{position:absolute;inset:-10px 0 0 -14px;border:1px solid #e5cedf;border-radius:145px 145px 35px 35px;transform:rotate(-5deg);pointer-events:none}.art-spark{position:absolute;top:20px;right:6px;font-size:32px;color:#c2a9d3}.floating-note{position:absolute;bottom:52px;left:-28px;max-width:275px;padding:17px 21px;background:#fffffff2;border:1px solid #fff;border-radius:15px;box-shadow:0 9px 30px #634b6812;color:#74617b;font-size:12px;transform:rotate(-3deg)}.floating-note:before{content:"“";display:block;color:#c58ca7;font-size:29px;line-height:.8;margin-bottom:6px}.art-mini{position:absolute;top:28px;left:-22px;padding:9px 15px;background:#fffdfdf2;border:1px solid #f6e5ef;border-radius:30px;box-shadow:var(--shadow);font-size:10px;color:#9b5d7e;letter-spacing:1px}.section-head{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:25px}.section-head h2{font-size:25px;font-weight:500;letter-spacing:2px}.section-head p{font-size:12px;color:#796e81;margin-top:6px}.section-head small{font-size:10px;letter-spacing:2px;color:#8a7f8e}.characters{padding:8px 0 45px}.character-cards{display:grid;grid-template-columns:1fr 1fr;gap:20px}.character-card{display:grid;grid-template-columns:168px 1fr;min-height:205px;background:#fff;border:1px solid var(--line);border-radius:21px;overflow:hidden;cursor:pointer;text-align:left;box-shadow:var(--shadow)}.character-card:hover{transform:translateY(-4px);border-color:#dcc4d8}.character-card>img{height:100%;min-height:205px;width:100%;object-fit:cover;object-position:center}.character-card .card-copy{padding:29px 25px;display:flex;flex-direction:column;align-items:start}.card-copy small{font-size:9px;color:#91759e;letter-spacing:1.7px}.card-copy h3{font-size:22px;font-weight:500;margin:4px 0 7px;letter-spacing:2px}.card-copy p{font-size:12px;color:#706678;line-height:1.8}.card-bottom{display:flex;justify-content:space-between;align-items:center;width:100%;margin-top:auto;padding-top:17px;color:#a26586;font-size:11px}.card-bottom svg{width:16px;height:16px}.home-secondary{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:45px}.entry{display:flex;gap:17px;align-items:center;border:1px solid var(--line);border-radius:17px;background:#fff9fc88;padding:22px 24px;cursor:pointer}.entry-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:#f1ebf9;color:#aa98c6;flex-shrink:0}.entry h3{font-size:15px;font-weight:500}.entry p{color:#706678;font-size:11px;margin-top:4px}.entry>svg{margin-left:auto;flex-shrink:0;color:#91759e}.account-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:0;margin:0 0 40px;padding:21px;border:1px solid var(--line);background:#ffffff70;border-radius:17px}.status-card{text-align:center;padding:0 20px;border-right:1px solid var(--line)}.status-card:last-child{border:0}.status-card span{display:block;color:#8a7f8e;font-size:10px;letter-spacing:1px;margin-bottom:7px}.status-card strong{font-size:14px;font-weight:500;color:#79618c}.support{padding:0 0 45px}.support-panel{display:flex;align-items:center;justify-content:space-between;gap:20px;border-top:1px solid var(--line);padding-top:30px}.support h2{font-size:17px;font-weight:500}.support p{font-size:11px;color:#706678;margin-top:7px}.qr-list{display:flex;gap:13px}.qr-card{padding:8px;background:#fff;border:1px solid var(--line);border-radius:11px;text-align:center}.qr-card img{display:block;width:80px;height:80px;object-fit:cover}.qr-card strong{display:block;font-size:10px;font-weight:400;color:#807588;margin-top:5px}.home-page footer{display:flex;justify-content:center;gap:20px;padding:22px 20px;border-top:1px solid var(--line);color:#8a7f8e;font-size:10px;letter-spacing:.5px}
/* Companion workspace */
.chat-page{height:100dvh;overflow:hidden}.chat-page .app{height:100dvh;display:grid;grid-template-rows:78px minmax(0,1fr)}.chat-page header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:0 28px;border-bottom:1px solid var(--line);background:#fffcfb}.chat-page header .nav{display:flex;align-items:center;gap:10px}.chat-page .header-crumb{margin-left:26px;padding-left:24px;border-left:1px solid var(--line);color:#b39cb4;font-size:11px;letter-spacing:2px}.chat-page .shell{display:grid;grid-template-columns:232px minmax(340px,1fr) 300px;gap:20px;padding:22px 24px 24px;overflow:hidden;min-height:0;height:100%;max-width:1720px;width:100%;margin:auto}.companion-nav{display:flex;flex-direction:column;min-height:0;overflow:auto;padding:2px 0}.nav-caption{font-size:10px;letter-spacing:1.4px;color:#83738d;margin:21px 11px 12px}.sidebar-link{display:flex;align-items:center;gap:10px;padding:13px 15px;border-radius:12px;color:#756080;font-size:13px;margin-bottom:6px}.sidebar-link svg{width:17px;height:17px}.sidebar-link.active{background:#f5e7ef;color:#a86285}.sidebar-link:hover{background:#f7eff5}.preset-list{display:grid;gap:9px}.preset-card{position:relative;width:100%;padding:12px;border:1px solid transparent;border-radius:14px;background:transparent;color:var(--ink);display:grid;grid-template-columns:44px minmax(0,1fr);gap:11px;align-items:center;text-align:left;box-shadow:none}.preset-card:hover{background:#fff;border-color:#f0d9e7}.preset-card.active{background:#fff;border-color:#e7cddd;box-shadow:0 6px 20px #764d7a06}.preset-card.active:after{content:"";position:absolute;right:10px;top:16px;width:5px;height:5px;border-radius:50%;background:#ca87a4}.preset-avatar{width:44px;height:49px;border-radius:11px;object-fit:cover;background:#eee8f2}.preset-card strong{display:block;font-size:13px;font-weight:600;margin-bottom:3px}.preset-card>span>span{font-size:10px;color:#706678;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;overflow:hidden}.nav-history{padding:0 9px}.nav-history select{padding:10px;font-size:11px;background:#ffffff7d}.nav-new{width:calc(100% - 18px);margin:15px 9px 0;background:transparent;border:1px dashed #decdda;color:#956e90;box-shadow:none;font-weight:400;font-size:12px}.nav-bottom{margin-top:auto;padding:35px 12px 7px;color:#8a7f8e;font-size:10px;line-height:1.9}.nav-bottom span{display:block;color:#8f769b;font-size:11px;letter-spacing:1px;margin-bottom:5px}.panel{min-height:0;background:#fff;border:1px solid var(--line);border-radius:21px;box-shadow:var(--shadow)}.chat{grid-column:2;grid-row:1;display:grid;grid-template-rows:81px minmax(0,1fr) auto;overflow:hidden;background:#fff}.chat-head{display:flex;align-items:center;justify-content:space-between;padding:17px 23px;border-bottom:1px solid #f3eaf0;background:#fff}.chat-identity{display:flex;align-items:center;gap:13px;min-width:0}.chat-head-avatar{width:44px;height:44px;border-radius:14px;object-fit:cover}.chat-title{font-size:17px;font-weight:500;letter-spacing:1px}.chat-subline{font-size:10px;color:#817188;display:flex;align-items:center;gap:6px;margin-top:3px}.chat-actions{display:flex;gap:8px;align-items:center}.icon-btn{width:32px;height:32px;border-radius:9px;background:#fcf8fb;color:#94779f;display:grid;place-items:center}.icon-btn:hover{background:#f4e5ee;color:#bc7d9d}.icon-btn svg{width:16px;height:16px}.messages{padding:27px 24px;overflow:auto;min-height:0;overscroll-behavior:contain;background:radial-gradient(ellipse at 0 0,#faf6fb65,transparent 55%),#fffcfd;scrollbar-width:thin;scrollbar-color:#ebdbe8 transparent}.empty{min-height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#706678;font-size:13px;line-height:2;gap:13px;padding:30px}.empty:before{content:"✧";width:68px;height:68px;border:1px solid #efdfec;border-radius:23px;display:grid;place-items:center;background:#fbf3f9;color:#cbb0d4;font-size:32px;margin-bottom:4px;transform:rotate(-7deg)}.empty strong{font-size:21px;font-weight:400;color:#7e638e;letter-spacing:2px}.empty p{max-width:270px;font-size:12px;color:#706678}.msg{display:flex;align-items:flex-start;gap:11px;margin-bottom:23px}.msg.user{flex-direction:row-reverse}.avatar{width:34px;height:34px;flex:0 0 34px;border-radius:11px;background:#e8dfee;display:grid;place-items:center;color:#ac88b9;font-size:12px;overflow:hidden}.avatar img{display:block;width:100%;height:100%;object-fit:cover}.msg.user .avatar{background:#f1e0e8;color:#bc829d}.bubble-wrap{max-width:min(600px,78%)}.meta{font-size:9px;color:#8a7f8e;margin:0 0 7px 4px}.msg.user .meta{text-align:right;margin-right:4px}.bubble{max-width:100%;padding:13px 16px;border-radius:0 16px 16px 16px;border:1px solid #efe6ef;background:#fff;box-shadow:0 3px 10px #76577e03;font-size:13px;color:#66576e;line-height:1.8;white-space:pre-wrap}.bubble-text{white-space:pre-wrap;overflow-wrap:anywhere}.msg.user .bubble{background:#f6e7f0;border-color:#f0dce7;border-radius:16px 0 16px 16px;color:#886175}.composer{background:#fff;padding:0 20px 15px;border-top:1px solid #f4eaf1}.composer-tools{display:flex;align-items:center;gap:11px;min-height:44px;color:#8a7f8e;font-size:10px}.composer-tools .tool-icon{width:26px;height:26px;display:grid;place-items:center;border-radius:7px;background:transparent;color:#9579a3}.composer-tools .tool-icon:hover{background:#faf0f7}.composer-tools .tool-icon svg{width:16px;height:16px}.composer-tools .reply-hint{margin-left:auto}.composer-row{display:grid;grid-template-columns:minmax(0,1fr) 76px;gap:11px;align-items:end;padding:0}.composer textarea{min-height:70px;max-height:140px;border:0;background:#fffcfe;box-shadow:none;font-size:13px;line-height:1.6;resize:none;padding:10px 12px;border-radius:12px}.send-wechat{display:flex;align-items:center;justify-content:center;gap:5px;width:76px;height:39px;border-radius:11px;background:var(--pink);color:#fff;font-size:12px;margin-bottom:5px;box-shadow:0 4px 12px #dc80a318}.send-wechat:hover{background:var(--pink-dark)}.send-wechat:disabled{background:#eee5ec;color:#bbadbf;box-shadow:none;opacity:1}.send-wechat svg{width:14px;height:14px}.composer-foot{display:flex;justify-content:space-between;padding:10px 3px 0;gap:15px;color:#706678;font-size:9px}.chat-status{font-size:11px;color:#956580;margin:0 0 9px;padding:8px 11px;background:#fff4f9;border:1px solid #f5e4ed;border-radius:9px;line-height:1.6}.profile{grid-column:3;grid-row:1;overflow:auto;position:relative;padding:0 17px 19px;scrollbar-width:thin;scrollbar-color:#ebdbe8 transparent;max-height:100%}.profile-visual{position:relative;height:206px;margin:0 -17px;overflow:hidden;border-radius:20px 20px 0 0;background:#eee2f0}.profile-visual img{width:100%;height:100%;object-fit:cover;object-position:center 36%}.profile-visual:after{content:"";position:absolute;inset:50% 0 0;background:linear-gradient(transparent,#fff)}.profile-visual .portrait-tag{position:absolute;top:14px;left:14px;padding:5px 10px;border:1px solid #ffffff70;background:#ffffffda;border-radius:30px;color:#9d799d;font-size:9px;letter-spacing:1px;z-index:1}.profile-heading{position:relative;text-align:center;margin-top:-18px;z-index:1;padding:0 0 18px;border-bottom:1px solid var(--line)}.profile-heading h1{font-size:21px;font-weight:500;letter-spacing:3px}.profile-heading .muted{font-size:10px;line-height:1.9;margin-top:5px}.profile h2{font-size:13px;font-weight:500;margin-top:19px}.profile .form-item{margin-top:13px}.profile .form-item>label{font-size:10px}.profile input,.profile select,.profile textarea{font-size:11px;padding:10px;background:#fdfafd;border-radius:9px}.profile textarea{min-height:74px}.profile #profileBtn{font-size:11px;min-height:36px;margin-top:13px;width:100%;background:#f5eef8;border:1px solid #eee1f1;color:#8c679d;box-shadow:none;font-weight:400}.profile #profileBtn:hover{background:#ebdff1}.source-box{display:none}.type-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}.type-row label{display:flex;align-items:center;justify-content:center;gap:6px;padding:9px;background:#fff;border:1px solid var(--line);border-radius:9px;font-size:11px;color:#80668e}.type-row label:has(input:checked){border-color:#e3c8dc;background:#fbf2f8;color:#a0688b}.type-row input{width:12px;height:12px;accent-color:var(--pink);padding:0}.image-quality{display:none;margin-top:12px}.image-quality.active{display:block}.image-settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.image-settings-grid>div:last-child{grid-column:1/-1}.image-settings-grid label{display:block;margin-bottom:4px;font-size:10px}.media-disabled{opacity:.5}.profile .notice{margin-top:12px;font-size:9px;line-height:1.9;color:#706678}.profile-close,.mobile-profile-toggle,.mobile-mask{display:none}.profile-detail-tip{font-size:9px;color:#706678;line-height:1.9;margin-top:8px}.stream-cursor{display:inline-block;width:2px;height:1.1em;background:#c591b2;margin-left:3px;vertical-align:-.15em;animation:blink 1s steps(1,end) infinite}.typing-dots{display:inline-flex;gap:4px;padding:5px 0}.typing-dots span{width:5px;height:5px;border-radius:50%;background:#c7accf;animation:typingDot 1.15s infinite}.typing-dots span:nth-child(2){animation-delay:.16s}.typing-dots span:nth-child(3){animation-delay:.32s}@keyframes blink{50%{opacity:.1}}@keyframes typingDot{0%,70%,100%{opacity:.3}35%{opacity:1;transform:translateY(-3px)}}.media-grid{display:grid;gap:10px;margin-top:10px}.media-card{padding:10px;border-radius:11px;border:1px solid var(--line);background:#fbf5fa;white-space:normal;color:#8c728f;font-size:12px}.media-card strong{display:block;font-weight:500;margin-bottom:4px}.media-host:not(:empty){width:min(600px,60vw);max-width:100%}.image-frame{position:relative;overflow:hidden;margin-top:8px;border-radius:12px;background:#f0e8f5;width:100%}.image-frame img{display:block;width:100%;height:100%;object-fit:contain;cursor:zoom-in;background:#f9f3fa}.image-placeholder{position:absolute;inset:0;display:flex;align-items:flex-end;background:linear-gradient(135deg,#efdde8,#e5e1f5);overflow:hidden}.image-work{width:100%;padding:15px;background:linear-gradient(transparent,#80678d66);color:#fff}.image-work-title{font-size:12px;font-weight:500}.image-elapsed{font-size:10px;opacity:.8;margin-left:8px}.image-work-step{font-size:10px;margin-top:3px;opacity:.8}.image-progress{height:3px;border-radius:9px;background:#ffffff70;overflow:hidden;margin-top:8px}.image-progress-bar{height:100%;border-radius:inherit;background:#fff;transition:width .4s}.image-info{font-size:10px;color:#817188;margin-top:7px;line-height:1.6}.image-info.warning{color:#bc718e}.image-only{border:0;background:transparent;padding:0}.image-lightbox{position:fixed;inset:0;z-index:150;display:none;align-items:center;justify-content:center;padding:24px;background:#2c2332de;backdrop-filter:blur(9px)}.image-lightbox.active{display:flex}.image-lightbox img{max-width:94vw;max-height:90dvh;border-radius:14px;box-shadow:0 24px 80px #0005;transform-origin:center;cursor:grab;user-select:none;transition:transform .08s}.image-lightbox img.dragging{cursor:grabbing;transition:none}.lightbox-close{position:absolute;right:20px;top:18px;width:38px;height:38px;border-radius:50%;background:#fff;color:#9e7aaa;font-size:24px}.voice-call{display:none}.voice-call.active{display:flex}.new-character-details{border-top:1px solid var(--line);margin-top:18px;padding-top:14px}.new-character-details summary{list-style:none;cursor:pointer;font-size:12px;color:#92648b;display:flex;align-items:center;justify-content:space-between}.new-character-details summary:after{content:"＋";font-size:16px;color:#bba0c2}.new-character-details[open] summary:after{content:"−"}.mobile-presets{display:none}
/* Novel palette matches the companion workspace */
.novel-page{--blue:#cc779b;--teal:#9e8bbd;--ink:#514157;--sub:#a18ba8;--line:#eadfea;--shadow:0 12px 35px #604d7308;background:#fbf7fa}.novel-page .app{background:radial-gradient(ellipse at 70% 0,#f0e6f5,transparent 60%),#fbf8fb}.novel-page .workspace{padding-top:80px;gap:22px}.novel-page .sidebar,.novel-page .stage{border-color:var(--line);border-radius:20px;box-shadow:var(--shadow)}.novel-page .panel-head,.novel-page .stage-head{background:#fffbff;border-color:var(--line);padding:19px}.novel-page .side-scroll{padding:18px}.novel-page .result-wrap{background:#fffbfd;padding:23px}.novel-page .result{border:0;color:#705c78;background:#fff;border-radius:16px;font-size:14px;line-height:2.05}.novel-page .mode-btn{border-color:var(--line);color:#a88bb2;border-radius:10px;font-size:12px;background:#fff}.novel-page .mode-btn.active{background:#f5e4ef;border-color:#e9cddd;color:#bc7c9e}.novel-page input,.novel-page select,.novel-page textarea{border-color:var(--line);border-radius:10px;background:#fefaff;font-size:12px}.novel-page .btn,.novel-page .pill,.novel-page .auth-box,.novel-page .close{border-radius:12px}.novel-page .btn.secondary{border-color:var(--line);color:#ae92b6}.novel-page .home-link{left:30px;right:30px;top:20px;display:flex;justify-content:space-between;align-items:center;gap:15px}.novel-page .history-item{border-color:var(--line);border-radius:12px}.novel-page .history-item strong{color:#94769e}.novel-page .stage-foot{border-color:var(--line)}
@media(min-width:1600px){.chat-page .shell{grid-template-columns:250px minmax(450px,1fr) 320px;padding:26px 35px}.profile-visual{height:245px}.messages{padding:30px 40px}}
@media(max-width:1200px){.chat-page .shell{grid-template-columns:190px minmax(280px,1fr) 266px;gap:15px;padding:18px}.chat-page header{padding:0 21px}.header-crumb{display:none!important}.preset-card{padding:10px 8px;grid-template-columns:36px 1fr;gap:9px}.preset-avatar{width:36px;height:42px}.profile{padding:0 14px 16px}.profile-visual{margin:0 -14px;height:185px}.bubble-wrap{max-width:82%}.hero{gap:35px;min-height:550px}.character-card{grid-template-columns:145px 1fr}.home-nav{gap:20px;margin-right:15px}}
@media(max-width:980px){.chat-page .shell{grid-template-columns:180px minmax(0,1fr);gap:14px}.chat-page .profile{position:fixed;right:0;top:0;bottom:0;z-index:70;width:min(360px,90vw);max-height:100dvh;border-radius:20px 0 0 20px;transform:translateX(105%);transition:transform .25s;padding-bottom:25px}.chat-page .profile.open{transform:translateX(0)}.profile-close{display:grid;place-items:center;position:absolute;right:12px;top:12px;width:29px;height:29px;border-radius:50%;background:#ffffffdd;z-index:3;font-size:21px;color:#967aa3}.mobile-mask{display:block;position:fixed;inset:0;z-index:60;background:#52405755;opacity:0;pointer-events:none;transition:opacity .2s}.mobile-mask.open{opacity:1;pointer-events:auto}.mobile-profile-toggle{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:10px;background:#f6eaf2;color:#b989a8}.mobile-profile-toggle svg{width:17px;height:17px}.hero{gap:30px;padding:30px 0 50px;min-height:540px}.hero h1{font-size:43px}.home-nav{display:none}.hero-art{padding:12px 0 23px 10px}.floating-note{max-width:235px;left:-15px;padding:14px 17px}.character-card{grid-template-columns:120px 1fr}.character-card .card-copy{padding:22px 20px}.character-card>img{min-height:200px}.hero-note{gap:12px;font-size:10px}.hero .lead{font-size:13px}.home-secondary .entry{padding:18px}.home-page header{padding:24px 30px}}
@media(max-width:720px){.chat-page .app{grid-template-rows:64px minmax(0,1fr)}.chat-page header{padding:0 14px;gap:10px}.chat-page .brand{gap:8px}.chat-page .brand-mark{width:29px;height:29px;border-radius:10px}.chat-page .brand-name{font-size:16px;letter-spacing:1px}.chat-page .brand-caption{font-size:8px;letter-spacing:1.1px}.chat-page header .nav{gap:7px}.chat-page header .pill{max-width:160px;font-size:9px;padding:5px 9px}.chat-page header .home-return{display:none}.chat-page .shell{grid-template-columns:minmax(0,1fr);padding:0;gap:0}.companion-nav{display:none}.chat{grid-column:1;border:0;border-radius:0;box-shadow:none;grid-template-rows:71px minmax(0,1fr) auto;height:100%;background:#fffcfd}.chat-head{padding:13px 15px;background:#fffcfd}.chat-head-avatar{width:39px;height:39px;border-radius:13px}.chat-title{font-size:16px}.chat-subline{font-size:9px}.messages{padding:21px 13px}.msg{gap:9px;margin-bottom:19px}.avatar{width:30px;height:30px;flex-basis:30px;border-radius:10px}.bubble-wrap{max-width:80%}.bubble{padding:10px 13px;font-size:13px}.composer{padding:0 12px max(10px,env(safe-area-inset-bottom))}.composer-tools{min-height:39px}.composer-row{grid-template-columns:minmax(0,1fr) 64px;gap:8px}.composer textarea{min-height:48px;max-height:110px;font-size:16px;padding:10px;line-height:1.5}.send-wechat{width:64px;height:38px;font-size:12px}.composer-foot{font-size:8px;padding-top:8px}.media-host:not(:empty){width:min(74vw,480px)}.chat-page .profile{top:auto;left:0;right:0;bottom:0;width:100%;max-height:88dvh;border-radius:24px 24px 0 0;transform:translateY(105%)}.chat-page .profile.open{transform:translateY(0)}.profile-visual{height:210px;border-radius:23px 23px 0 0}.profile-visual img{object-position:center 40%}.profile-heading{margin-top:-20px}.mobile-presets{display:block;padding-top:17px;border-bottom:1px solid var(--line);padding-bottom:15px}.mobile-presets strong{font-size:12px;font-weight:500}.mobile-preset-list{display:flex;gap:9px;overflow-x:auto;padding-top:10px}.mobile-preset-card{display:flex;align-items:center;gap:7px;white-space:nowrap;padding:8px;background:#fbf6fb;border:1px solid var(--line);border-radius:11px;font-size:11px;color:#9d7ca9}.mobile-preset-card img{width:28px;height:28px;border-radius:8px;object-fit:cover}.profile input,.profile select,.profile textarea{font-size:14px}.profile textarea{min-height:80px}.profile .form-item>label{font-size:11px}.profile #profileBtn{font-size:12px;min-height:40px}.image-settings-grid{grid-template-columns:1fr 1fr 1fr}.image-settings-grid>div:last-child{grid-column:auto}.home-page header{padding:20px}.home-page .brand-name{font-size:17px}.home-page .brand-caption{font-size:8px}.home-page .brand-mark{width:31px;height:31px}.home-page .user-bar .pill{display:none}.home-page .user-bar .btn{font-size:11px;min-height:34px;padding:7px 12px}.home-page main{padding:0 22px}.hero{grid-template-columns:1fr;gap:30px;text-align:center;padding:25px 0 45px}.hero-copy .eyebrow{font-size:10px;margin-bottom:20px}.hero h1{font-size:clamp(28px,8.6vw,33px);letter-spacing:1px;margin-bottom:16px}.hero .lead{font-size:12px;max-width:340px;margin:auto}.hero-buttons{justify-content:center;margin-top:24px}.hero-buttons .btn{min-height:44px;padding:10px 24px;font-size:12px}.hero-buttons .soft-link{font-size:11px}.hero-note{justify-content:center;margin-top:20px;font-size:9px;gap:15px}.hero-art{margin:0 auto;width:min(360px,90%);padding:5px 10px 23px 7px}.art-frame{aspect-ratio:1.04;border-radius:95px 95px 24px 24px}.art-orbit{inset:-6px -2px 4px -11px;border-radius:115px 115px 28px 28px}.floating-note{max-width:230px;bottom:43px;left:-14px;font-size:10px;padding:12px 16px;text-align:left}.art-mini{top:25px;font-size:8px;left:-11px;padding:7px 10px}.art-label{left:22px;bottom:20px}.art-label strong{font-size:20px}.art-label small{font-size:8px}.art-spark{right:-8px;top:12px;font-size:27px}.characters{padding:0 0 30px}.section-head{margin-bottom:19px}.section-head h2{font-size:21px}.section-head p{font-size:10px}.section-head small{display:none}.character-cards{grid-template-columns:1fr;gap:14px}.character-card{grid-template-columns:116px 1fr;min-height:173px;border-radius:17px}.character-card>img{min-height:173px}.character-card .card-copy{padding:21px}.card-copy h3{font-size:21px}.card-copy p{font-size:11px}.card-bottom{font-size:10px;padding-top:12px}.home-secondary{grid-template-columns:1fr;gap:12px;margin-bottom:27px}.home-secondary .entry{padding:17px 19px}.account-strip{padding:17px 5px;margin-bottom:30px}.status-card{padding:0 8px}.status-card strong{font-size:10px;line-height:1.7}.status-card span{font-size:8px}.support-panel{align-items:flex-start;gap:15px}.support h2{font-size:14px}.support p{font-size:10px;line-height:1.8}.qr-list{gap:7px}.qr-card{padding:6px}.qr-card img{width:56px;height:56px}.qr-card strong{font-size:8px}.home-page footer{font-size:9px;gap:10px;flex-wrap:wrap;padding:20px 12px}.support{padding-bottom:30px}.auth-box{padding:22px 18px;border-radius:20px}.captcha-row{grid-template-columns:minmax(0,1fr) 116px 31px}.captcha-row img{width:116px}.captcha-refresh{width:31px}.novel-page .home-link{left:16px;right:16px;top:17px}.novel-page .workspace{padding:75px 12px 12px}.novel-page .result-wrap{padding:13px}.novel-page .home-link .brand-name{font-size:16px}.novel-page .home-link .brand-caption{display:none}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;scroll-behavior:auto!important;transition:none!important}}

@media(max-width:390px){.chat-page header .pill{max-width:105px}.chat-page .brand-name{font-size:15px}.chat-page .brand-caption{font-size:7px;letter-spacing:.8px}}

/* Avatar dimensions belong to their UI slot, independently of media image rules. */
.chat-page .preset-card{--preset-avatar-width:44px;--preset-avatar-height:49px}
.chat-page .preset-avatar{display:block;width:var(--preset-avatar-width);height:var(--preset-avatar-height);min-width:var(--preset-avatar-width);min-height:var(--preset-avatar-height);max-width:var(--preset-avatar-width);max-height:var(--preset-avatar-height);object-fit:cover;object-position:center;margin:0;align-self:center}
.chat-page .chat-head{--chat-avatar-size:44px}
.chat-page .chat-head-avatar{display:block;flex:0 0 var(--chat-avatar-size);width:var(--chat-avatar-size);height:var(--chat-avatar-size);min-width:var(--chat-avatar-size);min-height:var(--chat-avatar-size);max-width:var(--chat-avatar-size);max-height:var(--chat-avatar-size);object-fit:cover;object-position:center;margin:0;background:#eee8f2}
.chat-page .mobile-preset-avatar{display:block;width:28px;height:28px;min-width:28px;min-height:28px;max-width:28px;max-height:28px;flex:0 0 28px;object-fit:cover;object-position:center;margin:0}
.chat-page .avatar>img{display:block;width:100%;height:100%;min-width:100%;min-height:100%;max-width:100%;max-height:100%;object-fit:cover;object-position:center;margin:0}
.chat-page .profile-visual>img{display:block;position:absolute;inset:0;width:100%;height:100%;min-width:100%;min-height:100%;max-width:none;max-height:none;margin:0;object-fit:cover}
@media(max-width:1200px){.chat-page .preset-card{--preset-avatar-width:36px;--preset-avatar-height:42px}}
@media(max-width:720px){.chat-page .chat-head{--chat-avatar-size:39px}}

/* Five-star companion catalog: two game drawers share the same search and selection. */
.catalog-search{position:relative;margin:0 8px 8px}
.catalog-search>svg{position:absolute;left:11px;top:11px;width:15px;height:15px;color:#a18aac;pointer-events:none}
.catalog-search input{height:38px;min-width:0;padding:9px 27px 9px 34px;border-radius:11px;background:#fffafc;border-color:#e9dfea;font-size:11px;line-height:1.5}
.catalog-search input:focus{background:#fff;border-color:#d2b4cb}
.catalog-search-status{margin:0 10px 13px;min-height:16px;font-size:9px;color:#84758f;line-height:1.7}
.catalog-menu{display:grid;gap:10px;padding:0 3px;min-width:0}
.game-drawer{border:1px solid #eadee9;border-radius:14px;background:#ffffff9c;overflow:hidden;min-width:0}
.game-drawer>summary{list-style:none;display:flex;align-items:center;gap:9px;padding:12px 10px;cursor:pointer;user-select:none;min-height:59px;background:#fdf9fc}
.game-drawer>summary::-webkit-details-marker{display:none}
.game-drawer>summary:hover{background:#f7eef5}
.game-drawer>summary:focus-visible{outline:2px solid #d8afca;outline-offset:-3px;border-radius:12px}
.game-drawer[open]>summary{border-bottom:1px solid #f0e6ef}
.game-symbol{width:29px;height:31px;display:grid;place-items:center;flex:0 0 29px;border-radius:10px;background:#eee7f6;color:#967bb3}
.game-symbol svg{width:16px;height:16px}
.game-genshin .game-symbol{background:#f8eddf;color:#b18d60}
.game-heading{display:block;flex:1;min-width:0;line-height:1.3}
.game-heading strong{display:block;font-size:12px;font-weight:600;color:#5f4c6d;white-space:nowrap;letter-spacing:.2px}
.game-heading small{display:block;margin-top:4px;font-size:7px;letter-spacing:.65px;color:#95809e;white-space:nowrap}
.game-count{flex:0 0 auto;min-width:23px;padding:3px 5px;border-radius:7px;background:#f2e9f0;color:#927497;font-size:9px;font-variant-numeric:tabular-nums;text-align:center;white-space:nowrap}
.drawer-chevron{flex:0 0 11px;width:11px;height:11px;color:#b79fba;transition:transform .18s}
.game-drawer[open] .drawer-chevron{transform:rotate(180deg)}
.game-catalog-list{max-height:min(34dvh,272px);overflow-y:auto;overscroll-behavior:contain;padding:5px;scrollbar-width:thin;scrollbar-color:#e1cfe0 transparent}
.chat-page .game-catalog-list .preset-card{grid-template-columns:var(--preset-avatar-width) minmax(0,1fr);padding:8px 6px;min-height:64px;gap:8px;border-radius:10px;margin:1px 0}
.chat-page .game-catalog-list .preset-card:hover{background:#faf1f7}
.chat-page .game-catalog-list .preset-card.active{background:#f9edf5;border-color:#e3c8da;box-shadow:none}
.chat-page .game-catalog-list .preset-card.active:after{top:8px;right:7px;width:4px;height:4px;background:#b9769b}
.character-copy{display:block;min-width:0;overflow:hidden}
.preset-card .character-name-line{display:flex;align-items:center;justify-content:space-between;gap:4px;-webkit-line-clamp:unset;overflow:visible;line-height:1.4}
.preset-card .character-name-line strong{font-size:12px;font-weight:500;color:#51445f;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;min-width:0}
.preset-card .character-stars{display:block;flex:0 0 auto;font-size:6px;letter-spacing:.3px;color:#ad8a53;line-height:1;white-space:nowrap}
.preset-card .character-meta{display:block;margin-top:6px;font-size:9px;color:#85718e;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.catalog-no-results{padding:17px 8px;color:#8d7597;font-size:10px;line-height:1.9;text-align:center}
.mobile-presets .catalog-search{margin:12px 0 8px}
.mobile-presets .catalog-search-status{margin-left:2px;margin-bottom:11px}
.mobile-presets .catalog-menu{display:grid;gap:10px;padding:0;overflow-x:visible;overflow-y:visible}
@media(max-width:1200px){.game-drawer>summary{gap:6px;padding:10px 8px}.game-symbol{width:24px;flex-basis:24px;height:29px;border-radius:9px}.game-heading strong{font-size:11px;letter-spacing:0}.game-heading small{font-size:6px;letter-spacing:.35px}.game-count{font-size:8px;min-width:19px;padding:3px 4px}.drawer-chevron{flex-basis:10px;width:10px}.preset-card .character-name-line strong{font-size:11px}.preset-card .character-stars{font-size:5px;letter-spacing:.1px}.chat-page .game-catalog-list .preset-card{min-height:58px;gap:7px;padding:7px 5px}}
@media(max-width:720px){.chat-page .profile .mobile-presets{padding-top:19px;padding-bottom:19px;border-bottom:0}.mobile-presets>strong{display:block;padding-right:38px;font-size:15px;color:#695274;letter-spacing:.5px}.mobile-presets .catalog-search input{height:42px;padding-left:36px;font-size:14px}.mobile-presets .catalog-search>svg{top:13px;left:12px;width:16px;height:16px}.mobile-presets .catalog-search-status{font-size:10px}.mobile-presets .game-drawer>summary{padding:13px 12px;min-height:64px;gap:10px}.mobile-presets .game-symbol{width:30px;height:33px;flex-basis:30px;border-radius:11px}.mobile-presets .game-symbol svg{width:18px;height:18px}.mobile-presets .game-heading strong{font-size:14px}.mobile-presets .game-heading small{font-size:8px;letter-spacing:.6px}.mobile-presets .game-count{font-size:11px;padding:5px 7px;min-width:29px}.mobile-presets .drawer-chevron{width:14px;height:14px;flex-basis:14px}.mobile-presets .game-catalog-list{max-height:min(35dvh,300px);padding:7px}.mobile-presets .preset-card{--preset-avatar-width:40px;--preset-avatar-height:44px}.chat-page .mobile-presets .game-catalog-list .preset-card{padding:9px;gap:11px;min-height:65px}.mobile-presets .preset-card .character-name-line strong{font-size:14px}.mobile-presets .preset-card .character-stars{font-size:8px;letter-spacing:1px}.mobile-presets .preset-card .character-meta{font-size:11px;margin-top:5px}.mobile-presets .catalog-no-results{font-size:12px}.chat-page .profile-visual{border-radius:18px 18px 0 0}}

/* Real character audio: optional generation, clear costs and free history playback. */
.voice-quick-toggle{display:inline-flex;align-items:center;gap:6px;min-height:31px;margin-left:4px;padding:6px 10px;border:1px solid #e1d4e9;border-radius:11px;background:#fbf8fd;color:#786285;font-size:10px;line-height:1.3;cursor:pointer;white-space:nowrap}
.voice-quick-toggle svg{width:14px;height:14px;flex:0 0 14px}
.voice-quick-toggle:hover:not(:disabled),.voice-quick-toggle.active{background:#f3e8f7;border-color:#ceafda;color:#755483}
.voice-quick-toggle:disabled{cursor:default;background:#faf7fa;color:#8d7d93;border-color:#e9e1ec}
.chat-page .type-row{grid-template-columns:repeat(3,minmax(0,1fr))}
.voice-settings{padding:12px;margin:1px 0 17px;border:1px solid #e9deed;border-radius:13px;background:linear-gradient(135deg,#faf7fd,#fdf7fa);color:#706278}
.voice-settings-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12px;font-weight:600;color:#564561}
.voice-state{padding:3px 6px;border-radius:6px;background:#eee7f1;color:#85718f;font-size:9px;font-weight:400;white-space:nowrap}
.voice-state.ready{background:#e9f2ed;color:#50775d}
.voice-settings p{font-size:11px;line-height:1.8;margin:9px 0;overflow-wrap:anywhere}
.voice-autoplay{display:flex!important;align-items:center;gap:6px;color:#706278!important;font-size:11px!important;margin:9px 0!important;cursor:pointer}
.voice-autoplay input{width:13px;height:13px;margin:0;accent-color:#be8cba}
.voice-settings .voice-cost-note{font-size:10px;color:#7b6d85;margin-bottom:0}
.audio-card{max-width:100%;padding:13px 14px!important;background:#f7f0fa!important;border:1px solid #e5d8ed;border-radius:14px!important;color:#66546f!important}
.audio-card-heading{display:flex;align-items:center;gap:8px;font-size:12px;line-height:1.5}
.audio-card-icon{width:27px;height:27px;display:grid;place-items:center;border-radius:9px;background:#eaddf0;color:#9b6dac}
.audio-card-icon svg{width:16px;height:16px}
.audio-duration{margin-left:auto;font-size:11px;color:#85758e;font-variant-numeric:tabular-nums}
.reply-audio{display:block;width:100%;height:38px;margin:11px 0 7px;min-width:0;max-width:100%}
.audio-free-note{font-size:10px;color:#7b6d85;margin:5px 0 0;line-height:1.6}
.audio-transcript{margin-top:9px;font-size:11px;line-height:1.8}
.audio-transcript summary{cursor:pointer;color:#877090}
.audio-transcript p{white-space:pre-wrap;margin:7px 0 0;color:#706278;overflow-wrap:anywhere}
.audio-load-error{font-size:11px;line-height:1.7;color:#a06272;margin:8px 0 0}
.audio-notice{background:#fff7f8!important;color:#8b6673!important;font-size:12px;border:1px solid #eedee4}
.audio-notice p{margin:7px 0;font-size:11px;line-height:1.8}.audio-notice small{font-size:10px;color:#8e7580}
.audio-progress{color:#80638e!important;font-size:11px;background:#f8f0fb!important;line-height:1.7}
.chat-page .composer-foot{gap:8px;flex-wrap:wrap}.chat-page .composer-foot>span:last-child{margin-left:auto}
.chat-page .chat-status{overflow-wrap:anywhere}
@media(max-width:720px){.voice-quick-toggle{font-size:10px;min-height:29px;padding:5px 8px;margin-left:0}.composer-tools .reply-hint{font-size:9px}.voice-settings{padding:14px;margin-bottom:20px}.voice-settings-heading{font-size:14px}.voice-state{font-size:11px}.voice-settings p,.voice-autoplay{font-size:12px!important}.voice-settings .voice-cost-note{font-size:11px!important}.chat-page .composer-foot{font-size:9px}.audio-card{padding:11px!important}.audio-card-heading{font-size:12px}.audio-transcript{font-size:12px}.audio-free-note{font-size:10px}.audio-notice p{font-size:12px}}
@media(max-width:380px){.composer-tools .reply-hint{display:none}.voice-quick-toggle{margin-left:auto}.chat-page .composer-foot>span:last-child{margin-left:0}}

.voice-settings .voice-autoplay input{padding:0;flex:0 0 13px;width:13px;height:13px}
.audio-card,.audio-notice,.audio-progress{min-width:0}.audio-card-heading strong{margin:0}.audio-transcript>summary{padding:2px 0}
.chat-page .composer-tools{gap:9px;min-width:0}.chat-page .composer-tools .tool-icon{flex:0 0 26px}.chat-page .composer-tools .reply-hint{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.voice-quick-toggle{flex-shrink:0}

/* Private user image attachments stay separate from generated image cards. */
.chat-page .composer{position:relative}.attachment-pick:disabled{opacity:.42;cursor:default}.attachment-drop-hint{display:none;position:absolute;inset:7px;z-index:6;flex-direction:column;align-items:center;justify-content:center;gap:8px;border:2px dashed #cd98b7;border-radius:15px;background:#fff5fcf5;color:#805d89;pointer-events:none}.attachment-drop-hint strong{font-weight:500;font-size:15px}.attachment-drop-hint span{font-size:11px;color:#706678}.composer.drag-over .attachment-drop-hint{display:flex}.composer.drag-over{background:#fff8fc}.attachment-tray{padding:1px 0 12px}.attachment-tray[hidden]{display:none}.attachment-tray-heading{display:flex;justify-content:space-between;gap:10px;max-width:420px;margin-bottom:8px;color:#75637d;font-size:10px}.attachment-tray-heading span:last-child{color:#8b718f}.attachment-draft-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;max-width:420px}.attachment-draft-card{position:relative;min-width:0;padding:5px;border:1px solid #efdfeb;border-radius:11px;background:#fffbfe;overflow:hidden}.attachment-draft-card.error,.attachment-draft-card.cancelled{border-color:#dca7b4;background:#fff7f8}.attachment-draft-preview{display:block!important;width:100%!important;height:75px!important;object-fit:cover;border-radius:7px;background:#eee5f1}.attachment-remove{position:absolute;right:7px;top:7px;display:grid;place-items:center;width:25px;height:25px;padding:0;border-radius:50%;background:#fffef4ec;color:#805a7e;font-size:18px;line-height:1;box-shadow:0 2px 7px #57344b18}.attachment-remove:disabled{opacity:.5;cursor:default}.attachment-draft-name,.attachment-draft-state{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;line-height:1.5;padding:0 2px}.attachment-draft-name{margin-top:5px;color:#5f5269}.attachment-draft-state{margin-top:2px;color:#7d6686}.attachment-draft-card.error .attachment-draft-state,.attachment-draft-card.cancelled .attachment-draft-state{color:#ad536b}.attachment-upload-progress{height:3px;margin:5px 2px 0;border-radius:6px;background:#efe2ee;overflow:hidden}.attachment-upload-progress[hidden]{display:none}.attachment-upload-progress span{display:block;height:100%;background:#c987ab;border-radius:inherit;transition:width .15s}.attachment-draft-action{display:block;width:100%;margin-top:4px;min-height:25px;padding:3px 2px;background:transparent;border-radius:5px;color:#9b5e88;font-size:10px;box-shadow:none}.attachment-draft-action:hover:not(:disabled){background:#f5e6f1}.attachment-draft-action:disabled{color:#8a7f8e;opacity:.8;cursor:default}.user-attachment-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;width:min(350px,100%)}.user-attachment-gallery:has(.user-image-button:only-child){grid-template-columns:minmax(0,1fr);max-width:235px}.user-attachment-gallery:has(.user-image-button:first-child:nth-last-child(2)){grid-template-columns:repeat(2,minmax(0,1fr));max-width:300px}.user-image-button{position:relative;display:grid;place-items:center;aspect-ratio:1;min-width:0;width:100%;padding:0;border:1px solid #e4cddd;border-radius:10px;overflow:hidden;background:#ede2ef;box-shadow:none;cursor:zoom-in;color:#775e80}.user-image-button .user-attachment-image{display:block;width:100%!important;height:100%!important;max-width:none;object-fit:cover;border-radius:0}.user-image-button .user-attachment-image[hidden]{display:none}.user-image-state{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:10px;background:#f8eef5e8;font-size:10px;line-height:1.6;white-space:normal;text-align:center;overflow-wrap:anywhere}.user-image-state[hidden]{display:none}.user-image-expand{position:absolute;bottom:6px;right:6px;width:23px;height:23px;padding:5px;border-radius:7px;background:#ffffffdc;color:#896b94;pointer-events:none}.user-image-expand svg{display:block;width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.7}.user-image-button[aria-busy="true"] .user-image-expand{opacity:.4}.vision-progress{font-size:11px;color:#806488;background:#faf2f9}
@media(max-width:720px){.chat-page .composer-tools{gap:7px}.chat-page .composer-tools .reply-hint{display:none}.attachment-tray{padding-bottom:10px}.attachment-draft-list{gap:7px;max-width:360px}.attachment-draft-preview{height:65px!important}.attachment-tray-heading{font-size:10px;max-width:360px}.attachment-draft-name,.attachment-draft-state,.attachment-draft-action{font-size:10px}.attachment-draft-action{min-height:28px}.attachment-remove{width:26px;height:26px}.user-attachment-gallery{gap:5px;width:min(270px,100%)}.user-attachment-gallery:has(.user-image-button:only-child){max-width:210px}.user-image-state{font-size:10px;padding:6px}.user-image-expand{width:20px;height:20px;padding:4px;bottom:5px;right:5px}.attachment-drop-hint strong{font-size:14px}.attachment-drop-hint span{font-size:10px}}
.chat-page .game-catalog-list .preset-card.active:after{display:none}

/* Chat reliability, accessible message actions and first-visit guide. */
.chat-page .bubble-wrap{position:relative;min-width:0}.chat-page .meta{display:flex;align-items:center;gap:6px;min-height:22px}.chat-page .msg.user .meta{justify-content:flex-end}.message-more{display:inline-grid;place-items:center;flex:0 0 24px;width:24px;height:22px;margin-left:3px;padding:0;border:0;border-radius:6px;background:transparent;color:#9c88a3;font-size:17px;line-height:1;box-shadow:none}.message-more:hover,.message-more:focus-visible{background:#f0e5ee;color:#7b5f87}.message-failure-marker{position:absolute;left:-29px;top:38px;display:grid;place-items:center;width:22px;height:22px;padding:0;border:0;border-radius:50%;background:#d96270;color:white;font:700 15px/1 sans-serif;box-shadow:0 2px 7px #d9627025}.message-failure-marker:hover{background:#bf4354}.message-pending-label{font-size:9px;color:#9a829d}.message-failed .bubble{border-color:#e9bac6}.message-menu{position:fixed;z-index:150;min-width:158px;max-width:calc(100vw - 16px);padding:6px;border:1px solid #eadde9;border-radius:12px;background:#fffdfef7;box-shadow:0 10px 35px #54355424;backdrop-filter:blur(16px)}.message-menu[hidden]{display:none}.message-menu button{display:block;width:100%;min-height:38px;padding:9px 13px;border:0;border-radius:7px;text-align:left;background:transparent;color:#66516f;font-size:12px;box-shadow:none}.message-menu button:hover,.message-menu button:focus-visible{background:#f8edf5}.message-menu button.danger{color:#bd526b}.message-menu button:disabled{opacity:.42;cursor:default}.user-guide{position:fixed;inset:0;margin:auto;width:min(620px,calc(100vw - 32px));max-height:min(86dvh,780px);padding:26px;border:1px solid #eadbe8;border-radius:23px;background:#fffcfe;color:#65526e;box-shadow:0 20px 70px #53385930;overflow:auto;overscroll-behavior:contain}.user-guide::backdrop{background:#49384f66;backdrop-filter:blur(4px)}.user-guide-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:15px}.user-guide-heading small{display:block;color:#b387a5;font-size:10px;letter-spacing:1.5px;margin-bottom:9px}.user-guide-heading h2{font-size:21px;font-weight:500;line-height:1.5;margin:0}.user-guide-heading .icon-btn{flex:0 0 30px;font-size:22px}.user-guide-intro{font-size:12px;line-height:1.9;margin:15px 0 20px;color:#8a738e}.user-guide-steps{list-style:none;counter-reset:guide;padding:0;margin:0;display:grid;gap:16px}.user-guide-steps li{position:relative;padding-left:34px;counter-increment:guide}.user-guide-steps li:before{content:counter(guide,decimal-leading-zero);position:absolute;left:0;top:1px;display:grid;place-items:center;width:24px;height:24px;border-radius:8px;background:#f3e6f1;color:#a378a0;font-size:10px}.user-guide-steps strong{display:block;font-size:13px;font-weight:500;margin-bottom:5px}.user-guide-steps p{margin:0;font-size:12px;line-height:1.9;color:#84728c}.user-guide-done{display:block;width:100%;margin-top:24px}.chat-page .tool-icon:focus-visible,.message-more:focus-visible,.message-failure-marker:focus-visible,.message-menu button:focus-visible{outline:2px solid #bf8fb6;outline-offset:3px}.chat-page .msg.user .bubble-wrap{max-width:min(600px,calc(100% - 78px))}
@media(max-width:720px){.message-more{min-width:28px;min-height:26px}.chat-page .meta{min-height:26px}.message-failure-marker{top:43px;left:-27px;width:21px;height:21px}.message-menu button{min-height:44px;font-size:14px}.user-guide{padding:21px 18px;width:calc(100vw - 24px);max-height:88dvh;border-radius:20px}.user-guide-heading h2{font-size:18px}.user-guide-steps p{font-size:13px}.user-guide-steps strong{font-size:14px}.user-guide-steps{gap:20px}.chat-page .msg.user .bubble-wrap{max-width:calc(100% - 69px)}}
.chat-delete-dialog{width:min(430px,calc(100vw - 32px));max-height:85dvh;overflow:auto;padding:26px;border:1px solid #eddce7;border-radius:22px;background:#fffcfe;color:#66516f;box-shadow:0 22px 70px #50314c38}.chat-delete-dialog::backdrop{background:#49384f66;backdrop-filter:blur(4px)}.chat-delete-symbol{display:grid;place-items:center;width:40px;height:40px;margin-bottom:15px;border-radius:13px;background:#fbe8ee;color:#c16b85}.chat-delete-symbol svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.chat-delete-dialog h2{margin:0 0 11px;font-size:19px;font-weight:500;line-height:1.5}.chat-delete-dialog p{margin:0;font-size:13px;line-height:1.9;color:#88718a}.chat-delete-dialog .chat-delete-progress{margin-top:13px;color:#b66e8e;font-size:12px}.chat-delete-progress[hidden]{display:none}.chat-delete-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}.chat-delete-actions .btn{min-width:95px;min-height:41px;padding:10px 16px;font-size:12px}.chat-delete-actions .chat-delete-confirm{background:#c46e88;color:#fff}.chat-delete-actions .chat-delete-confirm:hover:not(:disabled){background:#b55b78}.chat-delete-actions .btn:disabled{opacity:.55;cursor:wait}.chat-delete-actions .btn:focus-visible{outline:2px solid #ae739c;outline-offset:3px}@media(max-width:720px){.chat-delete-dialog{padding:22px;width:calc(100vw - 28px);border-radius:19px}.chat-delete-dialog h2{font-size:18px}.chat-delete-actions .btn{flex:1;min-height:45px;font-size:14px}.chat-delete-actions{margin-top:22px}}
/* Soft outer glow for primary actions and small chat controls. */
:is(.home-page,.chat-page,.novel-page) :is(.btn,.send-wechat,.icon-btn,.tool-icon,.voice-quick-toggle,.message-more,.message-menu button){
  --button-glow:213,132,167;
  --button-glow-radius:22px;
  transition:background-color .2s ease,color .2s ease,border-color .2s ease,box-shadow .22s ease,transform .2s ease;
}
:is(.home-page,.chat-page,.novel-page) :is(.btn.secondary,.btn.teal,.icon-btn,.tool-icon,.voice-quick-toggle,.message-more,.message-menu button){
  --button-glow:167,135,193;
  --button-glow-radius:16px;
}
:is(.home-page,.chat-page,.novel-page) :is(.btn.danger,.chat-delete-confirm,.message-menu button.danger){
  --button-glow:196,110,136;
}
@media (hover:hover) and (pointer:fine){
  :is(.home-page,.chat-page,.novel-page) :is(.btn,.send-wechat,.icon-btn,.tool-icon,.voice-quick-toggle,.message-more,.message-menu button):not(:disabled):not([aria-disabled="true"]):hover{
    box-shadow:0 0 0 1px rgba(var(--button-glow),.16),0 0 var(--button-glow-radius) rgba(var(--button-glow),.32),0 5px 14px rgba(var(--button-glow),.14);
  }
}
:is(.home-page,.chat-page,.novel-page) :is(.btn,.send-wechat,.icon-btn,.tool-icon,.voice-quick-toggle,.message-more,.message-menu button):not(:disabled):not([aria-disabled="true"]):focus-visible{
  box-shadow:0 0 0 1px rgba(var(--button-glow),.16),0 0 var(--button-glow-radius) rgba(var(--button-glow),.32),0 5px 14px rgba(var(--button-glow),.14);
}

/* History navigation and user-managed memories keep the existing chat layout. */
.chat-page .chat{grid-template-rows:81px auto minmax(0,1fr) auto}
.history-tools{display:flex;align-items:center;gap:7px;min-height:38px;padding:4px 19px;border-bottom:1px solid #f3eaf2;background:#fffcfe;font-size:10px;color:#96829d}
.history-tools>span{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.history-tool{padding:6px 9px;min-height:29px;border:1px solid transparent;border-radius:8px;background:transparent;color:#9b729e;font-size:11px;white-space:nowrap;cursor:pointer}
.history-tool:hover:not(:disabled),.history-tool:focus-visible{background:#f8edf5;border-color:#edd6e8;box-shadow:0 0 13px #d692bd24}
.history-tool:disabled{opacity:.5;cursor:default}.chat-page .messages{overflow-anchor:none}
.companion-dialog{position:fixed;inset:0;margin:auto;width:min(650px,calc(100vw - 32px));max-height:min(86dvh,820px);padding:24px;border:1px solid #eadbe8;border-radius:23px;background:#fffcfe;color:#65526e;box-shadow:0 20px 70px #53385930;overflow:auto;overscroll-behavior:contain}
.companion-dialog::backdrop{background:#49384f66;backdrop-filter:blur(4px)}
.companion-dialog-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:18px}.companion-dialog-heading h2{font-size:20px;font-weight:500;margin:0 0 6px}.companion-dialog-heading p{font-size:12px;color:#98809d;margin:0}.companion-dialog-heading .icon-btn{flex:0 0 31px;font-size:23px}
.companion-dialog label{display:block;font-size:12px;color:#8b718f;margin-bottom:6px}.companion-dialog input,.companion-dialog textarea{width:100%;font-size:13px;border:1px solid #eadde9;border-radius:10px;background:white;padding:10px 12px;color:#66516f}.companion-dialog textarea{resize:vertical;min-height:82px;max-height:220px}.companion-dialog .btn{font-size:12px;min-height:38px;padding:9px 14px}.companion-dialog [hidden]{display:none!important}
.history-date-fields{display:grid;grid-template-columns:1fr 1fr auto;align-items:end;gap:9px;margin-top:12px}.history-date-fields label{margin:0}.history-date-fields input{margin-top:6px;min-width:0}.dialog-status{font-size:12px;color:#9b7c9c;line-height:1.7;margin:16px 0 12px;overflow-wrap:anywhere}
.history-search-results,.memory-list{display:grid;gap:10px}.history-search-item,.memory-item{border:1px solid #eddfeb;border-radius:12px;padding:13px 15px;background:#fff}.history-search-meta{font-size:10px;color:#ad8da9;margin-bottom:7px}.history-search-item p,.memory-item>p{font-size:13px;line-height:1.9;white-space:pre-wrap;overflow-wrap:anywhere;margin:0;color:#756079}.dialog-more{display:block;margin:15px auto 0}.companion-dialog-footer{display:flex;justify-content:flex-end;margin-top:18px;padding-top:15px;border-top:1px solid #efe3ed}
.memory-entry{margin-top:18px;padding-top:16px;border-top:1px solid var(--line)}.profile .memory-entry .btn{display:flex;width:100%;justify-content:space-between;align-items:center;color:#916e9a;font-size:12px;background:#faf3fa;border-color:#eadceb}.memory-entry p{font-size:10px;color:#99819f;line-height:1.8;margin-top:7px}.memory-explanation{font-size:12px;line-height:1.9;margin:0 0 18px;color:#947a98}.memory-editor-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:10px}.memory-source-notice{font-size:11px;color:#a3819f;line-height:1.8;margin:7px 0}.memory-item-foot{display:flex;align-items:center;gap:6px;margin-top:8px}.memory-item-foot small{font-size:10px;flex:1;color:#a28ba7}.memory-remove{color:#bd758b}.history-tool:focus-visible{outline:2px solid #bf8fb6;outline-offset:2px}
@media(max-width:720px){.chat-page .chat{grid-template-rows:71px auto minmax(0,1fr) auto}.history-tools{padding:3px 9px;gap:2px;min-height:37px}.history-tool{padding:6px;min-height:31px;font-size:11px}.history-tools>span{font-size:9px}.companion-dialog{width:calc(100vw - 24px);padding:20px 16px;max-height:88dvh;border-radius:20px}.companion-dialog-heading h2{font-size:18px}.companion-dialog input,.companion-dialog textarea{font-size:16px}.history-date-fields{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.history-date-fields .btn{grid-column:1/-1}.companion-dialog .btn{min-height:41px}.history-search-item,.memory-item{padding:12px}.memory-item-foot{flex-wrap:wrap}.memory-item-foot small{flex-basis:100%}.memory-item-foot .history-tool{margin-left:auto}.memory-item-foot .memory-remove{margin-left:0}}
