@font-face{font-family:Inter;src:url("../fonts/inter-400.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:Inter;src:url("../fonts/inter-500.woff2") format("woff2");font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:Inter;src:url("../fonts/inter-600.woff2") format("woff2");font-weight:600;font-style:normal;font-display:swap}
@font-face{font-family:"Cormorant Garamond";src:url("../fonts/cormorant-garamond-300.woff2") format("woff2");font-weight:300;font-style:normal;font-display:swap}
@font-face{font-family:"Cormorant Garamond";src:url("../fonts/cormorant-garamond-400.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Cormorant Garamond";src:url("../fonts/cormorant-garamond-500.woff2") format("woff2");font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:"Space Mono";src:url("../fonts/space-mono-400.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Space Mono";src:url("../fonts/space-mono-700.woff2") format("woff2");font-weight:700;font-style:normal;font-display:swap}
*{box-sizing:border-box}
:root{
  --cyan:#63c9ff;
  --cyan-soft:rgba(99,201,255,.72);
  --blue:#286dcc;
  --deep:#020817;
  --line:rgba(99,166,255,.20);
  --text:#e8f2ff;
  --muted:rgba(199,220,248,.60);
}
html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#020817;color:var(--text)}
body{
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:
    linear-gradient(90deg,rgba(1,6,18,.24) 0%,rgba(1,6,18,.06) 44%,rgba(1,6,18,.14) 100%),
    linear-gradient(180deg,rgba(1,5,15,.22),rgba(1,5,15,.10)),
    url("../holo-v2/holo-background-desktop.png") center center/cover no-repeat fixed;
}
button,input,textarea{font:inherit}
button{color:inherit}
.hidden{display:none!important}

#bgCanvas{position:fixed;inset:0;width:100%;height:100%;z-index:0;pointer-events:none;opacity:.22;mix-blend-mode:screen}
#grid{position:fixed;inset:0;z-index:0;pointer-events:none;opacity:.10;background:linear-gradient(rgba(90,155,255,.06) 1px,transparent 1px),linear-gradient(90deg,rgba(90,155,255,.06) 1px,transparent 1px);background-size:72px 72px;mask-image:linear-gradient(90deg,rgba(0,0,0,.8),transparent 75%)}

#app{position:relative;z-index:1;height:100dvh;display:grid;grid-template-rows:84px minmax(0,1fr) 38px}
.topbar{
  position:relative;z-index:20;display:flex;align-items:center;gap:14px;
  padding:12px clamp(18px,3vw,46px);
  border-bottom:1px solid rgba(76,145,239,.14);
  background:linear-gradient(180deg,rgba(1,6,18,.76),rgba(1,6,18,.30));
  backdrop-filter:blur(12px);
}
.brand{display:flex;align-items:center;gap:13px;min-width:285px}
.brand img{width:48px;height:48px;filter:drop-shadow(0 0 16px rgba(90,180,255,.25))}
.brand-copy{display:flex;flex-direction:column;line-height:1}
.brand-name{font-size:30px;font-weight:400;letter-spacing:.15em;color:#d7ecff;text-shadow:0 0 22px rgba(75,164,255,.16);white-space:nowrap}
.brand-name .cq-mark{color:#89c6ff}
.brand-sub{margin-top:9px;font-family:"Space Mono",monospace;font-size:8px;letter-spacing:.36em;text-transform:uppercase;color:rgba(87,185,255,.72)}
.spacer{flex:1}
.pill,.lang-switch{
  min-height:46px;border:1px solid rgba(97,160,246,.22);border-radius:999px;
  background:rgba(3,12,29,.34);backdrop-filter:blur(10px);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025),0 0 24px rgba(20,84,182,.06)
}
.pill{display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:0 22px;text-decoration:none;white-space:nowrap;cursor:pointer}
.pill:hover,.lang-switch:hover{border-color:rgba(95,178,255,.38);background:rgba(6,20,43,.44)}
.pill.primary{border-color:rgba(54,139,255,.62);background:linear-gradient(180deg,rgba(34,102,209,.28),rgba(12,50,122,.22))}
.pill.status{min-width:172px;font-family:"Space Mono",monospace;font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:rgba(147,217,255,.86)}
.lang-switch{display:inline-flex;align-items:center;padding:4px;gap:4px}
.lang-btn{height:36px;min-width:56px;border:0;border-radius:999px;background:transparent;color:rgba(205,225,249,.62);cursor:pointer;font-family:"Space Mono",monospace;font-size:11px;letter-spacing:.12em}
.lang-btn.active{background:linear-gradient(180deg,rgba(51,123,239,.28),rgba(21,64,137,.20));color:#eff7ff;box-shadow:0 0 20px rgba(37,127,255,.12)}
.dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:radial-gradient(circle at 32% 30%,#fff 0 18%,#72d6ff 38%,#178bff 74%,transparent 76%);box-shadow:0 0 14px rgba(87,203,255,.62);animation:dotPulse 2.4s ease-in-out infinite}
@keyframes dotPulse{50%{transform:scale(1.18);opacity:.78}}

.layout{position:relative;min-height:0;overflow:hidden;isolation:isolate}
.stage{position:absolute;inset:0;z-index:1;pointer-events:none;overflow:hidden}
.stage-inner,.holo-wrap{position:absolute;inset:0}
.hologram{
  display:none;
  position:absolute;left:60%;bottom:-3.2vh;transform:translateX(-50%);
  width:clamp(760px,58vw,1090px);aspect-ratio:1536/1024;
  filter:drop-shadow(0 0 28px rgba(69,171,255,.22)) drop-shadow(0 0 90px rgba(36,112,255,.17));
}
.core-shell{position:absolute;inset:0}
.holo-portrait{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:center bottom;opacity:.97;filter:saturate(1.08) contrast(1.07) brightness(.98);mix-blend-mode:normal;pointer-events:none}
.halo-back,.mist,.scanlines,.sweep,.noise,.glitch-layer{position:absolute;inset:0;pointer-events:none}
.halo-back{background:radial-gradient(ellipse 34% 50% at 50% 48%,rgba(88,184,255,.23),transparent 72%);filter:blur(20px);animation:auraBreath 6.5s ease-in-out infinite}
.mist{background:radial-gradient(ellipse 42% 20% at 50% 88%,rgba(87,197,255,.18),transparent 72%);filter:blur(22px);opacity:.75}
.scanlines{opacity:.09;background:repeating-linear-gradient(180deg,rgba(214,244,255,.16) 0 1px,transparent 1px 5px);mix-blend-mode:screen}
.sweep{opacity:.18;background:linear-gradient(180deg,transparent 0%,rgba(174,233,255,.24) 48%,transparent 55%);mix-blend-mode:screen;transform:translateY(-110%);animation:sweep 7s linear infinite}
.noise{opacity:.14;background-image:radial-gradient(circle at 22% 30%,rgba(255,255,255,.95) 0 1px,transparent 1.5px),radial-gradient(circle at 68% 48%,rgba(130,220,255,.9) 0 1px,transparent 1.5px),radial-gradient(circle at 44% 74%,rgba(255,255,255,.75) 0 1px,transparent 1.4px);background-size:210px 210px,260px 260px,310px 310px;animation:noiseDrift 14s linear infinite}
.glitch-layer{opacity:0;background:linear-gradient(90deg,transparent,rgba(89,205,255,.22),transparent);mix-blend-mode:screen}
.hologram.is-speaking .glitch-layer,.hologram.is-thinking .glitch-layer{animation:glitchFlash 1.8s steps(1,end) infinite}
@keyframes auraBreath{50%{transform:scale(1.045);opacity:.82}}
@keyframes sweep{0%,16%{transform:translateY(-110%)}42%,100%{transform:translateY(110%)}}
@keyframes noiseDrift{to{transform:translateY(42px)}}
@keyframes glitchFlash{0%,92%,100%{opacity:0;transform:none}93%{opacity:.26;transform:translateX(-5px)}95%{opacity:.14;transform:translateX(4px)}}

/* HUD decor built with CSS, not baked into the images. */
.stage::before{content:"";position:absolute;right:4.5%;top:10%;width:23vw;max-width:410px;height:18vh;min-height:130px;border:1px solid rgba(70,158,255,.15);border-radius:10px;background:linear-gradient(180deg,rgba(8,27,59,.08),rgba(4,18,41,.02));box-shadow:0 0 28px rgba(13,91,210,.05),inset 0 0 25px rgba(58,154,255,.03);opacity:.55}
.stage::after{content:"93     97     91";position:absolute;right:7.4%;top:31%;font-family:"Space Mono",monospace;font-size:14px;letter-spacing:2.7vw;color:rgba(95,196,255,.48);text-shadow:0 0 12px rgba(65,174,255,.25);white-space:nowrap;opacity:.72}

.chat-panel{position:relative;z-index:5;height:100%;display:grid;grid-template-rows:minmax(0,1fr) auto;background:transparent;border:0;min-height:0}
.chat-panel::before{content:"";position:absolute;z-index:0;left:60%;bottom:-3.2vh;width:clamp(760px,58vw,1090px);aspect-ratio:1536/1024;transform:translateX(-50%);background:url("../holo-v2/holo-character-center.png") center bottom/contain no-repeat;opacity:.97;filter:saturate(1.08) contrast(1.07) brightness(.98) drop-shadow(0 0 28px rgba(69,171,255,.22)) drop-shadow(0 0 90px rgba(36,112,255,.17));pointer-events:none}
.msgs{
  position:relative;z-index:6;min-height:0;overflow-y:auto;overflow-x:hidden;
  width:min(47vw,690px);padding:54px 16px 26px clamp(58px,9vw,145px);
  display:flex;flex-direction:column;gap:22px;scroll-behavior:smooth;
}
.msgs::before{content:"";position:absolute;left:clamp(26px,5.7vw,88px);top:52px;bottom:20px;width:1px;background:linear-gradient(180deg,rgba(85,165,255,.38),rgba(85,165,255,.07),transparent)}
.msgs::-webkit-scrollbar{width:5px}.msgs::-webkit-scrollbar-thumb{background:rgba(82,158,255,.22);border-radius:999px}
.bubble{position:relative;max-width:100%;padding:0 0 0 52px;border:0;border-radius:0;background:transparent;box-shadow:none;color:#edf5ff}
.bubble.user{align-self:flex-start;background:transparent;border:0}
.bubble.ai{align-self:flex-start}
.message-head{display:flex;align-items:center;gap:10px;margin:0 0 9px -52px;min-height:34px}
.speaker-dot{display:grid;place-items:center;width:34px;height:34px;flex:0 0 34px;border:1px solid rgba(86,164,255,.28);border-radius:50%;background:radial-gradient(circle at 34% 28%,rgba(255,255,255,.56),rgba(76,159,255,.58) 38%,rgba(12,54,124,.74) 70%);box-shadow:0 0 16px rgba(63,157,255,.15)}
.speaker-name{font-family:"Space Mono",monospace;font-size:11px;font-weight:700;letter-spacing:.18em;color:#55b8ff;text-transform:uppercase}
.ai-origin-badge{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:16px;padding:0 5px;border:1px solid rgba(109,190,255,.3);border-radius:999px;background:rgba(53,130,220,.12);font-family:"Space Mono",monospace;font-size:7px;letter-spacing:.12em;color:rgba(173,224,255,.86)}
.message-head-separator{width:1px;height:16px;background:rgba(116,161,219,.24)}
.message-time{font-family:"Space Mono",monospace;font-size:10px;letter-spacing:.16em;color:rgba(177,203,237,.48)}
.message-content{font-size:17px;line-height:1.6;color:#eef5ff;text-shadow:0 0 18px rgba(14,53,120,.18)}
.message-content p{margin:.18em 0}.message-content ul,.message-content ol{padding-left:1.25em}.message-content code{font-family:"Space Mono",monospace;font-size:.88em;padding:.12em .35em;border:1px solid rgba(92,171,255,.18);border-radius:6px;background:rgba(8,27,58,.36);color:#bfe3ff}
.meta{margin-top:10px;font-family:"Space Mono",monospace;font-size:9px;letter-spacing:.22em;text-transform:uppercase;color:rgba(139,183,232,.50)}
.typing{display:none;align-items:center;gap:5px;margin:0 0 0 52px;padding:6px 0;background:transparent;border:0}
.typing.show{display:flex}.typing span{width:5px;height:5px;border-radius:50%;background:#66caff;animation:typingBounce 1.2s infinite}.typing span:nth-child(2){animation-delay:.16s}.typing span:nth-child(3){animation-delay:.32s}
@keyframes typingBounce{50%{transform:translateY(-5px);opacity:.55}}

.chat-footer{position:relative;z-index:7;width:min(49vw,730px);margin:0 0 28px clamp(58px,9vw,145px);padding:0;background:transparent;border:0}
.toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 8px 12px 12px}
.status-line{display:flex;align-items:center;gap:12px;font-family:"Space Mono",monospace;font-size:10px;letter-spacing:.28em;text-transform:uppercase;color:rgba(80,173,255,.70)}
.controls{display:flex;gap:9px}
.ctrl{display:grid;place-items:center;width:44px;min-width:44px;height:44px;padding:0;border:1px solid rgba(92,159,244,.20);border-radius:15px;background:rgba(3,14,32,.30);backdrop-filter:blur(10px);cursor:pointer;box-shadow:0 0 18px rgba(12,75,166,.05)}
.ctrl:hover{border-color:rgba(89,183,255,.42);background:rgba(7,25,53,.48)}
.input-row{display:grid;grid-template-columns:46px minmax(0,1fr) 50px;align-items:center;gap:8px;min-height:68px;padding:8px 10px;border:1px solid rgba(85,163,255,.34);border-radius:999px;background:linear-gradient(180deg,rgba(3,14,34,.48),rgba(2,10,26,.34));backdrop-filter:blur(18px);box-shadow:0 0 28px rgba(19,91,205,.08),inset 0 1px 0 rgba(255,255,255,.025)}
.input-row textarea{width:100%;min-height:44px;max-height:132px;resize:none;border:0;outline:0;background:transparent;color:#f4f8ff;padding:11px 6px;font-size:16px;line-height:1.4}
.input-row textarea::placeholder{color:rgba(190,214,246,.45)}
.ai-disclosure{margin:7px 12px 0;font-size:9px;line-height:1.45;color:rgba(183,205,235,.54)}
.ai-disclosure a{color:rgba(133,206,255,.8);text-underline-offset:3px}
.attach-btn{font-size:0;border:0;background:transparent}.attach-btn::before{content:"";width:21px;height:21px;background:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a9d4ff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m20.5 11.5-8.3 8.3a5 5 0 0 1-7.1-7.1l9.2-9.2a3.5 3.5 0 1 1 5 5l-9.3 9.3a2 2 0 0 1-2.8-2.8l8.4-8.4'/%3E%3C/svg%3E")}
#sendBtn{font-size:0;border-color:rgba(63,151,255,.62);border-radius:50%;background:linear-gradient(180deg,rgba(35,111,226,.78),rgba(12,65,157,.74));box-shadow:0 0 22px rgba(32,126,255,.22),inset 0 1px 0 rgba(255,255,255,.15)}
#sendBtn::before{content:"";width:22px;height:22px;background:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e3f4ff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m22 2-7 20-4-9-9-4z'/%3E%3Cpath d='M22 2 11 13'/%3E%3C/svg%3E")}
#voiceToggle,#micBtn,#liveVoiceBtn,#clearBtn{font-size:0}
#voiceToggle::before,#micBtn::before,#liveVoiceBtn::before,#clearBtn::before{content:"";width:19px;height:19px;background-position:center;background-repeat:no-repeat;background-size:contain;opacity:.86}
#voiceToggle::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b9d7ff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H3v6h3l5 4z'/%3E%3Cpath d='M15.5 8.5a5 5 0 0 1 0 7'/%3E%3Cpath d='M18 6a8.5 8.5 0 0 1 0 12'/%3E%3C/svg%3E")}
#voiceToggle:not(.on)::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b9d7ff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H3v6h3l5 4z'/%3E%3Cpath d='m16 9 5 5'/%3E%3Cpath d='m21 9-5 5'/%3E%3C/svg%3E")}
#micBtn::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b9d7ff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='2' width='6' height='12' rx='3'/%3E%3Cpath d='M5 10a7 7 0 0 0 14 0M12 17v5M8 22h8'/%3E%3C/svg%3E")}
#liveVoiceBtn::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b9d7ff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12a8 8 0 0 1 16 0'/%3E%3Cpath d='M6 12v3a2 2 0 0 0 2 2h1v-7H8a2 2 0 0 0-2 2Z'/%3E%3Cpath d='M18 12v3a2 2 0 0 1-2 2h-1v-7h1a2 2 0 0 1 2 2Z'/%3E%3Cpath d='M12 20h3'/%3E%3C/svg%3E")}
#clearBtn::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b9d7ff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 7H9l-5 5 5 5h11z'/%3E%3Cpath d='m13 10 4 4m0-4-4 4'/%3E%3C/svg%3E")}
#activatePresenceBtn{display:none!important}
.attachment-tray{display:none;gap:8px;flex-wrap:wrap;padding:0 10px 9px}.attachment-tray.on{display:flex}.file-chip{display:flex;align-items:center;gap:8px;max-width:260px;padding:7px 10px;border:1px solid rgba(101,187,255,.20);border-radius:13px;background:rgba(8,28,60,.58);font-size:11px}.file-chip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-chip button{border:0;background:transparent;color:rgba(230,240,255,.62);cursor:pointer}

.generated-outputs{display:grid;gap:12px;margin:16px 0 4px;max-width:620px}.generated-output{overflow:hidden;border:1px solid rgba(82,164,255,.23);border-radius:16px;background:linear-gradient(180deg,rgba(10,34,71,.62),rgba(4,18,42,.68));box-shadow:0 14px 34px rgba(0,0,0,.18)}.generated-output.image img{display:block;width:100%;max-height:520px;object-fit:contain;background:rgba(1,8,20,.70)}.generated-output-bar{display:flex;align-items:center;gap:11px;padding:11px 13px}.generated-output-icon{display:grid;place-items:center;width:36px;height:36px;border:1px solid rgba(104,184,255,.24);border-radius:11px;background:rgba(40,112,204,.15)}.generated-output-info{min-width:0;flex:1}.generated-output-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.generated-output-size{display:block;margin-top:3px;font-size:10px;color:rgba(167,202,244,.56)}.generated-output-origin{display:block;margin-top:2px;font-family:"Space Mono",monospace;font-size:7px;letter-spacing:.08em;text-transform:uppercase;color:rgba(134,205,255,.7)}.generated-download{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:0 12px;border:1px solid rgba(89,169,255,.38);border-radius:10px;background:rgba(37,111,205,.18);color:#cde8ff;text-decoration:none;font-size:12px}.sources{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px}.source-link{color:#a9d9ff;text-decoration:none;font-size:12px;border-bottom:1px solid rgba(100,190,255,.25)}

/* About, account and legal overlays */
.about-modal,.account-modal,.legal-modal{position:fixed;inset:0;z-index:100;display:none;align-items:center;justify-content:center;padding:18px}.about-modal[aria-hidden="false"],body.about-open .about-modal,body.account-open .account-modal,.legal-modal[aria-hidden="false"]{display:flex}.about-backdrop,.account-backdrop,.legal-backdrop{position:absolute;inset:0;background:rgba(1,5,14,.78);backdrop-filter:blur(18px)}
.about-dialog,.account-dialog{position:relative;width:min(680px,100%);max-height:92dvh;overflow:auto;padding:30px;border:1px solid rgba(118,179,255,.22);border-radius:26px;background:linear-gradient(180deg,rgba(10,24,48,.98),rgba(4,12,28,.98));box-shadow:0 30px 100px rgba(0,0,0,.55)}
.account-dialog{width:min(560px,100%)}
.about-close,.account-close{position:absolute;right:15px;top:13px;width:40px;height:40px;border:0;border-radius:50%;background:rgba(255,255,255,.05);color:#dfe9ff;font-size:24px;cursor:pointer}
.about-kicker,.account-kicker{font-family:"Space Mono",monospace;font-size:10px;letter-spacing:.18em;color:rgba(100,207,255,.75);text-transform:uppercase;margin-bottom:10px}.about-dialog h2,.account-dialog h2{font-family:"Cormorant Garamond",serif;font-size:38px;font-weight:400;margin:0 0 12px;color:#f4edda}.about-dialog p,.account-muted{color:rgba(216,229,255,.70);font-size:13px;line-height:1.65}.about-motto{margin:20px 0;padding:16px;border-left:2px solid rgba(103,205,255,.52);font-family:"Cormorant Garamond",serif;font-size:25px;color:#e9f4ff}.about-list{display:grid;gap:10px}.about-item,.about-plan{padding:14px;border:1px solid rgba(120,178,255,.13);border-radius:15px;background:rgba(5,17,37,.48)}.about-item strong,.about-plan strong{display:block;margin-bottom:5px}.about-item span,.about-plan span{font-size:12px;line-height:1.55;color:rgba(210,226,248,.65)}.about-disclaimer{margin-top:16px!important;font-size:11px!important;color:rgba(198,216,242,.48)!important}
.auth-tabs{display:flex;gap:6px;margin:22px 0 18px;padding:5px;border:1px solid rgba(145,186,255,.14);border-radius:16px;background:rgba(5,12,25,.6)}.auth-tab{flex:1;height:42px;border:0;border-radius:12px;background:transparent;color:rgba(220,234,255,.65);cursor:pointer}.auth-tab.active{background:rgba(69,124,255,.18);color:#eef6ff}.auth-pane{display:none}.auth-pane.active{display:block}.auth-form{display:grid;gap:12px}.field-label{display:grid;gap:7px;font-size:12px;color:rgba(222,234,255,.72)}.field-label input{width:100%;height:48px;border:1px solid rgba(145,186,255,.16);border-radius:14px;background:rgba(2,8,18,.68);color:#edf5ff;padding:0 14px;outline:none}.field-label input:focus{border-color:rgba(122,218,255,.48);box-shadow:0 0 0 3px rgba(122,218,255,.07)}.account-action{height:48px;border:1px solid rgba(104,164,255,.34);border-radius:14px;background:linear-gradient(180deg,rgba(69,124,255,.25),rgba(69,124,255,.1));color:#eef6ff;cursor:pointer;font-weight:600}.account-action.secondary{background:rgba(255,255,255,.035);border-color:rgba(145,186,255,.14);font-weight:500}.account-action.danger{border-color:rgba(255,130,130,.25);background:rgba(130,30,45,.12);color:#ffd8dc}.form-message{min-height:20px;margin-top:10px;font-size:12px;color:rgba(122,218,255,.9)}.form-message.error{color:#ffb9c0}.account-summary{display:grid;gap:16px;margin-top:22px}.plan-card{padding:18px;border:1px solid rgba(122,218,255,.17);border-radius:20px;background:linear-gradient(135deg,rgba(59,109,196,.12),rgba(147,92,205,.08))}.plan-row{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.plan-name{font-family:"Cormorant Garamond",serif;font-size:30px;color:#f5ebcd}.plan-badge{padding:6px 10px;border-radius:999px;background:rgba(122,218,255,.1);font-family:"Space Mono",monospace;font-size:9px;letter-spacing:.1em;color:rgba(176,231,255,.95);text-transform:uppercase}.usage-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.usage-card{padding:14px;border:1px solid rgba(145,186,255,.12);border-radius:16px;background:rgba(6,13,27,.55)}.usage-card b{display:block;font-size:18px;margin-bottom:4px}.usage-card span{font-size:10px;color:rgba(216,229,255,.58);text-transform:uppercase;letter-spacing:.08em}.account-buttons{display:grid;grid-template-columns:1fr 1fr;gap:10px}.owner-note{padding:14px;border:1px solid rgba(242,201,126,.2);border-radius:16px;background:rgba(242,201,126,.07);color:#f5e7bd;font-size:13px;line-height:1.5}.price-line{font-family:"Cormorant Garamond",serif;font-size:26px;color:#f5ebcd;margin:8px 0}.price-line small{font-family:Inter,sans-serif;font-size:12px;color:rgba(216,229,255,.58)}
.memory-card{padding:16px;border:1px solid rgba(122,218,255,.14);border-radius:18px;background:rgba(4,14,31,.5)}.memory-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.memory-card-head>div{display:grid;gap:5px}.memory-card-head strong{font-size:13px;color:#edf6ff}.memory-card-head span{font-size:11px;line-height:1.5;color:rgba(205,222,247,.62)}.memory-refresh{flex:0 0 auto;width:34px;height:34px;border:1px solid rgba(130,187,255,.18);border-radius:11px;background:rgba(255,255,255,.035);color:#bde8ff;cursor:pointer}.memory-open-thread{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px;padding:11px 12px;border:1px solid rgba(118,206,255,.14);border-radius:13px;background:rgba(35,91,145,.08)}.memory-open-thread>div{display:grid;gap:3px;min-width:0}.memory-open-thread small{font-family:"Space Mono",monospace;font-size:8px;letter-spacing:.09em;text-transform:uppercase;color:rgba(133,211,255,.68)}.memory-open-thread span{font-size:11px;line-height:1.45;color:rgba(231,241,255,.82);overflow-wrap:anywhere}.memory-list{display:grid;gap:12px;margin-top:13px}.memory-group{display:grid;gap:6px}.memory-group h4{margin:0;font-family:"Space Mono",monospace;font-size:8px;font-weight:400;letter-spacing:.09em;text-transform:uppercase;color:rgba(174,204,239,.52)}.memory-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:10px 0;border-top:1px solid rgba(132,181,247,.08)}.memory-group .memory-row:nth-child(2){border-top:0}.memory-row-content{min-width:0;flex:1}.memory-row-content span{display:block;font-size:11px;line-height:1.5;color:rgba(224,237,255,.78);overflow-wrap:anywhere}.memory-row-actions{display:flex;gap:6px;flex:0 0 auto}.memory-mini-action{min-height:30px;padding:0 9px;border:1px solid rgba(130,187,255,.16);border-radius:9px;background:rgba(255,255,255,.03);color:rgba(210,233,255,.78);font-size:9px;cursor:pointer}.memory-mini-action.danger{border-color:rgba(255,133,143,.14);color:rgba(255,190,197,.82)}.memory-edit-input{width:100%;min-height:70px;resize:vertical;border:1px solid rgba(122,218,255,.28);border-radius:11px;background:rgba(2,8,18,.72);color:#edf5ff;padding:10px 11px;font:inherit;font-size:11px;line-height:1.5;outline:none}.memory-row.editing{display:grid}.memory-empty{margin:12px 0 0!important;font-size:11px!important;color:rgba(205,222,247,.48)!important}.memory-message{margin-top:6px}.memory-card.hidden{display:none}
.field-label select,.field-label textarea{width:100%;border:1px solid rgba(145,186,255,.16);border-radius:14px;background:rgba(2,8,18,.68);color:#edf5ff;padding:12px 14px;outline:none}.field-label select{height:48px}.field-label textarea{resize:vertical;min-height:86px}.legal-check{display:flex;align-items:flex-start;gap:10px;font-size:11px;line-height:1.5;color:rgba(216,229,255,.68)}.legal-check input{margin-top:3px;accent-color:#57bfff}.legal-check a,.subscription-summary a,.legal-inline-link{color:#8fd5ff;text-underline-offset:3px}.subscription-summary{padding:12px 14px;border:1px solid rgba(127,181,255,.13);border-radius:14px;background:rgba(5,16,34,.48);font-size:10px;line-height:1.55;color:rgba(205,221,246,.58)}.subscription-summary strong{color:rgba(231,241,255,.86)}
.legal-dialog{position:relative;width:min(690px,100%);max-height:92dvh;overflow:auto;padding:30px;border:1px solid rgba(118,179,255,.22);border-radius:26px;background:linear-gradient(180deg,rgba(10,24,48,.99),rgba(4,12,28,.99));box-shadow:0 30px 100px rgba(0,0,0,.55)}.legal-dialog.compact{width:min(590px,100%)}.legal-close{position:absolute;right:15px;top:13px;width:40px;height:40px;border:0;border-radius:50%;background:rgba(255,255,255,.05);color:#dfe9ff;font-size:24px;cursor:pointer}.legal-kicker{font-family:"Space Mono",monospace;font-size:10px;letter-spacing:.18em;color:rgba(100,207,255,.75);text-transform:uppercase;margin-bottom:10px}.legal-dialog h2{font-family:"Cormorant Garamond",serif;font-size:38px;font-weight:400;margin:0 0 12px;color:#f4edda}.legal-lead{font-size:13px;line-height:1.65;color:rgba(216,229,255,.7)}.purchase-facts{margin:18px 0;padding:14px 16px;border:1px solid rgba(117,180,255,.14);border-radius:16px;background:rgba(3,13,30,.56)}.purchase-facts p{margin:7px 0;font-size:12px;line-height:1.55;color:rgba(216,229,255,.72)}.legal-dialog .account-action{width:100%;margin-top:14px}.legal-dialog .account-action:disabled{opacity:.42;cursor:not-allowed}.legal-fineprint{font-size:10px;line-height:1.55;color:rgba(195,214,242,.48)}.privacy-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:18px 0}.privacy-actions .account-action{margin:0;height:auto;min-height:46px;padding:9px}.privacy-request-form{display:grid;gap:12px;margin-top:18px;padding-top:18px;border-top:1px solid rgba(130,182,255,.13)}.consent-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:15px 0;border-bottom:1px solid rgba(130,182,255,.1)}.consent-row div{display:grid;gap:5px}.consent-row span{font-size:11px;line-height:1.5;color:rgba(205,221,246,.58)}.consent-row input{width:20px;height:20px;accent-color:#57bfff}.consent-row.disabled{opacity:.58}.legal-inline-link{display:inline-block;margin-top:14px;font-size:11px}
.cookie-banner{position:fixed;z-index:95;left:50%;bottom:54px;display:none;align-items:center;justify-content:space-between;gap:20px;width:min(900px,calc(100% - 30px));padding:16px 18px;border:1px solid rgba(112,185,255,.25);border-radius:20px;background:linear-gradient(180deg,rgba(8,24,49,.98),rgba(3,12,28,.98));box-shadow:0 22px 70px rgba(0,0,0,.52);transform:translateX(-50%)}.cookie-banner.show{display:flex}.cookie-banner>div:first-child{display:grid;gap:5px}.cookie-banner strong{font-size:13px}.cookie-banner span{font-size:11px;line-height:1.5;color:rgba(208,224,247,.66)}.cookie-actions{display:flex;gap:8px;flex:0 0 auto}.cookie-actions .account-action{min-width:132px;padding:0 13px}
.legal-footer{position:relative;z-index:30;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:0 clamp(18px,3vw,46px);border-top:1px solid rgba(76,145,239,.12);background:rgba(1,6,18,.66);backdrop-filter:blur(10px);font-family:"Space Mono",monospace;font-size:8px;letter-spacing:.08em;text-transform:uppercase;color:rgba(171,199,234,.47)}.legal-footer nav{display:flex;align-items:center;justify-content:flex-end;gap:16px}.legal-footer a,.legal-footer button{border:0;background:transparent;color:rgba(181,212,247,.62);font:inherit;text-transform:inherit;text-decoration:none;cursor:pointer;padding:0}.legal-footer a:hover,.legal-footer button:hover{color:#bfe5ff}
.toast{position:fixed;z-index:120;left:50%;bottom:24px;transform:translate(-50%,16px);opacity:0;pointer-events:none;padding:11px 15px;border:1px solid rgba(99,180,255,.22);border-radius:14px;background:rgba(4,16,35,.92);color:#eaf5ff;box-shadow:0 18px 48px rgba(0,0,0,.4);transition:.24s}.toast.show{opacity:1;transform:translate(-50%,0)}
.auth-pill{min-width:118px}.account-pill{max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}


#micBtn.on,#liveVoiceBtn.on,#voiceToggle.on{border-color:rgba(99,209,255,.68);background:rgba(15,77,128,.40);box-shadow:0 0 22px rgba(58,183,255,.20),inset 0 0 16px rgba(80,190,255,.07)}
#liveVoiceBtn.on{animation:liveVoicePulse 1.7s ease-in-out infinite}
@keyframes liveVoicePulse{50%{box-shadow:0 0 34px rgba(76,205,255,.34),inset 0 0 20px rgba(80,190,255,.10)}}
body.state-listening .energy-column{opacity:calc(.62 + (var(--voice-input-level,0) * .26));filter:blur(.7px) drop-shadow(0 0 calc(28px + (var(--voice-input-level,0) * 22px)) rgba(64,211,255,.58))}
body.state-listening .platform-pulse{opacity:calc(.82 + (var(--voice-input-level,0) * .16));animation-duration:2.5s}
body.state-thinking .energy-orbit{animation-duration:4.4s!important;opacity:.82}
body.state-thinking .platform-pulse{animation-duration:3.2s}
body.state-speaking .halo-back{transform:scale(calc(1 + (var(--voice-level,0) * .08)));opacity:calc(.72 + (var(--voice-level,0) * .25));filter:blur(calc(20px - (var(--voice-level,0) * 5px)))}
body.state-speaking .platform-pulse{opacity:calc(.76 + (var(--voice-level,0) * .22));filter:drop-shadow(0 0 calc(18px + (var(--voice-level,0) * 28px)) rgba(65,194,255,.60))}
body.state-speaking .energy-column{opacity:calc(.5 + (var(--voice-level,0) * .34))}
@media(prefers-reduced-motion:reduce){#liveVoiceBtn.on{animation:none!important}body.state-speaking .halo-back{transform:none}}
body[data-lang="ro"].state-idle .state-copy::after{content:"online"}body[data-lang="ro"].state-listening .state-copy::after{content:"ascult"}body[data-lang="ro"].state-thinking .state-copy::after{content:"gândesc"}body[data-lang="ro"].state-speaking .state-copy::after{content:"vorbesc"}body[data-lang="en"].state-idle .state-copy::after{content:"online"}body[data-lang="en"].state-listening .state-copy::after{content:"listening"}body[data-lang="en"].state-thinking .state-copy::after{content:"thinking"}body[data-lang="en"].state-speaking .state-copy::after{content:"speaking"}

@media(max-width:1280px){
  .brand{min-width:230px}.pill.status{display:none}.hologram{left:64%;width:clamp(700px,63vw,930px)}
  .msgs{width:min(51vw,650px);padding-left:72px}.msgs::before{left:34px}.chat-footer{width:min(53vw,680px);margin-left:72px}
}
@media(max-width:980px){
  .stage{z-index:1}
  .chat-panel{z-index:5}
  .msgs{z-index:auto}
  .bubble,.typing{z-index:2}
  #app{grid-template-rows:70px minmax(0,1fr) 42px}.topbar{padding:9px 12px;gap:8px}.brand{min-width:auto;margin-right:auto}.brand img{width:38px;height:38px}.brand-name{font-size:24px}.brand-sub{display:none}.pill{min-height:40px;padding:0 13px;font-size:12px}.lang-switch{min-height:40px}.lang-btn{height:32px;min-width:40px}.about-pill{display:none}
  .stage::before,.stage::after{display:none}
  .chat-panel::before{left:72%;bottom:8%;width:118vw;opacity:.52}
  .msgs{width:100%;padding:24px 18px 18px 32px}.msgs::before{left:14px;top:24px}.bubble{max-width:min(86%,650px)}
  .chat-footer{width:auto;margin:0 14px 12px 32px}.message-content{font-size:16px}.legal-footer{padding:0 12px}.legal-footer>span{display:none}.legal-footer nav{width:100%;justify-content:center;gap:12px}.legal-footer a:nth-child(4){display:none}
}
@media(max-width:620px){
  #app{grid-template-rows:62px minmax(0,1fr) 40px}.topbar{padding:7px 8px}.brand{gap:7px}.brand img{display:none}.brand-name{font-size:21px;letter-spacing:.10em}.lang-switch{margin-left:auto}.lang-btn{min-width:32px;font-size:9px}.auth-pill{max-width:102px;min-width:auto;padding:0 9px}.pill.primary{display:none}
  .chat-panel::before{left:72%;bottom:8%;width:185vw;opacity:.66}
  .msgs{padding:18px 10px 14px 22px;gap:18px}.msgs::before{left:8px;top:18px}.bubble{padding-left:42px;max-width:96%}.message-head{margin-left:-42px}.speaker-dot{width:30px;height:30px;flex-basis:30px}.message-content{font-size:15px;line-height:1.55}.meta{font-size:8px}
  .chat-footer{margin:0 9px 6px 18px}.toolbar{margin:0 2px 8px 5px}.status-line{font-size:8px;letter-spacing:.18em}.controls{gap:6px}.ctrl{width:38px;min-width:38px;height:38px;border-radius:13px}.input-row{grid-template-columns:36px minmax(0,1fr) 42px;min-height:58px;padding:6px 8px}.input-row textarea{min-height:40px;padding:9px 4px;font-size:15px}#sendBtn{width:40px;min-width:40px;height:40px}.usage-grid,.account-buttons,.privacy-actions{grid-template-columns:1fr}.about-dialog,.account-dialog,.legal-dialog{padding:24px 18px}.ai-disclosure{font-size:8px}.legal-footer nav{gap:10px}.legal-footer a:nth-child(3),.legal-footer a:nth-child(5){display:none}.cookie-banner{bottom:50px;display:none;align-items:stretch;flex-direction:column}.cookie-banner.show{display:flex}.cookie-actions{width:100%}.cookie-actions .account-action{min-width:0;flex:1}.legal-dialog h2{font-size:32px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important}}

/* ETAPA 1 · REVIZIA 3 — energie spațială decorativă */
.space-energy{position:absolute;inset:0;z-index:0;overflow:hidden;pointer-events:none;isolation:isolate}
.cosmic-dust{position:absolute;inset:-8%;opacity:.42;background-image:radial-gradient(circle at 11% 22%,rgba(126,219,255,.94) 0 1px,transparent 1.8px),radial-gradient(circle at 69% 17%,rgba(74,162,255,.78) 0 1px,transparent 1.7px),radial-gradient(circle at 84% 61%,rgba(173,229,255,.88) 0 1.1px,transparent 1.9px),radial-gradient(circle at 34% 75%,rgba(64,145,255,.76) 0 1px,transparent 1.8px),radial-gradient(circle at 52% 43%,rgba(222,247,255,.78) 0 .8px,transparent 1.5px);background-size:190px 190px,270px 270px,340px 340px,230px 230px,390px 390px;filter:drop-shadow(0 0 5px rgba(68,176,255,.65));animation:cosmicDrift 24s linear infinite}
.energy-column{position:absolute;left:60%;bottom:-8%;width:clamp(240px,22vw,430px);height:92%;transform:translateX(-50%);opacity:.50;background:linear-gradient(90deg,transparent 0%,rgba(70,161,255,.04) 22%,rgba(99,214,255,.28) 48%,rgba(226,252,255,.48) 50%,rgba(99,214,255,.28) 52%,rgba(70,161,255,.04) 78%,transparent 100%),repeating-linear-gradient(90deg,transparent 0 11px,rgba(92,190,255,.07) 12px 13px,transparent 14px 27px);filter:blur(1.2px) drop-shadow(0 0 26px rgba(64,177,255,.42));-webkit-mask-image:linear-gradient(180deg,transparent 0%,rgba(0,0,0,.32) 14%,#000 52%,rgba(0,0,0,.72) 88%,transparent 100%);mask-image:linear-gradient(180deg,transparent 0%,rgba(0,0,0,.32) 14%,#000 52%,rgba(0,0,0,.72) 88%,transparent 100%);animation:columnBreath 5.6s ease-in-out infinite}
.energy-orbit{position:absolute;left:60%;top:48%;border:1px solid rgba(77,177,255,.34);border-radius:50%;box-shadow:0 0 9px rgba(59,169,255,.24),inset 0 0 12px rgba(83,190,255,.08);transform-origin:center;opacity:.62}
.energy-orbit::before,.energy-orbit::after{content:"";position:absolute;border-radius:50%;background:#bdefff;box-shadow:0 0 12px #55c7ff,0 0 30px rgba(40,136,255,.65)}
.energy-orbit::before{width:5px;height:5px;left:12%;top:18%}.energy-orbit::after{width:3px;height:3px;right:9%;bottom:22%}
.orbit-one{width:min(73vw,1320px);height:min(47vh,430px);transform:translate(-50%,-50%) rotate(-8deg);animation:orbitFloatOne 13s ease-in-out infinite alternate}
.orbit-two{width:min(61vw,1080px);height:min(62vh,570px);border-color:rgba(87,196,255,.22);transform:translate(-50%,-50%) rotate(17deg);opacity:.46;animation:orbitFloatTwo 17s ease-in-out infinite alternate}
.orbit-three{width:min(42vw,760px);height:min(76vh,690px);border-color:rgba(105,188,255,.18);transform:translate(-50%,-50%) rotate(-29deg);opacity:.38;animation:orbitFloatThree 19s ease-in-out infinite alternate}
.energy-arc{position:absolute;width:56vw;height:32vh;border:2px solid transparent;border-top-color:rgba(83,190,255,.27);border-radius:50%;filter:drop-shadow(0 0 8px rgba(63,174,255,.44));opacity:.58}
.arc-left{left:-12%;top:22%;transform:rotate(16deg);animation:arcSwayLeft 11s ease-in-out infinite alternate}.arc-right{right:-17%;top:11%;transform:rotate(-19deg);animation:arcSwayRight 14s ease-in-out infinite alternate}
.platform-pulse{position:absolute;left:60%;bottom:-11%;width:min(65vw,1120px);height:min(37vh,330px);transform:translateX(-50%) perspective(850px) rotateX(69deg);border-radius:50%;opacity:.78;background:radial-gradient(ellipse at center,rgba(229,253,255,.68) 0 1.5%,rgba(63,216,255,.35) 2.2%,transparent 5.5%),repeating-radial-gradient(ellipse at center,transparent 0 8%,rgba(64,172,255,.20) 8.4% 8.8%,transparent 9.2% 14%),radial-gradient(ellipse at center,rgba(42,170,255,.24),transparent 56%);filter:drop-shadow(0 0 18px rgba(65,194,255,.46));animation:platformPulse 4.8s ease-in-out infinite}
@keyframes cosmicDrift{to{transform:translate3d(2.5%,3.5%,0)}}@keyframes columnBreath{50%{opacity:.68;transform:translateX(-50%) scaleX(1.07)}}@keyframes orbitFloatOne{to{transform:translate(-50%,-51.5%) rotate(-4deg) scale(1.025);opacity:.78}}@keyframes orbitFloatTwo{to{transform:translate(-50.5%,-49%) rotate(22deg) scale(.985);opacity:.58}}@keyframes orbitFloatThree{to{transform:translate(-49.4%,-51%) rotate(-24deg) scale(1.02);opacity:.48}}@keyframes arcSwayLeft{to{transform:translate(3%,2%) rotate(11deg);opacity:.72}}@keyframes arcSwayRight{to{transform:translate(-3%,3%) rotate(-14deg);opacity:.70}}@keyframes platformPulse{50%{opacity:1;filter:drop-shadow(0 0 28px rgba(65,194,255,.62))}}
.space-energy::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(2,8,23,.42) 0%,rgba(2,8,23,.20) 31%,transparent 54%);pointer-events:none}
@media(max-width:1280px){.energy-orbit,.energy-column,.platform-pulse{left:64%}}
@media(max-width:980px){.space-energy{opacity:.66}.energy-orbit,.energy-column,.platform-pulse{left:72%}.orbit-one{width:108vw;height:38vh}.orbit-two{width:94vw;height:54vh}.orbit-three{width:72vw;height:62vh}.energy-arc{opacity:.32}.platform-pulse{width:105vw;bottom:1%}.space-energy::after{background:linear-gradient(180deg,rgba(2,8,23,.28),transparent 35%,rgba(2,8,23,.10))}}
@media(max-width:620px){.space-energy{opacity:.48}.energy-orbit,.energy-column,.platform-pulse{left:72%}.energy-column{width:44vw;height:70%;bottom:2%}.orbit-one{width:140vw;height:31vh;top:56%}.orbit-two{width:118vw;height:45vh;top:52%}.orbit-three{display:none}.arc-left{display:none}.arc-right{right:-48%;top:22%;width:110vw}.platform-pulse{width:150vw;height:27vh;bottom:5%}}
@media(prefers-reduced-motion:reduce){.cosmic-dust,.energy-column,.energy-orbit,.energy-arc,.platform-pulse{animation:none!important}}

/* ETAPA 3 — conversație plutitoare + corecție pentru ecrane joase la zoom 100% */
:root{
  --scene-header:84px;
  --scene-footer:38px;
  --composer-safe:154px;
}

/* Holo se raportează și la înălțimea reală, nu doar la lățimea viewportului. */
.chat-panel::before{
  width:min(clamp(760px,58vw,1090px),calc((100dvh - var(--scene-header) - var(--scene-footer) + 70px) * 1.5));
  bottom:clamp(-28px,-3.2vh,-10px);
}

.msgs{
  padding-top:clamp(24px,6vh,54px);
  padding-bottom:clamp(18px,3vh,30px);
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  mask-image:linear-gradient(180deg,transparent 0,#000 28px,#000 calc(100% - 20px),transparent 100%);
}

.bubble{
  width:100%;
  animation:messageArrive .26s ease-out both;
}
.bubble.user{
  width:min(88%,560px);
  margin-left:34px;
  padding:13px 16px 12px;
  border:1px solid rgba(94,164,255,.18);
  border-radius:18px 18px 5px 18px;
  background:linear-gradient(135deg,rgba(22,70,145,.24),rgba(5,25,58,.18));
  backdrop-filter:blur(10px);
  box-shadow:0 12px 30px rgba(0,0,0,.10),inset 0 1px 0 rgba(255,255,255,.025);
}
.bubble.user .message-head{margin:0 0 7px;min-height:auto}
.bubble.user .speaker-dot{width:8px;height:8px;flex-basis:8px;border:0;background:#6fcaff;box-shadow:0 0 12px rgba(85,192,255,.55)}
.bubble.user .speaker-name{font-size:9px;color:rgba(176,218,255,.72)}
.bubble.user .message-time{font-size:9px}
.bubble.user .message-content{font-size:15px;line-height:1.55;color:rgba(238,247,255,.92)}
.bubble.user .meta{display:none}
.bubble.ai + .bubble.ai{margin-top:4px}
.message-content{overflow-wrap:anywhere}
.message-content a{color:#9edaff;text-underline-offset:3px}
.message-content pre{max-width:100%;overflow:auto;padding:12px;border:1px solid rgba(92,171,255,.15);border-radius:12px;background:rgba(3,15,34,.58)}

.typing.on,.typing.show{display:flex}
.typing::before{content:"HOLO";margin-right:7px;font-family:"Space Mono",monospace;font-size:8px;letter-spacing:.18em;color:rgba(91,190,255,.66)}

.generated-outputs{max-width:100%}
.generated-output{transition:transform .18s ease,border-color .18s ease,background .18s ease}
.generated-output:hover{transform:translateY(-1px);border-color:rgba(101,187,255,.38);background:linear-gradient(180deg,rgba(12,42,86,.68),rgba(5,21,48,.74))}
.generated-download:focus-visible,.source-link:focus-visible,.ctrl:focus-visible,.pill:focus-visible,.lang-btn:focus-visible{outline:2px solid rgba(117,210,255,.78);outline-offset:3px}

.input-row:focus-within{border-color:rgba(104,193,255,.58);box-shadow:0 0 0 3px rgba(76,169,255,.07),0 0 34px rgba(27,114,224,.14),inset 0 1px 0 rgba(255,255,255,.04)}
.input-row textarea{scrollbar-width:thin;scrollbar-color:rgba(82,158,255,.25) transparent}

@keyframes messageArrive{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}

/* Laptopuri și ferestre joase: păstrăm capul, platforma și bara de scriere în cadru. */
@media (min-width:981px) and (max-height:860px){
  :root{--scene-header:72px;--scene-footer:34px}
  #app{grid-template-rows:72px minmax(0,1fr) 34px}
  .topbar{padding-top:8px;padding-bottom:8px}
  .brand img{width:42px;height:42px}.brand-name{font-size:27px}.brand-sub{margin-top:7px}
  .pill,.lang-switch{min-height:42px}.lang-btn{height:32px}
  .chat-panel::before{bottom:-18px;width:min(clamp(680px,55vw,960px),calc((100dvh - 38px) * 1.42))}
  .msgs{padding-top:26px;gap:17px}
  .chat-footer{margin-bottom:12px}
  .toolbar{margin-bottom:8px}
  .input-row{min-height:60px}.input-row textarea{min-height:40px;padding-top:9px;padding-bottom:9px}
  .ctrl{width:40px;min-width:40px;height:40px}
  .ai-disclosure{margin-top:5px}
  .legal-footer{font-size:7px}
}
@media (min-width:981px) and (max-height:720px){
  :root{--scene-header:64px;--scene-footer:30px}
  #app{grid-template-rows:64px minmax(0,1fr) 30px}
  .brand img{width:36px;height:36px}.brand-name{font-size:24px}.brand-sub{display:none}
  .pill,.lang-switch{min-height:38px}.pill{padding-left:16px;padding-right:16px}.lang-btn{height:30px}
  .chat-panel::before{bottom:-12px;width:min(760px,calc((100dvh - 12px) * 1.34))}
  .msgs{padding-top:18px;padding-bottom:12px;gap:14px}
  .message-content{font-size:15px;line-height:1.5}.message-head{margin-bottom:6px}.meta{margin-top:6px}
  .chat-footer{margin-bottom:6px}.toolbar{margin-bottom:6px}.status-line{font-size:8px}
  .input-row{min-height:54px}.input-row textarea{min-height:36px;max-height:84px;font-size:15px}
  .ai-disclosure{font-size:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .legal-footer nav{gap:11px}
}

@media(max-width:980px){
  :root{--scene-header:70px;--scene-footer:42px}
  .msgs{mask-image:none}
  .bubble.user{margin-left:auto;width:min(88%,560px)}
}
@media(max-width:620px){
  :root{--scene-header:62px;--scene-footer:40px}
  .bubble.user{width:92%;padding:11px 13px}
}
@media(prefers-reduced-motion:reduce){.bubble{animation:none}.generated-output{transition:none}}

/* Etapa 4 · istoric și persistență */
.history-pill{min-width:92px}
.conversation-bar{position:relative;z-index:5;display:flex;align-items:center;gap:10px;width:min(760px,100%);padding:0 7px 8px 52px;color:rgba(220,234,255,.62)}
.conversation-label{font-family:"Space Mono",monospace;font-size:8px;letter-spacing:.14em;text-transform:uppercase;color:rgba(129,201,255,.55)}
.conversation-bar strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:500;color:rgba(235,244,255,.82)}
.conversation-bar button{margin-left:auto;width:28px;height:28px;border:1px solid rgba(123,190,255,.16);border-radius:10px;background:rgba(7,22,45,.48);color:#bfe8ff;cursor:pointer;font-size:17px;line-height:1}
.conversation-bar button:hover,.conversation-bar button:focus-visible{border-color:rgba(112,215,255,.46);outline:none;box-shadow:0 0 0 3px rgba(79,185,255,.08)}
.history-drawer{position:fixed;inset:0;z-index:120;display:none}
.history-drawer[aria-hidden="false"]{display:block}
.history-backdrop{position:absolute;inset:0;background:rgba(0,4,13,.56);backdrop-filter:blur(4px)}
.history-panel{position:absolute;left:0;top:0;bottom:0;width:min(390px,92vw);display:flex;flex-direction:column;padding:22px 18px 24px;border-right:1px solid rgba(107,190,255,.22);background:linear-gradient(180deg,rgba(5,18,39,.985),rgba(2,9,23,.99));box-shadow:28px 0 90px rgba(0,0,0,.48);animation:history-in .22s ease-out}
@keyframes history-in{from{transform:translateX(-22px);opacity:.35}to{transform:translateX(0);opacity:1}}
.history-header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:4px 4px 16px}
.history-kicker{font-family:"Space Mono",monospace;font-size:8px;letter-spacing:.18em;color:rgba(91,205,255,.62)}
.history-header h2{margin:5px 0 0;font-family:"Cormorant Garamond",serif;font-size:34px;font-weight:400;color:#f3edda}
.history-close{width:38px;height:38px;border:0;border-radius:50%;background:rgba(255,255,255,.05);color:#dcecff;font-size:24px;cursor:pointer}
.history-new{min-height:46px;margin:2px 3px 14px;border:1px solid rgba(91,196,255,.25);border-radius:14px;background:linear-gradient(180deg,rgba(59,135,215,.19),rgba(23,71,130,.09));color:#e9f7ff;font-weight:600;cursor:pointer}
.history-search{display:grid;grid-template-columns:22px minmax(0,1fr) 28px;align-items:center;gap:5px;min-height:42px;margin:0 3px 12px;padding:0 7px 0 10px;border:1px solid rgba(108,181,255,.14);border-radius:12px;background:rgba(2,10,24,.5)}
.history-search:focus-within{border-color:rgba(98,207,255,.34);box-shadow:0 0 0 3px rgba(62,169,239,.07)}
.history-search-icon{font-size:17px;color:rgba(159,207,244,.52);transform:translateY(-1px)}
.history-search input{min-width:0;width:100%;height:38px;border:0;outline:0;background:transparent;color:rgba(235,246,255,.9);font:inherit;font-size:12px}
.history-search input::placeholder{color:rgba(176,205,235,.4)}
.history-search input::-webkit-search-cancel-button{display:none}
.history-search-clear{width:28px;height:28px;border:0;border-radius:8px;background:transparent;color:rgba(190,221,246,.58);font-size:18px;cursor:pointer}
.history-search-clear:hover,.history-search-clear:focus-visible{background:rgba(255,255,255,.06);color:#e9f7ff;outline:none}
.history-group-label{display:flex;align-items:center;gap:8px;margin:10px 6px 2px;font-family:"Space Mono",monospace;font-size:7px;letter-spacing:.13em;text-transform:uppercase;color:rgba(137,185,226,.46)}
.history-group-label::after{content:"";height:1px;flex:1;background:linear-gradient(90deg,rgba(105,169,226,.12),transparent)}
.history-note{margin:0 3px 14px;padding:12px 13px;border:1px solid rgba(241,199,119,.17);border-radius:13px;background:rgba(129,83,20,.08);font-size:11px;line-height:1.55;color:rgba(245,225,183,.76)}
.history-list{min-height:0;overflow:auto;display:grid;align-content:start;gap:7px;padding:2px 3px 30px}
.history-empty{padding:30px 12px;text-align:center;font-size:12px;line-height:1.6;color:rgba(199,218,244,.52)}
.history-item{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;padding:12px 9px 12px 13px;border:1px solid transparent;border-radius:14px;background:rgba(255,255,255,.025)}
.history-item:hover{border-color:rgba(118,185,255,.13);background:rgba(79,135,211,.07)}
.history-item.active{border-color:rgba(88,207,255,.28);background:linear-gradient(90deg,rgba(50,155,218,.13),rgba(68,92,176,.06))}
.history-item.active .history-open small{color:rgba(116,218,255,.82);font-weight:700;text-transform:uppercase;letter-spacing:.08em}
.history-open{min-width:0;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer;padding:0}
.history-open strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:500;color:rgba(235,244,255,.88)}
.history-open small{display:block;margin-top:5px;font-family:"Space Mono",monospace;font-size:8px;color:rgba(171,203,236,.46)}
.history-actions{display:flex;gap:3px}
.history-actions button{width:30px;height:30px;border:0;border-radius:9px;background:transparent;color:rgba(183,215,245,.55);cursor:pointer}
.history-actions button:hover,.history-actions button:focus-visible{background:rgba(255,255,255,.06);color:#dff5ff;outline:none}
body.history-open{overflow:hidden}
body.history-open .history-panel{visibility:visible}
.conversation-day-divider{display:flex;align-items:center;gap:10px;margin:14px 8px 10px;font-family:"Space Mono",monospace;font-size:9px;letter-spacing:.12em;text-transform:uppercase;color:rgba(157,193,229,.5)}
.conversation-day-divider::before,.conversation-day-divider::after{content:"";height:1px;flex:1;background:linear-gradient(90deg,transparent,rgba(106,169,225,.14))}
.conversation-day-divider::after{background:linear-gradient(90deg,rgba(106,169,225,.14),transparent)}
@media(max-width:720px){.history-pill{min-width:auto;padding:0 10px}.conversation-bar{padding-left:22px;padding-right:4px}.conversation-label{display:none}.history-panel{width:min(360px,94vw)}}
@media(max-width:480px){.history-pill{font-size:0}.history-pill::after{content:'☷';font-size:17px}.conversation-bar{padding-bottom:4px}.conversation-bar strong{font-size:11px}}
@media(prefers-reduced-motion:reduce){.history-panel{animation:none}}

/* Etapa 5 · Inițiativă relațională controlată */
.initiative-card{padding:16px;border:1px solid rgba(122,218,255,.14);border-radius:18px;background:rgba(5,15,31,.5)}
.initiative-consent{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;cursor:pointer}
.initiative-consent>div{display:grid;gap:6px}
.initiative-consent strong{font-size:13px;font-weight:600;color:rgba(239,248,255,.92)}
.initiative-consent span{font-size:11px;line-height:1.55;color:rgba(205,221,246,.62)}
.initiative-consent input{width:20px;height:20px;flex:0 0 auto;margin-top:2px;accent-color:#57bfff}
.initiative-quiet{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px;padding-top:13px;border-top:1px solid rgba(130,182,255,.1)}
.initiative-quiet label{display:grid;gap:6px;font-size:10px;letter-spacing:.05em;color:rgba(205,221,246,.54)}
.initiative-quiet input{min-height:38px;padding:0 10px;border:1px solid rgba(139,187,255,.14);border-radius:11px;background:rgba(3,10,22,.62);color:#eaf6ff;font:inherit;color-scheme:dark}
.initiative-quiet input:disabled,.initiative-consent input:disabled{opacity:.45;cursor:not-allowed}
.initiative-plan-note{margin:12px 0 0;font-size:10px;line-height:1.5;color:rgba(244,214,157,.68)}
.initiative-message{margin-top:8px;min-height:16px}
.initiative-push{margin-top:14px;padding-top:13px;border-top:1px solid rgba(130,182,255,.1)}
.initiative-push-consent{gap:12px}
.initiative-push-hint{margin:8px 34px 0 0;font-size:10px;line-height:1.5;color:rgba(190,216,241,.54)}
.initiative-push-hint.is-warning{color:rgba(244,214,157,.74)}
.initiative-push-hint.is-active{color:rgba(146,232,215,.72)}
@media(max-width:480px){.initiative-quiet{grid-template-columns:1fr}.initiative-consent{gap:12px}}

/* ==========================================================================\n   ETAPA 8 · OPTIMIZARE, RESPONSIVE ȘI TESTARE FINALĂ\n   - repară grila conversației (titlu / mesaje / composer)\n   - păstrează scena desktop, simplifică HUD-ul decorativ\n   - layout mobil dedicat, fără comprimarea desktopului\n   - viewport dinamic pentru tastatura telefonului\n   ========================================================================== */
:root{
  --visual-viewport-height:100dvh;
  --mobile-header:64px;
}

/* Optimizare assets: WebP cu fallback PNG. */
body{
  background-image:
    linear-gradient(90deg,rgba(1,6,18,.24) 0%,rgba(1,6,18,.06) 44%,rgba(1,6,18,.14) 100%),
    linear-gradient(180deg,rgba(1,5,15,.22),rgba(1,5,15,.10)),
    image-set(url("../holo-v2/holo-background-desktop.webp") type("image/webp"),url("../holo-v2/holo-background-desktop.png") type("image/png"));
}
#app{height:min(100dvh,var(--visual-viewport-height,100dvh))}
.chat-panel::before{
  background-image:image-set(url("../holo-v2/holo-character-center.webp") type("image/webp"),url("../holo-v2/holo-character-center.png") type("image/png"));
}

/* Bug real observat în Etapa 7: chat-panel avea 3 copii vizibili pe doar 2 rânduri. */
.chat-panel{grid-template-rows:auto minmax(0,1fr) auto}
.conversation-bar{
  z-index:8;
  width:min(47vw,690px);
  min-height:38px;
  margin:0 0 0 clamp(58px,9vw,145px);
  padding:9px 16px 7px 52px;
  border-bottom:1px solid rgba(101,175,255,.08);
  background:linear-gradient(90deg,rgba(2,9,23,.28),rgba(2,9,23,0));
}

/* Zona din dreapta era un HUD fără funcție și părea un control gol. */
.stage::before,.stage::after{display:none!important}

/* Desktop: textul rămâne într-o zonă sigură, fără să intre peste Holo. */
@media(min-width:981px){
  .msgs{width:min(45vw,680px)}
  .chat-footer{width:min(47vw,710px)}
  .conversation-bar{width:min(45vw,680px)}
}

/* Meniu compact folosit numai pe mobil/tabletă îngustă. */
.mobile-menu-toggle,.mobile-menu{display:none}
.mobile-menu-toggle{
  width:42px;height:42px;flex:0 0 42px;padding:0;border:1px solid rgba(97,160,246,.26);border-radius:13px;
  background:rgba(3,12,29,.48);cursor:pointer;place-items:center;align-content:center;gap:4px;
}
.mobile-menu-toggle span{display:block;width:18px;height:1px;background:#c9e8ff;transition:transform .18s ease,opacity .18s ease}
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1){transform:translateY(5px) rotate(45deg)}
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2){opacity:0}
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3){transform:translateY(-5px) rotate(-45deg)}
.mobile-menu{
  position:absolute;z-index:60;right:10px;top:calc(100% - 4px);width:min(300px,calc(100vw - 20px));padding:12px;
  border:1px solid rgba(104,183,255,.24);border-radius:18px;background:linear-gradient(180deg,rgba(6,21,45,.985),rgba(2,10,25,.99));
  box-shadow:0 24px 70px rgba(0,0,0,.52);backdrop-filter:blur(18px)
}
.mobile-menu[aria-hidden="false"]{display:grid;gap:7px}
.mobile-menu-status{display:flex;align-items:center;gap:8px;padding:6px 8px 10px;font-family:"Space Mono",monospace;font-size:9px;letter-spacing:.1em;text-transform:uppercase;color:rgba(164,220,255,.76)}
.mobile-lang{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:4px 0 7px}
.mobile-lang .lang-btn{width:100%;border:1px solid rgba(104,183,255,.16);background:rgba(255,255,255,.025)}
.mobile-lang .lang-btn.active{background:rgba(51,123,239,.24)}
.mobile-menu-action{min-height:42px;padding:0 13px;border:1px solid rgba(117,179,255,.12);border-radius:12px;background:rgba(255,255,255,.025);color:#e8f3ff;text-align:left;cursor:pointer}
.mobile-menu-action:hover,.mobile-menu-action:focus-visible{border-color:rgba(102,199,255,.38);background:rgba(56,126,215,.10);outline:none}
.mobile-menu-plus{border-color:rgba(74,160,255,.34);background:rgba(37,111,205,.13)}
.mobile-menu-action.hidden{display:none!important}

/* Tabletă și telefon: nu comprimăm versiunea desktop. */
@media(max-width:980px){
  :root{--scene-header:64px;--scene-footer:68px}
  #app{grid-template-rows:var(--scene-header) minmax(0,1fr) auto}
  .topbar{height:var(--scene-header);padding:7px 12px;gap:9px;overflow:visible}
  .topbar>.spacer,.topbar>.pill,.topbar>.lang-switch{display:none!important}
  .brand{min-width:0;gap:9px;margin-right:auto}
  .brand img{display:block;width:36px;height:36px;flex:0 0 36px}
  .brand-name{font-size:24px;letter-spacing:.13em}
  .brand-sub{display:block;margin-top:5px;font-size:6px;letter-spacing:.27em}
  .mobile-menu-toggle{display:grid}

  .conversation-bar{
    width:calc(100% - 28px);min-height:38px;margin:0 14px;padding:8px 10px 7px 8px;
    border-bottom:1px solid rgba(104,183,255,.10);background:linear-gradient(90deg,rgba(4,17,37,.62),rgba(4,17,37,.14));
  }
  .conversation-label{font-size:7px}
  .conversation-bar strong{font-size:11px}

  /* Holo are o zonă proprie în partea superioară a scenei. */
  .chat-panel::before{
    left:50%;top:4px;bottom:auto;width:min(124vw,620px);opacity:.84;
    filter:saturate(1.08) contrast(1.06) brightness(.96) drop-shadow(0 0 24px rgba(69,171,255,.20)) drop-shadow(0 0 66px rgba(36,112,255,.13));
  }
  .space-energy{opacity:.52}
  .energy-orbit,.energy-column,.platform-pulse{left:50%}
  .platform-pulse{width:120vw;bottom:0}
  .space-energy::after{background:linear-gradient(180deg,rgba(2,8,23,.04) 0%,rgba(2,8,23,.10) 32%,rgba(2,8,23,.64) 62%,rgba(2,8,23,.90) 100%)}

  .msgs{
    width:100%;padding:clamp(210px,31dvh,310px) 18px 20px;gap:18px;
    mask-image:none;scrollbar-gutter:auto;
    background:linear-gradient(180deg,transparent 0,transparent 25%,rgba(2,8,23,.28) 43%,rgba(2,8,23,.72) 68%,rgba(2,8,23,.86) 100%);
  }
  .msgs::before{display:none}
  .bubble{width:100%;max-width:100%;padding-left:44px}
  .bubble.user{width:min(92%,620px);margin-left:auto;padding:12px 14px}
  .message-head{margin-left:-44px}
  .message-content{font-size:16px;line-height:1.58}

  .chat-footer{
    width:auto;margin:0;padding:8px 14px max(8px,env(safe-area-inset-bottom));
    border-top:1px solid rgba(82,160,255,.10);background:linear-gradient(180deg,rgba(2,8,23,.52),rgba(2,8,23,.92));backdrop-filter:blur(12px)
  }
  .toolbar{margin:0 2px 7px;gap:8px}
  .status-line{font-size:8px;letter-spacing:.14em}
  .controls{gap:6px}
  #voiceToggle,#clearBtn{display:none!important}
  #micBtn,#liveVoiceBtn{display:flex;width:auto;min-width:42px;height:36px;padding:0 10px;gap:6px;border-radius:12px}
  #micBtn::after,#liveVoiceBtn::after{content:attr(title);font-family:Inter,sans-serif;font-size:9px;letter-spacing:0;color:rgba(214,235,255,.76);white-space:nowrap}
  #micBtn::before,#liveVoiceBtn::before{width:17px;height:17px}

  .input-row{grid-template-columns:40px minmax(0,1fr) 44px;min-height:58px;padding:6px 8px;gap:5px;border-radius:20px}
  .input-row textarea{min-height:40px;max-height:92px;padding:9px 5px;font-size:16px}
  #sendBtn{width:42px;min-width:42px;height:42px}
  .attach-btn{width:38px;min-width:38px;height:38px}
  .ai-disclosure{margin:6px 6px 0;font-size:8px;line-height:1.4}

  .legal-footer{
    min-height:68px;height:auto;display:grid;grid-template-columns:1fr;justify-items:center;align-content:center;gap:5px;
    padding:7px 10px max(7px,env(safe-area-inset-bottom));font-size:7px;line-height:1.35;text-align:center
  }
  .legal-footer>span{display:block!important}
  .legal-footer nav{width:100%;display:flex;flex-wrap:wrap;justify-content:center;gap:5px 10px}
  .legal-footer a{display:inline-flex!important}
  .legal-footer button{font-size:0}
  .legal-footer button::after{content:"Setări";font-size:7px}
}

@media(max-width:620px){
  :root{--scene-header:62px;--scene-footer:76px}
  .topbar{padding-left:10px;padding-right:10px}
  .brand img{width:34px;height:34px;flex-basis:34px}
  .brand-name{font-size:22px}
  .brand-sub{font-size:5.5px;letter-spacing:.23em}
  .mobile-menu-toggle{width:40px;height:40px;flex-basis:40px}

  .conversation-bar{width:calc(100% - 20px);margin:0 10px;padding-left:7px;padding-right:7px}
  .conversation-label{display:none}
  .conversation-bar strong{font-size:10px}
  .conversation-bar button{width:26px;height:26px}

  .chat-panel::before{top:8px;left:50%;width:min(132vw,540px);opacity:.88}
  .msgs{padding:clamp(190px,29dvh,270px) 12px 14px;gap:16px}
  .bubble{padding-left:40px}
  .message-head{margin-left:-40px;gap:8px}
  .speaker-dot{width:30px;height:30px;flex-basis:30px}
  .speaker-name{font-size:9px}.message-time{font-size:8px}
  .message-content{font-size:15.5px;line-height:1.56}
  .bubble.user{width:94%;padding:11px 13px}
  .bubble.user .message-content{font-size:15px}

  .chat-footer{padding-left:10px;padding-right:10px}
  .status-line{max-width:42vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  #micBtn,#liveVoiceBtn{padding:0 8px}
  #micBtn::after,#liveVoiceBtn::after{font-size:8px}
  .input-row{border-radius:18px}
  .ai-disclosure{font-size:7.5px}

  .legal-footer{min-height:76px;padding-left:8px;padding-right:8px}
  .legal-footer nav{gap:4px 8px}
}

@media(max-width:390px){
  .brand-name{font-size:20px}.brand-sub{letter-spacing:.18em}
  .brand img{width:32px;height:32px;flex-basis:32px}
  .chat-panel::before{width:138vw}
  .msgs{padding-top:clamp(175px,27dvh,245px);padding-left:10px;padding-right:10px}
  .status-line{display:none}
  .toolbar{justify-content:flex-end}
  .controls{width:100%;justify-content:flex-end}
  #micBtn,#liveVoiceBtn{flex:1;justify-content:center;max-width:145px}
}

/* Când tastatura virtuală este deschisă, prioritizăm conversația și composerul. */
@media(max-width:980px){
  body.keyboard-open .chat-panel::before{opacity:.14;top:-80px}
  body.keyboard-open .space-energy{opacity:.24}
  body.keyboard-open .msgs{padding-top:14px;background:rgba(2,8,23,.84)}
  body.keyboard-open .conversation-bar{display:none}
  body.keyboard-open .legal-footer{display:none}
  body.keyboard-open #app{grid-template-rows:var(--scene-header) minmax(0,1fr)}
}

/* Touch targets + reducerea efectelor costisitoare pe ecrane mici. */
@media(hover:none) and (pointer:coarse){
  button,.ctrl,.pill,.lang-btn{touch-action:manipulation}
}
@media(max-width:620px){
  #bgCanvas{opacity:.12}
  #grid{opacity:.06;background-size:56px 56px}
  .cosmic-dust{opacity:.28}
  .energy-arc{display:none}
}


/* ==========================================================================\n   ETAPA 8.1 — IDENTITATEA LUI HOLO: NUCLEU + MANIFESTARE\n   Nucleul = orb-ul recognoscibil din conversație.\n   Manifestarea = figura holografică extinsă.\n   Reacțiile importante sunt sincronizate prin aceleași stări de sistem.\n   ========================================================================== */
:root{
  --holo-core-rgb:91,198,255;
  --holo-core-hot-rgb:190,239,255;
  --holo-core-deep-rgb:34,103,233;
  --holo-manifest-strength:.18;
}

/* Nucleul: aceeași familie vizuală cu sigla HoloCQ, fără a deveni un buton UI. */
.bubble.ai .speaker-dot{
  position:relative;
  isolation:isolate;
  overflow:visible;
  border-color:rgba(var(--holo-core-rgb),.44);
  background:
    radial-gradient(circle at 36% 30%,rgba(255,255,255,.94) 0 5%,rgba(var(--holo-core-hot-rgb),.88) 7% 13%,rgba(var(--holo-core-rgb),.78) 25%,rgba(50,127,235,.62) 47%,rgba(7,35,91,.88) 73%,rgba(3,15,43,.96) 100%);
  box-shadow:
    0 0 8px rgba(var(--holo-core-hot-rgb),.34),
    0 0 20px rgba(var(--holo-core-rgb),.27),
    0 0 42px rgba(var(--holo-core-deep-rgb),.13),
    inset 0 0 9px rgba(224,249,255,.22);
}
.bubble.ai .speaker-dot::before{
  content:"";
  position:absolute;
  inset:-5px;
  z-index:-1;
  border:1px solid rgba(var(--holo-core-rgb),.28);
  border-radius:50%;
  box-shadow:0 0 12px rgba(var(--holo-core-rgb),.12),inset 0 0 10px rgba(var(--holo-core-rgb),.06);
  opacity:.62;
}
.bubble.ai .speaker-dot::after{
  content:"";
  position:absolute;
  inset:-9px;
  z-index:-2;
  border-radius:50%;
  background:
    linear-gradient(90deg,transparent calc(50% - .5px),rgba(var(--holo-core-rgb),.24) 50%,transparent calc(50% + .5px)) center/100% 100% no-repeat,
    linear-gradient(0deg,transparent calc(50% - .5px),rgba(var(--holo-core-rgb),.24) 50%,transparent calc(50% + .5px)) center/100% 100% no-repeat;
  opacity:.50;
  transform:scale(.88);
}

/* Doar nucleul curent este „viu”; orburile mesajelor vechi rămân semnături calme. */
.bubble.ai.holo-current .speaker-dot{
  animation:holoCoreIdle 4.8s ease-in-out infinite;
}
.bubble.ai:not(.holo-current) .speaker-dot{opacity:.72;filter:saturate(.82) brightness(.9)}
.bubble.ai:not(.holo-current) .speaker-dot::before,.bubble.ai:not(.holo-current) .speaker-dot::after{opacity:.26}

/* Manifestarea nu primește un al doilea orb vizibil. Are un „ecou” de energie în centru,
   suficient cât să lege figura de nucleu fără aspect de mascotă sau super-erou. */
.chat-panel::after{
  content:"";
  position:absolute;
  z-index:1;
  left:60%;
  top:43%;
  width:clamp(54px,5vw,84px);
  aspect-ratio:1;
  transform:translate(-50%,-50%) scale(.92);
  border-radius:50%;
  pointer-events:none;
  opacity:var(--holo-manifest-strength);
  mix-blend-mode:screen;
  background:
    radial-gradient(circle,rgba(244,254,255,.92) 0 2%,rgba(var(--holo-core-hot-rgb),.72) 4% 8%,rgba(var(--holo-core-rgb),.27) 18%,rgba(var(--holo-core-deep-rgb),.10) 40%,transparent 68%);
  filter:blur(.3px) drop-shadow(0 0 14px rgba(var(--holo-core-rgb),.42)) drop-shadow(0 0 34px rgba(var(--holo-core-deep-rgb),.19));
  transition:opacity .48s ease,transform .48s ease,filter .48s ease;
}

/* Figura mare este manifestarea: aceeași prezență, la altă scară. */
.chat-panel::before{
  transform:translateX(-50%) scale(var(--manifest-scale,1));
  transform-origin:50% 72%;
  transition:filter .5s ease,opacity .5s ease,transform .5s ease;
}

/* Idle — viață discretă, nu fotografie complet inertă. */
body.state-idle .chat-panel::after{--holo-manifest-strength:.15;animation:holoManifestIdle 5.2s ease-in-out infinite}

/* Ascultă — nucleul focalizează primul, manifestarea răspunde foarte fin. */
body.state-listening .bubble.ai.holo-current .speaker-dot{
  animation:holoCoreListen 1.45s ease-in-out infinite;
  transform:scale(calc(1 + (var(--voice-input-level,0) * .075)));
  box-shadow:0 0 calc(13px + (var(--voice-input-level,0) * 8px)) rgba(var(--holo-core-hot-rgb),.46),0 0 calc(28px + (var(--voice-input-level,0) * 22px)) rgba(var(--holo-core-rgb),.38),0 0 54px rgba(var(--holo-core-deep-rgb),.17),inset 0 0 10px rgba(224,249,255,.27);
}
body.state-listening .bubble.ai.holo-current .speaker-dot::before{animation:holoCoreRingListen 1.45s ease-in-out infinite}
body.state-listening .chat-panel::after{
  opacity:calc(.20 + (var(--voice-input-level,0) * .18));
  transform:translate(-50%,-50%) scale(calc(.96 + (var(--voice-input-level,0) * .14)));
}
body.state-listening .chat-panel::before{
  --manifest-scale:calc(1 + (var(--voice-input-level,0) * .0025));
  filter:saturate(1.10) contrast(1.07) brightness(calc(.98 + (var(--voice-input-level,0) * .035))) drop-shadow(0 0 31px rgba(69,190,255,.24)) drop-shadow(0 0 96px rgba(36,112,255,.18));
}

/* Gândește — nucleul devine concentrat și orbital; figura capătă densitate luminoasă. */
body.state-thinking .bubble.ai.holo-current .speaker-dot{animation:holoCoreThink 2.25s ease-in-out infinite}
body.state-thinking .bubble.ai.holo-current .speaker-dot::before{border-top-color:rgba(224,250,255,.84);animation:holoCoreOrbit 2.1s linear infinite}
body.state-thinking .bubble.ai.holo-current .speaker-dot::after{animation:holoCoreCross 3.2s ease-in-out infinite}
body.state-thinking .chat-panel::after{opacity:.38;transform:translate(-50%,-50%) scale(1.10);animation:holoManifestThink 2.5s ease-in-out infinite}
body.state-thinking .chat-panel::before{
  --manifest-scale:1.002;
  filter:saturate(1.15) contrast(1.08) brightness(1.015) drop-shadow(0 0 34px rgba(83,205,255,.28)) drop-shadow(0 0 105px rgba(50,118,255,.22));
}

/* Vorbește — nucleul și manifestarea respiră pe nivelul audio real. */
body.state-speaking .bubble.ai.holo-current .speaker-dot{
  animation:none;
  transform:scale(calc(1 + (var(--voice-level,0) * .10)));
  filter:brightness(calc(1 + (var(--voice-level,0) * .22)));
  box-shadow:0 0 calc(12px + (var(--voice-level,0) * 12px)) rgba(var(--holo-core-hot-rgb),.55),0 0 calc(27px + (var(--voice-level,0) * 32px)) rgba(var(--holo-core-rgb),.48),0 0 calc(48px + (var(--voice-level,0) * 42px)) rgba(var(--holo-core-deep-rgb),.22),inset 0 0 12px rgba(236,253,255,.34);
}
body.state-speaking .bubble.ai.holo-current .speaker-dot::before{transform:scale(calc(1 + (var(--voice-level,0) * .20)));opacity:calc(.55 + (var(--voice-level,0) * .35))}
body.state-speaking .chat-panel::after{
  opacity:calc(.25 + (var(--voice-level,0) * .34));
  transform:translate(-50%,-50%) scale(calc(1 + (var(--voice-level,0) * .28)));
  filter:blur(.2px) drop-shadow(0 0 calc(15px + (var(--voice-level,0) * 22px)) rgba(var(--holo-core-rgb),.50)) drop-shadow(0 0 38px rgba(var(--holo-core-deep-rgb),.24));
}
body.state-speaking .chat-panel::before{
  --manifest-scale:calc(1 + (var(--voice-level,0) * .0035));
  filter:saturate(calc(1.08 + (var(--voice-level,0) * .10))) contrast(1.07) brightness(calc(.98 + (var(--voice-level,0) * .075))) drop-shadow(0 0 calc(28px + (var(--voice-level,0) * 16px)) rgba(69,190,255,.30)) drop-shadow(0 0 96px rgba(36,112,255,.20));
}

@keyframes holoCoreIdle{0%,100%{transform:scale(.985)}50%{transform:scale(1.035);filter:brightness(1.06)}}
@keyframes holoCoreListen{0%,100%{filter:brightness(1)}50%{filter:brightness(1.14)}}
@keyframes holoCoreRingListen{0%,100%{transform:scale(.94);opacity:.42}50%{transform:scale(1.10);opacity:.76}}
@keyframes holoCoreThink{0%,100%{filter:brightness(1.02) saturate(1.05)}50%{filter:brightness(1.22) saturate(1.18)}}
@keyframes holoCoreOrbit{to{transform:rotate(360deg)}}
@keyframes holoCoreCross{0%,100%{opacity:.34;transform:scale(.84) rotate(0deg)}50%{opacity:.64;transform:scale(1.02) rotate(45deg)}}
@keyframes holoManifestIdle{0%,100%{transform:translate(-50%,-50%) scale(.90)}50%{transform:translate(-50%,-50%) scale(1.04);opacity:.22}}
@keyframes holoManifestThink{0%,100%{filter:blur(.4px) drop-shadow(0 0 14px rgba(var(--holo-core-rgb),.40))}50%{filter:blur(.1px) drop-shadow(0 0 26px rgba(var(--holo-core-rgb),.56))}}

/* Pe mobil manifestarea este centrată în partea de sus; ecoul urmează figura, nu desktopul. */
@media(max-width:980px){
  .chat-panel::after{left:50%;top:20%;width:58px}
}
@media(max-width:620px){
  .chat-panel::after{top:19%;width:50px}
  .bubble.ai .speaker-dot::after{inset:-7px}
}

/* Tastatura mută atenția pe conversație; identitatea rămâne prezentă fără decor inutil. */
@media(max-width:980px){
  body.keyboard-open .chat-panel::after{opacity:.05!important;top:8%}
}

@media(prefers-reduced-motion:reduce){
  .bubble.ai.holo-current .speaker-dot,
  .bubble.ai.holo-current .speaker-dot::before,
  .bubble.ai.holo-current .speaker-dot::after,
  .chat-panel::after{animation:none!important;transition:none!important}
  .chat-panel::before{transition:none!important;--manifest-scale:1!important}
}


/* ============================================================
   ETAPA 8.2 — PACHET DE MICRO-REACTII VIZUALE
   Reacții scurte, contextuale. Nu schimbă layoutul și nu rulează
   ca animații decorative continue. Nucleul inițiază; manifestarea
   și scena răspund discret.
   ============================================================ */

/* 1) Atenție: utilizatorul tocmai a trimis un mesaj. */
body.holo-react-attend .bubble.ai.holo-current .speaker-dot{
  animation:holoMicroAttendCore .72s cubic-bezier(.2,.78,.25,1) 1!important;
}
body.holo-react-attend .chat-panel::after{
  animation:holoMicroAttendManifest .72s ease-out 1!important;
}
body.holo-react-attend .halo-back{
  animation:holoMicroAttendHalo .72s ease-out 1!important;
}

/* 2) Focalizare: intrarea în ascultare. */
body.holo-react-focus .bubble.ai.holo-current .speaker-dot::before{
  animation:holoMicroFocusRing .62s ease-out 1!important;
}
body.holo-react-focus .energy-column{
  animation:holoMicroColumnFocus .78s ease-out 1!important;
}

/* 3) „Te-am auzit”: prima detecție reală de voce într-o tură live. */
body.holo-react-heard .bubble.ai.holo-current .speaker-dot{
  animation:holoMicroHeardCore .56s ease-out 1!important;
}
body.holo-react-heard .platform-pulse{
  animation:holoMicroPlatformAck .72s ease-out 1!important;
}
body.holo-react-heard .chat-panel::after{
  animation:holoMicroHeardManifest .62s ease-out 1!important;
}

/* 4) Intrarea în gândire: energia se adună, fără „loading spinner” teatral. */
body.holo-react-ponder .bubble.ai.holo-current .speaker-dot{
  animation:holoMicroPonderCore .82s ease-in-out 1!important;
}
body.holo-react-ponder .energy-orbit.orbit-two{
  animation:holoMicroOrbitGather .92s ease-in-out 1!important;
}
body.holo-react-ponder .halo-back{
  animation:holoMicroPonderHalo .9s ease-in-out 1!important;
}

/* 5) Debutul vocii: o aprindere scurtă înainte de reacția continuă audio. */
body.holo-react-speak-in .bubble.ai.holo-current .speaker-dot{
  animation:holoMicroSpeakCore .62s ease-out 1!important;
}
body.holo-react-speak-in .platform-pulse{
  animation:holoMicroSpeakPlatform .8s ease-out 1!important;
}
body.holo-react-speak-in .sweep{
  opacity:.30;
  animation:holoMicroSweep .88s cubic-bezier(.2,.72,.25,1) 1!important;
}

/* 6) Sosirea unui răspuns text: mesajul și prezența aparțin aceluiași Holo. */
body.holo-react-arrival .bubble.ai.holo-current{
  animation:holoMicroMessageArrival .72s ease-out 1;
}
body.holo-react-arrival .bubble.ai.holo-current .speaker-dot{
  animation:holoMicroArrivalCore .86s ease-out 1!important;
}
body.holo-react-arrival .chat-panel::after{
  animation:holoMicroArrivalManifest .9s ease-out 1!important;
}
body.holo-react-arrival .platform-pulse{
  animation:holoMicroArrivalPlatform .96s ease-out 1!important;
}

/* 7) Întrerupere: Holo cedează imediat spațiul utilizatorului. */
body.holo-react-interrupt .bubble.ai.holo-current .speaker-dot{
  animation:holoMicroInterruptCore .46s ease-out 1!important;
}
body.holo-react-interrupt .halo-back{
  animation:holoMicroInterruptHalo .52s ease-out 1!important;
}

/* 8) Revenire la calm după o stare activă. */
body.holo-react-settle .chat-panel::after{
  animation:holoMicroSettleManifest 1.05s ease-out 1!important;
}
body.holo-react-settle .halo-back{
  animation:holoMicroSettleHalo 1.12s ease-out 1!important;
}
body.holo-react-settle .platform-pulse{
  animation:holoMicroSettlePlatform 1.15s ease-out 1!important;
}

/* 9) Micro-semnal rar în idle: prezență, nu agitație. */
body.holo-react-glint.state-idle .bubble.ai.holo-current .speaker-dot::after{
  animation:holoMicroIdleGlintCore 1.05s ease-in-out 1!important;
}
body.holo-react-glint.state-idle .sweep{
  opacity:.22;
  animation:holoMicroIdleGlintSweep 1.18s ease-out 1!important;
}
body.holo-react-glint.state-idle .energy-arc.arc-right{
  animation:holoMicroIdleArc 1.2s ease-in-out 1!important;
}

@keyframes holoMicroAttendCore{0%{transform:scale(1)}32%{transform:scale(1.09);filter:brightness(1.18)}100%{transform:scale(1)}}
@keyframes holoMicroAttendManifest{0%{opacity:.15;transform:translate(-50%,-50%) scale(.92)}38%{opacity:.31;transform:translate(-50%,-50%) scale(1.10)}100%{opacity:.18;transform:translate(-50%,-50%) scale(.98)}}
@keyframes holoMicroAttendHalo{0%,100%{transform:scale(1)}42%{transform:scale(1.025);opacity:.88}}
@keyframes holoMicroFocusRing{0%{transform:scale(.82);opacity:.18}55%{transform:scale(1.16);opacity:.84}100%{transform:scale(1);opacity:.58}}
@keyframes holoMicroColumnFocus{0%{opacity:.42;filter:blur(1.2px)}46%{opacity:.82;filter:blur(.45px) drop-shadow(0 0 26px rgba(64,211,255,.62))}100%{opacity:.62}}
@keyframes holoMicroHeardCore{0%,100%{transform:scale(1)}28%{transform:scale(1.13);filter:brightness(1.28)}58%{transform:scale(1.035)}}
@keyframes holoMicroPlatformAck{0%{opacity:.74;transform:translateX(-50%) perspective(850px) rotateX(69deg) scale(.98)}48%{opacity:1;transform:translateX(-50%) perspective(850px) rotateX(69deg) scale(1.035);filter:drop-shadow(0 0 34px rgba(65,194,255,.68))}100%{opacity:.82;transform:translateX(-50%) perspective(850px) rotateX(69deg) scale(1)}}
@keyframes holoMicroHeardManifest{0%{opacity:.2}42%{opacity:.42;filter:drop-shadow(0 0 30px rgba(var(--holo-core-rgb),.58))}100%{opacity:.24}}
@keyframes holoMicroPonderCore{0%{transform:scale(1)}44%{transform:scale(.94);filter:brightness(1.23) saturate(1.16)}100%{transform:scale(1.02)}}
@keyframes holoMicroOrbitGather{0%{opacity:.58;transform:translate(-50%,-50%) rotate(18deg) scale(1)}52%{opacity:.92;transform:translate(-50%,-50%) rotate(29deg) scale(.955)}100%{opacity:.76;transform:translate(-50%,-50%) rotate(34deg) scale(1)}}
@keyframes holoMicroPonderHalo{0%,100%{filter:blur(20px)}48%{filter:blur(15px);opacity:.92;transform:scale(.98)}}
@keyframes holoMicroSpeakCore{0%{transform:scale(.94);filter:brightness(.96)}42%{transform:scale(1.15);filter:brightness(1.34)}100%{transform:scale(1)}}
@keyframes holoMicroSpeakPlatform{0%{opacity:.70}40%{opacity:1;filter:drop-shadow(0 0 40px rgba(65,194,255,.72))}100%{opacity:.84}}
@keyframes holoMicroSweep{0%{transform:translateY(-118%);opacity:0}22%{opacity:.34}100%{transform:translateY(112%);opacity:0}}
@keyframes holoMicroMessageArrival{0%{opacity:.58;transform:translateY(5px)}100%{opacity:1;transform:translateY(0)}}
@keyframes holoMicroArrivalCore{0%{transform:scale(.9);filter:brightness(.9)}35%{transform:scale(1.14);filter:brightness(1.30)}68%{transform:scale(1.03)}100%{transform:scale(1)}}
@keyframes holoMicroArrivalManifest{0%{opacity:.12;transform:translate(-50%,-50%) scale(.88)}42%{opacity:.42;transform:translate(-50%,-50%) scale(1.12)}100%{opacity:.18;transform:translate(-50%,-50%) scale(.98)}}
@keyframes holoMicroArrivalPlatform{0%{opacity:.72}46%{opacity:1;filter:drop-shadow(0 0 36px rgba(65,194,255,.68))}100%{opacity:.80}}
@keyframes holoMicroInterruptCore{0%{filter:brightness(1.30);transform:scale(1.08)}48%{filter:brightness(.92);transform:scale(.94)}100%{filter:brightness(1);transform:scale(1)}}
@keyframes holoMicroInterruptHalo{0%{opacity:.95;transform:scale(1.04)}100%{opacity:.66;transform:scale(.98)}}
@keyframes holoMicroSettleManifest{0%{opacity:.36;transform:translate(-50%,-50%) scale(1.08)}100%{opacity:.15;transform:translate(-50%,-50%) scale(.92)}}
@keyframes holoMicroSettleHalo{0%{opacity:.92;transform:scale(1.04)}100%{opacity:.72;transform:scale(1)}}
@keyframes holoMicroSettlePlatform{0%{opacity:1}100%{opacity:.78}}
@keyframes holoMicroIdleGlintCore{0%,100%{opacity:.50;transform:scale(.88) rotate(0)}45%{opacity:.78;transform:scale(1.04) rotate(45deg)}}
@keyframes holoMicroIdleGlintSweep{0%{transform:translateY(-115%);opacity:0}30%{opacity:.23}100%{transform:translateY(115%);opacity:0}}
@keyframes holoMicroIdleArc{0%,100%{opacity:.58;filter:blur(.3px)}50%{opacity:.82;filter:blur(.15px) drop-shadow(0 0 12px rgba(63,174,255,.50))}}

@media(prefers-reduced-motion:reduce){
  body[class*="holo-react-"] .bubble.ai.holo-current,
  body[class*="holo-react-"] .bubble.ai.holo-current .speaker-dot,
  body[class*="holo-react-"] .bubble.ai.holo-current .speaker-dot::before,
  body[class*="holo-react-"] .bubble.ai.holo-current .speaker-dot::after,
  body[class*="holo-react-"] .chat-panel::after,
  body[class*="holo-react-"] .halo-back,
  body[class*="holo-react-"] .platform-pulse,
  body[class*="holo-react-"] .energy-column,
  body[class*="holo-react-"] .energy-orbit,
  body[class*="holo-react-"] .energy-arc,
  body[class*="holo-react-"] .sweep{animation:none!important}
}

/* Etapa 8.2 — figura vizibilă este .chat-panel::before; micro-reacțiile ating direct manifestarea. */
body.holo-react-attend .chat-panel::before{animation:holoMicroFigureAttend .72s ease-out 1!important}
body.holo-react-focus .chat-panel::before{animation:holoMicroFigureFocus .78s ease-out 1!important}
body.holo-react-heard .chat-panel::before{animation:holoMicroFigureHeard .64s ease-out 1!important}
body.holo-react-ponder .chat-panel::before{animation:holoMicroFigurePonder .94s ease-in-out 1!important}
body.holo-react-speak-in .chat-panel::before{animation:holoMicroFigureSpeak .86s ease-out 1!important}
body.holo-react-arrival .chat-panel::before{animation:holoMicroFigureArrival .96s ease-out 1!important}
body.holo-react-interrupt .chat-panel::before{animation:holoMicroFigureInterrupt .56s ease-out 1!important}
body.holo-react-settle .chat-panel::before{animation:holoMicroFigureSettle 1.18s ease-out 1!important}
body.holo-react-glint.state-idle .chat-panel::before{animation:holoMicroFigureGlint 1.18s ease-in-out 1!important}

@keyframes holoMicroFigureAttend{
  0%,100%{transform:translateX(-50%) scale(1);filter:saturate(1.08) contrast(1.07) brightness(.98) drop-shadow(0 0 28px rgba(69,171,255,.22)) drop-shadow(0 0 90px rgba(36,112,255,.17))}
  42%{transform:translateX(-50%) scale(1.0025);filter:saturate(1.13) contrast(1.08) brightness(1.02) drop-shadow(0 0 36px rgba(75,196,255,.30)) drop-shadow(0 0 108px rgba(36,112,255,.22))}
}
@keyframes holoMicroFigureFocus{
  0%{filter:saturate(1.08) contrast(1.07) brightness(.98) drop-shadow(0 0 28px rgba(69,171,255,.22))}
  48%{filter:saturate(1.16) contrast(1.09) brightness(1.025) drop-shadow(0 0 40px rgba(83,205,255,.34)) drop-shadow(0 0 112px rgba(36,112,255,.23))}
  100%{filter:saturate(1.10) contrast(1.07) brightness(1) drop-shadow(0 0 31px rgba(69,190,255,.24)) drop-shadow(0 0 96px rgba(36,112,255,.18))}
}
@keyframes holoMicroFigureHeard{
  0%,100%{transform:translateX(-50%) scale(1)}
  34%{transform:translateX(-50%) scale(1.0035);filter:saturate(1.17) brightness(1.035) drop-shadow(0 0 42px rgba(89,211,255,.38)) drop-shadow(0 0 118px rgba(36,112,255,.24))}
}
@keyframes holoMicroFigurePonder{
  0%{transform:translateX(-50%) scale(1);filter:saturate(1.10) brightness(.99) drop-shadow(0 0 30px rgba(69,171,255,.23))}
  48%{transform:translateX(-50%) scale(.998);filter:saturate(1.18) contrast(1.10) brightness(1.025) drop-shadow(0 0 44px rgba(91,214,255,.34)) drop-shadow(0 0 120px rgba(43,119,255,.24))}
  100%{transform:translateX(-50%) scale(1.002);filter:saturate(1.15) contrast(1.08) brightness(1.015) drop-shadow(0 0 34px rgba(83,205,255,.28)) drop-shadow(0 0 105px rgba(50,118,255,.22))}
}
@keyframes holoMicroFigureSpeak{
  0%{transform:translateX(-50%) scale(.997);filter:saturate(1.08) brightness(.98) drop-shadow(0 0 28px rgba(69,171,255,.22))}
  40%{transform:translateX(-50%) scale(1.004);filter:saturate(1.20) contrast(1.09) brightness(1.045) drop-shadow(0 0 48px rgba(99,219,255,.40)) drop-shadow(0 0 125px rgba(45,121,255,.26))}
  100%{transform:translateX(-50%) scale(1);filter:saturate(1.10) contrast(1.07) brightness(1) drop-shadow(0 0 34px rgba(69,190,255,.28)) drop-shadow(0 0 96px rgba(36,112,255,.20))}
}
@keyframes holoMicroFigureArrival{
  0%{opacity:.88;transform:translateX(-50%) scale(.997);filter:saturate(1.06) brightness(.96) drop-shadow(0 0 24px rgba(69,171,255,.18))}
  40%{opacity:1;transform:translateX(-50%) scale(1.004);filter:saturate(1.18) brightness(1.04) drop-shadow(0 0 46px rgba(91,213,255,.38)) drop-shadow(0 0 122px rgba(40,116,255,.25))}
  100%{opacity:.97;transform:translateX(-50%) scale(1);filter:saturate(1.08) contrast(1.07) brightness(.98) drop-shadow(0 0 28px rgba(69,171,255,.22)) drop-shadow(0 0 90px rgba(36,112,255,.17))}
}
@keyframes holoMicroFigureInterrupt{
  0%{filter:saturate(1.18) brightness(1.04) drop-shadow(0 0 44px rgba(91,213,255,.36))}
  55%{filter:saturate(1.04) brightness(.95) drop-shadow(0 0 22px rgba(69,171,255,.16));transform:translateX(-50%) scale(.997)}
  100%{filter:saturate(1.10) brightness(.99) drop-shadow(0 0 30px rgba(69,190,255,.23));transform:translateX(-50%) scale(1)}
}
@keyframes holoMicroFigureSettle{
  0%{filter:saturate(1.17) brightness(1.035) drop-shadow(0 0 43px rgba(89,211,255,.34));transform:translateX(-50%) scale(1.003)}
  100%{filter:saturate(1.08) contrast(1.07) brightness(.98) drop-shadow(0 0 28px rgba(69,171,255,.22)) drop-shadow(0 0 90px rgba(36,112,255,.17));transform:translateX(-50%) scale(1)}
}
@keyframes holoMicroFigureGlint{
  0%,100%{filter:saturate(1.08) contrast(1.07) brightness(.98) drop-shadow(0 0 28px rgba(69,171,255,.22)) drop-shadow(0 0 90px rgba(36,112,255,.17))}
  50%{filter:saturate(1.12) contrast(1.075) brightness(1.012) drop-shadow(0 0 35px rgba(80,196,255,.28)) drop-shadow(0 0 102px rgba(36,112,255,.20))}
}

@media(prefers-reduced-motion:reduce){body[class*="holo-react-"] .chat-panel::before{animation:none!important}}

/* ========================================================================== 
   ETAPA 8.7 — HOLO: ORGANISM DE SENS
   Nucleul rămâne forma constantă. Câmpul viu organizează sensul, iar figura
   umanoidă devine o manifestare temporară, nu o imagine permanentă.
   ========================================================================== */
:root{
  --holo-figure-opacity:.30;
  --holo-organism-opacity:.82;
}
.holo-organism-canvas{
  position:absolute;
  inset:0;
  z-index:1;
  width:100%;
  height:100%;
  pointer-events:none;
  opacity:var(--holo-organism-opacity);
  mix-blend-mode:screen;
  filter:drop-shadow(0 0 12px rgba(72,178,255,.12));
  transition:opacity .9s ease;
}
.stage-inner{z-index:2}

/* Figura nu mai este „Holo permanent”. Nivelurile 0–3 definesc cât de mult
   se manifestă aceeași prezență. Opacity este important pentru a nu fi
   suprascrisă de micro-reacțiile 8.2. */
.chat-panel::before{
  opacity:var(--holo-figure-opacity,.97)!important;
  transition:opacity 1.45s ease,filter .72s ease,transform .72s ease,-webkit-mask-image .7s ease,mask-image .7s ease;
}
body.holo-manifest-0{
  --holo-figure-opacity:.055;
  --holo-organism-opacity:.72;
}
body.holo-manifest-1{
  --holo-figure-opacity:.27;
  --holo-organism-opacity:.86;
}
body.holo-manifest-2{
  --holo-figure-opacity:.59;
  --holo-organism-opacity:.94;
}
body.holo-manifest-3{
  --holo-figure-opacity:.95;
  --holo-organism-opacity:.98;
}

/* Apariția este neuniformă: la nivelurile joase se vede doar o urmă centrală
   a manifestării, ca și cum figura se formează din câmp. */
body.holo-manifest-0 .chat-panel::before{
  -webkit-mask-image:radial-gradient(ellipse 25% 38% at 50% 45%,#000 0 10%,rgba(0,0,0,.48) 34%,transparent 70%);
  mask-image:radial-gradient(ellipse 25% 38% at 50% 45%,#000 0 10%,rgba(0,0,0,.48) 34%,transparent 70%);
}
body.holo-manifest-1 .chat-panel::before{
  -webkit-mask-image:radial-gradient(ellipse 34% 54% at 50% 46%,#000 0 24%,rgba(0,0,0,.82) 44%,rgba(0,0,0,.18) 68%,transparent 82%);
  mask-image:radial-gradient(ellipse 34% 54% at 50% 46%,#000 0 24%,rgba(0,0,0,.82) 44%,rgba(0,0,0,.18) 68%,transparent 82%);
}
body.holo-manifest-2 .chat-panel::before{
  -webkit-mask-image:radial-gradient(ellipse 49% 74% at 50% 50%,#000 0 44%,rgba(0,0,0,.90) 61%,rgba(0,0,0,.24) 82%,transparent 94%);
  mask-image:radial-gradient(ellipse 49% 74% at 50% 50%,#000 0 44%,rgba(0,0,0,.90) 61%,rgba(0,0,0,.24) 82%,transparent 94%);
}
body.holo-manifest-3 .chat-panel::before{
  -webkit-mask-image:none;
  mask-image:none;
}

/* Ecoul energetic din 8.1 devine puntea dintre nucleu și organism. */
body.holo-manifest-0 .chat-panel::after{opacity:.10}
body.holo-manifest-1 .chat-panel::after{opacity:.22}
body.holo-manifest-2 .chat-panel::after{opacity:.38}
body.holo-manifest-3 .chat-panel::after{opacity:.52}

/* Energia veche rămâne atmosferă; organismul nou este stratul semantic activ. */
.space-energy{transition:opacity .8s ease}
body.holo-manifest-0 .space-energy{opacity:.44}
body.holo-manifest-1 .space-energy{opacity:.50}
body.holo-manifest-2 .space-energy{opacity:.58}
body.holo-manifest-3 .space-energy{opacity:.66}

/* Când tastatura ocupă scena, organismul se retrage fără să concureze cu textul. */
body.keyboard-open{--holo-organism-opacity:.18;--holo-figure-opacity:.05}

/* Fallback: dacă Canvas nu poate porni, păstrăm manifestarea clasică lizibilă. */
body.holo-organism-unavailable .chat-panel::before{
  opacity:.88!important;
  -webkit-mask-image:none!important;
  mask-image:none!important;
}

@media(max-width:980px){
  body.holo-manifest-0{--holo-figure-opacity:.06;--holo-organism-opacity:.62}
  body.holo-manifest-1{--holo-figure-opacity:.24;--holo-organism-opacity:.78}
  body.holo-manifest-2{--holo-figure-opacity:.52;--holo-organism-opacity:.88}
  body.holo-manifest-3{--holo-figure-opacity:.86;--holo-organism-opacity:.94}
  .holo-organism-canvas{filter:drop-shadow(0 0 9px rgba(72,178,255,.10))}
}
@media(max-width:620px){
  body.holo-manifest-0{--holo-organism-opacity:.54}
  body.holo-manifest-1{--holo-organism-opacity:.70}
  body.holo-manifest-2{--holo-organism-opacity:.80}
  body.holo-manifest-3{--holo-organism-opacity:.88}
}
@media(prefers-reduced-motion:reduce){
  .holo-organism-canvas,.chat-panel::before{transition:none!important}
  body.holo-manifest-0,body.holo-manifest-1,body.holo-manifest-2,body.holo-manifest-3{
    --holo-figure-opacity:.42;
    --holo-organism-opacity:.48;
  }
  body[class*="holo-manifest-"] .chat-panel::before{
    -webkit-mask-image:none!important;
    mask-image:none!important;
  }
}

/* ========================================================================== 
   ETAPA 8.7.1 — MANIFESTARE MAI PROFUNDĂ
   În repaus: mai mult organism, mult mai puțină figură. În activitate:
   manifestarea se reconstruiește progresiv și devine completă la vorbire.
   ========================================================================== */
:root{
  --holo-figure-opacity:.11;
  --holo-organism-opacity:.96;
}
body.holo-manifest-0{
  --holo-figure-opacity:.012;
  --holo-organism-opacity:1;
}
body.holo-manifest-1{
  --holo-figure-opacity:.105;
  --holo-organism-opacity:.98;
}
body.holo-manifest-2{
  --holo-figure-opacity:.47;
  --holo-organism-opacity:.94;
}
body.holo-manifest-3{
  --holo-figure-opacity:.97;
  --holo-organism-opacity:.84;
}

/* Nivelul 0 nu mai lasă impresia unei persoane transparente care stă în
   fundal. Rămâne doar o urmă centrală, aproape absorbită de câmp. */
body.holo-manifest-0 .chat-panel::before{
  -webkit-mask-image:radial-gradient(ellipse 18% 29% at 50% 44%,#000 0 5%,rgba(0,0,0,.24) 20%,rgba(0,0,0,.05) 38%,transparent 58%);
  mask-image:radial-gradient(ellipse 18% 29% at 50% 44%,#000 0 5%,rgba(0,0,0,.24) 20%,rgba(0,0,0,.05) 38%,transparent 58%);
  filter:saturate(.76) contrast(1.02) brightness(.80) blur(.85px) drop-shadow(0 0 18px rgba(69,171,255,.10))!important;
}
body.state-idle.holo-manifest-1 .chat-panel::before{
  -webkit-mask-image:radial-gradient(ellipse 27% 45% at 50% 46%,#000 0 13%,rgba(0,0,0,.58) 30%,rgba(0,0,0,.10) 55%,transparent 73%);
  mask-image:radial-gradient(ellipse 27% 45% at 50% 46%,#000 0 13%,rgba(0,0,0,.58) 30%,rgba(0,0,0,.10) 55%,transparent 73%);
  filter:saturate(.90) contrast(1.04) brightness(.90) blur(.38px) drop-shadow(0 0 24px rgba(69,171,255,.15))!important;
}
body.holo-manifest-2 .chat-panel::before{
  -webkit-mask-image:radial-gradient(ellipse 47% 74% at 50% 50%,#000 0 40%,rgba(0,0,0,.88) 59%,rgba(0,0,0,.18) 80%,transparent 94%);
  mask-image:radial-gradient(ellipse 47% 74% at 50% 50%,#000 0 40%,rgba(0,0,0,.88) 59%,rgba(0,0,0,.18) 80%,transparent 94%);
}
body.holo-manifest-3 .chat-panel::before{
  -webkit-mask-image:none;
  mask-image:none;
}

/* Când figura se retrage, energia nu se stinge — se mută în nucleu/câmp. */
body.holo-manifest-0 .chat-panel::after{opacity:.21}
body.holo-manifest-1 .chat-panel::after{opacity:.28}
body.holo-manifest-2 .chat-panel::after{opacity:.40}
body.holo-manifest-3 .chat-panel::after{opacity:.50}
body.holo-manifest-0 .space-energy{opacity:.58}
body.holo-manifest-1 .space-energy{opacity:.60}
body.holo-manifest-2 .space-energy{opacity:.59}
body.holo-manifest-3 .space-energy{opacity:.64}
body.holo-manifest-0 .holo-organism-canvas,
body.holo-manifest-1 .holo-organism-canvas{
  filter:drop-shadow(0 0 15px rgba(72,178,255,.18));
}

@media(max-width:980px){
  body.holo-manifest-0{--holo-figure-opacity:.01;--holo-organism-opacity:.92}
  body.holo-manifest-1{--holo-figure-opacity:.11;--holo-organism-opacity:.95}
  body.holo-manifest-2{--holo-figure-opacity:.44;--holo-organism-opacity:.88}
  body.holo-manifest-3{--holo-figure-opacity:.91;--holo-organism-opacity:.80}
}
@media(max-width:620px){
  body.holo-manifest-0{--holo-organism-opacity:.88}
  body.holo-manifest-1{--holo-organism-opacity:.92}
  body.holo-manifest-2{--holo-organism-opacity:.84}
  body.holo-manifest-3{--holo-organism-opacity:.77}
}
@media(prefers-reduced-motion:reduce){
  body.holo-manifest-0,body.holo-manifest-1,body.holo-manifest-2,body.holo-manifest-3{
    --holo-figure-opacity:.38;
    --holo-organism-opacity:.50;
  }
  body[class*="holo-manifest-"] .chat-panel::before{filter:none!important}
}

/* ========================================================================== 
   ETAPA 8.9 — PREZENȚĂ AMBIENTALĂ
   Holo nu mai este centrat vizual pe figura umanoidă. Câmpul conversației
   poartă stările, iar figura rămâne o manifestare rară, în special vocală.
   ========================================================================== */
body[data-holo-evolution="ambient-presence"]{
  --holo-figure-opacity:0;
  --holo-organism-opacity:.78;
}

/* Mai puțină presiune vizuală: fundalul rămâne recognoscibil, dar nu concurează
   cu sensul conversației. */
body[data-holo-evolution="ambient-presence"] .space-energy{opacity:.58}
body[data-holo-evolution="ambient-presence"] .cosmic-dust{opacity:.27}
body[data-holo-evolution="ambient-presence"] .energy-column{opacity:.24;filter:blur(1.4px) drop-shadow(0 0 18px rgba(64,177,255,.28))}
body[data-holo-evolution="ambient-presence"] .energy-orbit{opacity:.24;border-color:rgba(77,177,255,.18)}
body[data-holo-evolution="ambient-presence"] .orbit-two{opacity:.18}
body[data-holo-evolution="ambient-presence"] .orbit-three{opacity:.11}
body[data-holo-evolution="ambient-presence"] .energy-arc{opacity:.20}
body[data-holo-evolution="ambient-presence"] .platform-pulse{opacity:.42;filter:drop-shadow(0 0 14px rgba(65,194,255,.28))}

/* Figura există în assets, dar nu mai este identitatea permanentă. Nivelurile
   0–2 sunt practic ambientale; nivelul 3 este o apariție vocală/contextuală. */
body[data-holo-evolution="ambient-presence"].holo-manifest-0,
body[data-holo-evolution="ambient-presence"].holo-manifest-1{
  --holo-figure-opacity:0;
  --holo-organism-opacity:.80;
}
body[data-holo-evolution="ambient-presence"].holo-manifest-2{
  --holo-figure-opacity:.10;
  --holo-organism-opacity:.84;
}
body[data-holo-evolution="ambient-presence"].holo-manifest-3{
  --holo-figure-opacity:.62;
  --holo-organism-opacity:.72;
}
body[data-holo-evolution="ambient-presence"].holo-manifest-0 .chat-panel::before,
body[data-holo-evolution="ambient-presence"].holo-manifest-1 .chat-panel::before{
  -webkit-mask-image:none!important;
  mask-image:none!important;
  filter:none!important;
}
body[data-holo-evolution="ambient-presence"].holo-manifest-2 .chat-panel::before{
  -webkit-mask-image:radial-gradient(ellipse 38% 58% at 50% 47%,#000 0 22%,rgba(0,0,0,.50) 45%,transparent 78%)!important;
  mask-image:radial-gradient(ellipse 38% 58% at 50% 47%,#000 0 22%,rgba(0,0,0,.50) 45%,transparent 78%)!important;
  filter:saturate(.92) brightness(.88) blur(.35px) drop-shadow(0 0 20px rgba(69,171,255,.14))!important;
}
body[data-holo-evolution="ambient-presence"].holo-manifest-3 .chat-panel::before{
  -webkit-mask-image:linear-gradient(180deg,rgba(0,0,0,.94) 0 62%,rgba(0,0,0,.56) 79%,transparent 98%)!important;
  mask-image:linear-gradient(180deg,rgba(0,0,0,.94) 0 62%,rgba(0,0,0,.56) 79%,transparent 98%)!important;
  filter:saturate(1.02) contrast(1.04) brightness(.94) drop-shadow(0 0 25px rgba(69,171,255,.19))!important;
}

/* Conversația este primul plan: un văl aproape imperceptibil o separă de
   decor fără a reveni la o cutie opacă. */
body[data-holo-evolution="ambient-presence"] .msgs{
  width:min(47vw,710px);
  padding-top:48px;
  gap:26px;
  border-radius:0 24px 24px 0;
  background:linear-gradient(90deg,rgba(2,10,27,.42) 0%,rgba(3,14,33,.24) 72%,rgba(3,14,33,.05) 100%);
  box-shadow:inset -1px 0 0 rgba(104,185,255,.055),inset 0 1px 0 rgba(125,195,255,.025);
  -webkit-backdrop-filter:blur(3px);
  backdrop-filter:blur(3px);
}
body[data-holo-evolution="ambient-presence"] .message-content{
  max-width:680px;
  text-shadow:0 1px 18px rgba(0,8,26,.44);
}
body[data-holo-evolution="ambient-presence"] .bubble{max-width:680px}

/* Stările nu mai au nevoie de slogan permanent: sensul lor este vizibil în
   câmp, iar textul rămâne scurt și inteligibil. */
body[data-holo-evolution="ambient-presence"] .status-line{
  opacity:.72;
  letter-spacing:.16em;
}

/* Instrumentele păstrează iconurile curate, dar nu mai cer ghicit. */
@media(hover:hover) and (pointer:fine){
  body[data-holo-evolution="ambient-presence"] .controls .ctrl{position:relative}
  body[data-holo-evolution="ambient-presence"] .controls .ctrl::after{
    content:attr(aria-label);
    position:absolute;
    left:50%;
    bottom:calc(100% + 9px);
    z-index:50;
    transform:translate(-50%,4px);
    width:max-content;
    max-width:210px;
    padding:6px 9px;
    border:1px solid rgba(108,187,255,.18);
    border-radius:9px;
    background:rgba(2,11,28,.94);
    color:rgba(227,242,255,.92);
    box-shadow:0 8px 28px rgba(0,0,0,.28);
    font-family:Inter,system-ui,sans-serif;
    font-size:11px;
    letter-spacing:0;
    line-height:1.2;
    opacity:0;
    pointer-events:none;
    white-space:nowrap;
    transition:opacity .15s ease,transform .15s ease;
  }
  body[data-holo-evolution="ambient-presence"] .controls .ctrl:hover::after,
  body[data-holo-evolution="ambient-presence"] .controls .ctrl:focus-visible::after{
    opacity:1;
    transform:translate(-50%,0);
  }
}

/* Reacțiile de stare mută energia către conversație, nu către o siluetă. */
body[data-holo-evolution="ambient-presence"].state-listening .space-energy{opacity:.52}
body[data-holo-evolution="ambient-presence"].state-thinking .space-energy{opacity:.56}
body[data-holo-evolution="ambient-presence"].state-speaking .space-energy{opacity:.62}
body[data-holo-evolution="ambient-presence"].state-listening .platform-pulse{opacity:.34}
body[data-holo-evolution="ambient-presence"].state-thinking .energy-orbit{opacity:.28}
body[data-holo-evolution="ambient-presence"].state-speaking .platform-pulse{opacity:calc(.40 + (var(--voice-level,0) * .18))}

@media(max-width:980px){
  body[data-holo-evolution="ambient-presence"] .space-energy{opacity:.44}
  body[data-holo-evolution="ambient-presence"] .energy-column{opacity:.18}
  body[data-holo-evolution="ambient-presence"] .energy-arc{opacity:.10}
  body[data-holo-evolution="ambient-presence"] .msgs{
    width:100%;
    border-radius:0;
    background:linear-gradient(180deg,rgba(2,10,27,.38),rgba(3,14,33,.20) 72%,rgba(3,14,33,.04));
    -webkit-backdrop-filter:blur(2px);
    backdrop-filter:blur(2px);
  }
  body[data-holo-evolution="ambient-presence"].holo-manifest-3{--holo-figure-opacity:.48;--holo-organism-opacity:.68}
}
@media(max-width:620px){
  body[data-holo-evolution="ambient-presence"] .cosmic-dust{opacity:.20}
  body[data-holo-evolution="ambient-presence"] .energy-orbit{opacity:.13}
  body[data-holo-evolution="ambient-presence"] .orbit-two{opacity:.10}
  body[data-holo-evolution="ambient-presence"] .platform-pulse{opacity:.29}
  body[data-holo-evolution="ambient-presence"].holo-manifest-3{--holo-figure-opacity:.40;--holo-organism-opacity:.64}
  body[data-holo-evolution="ambient-presence"] .msgs{gap:22px}
}
@media(prefers-reduced-motion:reduce){
  body[data-holo-evolution="ambient-presence"].holo-manifest-0,
  body[data-holo-evolution="ambient-presence"].holo-manifest-1,
  body[data-holo-evolution="ambient-presence"].holo-manifest-2{--holo-figure-opacity:0!important;--holo-organism-opacity:.42!important}
  body[data-holo-evolution="ambient-presence"].holo-manifest-3{--holo-figure-opacity:.24!important;--holo-organism-opacity:.42!important}
}

/* ==========================================================================
   ETAPA 8.9.1 — POLISH AMBIENTAL + CONVERSAȚIA ÎN PRIM-PLAN
   Versiune normalizată: repară și secvențele de newline scăpate ca text.
   ========================================================================== */
body[data-holo-evolution="ambient-presence"] .space-energy{opacity:.51}
body[data-holo-evolution="ambient-presence"] .cosmic-dust{opacity:.23}
body[data-holo-evolution="ambient-presence"] .energy-column{opacity:.18;filter:blur(1.7px) drop-shadow(0 0 15px rgba(64,177,255,.22))}
body[data-holo-evolution="ambient-presence"] .energy-orbit{opacity:.19;border-color:rgba(77,177,255,.145)}
body[data-holo-evolution="ambient-presence"] .orbit-two{opacity:.14}
body[data-holo-evolution="ambient-presence"] .orbit-three{opacity:.085}
body[data-holo-evolution="ambient-presence"] .energy-arc{opacity:.15}
body[data-holo-evolution="ambient-presence"] .platform-pulse{opacity:.32;filter:drop-shadow(0 0 11px rgba(65,194,255,.22))}
body[data-holo-evolution="ambient-presence"] .msgs{
  background:linear-gradient(90deg,rgba(1,8,23,.56) 0%,rgba(2,12,30,.34) 68%,rgba(3,14,33,.07) 100%);
  box-shadow:inset -1px 0 0 rgba(104,185,255,.045),inset 0 1px 0 rgba(125,195,255,.02);
  -webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)
}
body[data-holo-evolution="ambient-presence"] .input-row{
  background:linear-gradient(180deg,rgba(2,11,29,.68),rgba(1,8,23,.56));
  border-color:rgba(93,173,255,.38);
  -webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);
  box-shadow:0 10px 38px rgba(0,6,22,.24),0 0 22px rgba(19,91,205,.055),inset 0 1px 0 rgba(255,255,255,.035)
}
body[data-holo-evolution="ambient-presence"] .input-row:focus-within{
  border-color:rgba(104,193,255,.62);
  box-shadow:0 0 0 3px rgba(76,169,255,.065),0 12px 42px rgba(0,6,22,.30),0 0 30px rgba(27,114,224,.12),inset 0 1px 0 rgba(255,255,255,.04)
}
body[data-holo-evolution="ambient-presence"] #clearBtn{display:none!important}
body[data-holo-evolution="ambient-presence"] .controls{gap:7px}
body[data-holo-evolution="ambient-presence"].state-listening .platform-pulse{opacity:.25}
body[data-holo-evolution="ambient-presence"].state-thinking .energy-orbit{opacity:.22}
body[data-holo-evolution="ambient-presence"].state-speaking .platform-pulse{opacity:calc(.30 + (var(--voice-level,0) * .14))}

/* ==========================================================================
   ETAPA 8.9.2 — CALMAREA DECORULUI + PRIORITIZAREA CONVERSAȚIEI
   Decorul se retrage în utilizare reală, iar textul/composerul devin planul 1.
   ========================================================================== */
body[data-holo-evolution="ambient-presence"]{
  --ambient-base-opacity:.43;
}
body[data-holo-evolution="ambient-presence"] .space-energy{opacity:var(--ambient-base-opacity)}
body[data-holo-evolution="ambient-presence"] .cosmic-dust{opacity:.18}
body[data-holo-evolution="ambient-presence"] .energy-column{opacity:.125;filter:blur(2px) drop-shadow(0 0 12px rgba(64,177,255,.16))}
body[data-holo-evolution="ambient-presence"] .energy-orbit{opacity:.145;border-color:rgba(77,177,255,.105)}
body[data-holo-evolution="ambient-presence"] .orbit-two{opacity:.095}
body[data-holo-evolution="ambient-presence"] .orbit-three{opacity:.05}
body[data-holo-evolution="ambient-presence"] .energy-arc{opacity:.09}
body[data-holo-evolution="ambient-presence"] .platform-pulse{opacity:.215;filter:drop-shadow(0 0 8px rgba(65,194,255,.15))}

/* Conversația câștigă ~10–15% spațiu util pe desktop. */
@media(min-width:981px){
  body[data-holo-evolution="ambient-presence"] .msgs{width:min(53vw,790px);padding-left:clamp(58px,8vw,132px)}
  body[data-holo-evolution="ambient-presence"] .conversation-bar{width:min(53vw,790px);margin-left:clamp(58px,8vw,132px)}
  body[data-holo-evolution="ambient-presence"] .chat-footer{width:min(53vw,790px);margin-left:clamp(58px,8vw,132px)}
  body[data-holo-evolution="ambient-presence"] .message-content,
  body[data-holo-evolution="ambient-presence"] .bubble{max-width:750px}
}

body[data-holo-evolution="ambient-presence"] .msgs{
  background:linear-gradient(90deg,rgba(1,7,20,.69) 0%,rgba(2,11,28,.48) 70%,rgba(3,14,33,.09) 100%);
  box-shadow:inset -1px 0 0 rgba(104,185,255,.052),inset 0 1px 0 rgba(125,195,255,.026);
  -webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)
}
body[data-holo-evolution="ambient-presence"] .message-content{line-height:1.64;text-shadow:0 1px 16px rgba(0,6,22,.54)}

/* Composerul este un control, nu o extensie a decorului. */
body[data-holo-evolution="ambient-presence"] .input-row{
  background:linear-gradient(180deg,rgba(1,8,23,.86),rgba(1,7,19,.78));
  border-color:rgba(101,182,255,.46);
  -webkit-backdrop-filter:blur(24px);backdrop-filter:blur(24px);
  box-shadow:0 12px 42px rgba(0,4,18,.34),0 0 18px rgba(19,91,205,.045),inset 0 1px 0 rgba(255,255,255,.045)
}
body[data-holo-evolution="ambient-presence"] .input-row textarea::placeholder{color:rgba(204,224,248,.62)}
body[data-holo-evolution="ambient-presence"].composer-focus .input-row{
  border-color:rgba(112,202,255,.68);
  box-shadow:0 0 0 3px rgba(76,169,255,.06),0 12px 45px rgba(0,4,18,.38),0 0 24px rgba(39,132,231,.10),inset 0 1px 0 rgba(255,255,255,.055)
}
body[data-holo-evolution="ambient-presence"].composer-focus .space-energy{opacity:.34}
body[data-holo-evolution="ambient-presence"].composer-focus .energy-column{opacity:.085}
body[data-holo-evolution="ambient-presence"].composer-focus .platform-pulse{opacity:.16}

/* Controale: microfonul este acțiunea vocală principală; celelalte rămân
   disponibile și etichetate, dar nu concurează vizual cu el. */
@media(min-width:981px){
  body[data-holo-evolution="ambient-presence"] .controls #voiceToggle,
  body[data-holo-evolution="ambient-presence"] .controls #liveVoiceBtn{width:38px;min-width:38px;height:38px;border-radius:13px;opacity:.62}
  body[data-holo-evolution="ambient-presence"] .controls #micBtn{width:44px;min-width:44px;height:44px;border-color:rgba(104,190,255,.34);background:rgba(5,22,47,.50);box-shadow:0 0 18px rgba(33,111,207,.07)}
  body[data-holo-evolution="ambient-presence"] .controls #voiceToggle:hover,
  body[data-holo-evolution="ambient-presence"] .controls #liveVoiceBtn:hover,
  body[data-holo-evolution="ambient-presence"] .controls #voiceToggle:focus-visible,
  body[data-holo-evolution="ambient-presence"] .controls #liveVoiceBtn:focus-visible,
  body[data-holo-evolution="ambient-presence"] .controls #voiceToggle.on,
  body[data-holo-evolution="ambient-presence"] .controls #liveVoiceBtn.on{opacity:1}
}

/* Microtext lizibil, fără să devină titlu. */
body[data-holo-evolution="ambient-presence"] .conversation-label{font-size:8.5px;color:rgba(143,207,255,.70)}
body[data-holo-evolution="ambient-presence"] .meta{font-size:9.5px;color:rgba(154,196,239,.62)}
body[data-holo-evolution="ambient-presence"] .message-time{color:rgba(188,211,240,.58)}
body[data-holo-evolution="ambient-presence"] .status-line{opacity:.84;color:rgba(108,195,255,.82)}
body[data-holo-evolution="ambient-presence"] .ai-disclosure{font-size:9.5px;color:rgba(190,211,238,.64)}
body[data-holo-evolution="ambient-presence"] .brand-sub{color:rgba(101,194,255,.80)}
body[data-holo-evolution="ambient-presence"] .legal-footer{color:rgba(181,207,237,.56)}
body[data-holo-evolution="ambient-presence"] .legal-footer a,
body[data-holo-evolution="ambient-presence"] .legal-footer button{color:rgba(192,218,247,.70)}

/* În fire lungi, scena se retrage suplimentar. Clasa este calculată din
   numărul de mesaje + înălțimea reală a conversației, nu dintr-un timer. */
body[data-holo-evolution="ambient-presence"].conversation-dense{
  --ambient-base-opacity:.31;
  --holo-organism-opacity:.55;
}
body[data-holo-evolution="ambient-presence"].conversation-dense .cosmic-dust{opacity:.12}
body[data-holo-evolution="ambient-presence"].conversation-dense .energy-column{opacity:.07}
body[data-holo-evolution="ambient-presence"].conversation-dense .energy-orbit{opacity:.085}
body[data-holo-evolution="ambient-presence"].conversation-dense .orbit-two{opacity:.05}
body[data-holo-evolution="ambient-presence"].conversation-dense .orbit-three{opacity:.025}
body[data-holo-evolution="ambient-presence"].conversation-dense .platform-pulse{opacity:.12}
body[data-holo-evolution="ambient-presence"].conversation-dense .msgs{background:linear-gradient(90deg,rgba(1,7,20,.76),rgba(2,11,28,.55) 74%,rgba(3,14,33,.12))}

/* Indiciu discret că utilizatorul este în mijlocul conversației, fără banner. */
body[data-holo-evolution="ambient-presence"].conversation-scrolled .msgs{
  box-shadow:inset 0 18px 20px -22px rgba(108,198,255,.32),inset -1px 0 0 rgba(104,185,255,.052)
}

/* Stările accentuează local organismul; decorul global rămâne calm. */
body[data-holo-evolution="ambient-presence"].state-listening .space-energy{opacity:calc(var(--ambient-base-opacity) + .025)}
body[data-holo-evolution="ambient-presence"].state-thinking .space-energy{opacity:calc(var(--ambient-base-opacity) + .04)}
body[data-holo-evolution="ambient-presence"].state-speaking .space-energy{opacity:calc(var(--ambient-base-opacity) + .055)}
body[data-holo-evolution="ambient-presence"].state-listening .platform-pulse{opacity:.145}
body[data-holo-evolution="ambient-presence"].state-thinking .energy-orbit{opacity:.12}
body[data-holo-evolution="ambient-presence"].state-speaking .platform-pulse{opacity:calc(.15 + (var(--voice-level,0) * .09))}

@media(max-width:980px){
  body[data-holo-evolution="ambient-presence"]{--ambient-base-opacity:.34}
  body[data-holo-evolution="ambient-presence"] .energy-column{opacity:.09}
  body[data-holo-evolution="ambient-presence"] .msgs{
    background:linear-gradient(180deg,rgba(1,8,23,.58),rgba(2,12,30,.39) 70%,rgba(3,14,33,.07));
    -webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)
  }
  body[data-holo-evolution="ambient-presence"] .input-row{background:linear-gradient(180deg,rgba(1,8,23,.90),rgba(1,7,19,.84))}
  body[data-holo-evolution="ambient-presence"] .ai-disclosure{font-size:8.5px}
  body[data-holo-evolution="ambient-presence"].conversation-dense{--ambient-base-opacity:.27;--holo-organism-opacity:.50}
}
@media(max-width:620px){
  body[data-holo-evolution="ambient-presence"] .platform-pulse{opacity:.14}
  body[data-holo-evolution="ambient-presence"] .energy-orbit{opacity:.07}
  body[data-holo-evolution="ambient-presence"] .orbit-two{opacity:.04}
  body[data-holo-evolution="ambient-presence"] .meta{font-size:8.5px}
  body[data-holo-evolution="ambient-presence"] .message-time{font-size:8.5px}
}
@media(prefers-reduced-motion:reduce){
  body[data-holo-evolution="ambient-presence"] .space-energy,
  body[data-holo-evolution="ambient-presence"] .holo-organism-canvas{transition:none!important}
}

/* ==========================================================================
   ETAPA 8.9.3 — ULTIMUL MICRO-POLISH VIZUAL
   Reglaje finale: baza luminoasă mai calmă, controale audio grupate clar,
   microtext juridic suficient de lizibil. Fără schimbări structurale.
   ========================================================================== */
body[data-holo-evolution="ambient-presence"] .platform-pulse{
  opacity:.185;
  filter:drop-shadow(0 0 7px rgba(65,194,255,.13));
}
body[data-holo-evolution="ambient-presence"] .energy-column{
  opacity:.115;
}
body[data-holo-evolution="ambient-presence"].composer-focus .platform-pulse{opacity:.14}
body[data-holo-evolution="ambient-presence"].state-listening .platform-pulse{opacity:.125}
body[data-holo-evolution="ambient-presence"].state-speaking .platform-pulse{opacity:calc(.13 + (var(--voice-level,0) * .08))}

/* Controalele audio se citesc ca un singur grup funcțional, nu ca elemente
   suspendate între scenă și composer. */
body[data-holo-evolution="ambient-presence"] .controls{
  padding:4px 5px;
  border:1px solid rgba(95,166,242,.14);
  border-radius:18px;
  background:rgba(1,9,25,.64);
  -webkit-backdrop-filter:blur(16px);
  backdrop-filter:blur(16px);
  box-shadow:0 8px 24px rgba(0,5,18,.18),inset 0 1px 0 rgba(255,255,255,.025);
}
body[data-holo-evolution="ambient-presence"] .controls .ctrl{
  background:rgba(5,20,43,.34);
}
body[data-holo-evolution="ambient-presence"] .controls #micBtn{
  background:rgba(7,28,58,.62);
  border-color:rgba(110,198,255,.39);
}

/* Rafinamentul nu trebuie să ascundă informația juridică. */
body[data-holo-evolution="ambient-presence"] .ai-disclosure{
  color:rgba(203,220,243,.72);
}
body[data-holo-evolution="ambient-presence"] .ai-disclosure a{
  color:rgba(151,215,255,.90);
}
body[data-holo-evolution="ambient-presence"] .legal-footer{
  color:rgba(194,215,240,.68);
}
body[data-holo-evolution="ambient-presence"] .legal-footer a,
body[data-holo-evolution="ambient-presence"] .legal-footer button{
  color:rgba(205,226,249,.82);
}

@media(max-width:980px){
  body[data-holo-evolution="ambient-presence"] .controls{padding:3px 4px;border-radius:16px;background:rgba(1,9,25,.70)}
  body[data-holo-evolution="ambient-presence"] .platform-pulse{opacity:.12}
  body[data-holo-evolution="ambient-presence"] .ai-disclosure{color:rgba(203,220,243,.69)}
}


/* ========================================================================== 
   ETAPA 8.10 — HOLO HERO PRESENCE
   Holo revine ca magnet vizual imediat la intrare, apoi se retrage în
   prezența ambientală 8.9.x. Figura nu devine din nou fundal permanent.
   ========================================================================== */
body[data-holo-evolution="ambient-presence"].holo-hero-arrival{
  --holo-figure-opacity:.94;
  --holo-organism-opacity:.82;
}
body[data-holo-evolution="ambient-presence"].holo-hero-arrival .chat-panel::before{
  opacity:.94!important;
  -webkit-mask-image:linear-gradient(180deg,#000 0 68%,rgba(0,0,0,.92) 78%,rgba(0,0,0,.34) 91%,transparent 100%)!important;
  mask-image:linear-gradient(180deg,#000 0 68%,rgba(0,0,0,.92) 78%,rgba(0,0,0,.34) 91%,transparent 100%)!important;
  filter:saturate(1.10) contrast(1.06) brightness(.99)
    drop-shadow(0 0 32px rgba(72,190,255,.26))
    drop-shadow(0 0 104px rgba(39,116,255,.20))!important;
  transform:translateX(-50%) translateY(0) scale(1)!important;
  animation:holoHeroArrival 5.8s cubic-bezier(.22,.74,.23,1) both!important;
  will-change:opacity,filter,transform;
}
body[data-holo-evolution="ambient-presence"].holo-hero-arrival .holo-organism-canvas{
  opacity:.82!important;
  animation:holoHeroField 5.8s ease-in-out both;
}
body[data-holo-evolution="ambient-presence"].holo-hero-arrival .energy-column{
  animation:holoHeroColumn 5.8s ease-in-out both!important;
}
body[data-holo-evolution="ambient-presence"].holo-hero-arrival .platform-pulse{
  animation:holoHeroPlatform 5.8s ease-in-out both!important;
}
body[data-holo-evolution="ambient-presence"].holo-hero-settling .chat-panel::before{
  transition:opacity 1.05s ease,filter 1.05s ease!important;
}

@keyframes holoHeroArrival{
  0%{opacity:0;transform:translateX(-50%) translateY(18px) scale(.975);filter:saturate(.80) brightness(.72) blur(2.2px) drop-shadow(0 0 8px rgba(70,174,255,.08))}
  11%{opacity:.14;transform:translateX(-50%) translateY(12px) scale(.982);filter:saturate(.92) brightness(.84) blur(1.35px) drop-shadow(0 0 18px rgba(70,184,255,.14))}
  28%{opacity:.70;transform:translateX(-50%) translateY(3px) scale(.995);filter:saturate(1.06) brightness(.96) blur(.38px) drop-shadow(0 0 30px rgba(77,198,255,.24)) drop-shadow(0 0 86px rgba(37,114,255,.16))}
  42%,66%{opacity:.94;transform:translateX(-50%) translateY(0) scale(1);filter:saturate(1.10) contrast(1.06) brightness(.99) blur(0) drop-shadow(0 0 35px rgba(84,206,255,.29)) drop-shadow(0 0 112px rgba(38,117,255,.22))}
  82%{opacity:.70;transform:translateX(-50%) translateY(1px) scale(.998);filter:saturate(1.04) brightness(.94) blur(.2px) drop-shadow(0 0 28px rgba(75,190,255,.21))}
  100%{opacity:.12;transform:translateX(-50%) translateY(4px) scale(.994);filter:saturate(.92) brightness(.86) blur(.7px) drop-shadow(0 0 15px rgba(70,174,255,.11))}
}
@keyframes holoHeroColumn{
  0%{opacity:.10;filter:blur(2.4px) drop-shadow(0 0 8px rgba(64,177,255,.10))}
  23%{opacity:.25;filter:blur(1.6px) drop-shadow(0 0 18px rgba(64,190,255,.22))}
  42%,66%{opacity:.30;filter:blur(1.35px) drop-shadow(0 0 24px rgba(68,196,255,.28))}
  100%{opacity:.13;filter:blur(2px) drop-shadow(0 0 12px rgba(64,177,255,.14))}
}
@keyframes holoHeroPlatform{
  0%{opacity:.12;transform:translate(-50%,-50%) scale(.88)}
  30%{opacity:.28;transform:translate(-50%,-50%) scale(1.02)}
  45%,67%{opacity:.32;transform:translate(-50%,-50%) scale(1.045)}
  100%{opacity:.16;transform:translate(-50%,-50%) scale(.98)}
}
@keyframes holoHeroField{
  0%{opacity:.42;filter:drop-shadow(0 0 6px rgba(72,178,255,.05))}
  30%{opacity:.80;filter:drop-shadow(0 0 13px rgba(72,190,255,.13))}
  60%{opacity:.86;filter:drop-shadow(0 0 16px rgba(72,195,255,.15))}
  100%{opacity:.58;filter:drop-shadow(0 0 9px rgba(72,178,255,.08))}
}

@media(max-width:980px){
  body[data-holo-evolution="ambient-presence"].holo-hero-arrival .chat-panel::before{
    opacity:.82!important;
    animation-duration:4.9s!important;
  }
  body[data-holo-evolution="ambient-presence"].holo-hero-arrival .energy-column,
  body[data-holo-evolution="ambient-presence"].holo-hero-arrival .platform-pulse,
  body[data-holo-evolution="ambient-presence"].holo-hero-arrival .holo-organism-canvas{animation-duration:4.9s!important}
}
@media(prefers-reduced-motion:reduce){
  body[data-holo-evolution="ambient-presence"].holo-hero-arrival .chat-panel::before{
    animation:none!important;opacity:.52!important;filter:saturate(1.02) brightness(.94) drop-shadow(0 0 20px rgba(69,171,255,.15))!important
  }
  body[data-holo-evolution="ambient-presence"].holo-hero-arrival .energy-column,
  body[data-holo-evolution="ambient-presence"].holo-hero-arrival .platform-pulse,
  body[data-holo-evolution="ambient-presence"].holo-hero-arrival .holo-organism-canvas{animation:none!important}
}

/* ========================================================================== 
   ETAPA 8.10.1 — HERO PRESENCE FIX
   Intro-ul nu mai este anulat de focusul programatic al composerului.
   Holo reapare clar la fiecare răspuns nou, inclusiv răspuns scris fără TTS.
   ========================================================================== */
body[data-holo-evolution="ambient-presence"].holo-response-presence{
  --holo-figure-opacity:.90;
  --holo-organism-opacity:.79;
}
body[data-holo-evolution="ambient-presence"].holo-response-presence .chat-panel::before{
  opacity:.90!important;
  -webkit-mask-image:linear-gradient(180deg,#000 0 67%,rgba(0,0,0,.91) 79%,rgba(0,0,0,.28) 92%,transparent 100%)!important;
  mask-image:linear-gradient(180deg,#000 0 67%,rgba(0,0,0,.91) 79%,rgba(0,0,0,.28) 92%,transparent 100%)!important;
  filter:saturate(1.08) contrast(1.055) brightness(.98)
    drop-shadow(0 0 28px rgba(76,194,255,.24))
    drop-shadow(0 0 86px rgba(38,116,255,.17))!important;
  animation:holoResponsePresence 4.05s cubic-bezier(.22,.72,.24,1) both!important;
  will-change:opacity,filter,transform;
}
body[data-holo-evolution="ambient-presence"].holo-response-presence .holo-organism-canvas{
  opacity:.79!important;
}
body[data-holo-evolution="ambient-presence"].holo-response-presence .energy-column{
  opacity:.16!important;
}
body[data-holo-evolution="ambient-presence"].holo-response-presence .platform-pulse{
  opacity:.19!important;
}
@keyframes holoResponsePresence{
  0%{opacity:.08;transform:translateX(-50%) translateY(5px) scale(.992);filter:saturate(.92) brightness(.86) blur(.75px) drop-shadow(0 0 12px rgba(70,174,255,.10))}
  18%{opacity:.82;transform:translateX(-50%) translateY(0) scale(.999);filter:saturate(1.06) brightness(.97) blur(.12px) drop-shadow(0 0 27px rgba(78,198,255,.23))}
  32%,72%{opacity:.90;transform:translateX(-50%) translateY(0) scale(1);filter:saturate(1.08) contrast(1.055) brightness(.98) blur(0) drop-shadow(0 0 31px rgba(82,202,255,.26)) drop-shadow(0 0 88px rgba(38,116,255,.18))}
  88%{opacity:.58;transform:translateX(-50%) translateY(1px) scale(.998);filter:saturate(1.02) brightness(.94) blur(.18px) drop-shadow(0 0 22px rgba(75,188,255,.17))}
  100%{opacity:.10;transform:translateX(-50%) translateY(3px) scale(.995);filter:saturate(.92) brightness(.86) blur(.65px) drop-shadow(0 0 13px rgba(70,174,255,.09))}
}
@media(max-width:980px){
  body[data-holo-evolution="ambient-presence"].holo-response-presence .chat-panel::before{
    opacity:.78!important;
    animation-duration:3.15s!important;
  }
}
@media(prefers-reduced-motion:reduce){
  body[data-holo-evolution="ambient-presence"].holo-response-presence .chat-panel::before{
    animation:none!important;
    opacity:.46!important;
    filter:saturate(1.01) brightness(.94) drop-shadow(0 0 18px rgba(69,171,255,.14))!important;
  }
}

/* 8.10.1 — intro suficient de lung pentru impact vizual și manifestare
   clară pe toată durata vorbirii, nu doar la debutul audio. */
body[data-holo-evolution="ambient-presence"].holo-hero-arrival .chat-panel::before{
  animation-duration:6.35s!important;
}
@keyframes holoHeroArrival{
  0%{opacity:0;transform:translateX(-50%) translateY(18px) scale(.975);filter:saturate(.80) brightness(.72) blur(2.2px) drop-shadow(0 0 8px rgba(70,174,255,.08))}
  9%{opacity:.18;transform:translateX(-50%) translateY(10px) scale(.984);filter:saturate(.93) brightness(.85) blur(1.15px) drop-shadow(0 0 18px rgba(70,184,255,.14))}
  22%{opacity:.84;transform:translateX(-50%) translateY(1px) scale(.998);filter:saturate(1.08) brightness(.98) blur(.12px) drop-shadow(0 0 31px rgba(79,201,255,.25)) drop-shadow(0 0 92px rgba(38,116,255,.17))}
  30%,77%{opacity:.95;transform:translateX(-50%) translateY(0) scale(1);filter:saturate(1.11) contrast(1.06) brightness(1) blur(0) drop-shadow(0 0 36px rgba(84,206,255,.30)) drop-shadow(0 0 116px rgba(38,117,255,.22))}
  90%{opacity:.64;transform:translateX(-50%) translateY(1px) scale(.998);filter:saturate(1.03) brightness(.94) blur(.22px) drop-shadow(0 0 26px rgba(75,190,255,.20))}
  100%{opacity:.12;transform:translateX(-50%) translateY(4px) scale(.994);filter:saturate(.92) brightness(.86) blur(.7px) drop-shadow(0 0 15px rgba(70,174,255,.11))}
}
body[data-holo-evolution="ambient-presence"].state-speaking.holo-manifest-3 .chat-panel::before{
  opacity:.86!important;
  -webkit-mask-image:linear-gradient(180deg,#000 0 68%,rgba(0,0,0,.90) 80%,rgba(0,0,0,.25) 93%,transparent 100%)!important;
  mask-image:linear-gradient(180deg,#000 0 68%,rgba(0,0,0,.90) 80%,rgba(0,0,0,.25) 93%,transparent 100%)!important;
  filter:saturate(1.07) contrast(1.05) brightness(.97) drop-shadow(0 0 29px rgba(78,196,255,.23))!important;
}
@media(max-width:980px){
  body[data-holo-evolution="ambient-presence"].holo-hero-arrival .chat-panel::before{animation-duration:5.45s!important}
  body[data-holo-evolution="ambient-presence"].state-speaking.holo-manifest-3 .chat-panel::before{opacity:.72!important}
}

/* ==========================================================================
   ETAPA 8.10.2 — PREZENȚĂ CONTINUĂ, FĂRĂ „APARE/DISPARĂ”
   Holo rămâne mereu sugerat în scenă. Stările îi schimbă intensitatea,
   nu existența. Intro-ul și răspunsurile se întorc lin la o urmă vizibilă.
   ========================================================================== */
body[data-holo-evolution="ambient-presence"]{
  --holo-soft-idle:.24;
}
body[data-holo-evolution="ambient-presence"].holo-manifest-0{
  --holo-figure-opacity:var(--holo-soft-idle);
  --holo-organism-opacity:.68;
}
body[data-holo-evolution="ambient-presence"].holo-manifest-1{
  --holo-figure-opacity:.36;
  --holo-organism-opacity:.74;
}
body[data-holo-evolution="ambient-presence"].holo-manifest-2{
  --holo-figure-opacity:.58;
  --holo-organism-opacity:.80;
}
body[data-holo-evolution="ambient-presence"].holo-manifest-3{
  --holo-figure-opacity:.90;
  --holo-organism-opacity:.84;
}

/* Nivelul de repaus păstrează silueta completă, dar foarte translucidă.
   Nu mai există pragul vizual „a dispărut”. */
body[data-holo-evolution="ambient-presence"].holo-manifest-0 .chat-panel::before{
  opacity:var(--holo-soft-idle)!important;
  -webkit-mask-image:linear-gradient(180deg,rgba(0,0,0,.88) 0 62%,rgba(0,0,0,.62) 78%,rgba(0,0,0,.24) 91%,transparent 100%)!important;
  mask-image:linear-gradient(180deg,rgba(0,0,0,.88) 0 62%,rgba(0,0,0,.62) 78%,rgba(0,0,0,.24) 91%,transparent 100%)!important;
  filter:saturate(.95) brightness(.86) blur(.28px) drop-shadow(0 0 18px rgba(69,171,255,.12))!important;
}
body[data-holo-evolution="ambient-presence"].holo-manifest-1 .chat-panel::before{
  opacity:.36!important;
  -webkit-mask-image:linear-gradient(180deg,rgba(0,0,0,.91) 0 64%,rgba(0,0,0,.70) 80%,rgba(0,0,0,.28) 92%,transparent 100%)!important;
  mask-image:linear-gradient(180deg,rgba(0,0,0,.91) 0 64%,rgba(0,0,0,.70) 80%,rgba(0,0,0,.28) 92%,transparent 100%)!important;
  filter:saturate(.99) brightness(.90) blur(.18px) drop-shadow(0 0 21px rgba(69,177,255,.15))!important;
}
body[data-holo-evolution="ambient-presence"].holo-manifest-2 .chat-panel::before{
  opacity:.58!important;
  -webkit-mask-image:linear-gradient(180deg,rgba(0,0,0,.95) 0 66%,rgba(0,0,0,.78) 81%,rgba(0,0,0,.30) 93%,transparent 100%)!important;
  mask-image:linear-gradient(180deg,rgba(0,0,0,.95) 0 66%,rgba(0,0,0,.78) 81%,rgba(0,0,0,.30) 93%,transparent 100%)!important;
  filter:saturate(1.03) brightness(.94) blur(.08px) drop-shadow(0 0 25px rgba(72,188,255,.19))!important;
}
body[data-holo-evolution="ambient-presence"].holo-manifest-3 .chat-panel::before{
  opacity:.90!important;
}
body[data-holo-evolution="ambient-presence"] .chat-panel::before{
  transition:opacity 1.35s ease,filter 1.15s ease,transform 1.15s ease!important;
}

/* Focusul de scriere și conversațiile lungi îl calmează, dar nu îl șterg. */
body[data-holo-evolution="ambient-presence"].composer-focus.holo-manifest-0{--holo-soft-idle:.19}
body[data-holo-evolution="ambient-presence"].conversation-dense.holo-manifest-0{--holo-soft-idle:.17}
body[data-holo-evolution="ambient-presence"].keyboard-open.holo-manifest-0{--holo-soft-idle:.07}

/* Intro-ul pornește din prezența discretă și revine la ea, fără flash spre zero. */
body[data-holo-evolution="ambient-presence"].holo-hero-arrival .chat-panel::before{
  animation-duration:6.55s!important;
}
@keyframes holoHeroArrival{
  0%{opacity:.22;transform:translateX(-50%) translateY(7px) scale(.989);filter:saturate(.92) brightness(.84) blur(.55px) drop-shadow(0 0 14px rgba(70,174,255,.10))}
  12%{opacity:.58;transform:translateX(-50%) translateY(2px) scale(.996);filter:saturate(1.02) brightness(.94) blur(.18px) drop-shadow(0 0 25px rgba(75,194,255,.19))}
  25%,73%{opacity:.94;transform:translateX(-50%) translateY(0) scale(1);filter:saturate(1.10) contrast(1.06) brightness(.99) blur(0) drop-shadow(0 0 34px rgba(84,206,255,.28)) drop-shadow(0 0 108px rgba(38,117,255,.20))}
  88%{opacity:.58;transform:translateX(-50%) translateY(1px) scale(.998);filter:saturate(1.02) brightness(.93) blur(.16px) drop-shadow(0 0 24px rgba(75,190,255,.18))}
  100%{opacity:.24;transform:translateX(-50%) translateY(3px) scale(.996);filter:saturate(.95) brightness(.86) blur(.28px) drop-shadow(0 0 18px rgba(69,171,255,.12))}
}

/* La răspuns Holo se intensifică, apoi revine la silueta de repaus. */
body[data-holo-evolution="ambient-presence"].holo-response-presence .chat-panel::before{
  animation-duration:5.35s!important;
}
@keyframes holoResponsePresence{
  0%{opacity:.24;transform:translateX(-50%) translateY(3px) scale(.996);filter:saturate(.95) brightness(.86) blur(.28px) drop-shadow(0 0 18px rgba(69,171,255,.12))}
  14%{opacity:.78;transform:translateX(-50%) translateY(0) scale(.999);filter:saturate(1.05) brightness(.96) blur(.08px) drop-shadow(0 0 28px rgba(78,198,255,.22))}
  27%,76%{opacity:.90;transform:translateX(-50%) translateY(0) scale(1);filter:saturate(1.08) contrast(1.055) brightness(.98) blur(0) drop-shadow(0 0 31px rgba(82,202,255,.25)) drop-shadow(0 0 82px rgba(38,116,255,.16))}
  90%{opacity:.50;transform:translateX(-50%) translateY(1px) scale(.998);filter:saturate(1.00) brightness(.92) blur(.14px) drop-shadow(0 0 22px rgba(75,188,255,.16))}
  100%{opacity:.24;transform:translateX(-50%) translateY(3px) scale(.996);filter:saturate(.95) brightness(.86) blur(.28px) drop-shadow(0 0 18px rgba(69,171,255,.12))}
}

@media(max-width:980px){
  body[data-holo-evolution="ambient-presence"]{--holo-soft-idle:.16}
  body[data-holo-evolution="ambient-presence"].holo-manifest-1{--holo-figure-opacity:.27}
  body[data-holo-evolution="ambient-presence"].holo-manifest-2{--holo-figure-opacity:.46}
  body[data-holo-evolution="ambient-presence"].holo-manifest-3{--holo-figure-opacity:.72}
  body[data-holo-evolution="ambient-presence"].holo-manifest-0 .chat-panel::before{opacity:var(--holo-soft-idle)!important}
  body[data-holo-evolution="ambient-presence"].holo-manifest-1 .chat-panel::before{opacity:.27!important}
  body[data-holo-evolution="ambient-presence"].holo-manifest-2 .chat-panel::before{opacity:.46!important}
  body[data-holo-evolution="ambient-presence"].holo-manifest-3 .chat-panel::before{opacity:.72!important}
  body[data-holo-evolution="ambient-presence"].holo-response-presence .chat-panel::before{animation-duration:4.25s!important}
  body[data-holo-evolution="ambient-presence"].holo-hero-arrival .chat-panel::before{animation-duration:5.45s!important}
}
@media(prefers-reduced-motion:reduce){
  body[data-holo-evolution="ambient-presence"].holo-manifest-0{--holo-figure-opacity:.22!important}
  body[data-holo-evolution="ambient-presence"].holo-manifest-1{--holo-figure-opacity:.30!important}
  body[data-holo-evolution="ambient-presence"].holo-manifest-2{--holo-figure-opacity:.42!important}
  body[data-holo-evolution="ambient-presence"].holo-manifest-3{--holo-figure-opacity:.58!important}
}

/* ========================================================================== 
   ETAPA 8.10.3 — FINE-TUNING PREZENȚĂ HOLO
   1) header desktop mai compact;
   2) Holo reîncadrat pentru a nu fi tăiat sus;
   3) starea VORBEȘTE readuce pulsul vizual clar;
   4) composer + controale audio se leagă organic de scenă.
   ========================================================================== */

/* Desktop: câștigăm spațiu vertical fără să schimbăm identitatea headerului. */
@media(min-width:981px){
  #app{grid-template-rows:72px minmax(0,1fr) 38px}
  .topbar{padding:8px clamp(18px,2.7vw,42px);gap:12px}
  .brand{min-width:260px;gap:11px}
  .brand img{width:42px;height:42px}
  .brand-name{font-size:27px}
  .brand-sub{margin-top:7px;font-size:7.5px;letter-spacing:.34em}
  .pill,.lang-switch{min-height:42px}
  .pill{padding-left:19px;padding-right:19px}
  .lang-btn{height:32px;min-width:50px}

  /* Figura este puțin mai mică și mai jos: capul respiră sub header, baza
     continuă să se piardă natural în platforma energetică. */
  body[data-holo-evolution="ambient-presence"] .chat-panel::before{
    width:clamp(700px,53vw,1010px);
    bottom:-6.2vh;
  }
  body[data-holo-evolution="ambient-presence"] .chat-panel::after{
    top:46%;
  }
}

/* Dock vizual: zona de interacțiune nu mai pare lipită peste scenă. */
body[data-holo-evolution="ambient-presence"] .chat-footer{
  isolation:isolate;
}
body[data-holo-evolution="ambient-presence"] .chat-footer::before{
  content:"";
  position:absolute;
  z-index:-1;
  left:-28px;
  right:-30px;
  top:-22px;
  bottom:-18px;
  border-radius:34px 34px 12px 12px;
  pointer-events:none;
  background:
    radial-gradient(ellipse 38% 80% at 92% 86%,rgba(46,166,255,.105),transparent 72%),
    linear-gradient(180deg,rgba(2,10,27,0) 0%,rgba(2,10,27,.20) 38%,rgba(1,8,22,.43) 100%);
  -webkit-mask-image:linear-gradient(180deg,transparent 0%,rgba(0,0,0,.62) 34%,#000 100%);
  mask-image:linear-gradient(180deg,transparent 0%,rgba(0,0,0,.62) 34%,#000 100%);
}
body[data-holo-evolution="ambient-presence"] .toolbar{
  margin-bottom:3px;
}
body[data-holo-evolution="ambient-presence"] .controls{
  transform:translateY(9px);
  border-color:rgba(99,178,250,.18);
  background:linear-gradient(180deg,rgba(3,16,37,.76),rgba(1,9,25,.72));
  box-shadow:0 9px 26px rgba(0,5,18,.20),0 0 22px rgba(34,127,220,.055),inset 0 1px 0 rgba(255,255,255,.035);
}
body[data-holo-evolution="ambient-presence"] .input-row{
  background:linear-gradient(180deg,rgba(2,12,30,.88),rgba(1,8,22,.83));
  border-color:rgba(91,173,255,.40);
  box-shadow:0 0 30px rgba(19,91,205,.075),inset 0 1px 0 rgba(255,255,255,.035),inset 0 -12px 28px rgba(7,40,84,.055);
}
body[data-holo-evolution="ambient-presence"] .input-row::after{
  content:"";
  position:absolute;
  right:9%;
  bottom:-1px;
  width:28%;
  height:1px;
  pointer-events:none;
  background:linear-gradient(90deg,transparent,rgba(91,205,255,.34),transparent);
  box-shadow:0 0 12px rgba(70,187,255,.18);
  opacity:.56;
}
body[data-holo-evolution="ambient-presence"] .input-row{position:relative}

/* VORBEȘTE: Holo nu mai stă inert. Lumina emite și respiră împreună cu vocea.
   voice-level vine deja din TTS/Realtime; animația de bază păstrează viața și
   când nivelul instantaneu este foarte mic. */
body[data-holo-evolution="ambient-presence"].state-speaking .space-energy{
  opacity:calc(var(--ambient-base-opacity) + .11)!important;
}
body[data-holo-evolution="ambient-presence"].state-speaking .energy-column{
  opacity:calc(.16 + (var(--voice-level,0) * .30))!important;
  filter:blur(1.45px) drop-shadow(0 0 calc(15px + (var(--voice-level,0) * 31px)) rgba(70,201,255,.43))!important;
  animation:holoSpeakColumn8103 1.08s ease-in-out infinite!important;
}
body[data-holo-evolution="ambient-presence"].state-speaking .platform-pulse{
  opacity:calc(.19 + (var(--voice-level,0) * .31))!important;
  filter:drop-shadow(0 0 calc(11px + (var(--voice-level,0) * 27px)) rgba(68,205,255,.43))!important;
  animation:holoSpeakPlatform8103 .92s ease-in-out infinite!important;
}
body[data-holo-evolution="ambient-presence"].state-speaking .holo-organism-canvas{
  opacity:calc(.72 + (var(--voice-level,0) * .20))!important;
  filter:drop-shadow(0 0 calc(5px + (var(--voice-level,0) * 13px)) rgba(86,210,255,.20));
  animation:holoSpeakOrganism8103 1.18s ease-in-out infinite;
}
body[data-holo-evolution="ambient-presence"].state-speaking .chat-panel::after{
  opacity:calc(.30 + (var(--voice-level,0) * .38))!important;
  animation:holoSpeakCore8103 .86s ease-in-out infinite!important;
}
body[data-holo-evolution="ambient-presence"].state-speaking .chat-panel::before{
  opacity:calc(.78 + (var(--voice-level,0) * .16))!important;
  filter:saturate(1.07) contrast(1.05) brightness(.98)
    drop-shadow(0 0 calc(27px + (var(--voice-level,0) * 18px)) rgba(78,200,255,.28))
    drop-shadow(0 0 calc(78px + (var(--voice-level,0) * 44px)) rgba(38,116,255,.18))!important;
}
@keyframes holoSpeakColumn8103{
  0%,100%{transform:translateX(-50%) scaleX(.97)}
  50%{transform:translateX(-50%) scaleX(1.075)}
}
@keyframes holoSpeakPlatform8103{
  0%,100%{transform:translateX(-50%) perspective(850px) rotateX(69deg) scale(.985)}
  50%{transform:translateX(-50%) perspective(850px) rotateX(69deg) scale(1.028)}
}
@keyframes holoSpeakOrganism8103{
  0%,100%{transform:scale(1);opacity:.74}
  50%{transform:scale(1.008);opacity:.92}
}
@keyframes holoSpeakCore8103{
  0%,100%{transform:translate(-50%,-50%) scale(.96)}
  50%{transform:translate(-50%,-50%) scale(1.13)}
}

/* Pe mobil păstrăm geometria responsive existentă și doar legăm mai bine
   dock-ul; headerul mobil nu este micșorat suplimentar. */
@media(max-width:980px){
  body[data-holo-evolution="ambient-presence"] .chat-footer::before{
    left:-8px;right:-8px;top:-12px;bottom:-8px;border-radius:24px 24px 0 0;
  }
  body[data-holo-evolution="ambient-presence"] .controls{transform:translateY(5px)}
  body[data-holo-evolution="ambient-presence"].state-speaking .space-energy{opacity:.47!important}
  body[data-holo-evolution="ambient-presence"].state-speaking .energy-column{opacity:calc(.12 + (var(--voice-level,0) * .22))!important}
  body[data-holo-evolution="ambient-presence"].state-speaking .platform-pulse{opacity:calc(.15 + (var(--voice-level,0) * .23))!important}
}
@media(prefers-reduced-motion:reduce){
  body[data-holo-evolution="ambient-presence"].state-speaking .energy-column,
  body[data-holo-evolution="ambient-presence"].state-speaking .platform-pulse,
  body[data-holo-evolution="ambient-presence"].state-speaking .holo-organism-canvas,
  body[data-holo-evolution="ambient-presence"].state-speaking .chat-panel::after{animation:none!important}
}

/* ETAPA 8.10.4 — LINK READER + CONTROL CONVERSAȚIE NOUĂ */
#newConversationInline{
  width:auto;
  min-width:132px;
  height:32px;
  padding:0 11px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  border-radius:999px;
  font-family:Inter,system-ui,sans-serif;
  font-size:10px;
  font-weight:600;
  line-height:1;
  letter-spacing:.035em;
  white-space:nowrap;
  color:rgba(221,242,255,.92);
  background:linear-gradient(180deg,rgba(12,37,70,.72),rgba(5,21,44,.62));
  border-color:rgba(105,195,255,.24);
}
#newConversationInline.hidden{display:none!important}
#newConversationInline .new-conversation-icon{
  width:15px;
  height:15px;
  flex:0 0 auto;
  fill:none;
  stroke:currentColor;
  stroke-width:1.65;
  stroke-linecap:round;
  stroke-linejoin:round;
  opacity:.88;
}
#newConversationInline:hover,#newConversationInline:focus-visible{
  color:#f3fbff;
  border-color:rgba(111,216,255,.48);
  background:linear-gradient(180deg,rgba(17,54,99,.82),rgba(7,29,58,.74));
}
@media(max-width:720px){
  #newConversationInline{min-width:auto;height:30px;padding:0 9px;font-size:9px;gap:5px}
  #newConversationInline .new-conversation-icon{width:14px;height:14px}
}
@media(max-width:420px){
  #newConversationInline span{max-width:76px;overflow:hidden;text-overflow:ellipsis}
}
#currentConversationTitle{max-width:min(360px,45vw)}
#newConversationInline{margin-left:8px;margin-right:auto}
@media(max-width:720px){#currentConversationTitle{max-width:44vw}}

/* ========================================================================== 
   ETAPA 8.11.2 — REDESIGN AERISIT: CHAT + ISTORIC + HOLO
   - o singură bară laterală, dedicată istoricului
   - Holo actual rămâne frontal, dar este mutat la marginea dreaptă
   - conversația primește spațiul principal
   - topbar și footer simplificate; fără informație duplicată
   ========================================================================== */

@media(min-width:1100px){
  :root{
    --scene-header:76px;
    --scene-footer:48px;
    --history-rail:318px;
    --content-gutter:26px;
  }

  #app{grid-template-rows:var(--scene-header) minmax(0,1fr) var(--scene-footer)}
  .topbar{padding:10px 28px;gap:12px;background:linear-gradient(180deg,rgba(1,6,18,.86),rgba(1,6,18,.48))}
  .brand{min-width:250px}
  .brand img{width:42px;height:42px}
  .brand-name{font-size:27px}
  .brand-sub{margin-top:7px;font-size:7px}

  /* Sus rămân doar identitatea, limba și profilul. Upgrade-ul există în profil. */
  .topbar>.status,
  .topbar>.history-pill,
  .topbar>.primary{display:none!important}
  .topbar>.auth-pill{min-height:42px;padding:0 18px}
  .topbar>.lang-switch{min-height:42px}
  .topbar .lang-btn{height:32px;min-width:50px}

  /* Istoricul devine navigație persistentă, nu sertar ascuns. */
  .history-drawer{
    display:block!important;
    position:fixed;
    inset:var(--scene-header) auto var(--scene-footer) 0;
    width:var(--history-rail);
    z-index:18;
    pointer-events:auto;
  }
  .history-backdrop{display:none!important}
  .history-panel{
    position:absolute;inset:0;width:100%;
    padding:18px 14px 16px;
    border-right:1px solid rgba(104,180,255,.14);
    background:linear-gradient(180deg,rgba(3,12,28,.88),rgba(2,9,22,.78));
    box-shadow:inset -1px 0 0 rgba(255,255,255,.012);
    animation:none!important;
    backdrop-filter:blur(14px);
  }
  .history-header{padding:2px 5px 13px}
  .history-kicker{font-size:7px;letter-spacing:.15em;color:rgba(102,190,255,.58)}
  .history-header h2{margin-top:4px;font-family:Inter,sans-serif;font-size:18px;font-weight:500;color:#eaf5ff}
  .history-close{display:none!important}
  .history-new{min-height:46px;margin:0 3px 10px;border-radius:13px;text-align:left;padding:0 15px}
  .history-search{margin-bottom:10px}
  .history-search input{font-size:12px}
  .history-group-label{margin-top:9px}
  .history-list{gap:5px;padding-bottom:16px}
  .history-item{padding:11px 8px 11px 12px;border-radius:12px}
  .history-open strong{font-size:12px}
  .history-open small{margin-top:4px;font-size:8px;color:rgba(177,207,238,.54)}
  .history-actions{opacity:.28;transition:opacity .18s ease}
  .history-item:hover .history-actions,.history-item:focus-within .history-actions{opacity:1}
  .history-note{font-size:10px}

  /* Câștigăm pentru chat spațiul ocupat înainte de decor și panouri imaginare. */
  .layout{padding-left:var(--history-rail)}
  .chat-panel{grid-template-rows:auto auto minmax(0,1fr) auto}

  .visual-welcome{
    position:relative;z-index:8;
    width:clamp(600px,calc(100vw - 760px),920px);
    margin:22px 0 2px var(--content-gutter);
    padding:0 16px;
    pointer-events:none;
  }
  .visual-welcome h1{
    margin:0;
    font-family:Inter,sans-serif;
    font-size:clamp(28px,2.1vw,40px);
    line-height:1.08;
    font-weight:500;
    letter-spacing:-.035em;
    color:#f1f7ff;
  }
  .visual-welcome h1 span{
    color:#9fb5ff;
    background:linear-gradient(90deg,#7fd6ff,#9e8cff 62%,#c3a3ff);
    -webkit-background-clip:text;background-clip:text;color:transparent;
  }
  .visual-welcome p{margin:8px 0 0;font-size:13px;color:rgba(205,222,246,.56)}

  .conversation-bar{
    width:clamp(600px,calc(100vw - 760px),920px);
    margin:8px 0 0 var(--content-gutter);
    padding:8px 14px 8px 16px;
    border:1px solid rgba(106,177,255,.08);
    border-radius:12px;
    background:linear-gradient(90deg,rgba(6,21,45,.52),rgba(4,15,33,.16));
  }
  .conversation-label{font-size:7px}
  .conversation-bar strong{font-size:12px}
  .conversation-bar button{width:auto;height:30px;padding:0 12px;display:inline-flex;align-items:center;gap:7px;font-size:10px}
  .new-conversation-icon{width:14px;height:14px}

  .msgs{
    width:clamp(600px,calc(100vw - 760px),920px)!important;
    margin-left:var(--content-gutter);
    padding:22px 18px 24px 16px;
    gap:18px;
    mask-image:linear-gradient(180deg,transparent 0,#000 16px,#000 calc(100% - 14px),transparent 100%);
  }
  .msgs::before{display:none}
  .bubble{padding-left:48px}
  .message-head{margin-left:-48px}
  .bubble.ai{width:min(86%,760px)}
  .bubble.user{
    align-self:flex-end;
    width:min(76%,660px);
    margin-left:auto;
    padding:13px 16px 12px;
  }
  .message-content{font-size:16px;line-height:1.62}

  .chat-footer{
    width:clamp(600px,calc(100vw - 760px),920px)!important;
    margin:0 0 18px var(--content-gutter)!important;
  }
  .toolbar{margin-bottom:8px}
  .input-row{min-height:64px;border-color:rgba(104,184,255,.30);background:rgba(3,14,31,.70);backdrop-filter:blur(16px)}
  .input-row textarea{font-size:16px}
  .ai-disclosure{font-size:9px;opacity:.78}

  /* Holo: aceeași imagine frontală, doar repoziționată spre marginea dreaptă. */
  .chat-panel::before{
    left:auto!important;
    right:clamp(-115px,-5.8vw,-62px)!important;
    bottom:clamp(-24px,-2vh,-8px)!important;
    transform:scale(var(--manifest-scale,1))!important;
    transform-origin:center bottom!important;
    width:min(clamp(650px,43vw,900px),calc((100dvh - var(--scene-header) - var(--scene-footer) + 90px) * 1.43))!important;
    background-position:center bottom!important;
    opacity:var(--holo-figure-opacity,.95)!important;
  }
  .chat-panel::after{left:auto!important;right:15.5vw!important;transform:translate(50%,-50%) scale(.92)!important;opacity:.20}

  /* Atmosfera urmărește Holo în dreapta, fără un orb central. */
  .energy-column,.energy-orbit,.platform-pulse{left:82%!important}
  .platform-pulse{width:min(46vw,820px);opacity:.50}
  .space-energy::after{background:linear-gradient(90deg,rgba(2,8,23,.54) 0%,rgba(2,8,23,.16) 56%,transparent 78%)}
  .holo-organism-canvas{opacity:.58}

  /* Footer juridic lizibil. „Despre” locuiește aici, nu sus. */
  .legal-footer{
    min-height:var(--scene-footer);
    padding:0 28px 0 calc(var(--history-rail) + 26px);
    font-family:Inter,sans-serif;
    font-size:10px;
    letter-spacing:0;
    text-transform:none;
    color:rgba(185,207,233,.58);
    background:rgba(1,6,18,.82);
  }
  .legal-footer nav{gap:18px;flex-wrap:nowrap}
  .legal-footer a,.legal-footer button{font-size:10px;color:rgba(194,216,241,.68);padding:6px 0}
  .legal-footer a:hover,.legal-footer button:hover{color:#d9f1ff}

  /* Istoricul fiind permanent, „open/close” nu mai schimbă geometria desktop. */
  body.history-open{overflow:hidden}
}

/* Laptopuri mai joase: păstrăm aerul fără să împingem composerul sub ecran. */
@media(min-width:1100px) and (max-height:760px){
  :root{--scene-header:68px;--scene-footer:42px;--history-rail:294px}
  .topbar{padding-top:7px;padding-bottom:7px}
  .brand img{width:36px;height:36px}.brand-name{font-size:24px}.brand-sub{display:none}
  .visual-welcome{margin-top:12px}.visual-welcome h1{font-size:28px}.visual-welcome p{margin-top:5px}
  .conversation-bar{margin-top:5px;min-height:34px}
  .msgs{padding-top:14px;gap:14px}
  .chat-footer{margin-bottom:9px!important}
  .toolbar{margin-bottom:5px}.input-row{min-height:56px}
  .legal-footer{font-size:9px}
}

/* Pe tabletă/telefon rămâne istoricul tip drawer și compoziția responsive existentă. */
@media(max-width:1099px){
  .visual-welcome{display:none}
}

/* ========================================================================== 
   ETAPA 8.11.3 — VISUAL POLISH: ISTORIC + CHAT + SURSA HOLO
   Reper vizual: mockup-ul aprobat pe 11.08.2026.
   - o singură navigație laterală: istoricul real
   - chat mai mare, fără controale duplicate
   - Holo rămâne assetul frontal actual, la marginea dreaptă
   - sursa luminoasă este mutată sub Holo, nu sub composer
   - footer juridic mai lizibil
   ========================================================================== */

@media(min-width:1100px){
  :root{
    --history-rail:300px;
    --content-gutter:34px;
    --holo-source-x:86.8%;
  }

  /* Fundal derivat din assetul existent: aceeași atmosferă, dar portalul fizic
     este repoziționat în dreapta, exact sub manifestarea lui Holo. */
  body{
    background:
      linear-gradient(90deg,rgba(1,6,18,.28) 0%,rgba(1,6,18,.07) 47%,rgba(1,6,18,.10) 100%),
      linear-gradient(180deg,rgba(1,5,15,.18),rgba(1,5,15,.08)),
      image-set(url("../holo-v2/holo-background-desktop-right.webp") type("image/webp"),url("../holo-v2/holo-background-desktop-right.png") type("image/png")) center center/cover no-repeat fixed;
  }

  /* Istoricul este singura bară laterală. */
  .history-panel{padding:20px 16px 14px}
  .history-kicker{display:none}
  .history-header{padding:0 7px 12px}
  .history-header h2{margin:0;font-size:20px;font-weight:600;letter-spacing:-.02em}
  .history-new{
    min-height:48px;
    margin:0 4px 14px;
    padding:0 16px;
    font-size:14px;
    font-weight:600;
    border-color:rgba(94,178,255,.30);
    background:linear-gradient(180deg,rgba(19,75,145,.44),rgba(6,34,75,.40));
  }
  .history-list{gap:3px;padding:0 1px 20px 2px;scrollbar-width:thin;scrollbar-color:rgba(104,174,255,.28) transparent}
  .history-list::-webkit-scrollbar{width:6px}
  .history-list::-webkit-scrollbar-track{background:transparent}
  .history-list::-webkit-scrollbar-thumb{background:rgba(104,174,255,.24);border-radius:999px}
  .history-list::-webkit-scrollbar-thumb:hover{background:rgba(104,190,255,.42)}
  .history-item{padding:12px 8px 12px 12px;border-radius:12px;border-color:transparent}
  .history-item.active{background:linear-gradient(90deg,rgba(26,90,168,.28),rgba(8,34,76,.18));border-color:rgba(82,174,255,.42)}
  .history-open strong{font-size:12.5px;line-height:1.3}
  .history-open small{font-size:9px;margin-top:4px}

  /* Titlul selectat există deja în istoricul persistent; eliminăm bara care
     repeta titlul și butonul Conversație nouă în zona de chat. */
  .conversation-bar{display:none!important}

  /* Hero compact: rămâne mesajul de bun venit, fără carduri și fără orb. */
  .visual-welcome{
    width:min(960px,calc(100vw - var(--history-rail) - 510px));
    min-width:620px;
    margin:18px 0 0 var(--content-gutter);
    padding:0 10px;
  }
  .visual-welcome h1{font-size:clamp(29px,2vw,38px)}
  .visual-welcome p{margin-top:6px;font-size:13px}

  /* Conversația devine centrul produsului. */
  .msgs{
    width:min(960px,calc(100vw - var(--history-rail) - 500px))!important;
    min-width:620px;
    margin-left:var(--content-gutter);
    padding:20px 10px 22px 10px;
    gap:18px;
  }
  .bubble.ai{width:min(88%,790px)}
  .bubble.user{width:min(78%,700px)}
  .message-content{font-size:16px;line-height:1.60}

  .chat-footer{
    width:min(960px,calc(100vw - var(--history-rail) - 500px))!important;
    min-width:620px;
    margin:0 0 13px var(--content-gutter)!important;
  }
  .toolbar{margin:0 8px 6px 10px}
  .status-line{opacity:.76}
  .input-row{min-height:62px}

  /* Holo rămâne exact assetul actual, frontal. Îl lăsăm să respire la marginea
     dreaptă, fără să intre peste lectura conversației. */
  .chat-panel::before{
    right:clamp(-118px,-5.4vw,-68px)!important;
    bottom:clamp(-18px,-1.5vh,-5px)!important;
    width:min(clamp(670px,42vw,880px),calc((100dvh - var(--scene-header) - var(--scene-footer) + 82px) * 1.43))!important;
  }

  /* Fără al doilea orb în scenă; semnătura-nucleu rămâne lângă mesajele Holo. */
  .chat-panel::after{opacity:0!important}

  /* Toată energia scenei indică aceeași origine: baza lui Holo din dreapta. */
  .energy-column,.energy-orbit,.platform-pulse{left:var(--holo-source-x)!important}
  .energy-column{width:clamp(210px,18vw,350px)!important;opacity:.18!important}
  .platform-pulse{width:min(42vw,720px)!important;bottom:-10%!important;opacity:.34!important}
  .orbit-one{width:min(60vw,980px)!important}
  .orbit-two{width:min(52vw,850px)!important}
  .orbit-three{width:min(42vw,690px)!important}
  .space-energy::after{
    background:linear-gradient(90deg,rgba(2,8,23,.66) 0%,rgba(2,8,23,.32) 47%,rgba(2,8,23,.05) 72%,transparent 90%)!important;
  }

  /* Dock-ul nu mai are lumină proprie puternică; lumina de proiecție aparține
     lui Holo, iar composerul rămâne un instrument calm al conversației. */
  body[data-holo-evolution="ambient-presence"] .chat-footer::before{
    background:linear-gradient(180deg,rgba(2,10,27,0),rgba(2,10,27,.12) 45%,rgba(1,8,22,.30) 100%)!important;
  }
  body[data-holo-evolution="ambient-presence"] .input-row::after{opacity:.28}

  /* Linkurile juridice trebuie să poată fi citite fără zoom. */
  .legal-footer{font-size:11px!important;padding-left:calc(var(--history-rail) + 34px)}
  .legal-footer nav{gap:22px}
  .legal-footer a,.legal-footer button{font-size:11px!important;padding:8px 0}
}

@media(min-width:1100px) and (max-height:760px){
  :root{--history-rail:286px;--content-gutter:28px}
  .visual-welcome{margin-top:10px}
  .visual-welcome h1{font-size:27px}
  .msgs{padding-top:12px;gap:14px}
  .history-panel{padding-top:14px}
  .history-new{min-height:42px;margin-bottom:9px}
  .history-item{padding-top:9px;padding-bottom:9px}
  .legal-footer,.legal-footer a,.legal-footer button{font-size:10px!important}
}
@media(min-width:1100px){
  .history-new::before{content:"＋";font-size:18px;font-weight:400;line-height:1;margin-right:9px;color:#dff4ff}
  .history-new{display:flex;align-items:center;justify-content:flex-start}
}


/* ========================================================================== 
   ETAPA 8.11.4 — CONVERSATION DISCIPLINE
   Fix critic: composerul rămâne permanent disponibil după răspunsuri lungi.
   Chatul capătă lățime de lectură conversațională, Markdown randat și footer calm.
   ========================================================================== */
@media(min-width:1100px){
  /* 8.11.3 a ascuns conversation-bar, dar a păstrat grila cu 4 rânduri.
     Rezultatul era msgs pe rând auto + composer împins în afara viewportului. */
  .chat-panel{
    grid-template-rows:auto minmax(0,1fr) auto!important;
    min-height:0!important;
    overflow:hidden;
  }

  .visual-welcome{
    width:min(820px,calc(100vw - var(--history-rail) - 560px));
    min-width:600px;
    margin-top:14px;
    padding-left:10px;
  }
  .visual-welcome h1{
    max-width:800px;
    font-size:clamp(27px,1.8vw,34px);
  }
  .visual-welcome p{margin-top:5px}

  /* Conversație, nu pagină de document. */
  .msgs{
    width:min(820px,calc(100vw - var(--history-rail) - 560px))!important;
    min-width:600px;
    min-height:0!important;
    margin-left:var(--content-gutter);
    padding:12px 8px 14px 10px;
    gap:13px;
    overflow-y:auto!important;
    mask-image:linear-gradient(180deg,transparent 0,#000 10px,#000 calc(100% - 8px),transparent 100%);
  }
  .bubble.ai{
    width:min(100%,780px)!important;
    padding:13px 17px 12px 48px;
    border:1px solid rgba(100,174,255,.11);
    border-radius:15px;
    background:linear-gradient(135deg,rgba(7,25,53,.46),rgba(3,13,31,.20));
    box-shadow:inset 0 1px 0 rgba(255,255,255,.015);
  }
  .bubble.ai .message-head{margin-left:-38px;margin-bottom:6px;min-height:27px}
  .bubble.ai .speaker-dot{width:27px;height:27px;flex-basis:27px}
  .bubble.user{
    width:min(72%,640px)!important;
    padding:11px 14px 10px;
    border:1px solid rgba(93,153,255,.12);
    border-radius:14px;
    background:linear-gradient(135deg,rgba(14,37,79,.62),rgba(10,22,54,.52));
  }
  .message-content{font-size:15.5px!important;line-height:1.52!important}
  .message-content p{margin:.24em 0 .58em}
  .message-content p:last-child{margin-bottom:.18em}
  .message-content ul,.message-content ol{margin:.38em 0 .68em;padding-left:1.35em}
  .message-content li{margin:.18em 0}
  .message-content h2,.message-content h3,.message-content h4{
    margin:.72em 0 .38em;
    font-family:Inter,sans-serif;
    font-weight:600;
    letter-spacing:-.015em;
    color:#eef7ff;
  }
  .message-content h2{font-size:18px}
  .message-content h3{font-size:16.5px}
  .message-content h4{font-size:15.5px}
  .message-content h2:first-child,.message-content h3:first-child,.message-content h4:first-child{margin-top:.12em}
  .meta{margin-top:7px!important;font-size:9.5px!important;letter-spacing:.16em!important;color:rgba(158,198,239,.66)!important}

  /* Composerul este o ancoră permanentă a conversației. */
  .chat-footer{
    width:min(820px,calc(100vw - var(--history-rail) - 560px))!important;
    min-width:600px;
    flex:0 0 auto;
    margin:0 0 9px var(--content-gutter)!important;
    padding-top:2px;
  }
  .toolbar{margin:0 7px 5px 9px}
  .status-line{font-size:9px}
  .input-row{min-height:58px}
  .input-row textarea{font-size:15.5px}
  .ai-disclosure{font-size:9px;line-height:1.25;margin-top:5px}

  /* Footer legal accesibil, dar nu mai concurează cu chatul. */
  #app{grid-template-rows:76px minmax(0,1fr) 31px}
  .topbar{padding-top:8px;padding-bottom:8px}
  .legal-footer{
    min-height:31px!important;
    padding-left:calc(var(--history-rail) + 34px)!important;
    padding-right:26px!important;
    background:linear-gradient(180deg,rgba(1,6,18,.18),rgba(1,6,18,.56))!important;
    border-top-color:rgba(76,145,239,.07)!important;
    font-size:9.5px!important;
  }
  .legal-footer nav{gap:18px!important}
  .legal-footer a,.legal-footer button{font-size:9.5px!important;padding:4px 0!important}
}

@media(min-width:1100px) and (max-height:760px){
  #app{grid-template-rows:66px minmax(0,1fr) 28px}
  .visual-welcome{margin-top:7px}
  .visual-welcome h1{font-size:25px}
  .visual-welcome p{font-size:11px}
  .msgs{padding-top:8px;gap:10px}
  .message-content{font-size:14.5px!important;line-height:1.46!important}
  .bubble.ai{padding-top:10px;padding-bottom:9px}
  .chat-footer{margin-bottom:5px!important}
  .toolbar{margin-bottom:3px}
  .input-row{min-height:54px}
  .legal-footer,.legal-footer a,.legal-footer button{font-size:9px!important}
}

/* ========================================================================== 
   ETAPA 8.11.5 — CHAT FIRST, FARA SUPRA-CORECTIE
   Reper: mockup-ul vizual aprobat, nu critica transformata in specificatie.
   - pastram composerul permanent si Markdown-ul randat din 8.11.4
   - revenim la un chat vizual, cu bule clare si mai mult spatiu util
   - Holo ramane in dreapta, deasupra propriei surse de proiectie
   - istoricul ramane singura bara laterala
   ========================================================================== */
@media(min-width:1100px){
  :root{
    --history-rail:282px;
    --content-gutter:38px;
  }

  /* Welcome-ul ramane identitatea constanta a scenei; titlul conversatiei este deja
     vizibil si selectabil in istoricul din stanga. */
  .visual-welcome{
    width:min(940px,calc(100vw - var(--history-rail) - 430px));
    min-width:640px;
    margin:14px 0 0 var(--content-gutter);
    padding:0 4px;
  }
  .visual-welcome h1{
    font-size:clamp(26px,1.75vw,32px)!important;
    line-height:1.08;
  }
  .visual-welcome p{margin-top:5px;font-size:12px}

  /* Chatul are loc sa respire, dar nu devine pagina de document. */
  .msgs{
    width:min(980px,calc(100vw - var(--history-rail) - 390px))!important;
    min-width:650px;
    margin-left:var(--content-gutter)!important;
    padding:10px 12px 14px 2px!important;
    gap:12px!important;
    mask-image:linear-gradient(180deg,transparent 0,#000 7px,#000 calc(100% - 7px),transparent 100%)!important;
    scrollbar-gutter:stable;
  }

  /* Bulele redevin vizibile: raspuns, nu manifest/document. */
  .bubble.ai{
    width:min(78%,760px)!important;
    padding:12px 16px 11px 46px!important;
    border:1px solid rgba(102,181,255,.18)!important;
    border-radius:17px!important;
    background:linear-gradient(135deg,rgba(7,26,56,.64),rgba(3,14,33,.42))!important;
    box-shadow:0 10px 32px rgba(0,0,0,.08),inset 0 1px 0 rgba(255,255,255,.02)!important;
    backdrop-filter:blur(8px);
  }
  .bubble.ai .message-head{
    margin-left:-36px!important;
    margin-bottom:5px!important;
    min-height:27px!important;
  }
  .bubble.ai .speaker-dot{width:27px!important;height:27px!important;flex-basis:27px!important}

  .bubble.user{
    align-self:flex-end!important;
    width:auto!important;
    max-width:min(62%,610px)!important;
    margin-left:auto!important;
    padding:10px 14px!important;
    border:1px solid rgba(104,166,255,.20)!important;
    border-radius:16px!important;
    background:linear-gradient(135deg,rgba(17,48,101,.72),rgba(10,27,64,.62))!important;
    box-shadow:0 8px 28px rgba(0,0,0,.08)!important;
  }

  .message-content{font-size:15px!important;line-height:1.47!important}
  .message-content p{margin:.14em 0 .46em!important}
  .message-content ul,.message-content ol{margin:.28em 0 .52em!important;padding-left:1.25em!important}
  .message-content li{margin:.12em 0!important}
  .message-content h2,.message-content h3,.message-content h4{
    margin:.58em 0 .28em!important;
    line-height:1.25!important;
  }
  .message-content h2{font-size:17px!important}
  .message-content h3{font-size:15.8px!important}
  .message-content h4{font-size:15px!important}

  /* Modelul nu trebuie sa concureze cu mesajul. */
  .bubble .meta{display:none!important}

  /* Composerul ramane permanent, dar are spatiu propriu si nu atinge footerul. */
  .chat-footer{
    width:min(980px,calc(100vw - var(--history-rail) - 390px))!important;
    min-width:650px;
    margin:0 0 16px var(--content-gutter)!important;
    padding:0 12px 0 0!important;
  }
  .toolbar{
    justify-content:flex-end!important;
    margin:0 6px 6px 0!important;
  }
  .status-line{display:none!important}
  .controls{gap:7px}
  .ctrl{width:40px;min-width:40px;height:40px;border-radius:13px}
  .input-row{min-height:60px!important}
  .input-row textarea{font-size:15.5px!important}
  .ai-disclosure{margin:6px 10px 0!important;font-size:9.5px!important}

  /* Istoricul castiga putin spatiu fara sa devina coloana dominanta. */
  .history-panel{padding-left:14px;padding-right:14px}
  .history-header h2{font-size:19px}
  .history-new{min-height:44px;font-size:13px;margin-bottom:10px}
  .history-item{padding:10px 7px 10px 11px}
  .history-open strong{font-size:12px}

  /* Footerul ramane accesibil, dar mai putin agresiv decat o banda de dashboard. */
  #app{grid-template-rows:72px minmax(0,1fr) 38px!important}
  .legal-footer{
    min-height:38px!important;
    padding-left:calc(var(--history-rail) + var(--content-gutter))!important;
    padding-right:24px!important;
    background:rgba(1,6,18,.72)!important;
    border-top-color:rgba(76,145,239,.08)!important;
  }
  .legal-footer nav{gap:20px!important}
  .legal-footer a,.legal-footer button{font-size:10.5px!important;padding:5px 0!important}

  /* Holo ramane frontal, la dreapta; nu schimbam assetul aprobat. */
  .chat-panel::before{
    right:clamp(-112px,-5.1vw,-62px)!important;
    opacity:var(--holo-figure-opacity,.95)!important;
  }
}

@media(min-width:1100px) and (max-height:760px){
  :root{--history-rail:270px;--content-gutter:30px}
  #app{grid-template-rows:66px minmax(0,1fr) 32px!important}
  .visual-welcome{margin-top:8px}
  .visual-welcome h1{font-size:25px!important}
  .msgs{padding-top:6px!important;gap:9px!important}
  .message-content{font-size:14px!important;line-height:1.42!important}
  .bubble.ai{padding-top:9px!important;padding-bottom:8px!important}
  .chat-footer{margin-bottom:8px!important}
  .input-row{min-height:54px!important}
  .ctrl{width:36px;min-width:36px;height:36px}
  .legal-footer a,.legal-footer button{font-size:9.5px!important}
}

/* ========================================================================== 
   ETAPA 8.11.6 — FINISARE LAYOUT: HOLO ALINIAT, TOPBAR MAI JOASA, CHAT MAI LARG
   Ajustari cerute dupa verificarea vizuala live:
   - Holo se muta usor spre dreapta si ramane deasupra sursei de lumina
   - topbar mai supla, fara sa sacrificam lizibilitatea textului
   - bara stanga putin mai ingusta, dar textul ramane la aceeasi marime
   - zona de chat foloseste mai bine latimea disponibila
   ========================================================================== */
@media(min-width:1100px){
  :root{
    --history-rail:266px;
    --content-gutter:34px;
  }

  #app{grid-template-rows:66px minmax(0,1fr) 38px!important}

  .topbar{
    padding:6px 18px!important;
    gap:10px!important;
    background:linear-gradient(180deg,rgba(1,6,18,.84),rgba(1,6,18,.46))!important;
  }
  .brand{gap:12px!important}
  .brand img{width:36px!important;height:36px!important}
  .brand-name{font-size:26px!important}
  .brand-sub{font-size:8.5px!important;letter-spacing:.28em!important}
  .topbar>.auth-pill,
  .topbar>.lang-switch{min-height:40px!important}
  .topbar>.auth-pill{padding:0 16px!important}
  .topbar .lang-btn{height:30px!important;min-width:46px!important}

  /* Istoricul pierde din volum, nu din lizibilitate. */
  .history-panel{padding:16px 12px 12px!important}
  .history-header{padding:0 6px 10px!important}
  .history-header h2{font-size:18px!important}
  .history-new{
    min-height:42px!important;
    margin:0 4px 12px!important;
    padding:0 14px!important;
    font-size:14px!important;
  }
  .history-item{padding:9px 6px 9px 10px!important}
  .history-open strong{font-size:12.5px!important;line-height:1.28!important}
  .history-open small{font-size:9px!important}

  /* Chatul castiga spatiu si respira mai bine. */
  .visual-welcome{
    width:min(1020px,calc(100vw - var(--history-rail) - 430px))!important;
    min-width:700px!important;
    margin:10px 0 0 var(--content-gutter)!important;
    padding:0 6px!important;
  }
  .visual-welcome h1{
    max-width:920px!important;
    font-size:clamp(27px,1.8vw,34px)!important;
  }
  .visual-welcome p{font-size:12px!important}

  .msgs{
    width:min(1040px,calc(100vw - var(--history-rail) - 330px))!important;
    min-width:720px!important;
    margin-left:var(--content-gutter)!important;
    padding:8px 10px 12px 2px!important;
    gap:11px!important;
  }
  .bubble.ai{
    width:min(87%,860px)!important;
    padding:11px 14px 10px 44px!important;
  }
  .bubble.ai .message-head{margin-left:-34px!important}
  .bubble.user{
    max-width:min(64%,650px)!important;
  }
  .message-content{font-size:15.5px!important;line-height:1.5!important}

  .chat-footer{
    width:min(1040px,calc(100vw - var(--history-rail) - 330px))!important;
    min-width:720px!important;
    margin:0 0 12px var(--content-gutter)!important;
    padding:0 10px 0 0!important;
  }
  .toolbar{margin:0 6px 6px 0!important}
  .ctrl{width:40px!important;min-width:40px!important;height:40px!important}
  .input-row{min-height:60px!important}
  .input-row textarea{font-size:15.5px!important}

  /* Holo se aliniaza cu sursa luminoasa existenta. */
  .chat-panel::before{
    right:clamp(-160px,-7.6vw,-108px)!important;
    bottom:clamp(-12px,-1.2vh,2px)!important;
    width:min(clamp(710px,44vw,910px),calc((100dvh - var(--scene-header) - var(--scene-footer) + 92px) * 1.43))!important;
    opacity:var(--holo-figure-opacity,.95)!important;
  }

  .legal-footer{
    padding-left:calc(var(--history-rail) + var(--content-gutter))!important;
    padding-right:22px!important;
  }
}

@media(min-width:1100px) and (max-height:760px){
  :root{--history-rail:258px;--content-gutter:28px}
  #app{grid-template-rows:62px minmax(0,1fr) 34px!important}
  .topbar{padding-top:5px!important;padding-bottom:5px!important}
  .brand img{width:34px!important;height:34px!important}
  .brand-name{font-size:24px!important}
  .visual-welcome{min-width:660px!important;margin-top:8px!important}
  .msgs,.chat-footer{min-width:680px!important}
  .message-content{font-size:15px!important;line-height:1.46!important}
  .chat-panel::before{right:clamp(-168px,-8vw,-116px)!important}
}

/* ========================================================================== 
   ETAPA 8.11.7 — SPACE & READABILITY FIX
   Ultima corectie vizuala dupa verificarea live:
   - nu mai micsoram fonturile conversației
   - raspunsurile Holo folosesc efectiv latimea disponibila
   - eliminam spatiul mort dintre chat si zona lui Holo
   - pastram composerul, istoricul, topbarul si Holo asa cum sunt in 8.11.6
   ========================================================================== */
@media(min-width:1100px){
  /* Lizibilitate: revenim la dimensiunea confortabila stabilita anterior. */
  .message-content{
    font-size:16px!important;
    line-height:1.52!important;
  }

  /* Containerul era deja larg; problema era ca bula AI se oprea prea devreme. */
  .bubble.ai{
    width:calc(100% - 18px)!important;
    max-width:1010px!important;
    padding:11px 16px 10px 44px!important;
  }

  /* Mesajele utilizatorului raman mai compacte, ca dialogul sa pastreze ierarhia. */
  .bubble.user{
    max-width:min(68%,700px)!important;
  }

  /* Folosim aproape toata zona de conversatie, dar pastram o margine de siguranta
     inainte de Holo pentru a nu suprapune textul peste manifestare. */
  .msgs{
    width:min(1100px,calc(100vw - var(--history-rail) - 300px))!important;
    padding-right:4px!important;
  }
  .chat-footer{
    width:min(1100px,calc(100vw - var(--history-rail) - 300px))!important;
  }
}

@media(min-width:1100px) and (max-height:760px){
  /* Nu reducem fontul doar pentru ca ecranul este mai jos. */
  .message-content{
    font-size:16px!important;
    line-height:1.48!important;
  }
  .bubble.ai{
    width:calc(100% - 14px)!important;
    max-width:1010px!important;
  }
}

/* ========================================================================== 
   ETAPA 8.11.8 — FLUID CHAT LAYOUT + HOLO BALANCE + LINK READER FIX
   - eliminam cardul mare din jurul raspunsurilor Holo
   - mesajele utilizatorului raman in dreapta, dar sunt trase in interiorul zonei sigure
   - Holo creste discret si ramane ancorat de sursa de proiectie
   - dimensiunea textului si composerul raman lizibile/stabile
   ========================================================================== */
@media(min-width:1100px){
  :root{
    --chat-fluid-width:min(1080px,calc(100vw - var(--history-rail) - 340px));
    --user-message-inset:clamp(92px,6.4vw,132px);
  }

  /* Conversația nu mai arată ca o succesiune de panouri late. Spatiul este al dialogului. */
  .msgs{
    width:var(--chat-fluid-width)!important;
    padding:9px 8px 16px 2px!important;
    gap:14px!important;
  }

  .bubble.ai{
    width:min(88%,900px)!important;
    max-width:900px!important;
    padding:7px 4px 8px 44px!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    backdrop-filter:none!important;
  }
  .bubble.ai .message-head{
    margin-left:-34px!important;
    margin-bottom:5px!important;
  }

  /* Utilizatorul ramane vizual in dreapta, dar nu mai ajunge in zona lui Holo. */
  .bubble.user{
    align-self:flex-end!important;
    width:auto!important;
    max-width:min(58%,590px)!important;
    margin-left:auto!important;
    margin-right:var(--user-message-inset)!important;
    padding:10px 14px 10px!important;
    border-radius:15px!important;
    background:linear-gradient(135deg,rgba(18,51,105,.70),rgba(9,28,65,.58))!important;
    border-color:rgba(104,174,255,.20)!important;
    box-shadow:0 8px 24px rgba(0,0,0,.07)!important;
  }

  .message-content{
    font-size:16px!important;
    line-height:1.52!important;
  }

  /* Composerul urmareste aceeasi axa vizuala, fara sa se lipeasca de Holo. */
  .chat-footer{
    width:var(--chat-fluid-width)!important;
  }

  /* Crestere mica, nu schimbare de personaj: + aproximativ 6–8% fata de 8.11.7. */
  .chat-panel::before{
    right:clamp(-250px,-12vw,-190px)!important;
    bottom:clamp(-18px,-1.6vh,-4px)!important;
    width:min(clamp(760px,47vw,960px),calc((100dvh - var(--scene-header) - var(--scene-footer) + 104px) * 1.50))!important;
    transform-origin:center bottom!important;
  }
}

@media(min-width:1100px) and (max-height:760px){
  :root{
    --chat-fluid-width:min(1040px,calc(100vw - var(--history-rail) - 330px));
    --user-message-inset:clamp(78px,5.8vw,116px);
  }
  .msgs{gap:11px!important;padding-top:6px!important}
  .message-content{font-size:16px!important;line-height:1.48!important}
  .bubble.user{max-width:min(60%,570px)!important}
  .chat-panel::before{
    right:clamp(-248px,-12vw,-188px)!important;
    width:min(clamp(730px,47vw,930px),calc((100dvh - var(--scene-header) - var(--scene-footer) + 98px) * 1.50))!important;
  }
}

/* Etapa 8.11.9 — Open Beta access */
.beta-status{
  border-color:rgba(104,190,255,.42);
  background:rgba(13,57,116,.26);
  color:rgba(174,225,255,.94);
  font-family:"Space Mono",monospace;
  font-size:10px;
  letter-spacing:.14em;
  cursor:default;
  pointer-events:none;
}
body.open-beta #payBtn,
body.open-beta #upgradeBtn,
body.open-beta .subscription-summary,
body.open-beta #subscriptionModal{display:none!important}
body.open-beta #priceLine{color:rgba(154,219,255,.92)}

/* ========================================================================== 
   ETAPA 8.14.7 — CHAT READABILITY + HEADER SPACING
   - textul conversației este mărit discret pentru citire confortabilă pe laptop
   - istoricul din stânga crește proporțional, fără discrepanță vizuală
   - zona scrollabilă nu mai estompează/taie primul rând sub welcome header
   - fără repoziționarea lui Holo și fără redesenarea layout-ului
   ========================================================================== */
@media(min-width:1100px){
  :root{
    --history-rail:278px;
  }

  /* Mesajele principale: +2px față de reperul 8.11.8. */
  .message-content{
    font-size:18px!important;
    line-height:1.58!important;
  }
  .message-content h2{font-size:20px!important}
  .message-content h3{font-size:18.5px!important}
  .message-content h4{font-size:18px!important}

  /* Composerul urmărește aceeași scară de lizibilitate. */
  .input-row textarea{
    font-size:17px!important;
    line-height:1.48!important;
  }

  /* Istoricul crește proporțional; păstrăm ierarhia față de chat. */
  .history-header h2{font-size:20px!important}
  .history-new{font-size:15px!important}
  .history-open strong{
    font-size:14px!important;
    line-height:1.34!important;
  }
  .history-open small{font-size:10px!important}
  .history-note{font-size:11.5px!important;line-height:1.55!important}

  /* Mesajele nu mai sunt mascate la marginea de sus a zonei scrollabile.
     Welcome header-ul rămâne în propriul rând al grilei, iar chatul începe
     cu un spațiu clar dedesubt. */
  .msgs{
    padding-top:18px!important;
    scroll-padding-top:18px;
    -webkit-mask-image:linear-gradient(180deg,#000 0,#000 calc(100% - 8px),transparent 100%)!important;
    mask-image:linear-gradient(180deg,#000 0,#000 calc(100% - 8px),transparent 100%)!important;
  }
  .visual-welcome{
    padding-bottom:7px!important;
  }
}

/* Laptopuri joase: nu revenim la fontul mic; reducem doar un pas pentru a
   păstra composerul vizibil fără să sacrificăm lizibilitatea. */
@media(min-width:1100px) and (max-height:760px){
  :root{--history-rail:270px}
  .message-content{font-size:17px!important;line-height:1.54!important}
  .message-content h2{font-size:19px!important}
  .message-content h3{font-size:17.8px!important}
  .message-content h4{font-size:17px!important}
  .input-row textarea{font-size:16.5px!important}
  .history-open strong{font-size:13.5px!important}
  .history-open small{font-size:9.5px!important}
  .msgs{padding-top:14px!important;scroll-padding-top:14px}
}

/* 8.16.2.1 — conversation find + open */
.conversation-links{display:grid;gap:9px;margin:13px 0 4px;max-width:620px}
.conversation-link-card{display:grid;gap:4px;width:100%;padding:11px 13px;text-align:left;border:1px solid rgba(104,184,255,.24);border-radius:13px;background:rgba(8,29,62,.46);color:#eaf5ff;cursor:pointer;transition:transform .16s ease,border-color .16s ease,background .16s ease}
.conversation-link-card:hover,.conversation-link-card:focus-visible{transform:translateY(-1px);border-color:rgba(117,202,255,.46);background:rgba(13,43,88,.58);outline:none}
.conversation-link-label{font-family:"Space Mono",monospace;font-size:8px;letter-spacing:.09em;text-transform:uppercase;color:rgba(145,211,255,.72)}
.conversation-link-card strong{font-size:13px;line-height:1.35;font-weight:700}
.conversation-link-card small{font-size:10px;color:rgba(177,207,239,.64)}
.conversation-link-snippet{font-size:11.5px;line-height:1.42;color:rgba(220,235,251,.78);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.conversation-link-action{margin-top:2px;font-size:11px;font-weight:700;color:#a9dcff}
.bubble.conversation-jump-highlight{animation:conversationJumpHighlight 2.2s ease-out}
@keyframes conversationJumpHighlight{0%{box-shadow:0 0 0 1px rgba(118,213,255,.72),0 0 32px rgba(70,169,255,.22)}100%{box-shadow:0 0 0 0 rgba(118,213,255,0),0 0 0 rgba(70,169,255,0)}}
@media(max-width:700px){.conversation-links{max-width:100%}.conversation-link-card{padding:10px 11px}.conversation-link-snippet{font-size:11px}}
@media(prefers-reduced-motion:reduce){.conversation-link-card{transition:none}.bubble.conversation-jump-highlight{animation:none;outline:1px solid rgba(118,213,255,.55)}}

/* Etapa 8.16.3 · Topics / Projects lifecycle — lightweight, inside existing history. */
.history-item.topic-paused{opacity:.82}
.history-item.topic-closed{opacity:.62}
.history-topic-pill{font:inherit;font-size:7px;letter-spacing:.08em;text-transform:uppercase}
.history-topic-pill.paused{color:rgba(244,208,132,.8)}
.history-topic-pill.closed{color:rgba(177,194,216,.62)}
.history-topic-control{position:relative;display:flex}
.history-topic-button{font-size:17px!important;line-height:1;transform:translateY(-1px)}
.history-topic-menu{position:absolute;right:0;top:34px;z-index:24;display:none;min-width:112px;padding:5px;border:1px solid rgba(111,181,242,.2);border-radius:11px;background:rgba(4,13,29,.98);box-shadow:0 12px 35px rgba(0,0,0,.34)}
.history-topic-menu.open{display:grid}
.history-topic-menu button{width:auto!important;height:30px!important;padding:0 9px!important;text-align:left;font-size:10px!important;color:rgba(222,237,255,.76)}
.history-topic-menu button.selected{background:rgba(72,151,225,.12);color:#e8f7ff}

/* ========================================================================== 
   ETAPA 8.17.1 — PRESENTATION DISCOVERY
   Video-ul este o prezentare separată; nu înlocuiește manifestarea holografică.
   Se încarcă abia la click și pornește cu sunet din gestul utilizatorului.
   ========================================================================== */
.presentation-launch{
  pointer-events:auto;
  display:inline-flex;align-items:center;gap:9px;
  margin-top:11px;padding:7px 12px 7px 9px;
  border:1px solid rgba(105,193,255,.24);border-radius:999px;
  background:linear-gradient(180deg,rgba(9,31,64,.66),rgba(4,18,42,.52));
  color:#dff4ff;cursor:pointer;
  box-shadow:0 8px 26px rgba(0,8,28,.16),inset 0 1px 0 rgba(255,255,255,.025);
  transition:border-color .18s ease,background .18s ease,transform .18s ease,box-shadow .18s ease;
}
.presentation-launch:hover,.presentation-launch:focus-visible{
  border-color:rgba(114,214,255,.52);background:linear-gradient(180deg,rgba(12,42,83,.78),rgba(5,24,54,.64));
  box-shadow:0 0 0 3px rgba(79,185,255,.07),0 10px 30px rgba(0,8,28,.22);outline:none;
}
.presentation-launch:active{transform:translateY(1px)}
.presentation-launch-icon{
  display:grid;place-items:center;width:28px;height:28px;border-radius:50%;
  border:1px solid rgba(125,215,255,.30);background:rgba(31,111,202,.24);color:#bceaff;font-size:11px;
  box-shadow:0 0 18px rgba(75,185,255,.12);
}
.presentation-launch-copy{display:flex;align-items:baseline;gap:8px;white-space:nowrap}
.presentation-launch-copy strong{font-size:11px;font-weight:600;letter-spacing:.01em}
.presentation-launch-copy small{font-family:"Space Mono",monospace;font-size:7px;letter-spacing:.08em;text-transform:uppercase;color:rgba(181,214,245,.58)}

.presentation-modal{position:fixed;inset:0;z-index:120;display:none;align-items:center;justify-content:center;padding:22px}
.presentation-modal[aria-hidden="false"],body.presentation-open .presentation-modal{display:flex}
.presentation-backdrop{position:absolute;inset:0;background:rgba(0,5,16,.86);-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}
.presentation-dialog{
  position:relative;z-index:1;width:min(1080px,94vw);max-height:94dvh;overflow:auto;
  padding:24px;border:1px solid rgba(100,187,255,.24);border-radius:22px;
  background:linear-gradient(145deg,rgba(5,20,43,.97),rgba(1,8,22,.96));
  box-shadow:0 34px 110px rgba(0,0,0,.54),inset 0 1px 0 rgba(255,255,255,.025);
}
.presentation-close{
  position:absolute;z-index:3;right:14px;top:14px;width:38px;height:38px;border-radius:50%;
  border:1px solid rgba(118,188,255,.22);background:rgba(2,12,29,.74);color:#d8eeff;cursor:pointer;font-size:22px;line-height:1;
}
.presentation-close:hover,.presentation-close:focus-visible{border-color:rgba(120,218,255,.52);outline:none;box-shadow:0 0 0 3px rgba(75,184,255,.08)}
.presentation-kicker{font-family:"Space Mono",monospace;font-size:8px;letter-spacing:.22em;color:rgba(93,194,255,.65);text-transform:uppercase}
.presentation-heading{display:flex;align-items:end;justify-content:space-between;gap:18px;padding:7px 52px 14px 0}
.presentation-heading h2{margin:0;font-size:clamp(25px,2.4vw,38px);font-weight:500;letter-spacing:-.03em;color:#f0f7ff}
.presentation-heading p{margin:5px 0 0;font-size:12px;color:rgba(196,218,244,.62)}
.presentation-sound{font-family:"Space Mono",monospace;font-size:8px;letter-spacing:.08em;text-transform:uppercase;color:rgba(153,214,255,.62);white-space:nowrap}
.presentation-video-shell{
  position:relative;overflow:hidden;aspect-ratio:16/9;border:1px solid rgba(103,187,255,.22);border-radius:15px;
  background:#01050e;box-shadow:0 18px 60px rgba(0,0,0,.34),0 0 45px rgba(38,126,232,.08);
}
.presentation-video-shell video{display:block;width:100%;height:100%;object-fit:contain;background:#01050e}
.presentation-credit{display:flex;justify-content:flex-end;align-items:center;gap:8px;padding:12px 3px 0;font-family:"Space Mono",monospace;font-size:8px;letter-spacing:.10em;text-transform:uppercase;color:rgba(176,204,236,.54)}
.presentation-credit strong{font-weight:400;color:rgba(125,214,255,.84)}

@media(min-width:1100px) and (max-height:760px){
  .presentation-launch{margin-top:7px;padding-top:5px;padding-bottom:5px}
  .presentation-launch-icon{width:24px;height:24px}
  .presentation-dialog{width:min(930px,92vw);padding:18px}
  .presentation-heading{padding-bottom:9px}
}
@media(max-width:1099px){
  /* Pe ecranele unde welcome-ul este ascuns, accesul rămâne în meniul mobil. */
  .presentation-dialog{width:min(900px,96vw);padding:17px;border-radius:18px}
  .presentation-heading{align-items:flex-start;flex-direction:column;gap:6px;padding:5px 44px 11px 0}
  .presentation-sound{white-space:normal}
}
@media(max-width:620px){
  .presentation-modal{padding:8px}
  .presentation-dialog{width:100%;padding:12px;border-radius:15px}
  .presentation-close{right:9px;top:9px;width:34px;height:34px}
  .presentation-kicker{font-size:7px}
  .presentation-heading{padding-right:38px;padding-bottom:9px}
  .presentation-heading h2{font-size:23px}
  .presentation-heading p{font-size:10.5px}
  .presentation-sound{font-size:7px}
  .presentation-video-shell{border-radius:11px}
  .presentation-credit{justify-content:flex-start;font-size:7px;padding-top:9px}
}


/* ETAPA 8.17.2 — CAPABILITY DISCOVERY
   Un singur indiciu contextual pentru conversația goală. Fără tutorial, modal sau dashboard. */
.capability-discovery{
  display:none;
  align-items:center;
  gap:6px;
  min-height:28px;
  margin:0 10px 8px 12px;
  color:rgba(183,210,240,.58);
  font-family:"Space Mono",monospace;
  font-size:8px;
  letter-spacing:.04em;
}
.capability-discovery.on{display:flex}
.capability-discovery-lead{margin-right:2px;white-space:nowrap;color:rgba(171,203,238,.52)}
.capability-chip{
  display:inline-flex;
  align-items:center;
  gap:5px;
  min-height:26px;
  padding:4px 9px;
  border:1px solid rgba(91,172,255,.17);
  border-radius:999px;
  background:rgba(4,18,42,.38);
  color:rgba(204,226,250,.70);
  font:inherit;
  letter-spacing:.02em;
  cursor:pointer;
  transition:border-color .18s ease,background .18s ease,color .18s ease,transform .18s ease;
}
.capability-chip:hover,.capability-chip:focus-visible{
  border-color:rgba(103,198,255,.40);
  background:rgba(8,31,65,.62);
  color:rgba(231,244,255,.94);
  outline:none;
}
.capability-chip:active{transform:translateY(1px)}
.capability-chip.hidden{display:none}
.capability-dismiss{
  width:24px;
  min-width:24px;
  height:24px;
  margin-left:1px;
  border:0;
  border-radius:50%;
  background:transparent;
  color:rgba(176,205,235,.44);
  font-size:15px;
  line-height:1;
  cursor:pointer;
}
.capability-dismiss:hover,.capability-dismiss:focus-visible{color:rgba(231,244,255,.86);outline:none;background:rgba(62,140,225,.10)}
.capability-discovery[data-hint]::after{
  content:attr(data-hint);
  position:absolute;
  left:12px;
  bottom:100%;
  max-width:min(430px,80vw);
  margin-bottom:6px;
  padding:7px 9px;
  border:1px solid rgba(86,171,255,.24);
  border-radius:10px;
  background:rgba(2,12,29,.94);
  color:rgba(222,238,255,.86);
  font-family:Inter,system-ui,sans-serif;
  font-size:11px;
  letter-spacing:0;
  box-shadow:0 10px 26px rgba(0,0,0,.26);
}
@media (hover:none),(pointer:coarse){.capability-paste{display:none}}
@media (max-width:700px){
  .capability-discovery{gap:5px;margin:0 4px 6px 6px;overflow-x:auto;scrollbar-width:none}
  .capability-discovery::-webkit-scrollbar{display:none}
  .capability-discovery-lead{display:none}
  .capability-chip{flex:0 0 auto;min-height:25px;padding:4px 8px;font-size:7.5px}
  .capability-dismiss{flex:0 0 24px}
}

/* ETAPA 8.19.8.1 — PERFORMANCE GOVERNOR
   În idle/tastare păstrăm Holo viu, dar oprim animațiile secundare care țin compositorul ocupat continuu.
   Halo-ul, platforma și organismul Canvas rămân active; listening/thinking/speaking reiau scena completă. */
body[data-holo-perf-profile="idle"] .cosmic-dust,
body[data-holo-perf-profile="idle"] .orbit-one,
body[data-holo-perf-profile="idle"] .orbit-two,
body[data-holo-perf-profile="idle"] .orbit-three,
body[data-holo-perf-profile="idle"] .arc-left,
body[data-holo-perf-profile="idle"] .arc-right,
body[data-holo-perf-profile="typing"] .cosmic-dust,
body[data-holo-perf-profile="typing"] .orbit-one,
body[data-holo-perf-profile="typing"] .orbit-two,
body[data-holo-perf-profile="typing"] .orbit-three,
body[data-holo-perf-profile="typing"] .arc-left,
body[data-holo-perf-profile="typing"] .arc-right{
  animation-play-state:paused!important;
}
@media(max-width:980px){
  body[data-holo-perf-profile="idle"] .noise,
  body[data-holo-perf-profile="typing"] .noise{
    animation-play-state:paused!important;
  }
}
