:root{
  --bg:#120f15;--panel:#1b1720;--panel2:#241e2a;--line:#332c3b;--text:#f5f1f5;--muted:#aaa7b3;
  --accent:#b56cff;--accent2:#7c3aed;--accent-soft:#36234a;--gold:#d7b978;--good:#99d6b4;--warn:#f0c788;--bad:#f39a9a;--shadow:0 18px 60px rgba(0,0,0,.28);
}
*{box-sizing:border-box}.hidden{display:none!important} body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:14px}
button,input,select,textarea{font:inherit} button{cursor:pointer}.sidebar{position:fixed;inset:0 auto 0 0;width:248px;background:#151219;border-right:1px solid var(--line);padding:22px 16px;display:flex;flex-direction:column;z-index:2}.brand{display:flex;gap:12px;align-items:center;padding:0 8px 22px}.brand-mark{width:42px;height:42px;border-radius:14px;background:linear-gradient(145deg,#bb81f8,#9346e5);color:#150b20;font-weight:900;display:grid;place-items:center;box-shadow:0 8px 30px rgba(168,99,241,.20)}.brand-title{font-weight:800}.brand-sub{font-size:12px;color:var(--muted);margin-top:3px}.nav{display:flex;flex-direction:column;gap:5px}.nav-btn{border:0;background:transparent;color:#cfccd5;text-align:left;padding:11px 12px;border-radius:10px;display:flex;gap:10px;align-items:center}.nav-btn:hover{background:#1e1a23}.nav-btn.active{background:#2d203a;color:#fff;border:1px solid #4d3468}.nav-btn.active span{color:var(--accent)}.sidebar-bottom{margin-top:auto}.security-note{padding:12px;border:1px solid var(--line);border-radius:12px;background:#1a161e;display:flex;flex-direction:column;gap:4px;color:var(--muted);font-size:12px}.security-note strong{color:var(--text)}code{color:var(--accent)}
.main{margin-left:248px;min-height:100vh}.topbar{height:72px;border-bottom:1px solid var(--line);background:rgba(18,15,21,.93);backdrop-filter:blur(12px);position:sticky;top:0;z-index:5;display:flex;align-items:center;padding:0 28px;gap:22px}.conversation-picker,.provider-picker{display:flex;align-items:center;gap:8px}.topbar label{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}.topbar select,.topbar input{background:#1d1822;border:1px solid var(--line);color:var(--text);padding:8px 10px;border-radius:8px}.conversation-picker select{min-width:210px}.provider-picker{margin-left:auto}.model-input{width:170px}.status-pill{padding:6px 9px;border:1px solid var(--line);border-radius:999px;color:var(--muted);font-size:12px;background:#1b1720}.status-pill.good{color:var(--good);border-color:#345844}.status-pill.warn{color:var(--warn);border-color:#5b4b30}.view{display:none;padding:28px}.view.active{display:block}.chat-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:22px;max-width:1500px;margin:auto}.chat-column{min-width:0}.scene-strip{min-height:44px;margin-bottom:12px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}.scene-chip{background:#1d1822;border:1px solid var(--line);border-radius:999px;padding:6px 10px;color:#c9c6cf;font-size:12px}.scene-chip b{color:var(--accent);font-weight:700}.messages{height:calc(100vh - 260px);min-height:420px;overflow:auto;border:1px solid var(--line);border-radius:16px;background:linear-gradient(180deg,#17141b,#141118);padding:18px}.empty-state{height:100%;display:grid;place-items:center;text-align:center;color:var(--muted)}.message{max-width:84%;margin:12px 0;display:flex;flex-direction:column;gap:6px}.message.user{margin-left:auto;align-items:flex-end}.bubble{padding:13px 15px;border-radius:14px;white-space:pre-wrap;line-height:1.55}.message.user .bubble{background:#322242;border:1px solid #5b4176}.message.assistant .bubble{background:#201b25;border:1px solid #332d3a}.message.unselected{opacity:.65}.message-meta{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:11px;padding:0 3px}.message-actions{display:flex;gap:5px}.tiny-btn{background:transparent;border:1px solid var(--line);color:var(--muted);border-radius:7px;padding:3px 7px;font-size:11px}.tiny-btn:hover{color:white;border-color:#52485c}.validation-score{color:var(--good)}.validation-score.warn{color:var(--warn)}.composer-wrap{margin-top:12px}.composer-controls{display:flex;align-items:center;gap:8px;margin-bottom:7px}.composer{display:flex;gap:8px}.composer textarea{flex:1;resize:vertical;min-height:78px;max-height:220px;background:#1f1b24;border:1px solid #3f3747;color:#f2eef3;padding:12px 13px;border-radius:10px;outline:none;box-shadow:inset 0 1px 0 rgba(255,255,255,.02)}.composer textarea::placeholder{color:#8f8a95}.composer textarea:focus{border-color:#bb81f8;box-shadow:0 0 0 2px rgba(168,99,241,.14)}.composer .primary{width:108px}.generation-notice{font-size:12px;color:var(--muted);min-height:18px;padding-top:5px}.badge{background:#322242;color:#cfa5fc;padding:4px 8px;border-radius:999px;border:1px solid #5b4176;font-size:12px}.panel{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:18px;box-shadow:var(--shadow)}.chat-settings{height:max-content;position:sticky;top:94px;background:linear-gradient(180deg,#5c308b 0%,#4f2878 48%,#3f205f 100%);border-color:#9962d3;box-shadow:0 18px 60px rgba(106,54,160,.34),inset 0 1px 0 rgba(255,255,255,.05)}.panel h3,.panel h4{margin:0 0 14px}.panel label{display:flex;flex-direction:column;gap:6px;color:var(--muted);font-size:12px;margin-bottom:12px}.panel input,.panel select,.panel textarea,.world-edit-grid textarea{background:#191122;border:1px solid var(--line);color:var(--text);padding:9px 10px;border-radius:9px;outline:none}.panel input:focus,.panel select:focus,.panel textarea:focus{border-color:#a863f1}.panel hr{border:0;border-top:1px solid var(--line);margin:18px 0}.compact{line-height:1.45}.muted{color:var(--muted)}.primary{border:0;background:linear-gradient(145deg,#bb81f8,#9346e5);color:#100818;font-weight:800;padding:10px 16px;border-radius:10px}.primary:hover{filter:brightness(1.06)}.secondary{border:1px solid #5f457a;background:#342445;color:#f1e0ff;padding:9px 14px;border-radius:9px}.ghost{border:1px solid var(--line);background:#1b1720;color:#d3d0d7;padding:8px 12px;border-radius:9px}.ghost:hover{background:#25202b}.small{padding:5px 8px;font-size:12px}.full{width:100%}.panel-title-row{display:flex;align-items:center;justify-content:space-between;gap:10px}.tiny-label{text-transform:uppercase;color:var(--good);font-size:10px;letter-spacing:.1em}
.page-head{display:flex;justify-content:space-between;align-items:center;max-width:1450px;margin:0 auto 20px}.page-head h1{margin:2px 0 0;font-size:30px}.eyebrow{color:var(--accent);text-transform:uppercase;letter-spacing:.12em;font-size:11px;margin:0}.dashboard-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;max-width:1450px;margin:0 auto 18px}.dash-card{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:15px}.dash-card .kicker{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}.dash-card .value{font-size:16px;margin-top:7px;font-weight:750}.dash-card .sub{font-size:12px;color:var(--muted);margin-top:5px}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:18px;max-width:1450px;margin:0 auto 18px}.memory-item,.health-row{border-top:1px solid var(--line);padding:11px 0}.memory-item:first-child,.health-row:first-child{border-top:0}.memory-title{font-weight:700}.memory-body{color:var(--muted);font-size:12px;margin-top:4px;line-height:1.45}.memory-tags{display:flex;gap:6px;margin-top:7px}.tag{font-size:10px;padding:3px 6px;border-radius:999px;border:1px solid var(--line);color:#bbb7c2}.health-row{display:flex;gap:9px}.health-icon.good{color:var(--good)}.health-icon.warn{color:var(--warn)}.world-edit-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;max-width:1450px;margin:auto}.editor-card textarea{width:100%;min-height:260px;resize:vertical;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:1.5;margin-bottom:10px}.form-row{display:grid;gap:14px}.form-row.triple{grid-template-columns:1fr 1fr 1fr}.comparison-head{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:12px}.comparison-output{white-space:pre-wrap;line-height:1.55;color:#e8e4e9;max-height:580px;overflow:auto;background:#151219;border:1px solid var(--line);border-radius:11px;padding:14px}.stat-card{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:16px}.stat-card b{font-size:24px;display:block;margin-top:6px}
.modal{position:fixed;inset:0;background:rgba(0,0,0,.65);display:grid;place-items:center;z-index:20;padding:20px}.modal.hidden{display:none}.modal-card{width:min(620px,100%);max-height:85vh;overflow:auto;background:#1d1922;border:1px solid #413949;border-radius:16px;box-shadow:0 30px 100px rgba(0,0,0,.55);padding:18px}.modal-head{display:flex;align-items:center;justify-content:space-between}.modal-head h3{margin:0}.icon-btn{border:0;background:transparent;color:var(--muted);font-size:26px}.modal textarea,.modal input,.modal select{width:100%;background:#141118;border:1px solid var(--line);color:var(--text);padding:9px;border-radius:9px;margin:6px 0 12px}.modal-actions{display:flex;justify-content:flex-end;gap:8px}


/* v0.2.1: unmistakable indigo Scene Controls surface */
.chat-settings label{color:#dfc4fb}
.chat-settings input,.chat-settings select,.chat-settings textarea{background:#2d1745;border-color:#8a55c2;color:#fcf7ff}
.chat-settings input:focus,.chat-settings select:focus,.chat-settings textarea:focus{border-color:#cfa5fc;box-shadow:0 0 0 2px rgba(207,165,252,.16)}
.chat-settings hr{border-top-color:rgba(225,198,254,.20)}
.chat-settings .story-start-box{background:rgba(29,10,48,.34);border-color:#9e69d5}
.chat-settings .secondary{background:#673b96;border-color:#a873e0;color:#fff}
.chat-settings .secondary:hover{background:#7948ad}
.chat-settings .tiny-label{color:#b7f7ce}


.mobile-chat-tools{display:none;justify-content:flex-end;margin-bottom:8px}.scene-mobile-btn{border:1px solid #8559b3;background:#432463;color:#f8eeff;padding:7px 10px;border-radius:999px;font-weight:700;font-size:12px}.scene-mobile-btn:hover{background:#533078}.scene-settings-backdrop{display:none}.scene-settings-backdrop.hidden{display:none}.scene-subtitle{font-size:11px;color:#caaee8;display:block;margin-top:-8px;margin-bottom:10px}.scene-panel-actions{display:flex;align-items:center;gap:8px}.scene-close{display:none}.story-start-box{border:1px solid #70489a;background:rgba(25,12,38,.38);border-radius:12px;padding:11px;margin:4px 0 14px}.story-start-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:9px}.story-start-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.story-start-grid label{margin-bottom:6px}.current-story-clock{font-size:12px;color:#e2c7ff;border-top:1px solid rgba(187,129,248,.22);padding-top:8px;margin-top:8px;line-height:1.45}.story-clock-current{color:#cfa5fc;font-weight:800}.message-story-time{color:#bd9ddf}.technical-details{color:var(--muted);font-size:11px;margin-top:8px}.technical-details summary{cursor:pointer;color:#b499d1}

@media(max-width:1100px){
  .chat-layout{grid-template-columns:1fr}.dashboard-grid{grid-template-columns:repeat(2,1fr)}.two-col,.world-edit-grid{grid-template-columns:1fr}.form-row.triple{grid-template-columns:1fr}.provider-picker label{display:none}.mobile-chat-tools{display:flex}
  .chat-settings{position:fixed;top:0;right:0;bottom:0;width:min(370px,92vw);height:100vh;z-index:60;border-radius:18px 0 0 18px;overflow:auto;transform:translateX(105%);transition:transform .22s ease;box-shadow:-30px 0 90px rgba(0,0,0,.52);padding:20px}
  .chat-settings.open{transform:translateX(0)}.scene-close{display:inline-block}.scene-settings-backdrop{display:block;position:fixed;inset:0;background:rgba(7,3,12,.68);z-index:55;backdrop-filter:blur(2px)}.scene-settings-backdrop.hidden{display:none}
}
@media(max-width:760px){
  .sidebar{width:70px;padding:16px 8px}.brand-title,.brand-sub,.nav-btn:not(.active){font-size:0}.brand{padding:0 5px 18px}.brand-mark{width:42px}.nav-btn{justify-content:center}.nav-btn span{font-size:18px}.sidebar-bottom{display:none}.main{margin-left:70px}.topbar{height:auto;min-height:72px;flex-wrap:wrap;padding:10px 14px}.conversation-picker,.provider-picker{flex-wrap:wrap}.conversation-picker select{min-width:150px}.provider-picker{margin-left:0}.view{padding:14px}.messages{height:calc(100vh - 350px);min-height:360px}.dashboard-grid{grid-template-columns:1fr}.message{max-width:96%}.composer{align-items:stretch}.composer .primary{width:84px}.scene-strip{gap:5px}.scene-chip{padding:5px 8px}.story-start-grid{grid-template-columns:1fr}.topbar .status-pill{display:none}
}


/* v0.3.1 — public scenario discovery + multiple RP library */
.discover-head{align-items:flex-end}.discover-tools{max-width:1450px;margin:0 auto 14px;padding:16px;background:linear-gradient(145deg,rgba(86,46,129,.38),rgba(26,18,34,.96));border-color:rgba(187,129,248,.28)}
.discover-search-row{display:grid;grid-template-columns:minmax(320px,1fr) 160px 210px auto;gap:12px;align-items:end}.discover-search input{font-size:15px}.filter-label{font-size:11px;text-transform:uppercase;letter-spacing:.09em;color:var(--muted);margin:13px 0 8px}.tag-filter-wrap,.scenario-tags{display:flex;gap:7px;flex-wrap:wrap}.tag-filter{border:1px solid rgba(187,129,248,.28);background:rgba(36,25,47,.78);color:#e0c5fd;border-radius:999px;padding:7px 10px;font-size:11px;cursor:pointer}.tag-filter:hover,.tag-filter.active{background:rgba(147,70,229,.34);border-color:rgba(187,129,248,.72);color:#fff}.tag-filter.mini{padding:4px 7px;font-size:10px}.discover-count{max-width:1450px;margin:0 auto 10px;color:var(--muted);font-size:12px}.scenario-discover-grid,.rp-grid{max-width:1450px;margin:0 auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(255px,1fr));gap:14px}.scenario-card,.rp-card{background:linear-gradient(165deg,rgba(46,31,61,.96),rgba(19,13,25,.98));border:1px solid rgba(187,129,248,.20);border-radius:18px;padding:14px;min-height:0;display:flex;flex-direction:column;box-shadow:0 16px 45px rgba(0,0,0,.16)}.scenario-card:hover{border-color:rgba(187,129,248,.48);transform:translateY(-1px)}.scenario-card-top,.scenario-card-bottom,.rp-card-head{display:flex;justify-content:space-between;align-items:center;gap:8px}.scenario-rating,.scenario-canon,.scenario-version{font-size:10px;border-radius:999px;padding:4px 7px;border:1px solid rgba(187,129,248,.22);color:#e2c7ff;margin-right:5px}.scenario-rating.nsfw{border-color:rgba(177,114,244,.35);color:#d0a8f9}.scenario-card h2,.rp-card h2{margin:12px 0 6px;font-size:18px;line-height:1.22}.scenario-character{font-size:12px;color:#bda6d5;margin-bottom:8px}.scenario-card p{color:var(--muted);line-height:1.5}.scenario-teaser{font-size:13px;color:#f8eeff!important;min-height:58px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;flex:1}.scenario-card-bottom{margin-top:13px}.scenario-card .scenario-tags{margin-top:10px}.rp-card{min-height:210px}.rp-card.current{border-color:rgba(187,129,248,.68);box-shadow:0 0 0 1px rgba(168,99,241,.15)}.rp-meta{display:grid;gap:4px;color:var(--muted);font-size:11px;margin:9px 0 15px}.discover-empty{grid-column:1/-1;min-height:280px}.start-scenario-summary{padding:12px 14px;background:rgba(86,46,129,.20);border:1px solid rgba(187,129,248,.2);border-radius:13px;margin-bottom:14px}.start-scenario-summary h2{margin:8px 0}.start-scenario-summary p{line-height:1.45}.start-scenario-teaser{font-weight:700;color:#f8eeff!important}.scenario-opening-preview{margin-top:12px;padding:12px;border-radius:12px;background:rgba(22,11,33,.54);border:1px solid rgba(187,129,248,.22)}.scenario-opening-label{font-size:10px;letter-spacing:.11em;text-transform:uppercase;color:#caaee8;margin-bottom:6px}.scenario-opening-copy{white-space:pre-wrap;color:#e8d7f5;line-height:1.58}
@media(max-width:900px){.discover-search-row{grid-template-columns:1fr 1fr}.discover-search{grid-column:1/-1}.scenario-discover-grid,.rp-grid{grid-template-columns:1fr}.discover-tools{margin:0 10px 14px}.discover-count{padding:0 10px}}

.creator-choice-grid{max-width:1450px;margin:0 auto 22px;display:grid;grid-template-columns:1fr 1fr;gap:16px}.creator-choice{background:linear-gradient(145deg,rgba(86,46,129,.28),rgba(26,18,34,.96));border-color:rgba(187,129,248,.24)}.creator-choice h2{margin:0 0 7px}.creator-choice p{color:var(--muted);min-height:48px;line-height:1.5}.create-head-actions{display:flex;gap:8px}.creator-library-head{margin-top:26px}.creator-content-grid{max-width:1450px;margin:0 auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px}.creator-content-card{background:var(--panel);border:1px solid rgba(187,129,248,.18);border-radius:16px;padding:16px}.creator-content-card h2{font-size:18px;margin:10px 0 5px}.creator-content-card p{color:var(--muted);line-height:1.45;min-height:44px}.creator-card-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:14px}.creator-form-intro{display:flex;align-items:center;gap:9px;margin-bottom:12px}.scenario-character-picker{margin:14px 0;padding:14px;border-radius:14px;background:rgba(86,46,129,.18);border:1px solid rgba(187,129,248,.20)}.inline-character-create{margin-top:12px;padding:13px;border-radius:12px;background:rgba(12,7,17,.45);border:1px solid rgba(187,129,248,.18)}.creator-tag-presets{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 14px}@media(max-width:760px){.creator-choice-grid{grid-template-columns:1fr}.create-head-actions{width:100%;justify-content:flex-end}}

/* v0.3.2 — mobile-toggleable quick tags + canon web research */
.quick-tags-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.quick-tags-toggle{display:none;border:1px solid rgba(187,129,248,.34);background:#3c2456;color:#f8eeff;border-radius:999px;padding:7px 10px;font-size:12px;font-weight:750;align-items:center;gap:7px}.tag-count{display:inline-grid;place-items:center;min-width:19px;height:19px;padding:0 5px;border-radius:999px;background:#a863f1;color:#fff;font-size:10px}.tag-chevron{font-size:9px;color:#e1c6fe}.canon-search-box{margin:12px 0 15px;padding:13px;border-radius:14px;background:linear-gradient(145deg,rgba(86,46,129,.26),rgba(21,12,30,.88));border:1px solid rgba(187,129,248,.30)}.canon-search-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}.canon-search-head .muted{font-size:11px;margin-top:3px;line-height:1.4}.canon-search-help{margin:8px 0 10px;color:#bfa8d8;font-size:11px;line-height:1.45}.canon-search-results{display:grid;gap:8px}.canon-searching,.canon-warning,.canon-attached{padding:9px 10px;border-radius:10px;font-size:11px;line-height:1.45}.canon-searching{background:#251535;color:#e2c7ff}.canon-warning{background:rgba(120,53,15,.20);border:1px solid rgba(251,191,36,.24);color:#f1d8a5}.canon-attached{background:rgba(20,83,45,.24);border:1px solid rgba(74,222,128,.25);color:#b7e7c7}.canon-search-summary{display:flex;justify-content:space-between;gap:10px;color:#e0c5fd;font-size:11px;padding:4px 0}.canon-source-card{display:grid!important;grid-template-columns:auto 1fr;gap:9px!important;margin:0!important;padding:10px;border:1px solid rgba(187,129,248,.20);border-radius:11px;background:rgba(16,9,24,.55);cursor:pointer}.canon-source-card>input{width:auto!important;margin:3px 0 0!important;accent-color:#a863f1}.canon-source-card p{margin:6px 0;color:#cec0d8;font-size:11px;line-height:1.45}.canon-source-card a{color:#cfa5fc;font-size:11px;text-decoration:none}.canon-source-card a:hover{text-decoration:underline}.canon-source-top{display:flex;justify-content:space-between;align-items:flex-start;gap:9px}.canon-source-top strong{color:#fff;line-height:1.3}
@media(max-width:760px){
  .quick-tags-toggle{display:inline-flex}.quick-tags-section .filter-label{margin:8px 0}.tag-filter-wrap.mobile-collapsed{display:none}.quick-tags-section{border-top:1px solid rgba(187,129,248,.14);padding-top:6px;margin-top:8px}.discover-tools{padding:13px}.discover-search-row{grid-template-columns:1fr}.discover-search{grid-column:auto}.canon-search-head{flex-direction:column}.canon-source-top{flex-direction:column}.canon-source-card{padding:9px}.canon-search-box .form-row.double{grid-template-columns:1fr}
}

/* v0.4.0 — RP-scoped dashboard/bible, noob-friendly Bible, RP web research */
.page-head-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.rp-scope-banner{max-width:1450px;margin:0 auto 16px;padding:10px 13px;border:1px solid rgba(187,129,248,.26);background:linear-gradient(90deg,rgba(86,46,129,.30),rgba(25,16,35,.85));border-radius:12px;color:#d3baee;font-size:12px;line-height:1.45}.rp-scope-banner strong{color:#fff}.world-noob-grid{max-width:1450px;margin:0 auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.world-section{background:linear-gradient(155deg,rgba(40,28,53,.97),rgba(21,14,28,.98));border-color:rgba(187,129,248,.22)}.world-section h3{margin:0}.world-research-section{grid-column:1/-1}.friendly-list{display:grid;gap:8px;margin-top:10px}.friendly-item{border:1px solid rgba(187,129,248,.18);background:rgba(14,8,21,.48);border-radius:11px;padding:10px 11px}.friendly-item-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.friendly-item-title{font-weight:750;color:#faf3ff}.friendly-item-sub{font-size:11px;color:#bba5d3;line-height:1.45;margin-top:4px;white-space:pre-wrap}.friendly-item-actions{display:flex;gap:6px;flex-wrap:wrap}.empty-friendly{padding:13px;border:1px dashed rgba(187,129,248,.22);border-radius:11px;color:#a591ba;font-size:12px}.world-simple-mode select,.world-simple-mode input,.world-simple-mode textarea{background:#1a1123;border-color:#46305d}.world-simple-mode textarea{min-height:auto}.composer-shell{position:relative;flex:1}.composer-plus{width:48px;min-width:48px;border:1px solid rgba(187,129,248,.36);background:#3e2558;color:#f8eeff;border-radius:12px;font-size:23px;font-weight:500;cursor:pointer}.composer-plus:hover{background:#533077}.composer-menu{position:absolute;left:0;bottom:calc(100% + 8px);z-index:45;width:230px;padding:8px;background:#1f152a;border:1px solid rgba(187,129,248,.32);border-radius:13px;box-shadow:0 20px 55px rgba(0,0,0,.45)}.composer-menu button{width:100%;display:flex;align-items:center;gap:8px;border:0;background:transparent;color:#f6e9ff;text-align:left;padding:10px;border-radius:9px;cursor:pointer}.composer-menu button:hover{background:#3a2551}.web-search-intro{padding:10px 12px;border-radius:11px;background:rgba(86,46,129,.22);border:1px solid rgba(187,129,248,.20);font-size:12px;color:#d4baef;line-height:1.45;margin-bottom:11px}.web-search-bar{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:end}.web-result-list{display:grid;gap:9px;margin-top:12px;max-height:52vh;overflow:auto;padding-right:3px}.web-result{border:1px solid rgba(187,129,248,.20);background:#181021;border-radius:12px;padding:11px}.web-result h4{margin:0 0 5px;font-size:14px}.web-result p{margin:0;color:#bfa8d7;font-size:11px;line-height:1.45}.web-result-meta{display:flex;gap:6px;flex-wrap:wrap;margin:7px 0}.web-result-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:9px}.web-result a{color:#d3aaff;font-size:11px;text-decoration:none}.web-result a:hover{text-decoration:underline}.web-mode-note{font-size:11px;color:#b49ecb;margin-top:7px}.bible-draft-source{padding:8px 10px;background:#150d1d;border:1px solid rgba(187,129,248,.16);border-radius:10px;font-size:11px;color:#bfa8d8;margin-bottom:9px}.toast{position:fixed;bottom:22px;right:22px;z-index:100;background:#321e47;border:1px solid #7a50a7;color:#f8eeff;padding:11px 14px;border-radius:11px;box-shadow:0 15px 45px rgba(0,0,0,.4);max-width:360px;font-size:12px;line-height:1.4}.toast.good{border-color:rgba(74,222,128,.45)}
@media(max-width:900px){.world-noob-grid{grid-template-columns:1fr}.world-research-section{grid-column:auto}}
@media(max-width:760px){.page-head-actions{width:100%;justify-content:flex-start}.rp-scope-banner{margin:0 0 14px}.composer{gap:7px}.composer-plus{width:44px;min-width:44px}.composer .primary{width:72px}.composer-menu{left:0;width:min(280px,80vw)}.world-section{padding:14px}.web-search-bar{grid-template-columns:1fr}.web-search-bar button{width:100%}.web-result-actions button{flex:1;min-width:120px}}


/* v0.4.2 — RP-local navigation hierarchy + discover alignment fix */
.discover-search-row>label{margin-bottom:0}
.discover-search-row>button#clearScenarioFilters{align-self:end;height:39px;margin:0 0 0 0;display:inline-flex;align-items:center;justify-content:center}
.current-rp-nav{margin:5px 0 8px 14px;padding:10px 0 8px 12px;border-left:2px solid rgba(187,129,248,.38);display:grid;gap:4px}
.current-rp-nav.hidden{display:none}
.current-rp-nav-label{font-size:9px;letter-spacing:.14em;text-transform:uppercase;color:#ab8fc9;padding:0 10px}
.current-rp-nav-title{font-size:12px;font-weight:800;color:#f3e3ff;padding:2px 10px 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:190px}
.nav-btn.rp-subnav{margin:0;width:calc(100% - 8px);padding:8px 10px;font-size:12px;background:transparent;border-color:transparent;color:#baa4d2}
.nav-btn.rp-subnav:hover{background:rgba(168,99,241,.10);color:#fff}
.nav-btn.rp-subnav.active{background:rgba(147,70,229,.24);border-color:rgba(187,129,248,.28);color:#fff}
.rp-inside-label{font-size:9px;letter-spacing:.12em;text-transform:uppercase;color:#ab8fc9;margin-top:auto;padding-top:4px}
.rp-section-actions{display:grid;grid-template-columns:1fr;gap:7px;margin-top:8px}
.rp-section-actions button{width:100%;text-align:left;display:flex;align-items:center;justify-content:flex-start;gap:7px}
@media(min-width:700px){.rp-section-actions{grid-template-columns:1fr 1fr}.rp-section-actions .rp-open:first-child{grid-column:1/-1}}
@media(max-width:900px){.discover-search-row>button#clearScenarioFilters{width:100%}}

/* v0.4.2: World Bible editor mode + flexible custom entries */
.bible-add-primary{box-shadow:0 8px 24px rgba(147,70,229,.16)}
.bible-mode-note{max-width:1450px;margin:0 auto 14px;color:#bfa8d8;font-size:12px}
.add-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}
.add-choice{border:1px solid rgba(187,129,248,.24);background:#1e122a;color:#f7ecff;border-radius:11px;padding:12px;text-align:left;cursor:pointer}
.add-choice:hover{background:#35204a;border-color:#a863f1}.add-choice strong{display:block;margin-bottom:3px}.add-choice span{font-size:11px;color:#bfa8d8;line-height:1.35}
.custom-entry-kind{display:inline-block;margin-right:6px;color:#e1c6fe;font-size:10px;text-transform:uppercase;letter-spacing:.06em}
@media(max-width:700px){.add-choice-grid{grid-template-columns:1fr}.page-head-actions .bible-add-primary{order:-1}}


/* v0.5.0 — platform shell: Home, favorites, profiles, personas, help */
.home-hero{max-width:1450px;margin:0 auto 22px;min-height:210px;border-radius:22px;border:1px solid rgba(187,129,248,.28);background:radial-gradient(circle at 80% 20%,rgba(168,99,241,.34),transparent 35%),linear-gradient(135deg,#251734,#120c18);padding:28px;display:flex;align-items:flex-end}.home-hero-copy{max-width:760px}.home-hero h2{font-size:32px;margin:10px 0}.home-hero p{font-size:15px;line-height:1.65;color:#d6c8e1}.button-link{display:inline-block;text-decoration:none;margin-top:8px}.compact-head{margin-top:22px}.community-feed{max-width:1450px;margin:0 auto;display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:13px}.community-card{background:linear-gradient(155deg,rgba(46,31,61,.94),rgba(19,13,25,.98));border:1px solid rgba(187,129,248,.20);border-radius:16px;padding:16px}.community-card-top{display:flex;justify-content:space-between;gap:8px}.community-card h3{margin:11px 0 7px}.community-card p{color:var(--muted);line-height:1.55}.scenario-card-icons{display:flex;align-items:center;gap:7px}.favorite-btn{width:31px;height:31px;border-radius:999px;border:1px solid rgba(187,129,248,.25);background:rgba(17,9,25,.65);color:#d4baef;font-size:18px;cursor:pointer}.favorite-btn.active{color:#caa7f0;border-color:rgba(202,167,240,.45);background:rgba(74,40,110,.24)}.creator-link{border:0;background:transparent;color:#bba5d3;padding:0;cursor:pointer;font:inherit}.creator-link:hover{color:#e1c6fe;text-decoration:underline}.create-library-link{max-width:1000px;margin:20px auto;display:flex;align-items:center;justify-content:space-between;gap:16px}.persona-grid{max-width:1200px;margin:0 auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px}.persona-card h2{margin:0 0 5px}.profile-card{max-width:1100px;margin:0 auto}.profile-main{display:flex;gap:18px;align-items:flex-start}.profile-avatar{width:76px;height:76px;border-radius:22px;display:grid;place-items:center;font-size:28px;font-weight:900;background:linear-gradient(145deg,#a863f1,#7f38ca);color:white;flex:0 0 auto}.profile-main h2{margin:3px 0}.profile-stats{display:flex;gap:16px;flex-wrap:wrap;margin-top:12px;color:#bfa8d8}.help-grid{max-width:1200px;margin:0 auto 18px;display:grid;grid-template-columns:repeat(2,1fr);gap:13px}.help-grid .panel p{color:var(--muted);line-height:1.55}.help-ticket{max-width:1200px;margin:0 auto}.check-row{display:flex!important;flex-direction:row!important;align-items:center!important;gap:9px}.check-row input{width:auto!important}.discover-search-row{grid-template-columns:minmax(300px,1.35fr) minmax(180px,.75fr) 150px 190px auto}.creator-search input{min-width:0}
@media(max-width:1050px){.discover-search-row{grid-template-columns:1fr 1fr}.discover-search,.creator-search{grid-column:auto}.community-feed{grid-template-columns:1fr 1fr}}
@media(max-width:760px){.home-hero{margin:0 0 18px;min-height:190px;padding:20px}.home-hero h2{font-size:25px}.community-feed,.help-grid{grid-template-columns:1fr}.profile-main{flex-direction:column}.create-library-link{flex-direction:column;align-items:flex-start}.discover-search-row{grid-template-columns:1fr}.discover-search,.creator-search{grid-column:auto}.nav{overflow-y:auto;max-height:calc(100vh - 145px)}}


/* v0.5.1 — public subscription plans */
.upgrade-card{margin-bottom:10px;padding:13px;border-radius:14px;border:1px solid rgba(187,129,248,.30);background:linear-gradient(145deg,rgba(86,46,129,.48),rgba(30,20,41,.96));display:flex;flex-direction:column;gap:8px;font-size:11px;color:#ccb3e5;line-height:1.4}.upgrade-card strong{font-size:13px;color:#fff}.upgrade-card-top{display:flex;align-items:center;justify-content:space-between;color:#e1c6fe}.upgrade-card .primary{margin-top:3px}.plans-promise{max-width:1180px;margin:0 auto 18px;display:flex;align-items:center;gap:15px;background:linear-gradient(120deg,rgba(86,46,129,.38),rgba(29,19,39,.98));border-color:rgba(187,129,248,.28)}.plans-promise-icon{width:52px;height:52px;border-radius:16px;display:grid;place-items:center;font-size:30px;font-weight:900;color:#f1e0ff;background:rgba(147,70,229,.35);flex:0 0 auto}.plans-promise p{margin:5px 0 0}.plans-grid{max-width:1450px;margin:0 auto;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.plan-card{min-width:0;border:1px solid rgba(187,129,248,.18);background:linear-gradient(160deg,#22182c,#16101c);border-radius:18px;padding:18px;display:flex;flex-direction:column;min-height:480px;box-shadow:var(--shadow)}.plan-card.current-plan{border-color:#bb81f8;box-shadow:0 18px 60px rgba(147,70,229,.20),inset 0 0 0 1px rgba(187,129,248,.15)}.plan-card-top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.plan-card h2{font-size:25px;margin:4px 0 0}.plan-price{font-size:18px;font-weight:850;color:#f4e6ff;margin:15px 0 7px}.plan-tagline{color:#c7afe0;line-height:1.5;min-height:63px}.plan-features{display:grid;gap:9px;margin:8px 0 18px;flex:1}.plan-features div{display:flex;gap:8px;color:#ded0e9;font-size:12px;line-height:1.4}.plan-features span{color:#99d6b4;font-weight:900}.plan-model-note{font-size:10px;color:#a088b9;line-height:1.4;margin-top:10px}.plans-footnote{max-width:1450px;margin:16px auto;color:#9f8cb3;font-size:11px;text-align:center}.profile-plan-btn{margin-top:13px}.plan-card button:disabled{opacity:.65;cursor:default}
@media(max-width:1180px){.plans-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.plans-grid{grid-template-columns:1fr}.plan-card{min-height:auto}.plans-promise{margin:0 0 16px;align-items:flex-start}.plans-promise-icon{width:44px;height:44px}.upgrade-card{margin-bottom:8px}}

.topbar-plans{white-space:nowrap;border-color:rgba(187,129,248,.35);background:#312043;color:#f5e8ff}.topbar-plans:hover{background:#442a60}
@media(max-width:760px){.topbar-plans{margin-left:auto}.provider-picker{max-width:calc(100% - 20px)}}

/* v0.5.2 — branded scrollbars: indigo track + navy thumb */
*{scrollbar-width:thin;scrollbar-color:#351754 #562e81}
*::-webkit-scrollbar{width:11px;height:11px}
*::-webkit-scrollbar-track{background:#562e81;border-radius:999px}
*::-webkit-scrollbar-thumb{background:#351754;border:2px solid #562e81;border-radius:999px;min-height:34px}
*::-webkit-scrollbar-thumb:hover{background:#531e8a}
*::-webkit-scrollbar-corner{background:#562e81}

/* v0.5.2 — promo code / premium flow */
.promo-code-panel{max-width:1180px;margin:0 auto 18px;display:grid;grid-template-columns:minmax(220px,1fr) minmax(300px,.8fr);gap:14px;align-items:end;background:linear-gradient(135deg,rgba(86,46,129,.28),rgba(21,12,30,.98))}.promo-code-panel h3{margin:3px 0 5px}.promo-code-entry{display:grid;grid-template-columns:1fr auto;gap:8px}.promo-notice{grid-column:1/-1;font-size:11px;min-height:18px}.promo-notice.good{color:#86efac}.promo-notice.bad{color:#fca5a5}.plan-promo-badge{display:inline-flex;align-self:flex-start;border:1px solid rgba(74,222,128,.35);background:rgba(22,101,52,.18);color:#bbf7d0;border-radius:999px;padding:5px 8px;font-size:10px;font-weight:800;margin-bottom:7px}.checkout-code-box{margin-top:12px;padding:12px;border:1px solid rgba(187,129,248,.22);background:#1d102a;border-radius:12px}.checkout-code-box .secondary{margin:8px 0}.checkout-code-box .promo-notice{display:block}
@media(max-width:760px){.promo-code-panel{grid-template-columns:1fr}.promo-code-entry{grid-template-columns:1fr}.promo-code-entry button{width:100%}}



.current-rp-nav{padding-top:7px}
.current-rp-nav-toggle{width:100%;border:0;background:transparent;color:inherit;display:flex;align-items:center;justify-content:space-between;text-align:left;padding:3px 8px 7px;cursor:pointer;border-radius:9px}
.current-rp-nav-toggle:hover{background:rgba(187,129,248,.08)}
.current-rp-nav-toggle>span:first-child{min-width:0;display:grid;gap:2px}
.current-rp-nav-toggle .current-rp-nav-label,.current-rp-nav-toggle .current-rp-nav-title{padding:0}
.rp-nav-chevron{color:var(--accent);font-size:18px;transition:transform .18s ease}.current-rp-nav:not(.collapsed) .rp-nav-chevron{transform:rotate(180deg)}
.current-rp-nav-items{display:grid;gap:4px;overflow:hidden;max-height:180px;opacity:1;transition:max-height .18s ease,opacity .18s ease}.current-rp-nav.collapsed .current-rp-nav-items{max-height:0;opacity:0;pointer-events:none}
.plan-promo-badge.reward{background:linear-gradient(120deg,#7f38ca,#a863f1);color:white}.plan-card.reward-plan{border-color:#bb81f8;box-shadow:0 0 0 1px rgba(187,129,248,.2),var(--shadow)}















/* v0.6.0 — focused 2D artwork generator */
.image-field-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:end;margin:10px 0}.image-field-row label{margin:0}.image-generator-preview{margin-top:14px;display:grid;gap:8px;justify-items:center}.image-generator-preview img{display:block;max-width:100%;max-height:520px;border-radius:20px;border:1px solid rgba(187,129,248,.45);box-shadow:0 18px 50px rgba(28,15,42,.35);object-fit:cover}.scenario-cover{height:148px;margin:-14px -14px 12px;overflow:hidden;border-radius:18px 18px 12px 12px;background:#211231}.scenario-cover img{width:100%;height:100%;object-fit:cover;display:block}



@media(max-width:720px){.image-field-row{grid-template-columns:1fr}.image-field-row button{width:100%}.scenario-discover-grid,.rp-grid{grid-template-columns:1fr}.scenario-cover{height:138px}}

/* v0.6.1 — imported RP/chat history */
.import-intro{display:flex;flex-direction:column;gap:4px;padding:12px 13px;margin-bottom:12px;border:1px solid rgba(187,129,248,.26);border-radius:13px;background:linear-gradient(135deg,rgba(86,46,129,.28),rgba(24,15,34,.84));color:#d4baef;font-size:12px;line-height:1.5}.import-intro strong{color:#fff;font-size:14px}.import-rule{padding:10px 12px;border-radius:11px;border:1px solid rgba(187,129,248,.22);background:#1d1129;color:#c2abdb;font-size:11px;line-height:1.5;margin-bottom:10px}.import-rule strong{color:#f8eeff}.import-file-label input[type=file]{padding:8px;background:#181021}.import-preview-box{border:1px solid rgba(187,129,248,.2);background:#170e20;border-radius:12px;padding:11px;min-height:66px;margin:6px 0 12px}.import-preview-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}.import-speakers{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:8px}.import-preview-messages{display:grid;gap:6px;margin-top:9px;max-height:180px;overflow:auto;padding-right:3px}.import-preview-messages>div{font-size:11px;line-height:1.4;padding:7px 8px;border-radius:8px;background:#20152b;color:#c6aedf}.import-warning{font-size:11px;color:#f2c879;margin-top:6px}.good-text{color:#86efac;font-size:12px}.bad-text{color:#fca5a5;font-size:12px}.import-status-panel{max-width:1450px;margin:0 auto 16px;background:linear-gradient(145deg,rgba(40,28,53,.95),rgba(21,13,29,.98));border-color:rgba(187,129,248,.25)}.world-import-summary{max-width:1450px;margin:0 auto 15px;border-color:rgba(187,129,248,.3);background:linear-gradient(120deg,rgba(62,37,88,.7),rgba(27,17,37,.94))}.import-review-list{display:grid;gap:7px;margin-top:10px}.import-review-item{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;border:1px solid rgba(187,129,248,.18);border-radius:10px;padding:8px 9px;background:rgba(15,9,22,.46)}.import-review-item>div{display:grid;gap:2px}.import-review-item strong{font-size:11px;color:#f9f2ff}.import-review-item span{font-size:11px;color:#d0b7ea}.import-review-item small{font-size:10px;color:#9f89b7;line-height:1.35}.message-meta span+span{margin-left:5px}
@media(max-width:760px){.import-preview-head{align-items:flex-start;flex-direction:column}.import-review-item{flex-direction:column}.import-status-panel{margin:0 0 14px}}
.import-review-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.import-source-view{width:100%;min-height:420px;white-space:pre-wrap;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;line-height:1.45}


/* v0.6.3 — visible RP import + personality reconstruction */
.import-rp-callout{max-width:1450px;margin:0 auto 16px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;border:1px solid rgba(187,129,248,.30);background:linear-gradient(120deg,rgba(86,46,129,.30),rgba(25,15,35,.96));border-radius:14px;box-shadow:0 14px 38px rgba(0,0,0,.16)}
.import-rp-callout>div{display:flex;flex-direction:column;gap:4px}.import-rp-callout strong{color:#faf4ff;font-size:13px}.import-rp-callout span{color:#bea7d6;font-size:11px;line-height:1.5;max-width:900px}.import-rp-callout button{white-space:nowrap}
.character-personality-preview{display:flex;gap:5px;flex-wrap:wrap;margin-top:7px}.personality-chip{display:inline-flex;align-items:center;border:1px solid rgba(187,129,248,.25);background:rgba(111,74,150,.18);color:#e2c7ff;border-radius:999px;padding:3px 7px;font-size:10px}.personality-confidence{color:#b59ad2;font-size:10px;margin-top:5px}.personality-edit-block{padding:11px 12px;margin:10px 0;border:1px solid rgba(187,129,248,.22);border-radius:12px;background:rgba(32,20,45,.55)}.personality-edit-block h4{margin:0 0 5px}.personality-evidence-list{display:grid;gap:6px;margin-top:8px;max-height:180px;overflow:auto}.personality-evidence-row{padding:7px 8px;border-radius:8px;background:rgba(16,9,24,.46);border:1px solid rgba(187,129,248,.12);font-size:10px;color:#bea7d6;line-height:1.4}.personality-evidence-row strong{color:#f4e6ff}
@media(max-width:760px){.import-rp-callout{align-items:stretch;flex-direction:column}.import-rp-callout button{width:100%}}


@media(max-width:520px){}

/* v0.6.7 — scenario creator + inline research */
.creator-section{margin:16px 0;padding:14px;border:1px solid rgba(187,129,248,.18);border-radius:15px;background:rgba(31,19,43,.58)}
.creator-section h3{margin:0 0 8px}.creator-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:8px}.creator-section-head h3{margin:0}.field-with-action{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end}.field-with-action>label{margin:0}.opening-section{border-color:rgba(187,129,248,.42);background:linear-gradient(135deg,rgba(86,46,129,.22),rgba(30,18,43,.65))}.creator-advanced{margin:16px 0}.creator-advanced summary{cursor:pointer;font-weight:800;color:#e1c6fe}.creation-research-overlay{position:absolute;inset:0;z-index:30;background:rgba(11,5,18,.72);backdrop-filter:blur(5px);display:flex;align-items:flex-start;justify-content:flex-end;border-radius:18px;overflow:auto}.creation-research-sheet{width:min(720px,92%);min-height:100%;background:#180e22;border-left:1px solid rgba(187,129,248,.28);padding:18px;box-shadow:-18px 0 55px rgba(0,0,0,.28)}.creation-research-sheet .web-result-list{max-height:46vh;overflow:auto;margin-top:12px}.research-edit-card{margin-top:12px;padding:12px;border:1px solid rgba(187,129,248,.28);border-radius:12px;background:#1d102a}.modal-card{position:relative;overflow:auto}

@media(max-width:720px){.creator-section-head,.field-with-action{display:grid;grid-template-columns:1fr}.creator-section-head button,.field-with-action button{width:100%}.creation-research-sheet{width:100%;min-height:100%}}

/* v0.7.0 — first-class personas + tier slots */
.persona-slot-note{margin:0 0 10px;padding:9px 11px;border-radius:11px;border:1px solid rgba(187,129,248,.22);background:rgba(86,46,129,.16);font-size:12px;color:#e2c7ff}.persona-card-avatar{width:72px;height:72px;border-radius:18px;object-fit:cover;border:1px solid rgba(187,129,248,.24);margin-bottom:12px}.persona-image-actions{display:flex;gap:8px;align-items:end}.start-persona-box{margin:12px 0;padding:13px;border:1px solid rgba(187,129,248,.22);border-radius:13px;background:rgba(30,18,43,.72)}.start-persona-box select{width:100%;margin:10px 0 6px}.start-persona-box.needs-persona{text-align:center;border-style:dashed}.inline-persona-create{margin:10px 0 14px;padding:14px;border-radius:13px;border:1px solid rgba(187,129,248,.28);background:rgba(19,10,28,.92)}.inline-persona-create h3{margin-top:0}@media(max-width:720px){.persona-image-actions{display:grid;grid-template-columns:1fr 1fr}.persona-grid{grid-template-columns:1fr}}


/* v0.7.1 cloud account gate */
.auth-gate{position:fixed;inset:0;z-index:100000;display:grid;place-items:center;padding:22px;background:radial-gradient(circle at 50% 0,rgba(147,70,229,.34),transparent 38%),rgba(9,5,14,.96);backdrop-filter:blur(16px)}
.auth-card{width:min(440px,94vw);border:1px solid rgba(187,129,248,.3);border-radius:24px;background:linear-gradient(155deg,#241731,#120b19);box-shadow:0 30px 90px rgba(0,0,0,.48);padding:24px;color:#fbf4ff}.auth-brand{display:flex;align-items:center;gap:12px;margin-bottom:18px}.auth-brand>div:last-child{display:grid;gap:2px}.auth-brand strong{font-size:22px}.auth-brand span{font-size:12px;color:#b7a1cf}.auth-mark{width:48px;height:48px;display:grid;place-items:center;border-radius:16px;background:linear-gradient(145deg,#bc7cff,#9346e5);font-size:22px;font-weight:900}.auth-notice{border:1px solid rgba(187,129,248,.22);background:rgba(147,70,229,.12);border-radius:13px;padding:11px 12px;font-size:12px;line-height:1.5;color:#e9d8f5;margin-bottom:14px}.auth-card label{display:grid;gap:6px;margin:10px 0;font-size:12px;color:#d8c7e4}.auth-card input{width:100%;box-sizing:border-box;border:1px solid #51366e;border-radius:12px;background:#1a1025;color:#fff;padding:11px 12px}.auth-actions{display:flex;gap:9px;margin-top:16px}.auth-actions button{flex:1}.auth-link{display:block;margin:12px auto 0;border:0;background:transparent;color:#d6aeff;cursor:pointer}.auth-error{min-height:20px;margin-top:10px;color:#fca5a5;font-size:12px;line-height:1.4}.auth-error.auth-good{color:#a7f3d0}.auth-foot{margin-top:14px;border-top:1px solid rgba(187,129,248,.15);padding-top:12px;color:#9684a9;font-size:10px;line-height:1.5}

.plan-perks-panel{max-width:1180px;margin:0 auto 18px;background:linear-gradient(135deg,rgba(147,70,229,.18),rgba(21,12,30,.98));border-color:rgba(187,129,248,.20)}
.plan-perks-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.perk-card{border:1px solid rgba(187,129,248,.18);background:rgba(19,10,28,.78);border-radius:14px;padding:14px}
.perk-card h3{margin:4px 0 6px}
.promo-notice .primary.small{margin-left:8px}
@media(max-width:900px){.plan-perks-grid{grid-template-columns:1fr}}

/* v0.8.1 branding + notifications */
.brand-mark{overflow:hidden;background:#0f0717!important;border:1px solid rgba(187,129,248,.42)!important;padding:0!important}
.brand-mark img,.auth-mark img{width:100%;height:100%;object-fit:cover;display:block}
.auth-mark{overflow:hidden;padding:0;background:#0f0717!important;border:1px solid rgba(187,129,248,.42)}
.notification-bell{position:relative;width:38px;height:38px;border-radius:11px;border:1px solid rgba(187,129,248,.26);background:#1f152a;color:#f8eeff;display:grid;place-items:center;font-size:16px}
.notification-bell:hover{background:#2f203e}
.notification-badge{position:absolute;right:-5px;top:-6px;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#ef4444;color:white;font-size:10px;font-weight:900;display:grid;place-items:center;border:2px solid #16101c}
.notification-badge.hidden{display:none}
.notification-inbox{display:grid;gap:9px;max-height:58vh;overflow:auto;padding-right:3px}
.notification-item{border:1px solid rgba(187,129,248,.18);background:#1c1127;border-radius:13px;padding:12px;display:grid;gap:7px}
.notification-item.unread{border-color:rgba(187,129,248,.48);box-shadow:inset 3px 0 0 #bb81f8}
.notification-item-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.notification-item h4{margin:0;font-size:14px}
.notification-item p{margin:0;color:#d1c1dd;line-height:1.5;font-size:12px}
.notification-meta{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.notification-priority-high{color:#fbbf24}.notification-priority-critical{color:#f87171;font-weight:900}
.notification-inbox-actions{display:flex;justify-content:flex-end;margin-bottom:10px}







body.original-indigo-theme{
  --bg:#120f15!important;--panel:#1b1720!important;--panel2:#241e2a!important;
  --line:#332c3b!important;--text:#f5f1f5!important;--muted:#aaa7b3!important;
  --accent:#bb81f8!important;--accent2:#9346e5!important;--accent-soft:#36234a!important;
  --gold:#d7b978!important;--good:#99d6b4!important;--warn:#f0c788!important;
  --bad:#f39a9a!important;--shadow:0 18px 60px rgba(0,0,0,.28)!important;
  background:#120f15!important;color:#f5f1f5!important;
}
body.original-indigo-theme .main{
  background:radial-gradient(circle at 75% -18%,rgba(147,70,229,.14),transparent 35%),#120f15!important;
}
body.original-indigo-theme .topbar{
  background:rgba(18,15,21,.94)!important;border-color:#332c3b!important;color:#f5f1f5!important;
}
body.original-indigo-theme input,body.original-indigo-theme select,body.original-indigo-theme textarea{
  background:#191122!important;border-color:#4d3467!important;color:#f5f1f5!important;
}
body.original-indigo-theme .panel,body.original-indigo-theme .dash-card,body.original-indigo-theme .scenario-card,body.original-indigo-theme .rp-card,body.original-indigo-theme .persona-card,body.original-indigo-theme .creator-content-card,body.original-indigo-theme .plan-card,body.original-indigo-theme .community-card,body.original-indigo-theme .profile-card{
  background:linear-gradient(165deg,rgba(46,31,61,.96),rgba(19,13,25,.98))!important;
  border-color:rgba(187,129,248,.22)!important;color:#f5f1f5!important;
  box-shadow:0 16px 45px rgba(0,0,0,.18)!important;
}
body.original-indigo-theme h1,body.original-indigo-theme h2,body.original-indigo-theme h3,body.original-indigo-theme strong{color:#f5f1f5!important}
body.original-indigo-theme .muted,body.original-indigo-theme .plan-model-note{color:#aaa7b3!important}
body.original-indigo-theme .primary{
  background:linear-gradient(145deg,#bb81f8,#9346e5)!important;color:#100818!important;
  box-shadow:0 10px 24px rgba(147,70,229,.20)!important;
}
body.original-indigo-theme .secondary{background:#342445!important;border-color:#5f457a!important;color:#f1e0ff!important}
body.original-indigo-theme .ghost{background:#1b1720!important;border-color:#4d3467!important;color:#d3d0d7!important}
body.original-indigo-theme .messages{background:linear-gradient(180deg,#17141b,#141118)!important;border-color:#332c3b!important}
body.original-indigo-theme .message.assistant .bubble{background:#201b25!important;border-color:#332d3a!important;color:#f5f1f5!important}
body.original-indigo-theme .message.user .bubble{background:#322242!important;border-color:#5b4176!important;color:#f5f1f5!important}
body.original-indigo-theme .scene-chip,body.original-indigo-theme .status-pill,body.original-indigo-theme .tag{background:#1d1822!important;border-color:#4d3467!important;color:#e0c5fd!important}
body.original-indigo-theme .chat-settings{background:linear-gradient(180deg,#5c308b 0%,#4f2878 48%,#3f205f 100%)!important;border-color:#9962d3!important}
body.original-indigo-theme .creator-section,body.original-indigo-theme .opening-section,body.original-indigo-theme .persona-slot-note,body.original-indigo-theme .start-persona-box,body.original-indigo-theme .inline-persona-create{
  background:#191122!important;border-color:rgba(187,129,248,.22)!important;color:#e8e4e9!important;
}
body.original-indigo-theme .creation-research-overlay{background:rgba(0,0,0,.62)!important}
body.original-indigo-theme .creation-research-sheet,body.original-indigo-theme .research-edit-card{background:#180f22!important;border-color:#4d3467!important;color:#f5f1f5!important}
body.original-indigo-theme .notification-bell{background:#1b1720!important;border-color:#4d3467!important;color:#e1c6fe!important}
body.original-indigo-theme .notification-badge{border-color:#1b1720!important}
body.original-indigo-theme .notification-item{background:#191122!important;border-color:#4d3467!important;color:#f5f1f5!important}
body.original-indigo-theme .notification-item p{color:#aaa7b3!important}
body.original-indigo-theme *{scrollbar-width:thin;scrollbar-color:#351754 #562e81}
body.original-indigo-theme *::-webkit-scrollbar-track{background:#562e81!important}
body.original-indigo-theme *::-webkit-scrollbar-thumb{background:#351754!important;border-color:#562e81!important}

/* Customer-only advanced information box */
.advanced-explain{background:#191122;border:1px solid #46305e;border-radius:10px;padding:9px 10px;margin:8px 0;color:#d9c9e5;font-size:12px;line-height:1.45}.advanced-explain strong{color:#fff}.advanced-explain span{display:block;margin-top:3px}

/* v0.9.1 RP command palette + blue narration */
.rp-narration{color:#b37dfc;font-style:italic}.command-trigger{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:24px;font-weight:850;line-height:1}.composer-continue{min-width:92px;border:1px solid #544563;background:#282030;color:#efe8f5;border-radius:9px;padding:0 13px}.command-menu{min-width:290px;max-height:min(62vh,520px);overflow:auto}.command-menu-head{display:flex;flex-direction:column;gap:2px;padding:9px 11px 10px;border-bottom:1px solid var(--line);color:#f2eef3}.command-menu-head span{font-size:11px;color:var(--muted);font-weight:400}.command-menu button{text-align:left}.web-result-actions{flex-wrap:wrap}


/* v0.9.2 — immersion-first RP surface */
.rp-immersive-header{display:flex;align-items:center;gap:12px;min-height:62px;padding:7px 8px 12px;border-bottom:1px solid rgba(187,129,248,.12);margin-bottom:10px}
.rp-character-avatar{width:44px;height:44px;border-radius:50%;overflow:hidden;display:grid;place-items:center;flex:0 0 auto;background:linear-gradient(145deg,#3e2955,#21152d);border:1px solid rgba(187,129,248,.30);color:#f8eeff;font-weight:850;letter-spacing:.02em}
.rp-character-avatar img{width:100%;height:100%;object-fit:cover;display:block}.rp-character-name{font-size:17px;font-weight:820;color:#f7f5ff;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rp-more-btn{margin-left:auto;width:42px;height:42px;border:0;border-radius:50%;background:transparent;color:#e9e7f3;font-size:27px;line-height:1;display:grid;place-items:center}.rp-more-btn:hover{background:rgba(187,129,248,.12)}
.rp-immersion-menu{display:grid;gap:14px}.rp-menu-section{display:grid;gap:8px;padding:12px;border:1px solid rgba(187,129,248,.18);border-radius:14px;background:rgba(22,14,31,.72)}
.rp-menu-section h4{margin:0;color:#f4f3ff}.rp-menu-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.rp-menu-actions button{min-height:42px}
.rp-length-definitions{display:grid;gap:6px}.rp-length-definition{display:grid;grid-template-columns:82px 1fr;gap:10px;align-items:start;font-size:11px;line-height:1.45;color:#bba5d3}.rp-length-definition strong{color:#f5e7ff}
.rp-menu-plan-line{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#c2abdb;font-size:11px}.rp-menu-plan-line strong{color:#fff}
body.rp-immersive .sidebar,body.rp-immersive .topbar{display:none!important}
body.rp-immersive .main{margin-left:0!important}
body.rp-immersive #view-chat{padding:10px 18px 16px!important}
body.rp-immersive .chat-layout{display:block;max-width:1120px;margin:0 auto}
body.rp-immersive .mobile-chat-tools,body.rp-immersive #sceneStrip,body.rp-immersive .composer-controls,body.rp-immersive #commandPaletteBtn,body.rp-immersive #continueBtn,body.rp-immersive #generationNotice,body.rp-immersive #sceneSettingsPanel{display:none!important}
body.rp-immersive .messages{height:calc(100vh - 178px);min-height:360px;border:0;background:transparent;border-radius:0;padding:14px 8px 20px}
body.rp-immersive .composer-wrap{position:sticky;bottom:0;background:linear-gradient(180deg,rgba(18,15,21,0),#120f15 18%);padding-top:14px}
body.rp-immersive .composer-shell{max-width:980px;margin:0 auto}
body.rp-immersive .composer{grid-template-columns:minmax(0,1fr) auto;gap:9px;align-items:end}
body.rp-immersive .composer textarea{min-height:52px;max-height:180px;border-radius:18px;padding:14px 16px;background:#1b1720;border-color:#393042}
body.rp-immersive #sendBtn{min-height:48px;border-radius:16px;padding:0 20px}
body.rp-immersive.rp-settings-open #sceneSettingsPanel{display:block!important;position:fixed;right:18px;top:18px;bottom:18px;width:min(380px,calc(100vw - 36px));z-index:80;overflow:auto;box-shadow:0 28px 90px rgba(0,0,0,.55)}
body.rp-immersive .scene-settings-backdrop:not(.hidden),body.rp-immersive #sceneSettingsBackdrop:not(.hidden){display:block!important}
@media(max-width:720px){body.rp-immersive #view-chat{padding:7px 8px 10px!important}.rp-immersive-header{padding:5px 4px 9px}.rp-character-avatar{width:40px;height:40px}.rp-character-name{font-size:16px}.rp-menu-actions{grid-template-columns:1fr}.rp-length-definition{grid-template-columns:72px 1fr}body.rp-immersive .messages{height:calc(100vh - 162px);padding-left:3px;padding-right:3px}}


/* v0.9.3 — cinematic RP polish: premium, atmospheric, immersion-first */
body.rp-immersive{
  --rp-ink:#0a070d;--rp-panel:rgba(22,16,29,.78);--rp-plum:#603f83;--rp-violet:#aa6fe8;--rp-lilac:#d2b7ef;--rp-rose:#a27fc6;
  background:
    radial-gradient(900px 540px at 12% -8%,rgba(115,70,162,.18),transparent 62%),
    radial-gradient(760px 520px at 93% 8%,rgba(92,61,124,.11),transparent 65%),
    linear-gradient(180deg,#0c0910 0%,#0b080e 55%,#0c0811 100%);
  color:#f7f2fb;
}
body.rp-immersive::before{
  content:"";position:fixed;inset:0;pointer-events:none;z-index:0;opacity:.62;
  background:
    radial-gradient(circle at 50% 18%,rgba(172,126,220,.055),transparent 34%),
    linear-gradient(110deg,transparent 0 42%,rgba(255,255,255,.012) 50%,transparent 58%);
}
body.rp-immersive::after{
  content:"";position:fixed;z-index:0;pointer-events:none;right:-9vw;top:-15vh;width:min(58vw,760px);height:min(78vh,880px);
  background-image:var(--rp-character-bg,none);background-size:cover;background-position:center 18%;filter:blur(58px) saturate(.72);
  opacity:.055;transform:scale(1.16);mask-image:linear-gradient(180deg,#000 0%,rgba(0,0,0,.72) 42%,transparent 92%);-webkit-mask-image:linear-gradient(180deg,#000 0%,rgba(0,0,0,.72) 42%,transparent 92%);
}
body.rp-immersive #view-chat{position:relative;z-index:1;max-width:none!important}
body.rp-immersive .chat-layout{max-width:1180px}
body.rp-immersive .chat-column{display:flex;min-height:calc(100vh - 26px);flex-direction:column}
body.rp-immersive .rp-immersive-header{
  position:sticky;top:8px;z-index:15;max-width:1020px;width:calc(100% - 8px);margin:0 auto 8px;
  min-height:70px;padding:9px 12px;
  border:1px solid rgba(193,153,235,.12);border-radius:23px;
  background:linear-gradient(145deg,rgba(23,17,30,.84),rgba(13,10,17,.70));
  box-shadow:0 18px 60px rgba(0,0,0,.22),inset 0 1px 0 rgba(255,255,255,.025);
  backdrop-filter:blur(20px) saturate(118%);
}
body.rp-immersive .rp-character-avatar{
  width:50px;height:50px;border:1px solid rgba(206,171,244,.30);
  box-shadow:0 0 0 3px rgba(121,79,165,.10),0 7px 25px rgba(0,0,0,.36),0 0 28px rgba(131,80,185,.12);
  background:linear-gradient(145deg,#3e2c51,#19131f);
}
body.rp-immersive .rp-character-name{
  font-size:19px;font-weight:730;letter-spacing:.015em;color:#fbf7ff;
  text-shadow:0 1px 16px rgba(220,187,255,.08);
}
body.rp-immersive .rp-more-btn{
  width:44px;height:44px;color:#d3baee;border:1px solid transparent;
  transition:background .18s ease,border-color .18s ease,transform .18s ease;
}
body.rp-immersive .rp-more-btn:hover{background:rgba(165,119,214,.09);border-color:rgba(201,167,237,.11);transform:translateY(-1px)}

body.rp-immersive .messages{
  flex:1;height:auto;min-height:0;max-width:1030px;width:100%;margin:0 auto;
  padding:19px 18px 30px;scrollbar-width:thin;scrollbar-color:rgba(154,119,191,.25) transparent;
}
body.rp-immersive .messages::-webkit-scrollbar{width:7px}
body.rp-immersive .messages::-webkit-scrollbar-track{background:transparent}
body.rp-immersive .messages::-webkit-scrollbar-thumb{background:rgba(154,119,191,.20);border-radius:99px}
body.rp-immersive .message{max-width:88%;margin:18px 0;gap:5px}
body.rp-immersive .message.user{max-width:72%;margin-left:auto}
body.rp-immersive .bubble{
  padding:16px 18px;border-radius:24px;line-height:1.72;font-size:15px;letter-spacing:.003em;
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
body.rp-immersive .message.assistant .bubble{
  background:linear-gradient(145deg,rgba(28,22,34,.74),rgba(18,14,22,.58));
  border:1px solid rgba(184,149,220,.095);border-bottom-left-radius:8px;
  box-shadow:0 12px 32px rgba(0,0,0,.10),inset 0 1px 0 rgba(255,255,255,.018);
  backdrop-filter:blur(8px);
}
body.rp-immersive .message.user .bubble{
  background:linear-gradient(145deg,rgba(73,49,99,.96),rgba(56,37,76,.96));
  border:1px solid rgba(207,172,244,.20);border-bottom-right-radius:8px;
  box-shadow:0 12px 34px rgba(32,17,48,.20),inset 0 1px 0 rgba(255,255,255,.035);
  color:#fcf9ff;
}
body.rp-immersive .message:hover .bubble{border-color:rgba(201,165,239,.16)}
body.rp-immersive .rp-narration{
  color:#cfb6e9;font-style:italic;font-family:Georgia,"Times New Roman",serif;
  font-size:1.035em;line-height:1.76;letter-spacing:.006em;
}
body.rp-immersive .message-meta{
  min-height:0;max-height:0;overflow:hidden;padding:0 7px;color:#7d6e8d;font-size:10px;opacity:0;
  transition:opacity .18s ease,max-height .18s ease,margin .18s ease;margin:0;
}
body.rp-immersive .message:hover .message-meta{max-height:22px;opacity:.62;margin-bottom:1px}
body.rp-immersive .message-actions{
  opacity:0;max-height:0;overflow:hidden;transform:translateY(-2px);transition:opacity .18s ease,max-height .18s ease,transform .18s ease;
}
body.rp-immersive .message.assistant:hover .message-actions{opacity:.72;max-height:34px;transform:none}
body.rp-immersive .tiny-btn{
  border-color:rgba(179,149,210,.14);background:rgba(23,17,29,.50);color:#9886ac;border-radius:10px;padding:5px 9px;
}
body.rp-immersive .tiny-btn:hover{color:#eee7fa;border-color:rgba(197,165,231,.24);background:rgba(50,37,63,.46)}

body.rp-immersive .composer-wrap{
  position:sticky;bottom:0;z-index:14;margin:0 -4px;padding:21px 4px 4px;
  background:linear-gradient(180deg,rgba(11,8,14,0) 0%,rgba(11,8,14,.82) 25%,rgba(11,8,14,.97) 56%,#0b080e 100%);
}
body.rp-immersive .composer-shell{max-width:980px;width:100%}
body.rp-immersive .composer{
  display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end;
  padding:6px;border-radius:27px;border:1px solid rgba(186,148,225,.15);
  background:linear-gradient(145deg,rgba(25,19,31,.92),rgba(15,12,19,.93));
  box-shadow:0 18px 46px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.025);
  backdrop-filter:blur(16px);
}
body.rp-immersive .composer textarea{
  min-height:48px;max-height:180px;border:0!important;border-radius:21px;padding:13px 15px;
  background:transparent!important;color:#f7f3fb;box-shadow:none!important;resize:none;
}
body.rp-immersive .composer textarea::placeholder{color:#736582}
body.rp-immersive #sendBtn{
  min-width:84px;min-height:48px;border-radius:20px;padding:0 19px;
  background:linear-gradient(145deg,#ae78e6,#8c52c9 58%,#7441aa);
  color:#fff;box-shadow:0 8px 22px rgba(99,55,145,.28),inset 0 1px 0 rgba(255,255,255,.16);
  transition:filter .18s ease,transform .18s ease;
}
body.rp-immersive #sendBtn:hover{filter:brightness(1.07);transform:translateY(-1px)}

/* RP options should feel like a quiet control drawer, not a settings page. */
body.rp-immersive .modal{background:rgba(4,2,7,.73);backdrop-filter:blur(16px) saturate(112%)}
body.rp-immersive .modal-card{
  width:min(720px,100%);max-height:min(86vh,820px);padding:20px;
  border-radius:28px;border:1px solid rgba(195,159,233,.17);
  background:linear-gradient(155deg,rgba(29,22,36,.97),rgba(16,12,20,.985));
  box-shadow:0 35px 110px rgba(0,0,0,.62),inset 0 1px 0 rgba(255,255,255,.03);
}
body.rp-immersive .modal-head{padding:2px 2px 12px}
body.rp-immersive .modal-head h3{font-size:22px;font-weight:720;letter-spacing:.01em}
body.rp-immersive .icon-btn{color:#968c9f}
body.rp-immersive .rp-immersion-menu{grid-template-columns:1.15fr .85fr;gap:12px}
body.rp-immersive .rp-menu-section{
  gap:10px;padding:14px;border-radius:19px;border:1px solid rgba(178,143,214,.12);
  background:linear-gradient(145deg,rgba(33,25,42,.70),rgba(17,13,22,.66));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.018);
}
body.rp-immersive .rp-menu-section:first-child{grid-column:1/-1}
body.rp-immersive .rp-menu-section h4{font-size:13px;letter-spacing:.035em;color:#d9cdea;text-transform:uppercase}
body.rp-immersive .rp-menu-actions{gap:7px}
body.rp-immersive .rp-menu-actions button,
body.rp-immersive .rp-menu-section .ghost,
body.rp-immersive .rp-menu-section .secondary{
  min-height:42px;border-radius:13px;border:1px solid rgba(181,148,215,.13);
  background:rgba(29,22,36,.72);color:#e7e0ef;box-shadow:none;
}
body.rp-immersive .rp-menu-actions button:hover,
body.rp-immersive .rp-menu-section .ghost:hover,
body.rp-immersive .rp-menu-section .secondary:hover{background:rgba(74,54,95,.48);border-color:rgba(204,169,241,.21)}
body.rp-immersive .rp-menu-section select{
  width:100%;appearance:none;-webkit-appearance:none;padding:11px 38px 11px 12px;border-radius:13px;
  border:1px solid rgba(186,151,224,.17);color:#f6f1fb;
  background-color:#19131f;
  background-image:linear-gradient(45deg,transparent 50%,#9b88ae 50%),linear-gradient(135deg,#9b88ae 50%,transparent 50%);
  background-position:calc(100% - 18px) 50%,calc(100% - 13px) 50%;background-size:5px 5px,5px 5px;background-repeat:no-repeat;
  outline:none;
}
body.rp-immersive .rp-length-definitions{gap:7px;margin-top:2px}
body.rp-immersive .rp-length-definition{grid-template-columns:76px 1fr;gap:8px;color:#a89eaf;font-size:10.5px}
body.rp-immersive .rp-length-definition strong{color:#dfd4e8;font-weight:720}
body.rp-immersive .rp-menu-plan-line{padding:2px 1px;color:#a99faf}

@media (pointer:coarse){
  body.rp-immersive .message-meta{display:none!important}
  body.rp-immersive .message-actions{opacity:.42;max-height:32px;transform:none}
}
@media(max-width:720px){
  body.rp-immersive #view-chat{padding:5px 6px 8px!important}
  body.rp-immersive .chat-column{min-height:calc(100vh - 10px)}
  body.rp-immersive .rp-immersive-header{top:4px;min-height:62px;border-radius:19px;padding:7px 9px}
  body.rp-immersive .rp-character-avatar{width:44px;height:44px}
  body.rp-immersive .rp-character-name{font-size:17px}
  body.rp-immersive .messages{padding:14px 5px 26px}
  body.rp-immersive .message{max-width:94%;margin:14px 0}
  body.rp-immersive .message.user{max-width:84%}
  body.rp-immersive .bubble{padding:14px 15px;border-radius:20px;font-size:14px}
  body.rp-immersive .message.assistant .bubble{border-bottom-left-radius:7px}
  body.rp-immersive .message.user .bubble{border-bottom-right-radius:7px}
  body.rp-immersive .composer-wrap{padding-top:17px}
  body.rp-immersive .composer{border-radius:23px;padding:5px}
  body.rp-immersive #sendBtn{min-width:72px;border-radius:18px;padding:0 14px}
  body.rp-immersive .modal-card{border-radius:24px 24px 0 0;margin-top:auto;width:100%;max-height:90vh}
  body.rp-immersive .rp-immersion-menu{grid-template-columns:1fr}
  body.rp-immersive .rp-menu-section:first-child{grid-column:auto}
}


/* v0.9.4 — native-feeling RP surface: remove webpage/card language */
body.rp-immersive{
  background:
    radial-gradient(72vw 50vh at 82% -8%,rgba(94,57,133,.13),transparent 68%),
    radial-gradient(66vw 42vh at -8% 8%,rgba(88,58,120,.10),transparent 72%),
    linear-gradient(180deg,#0b090e 0%,#0a080d 58%,#0c090f 100%);
}
body.rp-immersive::before{opacity:.34;background:radial-gradient(circle at 50% 12%,rgba(170,128,214,.035),transparent 36%)}
body.rp-immersive::after{opacity:.043;filter:blur(68px) saturate(.68)}
body.rp-immersive #view-chat{padding:0 18px 10px!important}
body.rp-immersive .chat-column{min-height:100vh}

/* Bare app bar instead of a floating HTML/glass card. */
body.rp-immersive .rp-immersive-header{
  position:sticky;top:0;z-index:15;max-width:1030px;width:100%;margin:0 auto;
  min-height:68px;padding:10px 5px 9px;
  border:0;border-radius:0;background:rgba(11,9,14,.72);box-shadow:none;
  backdrop-filter:blur(18px) saturate(108%);
}
body.rp-immersive .rp-immersive-header::after{
  content:"";position:absolute;left:4px;right:4px;bottom:0;height:1px;
  background:linear-gradient(90deg,transparent,rgba(197,166,230,.11) 18%,rgba(197,166,230,.11) 82%,transparent);
}
body.rp-immersive .rp-character-avatar{
  width:46px;height:46px;border:0;box-shadow:0 5px 18px rgba(0,0,0,.34);background:#19151e;
}
body.rp-immersive .rp-character-name{font-size:18px;font-weight:660;letter-spacing:.004em;text-shadow:none}
body.rp-immersive .rp-more-btn{width:40px;height:40px;border:0!important;background:transparent!important;box-shadow:none!important;color:#b7afbf}
body.rp-immersive .rp-more-btn:hover{background:rgba(255,255,255,.04)!important;border-color:transparent!important;transform:none}

/* Character prose lives on the scene itself — no assistant card/bubble. */
body.rp-immersive .messages{max-width:1000px;padding:22px 12px 30px}
body.rp-immersive .message{max-width:92%;margin:20px 0}
body.rp-immersive .message.assistant{max-width:96%;margin-left:0}
body.rp-immersive .message.user{max-width:67%;margin-left:auto}
body.rp-immersive .bubble{font-size:15px;line-height:1.76;letter-spacing:.002em}
body.rp-immersive .message.assistant .bubble{
  padding:4px 4px 4px 2px;border:0!important;border-radius:0!important;background:transparent!important;
  box-shadow:none!important;backdrop-filter:none!important;color:#f6edff;
}
body.rp-immersive .message.user .bubble{
  padding:12px 16px;border:0!important;border-radius:18px!important;
  background:rgba(86,61,112,.54)!important;box-shadow:none!important;color:#fbf7ff;
}
body.rp-immersive .message:hover .bubble{border-color:transparent!important}
body.rp-immersive .rp-narration{font-family:inherit;font-size:1em;line-height:1.78;color:#bfa9d7;font-style:italic;letter-spacing:.001em}
body.rp-immersive .message-meta{padding:0 3px;color:#77717d}
body.rp-immersive .tiny-btn{border:0;background:transparent;color:#817987;border-radius:50%;padding:5px 7px}
body.rp-immersive .tiny-btn:hover{border:0;background:rgba(255,255,255,.04);color:#ddd6e4}

/* Composer behaves like a native input dock, not a nested web card. */
body.rp-immersive .composer-wrap{margin:0;padding:18px 0 4px;background:linear-gradient(180deg,transparent,rgba(10,8,13,.88) 36%,#0a080d 72%)}
body.rp-immersive .composer-shell{max-width:970px}
body.rp-immersive .composer{
  padding:4px 4px 4px 15px;border:0;border-radius:24px;background:#17141b;
  box-shadow:none;backdrop-filter:none;align-items:center;gap:5px;
}
body.rp-immersive .composer textarea{min-height:48px;border:0!important;border-radius:0;padding:13px 4px;background:transparent!important;color:#faf4ff}
body.rp-immersive .composer textarea::placeholder{color:#8b71a7}
body.rp-immersive #sendBtn{
  width:48px;min-width:48px;height:48px;min-height:48px;padding:0;border:0;border-radius:50%;font-size:0;
  background:#9e6bd4;color:#fff;box-shadow:none;transform:none!important;filter:none!important;
}
body.rp-immersive #sendBtn::before{content:"↑";font-size:23px;font-weight:760;line-height:1}
body.rp-immersive #sendBtn:disabled::before{content:"…";font-size:24px}

/* ⋯ opens one native drawer: sections + rows, not cards inside a modal. */
body.rp-immersive .modal{background:rgba(0,0,0,.54);backdrop-filter:blur(12px)}
body.rp-immersive .modal-card{
  width:min(650px,100%);max-height:min(88vh,820px);padding:18px 20px 22px;
  border:0;border-radius:26px;background:#141117;box-shadow:0 28px 90px rgba(0,0,0,.52);
}
body.rp-immersive .modal-head{padding:0 2px 8px}
body.rp-immersive .modal-head h3{font-size:20px;font-weight:660}
body.rp-immersive .icon-btn{border:0!important;background:transparent!important;color:#918a98!important;box-shadow:none!important}
body.rp-immersive .rp-immersion-menu{display:block}
body.rp-immersive .rp-menu-section{
  display:grid;gap:0;padding:15px 0 13px;border:0;border-radius:0;background:transparent;box-shadow:none;
}
body.rp-immersive .rp-menu-section+.rp-menu-section{border-top:1px solid rgba(255,255,255,.075)}
body.rp-immersive .rp-menu-section h4{margin:0 4px 8px;font-size:11px;font-weight:720;letter-spacing:.085em;color:#807788;text-transform:uppercase}
body.rp-immersive .rp-menu-actions{display:grid;grid-template-columns:1fr 1fr;gap:0 18px}
body.rp-immersive .rp-menu-actions button,
body.rp-immersive .rp-menu-section .ghost,
body.rp-immersive .rp-menu-section .secondary{
  min-height:46px;padding:9px 4px;border:0;border-bottom:1px solid rgba(255,255,255,.055);border-radius:0;
  background:transparent;color:#f1e4ff;box-shadow:none;text-align:left;font-weight:520;
}
body.rp-immersive .rp-menu-actions button:hover,
body.rp-immersive .rp-menu-section .ghost:hover,
body.rp-immersive .rp-menu-section .secondary:hover{background:rgba(255,255,255,.025);border-color:rgba(255,255,255,.07)}
body.rp-immersive .rp-menu-section select{
  width:100%;appearance:none;-webkit-appearance:none;min-height:47px;padding:10px 30px 10px 4px;
  border:0;border-bottom:1px solid rgba(255,255,255,.075);border-radius:0;color:#f6edff;background-color:transparent;
  background-image:linear-gradient(45deg,transparent 50%,#9576b6 50%),linear-gradient(135deg,#9576b6 50%,transparent 50%);
  background-position:calc(100% - 13px) 50%,calc(100% - 8px) 50%;background-size:5px 5px,5px 5px;background-repeat:no-repeat;
}
body.rp-immersive .rp-length-definitions{gap:0;margin-top:6px}
body.rp-immersive .rp-length-definition{grid-template-columns:74px 1fr;gap:10px;padding:8px 4px;border-bottom:1px solid rgba(255,255,255,.045);color:#a98fc4;font-size:10.5px}
body.rp-immersive .rp-length-definition:last-child{border-bottom:0}
body.rp-immersive .rp-length-definition strong{color:#d7c6e9;font-weight:650}
body.rp-immersive .rp-menu-plan-line{padding:10px 4px 2px;color:#8f8794}
body.rp-immersive .rp-menu-section .full{border-bottom:0}

@media(max-width:720px){
  body.rp-immersive #view-chat{padding:0 8px 7px!important}
  body.rp-immersive .rp-immersive-header{min-height:62px;padding:8px 2px 8px}
  body.rp-immersive .rp-character-avatar{width:42px;height:42px}
  body.rp-immersive .rp-character-name{font-size:16px}
  body.rp-immersive .messages{padding:17px 3px 26px}
  body.rp-immersive .message{max-width:97%;margin:17px 0}
  body.rp-immersive .message.assistant{max-width:98%}
  body.rp-immersive .message.user{max-width:82%}
  body.rp-immersive .bubble{font-size:14px}
  body.rp-immersive .message.user .bubble{padding:11px 14px;border-radius:17px!important}
  body.rp-immersive .composer{border-radius:22px;padding-left:13px}
  body.rp-immersive #sendBtn{width:46px;min-width:46px;height:46px;min-height:46px}
  body.rp-immersive .modal-card{border-radius:24px 24px 0 0;padding:17px 18px 20px}
  body.rp-immersive .rp-menu-actions{grid-template-columns:1fr}
}

/* v0.9.4 — ROUNDED NATIVE GEOMETRY
   Soft squircle/pill language throughout the customer UI, without bringing back web-card clutter. */
:root{--radius-xs:12px;--radius-sm:16px;--radius-md:22px;--radius-lg:28px;--radius-xl:34px;--radius-pill:999px}
button,.primary,.secondary,.ghost,.nav-btn,.tiny-btn,.icon-btn{border-radius:var(--radius-sm)}
input,select,textarea,.model-input{border-radius:var(--radius-sm)}
.panel,.dash-card,.stat-card,.comparison-output,.security-note,.story-start-box{border-radius:var(--radius-lg)}
.modal-card{border-radius:var(--radius-xl)}
.badge,.status-pill,.tag,.scene-chip,.pill{border-radius:var(--radius-pill)}
.brand-mark{border-radius:18px}

/* Rounded app shell without returning to a floating browser-card look. */
body.rp-immersive #view-chat{padding:8px 18px 12px!important}
body.rp-immersive .rp-immersive-header{
  top:8px;min-height:68px;padding:8px 10px;margin:0 auto 2px;
  border:0;border-radius:25px;background:rgba(19,15,23,.79);box-shadow:none;
  backdrop-filter:blur(20px) saturate(112%);
}
body.rp-immersive .rp-immersive-header::after{display:none}
body.rp-immersive .rp-character-avatar{border-radius:17px;overflow:hidden}
body.rp-immersive .rp-more-btn{border-radius:50%!important}
body.rp-immersive .rp-more-btn:hover{background:rgba(255,255,255,.055)!important}

/* The character's prose stays borderless; every actual surface around it is rounded. */
body.rp-immersive .message.assistant .bubble{border-radius:16px!important}
body.rp-immersive .message.user .bubble{border-radius:22px!important}
body.rp-immersive .tiny-btn{border-radius:50%}

body.rp-immersive .composer{border-radius:28px;background:rgba(24,20,28,.96)}
body.rp-immersive .composer textarea{border-radius:22px!important}
body.rp-immersive #sendBtn{border-radius:50%}

/* Rounded native settings sheet: grouped rows, no boxed cards-inside-cards. */
body.rp-immersive .modal-card{border-radius:32px;padding:20px 22px 24px}
body.rp-immersive .icon-btn{border-radius:50%!important}
body.rp-immersive .rp-menu-section{border-radius:22px;padding:14px 0}
body.rp-immersive .rp-menu-section+.rp-menu-section{border-top:0;margin-top:4px}
body.rp-immersive .rp-menu-actions{gap:7px 10px}
body.rp-immersive .rp-menu-actions button,
body.rp-immersive .rp-menu-section .ghost,
body.rp-immersive .rp-menu-section .secondary{
  min-height:46px;padding:10px 13px;border:0;border-radius:16px;
  background:rgba(255,255,255,.032);color:#f3e8ff;
}
body.rp-immersive .rp-menu-actions button:hover,
body.rp-immersive .rp-menu-section .ghost:hover,
body.rp-immersive .rp-menu-section .secondary:hover{background:rgba(183,115,255,.10)}
body.rp-immersive .rp-menu-section select{
  min-height:48px;padding:10px 40px 10px 13px;border:0;border-radius:16px;
  background-color:rgba(255,255,255,.04);
  background-position:calc(100% - 19px) 50%,calc(100% - 14px) 50%;
}
body.rp-immersive .rp-length-definitions{display:grid;gap:6px;margin-top:8px}
body.rp-immersive .rp-length-definition{
  padding:9px 11px;border:0;border-radius:14px;background:rgba(255,255,255,.022);
}
body.rp-immersive .rp-menu-plan-line{padding:10px 11px;border-radius:14px;background:rgba(255,255,255,.022)}

@media(max-width:720px){
  body.rp-immersive #view-chat{padding:6px 8px 8px!important}
  body.rp-immersive .rp-immersive-header{top:5px;min-height:62px;padding:7px 8px;border-radius:22px}
  body.rp-immersive .rp-character-avatar{border-radius:15px}
  body.rp-immersive .message.user .bubble{border-radius:20px!important}
  body.rp-immersive .composer{border-radius:25px}
  body.rp-immersive .composer textarea{border-radius:20px!important}
  body.rp-immersive .modal-card{border-radius:30px 30px 0 0;padding:18px 18px 22px}
  body.rp-immersive .rp-menu-section{border-radius:20px}
  body.rp-immersive .rp-menu-actions button,
  body.rp-immersive .rp-menu-section .ghost,
  body.rp-immersive .rp-menu-section .secondary,
  body.rp-immersive .rp-menu-section select{border-radius:15px}
}


/* v0.9.5 — MELUMIYA APP BLUE + RP FORMAT VISUAL LOCK */
:root{--mel-blue:#a24dff;--mel-blue-strong:#821dea;--mel-blue-deep:#580da6;--mel-blue-soft:#2d0b52;--mel-night:#0c0314}
html,body{background-color:var(--mel-night)}
body.rp-immersive{
  background:radial-gradient(78vw 48vh at 86% -8%,rgba(116,22,214,.16),transparent 69%),radial-gradient(65vw 44vh at -8% 8%,rgba(71,9,136,.13),transparent 72%),linear-gradient(180deg,#0c0314 0%,#0a0212 62%,#0c0314 100%)!important;
}
body.rp-immersive::before{background:radial-gradient(circle at 50% 12%,rgba(162,77,255,.045),transparent 38%)!important}
body.rp-immersive .rp-immersive-header{background:rgba(18,5,33,.82)!important}
body.rp-immersive .rp-character-avatar{background:#19072c!important}
body.rp-immersive .rp-more-btn{color:#bfa8d8!important}
body.rp-immersive .message.assistant .bubble{color:#f6edff!important}
body.rp-immersive .message.user .bubble{background:linear-gradient(145deg,#510e99,#3d0a71)!important;color:#fff!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.08)!important}
body.rp-immersive .rp-narration{color:#bfa9d7!important;font-style:italic!important}
body.rp-immersive .message-meta,body.rp-immersive .message-actions{display:none!important}
body.rp-immersive .composer-wrap{background:linear-gradient(180deg,transparent,rgba(12,3,20,.90) 36%,#0c0314 72%)!important}
body.rp-immersive .composer{background:rgba(22,6,39,.97)!important;box-shadow:inset 0 0 0 1px rgba(162,77,255,.13)!important}
body.rp-immersive #sendBtn{background:linear-gradient(145deg,#8d23ff,#7a0ee8 62%,#5f0bb4)!important;box-shadow:0 8px 25px rgba(122,14,232,.24),inset 0 1px 0 rgba(255,255,255,.18)!important}
body.rp-immersive .modal{background:rgba(7,1,14,.67)!important}
body.rp-immersive .modal-card{background:linear-gradient(155deg,#1b0830,#0e0419)!important;box-shadow:0 28px 90px rgba(0,0,0,.56),inset 0 0 0 1px rgba(162,77,255,.11)!important}
body.rp-immersive .rp-menu-section h4{color:#ad62ff!important}
body.rp-immersive .rp-menu-actions button,body.rp-immersive .rp-menu-section .ghost,body.rp-immersive .rp-menu-section .secondary{background:rgba(92,31,159,.13)!important;color:#f3e8ff!important}
body.rp-immersive .rp-menu-actions button:hover,body.rp-immersive .rp-menu-section .ghost:hover,body.rp-immersive .rp-menu-section .secondary:hover{background:rgba(162,77,255,.13)!important}
body.rp-immersive .rp-menu-section select{background-color:rgba(92,31,159,.13)!important;color:#f6edff!important}
body.rp-immersive .rp-length-definition,body.rp-immersive .rp-menu-plan-line{background:rgba(92,31,159,.09)!important}
body.rp-immersive .rp-length-definition strong{color:#e8d9f9!important}

/* v0.9.6 — real scenario covers */
.start-scenario-cover{display:block;width:100%;max-height:320px;aspect-ratio:16/9;object-fit:cover;border-radius:13px;margin-bottom:12px;border:1px solid rgba(187,129,248,.26);background:#211231}

/* v0.9.7 — profile artwork */
.profile-avatar-image{object-fit:cover;overflow:hidden}
.profile-creation-list{display:grid;gap:12px}
.profile-creation-card{display:flex;gap:13px;align-items:flex-start;padding:12px}
.profile-creation-cover{width:84px;height:112px;object-fit:cover;border-radius:12px;border:1px solid rgba(180,120,245,.22);background:#221035;flex:0 0 auto}
.profile-creation-copy{min-width:0;flex:1}.profile-creation-copy h2{margin:6px 0}.profile-creation-copy p{margin:0;color:var(--muted)}
@media(max-width:520px){.profile-creation-cover{width:72px;height:96px}}

/* v0.9.9 detailed reusable character dossier */
.character-autofill{display:grid;gap:10px;padding:14px;border:1px solid var(--line);border-radius:18px;background:rgba(147,36,255,.06);margin:12px 0 16px}.character-autofill>div:first-child{display:flex;flex-direction:column;gap:3px}.character-autofill-status{display:flex;flex-direction:column;gap:3px;font-size:12px;color:var(--muted)}.character-autofill-status strong{color:var(--text)}.character-dossier-section{border:1px solid var(--line);border-radius:18px;margin:10px 0;background:var(--panel)}.character-dossier-section>summary{cursor:pointer;display:flex;flex-direction:column;gap:3px;padding:14px 16px;list-style:none}.character-dossier-section>summary::-webkit-details-marker{display:none}.character-dossier-section>summary span{font-size:12px;color:var(--muted)}.character-dossier-body{display:grid;gap:10px;padding:0 16px 16px}.character-dossier-body label{margin:0}.character-dossier-section[open]>summary{border-bottom:1px solid var(--line);margin-bottom:14px}


/* 2026-08-20 — MelumiyaChat Cosmic Violet unified brand theme */
:root{
  --bg:#09040f;--panel:#130b1c;--panel2:#1b1028;--line:#3b2354;
  --text:#f8f4ff;--muted:#b7a8c8;--accent:#b56cff;--accent2:#7c3aed;--accent-soft:#2a163d;
  --shadow:0 18px 60px rgba(0,0,0,.34);
}
body{background:radial-gradient(circle at 82% -10%,rgba(177,76,255,.13),transparent 34%),radial-gradient(circle at 0 100%,rgba(111,45,189,.10),transparent 36%),var(--bg)}
.brand-mark,.primary{background:linear-gradient(145deg,#c27aff,#8b3dff 58%,#5d2bd1);color:#fff}
.primary{box-shadow:0 9px 28px rgba(139,61,255,.22),inset 0 1px 0 rgba(255,255,255,.14)}
.topbar{background:rgba(9,4,15,.93)}
.sidebar{background:#0c0712}.nav-btn:hover{background:#160c20}.nav-btn.active{background:#21112f;border-color:#4d286f}
.messages{background:linear-gradient(180deg,#110919,#0b0610)}
.message.user .bubble{background:linear-gradient(145deg,#4f2577,#351854);border-color:#7242a0}
.chat-settings{background:linear-gradient(180deg,#40205f 0%,#33184e 48%,#27123d 100%);border-color:#8750b8;box-shadow:0 18px 60px rgba(79,34,112,.34),inset 0 1px 0 rgba(255,255,255,.05)}
.composer textarea:focus,.panel input:focus,.panel select:focus,.panel textarea:focus{border-color:#b56cff;box-shadow:0 0 0 2px rgba(181,108,255,.14)}


/* 2026-08-20 — Web v1.0.9 UI parity: midnight plum shell, richer sidebar, Updates-first Home */
:root{--bg:#05030a;--panel:#0d0915;--panel2:#140b20;--line:rgba(167,92,255,.22);--text:#f8f1ff;--muted:#b5a7c8;--accent:#b867ff;--accent2:#8b4dff}
html,body{background:radial-gradient(circle at 84% 4%,rgba(126,52,193,.17),transparent 31%),radial-gradient(circle at 8% 34%,rgba(88,35,130,.13),transparent 28%),linear-gradient(155deg,#05030a,#080410 46%,#040209)!important;color:var(--text)}
.sidebar{width:248px;padding:16px 14px;background:radial-gradient(circle at 10% 0%,rgba(110,44,159,.11),transparent 27%),linear-gradient(180deg,#08040e,#05030a)!important;border-right:1px solid rgba(163,84,214,.16)!important;box-shadow:14px 0 36px rgba(0,0,0,.13)}
.brand{padding:2px 6px 14px}.brand-mark{background:transparent!important;box-shadow:none!important}.brand-mark img{width:42px;height:42px;object-fit:cover;border-radius:13px}.brand-sub{color:#8f819c}.sidebar-intro{display:flex;align-items:center;gap:10px;margin:0 3px 14px;padding:11px;border-radius:16px;background:linear-gradient(145deg,rgba(40,16,58,.72),rgba(16,8,24,.82));border:1px solid rgba(167,86,219,.18)}.sidebar-spark{width:34px;height:34px;display:grid;place-items:center;border-radius:11px;background:radial-gradient(circle at 34% 25%,#dba3ff,#8d4bf2 56%,#54207f);box-shadow:0 0 22px rgba(166,78,230,.25)}.sidebar-intro strong{display:block;font-size:12px}.sidebar-intro small{display:block;margin-top:2px;font-size:9px;color:#8f819c}.nav{flex:1;min-height:0}.sidebar-label{margin:5px 12px 6px;color:#74697e;font-size:9px;font-weight:850;letter-spacing:.12em;text-transform:uppercase}.sidebar-label-create{margin-top:14px}.sidebar-spacer{flex:1}.nav-btn{position:relative;min-height:46px;margin:1px 0;padding:7px 9px;border:1px solid transparent;border-radius:15px;color:#9587a3;gap:10px;transition:.16s ease}.nav-btn>span:first-child{width:31px;height:31px;display:grid;place-items:center;border-radius:10px;background:rgba(255,255,255,.018);font-size:16px;color:#aa9ab8}.nav-btn:hover{background:rgba(104,43,151,.08)!important;border-color:rgba(163,83,217,.10);color:#e9ddf2;transform:translateX(1px)}.nav-btn.active{background:linear-gradient(90deg,rgba(111,43,164,.25),rgba(48,18,73,.10))!important;border-color:rgba(190,96,246,.19)!important;color:#f4e7ff!important;box-shadow:inset 3px 0 0 #b85fff,0 11px 26px rgba(0,0,0,.12)}.nav-btn.active>span:first-child{background:linear-gradient(145deg,#8e49ec,#5a238b);color:#fff;box-shadow:0 0 18px rgba(164,78,226,.22)}.nav-profile{margin-top:8px;border-top:1px solid rgba(152,77,199,.10)}.sidebar-bottom{margin-top:10px}.compact-upgrade{padding:12px!important;background:linear-gradient(145deg,#160a22,#0a0610)!important;border-color:rgba(171,86,225,.22)!important}.compact-upgrade>span{font-size:11px!important}.security-note{display:none!important}
.main{margin-left:248px;background:transparent!important}.topbar{background:rgba(7,4,13,.94)!important;border-bottom-color:rgba(183,96,255,.14)!important}.topbar select,.topbar input{background:#0c0712!important;border-color:rgba(150,82,207,.28)!important}.view{background:transparent}
#view-home{max-width:1240px;margin:0 auto}.home-greeting{display:flex;align-items:center;gap:12px;padding:4px 3px 2px;cursor:pointer}.home-greeting-avatar{width:54px;height:54px;border-radius:18px;overflow:hidden;display:grid;place-items:center;background:linear-gradient(145deg,#271340,#6b21a8);border:1px solid rgba(187,104,255,.34);box-shadow:0 10px 28px rgba(0,0,0,.34);font-weight:850}.home-greeting-avatar img{width:100%;height:100%;object-fit:cover}.home-greeting-copy h1{font-size:28px;margin:0 0 4px}.home-greeting-copy p{margin:0;color:#a99bbd}.home-kicker,.home-section-kicker{display:block;color:#d5a7ff;font-size:9px;font-weight:850;letter-spacing:.11em;text-transform:uppercase}.home-section-head{display:flex;align-items:end;justify-content:space-between;gap:16px;margin:26px 2px 10px}.home-section-head h2{margin:0;font-size:20px}.home-updates-head{margin-top:20px}.home-announcements .community-card{position:relative;overflow:hidden;padding:15px 17px;background:radial-gradient(circle at 92% 0%,rgba(206,83,229,.14),transparent 36%),linear-gradient(145deg,rgba(24,11,36,.96),rgba(10,6,17,.98))!important;border:1px solid rgba(181,91,233,.26)!important;box-shadow:0 12px 30px rgba(0,0,0,.18)}.home-announcements .community-card:before{content:"";position:absolute;left:0;top:14px;bottom:14px;width:2px;background:linear-gradient(#c36cff,#8b4dff)}.home-announcements .community-card p{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#b9aac9}.home-update-link{font-size:11px;color:#d39cff}.home-continue{min-height:230px;border:1px solid rgba(177,92,236,.38);border-radius:26px;overflow:hidden;background:#090511;box-shadow:0 24px 60px rgba(0,0,0,.38)}.home-continue-card{position:relative;min-height:230px;display:flex;align-items:flex-end;isolation:isolate;cursor:pointer}.home-continue-card>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 35%;z-index:-3}.home-continue-card:before{content:"";position:absolute;inset:0;z-index:-2;background:linear-gradient(90deg,rgba(5,2,9,.97),rgba(14,5,22,.84) 41%,rgba(19,7,28,.30) 72%,rgba(8,3,13,.34))}.home-continue-card:after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(0deg,rgba(5,2,9,.82),transparent 62%)}.home-continue-copy{padding:28px;max-width:660px}.home-continue-copy>span{display:block;color:#dbadff;font-size:10px;font-weight:850;letter-spacing:.1em;text-transform:uppercase;margin-bottom:7px}.home-continue-copy h2{font-size:29px;margin:0 0 6px}.home-continue-copy small{color:#cabddd}.home-continue-copy p{max-width:560px;line-height:1.5;margin:14px 0 17px}.home-continue-copy .primary{pointer-events:none}.home-rp-strip{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(185px,220px);gap:12px;overflow-x:auto;padding:2px 2px 8px}.home-rp-card{position:relative;min-height:230px;border-radius:20px;overflow:hidden;border:1px solid rgba(157,82,210,.32);background:#0f0717;cursor:pointer;isolation:isolate}.home-rp-card>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-2}.home-rp-card:after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(0deg,rgba(4,3,10,.98),rgba(5,4,12,.64) 40%,rgba(5,4,12,.05) 75%)}.home-rp-card>div{position:absolute;left:0;right:0;bottom:0;padding:14px}.home-rp-card strong,.home-rp-card span{display:block}.home-rp-card span{font-size:10px;color:#c2b5ce;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.home-quick-create{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.home-quick{min-height:96px;padding:14px;border-radius:19px;border:1px solid rgba(158,82,212,.27);background:linear-gradient(155deg,rgba(21,10,32,.97),rgba(9,5,14,.99));color:#fff;text-align:left}.home-quick:hover{border-color:rgba(205,116,255,.52);background:linear-gradient(155deg,rgba(35,14,51,.98),rgba(12,6,18,.99))}.home-quick>span{display:block;font-size:19px;color:#d09aff;margin-bottom:8px}.home-quick strong,.home-quick small{display:block}.home-quick small{font-size:10px;color:#9588a8;margin-top:3px}.home-stats{display:flex;gap:7px;flex-wrap:wrap;margin:20px 0 4px;padding-top:14px;border-top:1px solid rgba(167,88,219,.15)}.home-stats>div{display:flex;align-items:baseline;gap:6px;padding:7px 10px;border-radius:999px;background:rgba(19,9,29,.72);border:1px solid rgba(153,80,201,.22)}.home-stats span{font-size:10px;color:#978aa8}.home-loading{display:grid;place-items:center;min-height:100px;color:#9e91ae}.home-empty{min-height:210px;padding:32px;display:flex;flex-direction:column;justify-content:center;background:radial-gradient(circle at 88% 18%,rgba(164,75,235,.22),transparent 38%),linear-gradient(145deg,#140b26,#090611)}
.scenario-cover img{width:100%;height:100%;object-fit:cover}
/* Pure-black immersive RP + obvious Menu exit */
body.rp-immersive,body.rp-immersive .main,body.rp-immersive #view-chat,body.rp-immersive .chat-layout,body.rp-immersive .chat-column,body.rp-immersive .messages{background:#000!important}body.rp-immersive::before,body.rp-immersive::after{display:none!important;background:none!important}body.rp-immersive .rp-immersive-header{background:rgba(5,3,7,.97)!important;border-color:rgba(177,91,236,.16)!important;box-shadow:0 12px 34px rgba(0,0,0,.44),inset 0 0 0 1px rgba(167,84,224,.035)!important}.rp-exit-menu{width:auto;min-width:82px;height:40px;padding:0 12px;border:1px solid rgba(173,98,230,.22);border-radius:999px;background:rgba(20,10,30,.72);color:#d9c9e4;font-weight:750}.rp-exit-menu:hover{background:rgba(48,20,68,.9);border-color:rgba(202,123,255,.48);color:#fff}body.rp-immersive .message.assistant .bubble{max-width:100%;background:transparent!important;border:0!important;box-shadow:none!important;color:#f2edf4!important}body.rp-immersive .message.user .bubble{background:linear-gradient(145deg,#4a1c72,#32114e)!important;border-color:rgba(201,122,255,.14)!important;box-shadow:0 10px 28px rgba(0,0,0,.28)!important}body.rp-immersive .rp-narration{color:#b8aebc!important}body.rp-immersive .composer-wrap{background:linear-gradient(180deg,transparent,#000 34%)!important}body.rp-immersive .composer{background:#08050a!important;border-color:rgba(177,94,235,.15)!important}body.rp-immersive .composer textarea{color:#f7f2f8!important}
@media(max-width:900px){.home-quick-create{grid-template-columns:repeat(2,minmax(0,1fr))}.home-continue-copy p{display:none}.home-rp-strip{grid-auto-columns:minmax(155px,180px)}}

/* v0.9.15 message branch/delete tools */
.message-delete-btn{color:#c98e9d!important}
.message-delete-btn:hover{color:#ffd5df!important;border-color:rgba(255,120,150,.28)!important;background:rgba(92,29,45,.22)!important}
body.rp-immersive .message-actions{opacity:.08;max-height:30px;overflow:hidden;transition:opacity .18s ease}
body.rp-immersive .message:hover .message-actions,body.rp-immersive .message:focus-within .message-actions{opacity:.68;max-height:40px}
@media(max-width:720px){body.rp-immersive .message-actions{opacity:.38;max-height:40px}}

/* RP response feedback — v0.9.15 UX polish */
.rp-typing .message-actions,.rp-optimistic .message-actions{display:none!important}
.rp-typing-bubble{width:max-content!important;min-width:62px!important;padding:12px 15px!important}
.rp-typing-dots{display:inline-flex;align-items:center;gap:4px;height:16px}
.rp-typing-dot{width:6px;height:6px;border-radius:50%;background:#b997cf;opacity:.36;animation:mcTypingBounce 1.05s infinite ease-in-out}
.rp-typing-dot:nth-child(2){animation-delay:.14s}.rp-typing-dot:nth-child(3){animation-delay:.28s}
@keyframes mcTypingBounce{0%,60%,100%{transform:translateY(0);opacity:.34}30%{transform:translateY(-4px);opacity:1}}
@media (prefers-reduced-motion:reduce){.rp-typing-dot{animation:none;opacity:.72}}

/* Character Autofill v23 — explicit two-phase source selection */
.character-source-list{display:grid;gap:8px}.character-source-card{display:grid;gap:4px;width:100%;text-align:left;padding:11px 12px;border:1px solid var(--line);border-radius:14px;background:var(--panel);color:var(--text);cursor:pointer}.character-source-card:hover{border-color:rgba(167,83,224,.55)}.character-source-card.selected{border-color:var(--accent);box-shadow:0 0 0 2px rgba(167,83,224,.16)}.character-source-top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.character-source-top em{font-style:normal;font-size:10px;padding:3px 7px;border-radius:999px;background:rgba(167,83,224,.16);color:var(--text)}.character-source-card>span:not(.character-source-top),.character-source-card small,.character-source-empty{font-size:11px;color:var(--muted)}.character-source-card small{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

/* Scenario Participants v1 — simple Who's here? surface */
.scenario-participant-list{display:grid;gap:8px;margin:10px 0}.scenario-participant{position:relative;display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--line);border-radius:14px;background:var(--panel2)}.scenario-participant-avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:var(--panel2);flex:0 0 auto}.scenario-participant-copy{min-width:0;display:flex;flex:1;flex-direction:column;gap:2px}.scenario-participant-copy strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.scenario-participant-copy span{font-size:.82rem;color:var(--muted)}.scenario-participant-menu{position:absolute;z-index:40;right:8px;top:46px;min-width:170px;padding:6px;border:1px solid var(--line);border-radius:12px;background:var(--panel);box-shadow:var(--shadow)}.scenario-participant-menu button{display:block;width:100%;padding:8px 9px;border:0;border-radius:8px;background:transparent;color:inherit;text-align:left}.scenario-participant-menu button:hover{background:var(--panel2)}.scenario-participant-add{margin-top:9px;padding:10px;border:1px dashed var(--line);border-radius:14px}
