
:root{color-scheme:light;--bg:#ffffff;--panel:#fffffff2;--line:#d9e2ec;--text:#24334b;--muted:#596b7d;--accent:#287f73;--cyan:#4a78b1}
*{box-sizing:border-box}html,body{height:100%;margin:0}body{background:var(--bg);color:var(--text);font-family:"Avenir Next",Avenir,"Segoe UI",sans-serif}button,textarea{font:inherit}button{cursor:pointer}button:focus-visible,textarea:focus-visible{outline:2px solid var(--accent);outline-offset:4px}.shell{width:100%;height:100dvh;min-height:580px;position:relative;overflow:hidden;background:radial-gradient(ellipse 70% 75% at 44% 56%,#f1f7ff 0%,#ffffff 53%,#ffffff 100%)}.shell::after{content:"";position:absolute;inset:0;pointer-events:none;background-image:radial-gradient(#4a78b1 0.65px,transparent 0.65px);background-size:28px 28px;opacity:.06}canvas{position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:grab}canvas.dragging{cursor:grabbing}.topbar{position:absolute;z-index:10;top:0;left:0;right:0;padding:27px 39px;display:flex;justify-content:space-between;align-items:center;pointer-events:none}.topbar>*{pointer-events:auto}.brand{display:flex;align-items:center;gap:12px;letter-spacing:-.6px;font-size:19px}.brand strong{font-weight:720}.brand-mark{position:relative;width:31px;height:29px;display:block}.brand-mark span{position:absolute;background:var(--accent);border-radius:50%;box-shadow:0 0 24px #287f7320}.brand-mark span:nth-child(1){width:10px;height:10px;top:4px;left:3px}.brand-mark span:nth-child(2){width:13px;height:13px;top:13px;left:13px}.brand-mark span:nth-child(3){width:6px;height:6px;top:2px;right:0}.brand-mark::before,.brand-mark::after{content:"";position:absolute;width:20px;height:1px;background:#287f73;transform-origin:left}.brand-mark::before{top:13px;left:10px;transform:rotate(28deg)}.brand-mark::after{top:10px;left:17px;transform:rotate(-30deg)}.beta{font-size:10px;font-weight:700;letter-spacing:1px;color:#596b7d;border:1px solid #d9e2ec;border-radius:5px;padding:3px 6px}.top-actions{display:flex;align-items:center;gap:26px;font-size:12px;color:var(--muted)}.status-dot,.pulse{display:inline-block;background:#287f73;width:7px;height:7px;border-radius:100%;box-shadow:0 0 16px #287f73}.demo-label{display:flex;gap:8px;align-items:center}.small-button{border:1px solid #d9e2ec;background:#ffffffd9;border-radius:9px;color:#24334b;padding:11px 15px;font-size:12px}.small-button:hover{border-color:#287f73}.context-note{position:absolute;z-index:3;left:6.1%;top:24%;width:min(290px,27vw);pointer-events:none}.smallcaps{color:#596b7d;font-size:10px;font-weight:750;letter-spacing:2.1px}.context-note h1{font-size:clamp(24px,2.55vw,38px);line-height:1.12;letter-spacing:-1.4px;margin:18px 0 14px;font-weight:650}.context-note em{font-weight:380;font-style:normal;color:#24334b}.context-note p{font-size:12px;line-height:1.8;color:#596b7d;max-width:210px}.sidepanel{position:absolute;z-index:4;right:2.6%;top:20%;width:min(300px,27vw);max-height:61%;overflow:hidden;background:#ffffffd9;border:1px solid #d9e2ec;border-radius:20px;backdrop-filter:blur(16px);box-shadow:0 28px 80px #375a8309;padding:24px;display:flex;flex-direction:column;gap:15px}.sideheading{display:flex;justify-content:space-between;align-items:center}.sideheading h2{font-size:17px;letter-spacing:-.5px;font-weight:620;margin:7px 0 0}.live-indicator{color:#287f73}.context-tags{display:flex;gap:5px;flex-wrap:wrap;min-height:23px}.hint-tag,.context-tag{border-radius:99px;font-size:10px;padding:6px 9px;background:#edf3fb;color:#476586}.context-tag{background:#e8f5ef;color:#276b61}.matches{display:flex;flex-direction:column;gap:8px;overflow:auto;min-height:0;padding-right:3px}.match{width:100%;text-align:left;border:1px solid #e7edf3;background:#ffffff00;color:inherit;border-radius:11px;padding:11px 12px;display:flex;gap:10px;align-items:flex-start}.match:hover,.match:focus-visible{border-color:#287f73;background:#f2f7fc}.match .avatar{flex:none;border-radius:50%;width:32px;height:32px;display:grid;place-items:center;background:linear-gradient(135deg,#e4edf8,#e4edf8);color:white;font-weight:700;font-size:10px}.match .meta{min-width:0}.match strong{font-size:11px;display:block;margin-bottom:4px}.match p{font-size:11px;line-height:1.45;margin:0;color:#465971;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.match small{display:block;margin-top:6px;color:#596b7d}.panel-foot{font-size:10px;line-height:1.5;color:#596b7d;border-top:1px solid #e7edf3;padding-top:11px}.composer{z-index:5;position:absolute;top:56%;left:50%;transform:translate(-50%,-50%);width:min(550px,46vw);background:linear-gradient(148deg,#fffffff2,#fffffff2);border:1px solid #b6cbdc;border-radius:19px;box-shadow:0 25px 100px #375a8314,0 0 44px #375a8300;backdrop-filter:blur(20px);padding:18px 19px 15px}.composer:focus-within{border-color:#287f73}.composer-label{display:flex;align-items:center;gap:9px;color:#356c63;font-size:11px;letter-spacing:.2px;margin-bottom:10px;min-width:0;overflow:hidden}#class-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.composer textarea{display:block;width:100%;max-height:155px;resize:vertical;min-height:77px;background:transparent;color:#24334b;border:0;outline:none;padding:4px 0;font-size:19px;line-height:1.48;letter-spacing:-.25px}.composer textarea::placeholder{color:#65778b}.composer textarea:focus{outline:none}.compose-actions{display:flex;align-items:center;justify-content:space-between;margin-top:9px}.compose-hint{display:flex;gap:8px;color:#596b7d;font-size:10px}.compose-hint .sep{color:#596b7d}.send-button{border:0;border-radius:9px;background:#287f73;color:#ffffff;padding:10px 13px;font-size:12px;font-weight:750;display:flex;align-items:center;gap:12px}.send-button:hover:not(:disabled){background:#21695f}.send-button:disabled{opacity:.4;cursor:not-allowed}.attachments{display:flex;gap:6px;flex-wrap:wrap}.link-chip{max-width:100%;display:flex;align-items:center;gap:7px;border:1px solid #cee0dc;background:#eef7f4;color:#356c63;border-radius:9px;padding:5px 7px;font-size:11px}.link-chip span{max-width:200px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.link-chip button{background:transparent;color:#356c63;border:0;font-size:17px;line-height:1}.footerbar{position:absolute;z-index:4;left:40px;right:40px;bottom:22px;display:flex;justify-content:space-between;align-items:center;pointer-events:none;color:#596b7d;font-size:11px}.legend{display:flex;gap:17px}.legend span{display:flex;gap:7px;align-items:center}.key{width:9px;height:9px;border-radius:100%;display:inline-block}.key.topic{background:#4a78b1}.key.person{background:#b46b55}.key.root{background:#287f73}.viewport-help span{padding:0 6px}.toast{position:absolute;z-index:20;bottom:64px;left:50%;transform:translateX(-50%) translateY(10px);pointer-events:none;opacity:0;transition:opacity .2s,transform .2s;background:#edf7f3;border:1px solid #b7d9cf;border-radius:10px;color:#265f55;padding:13px 17px;text-align:center;font-size:12px;max-width:90vw}.toast.visible{opacity:1;transform:translateX(-50%) translateY(0)}
@media(max-width:1050px){.context-note{left:4%;top:19%;width:230px}.context-note h1{font-size:26px}.sidepanel{right:3%;width:260px;top:18%;max-height:46%}.composer{width:52vw;top:58%}.footerbar{left:24px;right:24px}}
@media(max-width:740px){.shell{min-height:0}.topbar{padding:18px 17px}.brand{font-size:17px}.demo-label{display:none}.small-button{padding:9px 10px}.context-note{left:19px;top:86px;width:calc(100% - 38px)}.context-note h1{font-size:23px;line-height:1.13;margin:9px 0 4px}.context-note h1 br{display:none}.context-note p{margin:0;font-size:11px;max-width:100%}.sidepanel{top:auto;bottom:192px;left:15px;right:15px;width:auto;max-height:165px;padding:12px 14px;border-radius:14px;gap:7px}.sideheading h2{font-size:12px;margin:4px 0 0}.sideheading .smallcaps{font-size:8px}.matches{flex-direction:row;overflow:auto;gap:7px}.match{flex:0 0 190px;padding:8px}.match .avatar{width:25px;height:25px}.match p{font-size:10px}.match small{font-size:9px}.context-tags,.panel-foot{display:none}.composer{position:absolute;top:auto;bottom:14px;left:13px;right:13px;transform:none;width:auto;padding:12px 13px;border-radius:15px}.composer textarea{min-height:45px;max-height:105px;font-size:16px}.composer-label{font-size:10px;margin-bottom:4px}.compose-actions{margin-top:4px}.compose-hint{font-size:9px}.compose-hint span:last-child,.sep{display:none}.footerbar{display:none}.toast{bottom:270px;width:85vw}.shell::after{opacity:.02}}
@media(max-height:600px) and (min-width:741px){.context-note{top:16%}.sidepanel{top:18%;max-height:64%}.composer{top:57%}.composer textarea{min-height:48px}.footerbar{bottom:11px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Quiet chrome keeps the graph and the writing field in focus. */
canvas:focus-visible{outline:2px solid var(--accent);outline-offset:-6px}
.shell::after{display:none}
.context-note h1{font-weight:600;line-height:1.18;margin-top:0}
.sideheading h2{margin:0}
.match{border:0;border-bottom:1px solid #e7edf3;border-radius:0;background:transparent;padding-left:0;padding-right:0}
.match .avatar{color:#3b6090;background:#e4edf8;overflow:hidden}
.match .avatar img{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}
.account-avatar{width:18px;height:18px;border-radius:50%;object-fit:cover;vertical-align:middle;margin-right:6px}
.small-button{display:inline-flex;align-items:center}
.composer textarea:focus{outline:2px solid #d3e8e2;outline-offset:3px;border-radius:3px}
@media(min-width:741px) and (max-width:1050px){.composer{top:67%}.sidepanel{width:240px;max-height:42%}}
@media(max-width:740px){.context-note h1{margin-top:0}.composer{bottom:max(14px,env(safe-area-inset-bottom))}}

/* V2 rede social: painel de contribuições persistidas. */
.detail[hidden]{display:none!important}
.detail{position:absolute;z-index:16;top:100px;right:23px;bottom:55px;width:min(380px,95vw);
  background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:16px;
  display:flex;flex-direction:column;box-shadow:0 16px 60px #192d3c28;backdrop-filter:blur(16px)}
.detail-header{display:flex;align-items:center;justify-content:space-between;padding:18px 18px 12px;border-bottom:1px solid var(--line)}
.detail-header button{border:0;background:transparent;color:var(--text);font-size:26px;padding:0 5px}
.detail-content{padding:18px;overflow:auto;display:flex;flex-direction:column;gap:13px;font-size:13px}
.detail-author{font-size:12px;font-weight:700;color:var(--accent)}
.detail-body{font-size:17px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere;margin:0}
.detail-links{display:flex;flex-wrap:wrap;gap:8px}
.detail-links a{font-size:12px;color:var(--accent);border:1px solid var(--line);border-radius:6px;padding:8px}
.detail-actions{display:flex;gap:7px}.detail-actions button{font-size:11px}
.detail-comments{display:flex;flex-direction:column;gap:11px}
.detail-comment{border:1px solid var(--line);border-radius:10px;padding:12px}
.detail-comment strong{font-size:12px}.detail-comment p{white-space:pre-wrap;margin:7px 0 0;line-height:1.5}
.detail-form{display:flex;flex-direction:column;gap:10px}
.detail-form textarea{width:100%;border:1px solid var(--line);border-radius:10px;padding:10px;color:var(--text);background:var(--panel);resize:vertical}
.detail-form button{align-self:flex-end}.detail-info{color:var(--muted)}
.conversation-thread{display:flex;flex-direction:column;gap:11px;padding:0 0 5px}
.conversation-heading,.testimonial-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}
.conversation-heading h3,.testimonial-heading h3{margin:0}
.conversation-subtitle{margin:-7px 0 0;color:var(--muted);font-size:11px;line-height:1.45}
.conversation-pinned{position:sticky;top:-12px;z-index:1;padding:11px 12px;border:1px solid #b9d9d2;border-radius:13px;
  background:rgba(237,247,244,.97);box-shadow:0 6px 18px #173a3012;backdrop-filter:blur(12px)}
.conversation-pin-label{display:flex;align-items:center;gap:6px;color:var(--accent);font-size:9px;font-weight:750;letter-spacing:.09em;margin-bottom:8px}
.conversation-pin-label::before{content:"⌖";font-size:13px;line-height:1}
.conversation-message-author,.testimonial-author{display:flex;align-items:center;gap:8px;min-width:0}
.conversation-message-author img,.testimonial-author img{width:27px;height:27px;flex:none;object-fit:cover;border-radius:50%;border:1px solid var(--line)}
.conversation-message-author strong,.testimonial-author strong{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.conversation-message-author time,.testimonial-author time{font-size:10px;color:var(--muted);margin-left:auto;white-space:nowrap}
.conversation-pinned .detail-body{margin-top:8px;font-size:13px;line-height:1.5}
.conversation-pinned .detail-links{margin-top:8px}
.detail-comments{gap:9px;min-height:70px;padding:5px 2px 2px}
.conversation-bubble{max-width:88%;padding:9px 11px;border:1px solid #dce8e5;border-radius:4px 14px 14px 14px;
  background:#fff;align-self:flex-start;box-shadow:0 2px 7px #182d3b0b}
.conversation-bubble:has(.conversation-message-author button){background:#fff;border-color:#dce8e5}
.conversation-bubble.is-self{align-self:flex-end;border-color:#b9ded1;border-radius:14px 4px 14px 14px;background:#e8f5ef}
.conversation-bubble p{white-space:pre-wrap;overflow-wrap:anywhere;margin:6px 0 0;line-height:1.5;font-size:12px}
.conversation-thread>.detail-actions{padding:2px 0 4px}
.text-button{border:0;background:transparent;color:var(--accent);font-size:10px;padding:5px 3px;text-decoration:underline;text-underline-offset:2px}
.text-button:disabled{opacity:.4;cursor:default;text-decoration:none}
.detail-form{display:grid;grid-template-columns:1fr auto;align-items:end;gap:7px 9px;border-top:1px solid var(--line);padding-top:10px}
.detail-form textarea{grid-column:1/-1}
.detail-form .detail-info{font-size:10px}
.detail-form button{grid-column:2;grid-row:2}
.testimonial-section{display:flex;flex-direction:column;gap:10px;border-top:1px solid var(--line);padding-top:12px}
.testimonial-list{display:flex;flex-direction:column;gap:8px}
.testimonial-card{border:1px solid var(--line);border-radius:12px;padding:10px 11px;background:#fff}
.testimonial-body{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5;margin:8px 0 4px;font-size:12px}
.testimonial-actions{display:flex;gap:8px;flex-wrap:wrap}
.testimonial-form{display:flex;flex-direction:column;gap:7px;padding-top:4px}
.testimonial-form textarea{width:100%;min-height:70px;resize:vertical;border:1px solid var(--line);border-radius:11px;padding:10px;color:var(--text);background:#fff}
.testimonial-form-footer{display:flex;align-items:center;justify-content:space-between;gap:8px}
.testimonial-form-footer .detail-info{font-size:10px}
@media(max-width:740px){.detail{inset:60px 10px 12px 10px;width:auto;bottom:12px;border-radius:15px}.top-actions{gap:6px}.top-actions #account{font-size:10px;padding:8px}.detail-content{padding:13px}}

/* Transparência de rascunhos e links legais. */
.draft-note{font-size:10px;line-height:1.5;color:var(--muted);margin:0 0 9px}
.draft-note a,.legal-link{color:var(--accent);text-decoration:underline;text-underline-offset:2px}
.compose-buttons{display:flex;gap:8px;align-items:center}.compose-buttons .small-button{font-weight:600}
#engine-state{margin:9px 0 0;min-height:15px}.answer-point{line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere;margin:0}
.source-button{text-align:left;border:1px solid var(--line);border-radius:9px;background:#edf7f3;padding:10px;font-size:11px;color:var(--accent)}
.footerbar a{pointer-events:auto}
@media(max-width:740px){.draft-note{font-size:9px;margin:0 0 5px}.footerbar{display:flex;position:absolute;bottom:2px;top:auto;left:0;right:0;justify-content:center;font-size:9px;z-index:6;pointer-events:none}.footerbar .legend{display:none}.footerbar .viewport-help{display:block;background:rgba(255,255,255,.8);backdrop-filter:blur(6px);padding:2px 10px;border-radius:99px}.composer{padding-top:10px}}

/* Convites: overlay discreto, sem interferir na navegação do grafo. */
.invites-dialog{box-sizing:border-box;max-width:min(440px,calc(100vw - 24px));width:100%;max-height:min(85vh,720px);overflow:auto;border:1px solid #dae8e8;border-radius:19px;box-shadow:0 25px 75px #192e4b29;padding:24px;background:#fff;color:#23344c;font:inherit}
.invites-dialog::backdrop{background:rgba(15,33,52,.3);backdrop-filter:blur(3px)}
.invite-head{display:flex;align-items:center;justify-content:space-between;font-size:20px;gap:14px}
.invite-head button{border:0;background:transparent;font-size:25px;cursor:pointer;color:inherit}
.invite-intro{line-height:1.6;font-size:13px;color:#617387;margin:12px 0 20px}
.invites-dialog label{display:block;font-size:12px;margin:12px 0 6px}
.invites-dialog input:not([type=checkbox]){display:block;box-sizing:border-box;width:100%;font:inherit;font-size:13px;padding:12px;border-radius:10px;border:1px solid #bdd2d3;color:#23415a;background:#fff}
.invites-dialog input:focus-visible,.invites-dialog button:focus-visible{outline:2px solid #258d80;outline-offset:2px}
.invites-dialog .small-button{margin-top:8px;min-height:38px}
.invite-consent{display:flex!important;align-items:flex-start;gap:8px;line-height:1.6;color:#465f69}
.invite-consent input{margin-top:4px}
.invite-small{font-size:11px;color:#657982;line-height:1.6}
.invite-feedback{min-height:18px;font-size:12px;color:#287f73}
.invite-separator{margin:18px 0 4px;color:#799099;font-size:12px}
#invites-share{margin-top:14px}
@media(max-width:600px){.invites-dialog{padding:19px;border-radius:15px}.top-actions #invites-open{font-size:11px}}

/* UI fix: o input de foto é acionado apenas pelo avatar. Jamais ocupa a tela. */
#avatar-input,#avatar-input:not([type=checkbox]){display:none!important;position:absolute!important;width:0!important;height:0!important;opacity:0!important;pointer-events:none!important}
/* O grafo real permanece desenhado atrás do campo, sem encobrir controles. */
#universe{z-index:1;display:block;min-width:0;max-width:100%}
.composer{z-index:5;background:rgba(255,255,255,.89);box-shadow:0 22px 80px rgba(55,90,131,.09);backdrop-filter:blur(11px)}
.shell{max-width:100vw;overflow:hidden}
@media(max-width:740px){.composer{max-width:calc(100vw - 26px)}.topbar{max-width:100%;gap:6px;padding:14px 16px}.top-actions{min-width:0;gap:4px}.top-actions .small-button{padding:7px 9px;font-size:11px;max-width:38vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}

/* [hidden] tem precedência sobre display:flex e regras de componentes. */
[hidden]{display:none!important}

/* Mobile: o cabeçalho nunca deve se sobrepor; manter grafo e escrita acessíveis. */
@media(max-width:740px){
  .topbar{padding:12px 12px;gap:4px;align-items:center}
  .brand{font-size:14px;gap:6px;white-space:nowrap;flex-shrink:0}
  .brand-mark{transform:scale(.87);transform-origin:center;width:27px}
  .beta{font-size:8px;padding:2px 4px;letter-spacing:0}
  .top-actions{flex:1;min-width:0;gap:5px;justify-content:flex-end}
  .top-actions #invites-open{padding:7px 6px;font-size:10px;flex:0 0 auto}
  .top-actions #account{display:block;min-width:0;max-width:108px;flex:0 1 auto;padding:7px 7px;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .top-actions #reset{display:inline-flex;justify-content:center;flex:0 0 28px;max-width:28px;padding:6px;font-size:0}
  .top-actions #reset span{font-size:16px}
  .context-note{top:85px;left:13px;width:calc(100% - 26px);max-width:350px;padding:8px 11px;border-radius:10px;background:linear-gradient(90deg,rgba(255,255,255,.96) 0%,rgba(255,255,255,.91) 75%,rgba(255,255,255,.10) 100%);z-index:3}
  .context-note h1{font-size:23px;line-height:1.12;margin:0 0 6px}
  .context-note p{font-size:11px;margin:0}
  .sidepanel{bottom:220px;max-height:145px}
  .footerbar{display:none}
}
@media(max-width:360px){
  .brand{font-size:13px;gap:4px}
  .brand .beta{display:none}
  .top-actions #account{max-width:88px}
}
#engine-state:empty{display:none}

/* Tablet: reservar áreas sem colisão real entre cards e título. */
@media(min-width:741px) and (max-width:1219px){
  .composer{left:calc(50% - 106px)}
  .context-note{top:max(78px,9vh)}
}
@media(min-width:1051px) and (max-height:760px){
  .composer{top:67%}
}

/* Beta mobile: conversas ficam no alto; nunca encobrir o avatar ou as ligações do grafo. */
@media(max-width:740px){
  .sidepanel{top:clamp(180px,23dvh,205px);bottom:auto;max-height:74px;min-height:54px;overflow:hidden;padding:9px 12px;gap:6px}
  .sideheading h2{font-size:12px;margin:0}
  .matches{max-height:47px;min-height:0;overflow-x:auto;overflow-y:hidden}
  .match{flex:0 0 180px;min-height:0;padding:5px 4px}
  .match p{overflow:hidden;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}
}

/* Telas baixas: liberar espaço do grafo em vez de sobrepor título, conversas e avatar. */
@media(max-width:740px) and (max-height:700px){
  .context-note{display:none}
  .sidepanel{top:76px;max-height:65px;min-height:48px}
  .composer textarea{min-height:40px}
}

/* Responsive conversation surfaces. The graph stays a background surface;
   reading, writing and navigation remain above it and independently scrollable. */
html,body{min-width:0;max-width:100%;overflow-x:hidden}
.shell{isolation:isolate;min-height:0;max-width:100%}
.sidepanel,.matches,.match,.match .meta,.composer,.compose-actions,.compose-buttons,
.detail,.detail-header,.detail-content,.detail-content>*{min-width:0}
.match{overflow-wrap:anywhere}
.match .meta{flex:1}
.match strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.match-group{display:flex;flex-direction:column;gap:7px;min-width:0}
.match-group-head{display:flex;justify-content:space-between;align-items:center;gap:8px;
  font-size:11px;font-weight:700;color:var(--text);min-width:0}
.match-group-count{flex:0 0 auto;font-size:10px;font-weight:500;color:var(--muted)}
.match-group-items{display:flex;flex-direction:column;gap:7px;min-width:0}
.match-group-items .match{width:100%}
.matches:empty::before{content:"Contribuições relacionadas aparecerão aqui conforme você escreve.";
  align-self:center;color:var(--muted);font-size:11px;line-height:1.4}
.matches-empty{font-size:11px;line-height:1.45;color:var(--muted);
  margin:4px 0;overflow-wrap:anywhere}
.detail-content{min-height:0;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.detail-body,.answer-point,.detail-comment p,.detail-info{overflow-wrap:anywhere}
.detail-header{gap:10px;flex:0 0 auto}
.detail-header strong{flex:1;min-width:0}
.detail-header button{flex:0 0 auto;min-width:38px;min-height:38px;line-height:1;touch-action:manipulation}
.detail-header .detail-expand{font-size:11px;font-weight:700;padding:8px 11px;
  color:#2d6b62;border:1px solid #cbded9;border-radius:9px;background:#f1f8f6;
  white-space:nowrap}
.detail-actions{flex-wrap:wrap;align-items:center}
.detail-actions .small-button,.detail-form button{min-height:38px}
.detail-form{position:sticky;bottom:0;z-index:2;padding:12px 0 2px;
  background:linear-gradient(to bottom,rgba(255,255,255,.93),#fff 18px);border-top:1px solid var(--line)}
.detail-form textarea{min-height:52px;max-height:120px;font-size:16px;border-radius:18px;padding:12px 14px}
.draft-context,.detail-insight{color:#396c65;font-size:11px;line-height:1.4;
  background:#edf7f4;border:1px solid #d2eae2;overflow-wrap:anywhere}
.draft-context{display:flex;align-items:center;flex-wrap:wrap;gap:6px;padding:7px 9px;
  margin:0 0 8px;border-radius:9px}
.draft-context-label{font-weight:750;color:#28695e}
.draft-context-area{display:flex;flex:1 1 auto;align-items:center;flex-wrap:wrap;gap:5px;min-width:0}
.draft-context-note{flex:1 1 100%;color:#5d726d;font-size:10px}
.draft-explanation{margin:0 0 8px;border:1px solid #d8e6e2;border-radius:9px;background:#fff;color:#385a55;font-size:11px}
.draft-explanation summary{cursor:pointer;list-style:none;padding:7px 9px;font-weight:650;color:#28695e}
.draft-explanation summary::-webkit-details-marker{display:none}
.draft-explanation summary::before{content:"＋";display:inline-block;width:18px;color:#287f73}
.draft-explanation[open] summary::before{content:"−"}
.draft-explanation summary:focus-visible{outline:2px solid #287f73;outline-offset:2px;border-radius:7px}
.draft-explanation-content{padding:0 9px 8px}
.draft-explanation-content dl{margin:0;display:grid;gap:6px}
.draft-explanation-row{display:grid;grid-template-columns:minmax(92px,.65fr) minmax(0,1.5fr);gap:2px 8px;padding-top:6px;border-top:1px solid #edf2f0}
.draft-explanation-row dt{font-weight:700;color:#385a55}
.draft-explanation-row dd{margin:0;color:#24334b;overflow-wrap:anywhere}
.draft-explanation-row small{grid-column:2;color:#667b76;line-height:1.4}
.draft-explanation-foot{margin:7px 0 0;padding-top:6px;border-top:1px solid #edf2f0;color:#667b76;font-size:10px;line-height:1.4}
.detail-insight{display:flex;flex:0 0 auto;align-items:center;flex-wrap:wrap;gap:6px;
  margin:10px 16px 0;padding:8px 10px;border-radius:10px}
.detail-insight-pill{display:inline-flex;max-width:100%;overflow-wrap:anywhere;
  padding:4px 7px;border-radius:8px;background:rgba(255,255,255,.82);color:#32675e}
.draft-context > *, .detail-insight > *{max-width:100%;min-width:0;margin:0;overflow-wrap:anywhere}
.draft-context .context-tag,.detail-insight .context-tag{font-size:10px}
.post-feedback{position:absolute;z-index:6;left:50%;bottom:calc(44% + 130px);
  transform:translateX(-50%);width:min(480px,43vw);max-height:150px;overflow-y:auto;
  padding:13px 15px;border:1px solid #cbe3dd;border-radius:15px;
  color:#23483f;background:rgba(250,255,253,.97);box-shadow:0 12px 34px #234e4c1c;
  font-size:12px;line-height:1.45;overscroll-behavior:contain;overflow-wrap:anywhere}
.post-feedback h2,.post-feedback h3,.post-feedback p{margin:0 0 7px}
.post-feedback-title{display:block;font-weight:750;font-size:13px;margin-bottom:5px}
.post-feedback-body{color:#435d57;line-height:1.4;overflow-wrap:anywhere}
.post-feedback .feedback-actions,.post-feedback .post-feedback-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:9px}
.post-feedback button,.post-feedback a{display:inline-flex;align-items:center;justify-content:center;
  min-height:36px;padding:7px 11px;border:1px solid #c4ddd6;border-radius:9px;
  color:#216b5f;background:#fff;font:inherit;font-weight:650;text-decoration:none}
.post-feedback button:focus-visible,.post-feedback a:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

@media(max-width:740px){
  .shell{height:100dvh;overflow:hidden}
  #universe{opacity:.87}
  .shell.is-composing #universe{opacity:.74}
  .shell.has-recent-post #universe{opacity:.72}
  .topbar{top:0;padding:calc(10px + env(safe-area-inset-top,0px)) 12px 8px;align-items:center}
  .brand{font-size:14px;gap:6px}
  .top-actions{gap:5px}
  .top-actions #account{max-width:clamp(70px,26vw,130px)}
  .context-note{top:calc(82px + env(safe-area-inset-top,0px));left:14px;
    width:calc(100% - 28px);max-width:440px;padding:0;border-radius:0;
    background:none}
  .context-note h1{font-size:clamp(20px,5.5vw,24px);line-height:1.14;margin:0 0 5px}
  .context-note p{font-size:11px;line-height:1.4}
  .shell.is-composing .context-note{display:none}

  /* A readable horizontal strip of real contributions, rather than cut-off previews. */
  .sidepanel{top:calc(197px + env(safe-area-inset-top,0px));bottom:auto;
    left:12px;right:12px;width:auto;height:clamp(160px,22dvh,186px);
    max-height:none;min-height:0;padding:11px 12px 9px;border-radius:15px;
    gap:8px;background:rgba(255,255,255,.94);box-shadow:0 7px 25px #375a8314}
  .shell.is-composing .sidepanel{top:calc(82px + env(safe-area-inset-top,0px))}
  .sideheading{flex:0 0 auto;gap:8px}
  .sideheading h2{font-size:14px;line-height:1.2;margin:0}
  .context-tags{display:flex;flex:0 0 auto;flex-wrap:nowrap;min-height:0;
    max-height:26px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
  .context-tags::-webkit-scrollbar,.matches::-webkit-scrollbar{display:none}
  .hint-tag,.context-tag{flex:0 0 auto;font-size:10px;padding:4px 7px;white-space:nowrap}
  .panel-foot{display:none}
  .matches{display:flex;flex:1;flex-direction:row;gap:8px;
    overflow-x:auto;overflow-y:hidden;padding:0 0 3px;align-items:stretch;
    scroll-snap-type:x proximity;scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .match-group{flex:0 0 min(255px,83vw);max-width:calc(100vw - 50px);
    gap:5px;scroll-snap-align:start}
  .match-group-head{flex:0 0 auto;line-height:1.15;font-size:10px}
  .match-group-count{font-size:9px}
  .match-group-items{flex:1;min-height:0;flex-direction:row;gap:6px;
    overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;
    scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .match-group-items::-webkit-scrollbar{display:none}
  .match-group-items .match{flex:0 0 min(228px,72vw);width:auto;
    min-width:0;scroll-snap-align:start}
  .match{flex:0 0 min(240px,79vw);max-width:90%;min-height:0;height:100%;
    padding:7px 9px;border:1px solid #e0e9ed;border-radius:11px;background:#fff;
    display:flex;gap:8px;scroll-snap-align:start}
  .match .avatar{width:28px;height:28px}
  .match strong{font-size:11px;line-height:1.2;margin-bottom:3px}
  .match p{font-size:11px;line-height:1.35;display:-webkit-box;
    -webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .match small{font-size:9px;line-height:1.3;margin-top:3px}

  /* Small composer anchored to the visual viewport; actions stay reachable. */
  .composer{z-index:8;top:auto;
    bottom:calc(12px + max(env(safe-area-inset-bottom,0px),env(keyboard-inset-height,0px)));
    left:12px;right:12px;width:auto;max-width:none;transform:none;
    height:auto;max-height:min(45dvh,285px);overflow-y:auto;overflow-x:hidden;
    display:flex;flex-direction:column;gap:0;padding:11px 12px 10px;
    border-radius:16px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
  .composer-label{order:0;margin:0 0 5px;flex:0 0 auto;font-size:10px}
  .draft-context{order:1;flex:0 0 auto;margin:0 0 5px;padding:6px 8px;font-size:10px}
  .composer textarea{order:2;flex:0 0 auto;min-height:42px;max-height:min(105px,17dvh);
    padding:3px 0;font-size:16px;line-height:1.35;resize:vertical}
  .attachments{order:3;flex:0 0 auto}
  .draft-note{order:4;flex:0 0 auto;margin:5px 0 0;font-size:10px}
  .compose-actions{order:5;position:sticky;bottom:0;z-index:1;flex:0 0 auto;
    display:flex;align-items:center;gap:8px;margin:5px 0 0;padding:6px 0 0;
    background:rgba(255,255,255,.96)}
  .compose-buttons{gap:6px;flex-wrap:nowrap}
  .compose-buttons .small-button,.compose-buttons .send-button{font-size:11px;
    min-height:36px;padding:8px 9px;white-space:nowrap}
  .compose-hint{flex:0 0 auto}
  .footerbar{display:flex;z-index:7;top:calc(55px + env(safe-area-inset-top,0px));
    bottom:auto;left:12px;right:12px;justify-content:flex-end;pointer-events:none}
  .footerbar .legend{display:none}
  .footerbar .viewport-help{display:flex;align-items:center;gap:6px;
    font-size:0;background:rgba(255,255,255,.93);padding:3px 5px;
    border-radius:7px}
  .footerbar .legal-link{pointer-events:auto;font-size:10px}
  .toast{bottom:calc(194px + env(safe-area-inset-bottom,0px));
    max-width:calc(100vw - 26px);padding:10px 13px}

  /* Discussion uses a bottom sheet with a scrollable body and compact header. */
  .detail{z-index:16;top:auto;right:0;bottom:env(keyboard-inset-height,0px);left:0;width:100%;height:auto;
    min-height:0;max-height:70dvh;border:1px solid #d4e2e8;border-bottom:0;
    border-radius:21px 21px 0 0;overflow:hidden;
    background:#fff;box-shadow:0 -10px 45px #192d3c2a}
  .detail::before{content:"";display:block;flex:0 0 4px;align-self:center;
    width:38px;height:4px;margin:8px 0 0;background:#b6c7cb;border-radius:100px}
  .detail-header{padding:7px 13px 7px;border-bottom:1px solid var(--line);font-size:14px}
  .detail-header button{font-size:23px;min-height:36px;min-width:38px}
  .detail-header .detail-expand{font-size:11px;min-height:34px;padding:7px 9px}
  .detail-insight{font-size:10px;line-height:1.35;margin:8px 12px 0;padding:7px 9px;
    max-height:84px;overflow:auto}
  .detail-content{flex:0 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;
    padding:12px 13px calc(12px + env(safe-area-inset-bottom,0px));gap:10px;
    font-size:12px;max-height:100%}
  .detail-content h3{font-size:14px;margin:3px 0}
  .detail-body{font-size:14px;line-height:1.5}
  .detail-comments{gap:8px}
  .detail-comment{padding:9px}
  .detail-actions{gap:6px}
  .detail-actions .small-button{min-height:35px;padding:7px 9px}
  .detail-form{padding:10px 0 calc(8px + env(safe-area-inset-bottom,0px))}
  .detail-form{display:grid;grid-template-columns:1fr auto;align-items:center;gap:5px 8px}
  .conversation-bubble{max-width:92%;padding:9px 10px}
  .conversation-pinned{top:-12px;padding:10px 11px}
  .testimonial-card{padding:9px}
  .testimonial-form textarea{font-size:16px;min-height:60px}
  .detail-form textarea{font-size:16px;min-height:48px;max-height:90px}
  .detail.expanded{height:calc(100dvh - 65px - env(safe-area-inset-top,0px));
    max-height:calc(100dvh - 65px - env(safe-area-inset-top,0px))}
  .detail.expanded .detail-content{flex:1 1 auto}

  .post-feedback{left:12px;right:12px;bottom:clamp(188px,24dvh,240px);
    transform:none;width:auto;max-height:min(145px,23dvh);padding:10px 12px;
    border-radius:13px;font-size:11px;line-height:1.35}
  .post-feedback p{margin-bottom:5px}
  .post-feedback button,.post-feedback a{min-height:34px;padding:7px 9px}
  .shell.has-recent-post .composer textarea{min-height:34px;max-height:70px}
}
@media(max-width:740px) and (max-height:760px){
  .context-note{display:none}
  .sidepanel{top:calc(82px + env(safe-area-inset-top,0px));
    height:clamp(128px,22dvh,170px)}
  .context-tags{display:none}
  .composer{max-height:min(46dvh,240px)}
  .post-feedback{bottom:clamp(166px,27dvh,205px);max-height:110px}
}
@media(max-width:740px) and (max-height:530px){
  .sidepanel{height:90px}
  .context-tags{display:none}
  .match-group-head,.match small{display:none}
  .match p{-webkit-line-clamp:1}
  .composer{max-height:calc(100dvh - 68px - env(safe-area-inset-top,0px))}
  .composer textarea{min-height:34px;max-height:75px}
  .shell.is-composing .sidepanel{visibility:hidden}
  .post-feedback{max-height:83px;bottom:clamp(137px,31dvh,165px)}
}
@media(max-width:365px){
  .sidepanel{left:9px;right:9px}
  .composer{left:9px;right:9px;padding-left:10px;padding-right:10px}
  .compose-buttons .small-button,.compose-buttons .send-button{font-size:10px;padding:7px}
  .compose-hint{font-size:9px}
  .post-feedback{bottom:max(194px,33dvh)}
}
.draft-ai-status{font-size:10px;color:#5c5a81;background:#f4f1fa;
  border:1px dashed #c9c0de;border-radius:8px;margin:0 0 7px;padding:6px 8px;
  line-height:1.45;overflow-wrap:anywhere}
.mobile-legal{display:none}
/* Em desktops compactos o contexto ganha altura quando a IA mostra intenção.
   Descer a caixa evita qualquer colisão entre o título e a escrita. */
@media(min-width:1051px) and (max-width:1280px) and (min-height:761px){
  .composer{top:65%}
}
@media(min-width:1051px) and (max-width:1280px) and (min-height:650px) and (max-height:760px){
  .composer{top:72%}
  .context-note{top:18%}
}
@media(prefers-reduced-motion:reduce){
  .matches,.match-group-items{scroll-snap-type:none}
}


/* Correção voluntária da categoria, sem sobrecarregar o mobile. */
.topic-choice{margin:4px 0 8px;padding:7px 10px;border:1px solid #d2eae2;
  border-radius:9px;background:rgba(255,255,255,.96);color:#375d58;font-size:11px;
  max-width:100%;overflow-wrap:anywhere}
.topic-choice summary{cursor:pointer;font-weight:700;min-height:24px}
.topic-choice[open]{display:flex;flex-direction:column;gap:5px}
.topic-choice label{font-size:11px;font-weight:600}
.topic-choice select{width:100%;max-width:100%;min-height:37px;padding:6px;
  border:1px solid #b8d4cd;border-radius:8px;background:#fff;color:#24334b;font-size:14px}
.topic-choice small{font-size:10px;line-height:1.4;color:#596b7d}
@media(max-width:740px){.topic-choice{margin:1px 0 5px;padding:5px 8px}.topic-choice summary{min-height:21px}}

/* Universo imersivo V2. Camadas do grafo preservam o compositor e a navegação. */
.shell{height:var(--vc-view-height,100dvh)}
#universe{z-index:2}
.sound-toggle{border:1px solid #d9e2ec;border-radius:9px;background:#fff;color:#456b67;padding:8px;font-size:11px;min-height:36px}
.sound-toggle[aria-pressed=true]{background:#e6f4ee;border-color:#287f73}
.graph-card{position:absolute;z-index:9;width:min(280px,calc(100% - 24px));padding:13px 14px;
  background:rgba(255,255,255,.97);border:1px solid #d2e4e2;border-radius:13px;
  box-shadow:0 14px 48px #20364b23;backdrop-filter:blur(10px);overflow-wrap:anywhere}
.graph-card-title{display:block;font-size:14px;font-weight:750}
.graph-card-body{margin:8px 0;line-height:1.5;font-size:12px;max-height:72px;overflow:hidden}
.graph-card-note{display:block;color:#546b75;font-size:10px;line-height:1.35}
.graph-card-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}
.graph-card-actions button{min-height:38px}
.graph-context-menu{position:fixed;z-index:30;display:flex;flex-direction:column;gap:3px;
  width:max-content;min-width:176px;max-width:min(240px,calc(100vw - 16px));
  padding:6px;background:rgba(255,255,255,.98);border:1px solid #cbdedb;
  border-radius:12px;box-shadow:0 14px 42px #20364b2b;backdrop-filter:blur(12px)}
.graph-context-menu[hidden]{display:none}
.graph-context-action{min-height:38px;padding:8px 11px;border:0;border-radius:8px;
  background:transparent;color:#24334b;text-align:left;font-size:12px;font-weight:600}
.graph-context-action:hover,.graph-context-action:focus-visible{outline:none;background:#e9f5ef;color:#21695f}
.graph-access{position:absolute;z-index:7;left:28px;bottom:56px;max-width:280px;
  border:1px solid #d6e4e6;border-radius:10px;background:rgba(255,255,255,.92);
  box-shadow:0 7px 22px #3b577311;color:#415971;font-size:11px}
.graph-access summary{cursor:pointer;padding:9px 11px}
.graph-list{display:flex;flex-wrap:wrap;gap:6px;padding:4px 10px 11px}
.graph-list-item{padding:8px;border:1px solid #d4e1e8;border-radius:8px;
  color:#37516c;background:#fff;font-size:12px;min-height:42px}
.graph-list-item[aria-current=true]{border-color:#287f73;background:#e9f5ef}
.graph-activity{color:#386b62;font-size:10px;text-align:right;white-space:nowrap}
.results-toggle{display:none;border:1px solid #b8d6ce;border-radius:8px;background:#f0f8f4;
  color:#286e63;font-size:11px;padding:5px 8px;min-height:32px;font-weight:650}
.profile-head{display:flex;align-items:center;gap:12px}
.profile-head h3{margin:0}
.profile-avatar{width:54px;height:54px;border-radius:50%;object-fit:cover}
.region-dialog{width:min(460px,calc(100vw - 24px));max-height:min(85dvh,690px);overflow:auto;
  border:1px solid #cbdedb;border-radius:16px;padding:22px;color:#24334b;background:#fff;
  box-shadow:0 24px 75px #172c442f;font:inherit}
.region-dialog::backdrop{background:#1b304766}
.region-dialog p{font-size:12px;line-height:1.6;color:#546777}
.region-dialog label{font-size:12px;display:block;margin:12px 0 5px}
.region-dialog #region-code{width:100%;font-size:16px;padding:11px;border-radius:8px;border:1px solid #bfced7;text-transform:uppercase}
.region-dialog .region-check{display:flex;align-items:center;gap:9px;min-height:38px}
.region-check input{width:18px;height:18px;accent-color:#287f73}
.region-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:14px}
.region-nearby{display:flex;flex-direction:column;gap:7px;max-height:180px;overflow:auto}
.compose-hint{align-items:center;flex-wrap:wrap}
.tone-note{font-size:10px;color:#687b88}
.region-privacy-note{margin:7px 0 12px!important;font-size:11px!important}
@media(max-width:1050px) and (min-width:741px){
 .topbar{padding:16px 18px;gap:10px}
 .top-actions{gap:6px;flex-wrap:wrap;justify-content:flex-end;max-width:calc(100% - 200px)}
 .sound-toggle{font-size:10px;padding:6px}
}
@media(max-width:740px){
 .topbar{z-index:11}
 .top-actions{gap:5px}
 .top-actions .sound-toggle,.top-actions #region-open,.top-actions #my-profile{
   position:fixed;top:calc(53px + env(safe-area-inset-top,0px));z-index:12;
   min-height:30px;padding:5px 7px;font-size:10px}
 .top-actions .sound-toggle{left:10px}
 .top-actions #region-open{left:94px}
 .top-actions #my-profile{left:156px}
 .context-note{top:calc(111px + env(safe-area-inset-top,0px))}
 .sidepanel{top:calc(220px + env(safe-area-inset-top,0px));max-height:clamp(120px,21dvh,174px)}
 .shell.is-composing .sidepanel{top:calc(109px + env(safe-area-inset-top,0px))}
 .footerbar{top:calc(89px + env(safe-area-inset-top,0px))}
 .graph-access{left:10px;bottom:calc(182px + env(safe-area-inset-bottom,0px));
   max-width:calc(100vw - 20px);font-size:10px}
 .graph-access summary{padding:5px 9px}
 .graph-card{max-width:calc(100% - 24px)}
 .composer{bottom:max(8px,env(safe-area-inset-bottom,0px))}
 .compose-hint{font-size:10px}
 .shell.keyboard-open .sidepanel,.shell.keyboard-open .context-note,
 .shell.keyboard-open .graph-access,.shell.keyboard-open .footerbar{display:none}
 .shell.keyboard-open .composer{max-height:min(58%,220px);
   bottom:max(6px,env(safe-area-inset-bottom,0px))}
 .shell.keyboard-open .composer textarea{max-height:65px;min-height:34px}
 .shell.keyboard-open .draft-context{max-height:33px;overflow:hidden}
 .shell.keyboard-open .topbar .sound-toggle,.shell.keyboard-open .topbar #region-open,
 .shell.keyboard-open .topbar #my-profile{display:none}
}
@media(max-width:365px){
 .top-actions .sound-toggle{left:8px}
 .top-actions #region-open{left:90px}
 .top-actions #my-profile{left:152px}
}
@media(max-width:740px){
  .shell.has-recent-post .sidepanel{
    top:calc(94px + env(safe-area-inset-top,0px));height:64px;max-height:64px;
    min-height:0;padding:7px 9px;gap:3px}
  .shell.has-recent-post .sidepanel .matches{max-height:30px;overflow:hidden}
  .shell.has-recent-post .context-note{display:none}
  .shell.has-recent-post .post-feedback{
    top:calc(172px + env(safe-area-inset-top,0px));bottom:auto;
    max-height:clamp(94px,17dvh,138px);overflow-y:auto}
}
/* No celular, conversas são uma folha inferior sob controle explícito. */
@media(max-width:740px){
  .context-note{display:block!important;top:calc(94px + env(safe-area-inset-top,0px));
    left:13px;width:calc(100% - 26px);pointer-events:none}
  .context-note h1{font-size:13px;letter-spacing:-.3px;line-height:1.2;
    margin:0;color:#455e77}
  .context-note h1 br,.context-note p{display:none}
  .sidepanel,.shell.is-composing .sidepanel{
    top:auto!important;
    bottom:calc(var(--vc-composer-height,180px) + 68px);
    height:49px!important;min-height:0!important;max-height:none!important;
    padding:7px 10px;gap:3px;overflow:hidden}
  .sidepanel .sideheading{align-items:center;min-height:32px}
  .sidepanel .sideheading h2{font-size:11px;flex:1;min-width:0;
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .sidepanel .graph-activity{font-size:9px}
  .sidepanel .matches,.sidepanel .context-tags{display:none}
  .sidepanel.is-expanded{height:min(44dvh,308px)!important;overflow-y:auto}
  .sidepanel.is-expanded .matches{display:flex;max-height:none;flex:1;min-height:0}
  .sidepanel.is-expanded .context-tags{display:flex}
  .sidepanel.is-expanded .match-group{flex:0 0 min(255px,82vw)}
  .results-toggle{display:inline-flex;align-items:center;flex:0 0 auto;
    justify-content:center;white-space:nowrap}
  .shell.is-composing .sidepanel{visibility:visible}
  .shell.keyboard-open .sidepanel{display:none}
  .shell.keyboard-open .context-note,.shell.is-composing .context-note{display:none!important}
  .shell.has-recent-post .sidepanel{
    top:calc(94px + env(safe-area-inset-top,0px))!important;
    bottom:auto;height:55px!important;max-height:55px!important}
  .shell.has-recent-post .sidepanel.is-expanded{
    top:auto!important;bottom:calc(var(--vc-composer-height,180px) + 68px);
    height:min(44dvh,308px)!important}
}
/* Visão inicial: os sete temas ficam entre a barra superior e o compositor.
   A folha de resultados só se abre quando a pessoa solicita. */
@media(max-width:740px){
  .shell,.composer{min-width:0}
  .composer,.shell.has-recent-post .composer{
    height:clamp(156px,23dvh,192px);
    max-height:clamp(156px,23dvh,192px);
    overflow-y:auto;bottom:max(8px,env(safe-area-inset-bottom,0px))}
  .composer textarea{min-height:37px;max-height:64px;font-size:16px}
  .composer .draft-context{max-height:30px;min-height:28px;display:flex;flex-wrap:nowrap;
    align-items:center;white-space:nowrap;overflow:hidden;padding:4px 6px;margin-bottom:3px}
  .composer .draft-context-area{display:block;flex:1;min-width:0;white-space:nowrap;
    overflow:hidden;text-overflow:ellipsis}
  .composer .draft-context-note{display:none}
  .composer .draft-explanation{margin:0 0 4px;font-size:10px;max-height:95px;overflow:auto}
  .composer .draft-explanation summary{padding:5px 6px;min-height:20px}
  .composer .draft-explanation-content{padding:0 6px 6px}
  .composer .draft-explanation-row{grid-template-columns:88px minmax(0,1fr);gap:2px 6px;padding-top:5px}
  .composer .draft-explanation-row small{font-size:9px}
  .composer .draft-explanation-foot{font-size:9px}
  .composer .topic-choice{padding:3px 6px;margin:0 0 2px}
  .composer .topic-choice summary{min-height:20px;font-size:10px}
  .composer .compose-actions{gap:4px;justify-content:space-between}
  .composer .compose-hint{gap:4px;flex-wrap:nowrap;flex:0 0 auto}
  .composer .compose-buttons{min-width:0;gap:4px}
  .composer .compose-buttons button{min-width:0;min-height:32px;font-size:10px;padding:6px 7px}
  .composer .tone-note{font-size:8px;white-space:nowrap}
  .composer #length{white-space:nowrap}
  .composer #engine-state{font-size:9px;margin:2px 0 0}
  .composer textarea{min-height:50px;max-height:70px}
  .context-note,.shell.is-composing .context-note{
    display:block!important;top:calc(91px + env(safe-area-inset-top,0px));
    font-size:12px;visibility:visible}
  .shell.is-composing .context-note{visibility:hidden}
  .sidepanel,.shell.is-composing .sidepanel{
    position:absolute;top:calc(113px + env(safe-area-inset-top,0px))!important;
    bottom:auto!important;left:12px;right:12px;
    height:37px!important;min-height:37px!important;max-height:none!important;
    padding:3px 7px!important;box-shadow:0 5px 20px #233d5f12;
    border-radius:10px;gap:0}
  .sidepanel .sideheading{min-height:29px;gap:5px}
  .sidepanel .sideheading h2{font-size:10px}
  .sidepanel .graph-activity{font-size:9px}
  .sidepanel .results-toggle{padding:4px 6px;min-height:27px;font-size:10px}
  .sidepanel.is-expanded,.shell.is-composing .sidepanel.is-expanded{
    top:auto!important;bottom:calc(var(--vc-composer-height,180px) + 14px)!important;
    height:min(43dvh,285px)!important;padding:9px!important;border-radius:14px}
  .sidepanel.is-expanded .mobile-legal{display:flex;gap:12px;justify-content:center;
    flex:0 0 auto;font-size:10px}
  .mobile-legal a{color:#287f73;text-decoration:underline}
  .footerbar{display:none!important}
  .graph-access{bottom:calc(var(--vc-composer-height,180px) + 8px);
    left:10px;top:auto;max-width:min(174px,47vw)}
  .graph-access summary{font-size:9px;padding:5px 7px}
  .shell.has-recent-post .sidepanel{
    top:calc(113px + env(safe-area-inset-top,0px))!important;
    bottom:auto!important;height:37px!important;max-height:37px!important}
  .shell.has-recent-post .sidepanel.is-expanded{
    top:auto!important;bottom:calc(var(--vc-composer-height,180px) + 14px)!important;
    height:min(43dvh,285px)!important}
  .shell.has-recent-post .post-feedback{top:auto;bottom:calc(var(--vc-composer-height,180px) + 68px);
    max-height:85px}
  .shell.keyboard-open .sidepanel{display:none}
  .shell.keyboard-open .composer{max-height:min(54dvh,170px);height:min(54dvh,170px)}
}
@media(max-width:740px) and (max-height:650px){
  .composer,.shell.has-recent-post .composer{height:156px;max-height:156px;padding:6px 9px 5px}
  .composer .composer-label{margin:0 0 3px;font-size:9px}
  .composer textarea{min-height:48px;max-height:54px;padding:1px 0;font-size:16px}
  .composer .draft-context{max-height:22px;min-height:22px;display:flex;flex-wrap:nowrap;
    white-space:nowrap;align-items:center;gap:3px;padding:3px 5px;margin:0 0 2px}
  .composer .draft-context-label{display:none}
  .composer .draft-context-area{display:block;flex:1 1 auto;white-space:nowrap;
    overflow:hidden;text-overflow:ellipsis}
  .composer .draft-context-note{display:none}
  .composer .topic-choice{margin:0 0 1px}
  .composer #engine-state{position:absolute;width:1px;height:1px;overflow:hidden;
    clip-path:inset(50%);margin:0}
  .composer .compose-actions{margin:1px 0 0;padding:2px 0 0}
  .graph-access{display:none}
}
/* A seleção de uma categoria abre seu recorte, sem conservar a conversa
   anteriormente aberta. O painel compacto permite ver a órbita no celular. */
.detail.is-topic .detail-content{gap:12px}
.detail.is-topic .detail-content h3{margin:10px 0 0;font-size:13px}
.detail.is-topic .source-button{line-height:1.5;text-align:left;white-space:normal;overflow-wrap:anywhere}
/* Camada WebGL ativa apenas quando o contexto de renderização está disponível.
   Com WebGL ausente o mapa clássico continua utilizável. */
.shell.is-immersive{background:radial-gradient(ellipse 76% 88% at 50% 38%,#eef6fc 0%,#f8fbff 55%,#ffffff 100%);color:var(--text)}
#immersive-universe{z-index:2;display:block;cursor:grab;touch-action:none}
#immersive-universe:active{cursor:grabbing}
#immersive-labels{position:absolute;inset:0;z-index:3;pointer-events:none;overflow:hidden}
.immersive-label{position:absolute;left:0;top:0;max-width:150px;white-space:nowrap;text-overflow:ellipsis;
  overflow:hidden;color:#24334b;font-weight:720;text-shadow:0 1px 2px #ffffff,0 0 10px #ffffff;
  font-size:clamp(11px,1vw,14px);text-align:center;will-change:transform}
.immersive-label:not(.immersive-avatar){padding:18px 0 0}
.immersive-label.immersive-category{padding:0;width:160px;max-width:none;display:flex;align-items:center;
  flex-direction:column;gap:5px;white-space:normal;overflow:visible;line-height:1.12}
.immersive-orb{display:block;flex:none;width:var(--orbdiam,62px);height:var(--orbdiam,62px);
  border-radius:50%;border:2px solid color-mix(in srgb,var(--sphere) 85%,#24334b);
  background:color-mix(in srgb,var(--sphere) 29%,white);
  box-shadow:inset 0 0 0 4px #ffffffa8,
    0 0 0 calc(1px + var(--glow-amount,0) * 8px) color-mix(in srgb,var(--sphere) calc(var(--glow-amount,0) * 45%),transparent),
    0 0 calc(2px + var(--glow-amount,0) * 28px) color-mix(in srgb,var(--sphere) calc(var(--glow-amount,0) * 60%),transparent)}
.immersive-category.is-pulsing .immersive-orb{animation:immersive-pulse 3.4s ease-in-out infinite}
.immersive-category.is-primary .immersive-orb{border-width:3px}
.immersive-category-title{display:block;max-width:150px;white-space:normal;font-weight:850;
  color:#20354d;text-shadow:0 1px 3px #fff,0 0 10px #fff}
.immersive-category small{font-size:10px;font-weight:550;color:#52667f;text-shadow:0 1px 3px #fff}
@keyframes immersive-pulse{0%,100%{filter:brightness(.88);scale:.96}
  50%{filter:brightness(1.27);scale:1.04}}
@media(prefers-reduced-motion:reduce){.immersive-orb{animation:none!important}}
.immersive-avatar{width:27px;height:27px;display:grid;place-items:center;border:2px solid var(--sphere,#84b9ad);
  border-radius:50%;background:#ffffff;color:#24334b;font-size:12px;box-shadow:0 0 12px color-mix(in srgb,var(--sphere,#8ed5c8) 40%,transparent)}
.immersive-avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%}
.immersive-label.immersive-you{width:44px;height:44px;border-width:3px;
  box-shadow:0 0 0 4px #ffffffda,0 3px 18px #287f735b}
.immersive-you.has-draft-connections{box-shadow:0 0 0 5px #ffffffda,0 0 0 9px #60c9ba53,0 3px 18px #287f7370}
.immersive-label.immersive-concept{width:max-content;max-width:116px;
  padding:4px 7px;border:1px dashed #aa9de3;border-radius:15px;
  background:#f5f0ffec;color:#3c3875;font-size:10px;font-weight:650;
  white-space:normal;line-height:1.15}
.immersive-label.immersive-post{width:17px;height:17px;border-radius:50%;
  border:2px solid #fff;display:grid;place-items:center;
  padding:0;color:#fff;font-size:17px;background:var(--sphere,#8cabb7);
  box-shadow:0 1px 6px #3b536d55}
.immersive-avatar-placeholder{position:relative;overflow:hidden;background:#f3f7f8}
.immersive-avatar-placeholder::before{content:'';position:absolute;left:38%;top:20%;width:24%;height:24%;border-radius:50%;background:#679b95}
.immersive-avatar-placeholder::after{content:'';position:absolute;left:22%;top:52%;width:56%;height:43%;border-radius:70% 70% 25% 25%;background:#679b95}
.immersive-message{display:block;max-width:130px;padding:5px 8px!important;
  border-radius:10px;border:1px solid #aeced6;background:#ffffffed;
  color:#24334b;font-size:10px;font-weight:600;white-space:normal;
  overflow:hidden;text-overflow:ellipsis;line-height:1.3}
.immersive-hud{position:absolute;z-index:3;left:50%;top:86px;transform:translateX(-50%);
  pointer-events:none;max-width:min(540px,60vw);text-align:center;padding:7px 13px;border-radius:999px;
  border:1px solid #cbdde4;background:#ffffffed;backdrop-filter:blur(8px);color:#39596a;
  font-size:11px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.immersive-navigation{position:absolute;z-index:8;left:50%;top:121px;transform:translateX(-50%);
  display:flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;flex-wrap:wrap;
  width:max-content;max-width:calc(100vw - 24px)}
.immersive-navigation[hidden]{display:none}
.immersive-navigation button{background:#ffffffed;color:#284c59;border:1px solid #c4dbe0;
  border-radius:20px;font-size:11px;padding:8px 13px;backdrop-filter:blur(8px)}
.immersive-navigation button:hover,.immersive-navigation button:focus-visible{border-color:#287f73;background:#eaf7f3}
.immersive-navigation button:disabled{opacity:.35;cursor:default}
.shell.is-immersive .context-note h1{color:var(--text);text-shadow:none}
.shell.is-immersive .context-note p{color:var(--muted)}
.shell.is-immersive .footerbar{color:var(--muted)}
.shell.is-immersive .footerbar a{color:#287f73}
.shell.is-immersive .composer{box-shadow:0 15px 65px #375a8329,0 0 48px #7ce5da13}
@media(min-width:741px){.shell.is-immersive .composer{top:73%}}
.shell.is-immersive .brand strong,.shell.is-immersive .brand .beta{color:var(--text)}
.shell.is-immersive .beta{background:#ffffffd9;border-color:#d9e2ec}
.shell.is-immersive .demo-label{color:var(--muted)}
@media(max-width:740px){
  .immersive-hud{top:70px;max-width:calc(100vw - 24px);font-size:10px}
  .immersive-navigation{top:105px}
  .immersive-navigation button{font-size:10px;padding:7px 10px}
  .immersive-label{font-size:10px;max-width:92px}
  .immersive-category-title{max-width:106px}
  .immersive-category small{font-size:9px}
  .immersive-avatar{width:24px;height:24px}
  .immersive-label.immersive-you{width:39px;height:39px}
  .immersive-label.immersive-concept{max-width:80px;font-size:9px;padding:3px 5px}
  .immersive-message{max-width:85px;font-size:9px;padding:3px 5px!important}
  .shell.is-immersive .context-note{display:none}
  .shell.is-immersive .sidepanel:not(:has(.match)){opacity:.92}
}
.topic-relations{display:flex;gap:6px;flex-wrap:wrap}
@media(max-width:740px){
  .detail.is-topic{top:calc(67px + env(safe-area-inset-top,0px));bottom:auto;
    right:10px;left:10px;width:auto;min-height:0;height:auto;
    max-height:min(27dvh,205px);border-radius:15px;box-shadow:0 12px 35px #192d3c20}
  .detail.is-topic .detail-content{overflow:auto;max-height:min(18dvh,135px);padding:10px 13px}
  .detail.is-topic .detail-body{font-size:12px}
  .detail.is-topic .detail-header{padding:5px 12px}
}

/* O compositor é uma âncora fixa, não um painel de diagnóstico. Os detalhes
   continuam disponíveis na UI apropriada, fora da área de escrita. */
.shell.is-immersive .composer,
.shell.is-immersive.is-composing .composer,
.shell.is-immersive.has-recent-post .composer{
  height:164px!important;max-height:164px!important;min-height:164px!important;
  overflow:visible!important;display:flex;flex-direction:column;gap:4px;
  padding:12px 16px 10px!important}
.shell.is-immersive .composer-label{
  display:flex;align-items:center;flex:0 0 18px;gap:8px;
  margin:0!important;min-width:0;font-size:10px}
.shell.is-immersive #class-label{
  flex:0 1 auto;min-width:0;max-width:120px;white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis}
.shell.is-immersive .draft-indicators{display:flex;align-items:center;gap:5px;margin-left:auto}
.shell.is-immersive .draft-indicator{
  min-width:20px;height:20px;padding:2px 4px;border:1px solid #cddfdd;
  border-radius:7px;display:grid;place-items:center;font-size:12px;line-height:1;
  background:#f0f8f6;color:#28695e;cursor:help}
.shell.is-immersive .composer .draft-context,
.shell.is-immersive .composer .draft-explanation,
.shell.is-immersive .composer .draft-ai-status,
.shell.is-immersive .composer .tone-note,
.shell.is-immersive .composer #engine-state{display:none!important}
.shell.is-immersive .composer #thought{
  resize:none!important;flex:1 1 0!important;min-height:0!important;
  height:auto!important;max-height:none!important;
  overflow-y:auto!important;font-size:17px;line-height:1.35}
.shell.is-immersive .composer .attachments:empty{display:none}
.shell.is-immersive .composer .attachments:not(:empty){
  flex:0 0 17px;overflow-x:auto;overflow-y:hidden;flex-wrap:nowrap}
.shell.is-immersive .composer .attachments .link-chip{padding:1px 4px;font-size:9px}
.shell.is-immersive .composer .compose-actions{
  flex:0 0 34px;min-height:34px;margin:0!important;padding:0!important;
  gap:6px;align-items:center}
.shell.is-immersive .composer .compose-buttons button{
  padding:7px 9px;min-height:32px;font-size:11px}
.shell.is-immersive .composer .topic-choice{display:none!important}
.shell.is-immersive .composer .topic-choice.is-floating{
  display:block!important;position:absolute;z-index:30;bottom:calc(100% + 9px);
  left:12px;right:12px;max-height:min(30dvh,210px);overflow:auto;
  background:#fff;border:1px solid #c8ded9;border-radius:11px;
  box-shadow:0 12px 34px #375a8340;padding:10px}
.shell.is-immersive .composer .topic-choice.is-floating[hidden]{display:none!important}
.shell.is-immersive #topic-choice-toggle{
  background:#f0f8f6;border:1px solid #cddfdd;border-radius:7px;
  padding:2px 6px;color:#28695e;min-height:22px;font-size:13px}
@media(max-width:740px){
  .shell.is-immersive .composer,.shell.is-immersive.is-composing .composer,
  .shell.is-immersive.has-recent-post .composer,
  .shell.is-immersive.keyboard-open .composer{
    height:150px!important;max-height:150px!important;min-height:150px!important;
    padding:9px 11px 8px!important;bottom:max(8px,env(safe-area-inset-bottom,0px))!important}
  .shell.is-immersive .composer #thought{font-size:16px}
  .shell.is-immersive .composer .composer-label{flex-basis:17px}
  .shell.is-immersive .composer .compose-actions{flex-basis:32px}
  .shell.is-immersive .composer .compose-buttons button{font-size:10px;padding:6px}
  .shell.is-immersive .draft-indicator{min-width:18px;height:18px;font-size:11px}
}

/* Telas móveis baixas priorizam o grafo e as conversas sobre o título. */
@media(max-width:740px) and (max-height:700px){
  .context-note{display:none!important}
}

.help-link{display:inline-grid;place-items:center;width:36px;height:36px;min-width:36px;padding:0!important;border-radius:50%;font-size:18px!important;font-weight:800;text-decoration:none;color:var(--accent)}.help-link:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
