
/* v2.2.1 cloud icon visibility firewall */
svg.pf-icon{display:block!important;width:20px;height:20px;flex:0 0 auto;opacity:1!important;visibility:visible!important;color:currentColor;stroke:currentColor!important;fill:none!important;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
svg.pf-icon.fill{fill:currentColor!important;stroke:none!important}
.nav-symbol{color:inherit}

/* =====================================================================
   PersonaForge v2.0 — Stability Redesign
   One authoritative visual layer. Loaded after legacy styles so old
   version-specific CSS cannot make core content invisible or unclickable.
   ===================================================================== */

:root{
  --pf2-bg:#0b0d0f;
  --pf2-bg-deep:#07090b;
  --pf2-surface:#111418;
  --pf2-surface-2:#171b20;
  --pf2-surface-3:#1d2228;
  --pf2-line:#262d35;
  --pf2-line-soft:rgba(255,255,255,.075);
  --pf2-text:#f4f2ec;
  --pf2-text-soft:#c4cbd1;
  --pf2-muted:#8f9aa4;
  --pf2-accent:#62dfc1;
  --pf2-accent-2:#7ba8ff;
  --pf2-warm:#f0a760;
  --pf2-danger:#ff7185;
  --pf2-success:#72dda8;
  --pf2-shadow:0 22px 70px rgba(0,0,0,.34);
  --pf2-nav:86px;
  --pf2-story:286px;
  --pf2-radius:18px;
  --pf2-reading:1040px;
  --pf2-chat-size:16px;
  --pf2-chat-line:1.82;
  --pf2-chat-gap:32px;
}
html[data-pf190-reading-width="focused"]{--pf2-reading:820px}
html[data-pf190-reading-width="wide"]{--pf2-reading:1040px}
html[data-pf190-reading-width="full"]{--pf2-reading:1380px}
html[data-pf190-text-size="small"]{--pf2-chat-size:14px}
html[data-pf190-text-size="medium"]{--pf2-chat-size:16px}
html[data-pf190-text-size="large"]{--pf2-chat-size:18px}
html[data-pf190-density="spacious"]{--pf2-chat-gap:36px;--pf2-chat-line:1.9}
html[data-pf190-density="comfortable"]{--pf2-chat-gap:27px;--pf2-chat-line:1.78}
html[data-pf190-density="compact"]{--pf2-chat-gap:19px;--pf2-chat-line:1.65}
html[data-pf190-sidebar="compact"]{--pf2-story:220px}
html[data-pf190-sidebar="hidden"]{--pf2-story:0px}

body.pf200-ui{
  --bg:var(--pf2-bg);
  --panel:var(--pf2-surface);
  --panel2:var(--pf2-surface-2);
  --panel3:var(--pf2-surface-3);
  --line:var(--pf2-line);
  --line-soft:var(--pf2-line-soft);
  --text:var(--pf2-text);
  --muted:var(--pf2-muted);
  --accent:var(--pf2-accent);
  --accent2:var(--pf2-accent-2);
  --danger:var(--pf2-danger);
  --success:var(--pf2-success);
  margin:0;
  overflow:hidden;
  color:var(--pf2-text);
  background:
    radial-gradient(900px 520px at 20% -15%,rgba(98,223,193,.08),transparent 65%),
    radial-gradient(760px 520px at 100% 8%,rgba(123,168,255,.06),transparent 65%),
    var(--pf2-bg);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  letter-spacing:0;
}
body.pf200-ui *{box-sizing:border-box}
body.pf200-ui button,body.pf200-ui input,body.pf200-ui textarea,body.pf200-ui select{font:inherit}
body.pf200-ui button{color:inherit}
body.pf200-ui a{color:var(--pf2-accent)}
body.pf200-ui ::selection{background:rgba(98,223,193,.22);color:#fff}
body.pf200-ui :focus-visible{outline:2px solid var(--pf2-accent);outline-offset:3px}
body.pf200-ui .hidden{display:none!important}

/* Critical visibility firewall. Core content must never depend on animation. */
body.pf200-ui .message,
body.pf200-ui .bubble,
body.pf200-ui .msg-avatar,
body.pf200-ui .nav-symbol,
body.pf200-ui .pf-icon,
body.pf200-ui .discover-card,
body.pf200-ui .recent-chat-card{
  opacity:1!important;
  visibility:visible!important;
  filter:none!important;
}
body.pf200-ui .message{transform:none!important;animation:none!important}
body.pf200-ui .pf-icon{display:block;width:20px;height:20px;flex:0 0 auto;color:currentColor;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
body.pf200-ui .pf-icon.fill{fill:currentColor;stroke:none}

/* App shell + navigation */
body.pf200-ui #app{height:100vh;display:block;padding:0!important}
body.pf200-ui .main-area{height:100vh;margin-left:var(--pf2-nav);min-width:0;position:relative;overflow:hidden}
body.pf200-ui .page-view{height:100vh;overflow:auto;scrollbar-gutter:stable}
body.pf200-ui .page-shell{width:min(1360px,100%);margin:0 auto;padding:46px 46px 116px}
body.pf200-ui .bottom-nav{
  position:fixed!important;inset:0 auto 0 0!important;transform:none!important;
  width:var(--pf2-nav)!important;height:100vh!important;padding:18px 10px!important;
  display:flex!important;flex-direction:column!important;justify-content:center!important;gap:8px!important;
  border:0!important;border-right:1px solid var(--pf2-line)!important;border-radius:0!important;
  background:#090b0d!important;backdrop-filter:none!important;box-shadow:none!important;z-index:1000!important;
}
body.pf200-ui .bottom-nav::before{display:none!important}
body.pf200-ui .pf200-nav-brand{position:absolute;top:18px;left:10px;right:10px;display:grid;place-items:center;gap:5px;color:var(--pf2-text)}
body.pf200-ui .pf200-nav-brand strong{display:grid;place-items:center;width:46px;height:46px;border:1px solid #39434c;border-radius:15px;background:#11151a;font-size:14px;letter-spacing:.06em;box-shadow:inset 0 0 0 1px rgba(98,223,193,.05)}
body.pf200-ui .pf200-nav-brand small{font-size:8px;letter-spacing:.12em;text-transform:uppercase;color:#66717b}
body.pf200-ui .bottom-nav-item{
  position:relative!important;width:64px!important;height:64px!important;margin:0 auto!important;padding:0!important;
  display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:5px!important;
  border:1px solid transparent!important;border-radius:16px!important;background:transparent!important;
  color:#6f7a84!important;font-size:9px!important;font-weight:700!important;letter-spacing:.02em!important;transition:.16s ease!important;
}
body.pf200-ui .bottom-nav-item::after{display:none!important}
body.pf200-ui .bottom-nav-item:hover{background:#11151a!important;color:#c9d0d5!important;border-color:#1c2329!important}
body.pf200-ui .bottom-nav-item.active{background:#151b1f!important;color:#f7f6f2!important;border-color:#29363a!important;box-shadow:inset 3px 0 0 var(--pf2-accent)!important}
body.pf200-ui .bottom-nav-item.active .nav-symbol{color:var(--pf2-accent)!important}
body.pf200-ui .nav-symbol{display:grid;place-items:center;line-height:1;color:inherit!important}

/* Shared headings + controls */
body.pf200-ui .page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin:0 0 30px}
body.pf200-ui .page-heading h1,body.pf200-ui .page-heading h2{margin:5px 0 8px;font-size:clamp(36px,4vw,58px);line-height:.96;letter-spacing:-.055em;font-weight:760}
body.pf200-ui .page-heading p{margin:0;max-width:720px;color:var(--pf2-muted);font-size:14px;line-height:1.65}
body.pf200-ui .eyebrow{color:var(--pf2-accent);font-size:10px;font-weight:850;letter-spacing:.18em;text-transform:uppercase}
body.pf200-ui .heading-actions{display:flex;gap:9px;flex-wrap:wrap}
body.pf200-ui .primary,body.pf200-ui .ghost,body.pf200-ui .send,body.pf200-ui .icon-button{
  min-height:40px;border:1px solid transparent;border-radius:12px;padding:9px 13px;display:inline-flex;align-items:center;justify-content:center;gap:7px;cursor:pointer;transition:background .16s ease,border-color .16s ease,transform .16s ease,color .16s ease,opacity .16s ease
}
body.pf200-ui .primary{background:var(--pf2-accent);color:#07110e;font-weight:820;box-shadow:none}
body.pf200-ui .primary:hover{background:#79e6cc;transform:translateY(-1px);filter:none}
body.pf200-ui .ghost,body.pf200-ui .icon-button{background:#13171b;color:#d8dde0;border-color:#283038}
body.pf200-ui .ghost:hover,body.pf200-ui .icon-button:hover{background:#1a2025;border-color:#39434c;color:#fff}
body.pf200-ui button:disabled{opacity:.45;cursor:not-allowed;transform:none!important}
body.pf200-ui .icon-button{width:40px;height:40px;padding:0}
body.pf200-ui .danger-text{color:var(--pf2-danger)!important}

/* Discover — editorial directory, no glass cards */
body.pf200-ui .pf180-featured{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(300px,.72fr);gap:14px;margin:0 0 26px}
body.pf200-ui .pf180-feature-main{min-height:340px;position:relative;overflow:hidden;border:1px solid #283039;border-radius:24px;background:#11151a;box-shadow:var(--pf2-shadow)}
body.pf200-ui .pf180-feature-main::before{content:"";position:absolute;inset:0;background-image:var(--feature-art);background-size:cover;background-position:center 22%;filter:saturate(.55) contrast(1.06);opacity:.42;transform:scale(1.02)}
body.pf200-ui .pf180-feature-main::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#0d1013 0%,rgba(13,16,19,.95) 34%,rgba(13,16,19,.44) 70%,rgba(13,16,19,.68) 100%)}
body.pf200-ui .pf180-feature-content{position:relative;z-index:2;max-width:600px;padding:42px}
body.pf200-ui .pf180-feature-content .kicker{color:var(--pf2-accent);font-size:10px;letter-spacing:.18em;font-weight:850}
body.pf200-ui .pf180-feature-content h2{margin:14px 0 12px;font-size:52px;line-height:.95;letter-spacing:-.055em}
body.pf200-ui .pf180-feature-content p{margin:0 0 25px;color:#c0c7cb;font-size:15px;line-height:1.7}
body.pf200-ui .pf180-feature-actions{display:flex;gap:9px;flex-wrap:wrap}
body.pf200-ui .pf180-feature-list{display:grid;grid-template-rows:repeat(3,1fr);gap:10px}
body.pf200-ui .pf180-feature-mini{display:flex;align-items:center;gap:13px;padding:13px;border:1px solid #252d34;border-radius:18px;background:#11151a;color:var(--pf2-text);cursor:pointer;transition:.16s ease}
body.pf200-ui .pf180-feature-mini:hover{background:#171c21;border-color:#3b474f;transform:translateX(2px)}
body.pf200-ui .pf180-feature-mini .avatar{width:58px;height:58px;border-radius:14px}
body.pf200-ui .pf180-feature-mini strong{display:block;font-size:15px;margin-bottom:4px}
body.pf200-ui .pf180-feature-mini span{display:block;color:var(--pf2-muted);font-size:11px;line-height:1.45}
body.pf200-ui .discover-search{height:54px;margin:0 0 12px;padding:0 15px;display:flex;align-items:center;gap:10px;background:#101419;border:1px solid #273039;border-radius:14px}
body.pf200-ui .discover-search span{color:#6f7b84;font-size:20px}
body.pf200-ui .discover-search input{width:100%;border:0;outline:0;background:transparent;color:var(--pf2-text);font-size:14px}
body.pf200-ui .discover-search input::placeholder{color:#66717b}
body.pf200-ui .discover-toolbar{padding:11px 0 16px;display:flex;align-items:center;justify-content:space-between;gap:14px;background:transparent;border:0}
body.pf200-ui .filter-chips,body.pf200-ui .discover-selects{display:flex;gap:7px;flex-wrap:wrap}
body.pf200-ui .filter-chip{padding:8px 11px;border:1px solid #283139;border-radius:999px;background:#11151a;color:#8f9aa4;font-size:11px}
body.pf200-ui .filter-chip.active{background:#17221f;color:#c8f7eb;border-color:#315a50}
body.pf200-ui .discover-selects select{min-height:36px;background:#11151a;color:#ccd2d6;border:1px solid #283139;border-radius:10px;padding:7px 10px}
body.pf200-ui .result-count{margin:0 0 12px;color:#6f7a83;font-size:10px;letter-spacing:.08em;text-transform:uppercase}
body.pf200-ui .discover-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(245px,1fr));gap:13px}
body.pf200-ui .discover-card{overflow:hidden;border:1px solid #242c33!important;border-radius:18px!important;background:#101419!important;box-shadow:none!important;cursor:pointer;transition:.18s ease!important}
body.pf200-ui .discover-card:hover{transform:translateY(-3px)!important;border-color:#3b474f!important;background:#14191e!important;box-shadow:0 18px 42px rgba(0,0,0,.22)!important}
body.pf200-ui .discover-card-top{height:174px;background:linear-gradient(180deg,#151a20,#0f1317)!important}
body.pf200-ui .discover-avatar{width:106px;height:106px;border:1px solid #37414a!important;border-radius:24px!important;background-color:#20262d!important;box-shadow:0 16px 34px rgba(0,0,0,.25)}
body.pf200-ui .discover-card-body{padding:15px 16px 17px}
body.pf200-ui .discover-card-body h3{color:#f0efeb;font-size:18px;margin:0 0 5px}
body.pf200-ui .discover-card-body p{min-height:34px;color:#98a2aa;font-size:12px;line-height:1.5}
body.pf200-ui .favorite-float{background:#0d1115;border-color:#303942;color:#d7dcdf}
body.pf200-ui .favorite-float.active{color:#ff8ca0;background:#25171b}
body.pf200-ui .official-badge{background:#14211e;border-color:#315249;color:#baf0e3}

/* Chat list */
body.pf200-ui .recent-chats-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(330px,1fr));gap:12px}
body.pf200-ui .recent-chat-card{min-height:118px;padding:17px;border:1px solid #252d34!important;border-radius:18px!important;background:#11151a!important;box-shadow:none!important;transition:.16s ease}
body.pf200-ui .recent-chat-card:hover{background:#171c21!important;border-color:#39444c!important;transform:translateY(-2px)}
body.pf200-ui .recent-chat-card .avatar.large{width:66px;height:66px;border-radius:16px}
body.pf200-ui .recent-chat-card h3{font-size:18px;color:#f0efeb}
body.pf200-ui .recent-chat-card p{color:#909ba4;line-height:1.5}
body.pf200-ui .chat-stage{color:#a8eada;border-color:#315248;background:#14201d}
body.pf200-ui .chev{color:#59656f}
body.pf200-ui .empty-list{padding:36px 20px;border:1px dashed #303941;border-radius:16px;background:#0f1317;color:#7d8891}

/* Chat workspace */
body.pf200-ui #chatsView{height:100vh;overflow:hidden}
body.pf200-ui .chat-view{
  height:100vh!important;min-height:0!important;padding:0!important;overflow:hidden!important;position:relative!important;
  display:grid!important;grid-template-columns:var(--pf2-story) minmax(0,1fr)!important;grid-template-rows:1fr!important;flex-direction:initial!important;
  background:#0b0e11;
}
body.pf200-ui .chat-view::before{
  content:"";position:absolute;inset:0 0 0 var(--pf2-story);pointer-events:none;z-index:0;
  background-image:linear-gradient(90deg,#0b0e11 0%,rgba(11,14,17,.97) 55%,rgba(11,14,17,.82) 100%),var(--pf180-chat-art);
  background-size:100% 100%,700px auto;background-repeat:no-repeat;background-position:center,right -120px top -80px;opacity:.34;
}
body.pf200-ui .pf180-chat-aside,body.pf200-ui .pf190-story-rail{
  grid-column:1!important;grid-row:1!important;display:flex!important;position:relative!important;z-index:4!important;height:100vh!important;
  padding:0!important;overflow:hidden!important;border:0!important;border-right:1px solid #222a31!important;background:#0d1013!important;
  opacity:1!important;pointer-events:auto!important;transition:opacity .18s ease!important;
}
body.pf200-ui.pf190-rail-collapsed .pf190-story-rail{opacity:0!important;pointer-events:none!important;border-color:transparent!important}
body.pf200-ui .pf190-rail-inner{height:100%;width:100%;padding:22px 18px 18px;display:flex;flex-direction:column;gap:20px;overflow:auto}
body.pf200-ui .pf190-rail-collapse{position:absolute;right:9px;top:10px;z-index:8;width:30px;height:30px;padding:0;display:grid;place-items:center;border:1px solid #2b343c;border-radius:9px;background:#14191e;color:#9aa5ad}
body.pf200-ui .pf190-character-portrait-wrap{display:grid;place-items:center;padding:18px 0 0}
body.pf200-ui .pf190-character-portrait{width:132px!important;height:158px!important;border:1px solid #364049!important;border-radius:22px!important;background-position:center top!important;background-size:cover!important;box-shadow:0 18px 42px rgba(0,0,0,.35)!important}
body.pf200-ui .pf190-character-title>span,body.pf200-ui .pf190-context-heading>span,body.pf200-ui .pf190-context-row>span{color:#71808a;font-size:9px;font-weight:850;letter-spacing:.16em;text-transform:uppercase}
body.pf200-ui .pf190-character-title h2{margin:7px 0 5px;color:#f1efea;font-size:26px;line-height:1.02;letter-spacing:-.045em}
body.pf200-ui .pf190-character-title p{margin:0;color:#8c979f;font-size:10px;line-height:1.5;letter-spacing:.1em;text-transform:uppercase}
body.pf200-ui .pf190-scene-context{padding-top:17px;border-top:1px solid #222a31;display:flex;flex-direction:column;gap:17px}
body.pf200-ui .pf190-context-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}
body.pf200-ui .pf190-context-heading button{padding:5px 8px;border:1px solid #2a443e;border-radius:8px;background:#12201d;color:#a8e9d9;font-size:9px}
body.pf200-ui .pf190-context-row>span{display:block;margin-bottom:6px}
body.pf200-ui .pf190-context-row strong{display:block;color:#dce0e1;font-size:12px;line-height:1.58;font-weight:680;overflow-wrap:anywhere}
body.pf200-ui .pf190-context-row p{margin:0;color:#a9b1b7;font-size:12px;line-height:1.7;overflow-wrap:anywhere}
body.pf200-ui .pf190-surroundings-row{padding-left:11px;border-left:2px solid #315a50}
body.pf200-ui .pf190-rail-footer{margin-top:auto;padding-top:13px;border-top:1px solid #222a31;color:#66727c;font-size:9px}
body.pf200-ui .pf190-rail-footer span{padding:3px 5px;border:1px solid #2b343c;border-radius:5px;color:#8d98a1}
html[data-pf190-sidebar="compact"] body.pf200-ui .pf190-character-portrait{width:102px!important;height:124px!important}
html[data-pf190-sidebar="compact"] body.pf200-ui .pf190-rail-inner{padding-inline:13px}

body.pf200-ui .pf180-chat-main{grid-column:2!important;grid-row:1!important;min-width:0!important;height:100vh!important;display:flex!important;flex-direction:column!important;position:relative!important;z-index:2!important;overflow:hidden!important}
body.pf200-ui .chat-header{
  flex:0 0 auto!important;min-height:70px!important;height:auto!important;padding:12px 24px!important;display:flex!important;align-items:center!important;gap:12px!important;
  position:relative!important;top:auto!important;border:0!important;border-bottom:1px solid #20272d!important;border-radius:0!important;background:rgba(10,13,16,.94)!important;backdrop-filter:blur(10px)!important;box-shadow:none!important;z-index:10!important;
}
body.pf200-ui .chat-header::after{display:none!important}
body.pf200-ui .chat-header #headerAvatar{display:none!important}
body.pf200-ui .header-character{min-width:0;display:flex;align-items:center}
body.pf200-ui .header-character h2{margin:0;color:#f1efeb;font-size:18px!important;letter-spacing:-.025em!important}
body.pf200-ui .header-character p{margin:3px 0 0;max-width:470px;color:#75818a!important;font-size:9px!important;line-height:1.3;letter-spacing:.12em!important;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.pf200-ui .thread-title{display:block;color:#70a99b;font-size:9px;margin-top:3px}
body.pf200-ui .header-actions{margin-left:auto;display:flex;gap:7px!important;align-items:center;min-width:0}
body.pf200-ui .header-actions .ghost{min-height:36px!important;padding:7px 11px!important;border-radius:10px!important;background:#11161a!important;border-color:#242c33!important;color:#aeb7bd!important;font-size:10px!important}
body.pf200-ui .header-actions .ghost:hover{background:#192025!important;color:#fff!important;border-color:#38434b!important}
body.pf200-ui .header-actions #worldBtn{background:#13201d!important;border-color:#29483f!important;color:#b9ede1!important}
body.pf200-ui .pf190-force-hidden{display:none!important}
body.pf200-ui #pf200RailRestore{display:none}
body.pf200-ui.pf190-rail-collapsed #pf200RailRestore{display:inline-flex!important}

body.pf200-ui .pf190-relationship-strip{
  flex:0 0 auto;margin:12px 24px 0!important;padding:11px 14px!important;display:grid!important;
  grid-template-columns:minmax(110px,.75fr) repeat(3,minmax(100px,1fr)) auto!important;gap:15px!important;align-items:center!important;
  border:1px solid #222b31!important;border-radius:14px!important;background:#101419!important;box-shadow:none!important;
}
body.pf200-ui .pf190-stage{padding-right:13px;border-right:1px solid #242d34}
body.pf200-ui .pf190-stage>span{display:block;color:#6e7a83;font-size:8px;font-weight:850;letter-spacing:.16em}
body.pf200-ui .pf190-stage>strong{display:block;margin-top:5px;color:#e6e5e1;font-size:15px;letter-spacing:-.02em}
body.pf200-ui #pf190RelationshipDelta{display:block;min-height:12px;margin-top:4px;color:#83dab0;font-size:8px}
body.pf200-ui .pf190-relationship-strip .meter-group{min-width:0}
body.pf200-ui .pf190-relationship-strip .meter-group label{display:flex;justify-content:space-between;color:#89959e;font-size:9px;margin-bottom:6px}
body.pf200-ui .pf190-relationship-strip .meter{height:5px;background:#252c31;border-radius:99px;overflow:hidden}
body.pf200-ui .pf190-relationship-strip .meter i{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,var(--pf2-accent),var(--pf2-accent-2));transition:width .28s ease}
body.pf200-ui #pf190CollapseRelationship{width:30px;height:30px;padding:0;border:1px solid #273038;border-radius:9px;background:#14191e;color:#8d98a0;display:grid;place-items:center}
body.pf200-ui .pf190-relationship-strip.compact{grid-template-columns:auto auto!important;padding-block:8px!important}
body.pf200-ui .pf190-relationship-strip.compact .meter-group{display:none!important}
body.pf200-ui .pf190-relationship-strip.compact .pf190-stage{display:flex;align-items:center;gap:9px;border:0;padding:0}
body.pf200-ui .pf190-relationship-strip.compact .pf190-stage>strong{margin:0}
body.pf200-ui .pf190-relationship-strip.compact .pf190-stage>small{display:none}

@media(min-width:821px){body.pf200-ui .pf180-chat-main .world-strip{display:none!important}}
body.pf200-ui .messages{
  flex:1 1 auto!important;min-height:0!important;width:100%!important;overflow:auto!important;display:flex!important;flex-direction:column!important;
  gap:var(--pf2-chat-gap)!important;padding:46px max(34px,calc((100% - var(--pf2-reading))/2)) 52px!important;scroll-behavior:smooth;background:transparent!important;
}
body.pf200-ui .message{width:100%!important;max-width:var(--pf2-reading)!important;margin:0 auto!important;display:grid!important;position:relative!important;color:var(--pf2-text)!important}
body.pf200-ui .message.assistant{grid-template-columns:40px minmax(0,1fr)!important;gap:15px!important}
body.pf200-ui .message.user{grid-template-columns:1fr!important;justify-items:end!important}
body.pf200-ui .msg-avatar{width:38px!important;height:38px!important;border:1px solid #34404a!important;border-radius:12px!important;background-color:#1b2228!important;display:grid!important;place-items:center!important;color:#dfe4e6!important;font-size:10px!important;font-weight:850!important;box-shadow:none!important}
body.pf200-ui .message.assistant .bubble{
  display:block!important;width:auto!important;max-width:900px!important;padding:0 0 4px!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;
  color:#e7e6e2!important;font-size:var(--pf2-chat-size)!important;line-height:var(--pf2-chat-line)!important;overflow-wrap:anywhere!important;
}
body.pf200-ui .message.user .bubble{
  justify-self:end!important;width:fit-content!important;max-width:min(72%,720px)!important;padding:13px 16px!important;border:1px solid #2c4942!important;border-radius:18px 18px 6px 18px!important;
  background:#14201e!important;box-shadow:none!important;color:#edf1ef!important;font-size:calc(var(--pf2-chat-size) - 1px)!important;line-height:1.65!important;overflow-wrap:anywhere!important;
}
body.pf200-ui .speaker{margin:0 0 9px!important;color:#79d6c0!important;font-size:11px!important;font-weight:850!important;letter-spacing:.035em!important}
body.pf200-ui .bubble em.action,body.pf200-ui .action{color:#aab5bd!important;font-style:italic!important}
body.pf200-ui .reply-context{color:#839099;background:#11161a;border-color:#293139}
body.pf200-ui .edited{display:block;margin-top:5px;color:#70808a;font-size:8px;text-align:right}
body.pf200-ui .message-actions{display:flex!important;gap:4px!important;margin-top:8px!important;opacity:1!important;visibility:visible!important;pointer-events:auto!important;transform:none!important;transition:none!important;flex-wrap:wrap}
body.pf200-ui .message-actions button{min-height:26px;padding:3px 6px;border:1px solid transparent;border-radius:7px;background:transparent;color:#6f7b84;font-size:9px}
body.pf200-ui .message-actions button:hover,body.pf200-ui .message-actions button:focus-visible{background:#151b20;border-color:#27313a;color:#d8dddf}
body.pf200-ui .message.user .message-actions{justify-content:flex-end}
body.pf200-ui .variant-switch{display:flex;align-items:center;gap:6px;width:max-content;margin-top:8px;padding:3px 4px;border:1px solid #273039;border-radius:999px;background:#11161a;color:#7f8b94;font-size:9px}
body.pf200-ui .variant-switch button{width:24px;height:24px;padding:0;border:0;border-radius:50%;background:transparent;color:#b9c0c5;font-size:16px}
body.pf200-ui .typing-dots span,body.pf200-ui .chat-loading span{background:var(--pf2-accent)!important}
body.pf200-ui .chat-loading{min-height:120px;display:flex;align-items:center;justify-content:center;gap:6px;border:0!important;background:transparent!important}
body.pf200-ui .group-empty-scene{max-width:520px;margin:50px auto;padding:24px;border:1px dashed #303941;border-radius:16px;background:#0f1317;color:#7c8790;text-align:center}

body.pf200-ui .fallback-notice{flex:0 0 auto;width:min(var(--pf2-reading),calc(100% - 48px));margin:0 auto 7px;padding:8px 11px;border:1px solid #58452c;border-radius:10px;background:#211b13;color:#e6c994;font-size:10px}
body.pf200-ui .generation-status{flex:0 0 auto;width:min(var(--pf2-reading),calc(100% - 48px));margin:0 auto 7px;padding:7px 10px;border:1px solid #283139;border-radius:10px;background:#11161a;color:#8e9aa3;font-size:10px}
body.pf200-ui .status-pulse{background:var(--pf2-accent);box-shadow:none}
body.pf200-ui .composer{
  flex:0 0 auto!important;position:relative!important;bottom:auto!important;width:min(var(--pf2-reading),calc(100% - 48px))!important;margin:0 auto 18px!important;padding:8px!important;
  display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:8px!important;border:1px solid #2c353d!important;border-radius:16px!important;background:#11161a!important;box-shadow:0 18px 44px rgba(0,0,0,.28)!important;backdrop-filter:none!important;
}
body.pf200-ui .composer:focus-within{border-color:#3b6258!important;box-shadow:0 0 0 3px rgba(98,223,193,.06),0 18px 44px rgba(0,0,0,.28)!important}
body.pf200-ui .composer textarea{min-height:48px!important;max-height:180px!important;width:100%!important;padding:12px 10px!important;border:0!important;outline:0!important;border-radius:0!important;background:transparent!important;color:#ecedea!important;font-size:14px!important;line-height:1.55!important;resize:none!important}
body.pf200-ui .composer textarea::placeholder{color:#66737c!important}
body.pf200-ui .send{align-self:end;width:48px!important;height:48px!important;min-width:48px!important;padding:0!important;border:0!important;border-radius:12px!important;background:var(--pf2-accent)!important;color:#07110e!important;box-shadow:none!important}
body.pf200-ui .send:hover{background:#78e7cc!important;transform:translateY(-1px)!important}
body.pf200-ui .pf170-suggestions{grid-column:1/-1!important;display:flex!important;gap:6px!important;flex-wrap:wrap!important;padding:0 2px 1px!important}
body.pf200-ui .pf170-suggestions.pf190-suggestions-hidden{display:none!important}
body.pf200-ui .pf170-suggestion-chip{padding:5px 8px!important;border:1px solid #263039!important;border-radius:999px!important;background:#0f1418!important;color:#7f8a93!important;font-size:9px!important}
body.pf200-ui .pf170-suggestion-chip:hover{color:#d4d9dc!important;border-color:#3a464f!important;background:#171d22!important}
body.pf200-ui .pf190-jump-latest{position:absolute;right:24px;bottom:108px;z-index:15;padding:8px 11px;border:1px solid #304039;border-radius:999px;background:#12201c;color:#b8ebdf;box-shadow:0 12px 28px rgba(0,0,0,.25);font-size:10px}

/* Account / forms / modals */
body.pf200-ui .auth-layout,body.pf200-ui .account-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}
body.pf200-ui .auth-card,body.pf200-ui .account-explainer,body.pf200-ui .account-card,body.pf200-ui .profile-hero{padding:19px;border:1px solid #252e35!important;border-radius:18px!important;background:#11151a!important;box-shadow:none!important}
body.pf200-ui .profile-hero{min-height:150px;display:flex;align-items:center;gap:16px;background:linear-gradient(135deg,#11181a,#101419)!important}
body.pf200-ui .profile-avatar{width:80px;height:80px;border-radius:18px;border:1px solid #37434b}
body.pf200-ui .profile-label{color:var(--pf2-accent)}
body.pf200-ui .profile-detail{padding:11px 0;border-bottom:1px solid #232b32;background:transparent!important}
body.pf200-ui .modal-backdrop{position:fixed;inset:0;z-index:10000;padding:20px;display:flex;align-items:center;justify-content:center;background:rgba(2,4,5,.78)!important;backdrop-filter:blur(8px)!important}
body.pf200-ui .modal{width:min(800px,100%);max-height:88vh;overflow:auto;padding:24px!important;border:1px solid #303941!important;border-radius:20px!important;background:#11151a!important;color:var(--pf2-text)!important;box-shadow:0 34px 110px rgba(0,0,0,.62)!important}
body.pf200-ui .modal h2{margin-top:5px;letter-spacing:-.035em}
body.pf200-ui .modal-copy,body.pf200-ui .world-modal-intro{color:#9aa4ac;line-height:1.62}
body.pf200-ui .form-grid{display:grid;grid-template-columns:1fr 1fr;gap:11px}
body.pf200-ui .form-field{min-width:0}
body.pf200-ui .form-field.full-width{grid-column:1/-1}
body.pf200-ui .form-field label,body.pf200-ui .auth-form label{display:block;margin-bottom:6px;color:#9ca6ad;font-size:10px;font-weight:700}
body.pf200-ui .form-field small{display:block;margin-top:5px;color:#737f88;font-size:9px;line-height:1.45}
body.pf200-ui .auth-form input,body.pf200-ui .form-field input,body.pf200-ui .form-field textarea,body.pf200-ui .form-field select,body.pf200-ui .command-palette>input{
  width:100%;padding:10px 11px;border:1px solid #2b343c!important;border-radius:10px!important;outline:0;background:#0d1115!important;color:#e9e9e5!important;box-shadow:none!important
}
body.pf200-ui .auth-form input:focus,body.pf200-ui .form-field input:focus,body.pf200-ui .form-field textarea:focus,body.pf200-ui .form-field select:focus{border-color:#3d675d!important;box-shadow:0 0 0 3px rgba(98,223,193,.06)!important}
body.pf200-ui .setting-block,body.pf200-ui .memory-item,body.pf200-ui .detail-grid>div,body.pf200-ui .wizard-note,body.pf200-ui .rpg-hero-card,body.pf200-ui .rpg-entity-card,body.pf200-ui .rpg-library-row,body.pf200-ui .rpg-fact,body.pf200-ui .rpg-test{border:1px solid #273039!important;border-radius:13px!important;background:#0f1418!important;box-shadow:none!important}
body.pf200-ui .detail-avatar{border-color:#364149!important;border-radius:20px!important;box-shadow:none!important}
body.pf200-ui .tag-row span{background:#151b20;border-color:#2a333b;color:#aeb7bd}
body.pf200-ui .modal-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-top:18px}
body.pf200-ui .pf190-hub-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:16px 0}
body.pf200-ui .pf190-hub-card{min-height:100px;padding:15px;text-align:left;border:1px solid #283139;border-radius:14px;background:#0f1418;color:#ecece8;cursor:pointer}
body.pf200-ui .pf190-hub-card:hover{background:#151c20;border-color:#3c494f;transform:none}
body.pf200-ui .pf190-hub-card strong{display:block;margin-bottom:6px;font-size:13px}
body.pf200-ui .pf190-hub-card span{display:block;color:#8e99a2;font-size:11px;line-height:1.55}
body.pf200-ui .world-facts-grid>div,body.pf200-ui .quest-card,body.pf200-ui .lore-entry{border-color:#273039!important;background:#0f1418!important}
body.pf200-ui .world-section-heading span,body.pf200-ui .lore-entry-head span,body.pf200-ui .quest-status{color:var(--pf2-accent)!important}
body.pf200-ui .rpg-tabs button{border-color:#29323a;background:#11161a;color:#8d98a0}
body.pf200-ui .rpg-tabs button.active{background:#15211e;color:#c8f3e8;border-color:#31544b}

/* Toasts */
body.pf200-ui .pf190-toast-host{position:fixed;right:16px;bottom:22px;z-index:10050;display:flex;flex-direction:column;gap:7px;pointer-events:none}
body.pf200-ui .pf190-toast{padding:9px 12px;border:1px solid #303a42;border-radius:10px;background:#141a1f;color:#e5e7e5;font-size:11px;box-shadow:0 14px 34px rgba(0,0,0,.34);opacity:0;transform:translateY(5px);transition:.18s ease}
body.pf200-ui .pf190-toast.show{opacity:1;transform:none}

/* Immersive mode still works, but never hides the composer or message text. */
body.pf200-ui.pf-immersive .bottom-nav{display:none!important}
body.pf200-ui.pf-immersive .main-area{margin-left:0}
body.pf200-ui.pf-immersive .pf190-story-rail,body.pf200-ui.pf-immersive .pf190-relationship-strip,body.pf200-ui.pf-immersive .world-strip{display:none!important}
body.pf200-ui.pf-immersive .chat-view{grid-template-columns:1fr!important}
body.pf200-ui.pf-immersive .pf180-chat-main{grid-column:1!important}
body.pf200-ui.pf-immersive .chat-header .header-actions>*{display:none!important}
body.pf200-ui.pf-immersive #backToChatsBtn{display:inline-flex!important}

/* Motion never controls visibility. */
@media(prefers-reduced-motion:reduce){
  body.pf200-ui *,body.pf200-ui *::before,body.pf200-ui *::after{animation:none!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
  body.pf200-ui .message,body.pf200-ui .discover-card,body.pf200-ui .recent-chat-card{opacity:1!important;transform:none!important}
}

/* Tablet / mobile */
@media(max-width:1000px){
  body.pf200-ui .pf180-featured{grid-template-columns:1fr}
  body.pf200-ui .pf180-feature-list{grid-template-columns:repeat(3,1fr);grid-template-rows:none}
  body.pf200-ui .pf180-feature-mini{min-width:0}
  body.pf200-ui .pf190-relationship-strip{grid-template-columns:1fr 1fr!important}
  body.pf200-ui .pf190-stage{grid-column:1/-1;border-right:0;border-bottom:1px solid #242d34;padding:0 0 8px}
  body.pf200-ui .pf190-relationship-strip .meter-group:nth-of-type(3){grid-column:1/-1}
}
@media(max-width:820px){
  :root{--pf2-nav:0px;--pf2-story:0px}
  body.pf200-ui .main-area{margin-left:0;height:100vh}
  body.pf200-ui .page-view{height:calc(100vh - 76px)}
  body.pf200-ui .page-shell{padding:28px 14px 98px}
  body.pf200-ui .bottom-nav{
    inset:auto 8px 8px 8px!important;width:auto!important;height:68px!important;padding:6px 8px!important;
    display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:5px!important;border:1px solid #273039!important;border-radius:17px!important;background:#0d1115!important;box-shadow:0 16px 36px rgba(0,0,0,.34)!important
  }
  body.pf200-ui .pf200-nav-brand{display:none}
  body.pf200-ui .bottom-nav-item{width:auto!important;height:54px!important;margin:0!important;border-radius:12px!important}
  body.pf200-ui .bottom-nav-item.active{box-shadow:inset 0 2px 0 var(--pf2-accent)!important}
  body.pf200-ui .page-heading{align-items:flex-start;flex-direction:column}
  body.pf200-ui .page-heading h1,body.pf200-ui .page-heading h2{font-size:38px}
  body.pf200-ui .pf180-feature-main{min-height:280px}
  body.pf200-ui .pf180-feature-content{padding:26px}
  body.pf200-ui .pf180-feature-content h2{font-size:38px}
  body.pf200-ui .pf180-feature-list{display:flex;overflow:auto}
  body.pf200-ui .pf180-feature-mini{min-width:230px}
  body.pf200-ui .discover-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  body.pf200-ui .discover-toolbar{align-items:flex-start;flex-direction:column}
  body.pf200-ui .chat-view{height:calc(100vh - 76px)!important;display:grid!important;grid-template-columns:1fr!important}
  body.pf200-ui .pf190-story-rail{display:none!important}
  body.pf200-ui .pf180-chat-main{grid-column:1!important;height:calc(100vh - 76px)!important}
  body.pf200-ui .chat-view::before{inset:0;background-size:100% 100%,520px auto;opacity:.22}
  body.pf200-ui .chat-header{padding:9px 10px!important;display:grid!important;grid-template-columns:auto auto minmax(0,1fr)!important;grid-template-areas:"back avatar info" "actions actions actions"!important;gap:7px!important}
  body.pf200-ui #backToChatsBtn{grid-area:back}
  body.pf200-ui .chat-header #headerAvatar{display:grid!important;grid-area:avatar;width:38px!important;height:38px!important;border-radius:11px!important}
  body.pf200-ui .header-character{grid-area:info}
  body.pf200-ui .header-actions{grid-area:actions;margin:0;overflow:auto;padding-bottom:1px;scrollbar-width:none}
  body.pf200-ui .header-actions::-webkit-scrollbar{display:none}
  body.pf200-ui .header-actions .ghost{flex:0 0 auto}
  body.pf200-ui #pf200RailRestore{display:none!important}
  body.pf200-ui .pf190-relationship-strip{margin:8px 10px 0!important;padding:10px 11px!important;gap:8px!important}
  body.pf200-ui .pf180-chat-main .world-strip{display:flex!important;margin:7px 10px 0!important;padding:8px 10px!important;height:auto!important;min-height:34px!important;max-height:none!important;flex-wrap:wrap!important;border:1px solid #242d34!important;border-radius:11px!important;background:#101419!important;color:#8d98a1!important;font-size:9px!important}
  body.pf200-ui #worldSurroundings{display:block;width:100%;white-space:normal!important;overflow:visible!important;color:#7f8a93}
  body.pf200-ui .messages{padding:28px 13px 30px!important;gap:27px!important}
  body.pf200-ui .message.assistant{grid-template-columns:31px minmax(0,1fr)!important;gap:9px!important}
  body.pf200-ui .msg-avatar{width:30px!important;height:30px!important;border-radius:9px!important}
  body.pf200-ui .message.assistant .bubble{font-size:15px!important;line-height:1.78!important}
  body.pf200-ui .message.user .bubble{max-width:88%!important;font-size:14px!important}
  body.pf200-ui .message-actions{gap:3px!important}
  body.pf200-ui .message-actions button{font-size:8px!important;padding:2px 5px!important}
  body.pf200-ui .composer{width:auto!important;margin:0 10px 10px!important}
  body.pf200-ui .fallback-notice,body.pf200-ui .generation-status{width:auto;margin-inline:10px}
  body.pf200-ui .pf190-jump-latest{right:13px;bottom:88px}
  body.pf200-ui .auth-layout,body.pf200-ui .account-grid{grid-template-columns:1fr}
  body.pf200-ui .modal-backdrop{align-items:flex-end;padding:0}
  body.pf200-ui .modal{width:100%;max-height:90vh;border-radius:20px 20px 0 0!important;border-bottom:0!important;padding:19px 15px calc(19px + env(safe-area-inset-bottom))!important}
}
@media(max-width:560px){
  body.pf200-ui .discover-grid{grid-template-columns:1fr 1fr}
  body.pf200-ui .discover-card-top{height:132px}
  body.pf200-ui .discover-avatar{width:82px;height:82px;border-radius:18px!important}
  body.pf200-ui .discover-card-body{padding:11px}
  body.pf200-ui .discover-card-body h3{font-size:15px}
  body.pf200-ui .discover-card-body p{display:none}
  body.pf200-ui .pf190-relationship-strip{grid-template-columns:1fr!important}
  body.pf200-ui .pf190-stage,body.pf200-ui .pf190-relationship-strip .meter-group:nth-of-type(3){grid-column:auto}
  body.pf200-ui .form-grid,body.pf200-ui .pf190-hub-grid{grid-template-columns:1fr}
  body.pf200-ui .form-field.full-width{grid-column:auto}
  body.pf200-ui .pf180-feature-content h2{font-size:33px}
}

/* v2.0.0 final polish: portrait fallback stays intentional when no art exists. */
body.pf200-ui .pf190-character-portrait{
  display:grid!important;place-items:center!important;overflow:hidden!important;
  color:#cdd5d8!important;font-size:24px!important;font-weight:760!important;letter-spacing:-.04em!important;
  background-color:#10151a!important;background-repeat:no-repeat!important;
}
