@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');
.creator-library-header{display:flex;align-items:center;gap:20px;padding:30px 25px;margin:25px 0 12px;border:1px solid #3c304b;border-radius:15px;background:linear-gradient(120deg,#282034,#191923)}.creator-library-avatar{height:72px;width:72px;flex-shrink:0;border-radius:50%;display:grid;place-items:center;background:#473154;color:#d9b7ee;font:700 28px Manrope}.creator-library-header h2{margin:0 0 8px;font-size:22px}.creator-library-header p{color:#d0bcde;font-size:13px;margin:0 0 10px}.creator-library-header>.secondary{margin-left:auto;white-space:nowrap}.your-character-gallery .portrait-grid{grid-template-columns:repeat(auto-fill,minmax(185px,1fr));gap:17px}.your-character-gallery .portrait-cover{height:315px}.your-character-gallery .portrait-caption{padding:50px 14px 14px}.your-character-gallery .portrait-caption h3{font-size:15px}.your-character-gallery .portrait-caption p{-webkit-line-clamp:2}.ip-card-label{display:block;color:#d5b6eb;font-size:10px;margin:5px 0;overflow-wrap:anywhere}.ip-fields{border:1px solid #4a365d;border-radius:12px;background:#211a2b;padding:20px;margin:24px 0}.ip-fields h2{margin-top:0}.ip-fields select{margin-bottom:0}.ip-fields .small{line-height:1.8}@media(max-width:700px){.creator-library-header{padding:20px;gap:13px;flex-wrap:wrap}.creator-library-header>.secondary{margin-left:0}.creator-library-avatar{width:55px;height:55px}.your-character-gallery .portrait-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.your-character-gallery .portrait-cover{height:290px}}@media(max-width:380px){.your-character-gallery .portrait-grid{grid-template-columns:1fr}}
.story-mode .story-profile{overflow:hidden}.small-avatar-settings{display:flex;align-items:center;gap:17px;border:1px solid #4e3c60;border-radius:12px;padding:17px;margin:22px 0;background:#231a2e}.small-avatar-settings .story-round-avatar{width:64px;height:64px;flex-shrink:0}.small-avatar-settings b{font-size:13px}.small-avatar-settings p{font-size:11px;line-height:1.7;margin:6px 0 10px}.small-avatar-settings .secondary{padding:8px 12px;font-size:12px}
.avatar-edit-button{width:100%;height:100%;padding:0;display:grid;place-items:center;border-radius:50%;overflow:hidden;position:relative;background:transparent;color:inherit;font:inherit}.avatar-edit-button img{width:100%;height:100%;object-fit:cover}.avatar-edit-button:hover:after{content:'✎';position:absolute;inset:0;display:grid;place-items:center;background:#1c1128a6;color:white;font-size:17px}.avatar-edit-button:focus-visible{outline:2px solid #e1b6ff;outline-offset:-3px}#small-portrait-editor{max-width:480px}#small-portrait-editor .dialog-top h2{font-size:19px}#small-portrait-editor p{line-height:1.8}#small-portrait-editor input[type=range]{padding:0;accent-color:#bb9bea}#small-portrait-editor .portrait-cancel[aria-label]{font-size:25px;color:#c5b1d4}.portrait-crop-stage{display:flex;justify-content:center;margin:20px 0}.portrait-crop-stage canvas{width:210px;height:210px;border-radius:50%;border:2px solid #ac85c7;background:#25192f;box-shadow:0 0 0 7px #a177b41a}#small-portrait-editor .dialog-actions{flex-wrap:wrap}
.mobile-profile-button{display:none}@media(max-width:650px){.mobile-profile-button{display:block;padding:6px;font-size:10px}.story-mode .story-profile.mobile-profile-visible{display:flex;position:absolute;left:0;top:0;bottom:0;width:min(310px,90%);z-index:12;box-shadow:15px 0 40px #0009}}
.portrait-card{position:relative}.card-hover-panel{position:absolute;inset:0 0 46px;z-index:3;background:linear-gradient(155deg,#211b2df5,#100f18fa);padding:18px;display:flex;flex-direction:column;gap:10px;opacity:0;visibility:hidden;transform:translateY(12px);transition:opacity .18s ease,transform .18s ease,visibility .18s;pointer-events:none}.portrait-card:hover:not(.preview-dismissed) .card-hover-panel,.portrait-card:focus-within:not(.preview-dismissed) .card-hover-panel,.portrait-card.preview-open .card-hover-panel{opacity:1;visibility:visible;transform:translateY(0);pointer-events:auto}.hover-panel-title{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.hover-panel-title h3,.hover-panel-title h2{margin:0;line-height:1.45;overflow-wrap:anywhere}.hover-panel-title h3{font-size:16px}.preview-close{font-size:22px;color:#c2adc9;padding:0 3px;line-height:1}.creator-preview{display:flex;align-items:center;gap:10px;background:#ffffff08;border:1px solid #ffffff08;padding:11px;border-radius:10px}.creator-avatar{width:33px;height:33px;border-radius:50%;display:grid;place-items:center;background:#4b3657;color:#e2c9ef;font-size:14px;flex-shrink:0}.creator-preview small{display:block;color:#a89ab5;font-size:10px;margin-bottom:4px}.creator-preview b{display:block;font-size:12px;color:#e4d6ec;overflow-wrap:anywhere}.hover-intro-scroll{overflow-y:auto;min-height:0;flex:1;overscroll-behavior:contain;scrollbar-color:#72577d transparent;padding-right:7px;white-space:pre-wrap;font-size:12px;line-height:1.8;color:#c5b8ce}.hover-intro-scroll h4{margin:0 0 10px;color:#e4d4ed;font-size:12px}.card-hover-panel>.primary{padding:9px 12px;font-size:11px}.card-hover-panel>.copy-character-id{text-align:left;align-self:flex-start;padding:0}.portrait-footer .row{gap:10px}.portrait-footer .preview-toggle{font-size:10px}.story-profile{position:relative}.story-profile-toggle{position:absolute;top:12px;right:12px;z-index:7;background:#14101dcc;border:1px solid #81658f77;color:#dfc9e9;padding:7px 10px;border-radius:18px;font-size:10px;backdrop-filter:blur(8px)}.story-profile-preview{position:absolute;inset:27% 0 0;z-index:6;background:linear-gradient(#17111df5,#100d16);border-top:1px solid #72507e44;padding:23px 20px;display:flex;flex-direction:column;gap:14px;opacity:0;visibility:hidden;transform:translateY(20px);transition:opacity .2s ease,transform .2s ease,visibility .2s;pointer-events:none}.story-profile:hover:not(.preview-dismissed) .story-profile-preview,.story-profile:focus-within:not(.preview-dismissed) .story-profile-preview,.story-profile.profile-preview-open .story-profile-preview{opacity:1;visibility:visible;transform:translateY(0);pointer-events:auto}.story-profile-preview h2{font-size:19px}.story-profile-preview>.copy-character-id{align-self:flex-start}.story-profile-intro{flex:1;overflow:auto;min-height:0;white-space:pre-wrap;line-height:1.9;font-size:13px;color:#c3b5cd;scrollbar-color:#72577d transparent;padding-right:8px;overscroll-behavior:contain}.story-profile-intro h3{font-size:14px;color:#e1cee9;margin:2px 0 12px}.story-profile-preview .creator-preview{padding:13px}.preview-toggle{white-space:nowrap}@media(prefers-reduced-motion:reduce){.card-hover-panel,.story-profile-preview{transition:none;transform:none}}@media(hover:none){.portrait-card:hover:not(.preview-open):not(:focus-within) .card-hover-panel{opacity:0;visibility:hidden;pointer-events:none}}@media(max-width:650px){.card-hover-panel{padding:13px;gap:8px}.creator-preview{padding:8px}.hover-intro-scroll{font-size:11px}}
.lore-reading-panel{height:380px;max-height:55dvh;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:8px 18px 12px 4px;margin-top:17px;border-top:1px solid #50415d66;scrollbar-color:#715780 #1a1622}.lore-reading-panel p{line-height:1.95;margin:16px 0;color:#c2b7cd;overflow-wrap:anywhere}.lore-reading-panel h3{font-size:13px;letter-spacing:1.1px;line-height:1.7;color:#ddc6f0;margin:29px 0 12px}.lore-reading-panel .lore-description{color:#dfccec;font-style:italic}.lore-reading-panel:focus-visible{outline:2px solid #b699d5;outline-offset:4px}@media(max-width:650px){.lore-reading-panel{height:320px;padding-right:10px}}
.world-art .world-cover-image{width:100%;height:100%;object-fit:cover;display:block}.lore-gallery-cover{display:block;width:100%;height:auto;object-fit:contain;border-radius:14px;border:1px solid #584264;margin-top:22px}@media(max-width:650px){.lore-gallery-cover{height:auto}}
.copy-character-id{display:inline-block;cursor:pointer;color:#c0a6d3;font-size:11px;font-family:inherit;font-variant-numeric:tabular-nums;padding:3px 0;background:none;border:0;border-radius:3px}.copy-character-id:hover{color:#e5d1f6;text-decoration:underline}.copy-character-id:focus-visible{outline:2px solid #c3a0ea;outline-offset:3px}
.story-mode .story-stage{grid-template-columns:260px minmax(0,1fr) 250px;position:relative}.story-cast-panel{background:#100d18e6;border-left:1px solid #ffffff12;padding:26px 20px;overflow:auto;min-width:0}.story-cast-panel>h2{font-size:17px;margin:18px 0 14px;display:flex;align-items:center;justify-content:space-between}.story-cast-panel>h2>span{background:#302539;color:#c4add8;font-size:11px;border-radius:20px;padding:4px 8px}.story-cast-person{display:flex;align-items:flex-start;gap:11px;padding:18px 0;border-bottom:1px solid #ffffff0c}.story-cast-person>div:last-child{min-width:0}.story-cast-person h3{font-size:13px;line-height:1.6;margin:0 0 4px;overflow-wrap:anywhere}.story-cast-person p{font-size:10px;line-height:1.7;margin:3px 0;color:#aa98b7}.story-cast-person .cast-role{color:#c3b0d4}.story-cast-person .cast-id{font-variant-numeric:tabular-nums;color:#ad93c0}.story-cast-person .story-round-avatar{width:38px;height:38px}.cast-player-section{margin-top:30px}.cast-list-toggle{display:none}@media(min-width:1600px){.story-mode .story-stage{grid-template-columns:340px minmax(0,1fr) 280px}}@media(max-width:1100px){.story-mode .story-stage{grid-template-columns:210px minmax(0,1fr) 210px}.story-cast-panel{padding:23px 14px}.story-cast-person{gap:8px}}@media(max-width:950px){.story-mode .story-stage{grid-template-columns:230px minmax(0,1fr)}.story-cast-panel{display:none;position:absolute;right:0;top:0;bottom:0;width:270px;z-index:5;background:#14101df7;box-shadow:-15px 0 45px #0009}.story-stage.cast-visible .story-cast-panel{display:block}.cast-list-toggle{display:block;font-size:10px;padding:7px 10px;margin-left:auto}.story-type-controls{margin-left:0}}@media(max-width:650px){.story-mode .story-stage{grid-template-columns:minmax(0,1fr)}.cast-list-toggle{padding:6px}.story-topbar>span{display:none}}
.narration-button{border:1px solid #715d80;border-radius:8px;padding:7px 10px;color:#d2b9e3;font:700 20px Georgia,serif;line-height:1}.narration-button:hover{background:#46304f}
.story-mode .story-stage{background:radial-gradient(ellipse at 80% 25%,#49304566,transparent 70%),linear-gradient(115deg,#17121b,#261b29)}.story-mode .story-stage.mafia{background:radial-gradient(ellipse at 85% 20%,#642b2344,transparent 65%),linear-gradient(115deg,#171117,#301f1d)}.story-mode .story-stage.vampire{background:radial-gradient(ellipse at 80% 20%,#601c3444,transparent 60%),linear-gradient(115deg,#150e16,#2e1823)}.story-mode .story-composer textarea{min-height:43px;height:43px}
.story-start-label{display:block;font-size:15px;color:#b5a9c7;font-weight:400;margin-bottom:7px}.story-start-name{display:block;font-size:25px}.selected-companions{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:10px}.companion-chip{display:flex;align-items:center;gap:9px;background:#382b4b;border:1px solid #6a4f88;border-radius:20px;padding:7px 11px;font-size:12px}.companion-chip small{color:#bba7d0;font-variant-numeric:tabular-nums}.companion-chip button{font-size:18px;padding:0 2px}#companion-results{border:1px solid #4a3c60;border-radius:9px;background:#161520;max-height:230px;overflow:auto;padding:5px;margin-top:7px}#companion-results button{width:100%;display:flex;align-items:center;justify-content:space-between;text-align:left;padding:12px;border-radius:6px;gap:10px}#companion-results button:hover,#companion-results button[aria-selected=true]{background:#393044}#companion-results small,.character-code{color:#b3a6c4;font-size:10px;font-variant-numeric:tabular-nums}.story-mode .sidebar,.story-mode main>header{display:none}.story-mode #content.chat-content{padding:0 22px 22px;max-width:none}.story-mode{background:#09090d}.story-topbar{height:62px;display:flex;align-items:center;gap:18px;font-size:11px;letter-spacing:1px;color:#c6b9d2}.story-back{background:#202025;border-radius:50%;width:35px;height:35px;font-size:21px}.story-type-controls{margin-left:auto;display:flex;align-items:center;gap:7px;letter-spacing:0}.story-type-controls label{margin:0 5px 0 0;color:#b6a8c4;font-size:11px}.story-type-controls button{border:1px solid #403744;border-radius:7px;padding:6px 10px}.story-type-controls select{width:80px;margin:0;padding:6px;font-size:12px}.story-stage{height:calc(100dvh - 84px);min-height:500px;border:1px solid #3b2d3d;border-radius:20px;overflow:hidden;display:grid;grid-template-columns:310px minmax(0,1fr);background:radial-gradient(ellipse at 80% 25%,#49304566,transparent 70%),linear-gradient(115deg,#17121b,#261b29);color:#eee9ef}.story-stage.mafia{background:radial-gradient(ellipse at 85% 20%,#642b2344,transparent 65%),linear-gradient(115deg,#171117,#301f1d)}.story-stage.vampire{background:radial-gradient(ellipse at 80% 20%,#601c3444,transparent 60%),linear-gradient(115deg,#150e16,#2e1823)}.story-profile{background:#0b0b0ee6;border-right:1px solid #4b35474d;overflow:auto;display:flex;flex-direction:column}.story-portrait{min-height:250px;height:52%;flex-shrink:0;position:relative}.story-portrait:after{content:'';position:absolute;inset:70% 0 0;background:linear-gradient(transparent,#0b0b0e)}.story-portrait img{width:100%;height:100%;object-fit:cover;object-position:top}.story-portrait-empty{height:100%;background:radial-gradient(ellipse at 50% 40%,#71547955,transparent 75%),linear-gradient(125deg,#29202d,#15131c);display:flex;flex-direction:column;justify-content:center;align-items:center;color:#a88db9}.story-portrait-empty span{font-size:115px;opacity:.45}.story-portrait-empty p{font:600 20px Manrope}.story-profile-info{padding:20px;margin-top:auto}.story-profile-info h2{font-size:20px;margin:0 0 8px}.story-tags{display:flex;gap:7px;flex-wrap:wrap}.story-tags>span{background:#9c8a9d24;border:1px solid #ccb9cb1a;border-radius:5px;font-size:10px;padding:4px 7px;color:#c1b5c2}.story-facts{display:flex;margin:25px 0;gap:12px}.story-facts>div{flex:1;min-width:0;text-align:center;border-right:1px solid #322933}.story-facts>div:last-child{border:0}.story-facts b{font-size:13px;overflow-wrap:anywhere}.story-facts small{display:block;color:#948898;font-size:10px;margin-top:7px}.story-lore{font-size:11px;color:#a696ad;line-height:1.8}.story-lore summary{cursor:pointer;color:#c8b7d1}.story-lore textarea{min-height:100px;font-size:12px}.story-conversation{display:flex;flex-direction:column;min-width:0;min-height:0}.story-chat-header{height:72px;flex-shrink:0;padding:12px 24px;display:flex;align-items:center;gap:12px;border-bottom:1px solid #ffffff0a;background:#100d1222}.story-chat-header small{display:block;color:#a698ae;font-size:11px;margin-top:5px}.story-chat-header #undo-turn{margin-left:auto;font-size:11px}.story-round-avatar{flex-shrink:0;width:34px;height:34px;border-radius:50%;overflow:hidden;background:#46344d;display:grid;place-items:center;font-weight:600;color:#c7afd8;font-size:15px}.story-round-avatar img{width:100%;height:100%;object-fit:cover}.story-mode .story-transcript{min-height:0;max-height:none;flex:1;overflow:auto;padding:25px 32px;margin:0;scrollbar-color:#685161 transparent}.story-introduction{max-width:750px;margin:0 auto 30px;text-align:center}.story-introduction h2{font-size:22px;margin:4px 0 10px}.story-introduction .story-tags{justify-content:center;margin:18px 0}.story-intro{background:#08070aaa;border:1px solid #8e6e821a;border-radius:15px;text-align:left;padding:15px 18px;font-size:var(--story-font);line-height:1.7;color:#d2c9d4;margin-top:22px}.story-intro summary{cursor:pointer;font-size:13px;display:block;color:#b3a4b8}.story-intro summary b{color:#e2d7e8;margin-right:8px}.story-intro p{white-space:pre-wrap}.story-disclosure{font-size:11px;color:#b4a1bb;margin:25px 0}.story-message-row{display:flex;align-items:flex-start;gap:12px;max-width:780px;margin:0 auto 24px}.story-bubble{background:#09080bd9;border:1px solid #ffffff05;border-radius:19px;padding:20px 23px;max-width:88%;min-width:0}.story-message-author{display:block;color:#c2a7d2;font-size:10px;letter-spacing:1px;margin-bottom:10px}.story-message-text{font-size:var(--story-font);line-height:1.85;white-space:pre-wrap;overflow-wrap:anywhere;color:#eee8ef}.story-narration{font-style:italic;color:#ac9bb5}.story-message-row.user{flex-direction:row-reverse}.story-message-row.user .story-bubble{background:#32243cbd}.story-message-row.user .story-message-author{color:#c8b8de}.story-composer-area{flex-shrink:0;padding:10px 26px 15px;max-width:100%;background:linear-gradient(transparent,#0a080b44)}.story-cast-chips{display:flex;gap:7px;flex-wrap:wrap;max-width:780px;margin:0 auto 10px}.story-cast-chips>span{border:1px solid #89758c66;background:#0c090f55;color:#c2b0cb;padding:6px 11px;font-size:10px;border-radius:18px}.story-mode .story-composer{display:flex;gap:12px;align-items:center;max-width:780px;margin:auto;border:1px solid #947e9766;background:#08070bad;border-radius:15px;padding:11px 14px}.story-composer textarea{min-height:43px;height:43px;max-height:140px;padding:9px 4px;flex:1;font-size:var(--story-font);line-height:1.5}.story-send{font-size:25px;color:#c7accf;padding:5px 10px}.story-composer-hint{font-size:9px;text-align:center;color:#9a88a3;margin-top:8px}@media(min-width:1600px){.story-stage{grid-template-columns:380px minmax(0,1fr)}.story-portrait{height:65%}}@media(max-width:950px){.story-stage{grid-template-columns:240px minmax(0,1fr)}.story-mode .story-transcript{padding:20px 15px}.story-bubble{padding:16px;max-width:90%}.story-message-row{gap:8px}.story-profile-info{padding:17px}.story-topbar>span .small{display:none}}@media(max-width:650px){.story-mode #content.chat-content{padding:0 8px 8px}.story-topbar{height:54px;gap:9px}.story-topbar>span{font-size:9px}.story-type-controls{gap:3px}.story-type-controls label{display:none}.story-type-controls select{width:65px}.story-type-controls button{padding:5px}.story-stage{grid-template-columns:1fr;height:calc(100dvh - 62px);min-height:400px;border-radius:13px}.story-profile{display:none}.story-chat-header{height:65px;padding:10px 14px}.story-chat-header b{font-size:12px}.story-chat-header #undo-turn{font-size:10px}.story-composer-area{padding:8px 12px}.story-bubble{max-width:90%;padding:14px}.story-round-avatar{width:27px;height:27px}.story-introduction h2{font-size:19px}.story-mode .story-transcript{padding:18px 12px}}
.field-counter{text-align:right;font-size:11px;color:#b4a9c5;padding:7px 2px 0;font-variant-numeric:tabular-nums}.field-counter.at-limit{color:#efbd85}
[hidden]{display:none!important}.vampire{background:radial-gradient(ellipse at 65% 25%,#b9567055,transparent),linear-gradient(135deg,#371a2f,#171324);color:#edb3bd}.admin-banner{border:1px solid #a78451;border-radius:14px;padding:24px;display:flex;justify-content:space-between;gap:24px;align-items:center;background:linear-gradient(120deg,#342b24,#221d2b)}.admin-banner h2{margin-top:0}.admin-banner p{color:#c6b99f;line-height:1.8}.admin-lore-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.admin-enabled header{border-bottom-color:#ba8d45}.admin-enabled #engine-badge:before{content:'ADMIN · ';color:#f0c782}@media(max-width:700px){.admin-lore-grid{grid-template-columns:1fr}.admin-banner{display:block}.admin-banner button{margin-top:12px}}
.fantasy{background:radial-gradient(ellipse at 70% 25%,#be94e655,transparent),linear-gradient(135deg,#24302d,#392e50);color:#d9c3ed}.superhero{background:radial-gradient(ellipse at 65% 25%,#619de955,transparent),linear-gradient(135deg,#183956,#38264c);color:#b7d1f6}.account-panel{border:1px solid #504263;border-radius:14px;padding:26px;background:linear-gradient(115deg,#282033,#1a1c28);margin:25px 0}.account-panel h2{margin:0 0 10px}.account-panel p{line-height:1.8}.persona-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.persona-grid .persona-card{margin:0;overflow-wrap:anywhere}.persona-grid .persona-card>p{clear:both}.selected-persona{border-color:#bd9aff;box-shadow:inset 0 0 0 1px #bd9aff33}.google-setup{padding:15px 0}.google-setup summary{cursor:pointer;color:#c3a6f0}#google-signin{margin:18px 0}nav{overflow-y:auto}nav button{flex-shrink:0}@media(max-width:700px){.persona-grid{grid-template-columns:1fr}nav{overflow-x:auto}nav button{white-space:nowrap}}
.ghostwriter-panel{max-width:985px;border:1px solid #74578e;border-radius:16px;padding:27px;margin:0 0 35px;background:radial-gradient(ellipse at 95% 0,#75539a33,transparent 65%),#1c1928}.ghostwriter-panel h2{font-size:24px;margin:8px 0}.ghostwriter-panel .subtitle{margin-top:8px;max-width:760px;font-size:13px}.ghostwriter-panel label{font-weight:600}.ghost-options{display:grid;grid-template-columns:1fr 1fr;gap:20px}.ghost-options select{margin-bottom:0}.ghostwriter-panel>textarea{min-height:100px}.ghostwriter-panel>.small{line-height:1.8}.ghostwriter-panel .row{margin-top:18px}#ghost-status{padding-top:8px;color:#cbb6eb;white-space:pre-wrap}#character-form[inert]{opacity:.55}@media(max-width:600px){.ghostwriter-panel{padding:20px}.ghost-options{grid-template-columns:1fr;gap:0}}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.lore-summary{border:1px solid #353044;border-radius:12px;margin:22px 0;padding:18px;color:#b7b1c6;line-height:1.8}.lore-summary summary{cursor:pointer;color:#ddd4ef}.lore-summary summary span{margin-left:18px}.gallery-tools{display:flex;gap:14px;margin-top:25px}.gallery-tools input{flex:1;border-radius:30px;padding-left:20px;background:#1e1e29}.gallery-tools select{width:150px;margin:0;border-radius:30px}.filter-chips{display:flex;gap:9px;flex-wrap:wrap;margin:20px 0 24px}.filter-chip{background:#252530;padding:10px 18px;border-radius:24px;color:#bcb5cb}.filter-chip.selected{background:#e9e0ff;color:#251937}.portrait-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:19px}.portrait-card{border:1px solid #302b3d;border-radius:15px;overflow:hidden;background:#1b1a24}.portrait-cover{display:block;position:relative;width:100%;height:345px;overflow:hidden;text-align:left}.portrait-cover>img{width:100%;height:100%;object-fit:cover;transition:transform .3s}.portrait-cover:hover>img{transform:scale(1.04)}.portrait-fallback{position:absolute;inset:0;display:grid;place-items:center;font:600 90px Manrope;color:#d1bedf55}.no-portrait{position:absolute;top:20px;left:20px;right:20px;font-size:10px;color:#d1c5dd99}.portrait-caption{position:absolute;bottom:0;left:0;right:0;padding:65px 18px 18px;background:linear-gradient(transparent,#0c0b12f5)}.portrait-caption h3{color:white;font-size:18px}.portrait-caption p{font-size:12px;color:#c4bdcc;line-height:1.6;margin:7px 0 0;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.portrait-footer{display:flex;justify-content:space-between;align-items:center;padding:14px 17px;font-size:11px;color:#a99eb9}.creator-layout{display:grid;grid-template-columns:minmax(0,650px) minmax(220px,300px);gap:35px;align-items:start}.creator-heading{margin-bottom:30px}.creator-fields{min-width:0}.creator-fields>label{font-weight:600;margin-top:26px}.creator-fields h2{font-size:18px;margin:27px 0 12px}.gender-options{display:flex;gap:10px;margin:10px 0}.gender-options button{flex:1}.gender-options .selected{background:#453355;border-color:#ad82f3;color:#e8d8ff}.appearance-upload{display:flex;gap:20px;align-items:center}.upload-tile{cursor:pointer;margin:0;width:180px;min-height:105px;border:1px solid #806295;border-radius:12px;background:linear-gradient(120deg,#372542,#282031);display:flex;flex-direction:column;justify-content:center;align-items:center;gap:10px;position:relative;overflow:hidden}.upload-tile>span{font-size:25px}.upload-tile input{position:absolute;inset:0;opacity:0;cursor:pointer}.information-card{background:#1d1d28;padding:24px;border:1px solid #2e2b3b;border-radius:14px}.information-card label{font-weight:600}.information-card input,.information-card textarea{background:#2a2935;border-color:#383441}.information-card textarea{min-height:130px}.field-help{color:#9c95ab;font-size:12px;line-height:1.7;margin:5px 0 12px}.permission-box{display:flex;justify-content:space-between;gap:15px;padding:17px;border:1px solid #66527e;border-radius:10px}.lore-picker{background:#20202b;border:1px solid #3b344c;border-radius:12px;padding:17px}.lore-toggle{display:flex;justify-content:space-between;width:100%;padding:0;color:#e0d3f4;text-align:left}.lore-toggle span{color:#ba9af0;font-size:12px}#attached-lore{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.lore-option{display:flex;gap:12px;align-items:flex-start;padding:13px 0;border-top:1px solid #393144}.lore-option input{width:16px;margin-top:3px;accent-color:#bb9cf7}.lore-option small{display:block;line-height:1.7;color:#9991a9;margin-top:6px}.creator-actions{display:flex;justify-content:flex-end;gap:14px;margin-top:30px}.character-preview{position:sticky;top:30px;background:#20202a;border:1px solid #383143;border-radius:18px;padding:22px}.character-preview #portrait-preview{height:340px;width:100%;border:0;overflow:hidden;background:linear-gradient(160deg,#35303d,#15151d);margin:20px 0}.character-preview #portrait-preview img{height:100%;width:100%;object-fit:cover;border:0;border-radius:14px}.preview-silhouette{font-size:210px;color:#5b506766}.character-preview h2{font-size:22px}.character-preview p{font-size:12px;line-height:1.8;color:#b4a9c5;overflow-wrap:anywhere}.world-art{width:100%}.world-art:hover{filter:brightness(1.15)}@media(max-width:1000px){.creator-layout{grid-template-columns:minmax(0,1fr) 220px;gap:20px}.character-preview{padding:15px}.character-preview #portrait-preview{height:250px}}@media(max-width:750px){.creator-layout{display:flex;flex-direction:column}.creator-fields{width:100%}.character-preview{position:static;width:100%;order:-1}.character-preview #portrait-preview{height:180px}.portrait-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.portrait-cover{height:300px}.gallery-tools select{width:110px}.information-card{padding:18px}}@media(max-width:400px){.portrait-grid{grid-template-columns:1fr}.appearance-upload{gap:10px}.upload-tile{width:140px}}
.persona-portrait{width:104px;height:104px;object-fit:cover;border-radius:14px;border:1px solid #66517e;display:block}.persona-card>.persona-portrait{float:left;margin:0 22px 14px 0}.persona-card{display:flow-root}.persona-details{color:#cbb5ff!important}.identity-fields{display:grid;grid-template-columns:1fr 1fr;gap:15px}.portrait-editor{display:flex;gap:18px;align-items:center}.portrait-editor>div:last-child{flex:1;min-width:0}#portrait-preview{width:104px;min-height:104px;flex-shrink:0;display:grid;place-items:center;border:1px dashed #554663;border-radius:14px;text-align:center}.portrait-editor input{padding:8px;font-size:11px}#image-status:empty{display:none}@media(max-width:450px){.identity-fields{grid-template-columns:1fr}.portrait-editor{align-items:flex-start}.persona-card>.persona-portrait{float:none;margin-bottom:18px}}
:root{color-scheme:dark;--bg:#101119;--panel:#171923;--line:#2b2c3b;--muted:#9699ac;--text:#efeff6;--accent:#b6a0ff}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:14px 'DM Sans',sans-serif}button,input,textarea,select{font:inherit}button,a,input,textarea,select{outline-offset:4px}button{cursor:pointer;border:0;color:inherit;background:none}a{color:inherit;text-decoration:none}.app{display:flex;min-height:100vh}.sidebar{width:250px;flex-shrink:0;padding:32px 22px;border-right:1px solid var(--line);display:flex;flex-direction:column;position:sticky;top:0;height:100vh;background:#12131c}.brand{font:800 25px Manrope,sans-serif;letter-spacing:-1px;display:flex;gap:10px;align-items:center}.prism{color:#c6adff;font-size:37px}.edition{font-size:8px;letter-spacing:2px;color:var(--muted);margin:8px 0 32px 3px}.primary{background:#b9a3ff;color:#211438;border-radius:9px;padding:13px 20px;font-weight:700}.primary:hover{background:#cbbaff}.new-story{width:100%;text-align:left;margin-bottom:34px}.nav-label,.eyebrow{font-size:10px;letter-spacing:2px;color:var(--muted);font-weight:700}.nav-label{padding-left:13px;margin-bottom:12px}nav button{width:100%;display:flex;gap:14px;align-items:center;text-align:left;padding:14px 12px;color:var(--muted);border-radius:8px;margin-bottom:5px}nav button.active{background:#282337;color:#cbb5ff}.sidebar-bottom{margin-top:auto}.private-card{padding:17px 12px;border:1px solid var(--line);border-radius:10px;font-size:12px}.private-card p{font-size:11px;color:var(--muted);line-height:1.8;margin-bottom:0}.status-dot{display:inline-block;width:6px;height:6px;background:#9ac7ae;border-radius:50%;margin-right:7px}.settings-btn{font-size:11px;color:var(--muted);padding:22px 0}.version{display:block;font-size:8px;letter-spacing:1.5px;color:#686c80}main{flex:1;min-width:0}header{height:80px;border-bottom:1px solid var(--line);padding:0 44px;display:flex;align-items:center;justify-content:space-between;font-size:12px;color:var(--muted)}.header-right{display:flex;align-items:center;gap:22px}#engine-badge{font-size:9px;letter-spacing:1px;border:1px solid #524533;background:#29251f;color:#d2bd91;border-radius:5px;padding:6px 10px}.avatar{border:1px solid #4a405f;background:#2d253c;color:#d8c3ff;width:34px;height:34px;display:grid;place-items:center;border-radius:50%;font-size:9px}#content{padding:40px 44px;max-width:1500px;margin:auto}h1,h2,h3{font-family:Manrope,sans-serif}h1{font-size:36px;letter-spacing:-1.5px;font-weight:600;margin:12px 0}h2{font-size:22px;font-weight:600;letter-spacing:-.5px}h3{font-size:18px;margin:9px 0}.subtitle{color:var(--muted);line-height:1.8;max-width:640px}.hero{position:relative;overflow:hidden;min-height:290px;border:1px solid #4b415f;border-radius:15px;margin-top:28px;padding:32px;background:radial-gradient(ellipse at 90% 0%,#54426155,transparent 60%),linear-gradient(115deg,#252333,#202333 50%,#393342)}.hero-text{position:relative;z-index:1;max-width:65%}.hero h2{font-size:34px;line-height:1.2;margin:15px 0}.hero p{color:#bdb8cd;line-height:1.8;max-width:390px}.tag{font-size:9px;letter-spacing:1px;border:1px solid #67607066;padding:5px 8px;border-radius:5px;display:inline-block;margin-right:5px;color:#d0c6e1}.hero-art{position:absolute;right:4%;bottom:0;width:32%;height:100%;opacity:.6;display:flex;align-items:flex-end;gap:7px;transform:perspective(700px) rotateY(-15deg)}.tower{background:linear-gradient(90deg,#292838,#676077);border:1px solid #a89bb74d;flex:1;height:60%;position:relative;box-shadow:15px 0 40px #0006}.tower:nth-child(2){height:85%;clip-path:polygon(0 18%,50% 0,100% 18%,100% 100%,0 100%)}.tower:nth-child(3){height:70%}.tower:after{content:'';position:absolute;inset:35% 18% 0;background:repeating-linear-gradient(0deg,transparent 0 22px,#d5b89066 23px 29px);opacity:.6}.section-heading{display:flex;justify-content:space-between;align-items:center;margin:32px 0 18px}.section-heading h2{margin:0;font-size:18px}.small{font-size:12px;color:var(--muted)}.world-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.world-card{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--panel)}.world-art{height:135px;position:relative;overflow:hidden;display:grid;place-items:center}.world-art span{font-family:serif;font-size:78px;opacity:.35;text-shadow:0 0 40px currentColor}.college{background:radial-gradient(ellipse at 70% 20%,#b3896c55,transparent),linear-gradient(135deg,#29393e,#3c3048);color:#e8d4b8}.mafia{background:radial-gradient(ellipse at 70% 40%,#99473555,transparent),linear-gradient(135deg,#30212c,#191b29);color:#d9a79b}.werewolf{background:radial-gradient(circle at 70% 25%,#c1c8c744,transparent 27%),linear-gradient(135deg,#263c39,#15212a);color:#bddec8}.world-body{padding:20px}.world-body p{color:var(--muted);font-size:12px;line-height:1.7;min-height:40px}.card-bottom{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--line);padding-top:15px;margin-top:19px}.text-button{color:#c6adff;font-size:12px;font-weight:600}.secondary{border:1px solid var(--line);border-radius:8px;padding:10px 15px;color:#cfcbdc;background:#20212e}.secondary:hover{border-color:#9d85d9}.notice{padding:15px 18px;border:1px solid #494130;background:#29251d66;color:#c8ba9c;border-radius:9px;font-size:12px;line-height:1.7;margin:20px 0}.character-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:18px}.character{padding:25px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}.character p{color:var(--muted);line-height:1.8}.initials{height:45px;width:45px;border-radius:12px;background:#383048;display:grid;place-items:center;color:#d0b8ff;font:600 18px Manrope}.row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.spread{justify-content:space-between}.persona-card{border:1px solid #594770;background:linear-gradient(110deg,#282033,#1b1c29);padding:24px;border-radius:12px;margin:25px 0}.persona-card p{color:var(--muted);line-height:1.7}.story-item{padding:22px;background:var(--panel);border:1px solid var(--line);border-radius:12px;margin:15px 0}.story-item h3{margin-top:0}.chat-layout{display:grid;grid-template-columns:minmax(0,1fr) 245px;gap:24px}.chat-main{min-width:0}.chat-head{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);padding-bottom:20px}.chat-head h2{margin:7px 0}.transcript{min-height:250px;max-height:53vh;overflow-y:auto;padding:25px 6px;scroll-behavior:smooth}.message{margin-bottom:25px;line-height:1.9;white-space:pre-wrap;color:#d3d0df}.message .speaker{font-size:10px;font-weight:700;letter-spacing:1.5px;display:block;margin-bottom:7px;color:#bda7ed}.message.user{background:#252235;border:1px solid #3e3455;border-radius:10px;padding:17px 20px;margin-left:8%}.message.user .speaker{color:#a4b8d6}.composer{padding:15px;border:1px solid #514466;border-radius:12px;background:#1c1b29}.composer textarea{border:0;background:none;resize:vertical;min-height:65px;margin:0}.composer-footer{display:flex;justify-content:space-between;align-items:center;gap:12px}.chat-side{border-left:1px solid var(--line);padding-left:23px}.chat-side h3{font-size:14px;margin:20px 0 12px}.cast-mini{padding:12px 0;border-bottom:1px solid var(--line)}.cast-mini b{display:block;margin-bottom:5px}.cast-mini span{font-size:11px;color:var(--muted);line-height:1.6}.chat-side textarea{font-size:12px;min-height:150px}.settings-panel{max-width:720px;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:26px;margin-top:25px}label{display:block;color:#c8c4d6;font-size:12px;margin:18px 0 8px}input,textarea,select{width:100%;border:1px solid #393747;background:#11121b;color:var(--text);border-radius:7px;padding:12px}textarea{resize:vertical;min-height:90px;line-height:1.6}select{margin-bottom:15px}dialog{max-width:570px;width:calc(100% - 32px);max-height:90vh;background:#1b1b28;border:1px solid #554663;border-radius:15px;color:var(--text);padding:26px}dialog::backdrop{background:#06070cd9;backdrop-filter:blur(5px)}.dialog-top,.dialog-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}.dialog-top h2{margin:0}.dialog-top .close{font-size:27px;color:var(--muted)}.dialog-actions{justify-content:flex-end;margin-top:24px}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#e1d5ff;color:#231937;padding:12px 22px;border-radius:9px;display:none;z-index:10;max-width:90%;box-shadow:0 8px 40px #0007}button:disabled{opacity:.5;cursor:wait}.empty{padding:50px;text-align:center;color:var(--muted)}.field-pair{display:grid;grid-template-columns:1fr 100px;gap:15px}.danger{color:#e4a7a7}.divider{border:0;border-top:1px solid var(--line);margin:25px 0}code{font-size:12px;color:#d6c1ff}#connection-result{line-height:1.7;color:var(--muted)}@media(min-width:1450px){#content{padding-top:50px}.hero{min-height:330px}.world-art{height:175px}}@media(max-width:1050px){.sidebar{width:210px;padding:25px 16px}#content{padding:30px 25px}header{padding:0 25px}.world-grid{grid-template-columns:1fr}.world-card{display:grid;grid-template-columns:180px 1fr}.world-art{height:100%}.chat-layout{grid-template-columns:1fr}.chat-side{border-left:0;border-top:1px solid var(--line);padding:15px 0}.hero-text{max-width:78%}}@media(max-width:650px){.app{display:block}.sidebar{width:100%;height:auto;position:static;padding:16px;border-right:0;border-bottom:1px solid var(--line)}.brand{font-size:22px}.edition,.nav-label,.sidebar-bottom,.sidebar .new-story{display:none}nav{display:flex;margin-top:14px;gap:5px}nav button{font-size:11px;padding:10px;gap:6px;margin:0}header{height:55px;padding:0 18px;font-size:10px}#content{padding:25px 18px}h1{font-size:29px}.hero{padding:24px;min-height:290px}.hero-text{max-width:100%}.hero-art{opacity:.15;width:60%}.hero h2{font-size:29px}.world-card{display:block}.world-art{height:120px}.character-grid{grid-template-columns:1fr}.section-heading{gap:12px}.chat-head{align-items:flex-start;gap:10px}.chat-head .row{gap:6px}.chat-head button{font-size:11px;padding:8px}.composer-footer .small{font-size:10px}.header-right{gap:10px}}

.world-card button.world-art{padding:0;border:0;line-height:0}.world-card .world-art:has(.world-cover-image){background:transparent}.world-card .world-cover-image{display:block;width:100%;height:100%;object-fit:cover}
.save-reminder{position:sticky;top:10px;z-index:8;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 18px;margin:0 0 20px;border:1px solid #c19a52;border-radius:12px;background:#33291e;color:#ffe1ab;box-shadow:0 6px 20px #0005}.save-reminder[hidden]{display:none}.creator-layout>.save-reminder{grid-column:1/-1}.save-reminder button{white-space:nowrap}
.guide-card{max-width:900px;background:#1c1b28;border:1px solid #373342;border-radius:16px;padding:26px;margin:24px 0;line-height:1.8}.guide-definitions{margin:0}.guide-definitions dt{font-weight:700;color:#d9c4ff;margin-top:26px}.guide-definitions dd{margin:8px 0 24px;color:#c3bfce}.guide-example{padding:14px 18px;background:#101018;border-radius:9px;white-space:normal;color:#e0d8ee}.guide-card details{padding:16px 0;border-top:1px solid #373342}.guide-card summary{cursor:pointer;font-weight:600}.story-narrator{color:#c6b4f2;background:#a889ee12;border-radius:5px;padding:2px 4px;font-style:normal}
.story-mode .story-composer .composer-persona{position:relative;flex:0 0 44px;width:44px;height:44px;padding:0;border:2px solid #bc9ee5;border-radius:50%;background:#302139;display:grid;place-items:center;color:#e7d6ff;font-size:20px}.composer-persona>img{width:100%;height:100%;object-fit:cover;border-radius:50%}.composer-persona .persona-chevron{position:absolute;bottom:-5px;right:-5px;font-size:12px;background:#302139;border-radius:50%;width:18px;height:18px}.story-cast-chips>button{display:flex;align-items:center;gap:7px;border:1px solid #79677c;background:#17101d;color:#bbacbf;border-radius:24px;padding:5px 10px;font-size:11px}.story-cast-chips>button[aria-pressed=true]{border-color:#c9a2ed;background:#4d345d;color:#fff;box-shadow:0 0 0 1px #c9a2ed33}.story-cast-chips>.recipient-label{border:0;background:none;padding:8px 3px}.recipient-avatar{width:24px;height:24px;border-radius:50%;overflow:hidden;display:grid;place-items:center;background:#3c294b}.recipient-avatar img{width:100%;height:100%;object-fit:cover}.message-recipients{display:block;font-size:10px;color:#b9a5ca;margin-top:10px}#story-persona-picker{width:min(540px,92vw);max-height:80dvh;overflow-y:auto;padding:25px;border:1px solid #51425f;border-radius:20px;background:#201e2a;color:#eee8f5}#story-persona-picker::backdrop{background:#0009}.story-persona-choices{display:grid;gap:12px;margin:20px 0}.story-persona-choice{display:flex;align-items:center;gap:14px;width:100%;text-align:left;padding:14px;border:1px solid transparent;border-radius:14px;background:#2d2a38;color:#eee8f5}.story-persona-choice[aria-pressed=true]{border-color:#d0b1f0;background:#3b2d49}.picker-portrait{width:62px;height:62px;flex-shrink:0;overflow:hidden;border-radius:12px;background:#4e3c5d;display:grid;place-items:center;font-size:24px}.picker-portrait img{width:100%;height:100%;object-fit:cover}.story-persona-choice>span:nth-child(2){min-width:0;flex:1}.story-persona-choice b{font-size:16px}.story-persona-choice small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#bfb1cc;margin-top:6px}@media(max-width:650px){.story-mode .story-composer{gap:7px;padding:9px}.story-mode .story-composer .composer-persona{width:35px;height:35px;flex-basis:35px}.story-cast-chips{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px}.story-cast-chips>button{flex-shrink:0}}
.world-art.pirate,.portrait-cover.pirate{background:radial-gradient(ellipse at 65% 15%,#d4ab6555,transparent 50%),linear-gradient(150deg,#163e55,#071b2a 70%,#153c47)}.world-art.historical-romance,.portrait-cover.historical-romance{background:radial-gradient(ellipse at 30% 20%,#edc6a455,transparent 55%),linear-gradient(145deg,#593748,#282133 70%,#423145)}.world-art.cyberpunk,.portrait-cover.cyberpunk{background:linear-gradient(125deg,#07383f,#18192f 45%,#491b5144),repeating-linear-gradient(90deg,#32dedc33 0 2px,transparent 2px 40px)}.world-art.pirate>span,.world-art.historical-romance>span,.world-art.cyberpunk>span{font-size:86px;text-shadow:0 4px 25px #0006}.story-stage.pirate{background:radial-gradient(ellipse at top,#1b3c4b,#0d111c 80%)}.story-stage.historical-romance{background:radial-gradient(ellipse at top,#49303d,#15101c 80%)}.story-stage.cyberpunk{background:radial-gradient(ellipse at top left,#10383b,transparent 70%),radial-gradient(ellipse at bottom right,#3b1746,#10101b 80%)}
.compact-lore-picker{border:1px solid #454052;border-radius:14px;background:#191822;overflow:hidden}.compact-lore-picker .lore-toggle{width:100%;display:flex;justify-content:space-between;gap:12px;padding:17px 18px;background:#282334;color:#eee4fa;text-align:left}.compact-lore-picker #attached-lore{display:flex;flex-wrap:wrap;gap:7px;padding:12px 16px;margin:0}.attached-lore-chip{display:flex;align-items:center;gap:10px;padding:7px 10px;border:1px solid #8c71af;border-radius:18px;background:#392d49;color:#e6d9fa;font-size:11px}.compact-lore-picker #lore-options{padding:0 12px 12px}.compact-lore-picker #lore-options[hidden]{display:none}.lore-search-bar{display:flex;gap:8px;align-items:center;padding:8px 0 12px}.lore-search-bar input{margin:0;min-width:0;flex:1}.lore-search-bar button{padding:10px 14px}.lore-option-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:340px;overflow-y:auto;padding:2px 5px 2px 0;scrollbar-width:thin}.lore-option-grid .lore-choice{display:flex;align-items:center;gap:10px;margin:0;padding:12px 10px;border:1px solid #393442;border-radius:10px;background:#24212e;cursor:pointer;min-width:0;min-height:72px}.lore-option-grid .lore-choice[hidden]{display:none}.lore-choice:has(input:checked){border-color:#b18bdf;background:#3c2e4b}.lore-choice:focus-within{outline:2px solid #d9b7ff;outline-offset:-2px}.lore-choice input{width:15px;height:15px;flex:0 0 15px;margin:0;accent-color:#c19bea}.lore-choice-icon{font-size:23px;width:25px;flex:0 0 25px;text-align:center;color:#c9b2e0}.lore-choice-text{min-width:0}.lore-choice-text b{display:block;font-size:12px;line-height:1.4;overflow-wrap:anywhere}.lore-choice-text small{display:block;color:#b9a5cc;font-size:11px;margin-top:5px;line-height:1.3}@media(max-width:500px){.lore-option-grid{grid-template-columns:1fr;max-height:310px}}
#story-persona-picker{box-sizing:border-box;overflow-x:hidden}.story-persona-choices,.story-persona-choice{min-width:0;max-width:100%;box-sizing:border-box}.story-persona-choice>span:nth-child(2){overflow:hidden}.story-persona-choice b{display:block;overflow-wrap:anywhere}.story-persona-choice small{white-space:normal;overflow-wrap:anywhere}
.add-story-cast{margin:18px 0;padding:13px;border:1px solid #4a3b54;border-radius:12px;background:#211927}.add-story-cast label{font-size:12px;margin:0 0 9px;display:block;color:#d5c1e3}.add-story-cast input{width:100%;box-sizing:border-box;margin:0;font-size:12px;min-width:0}.add-story-cast>button{width:100%;font-size:12px;margin-top:10px;padding:9px}.add-story-cast #cast-id-result{font-size:11px;color:#b7a5c2;overflow-wrap:anywhere;margin-top:9px}.cast-match-preview{display:flex;align-items:center;gap:8px}.cast-match-preview img{width:34px;height:34px;object-fit:cover;border-radius:50%}.cast-match-preview b,.cast-match-preview small{display:block}.cast-match-preview small{margin-top:4px}
.story-mode .story-composer textarea#message{height:130px;min-height:130px;max-height:240px;resize:vertical;overflow-y:auto}.story-mode .story-composer{align-items:flex-end}.story-mode .story-composer .composer-persona,.story-mode .story-composer .narration-button,.story-mode .story-composer .story-send{margin-bottom:5px}@media(max-width:650px){.story-mode .story-composer textarea#message{height:100px;min-height:100px;max-height:180px}}
.story-cast-person .remove-story-cast{font-size:11px;color:#d6b3ca;padding:4px 0;margin:0 0 5px;text-align:left}.story-cast-person .remove-story-cast:hover{color:#ffc6dc;text-decoration:underline}
.persona-grid:has(.redesigned-persona-card){display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:20px;align-items:stretch}.persona-grid .redesigned-persona-card{min-width:0;max-width:100%;margin:0;padding:0;overflow:hidden;display:flex;flex-direction:column;border-radius:18px;background:#1d1a28}.redesigned-persona-card .persona-card-image{position:relative;aspect-ratio:1/1;width:100%;background:#292234;display:grid;place-items:center;overflow:hidden}.redesigned-persona-card .persona-card-image>img{width:100%;height:100%;object-fit:cover;object-position:center 25%;border:0;border-radius:0;float:none;margin:0;max-width:none}.persona-card-image>span{font-size:80px;color:#bba0d8}.persona-adjust{position:absolute;bottom:12px;right:12px;border:1px solid #b39acb99;border-radius:20px;padding:8px 12px;background:#181120dd;color:#f0e1ff;font-size:11px}.persona-card-content{padding:20px;display:flex;flex-direction:column;flex:1;min-width:0}.persona-card-content h3{margin:10px 0;font-size:22px;overflow-wrap:anywhere}.persona-status{font-size:10px;text-transform:uppercase;letter-spacing:1.5px;color:#b39acb}.selected-persona .persona-status{color:#d8bdff}.persona-nametag{align-self:flex-start;background:#3e2d50;color:#e0c5f8;padding:5px 10px;border-radius:15px;font-size:12px}.redesigned-persona-card .persona-description-preview{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;font-size:12px;line-height:1.7;margin:0 0 20px}.persona-card-actions{display:flex;align-items:center;gap:18px;margin-top:auto}.persona-card-actions .danger{margin-left:auto}.profile-crop-mode .portrait-crop-stage,.profile-crop-mode #portrait-canvas{border-radius:12px;clip-path:none;mask-image:none}.profile-crop-mode .portrait-crop-stage::after{display:none}
#editor .portrait-editor #portrait-preview.adjustable-persona-image{cursor:pointer;overflow:visible;height:auto;min-height:120px;display:flex;flex-direction:column;align-items:center;gap:8px;border:0;background:none;flex-shrink:0}#editor .adjustable-persona-image .persona-portrait{width:120px;height:120px;object-fit:cover;border-radius:14px;margin:0;float:none;object-position:center}#editor .portrait-adjust-hint{display:block;color:#d5b9f4;font-size:11px;text-align:center;line-height:1.4}#editor .adjustable-persona-image:hover .portrait-adjust-hint{text-decoration:underline}#editor .adjustable-persona-image:focus-visible{outline:2px solid #c5a0ec;outline-offset:5px;border-radius:14px}
.world-art.motorcycle-club,.portrait-cover.motorcycle-club{background:radial-gradient(ellipse at 70% 20%,#c47a3a55,transparent 55%),linear-gradient(145deg,#3b3030,#17191e 70%,#30241b);color:#e3b890}.world-art.furry,.portrait-cover.furry{background:radial-gradient(ellipse at 25% 20%,#dbab8266,transparent 50%),linear-gradient(145deg,#4c4057,#253b3a 70%,#1f293c);color:#ead7bd}.world-art.motorcycle-club>span,.world-art.furry>span{font-size:86px;text-shadow:0 4px 25px #0006}.story-stage.motorcycle-club{background:radial-gradient(ellipse at top,#43302b,#111017 80%)}.story-stage.furry{background:radial-gradient(ellipse at top,#3c354b,#11151c 80%)}
.ensemble-editor{padding:20px;border:1px solid #514061;border-radius:13px;background:#221c2d;margin:24px 0}.ensemble-switch{display:flex;align-items:center;gap:10px;line-height:1.6}.ensemble-switch input{width:auto}.ensemble-member{border:1px solid #4c4058;border-radius:10px;padding:16px;margin:15px 0;background:#191620}.ensemble-member h3{margin:0;font-size:14px}.ensemble-member .field-pair{grid-template-columns:minmax(0,1fr) 95px}.prism-helper-avatar{position:relative;flex:0 0 38px;width:38px;height:42px;border:1px solid #c8a5ff;border-radius:12px;background:linear-gradient(140deg,#8d65cb,#335b8c);color:#fff;box-shadow:0 0 15px #a27be644;padding:0;display:grid;place-items:center}.prism-helper-avatar>span{font-size:31px;line-height:1}.prism-helper-avatar>i{position:absolute;left:12px;top:13px;font-size:10px;font-style:normal;letter-spacing:2px;color:#17112a}.story-cast-chips>.inner-thought-button{border-color:#766087;color:#e3cfff;margin-right:auto}#prism-assistant{width:min(650px,94vw);box-sizing:border-box}#prism-assistant textarea{min-height:140px;box-sizing:border-box}#prism-draft{min-height:230px!important;max-height:45dvh}#prism-assistant #prism-generate{margin-top:14px}.private-thoughts{white-space:pre-wrap;line-height:1.9;max-height:45dvh;overflow:auto;padding:18px;border:1px solid #514061;background:#141019;border-radius:12px}.private-thoughts .story-narration{color:#c6b4d8}@media(max-width:650px){.story-mode .story-composer{flex-wrap:wrap}.story-mode .story-composer textarea#message{flex-basis:calc(100% - 60px)}.story-mode .story-composer .prism-helper-avatar{margin-left:auto}.ensemble-editor{padding:12px}}
.world-art.shifter,.portrait-cover.shifter{background:radial-gradient(ellipse at 75% 20%,#b3a0cc55,transparent 50%),linear-gradient(140deg,#32473e,#22263b 65%,#3c2d49);color:#dac8e8}.story-stage.shifter{background:radial-gradient(ellipse at top,#343b43,#13131f 80%)}
.world-carousel{margin:30px 0 35px;border:1px solid #4a3b59;border-radius:22px;overflow:hidden;background:#191420;box-shadow:0 16px 45px #0002}.world-slide-scene{position:relative;min-height:420px;isolation:isolate;background:#292133;overflow:hidden}.world-slide-art{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 45%;z-index:-3;animation:world-art-reveal .4s ease}.world-slide-fallback{position:absolute;inset:0;display:grid;place-items:center;font-size:170px;opacity:.3;z-index:-3}.world-slide-shade{position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,#110e1bf5 0%,#110e1bd9 28%,#110e1b80 52%,#110e1b05 85%),linear-gradient(0deg,#110e1b70,transparent 45%)}.world-slide-copy{padding:52px 44px;max-width:570px;min-height:420px;box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-start;justify-content:center}.world-slide-kicker{font-size:9px;letter-spacing:2px;color:#d3bddf;font-weight:700;display:flex;flex-wrap:wrap;align-items:center;gap:12px}.world-slide-kicker span{border:1px solid #ddc4ef55;border-radius:18px;padding:6px 10px;letter-spacing:.5px;color:#f1deff;background:#22172b66}.world-slide-copy h2{font-size:clamp(30px,3.2vw,49px);line-height:1.1;letter-spacing:-1.5px;margin:22px 0 16px;color:#fff;text-wrap:balance}.world-slide-copy p{font-size:14px;color:#e1d5e7;line-height:1.8;margin:0 0 25px;max-width:440px}.world-slide-copy .primary{padding:14px 21px}.world-carousel-controls{display:flex;justify-content:space-between;gap:18px;align-items:center;padding:14px 20px;background:#1b1723;border-top:1px solid #44344e}.world-carousel-arrows{display:flex;align-items:center;gap:16px;flex-shrink:0}.world-carousel-arrows button{padding:8px 14px;font-size:18px}.world-carousel-controls select{width:auto;max-width:55%;margin:0;background:#282030;border-color:#51405f;font-size:12px;padding:10px 32px 10px 12px}.world-carousel:focus-visible{outline:2px solid #c5a6f4;outline-offset:4px}@keyframes world-art-reveal{from{opacity:.35}to{opacity:1}}@media(prefers-reduced-motion:reduce){.world-slide-art{animation:none}}@media(max-width:650px){.world-slide-scene{min-height:410px}.world-slide-copy{min-height:410px;max-width:100%;padding:95px 25px 28px;justify-content:flex-end}.world-slide-shade{background:linear-gradient(0deg,#110e1bf5 0%,#110e1bd9 36%,#110e1b40 80%)}.world-slide-art{object-position:65% center}.world-slide-copy h2{font-size:34px;margin-top:16px}.world-slide-copy p{font-size:12px;margin-bottom:18px}.world-slide-kicker{font-size:8px;gap:7px}.world-carousel-controls{padding:12px;gap:10px}.world-carousel-arrows{gap:9px}.world-carousel-controls select{max-width:58%;min-width:0;font-size:11px}.world-carousel{border-radius:16px;margin-top:22px}}
.world-art.angels-demons,.portrait-cover.angels-demons{background:linear-gradient(110deg,#b89a6455,#252033 48%,#652c3444);color:#eddbb8}.story-stage.angels-demons{background:radial-gradient(ellipse at top left,#443849,transparent 70%),radial-gradient(ellipse at bottom right,#4b252c,#14111c 80%)}
.gallery-tools #character-search{min-width:0}.gallery-tools #gallery-gender{width:165px;flex-shrink:0}.gallery-tools #gallery-sort{flex-shrink:0}@media(max-width:750px){.gallery-tools{flex-wrap:wrap}.gallery-tools #character-search{flex-basis:100%;width:100%}.gallery-tools #gallery-gender,.gallery-tools #gallery-sort{flex:1;width:auto;min-width:120px}}
.ensemble-id-picker{border:1px solid #665077;background:#191520;padding:16px;border-radius:12px;margin:18px 0}.ensemble-id-picker label{margin-top:0}.ensemble-id-picker .row{flex-wrap:nowrap}.ensemble-id-picker input{min-width:0;flex:1}.ensemble-id-picker button{white-space:nowrap}.ensemble-id-picker #ensemble-id-match{margin-top:10px;color:#d4b9f2}
.story-emphasis,.story-emphasis em{font-weight:700;font-style:italic}.story-message-text .story-emphasis{color:inherit}
.story-bubble[data-message-index]{cursor:pointer}.story-bubble[data-message-index]:focus-visible{outline:2px solid #c4a3f0;outline-offset:4px}.message-action-preview{max-height:110px;overflow:auto;white-space:pre-wrap;font-size:12px;line-height:1.7;color:#b9a9c5;background:#13101b;border-radius:10px;padding:14px}.message-action-buttons{display:grid;gap:10px;margin:18px 0}.message-action-buttons>button{text-align:left;padding:16px}.message-action-buttons small{display:block;color:#afa0bd;font-size:11px;margin-top:7px;font-weight:400}#message-actions textarea{min-height:170px}#message-actions p{line-height:1.7}

.ensemble-editor .party-share-option{display:flex;align-items:flex-start;gap:12px;margin:20px 0 6px;padding:16px 16px 0;border:1px solid #514061;border-bottom:0;border-radius:10px 10px 0 0;background:#191620;line-height:1.6;cursor:pointer}.ensemble-editor .party-share-option input[type="checkbox"]{appearance:auto;flex:0 0 17px;width:17px;height:17px;min-height:0;padding:0;margin:3px 0 0;accent-color:#b99bfa}.ensemble-editor .party-share-option span{min-width:0;overflow-wrap:anywhere}.ensemble-editor .party-share-help{margin:-6px 0 18px;padding:9px 16px 16px 45px;border:1px solid #514061;border-top:0;border-radius:0 0 10px 10px;background:#191620;white-space:normal;line-height:1.7;overflow-wrap:anywhere}

.chat-loading-spinner {
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  box-sizing: border-box;
  border: 2px solid #786482;
  border-top-color: #ead4f5;
  border-radius: 50%;
  vertical-align: -0.05em;
  animation: chat-loading-spin 0.8s linear infinite;
}
@keyframes chat-loading-spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) {
  .chat-loading-spinner { animation: none; }
}

.story-reply-loading { display: flex; align-items: center; gap: 12px; width: fit-content; max-width: 100%; margin: 12px 0 18px; padding: 12px 16px; border: 1px solid #6a507e; border-radius: 12px; background: #2b2035; color: #ead4f5; font-size: 14px; }
.story-reply-loading .chat-loading-spinner { flex: 0 0 18px; width: 18px; height: 18px; }

#private-scene { width: auto; max-width: 45%; margin: 0 8px; padding: 7px 9px; font-size: 12px; }
#message-actions.message-context-menu {
  position: fixed;
  inset: var(--message-menu-top, 12px) auto auto var(--message-menu-left, 12px);
  margin: 0;
  width: min(190px, calc(100vw - 24px));
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid #4e4353;
  border-radius: 14px;
  background: #17131a;
}
#message-actions.message-context-menu::backdrop { background: transparent; backdrop-filter: none; }
.message-context-menu .message-action-buttons { display: grid; gap: 2px; }
.message-context-menu button { padding: 11px 12px; text-align: left; background: transparent; border-radius: 8px; color: inherit; }
.message-context-menu button:hover, .message-context-menu button:focus-visible { background: #33283c; }
.message-context-menu #message-action-status:empty { display: none; }

.story-mode .story-composer .story-composer-controls {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.story-mode .story-composer-controls > button {
  flex: 0 0 auto;
  margin: 0;
}
@media (max-width: 650px) {
  .story-mode .story-composer { flex-wrap: nowrap; }
  .story-mode .story-composer textarea#message { flex: 1 1 0; min-width: 0; }
}

.settings-btn[hidden] { display: none; }

.account-photo { width: 64px; height: 64px; flex: 0 0 64px; border-radius: 50%; background: #38294b; display: grid; place-items: center; overflow: hidden; }
.account-photo img { width: 100%; height: 100%; object-fit: cover; }
.account-folder-tabs { display:flex; flex-wrap:wrap; gap:6px; border-bottom:1px solid #786194; margin-top:18px; }
.account-folder-tabs button { border:1px solid #554566; border-bottom:0; border-radius:12px 12px 0 0; padding:11px 20px; background:#251d30; color:#e6dbf4; }
.account-folder-tabs button[aria-pressed=true] { background:#bba0fa; color:#1c1426; }
.character-feedback { width:min(620px, 94vw); max-height:85dvh; overflow:auto; box-sizing:border-box; }
.feedback-messages { max-height:36dvh; overflow:auto; margin:12px 0; }
.feedback-messages article { padding:12px 0; border-bottom:1px solid #514061; }
.feedback-messages p { white-space:pre-wrap; overflow-wrap:anywhere; }
.space-header { padding: 8px 0 0; margin-bottom: 24px; background: radial-gradient(ellipse at 48% 30%, #2d1e413d, transparent 72%); }
.space-header h1 { margin: 0 0 22px; font-size: clamp(2rem, 4vw, 3rem); }
.space-profile-row { gap: 22px; align-items: center; }
.space-profile-info h2 { margin: 6px 0 2px; }
.space-profile-info p { margin: 0; color: #beb1cd; overflow-wrap: anywhere; }
.space-private-badge { display: inline-block; padding: 4px 10px; border: 1px solid #544564; border-radius: 20px; color: #d6c2ee; font-size: 12px; }
.space-avatar-control { position: relative; flex: none; }
.space-avatar-control .account-photo { width: clamp(74px, 10vw, 120px); height: clamp(74px, 10vw, 120px); box-sizing: border-box; border: 3px solid #c7a8f2; font-size: 32px; }
.space-photo-edit { position: absolute; right: 0; bottom: 0; display: grid; place-items: center; width: 34px; height: 34px; margin: 0; border-radius: 50%; background: #d6baf9; color: #20162b; cursor: pointer; }
.space-avatar-control:focus-within .space-photo-edit { outline: 2px solid white; outline-offset: 2px; }
.space-sign-out { margin-left: auto; }
.space-folder-tabs { gap: 8px; margin-top: 24px; }
.space-folder-tabs button { display: flex; align-items: center; gap: 10px; padding: 12px clamp(10px, 2vw, 28px); }
.space-folder-icon { position: relative; width: 17px; height: 12px; border: 1.5px solid currentColor; border-radius: 2px; }
.space-folder-icon::before { content: ''; position: absolute; top: -5px; left: -1.5px; width: 8px; height: 4px; border: 1.5px solid currentColor; border-bottom: 0; border-radius: 2px 2px 0 0; }
.space-character-heading h2, .space-character-heading p { margin: 0; }
.space-character-heading p { margin-top: 4px; }
.space-character-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.space-character-card { min-width: 0; border: 1px solid #544564; border-radius: 14px; background: #231e2e; }
.space-character-art { display: grid; place-items: center; padding: 0; width: 100%; aspect-ratio: 1.6; overflow: hidden; border-radius: 13px 13px 0 0; background: radial-gradient(at top, #523766, #21182d); color: #ddc7f5; font-size: 42px; }
.space-character-art img { width: 100%; height: 100%; min-height: 0; object-fit: cover; object-position: center top; }
.space-card-caption { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; }
.space-card-caption h3, .space-card-caption p { margin: 0; overflow-wrap: anywhere; }
.space-card-actions { position: relative; flex: none; }
.space-card-actions summary { display: grid; place-items: center; width: 32px; height: 32px; cursor: pointer; list-style: none; font-size: 22px; }
.space-card-actions summary::-webkit-details-marker { display: none; }
.space-card-actions > div { position: absolute; z-index: 2; right: 0; width: max-content; padding: 6px; border: 1px solid #645277; border-radius: 10px; background: #21192a; box-shadow: 0 8px 22px #100b19aa; }
.space-card-actions button { display: block; width: 100%; padding: 8px 10px; text-align: left; }
.character-detail-layout { display:grid; grid-template-columns:minmax(150px, .9fr) minmax(200px, .9fr) minmax(300px, 1.6fr); align-items:start; gap:24px; margin-top:20px; }
.character-detail-art { aspect-ratio: 3/5; display:grid; place-items:center; overflow:hidden; border-radius:16px; background:#292033; font-size:48px; }
.character-detail-art img { width:100%; height:100%; min-height:0; object-fit:cover; }
.character-detail-info h1,.character-feedback-panel h2 { margin-top:0; }
.character-detail-intro { line-height:1.65; overflow-wrap:anywhere; margin:18px 0; }
.character-feedback-panel { min-width:0; padding:20px; border:1px solid #544564; border-radius:14px; background:linear-gradient(145deg,#292132,#1a1622); }
.character-feedback-panel form { border:1px solid #514061; border-radius:10px; padding:12px; }
.character-feedback-panel textarea { min-height:90px; }
@media(max-width:1100px){.character-detail-layout{grid-template-columns:minmax(130px,1fr) minmax(0,2fr)}.character-feedback-panel{grid-column:1/-1}}
@media(max-width:560px){.character-detail-layout{grid-template-columns:minmax(0,1fr)}.character-detail-art{aspect-ratio:4/3}.character-feedback-panel{padding:12px}}
.header-account-controls { display:flex; align-items:center; gap:12px; }
.header-popover { position:relative; }
.header-popover summary { display:flex; align-items:center; gap:7px; padding:4px; cursor:pointer; list-style:none; }
.header-popover summary::-webkit-details-marker { display:none; }
.header-popover-panel { position:absolute; right:0; top:calc(100% + 6px); z-index:40; min-width:170px; padding:12px; border:1px solid #514061; border-radius:10px; background:#231c2d; }
.header-popover-panel p { margin:6px 0 0; }
.header-profile-avatar { position:relative; width:28px; height:28px; overflow:hidden; }
.header-profile-avatar:empty::before,.header-profile-avatar:empty::after { content:''; position:absolute; background:#c4b7d2; }
.header-profile-avatar:empty::before { width:7px; height:7px; border-radius:50%; top:5px; }
.header-profile-avatar:empty::after { width:13px; height:7px; border-radius:8px 8px 4px 4px; bottom:5px; }
.header-profile-avatar img { width:100%; height:100%; object-fit:cover; }
.header-bell { position:relative; width:12px; height:13px; font-size:0; border:1.5px solid currentColor; border-radius:8px 8px 3px 3px; }
.header-bell::after { content:''; position:absolute; bottom:-4px; left:3px; width:4px; height:2px; border-radius:50%; background:currentColor; }
.space-character-grid,
.persona-grid:has(.redesigned-persona-card) {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 16px;
}
.persona-grid .redesigned-persona-card { border-radius: 14px; }
.redesigned-persona-card .persona-card-image { aspect-ratio: 1.6; }
.redesigned-persona-card .persona-card-image > img { min-height: 0; object-position: center top; }
.redesigned-persona-card .persona-card-content { padding: 14px 16px; }
.redesigned-persona-card .persona-card-content h3 { margin: 4px 0; font-size: 18px; }
.redesigned-persona-card .persona-description-preview { -webkit-line-clamp: 2; margin-bottom: 10px; }
.redesigned-persona-card .persona-card-actions { gap: 8px; flex-wrap: wrap; }
#portrait-canvas { cursor: grab; touch-action: none; } #portrait-canvas:active { cursor: grabbing; }
.creator-directory { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,275px),1fr)); gap:16px; margin-top:20px; }
.creator-directory-card { display:flex; flex-direction:column; gap:12px; padding:20px; border:1px solid #514061; border-radius:16px; background:linear-gradient(145deg,#292334,#1b1824); }
.creator-directory-heading { display:flex; align-items:center; gap:16px; margin-bottom:12px; }
.creator-directory-heading h1,.creator-directory-heading h2,.creator-directory-card p { margin:0; overflow-wrap:anywhere; }
.creator-directory-avatar { display:grid; place-items:center; flex:0 0 76px; width:76px; height:76px; border:1px solid #866aa0; border-radius:50%; overflow:hidden; background:#392a49; font-size:26px; }
.creator-directory-avatar img,.creator-directory-preview img { width:100%; height:100%; object-fit:cover; }
.creator-directory-preview { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; border-top:1px solid #514061; padding-top:12px; }
.creator-directory-preview > div { display:grid; place-items:center; aspect-ratio:4/5; overflow:hidden; border-radius:9px; background:#392a49; }
.creator-directory-preview img { object-position:center top; }
.creator-directory-card > button { margin-top:auto; }
#creator-collection { margin-top:18px; }
@media (min-width: 761px) {
  .sidebar {
    background: linear-gradient(to bottom, #12131c 31%, transparent 72%, #12131c66),
      url('/assets/sidebar-castle.png') center bottom / 100% auto no-repeat #12131c;
  }
}
.saved-controls { display:flex; align-items:center; gap:5px; flex:none; }
.saved-icon { display:grid; place-items:center; width:30px; height:30px; padding:0; border:1px solid #514061; border-radius:8px; color:#dbc8ef; background:#211a2a; }
.saved-favorite { font-size:20px; }
.saved-icon[aria-pressed=true] { color:#e1baff; background:#463158; }
.saved-bookmark span { display:block; width:10px; height:14px; background:currentColor; clip-path:polygon(0 0,100% 0,100% 100%,50% 73%,0 100%,0 0,15% 14%,15% 77%,50% 55%,85% 77%,85% 14%,15% 14%); }
.saved-bookmark[aria-pressed=true] span { clip-path:polygon(0 0,100% 0,100% 100%,50% 73%,0 100%); }
.portrait-footer:has(.saved-controls) { flex-wrap:wrap; gap:6px; }
.creator-directory-heading:has(.saved-controls) { flex-wrap:wrap; }
.space-card-caption:has(.saved-controls) { flex-wrap:wrap; }
.portrait-small-preview { display:grid; justify-items:center; align-content:center; gap:8px; color:#bcaecb; font-size:12px; }
.portrait-crop-stage { align-items:center; gap:16px; }
.portrait-crop-stage .portrait-small-preview canvas { width:42px; height:42px; border-width:1px; box-shadow:none; }
#portrait-zoom-value { margin-left:8px; color:#cdb7e9; }
#portrait-reset-framing { margin-top:10px; }
.creator-directory-summary { flex: 1 1 110px; min-width: 0; }
.creator-directory-card .creator-directory-bio { margin-top: 6px; color: #d5c9e1; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.creator-directory-card .creator-directory-open { width: 100%; min-height: 40px; border: 1px solid #c5a5ee; border-radius: 10px; background: #443455; color: #f5ebff; font-weight: 700; }
.creator-directory-card .creator-directory-open:hover, .creator-directory-card .creator-directory-open:focus-visible { background: #59436f; }
#creator-bio { min-height: 56px; }
.creator-directory-card { gap: 14px; }
.creator-directory-card .creator-directory-heading { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: start; gap: 14px; margin: 0; }
.creator-directory-card .creator-directory-avatar { width: 64px; height: 64px; }
.creator-directory-summary h2 { font-size: 20px; line-height: 1.25; }
.creator-directory-card > p.small { padding: 10px 0 0; border-top: 1px solid #514061; }
.creator-directory-card .creator-directory-preview { padding-top: 0; border-top: 0; }
.creator-directory-actions { display: flex; align-items: stretch; gap: 8px; margin-top: auto; }
.creator-directory-card .creator-directory-open { width: auto; flex: 1; min-width: 0; padding: 8px; background: #5a4270; }
.creator-directory-actions .saved-icon { width: 34px; height: 40px; }
.space-profile-panel { display:grid; grid-template-columns:minmax(220px, 1fr) minmax(260px, 1.45fr); gap:24px; max-width:940px; padding:24px; border:1px solid #493b59; border-radius:16px; background:#1e1928; }
.space-profile-panel .space-profile-row { display:flex; flex-direction:column; align-items:flex-start; gap:12px; min-width:0; }
.space-profile-panel .space-sign-out { margin:0; }
.space-profile-panel #creator-visibility { width:auto; max-width:100%; margin:8px 0 0; background:#2b2137; }
.space-profile-panel form { min-width:0; margin:0; padding-left:24px; border-left:1px solid #493b59; }
.space-profile-panel form label:first-child { margin-top:0; }
.space-profile-panel textarea { min-height:68px; }
.space-profile-save { display:flex; justify-content:flex-end; margin-top:12px; }
@media(max-width:700px) {
  .space-profile-panel { grid-template-columns:1fr; gap:16px; padding:16px; }
  .space-profile-panel form { padding:16px 0 0; border-left:0; border-top:1px solid #493b59; }
}
#portrait-select-canvas { border-radius: 8px; touch-action: none; cursor: crosshair; background: #17121e; }
#portrait-select-canvas[hidden], #portrait-canvas[hidden] { display: none; }
.comment-author { display:flex; align-items:center; }
.comment-author summary { display:inline-grid; place-items:center; width:36px; height:36px; overflow:hidden; border-radius:50%; border:1px solid #665078; background:#38294b; cursor:pointer; vertical-align:middle; list-style:none; }
.comment-author summary::-webkit-details-marker { display:none; }
.comment-author img { width:100%; height:100%; object-fit:cover; }
.comment-author strong { margin-left:8px; overflow-wrap:anywhere; }
.feedback-messages .public-comment { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:start; gap:12px; padding-right:8px; }
.public-comment > p { margin:0; padding-top:7px; }
.public-comment .comment-author { position:relative; }
.public-comment .comment-author strong { position:absolute; z-index:2; top:100%; left:0; margin:4px 0 0; padding:5px 8px; width:max-content; max-width:160px; border-radius:6px; background:#30243c; }
.public-comment > button { align-self:start; margin-top:4px; }
.comment-actions { display:flex; align-items:center; flex-wrap:wrap; gap:5px; }
.saved-icon:has(small) { display:inline-flex; justify-content:center; gap:4px; width:auto; min-width:34px; padding:0 6px; }
.saved-icon small { font-size:11px; font-variant-numeric:tabular-nums; }
.portrait-generator {
  width:min(1000px, calc(100% - 28px)); max-width:none; max-height:92dvh; overflow:auto;
  padding:clamp(16px, 3vw, 32px); background:linear-gradient(135deg,#30263a,#211a2a);
  border-color:#715a7d; box-shadow:0 24px 90px #08050cca;
}
.portrait-generator > .dialog-top { border-bottom:1px solid #644f70; padding-bottom:15px; margin-bottom:18px; }
.portrait-generator-layout { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.portrait-generator-controls { min-width:0; }
.portrait-styles { border:0; padding:0; margin:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.portrait-styles legend, .portrait-generator-result h3 { font-size:17px; font-weight:700; margin:0 0 10px; padding:0; }
.portrait-style { position:relative; overflow:hidden; margin:0; cursor:pointer; border:2px solid #65536f; border-radius:10px; }
.portrait-style input { position:absolute; opacity:0; width:1px; height:1px; }
.portrait-style:has(input:checked), .portrait-style:hover { border-color:#d4a6ff; }
.portrait-style:has(input:focus-visible) { outline:2px solid white; outline-offset:2px; }
.portrait-style:has(input:checked)::after { content:'✓'; position:absolute; top:6px; right:6px; background:#d4a6ff; color:#211438; border-radius:50%; width:22px; height:22px; display:grid; place-items:center; font-weight:800; }
.portrait-style-thumbnail {
  display:block; aspect-ratio:210 / 130;
  background-image:url('/assets/portrait-style-reference.png'); background-size:796.2% 723.8%;
  background-position:32.1% 29.6%;
}
.portrait-style:nth-of-type(2) .portrait-style-thumbnail { background-position:48.3% 29.6%; }
.portrait-style:nth-of-type(3) .portrait-style-thumbnail { background-position:32.1% 51.7%; }
.portrait-style:nth-of-type(4) .portrait-style-thumbnail { background-position:48.3% 51.7%; }
.portrait-style-label { display:block; padding:6px 9px; background:#1b1523; color:#f3e9ff; font-weight:700; }
.portrait-generator textarea { width:100%; margin-bottom:10px; }
.portrait-generator-controls > .primary { width:100%; }
.portrait-generator-result { border-left:1px solid #644f70; padding-left:20px; min-width:0; }
.portrait-preview-frame {
  position:relative; display:grid; place-items:center; text-align:center; min-height:240px;
  aspect-ratio:4 / 5; max-height:52dvh; border:1px solid #65536f; border-radius:12px; overflow:hidden; background:#1b1523;
}
.generated-portrait-preview { position:absolute; width:100%; height:100%; object-fit:contain; }
.portrait-preview-frame > p { padding:10px; }
.portrait-preview-frame[aria-busy="true"]::after {
  content:''; position:absolute; width:30px; height:30px; border:3px solid #684e80; border-top-color:#e2c1ff;
  border-radius:50%; animation:portrait-spin .8s linear infinite; box-shadow:0 0 0 8px #1b1523cc;
}
@keyframes portrait-spin { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { .portrait-preview-frame[aria-busy="true"]::after { animation:none; } }
.portrait-generation-status { min-height:1.4em; margin:7px 0; }
.portrait-generator-actions { display:flex; flex-wrap:wrap; gap:8px; }
.portrait-generator-actions > button { flex:1 0 auto; }
.portrait-generator [hidden] { display:none; }
@media(max-width:680px) {
  .portrait-generator-layout { grid-template-columns:minmax(0,1fr); }
  .portrait-generator-result { border-left:0; border-top:1px solid #644f70; padding:14px 0 0; }
}
.route-top { display:flex; align-items:center; gap:14px; padding:12px 18px; background:#211a2c; border-bottom:1px solid #615076; }
.route-top strong { color:#d8b9f2; font:italic 700 clamp(1.2rem,3vw,1.8rem) Georgia,serif; }
.route-top button:last-child { margin-left:auto; }
.route-layout { display:grid; grid-template-columns:minmax(0, 2.4fr) minmax(265px,1fr); min-height:calc(100dvh - 68px); }
.route-stage { position:relative; isolation:isolate; display:flex; flex-direction:column; justify-content:flex-end; gap:10px; padding:clamp(14px,4vw,42px); min-width:0; min-height:650px; background:radial-gradient(ellipse at 30% 20%,#392d50,#131019 75%); }
.route-background,.route-portrait { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:-3; }
.route-portrait { width:min(72%,650px); object-position:center top; z-index:-2; mask-image:linear-gradient(to right,black 70%,transparent); }
.route-stage::after { content:''; position:absolute; inset:0; z-index:-1; background:linear-gradient(transparent 20%,#15101ac2 62%,#15101a); }
.route-dialogue { margin-top:190px; border:1px solid #b092c8; border-radius:12px; background:#1b1523ec; box-shadow:inset 0 0 0 3px #aa85c326; }
.route-speaker { display:inline-block; position:relative; margin:-16px 0 0 18px; padding:6px 16px; border:1px solid #b092c8; border-radius:8px; background:#453453; color:#efddff; font:700 19px Georgia,serif; }
.route-dialogue-text { padding:12px 20px; max-height:34dvh; overflow:auto; white-space:pre-wrap; font:clamp(1rem,1.6vw,1.24rem)/1.6 Georgia,serif; overflow-wrap:anywhere; }
.route-choices { display:grid; gap:6px; }
.route-choices > button { text-align:left; background:#392d48ed; border-color:#a98bbd; }
.route-choices > button:hover { background:#574168; }
#route-choice-status { margin:0; }
#route-reply { display:flex; align-items:end; gap:10px; }
#route-reply textarea { min-height:54px; margin:0; resize:vertical; min-width:0; }
.route-cast { min-width:0; background:#191520; border-left:1px solid #514061; padding:16px; }
.route-cast h2 { margin-top:0; font:italic 700 26px Georgia,serif; }
.route-cast-member { display:grid; grid-template-columns:44px minmax(0,1fr); gap:9px; margin-bottom:8px; padding:9px; border:1px solid #514061; border-radius:10px; background:#262031; overflow-wrap:anywhere; }
.route-avatar { display:grid; place-items:center; width:44px; height:44px; overflow:hidden; border-radius:8px; background:#443450; }
.route-avatar img { width:100%; height:100%; object-fit:cover; }
.route-primary { color:#e2c1ff; font-size:12px; }
.route-love { display:flex; align-items:center; gap:6px; color:#dcb9fa; font-size:12px; }
.route-love meter { flex:1; min-width:20px; height:12px; }
.route-love meter::-webkit-meter-optimum-value { background:#b990e4; }
.route-notes,.route-history { max-height:44dvh; overflow:auto; overflow-wrap:anywhere; }
.route-note-text,.route-history article { white-space:pre-wrap; line-height:1.5; }
.route-history article { padding:10px 0; border-bottom:1px solid #514061; }
.route-reference-dialog { width:min(680px,94vw); }
@media(max-width:780px){.route-layout{grid-template-columns:1fr}.route-cast{border-left:0}.route-stage{min-height:520px}.route-dialogue{margin-top:120px}}
.route-reply-controls { display:flex; align-items:center; gap:6px; flex-wrap:wrap; justify-content:flex-end; } #route-reply textarea { flex:1 1 220px; } #route-reply { flex-wrap:wrap; }
#random-world-route { border:1px solid #e8caff; background:linear-gradient(120deg,#e5c5ff,#b593f8); color:#251537; font-weight:800; }
#random-world-route:not(:disabled):hover { background:#f0dbff; }
#random-world-route:disabled { opacity:1; background:#302641; color:#cbbcdd; border-color:#76618d; cursor:not-allowed; }
.header-sign-in > summary { border:1px solid #a887d1; border-radius:12px; padding:4px 9px; color:#f1e7fc; font-weight:700; }
#header-sign-in-panel { width:min(282px,calc(100vw - 32px)); box-sizing:border-box; padding:16px; border-color:#a887d1; box-shadow:0 12px 28px #0b0712aa; }
#header-sign-in-panel h2 { margin:0; font-size:17px; }
#header-google-signin { margin-top:14px; }
.header-popover [hidden] { display:none; }
