/* q6: pokalbių burbulai (Drakono rutulių dialogų stilius) */
[data-pokalbiai] .chat-msg.cb{display:flex;gap:9px;align-items:flex-start;padding:6px 4px!important;margin:0 0 6px!important;background:none!important;border:0!important;box-shadow:none!important;min-width:0}
.cb-ava{flex:0 0 36px;width:36px;height:36px;border-radius:50%;overflow:hidden;background:radial-gradient(circle at 50% 35%,#2a3a66,#141a30);box-shadow:0 0 0 2px rgba(255,190,90,.45);display:flex;align-items:center;justify-content:center}
.cb-av{width:100%;height:100%;object-fit:cover;object-position:top;display:block}
.cb-av-x,.cb-av-sys{font-weight:900;color:#ffd27a;font-size:16px}
.cb-body{flex:1;min-width:0;max-width:100%;position:relative;padding:7px 11px 6px;border-radius:4px 14px 14px 14px;background:rgba(22,30,58,.92);border:1px solid rgba(140,170,230,.22)}
.chat-admin.cb .cb-body{background:linear-gradient(180deg,rgba(80,40,10,.75),rgba(40,22,8,.85));border-color:rgba(255,180,70,.5)}
.chat-sistema.cb .cb-body{background:rgba(16,60,40,.75);border-color:rgba(90,230,150,.35)}
.chat-ieskota.cb .cb-body{box-shadow:0 0 0 2px #ffcf6b,0 0 16px rgba(255,200,90,.45)}
.cb-hd{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap;line-height:1.2;margin-bottom:2px}
.cb-hd b{font-size:13px}.cb-hd small{font-size:11px;color:#9aa6c4;margin-left:auto}
.cb .chat-text{font-size:14.5px;line-height:1.42;color:#f2f5ff;overflow-wrap:anywhere;word-break:break-word;cursor:pointer}
.cb .chat-text img{max-width:100%;height:auto}
.cb .chat-actions{margin-top:3px;font-size:11.5px;opacity:.75}
.cb .chat-actions a{color:#9fd3ff}
.cb .chat-quote{display:block;margin:0 0 4px;padding:3px 8px;border-left:3px solid #ffb347;border-radius:6px;background:rgba(255,255,255,.05);font-size:12px;color:#c9d1ea;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.cb-rx{display:flex;flex-wrap:wrap;gap:4px;margin-top:3px}.cb-rx:empty{display:none}
.cb-rxb{all:unset;cursor:pointer;display:inline-flex;align-items:center;gap:3px;padding:1px 7px;border-radius:99px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.14);font-size:12.5px;line-height:20px}
.cb-rxb b{font-size:11px;color:#dfe6ff}.cb-rxb.mano{background:rgba(255,170,50,.22);border-color:rgba(255,190,90,.6)}
.cp-rxp{display:flex;gap:2px;margin:4px 0 2px;padding:3px;border-radius:99px;background:#0d1328;border:1px solid rgba(255,190,90,.45);width:max-content;max-width:100%;box-shadow:0 6px 16px rgba(0,0,0,.45);animation:cpIn .15s ease-out}
.cp-rxp button{all:unset;cursor:pointer;font-size:19px;line-height:1;padding:4px 5px;border-radius:50%}.cp-rxp button:hover{background:rgba(255,255,255,.1);transform:scale(1.15)}
@keyframes cpIn{from{opacity:0;transform:translateY(-4px) scale(.9)}to{opacity:1;transform:none}}
/* prisegta apklausa – viena eilutė */
.cp-pin{margin:6px 0;border-radius:12px;background:linear-gradient(90deg,rgba(255,150,40,.18),rgba(120,80,255,.14));border:1px solid rgba(255,190,90,.45);overflow:hidden}
.cp-pin-l{all:unset;box-sizing:border-box;cursor:pointer;display:flex;align-items:center;gap:8px;width:100%;padding:7px 10px;font-size:13px;color:#fff}
.cp-pin-q{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:700}
.cp-pin-c{flex:0 0 auto;font-size:12px;color:#ffe0a0}
.cp-pin.open .cp-pin-q{white-space:normal}
.cp-pin-x{padding:0 10px 10px;font-size:13.5px;color:#eef2ff}.cp-pin-x p{margin:0 0 4px;line-height:1.45}.cp-pin-x small{color:#aab3cf}
.cp-pin-v{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;align-items:center}
.cp-v,.cp-pin-end{all:unset;cursor:pointer;padding:5px 12px;border-radius:99px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.18);font-weight:700;font-size:13px}
.cp-v.on{background:rgba(47,180,106,.35);border-color:#5ee69a}.cp-pin-end{margin-left:auto;font-size:12px;opacity:.8}
.cp-pin-go{font-size:12.5px;font-weight:700;color:#9fd3ff}
.cp-new{margin:4px 0 8px;font-size:13px}.cp-new summary{cursor:pointer;color:#ffcf6b;font-weight:700;list-style:none}.cp-new summary::-webkit-details-marker{display:none}
.cp-new-f{display:flex;gap:6px;margin-top:6px}.cp-new-f input{flex:1;min-width:0;padding:8px 10px;border-radius:10px;border:1px solid rgba(255,255,255,.2);background:rgba(0,0,0,.3);color:#fff}
.cp-new-f .submit{margin:0!important;padding:8px 12px!important}
/* q7: šoninis skydelis */
.cp-pbg{position:fixed;inset:0;z-index:9998;background:rgba(0,0,0,.5);opacity:0;pointer-events:none;transition:opacity .2s}
.cp-pbg.on{opacity:1;pointer-events:auto}
.cp-pan{position:fixed;top:0;right:0;bottom:0;z-index:9999;width:min(420px,100vw);display:flex;flex-direction:column;background:#0b1022;border-left:1px solid rgba(255,190,90,.35);box-shadow:-10px 0 30px rgba(0,0,0,.55);transform:translateX(102%);transition:transform .25s ease}
.cp-pan.on{transform:none}
.cp-pan-h{display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1px solid rgba(255,255,255,.1);color:#fff}
.cp-pan-h b{flex:1;font-size:15px}.cp-pan-o{color:#9fd3ff;text-decoration:none;font-size:17px}
.cp-pan-x{all:unset;cursor:pointer;font-size:18px;padding:2px 6px;color:#fff}
.cp-pan iframe{flex:1;width:100%;border:0;background:#0b1022}
html.cp-pan-on{overflow:hidden}
html.cp-pn body{padding:0!important;margin:0!important;background:#0b1022!important}
html.cp-pn [data-pokalbiai]{padding:8px 10px 20px;max-width:100%;box-sizing:border-box}
html.cp-pn .pokalbiai-virsus .ki-legenda{display:none}
html.cp-pn body>:not([data-pokalbiai]):not(script):not(link):not(style),html.cp-pn nav.dock,html.cp-pn .dock,html.cp-pn [class^=zsk],html.cp-pn [class^=zks]{display:none!important}html.cp-pn{padding-top:0!important}
.cp-pan{z-index:2147483001!important}.cp-pbg{z-index:2147483000!important}

/* pcui20261108: wallpaper belongs to the conversation, never below the composer. */
html.kie body .ki-chat,html body .ki-chat{background:#101b30!important}
html body [data-pokalbiai] [data-juosta]{box-sizing:border-box;min-width:0;max-width:100%;padding:13px 9px!important;border:1px solid #38526c;border-radius:15px;background:linear-gradient(180deg,rgba(7,18,34,.18),rgba(7,18,34,.24)),url(../img/chat/ki_slenis_20261108.webp) center 65%/cover no-repeat!important;isolation:isolate}
html body .ki-chat .ki-juostos-remas{background:transparent!important;border:0!important;padding:0!important}
/* Older Ki sheets paint the whole article opaque; keep only its text as a bubble. */
html.kie body .ki-chat [data-juosta] article.ki-eil.chat-msg,html body [data-pokalbiai] [data-juosta] article.ki-eil.chat-msg{background:transparent!important;border:0!important;box-shadow:none!important;padding:3px 0 9px!important;margin:0!important;column-gap:7px!important;row-gap:3px!important;min-width:0}
html.kie body .ki-chat [data-juosta] article.ki-eil.chat-msg .ki-tekstas,html body [data-pokalbiai] [data-juosta] article.ki-eil.chat-msg .ki-tekstas{background:rgba(12,28,48,.82)!important;border:1px solid rgba(156,203,227,.35)!important;border-radius:4px 16px 16px 16px!important;padding:10px 12px!important;color:#f2f7ff!important;line-height:1.45!important;font-size:13px!important;box-shadow:0 4px 10px #00112640;backdrop-filter:blur(2px);overflow-wrap:anywhere;min-width:0}
html body [data-pokalbiai] [data-juosta] .ki-kas{background:rgba(8,24,43,.85);border-radius:9px;padding:3px 7px!important;min-width:0}
html body [data-pokalbiai] [data-juosta] .ki-kas time{color:#bed3e5!important;font-size:10px!important}
html body [data-pokalbiai] [data-juosta] .ki-veiksmai{margin:0!important;padding:0 7px!important}
html body [data-pokalbiai] [data-juosta] .ki-veiksmai a{color:#eff8ff!important;font-size:10.5px!important;text-shadow:0 1px 3px #071323}
html body [data-pokalbiai] [data-juosta] .chat-msg.cb{gap:8px!important;padding:3px 0 9px!important;margin:0!important;background:none!important;border:0!important;box-shadow:none!important}
html body [data-pokalbiai] [data-juosta] .chat-msg.cb .cb-body{background:rgba(12,28,48,.83)!important;border:1px solid rgba(156,203,227,.35)!important;border-radius:4px 16px 16px 16px;padding:10px 11px 8px;box-shadow:0 4px 10px #00112640;backdrop-filter:blur(2px)}
html body [data-pokalbiai] [data-juosta] .chat-msg.cb .cb-hd{gap:4px;margin-bottom:5px}
html body [data-pokalbiai] [data-juosta] .chat-msg.cb .cb-hd small{color:#bed3e5}
html body [data-pokalbiai] [data-juosta] .chat-msg.cb .chat-text{font-size:13px;color:#f2f7ff;line-height:1.45;overflow-wrap:anywhere}
html body [data-pokalbiai] [data-juosta] .chat-msg.cb .chat-actions{opacity:1;margin-top:5px}
html body [data-pokalbiai] [data-juosta] .chat-msg.cb .chat-actions a{color:#c3e5ff}
/* Gold still identifies the owner/admin; your messages have a warmer right-hand tail. */
html.kie body .ki-chat [data-juosta] article.ki-eil.chat-msg.chat-admin .ki-tekstas,html body [data-pokalbiai] [data-juosta] .chat-msg.chat-admin .cb-body{background:rgba(66,40,19,.86)!important;border-color:rgba(255,193,101,.56)!important}
html.kie body .ki-chat [data-juosta] article.ki-eil.chat-msg.chat-mano .ki-tekstas,html body [data-pokalbiai] [data-juosta] article.ki-eil.chat-msg.chat-mano .ki-tekstas,html body [data-pokalbiai] [data-juosta] .chat-msg.chat-mano .cb-body{background:linear-gradient(135deg,rgba(111,64,25,.93),rgba(74,43,24,.9))!important;border-color:rgba(255,198,115,.65)!important;border-radius:16px 4px 16px 16px!important}
html body [data-pokalbiai] [data-juosta] .chat-msg.cb.chat-mano{padding-left:15px!important}
html body [data-pokalbiai] [data-juosta] .chat-msg.cb:not(.chat-mano){padding-right:15px!important}
html body [data-pokalbiai] [data-juosta] .chat-quote{background:rgba(6,18,32,.65)!important;color:#dceafa!important;min-width:0;max-width:100%;box-sizing:border-box;overflow-wrap:anywhere}
html body [data-pokalbiai] [data-juosta] article.ki-eil>.chat-quote{grid-column:2;grid-row:auto}
html body [data-pokalbiai] [data-juosta] .chat-msg.cb .cb-ava{width:30px;height:30px;flex-basis:30px}
html body [data-pokalbiai] [data-juosta] .chat-msg:not(.cb):not(.ki-eil){background:rgba(12,28,48,.85)!important;border-radius:14px;padding:10px!important}
@media(prefers-reduced-motion:reduce){html body [data-pokalbiai] .ki-nauja{animation:none!important}.cp-pan,.cp-pbg{transition:none}}

/* Explicit grid rows keep quoted replies below the author and prevent long-name overflow. */
html body [data-pokalbiai] [data-juosta] article.ki-eil.chat-msg{grid-template-columns:30px minmax(0,1fr)!important}
html body [data-pokalbiai] [data-juosta] article.ki-eil .ki-kas{grid-row:1;flex-wrap:wrap;justify-content:space-between;gap:3px 8px}
html body [data-pokalbiai] [data-juosta] article.ki-eil .ki-kas .ki-nick{min-width:0;overflow-wrap:anywhere}
html body [data-pokalbiai] [data-juosta] article.ki-eil .ki-kas time{margin-left:auto;white-space:nowrap}
html body [data-pokalbiai] [data-juosta] article.ki-eil>.chat-quote{grid-row:2}
html body [data-pokalbiai] [data-juosta] article.ki-eil .ki-tekstas{grid-row:3}
html body [data-pokalbiai] [data-juosta] article.ki-eil .ki-veiksmai{grid-row:4;opacity:1!important}
html body [data-pokalbiai] [data-juosta] article.ki-eil a.ki-veido{grid-row:1 / span 3!important;align-self:start!important}

/* pcul20261108: quieter scenery, brighter Ki header, unchanged chat semantics. */
html.kie body .ki-chat header.ki-antra{background:radial-gradient(circle at 28px 45%,#8b602b44,transparent 100px),linear-gradient(120deg,#20364a,#17283e 65%,#28364b)!important;border:1px solid #b89a554f!important;border-radius:13px!important;padding:10px 11px!important;box-shadow:inset 0 1px 0 #ffe6a315}
html.kie body .ki-chat header.ki-antra .ki-pavadinimas{color:#ffe0a0!important;text-shadow:0 0 12px #ffa63b33;letter-spacing:.035em}
html.kie body .ki-chat header.ki-antra small.ki-legenda{opacity:1!important;color:#b5c8dc;font-size:10px!important;line-height:1.45}
html body [data-pokalbiai] .pokalbiai-virsus{background:linear-gradient(110deg,#243c50,#17273d);border:1px solid #b89a554f;border-radius:13px;padding:10px;color:#e2edf8}
