:root{--blue:#0867c9;--deep:#06468f;--navy:#0b3762;--light:#f0f8ff;--border:#a9d9ff;--orange:#ff9b33;--purple:#624ae4;--ink:#143656}
*{box-sizing:border-box}body{margin:0;font-family:Nunito,'Segoe UI',Arial,sans-serif;color:var(--ink);background:#d9f0ff}button,input,textarea{font:inherit}button{cursor:pointer;border:0;user-select:none}button:disabled{opacity:.4;cursor:default}.shell{min-height:100vh;display:flex;flex-direction:column}.topbar{background:linear-gradient(110deg,#005bb7 0%,#008df7 50%,#06519b 100%);color:#fff;min-height:84px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 18px;border-bottom:5px solid #023f8a;box-shadow:0 2px 8px #0d6bad55}.identity{display:flex;align-items:center;gap:13px;min-width:0}.logo-mark{font-size:34px;background:#fff2;border-radius:13px;padding:6px}.identity strong{display:block;font-size:clamp(20px,2.1vw,30px);line-height:1.1;letter-spacing:-.4px;text-shadow:1px 2px 1px #023c79}.identity small{display:block;margin-top:5px;font-size:11px;opacity:.91}.web-chip{background:#ffe45a;color:#17395b;font-size:11px;font-weight:900;padding:7px 11px;border-radius:30px;white-space:nowrap}.header-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}.header-actions button{background:#0469c8;color:white;border:1px solid #ffffff44;padding:11px 14px;border-radius:9px;box-shadow:0 2px 3px #064279aa;font-weight:750;white-space:nowrap}.header-actions button:hover{background:#34a2ff}.header-actions button.accent{background:linear-gradient(#ff9b44,#ef6132);border-color:#ffe2b8}.workspace{flex:1;display:grid;grid-template-columns:minmax(205px,238px) minmax(350px,1fr) minmax(225px,278px);gap:7px;padding:8px;min-height:0;height:calc(100vh - 120px)}.side-panel{min-height:0;overflow:hidden;background:#fafdff;border:2px solid #89c9fb;border-radius:12px;display:flex;flex-direction:column;box-shadow:0 2px 6px #346b941a}.panel-head{margin:8px;background:linear-gradient(100deg,#087acb,#075aa5);padding:11px 12px;color:#fff;font-weight:900;border-radius:7px;font-size:14px;display:flex;align-items:center;justify-content:space-between}.panel-head span{font-weight:600;font-size:11px;color:#dbecff}.helper{font-size:10px;color:#527597;line-height:1.4;margin:1px 10px 8px}.character-grid{overflow-y:auto;min-height:0;padding:3px 7px 10px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;align-content:start;scrollbar-color:#8abcea transparent;scrollbar-width:thin}.char-tile{height:72px;border:1px solid #aad9fc;border-radius:8px;background:linear-gradient(#ffffff,#eff8ff);display:flex;align-items:center;justify-content:center;transition:.1s ease;padding:2px}.char-tile:hover,.char-tile:focus-visible{border:2px solid #ffb526;background:#fff4c6;box-shadow:0 2px 10px #ffc60033;outline:0}.char-tile img{height:60px;width:100%;object-fit:contain;pointer-events:none}.editor{min-width:0;min-height:0;display:flex;flex-direction:column;background:#e8f6ff;border-radius:12px;border:1px solid #90ceff;overflow:hidden}.pagebar{background:white;display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid #b6dfff;padding:9px 11px}.page-left{display:flex;align-items:center;gap:10px;white-space:nowrap}.page-left strong{font-size:14px}.page-left span{font-size:12px;background:#def1ff;color:#14599b;padding:5px 9px;border-radius:30px}.page-right{display:flex;align-items:center;gap:5px;overflow:auto}.page-tabs{display:flex;gap:4px;white-space:nowrap}.page-tabs button,.tiny{background:#e2f1ff;color:#1763a5;border:1px solid #acd3f6;border-radius:6px;padding:7px 9px;font-size:12px;font-weight:800}.page-tabs button.active{background:#ffb62d;color:#502e00;border-color:#f39a00}.tiny.primary,button.primary{color:white;background:#0475dc}.canvas-viewport{min-height:0;flex:1;overflow:auto;background:radial-gradient(circle at 50% 22%,#fafdff,#d3e8fb);padding:0 16px 25px;text-align:center;scrollbar-color:#82bbec #edf7fe}.worktop-tip{font-size:11px;text-align:center;color:#68849f;margin:9px auto 11px}.paper-wrap{position:relative;width:min(100%,720px);margin:0 auto;background:white;box-shadow:0 9px 24px #29648e40,0 0 0 1px #a7c4db}.paper-wrap canvas{display:block;width:100%;height:auto;touch-action:none;cursor:crosshair}.editor-notice{pointer-events:none;position:sticky;bottom:12px;margin:0 auto;width:max-content;max-width:90%;font-size:12px;color:#fff;padding:8px 14px;border-radius:20px;background:#14375f;opacity:0;transition:opacity .2s}.editor-notice.visible{opacity:.94}.toolbar{display:flex;gap:7px;padding:8px;background:linear-gradient(#1267ba,#043d81);overflow-x:auto;min-height:58px;align-items:center;scrollbar-width:thin;margin:12px auto 0;border-radius:12px;box-shadow:0 10px 24px #14375f33;max-width:100%;position:sticky;bottom:8px;z-index:3}.tool-group{display:flex;gap:5px;flex-shrink:0;padding-right:8px;border-right:1px solid #ffffff33}.tool-group:last-child{border:0}.toolbar button{padding:9px 10px;border-radius:7px;background:#147bce;color:#fff;border:1px solid #ffffff36;white-space:nowrap;font-size:12px;font-weight:750}.toolbar button:hover{background:#2e9ef0}.toolbar button.danger{background:#b5375c}.angle-label{display:flex;align-items:center;gap:4px;color:white;font-size:14px;font-weight:700}.angle-label input{width:65px;border-radius:6px;border:1px solid #92caef;height:34px;padding:3px 4px}.asset-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:0 9px 8px}.asset-tabs button{background:#edf6ff;border:1px solid #bfdcf3;border-radius:7px;padding:9px 3px;color:#275e90;font-size:11px;font-weight:850}.asset-tabs button.active{color:#fff;background:#0871ce;border-color:#0a5bba}.asset-intro{padding:5px 11px 9px;border-top:1px solid #e0f0ff;color:#537b9b;font-size:11px;line-height:1.5}.asset-grid{min-height:0;flex:1;overflow:auto;padding:5px 7px 10px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;align-content:start;scrollbar-width:thin;scrollbar-color:#8abcea transparent}.asset-tile{min-height:66px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:1px solid #b4dbf3;background:#fff;border-radius:8px;overflow:hidden;padding:4px;transition:.12s}.asset-tile:hover{background:#fff7d8;border-color:#ffa900;transform:translateY(-1px)}.asset-tile img{width:100%;height:48px;object-fit:contain;pointer-events:none}.asset-tile.scenery img{height:50px;object-fit:cover;border-radius:5px}.asset-tile span{font-size:8px;font-weight:750;color:#286296;line-height:1.1;max-width:100%;text-align:center}.asset-footer{border-top:1px solid #e1eff9;padding:9px 11px;font-size:10px;color:#51799a}.asset-footer span{font-weight:900}.layout-card{min-height:74px;border:1px solid #a8d5f4;background:#f9fcff;border-radius:8px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:3px}.layout-card:hover{background:#ffefb9;border:2px solid #e9a12a}.layout-card svg{width:58px;height:44px}.layout-card strong{font-size:9px}.layout-card.active{border:2px solid #0878d3;background:#e3f2ff}.layout-cat{grid-column:span 2;font-weight:900;color:#165c98;font-size:12px;background:#dff1ff;border-radius:6px;padding:7px}.footer{background:#edf7ff;border-top:1px solid #b4dfff;padding:6px 14px;display:flex;justify-content:space-between;gap:10px;font-size:10px;color:#4172a0}.pose-popover{position:fixed;width:min(400px,calc(100vw - 22px));background:white;border:2px solid #477dff;box-shadow:0 16px 38px #1a4a8870;border-radius:13px;z-index:60;padding:10px}.hidden{display:none!important}.pose-title{display:flex;justify-content:space-between;align-items:center;padding:4px 7px 10px;font-size:13px;color:#325cce}.pose-title button{background:#f1f5ff;color:#555;border-radius:6px;padding:5px 9px}.pose-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;max-height:min(68vh,430px);overflow:auto}.pose-tile{height:105px;display:flex;align-items:center;justify-content:center;padding:4px;border:1px solid #c2d3fa;border-radius:8px;background:#f4f4ff}.pose-tile:hover,.pose-tile:focus-visible{background:#ffe7a1;box-shadow:inset 0 0 0 2px #ffa52d;outline:0}.pose-tile img{max-width:100%;height:97px;object-fit:contain;pointer-events:none}.modal{position:fixed;inset:0;background:#0e305681;z-index:100;display:flex;align-items:center;justify-content:center;padding:15px}.modal-box{width:min(500px,100%);background:#fff;border:3px solid #4c9bde;border-radius:16px;padding:22px;box-shadow:0 18px 65px #10334c80}.modal-box h2{font-size:21px;margin:0 0 7px;color:#1165ae}.modal-box p{font-size:12px;color:#6888a2}.modal-box textarea{width:100%;border:1px solid #a6cee8;border-radius:8px;padding:12px;resize:vertical;min-height:85px}.modal-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:14px}.modal-actions button{padding:10px 18px;border-radius:8px;background:#edf3f8;color:#175f92;font-weight:800}.modal-actions button.primary{background:#0a76d7;color:#fff}@media(max-width:1100px){.workspace{grid-template-columns:170px minmax(300px,1fr) 205px}.char-tile{height:66px}.char-tile img{height:54px}.identity small{display:none}.header-actions button{padding:9px}}@media(max-width:780px){.topbar{flex-wrap:wrap}.workspace{display:flex;flex-direction:column;height:auto;min-height:0}.editor{order:0;min-height:600px}.characters{order:1;max-height:270px}.assets{order:2;max-height:390px}.character-grid{grid-template-columns:repeat(4,1fr)}.asset-grid{grid-template-columns:repeat(4,1fr)}.pose-grid{grid-template-columns:repeat(3,1fr)}.footer{flex-wrap:wrap}.pagebar{flex-wrap:wrap}.worktop-tip{font-size:9px}.canvas-viewport{max-height:75vh}.toolbar{min-height:62px}}
/* HQ CRIA FÁCIL 2.0 · ferramentas completas */




.web-chip{background:#fce56c}
.header-actions button{padding:9px 11px;font-size:12px}
.asset-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}
.asset-grid{min-height:60px}
.toolbar-zoom{color:white;font-size:12px;min-width:39px;font-weight:800;align-self:center}
#editorZoom{width:105px;accent-color:#ffd356}
.scene-controls{border-top:2px solid #cbeaff;background:#f6fbff;padding:12px;display:flex;flex-direction:column;gap:8px}
.scene-controls strong{font-size:12px;color:#11578b}
.scene-controls p{margin:2px 0;font-size:11px;line-height:1.4;color:#56799d}
.scene-slider{display:flex;align-items:center;gap:6px}.scene-slider input{min-width:30px;flex:1;accent-color:#0878d7}
.scene-slider button,.scene-arrows button{background:#d9ecff;color:#1b5b91;border:1px solid #8fc5f0;border-radius:6px;min-height:31px;padding:4px 8px;font-weight:900}
.scene-slider span{font-size:11px;font-weight:800;min-width:36px}.scene-arrows{display:flex;flex-direction:column;align-items:center;gap:4px}
.scene-arrows>div{display:flex;justify-content:center;gap:5px}.scene-arrows button:hover{background:#ffe39a}
.title-panel{grid-column:1/-1;background:#fff;padding:11px;border:1px solid #c7e4fa;border-radius:9px;display:flex;flex-direction:column;gap:8px}
.title-panel h3{margin:0;font-size:15px;color:#176ab0}.title-panel p{margin:0;font-size:11px;color:#53789b;line-height:1.45}
.title-panel label{font-weight:800;font-size:12px;color:#174d78}
.title-panel input[type='text'],.title-panel select{border:1px solid #9fc9e9;border-radius:8px;padding:10px;background:white;width:100%;color:#145077}
.title-panel .title-size-controls{display:flex;align-items:center;justify-content:center;gap:7px}
.title-panel .title-size-controls button{padding:7px 12px;border-radius:7px;background:#197ac5;color:white}
.title-panel .swatches{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
.title-panel .swatch{width:100%;aspect-ratio:1;border:2px solid #cedee9;border-radius:9px;padding:2px;box-shadow:inset 0 0 0 1px #ffffff80}
.title-panel .swatch:hover,.title-panel .swatch.active{border:3px solid #101d39;transform:scale(1.07)}
.title-panel .choice-row{display:flex;gap:6px}.title-panel .choice-row button{flex:1;background:#d8ecff;color:#125588;padding:9px;border-radius:7px}
.preview-modal{position:fixed;inset:0;z-index:150;background:#052349cf;padding:15px;display:flex;align-items:center;justify-content:center}
.preview-shell{width:min(1110px,97vw);height:min(92vh,950px);display:flex;flex-direction:column;border:3px solid #54a4ef;border-radius:15px;overflow:hidden;background:#c9e1f3;box-shadow:0 18px 80px #0007}
.preview-bar{background:#fff;display:flex;gap:7px;align-items:center;padding:11px;flex-wrap:wrap}
.preview-bar strong{color:#165b9c;margin-right:7px;font-size:14px}
.preview-bar button{border-radius:8px;background:#e8f4ff;color:#145d96;border:1px solid #8bc6ee;font-weight:800;padding:7px 12px}
.preview-bar button:hover{background:#ffecac}
.preview-bar span{font-size:12px;color:#265d83;font-weight:800}
.preview-bar .preview-spacer{flex:1}.preview-bar .primary{color:white;background:#0a7bdb}
.preview-body{flex:1;overflow:auto;display:flex;justify-content:flex-start;align-items:flex-start;padding:30px;flex-direction:column}
.preview-body img{margin:auto;object-fit:contain;max-width:none;height:auto;background:white;box-shadow:0 6px 28px #2d567e77}
.tiny.danger{background:#ffe4e4;color:#a33131}
@media(max-width:900px){.topbar{flex-wrap:wrap}.header-actions{width:100%;justify-content:flex-start}.header-actions button{padding:7px 9px;font-size:11px}}
@media(max-width:780px){.preview-shell{height:96vh;width:99vw}.preview-bar{justify-content:center}.preview-body{padding:10px}.scene-controls{padding:9px}.title-panel .swatches{grid-template-columns:repeat(7,1fr)}}

.title-word-font{font-family:Impact,'Arial Black',sans-serif}

/* HQ CRIA FACIL 2.2: ferramentas sempre visiveis ACIMA da pagina. */
.toolbar-stack{background:#074888;border-bottom:2px solid #76baf0;flex:0 0 auto;display:flex;flex-direction:column;gap:2px;padding:5px 7px 6px;z-index:4}
.toolbar-stack .toolbar{position:static;bottom:auto;margin:0;border-radius:7px;box-shadow:none;max-width:none;min-height:39px;width:100%;overflow:visible;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:3px 9px;padding:4px 5px;background:linear-gradient(110deg,#126cbd,#075197)}
.toolbar-stack .toolbar-lower{background:linear-gradient(110deg,#0d579d,#063c78)}
.toolbar-stack .tool-group{flex-shrink:1;display:flex;flex-wrap:wrap;justify-content:center;gap:4px;padding:0 7px 0 0;margin:0;border-right:1px solid #b6dcff70}
.toolbar-stack .tool-group:last-child{border-right:0;padding-right:0}
.toolbar-stack .toolbar button{font-size:11px;font-weight:800;padding:6px 7px;white-space:nowrap;min-height:27px;line-height:1.15}
.toolbar-stack .angle-label{font-size:12px}
.toolbar-stack .angle-label input{height:27px;width:61px}
.toolbar-stack #editorZoom{width:82px}
.toolbar-stack .toolbar-zoom{font-size:11px}
.external-color-link{color:#0869c6;text-decoration:underline;font-weight:750}
/* Adapta ambas as barras sem criar rolagem horizontal. */
@media(max-width:1150px){.toolbar-stack .toolbar{justify-content:center;gap:3px 5px}.toolbar-stack .toolbar button{padding:5px 6px;font-size:10px}.toolbar-stack #editorZoom{width:65px}}
@media(max-width:780px){.toolbar-stack{padding:4px}.toolbar-stack .toolbar{justify-content:flex-start}.toolbar-stack .tool-group{flex-grow:0}.canvas-viewport{max-height:75vh}}
/* Amostras solidas e gradientes na paleta do titulo. */
.gradient-section{margin-top:9px!important}
.title-panel .swatch.gradient-swatch{height:36px;aspect-ratio:auto}
.title-panel .swatches.gradients{grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
.title-panel .swatch.gradient-swatch.active{box-shadow:0 0 0 2px #ffffff,inset 0 0 0 2px #141f39}


/* HQ CRIA FACIL 2.8 — MODO DE CONSTRUCAO COM TIRINHA FIXA.
   O viewport central e independente das listas laterais. */
@media (min-width: 781px) {
  html, body { height: 100%; overflow: hidden; }
  .shell { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
  .topbar, .footer { flex-shrink: 0; }
  .workspace {
    flex: 1 1 0;
    height: auto;
    min-height: 0;
    overflow: hidden;
  }
  .side-panel, .editor { min-height: 0; max-height: 100%; }
  .character-grid, .asset-grid {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .canvas-viewport {
    min-height: 0;
    max-height: none;
    overscroll-behavior: contain;
  }
}
/* Na tela estreita, mantemos a disposicao vertical responsiva anterior. */

/* 2.9 — dois campos de texto para balões de duas falas. */
.dual-balloon-editor {display:grid;gap:7px;margin-top:10px}
.dual-balloon-editor label {display:block;font-size:12px;font-weight:900;color:#145587;margin-top:4px}
.dual-balloon-editor textarea {min-height:73px;max-height:150px;width:100%;resize:vertical;
  font-family:'Comic Sans MS','Trebuchet MS',Arial,sans-serif;font-size:14px;line-height:1.5}
.dual-balloon-editor .dual-balloon-hint {margin:3px 0 0;font-size:11px;color:#54718b}


/* HQ CRIA FÁCIL 2.9.1 — biblioteca de cenários: seis cartões visíveis
   (3 colunas × 2 linhas), com rolagem vertical dentro das miniaturas. */
.assets { position:relative; }
.assets.scene-gallery-active .asset-intro {
  flex: 0 0 auto;
  padding: 5px 10px 7px;
  line-height: 1.3;
}
.assets.scene-gallery-active .asset-grid {
  flex: 0 1 205px;
  height: 205px;
  max-height: 205px;
  min-height: 165px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 90px;
  align-content: start;
  column-gap: 6px;
  row-gap: 6px;
  overflow-y: scroll;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 5px 6px 8px;
  scrollbar-width: auto;
  scrollbar-color: #6aabe9 #e6f4ff;
  border-block: 1px solid #dceefa;
}
.assets.scene-gallery-active .asset-grid::-webkit-scrollbar {width: 10px}
.assets.scene-gallery-active .asset-grid::-webkit-scrollbar-track {background:#e6f4ff;border-radius:6px}
.assets.scene-gallery-active .asset-grid::-webkit-scrollbar-thumb {background:#79b7e8;border-radius:6px;border:2px solid #e6f4ff}
.assets.scene-gallery-active .asset-tile.scenery {
  height: 90px;
  min-height: 90px;
  min-width:0;
  gap: 2px;
  padding: 4px 3px;
  justify-content: flex-start;
}
.assets.scene-gallery-active .asset-tile.scenery img {
  display: block;
  width:100%;
  height:61px;
  min-height:61px;
  object-fit:cover;
  border-radius:5px;
}
.assets.scene-gallery-active .asset-tile.scenery > div:first-child {
  height:61px !important;
  flex: 0 0 61px;
}
.assets.scene-gallery-active .asset-tile.scenery span {
  width:100%;
  max-height:18px;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
  font-size:9px;
  line-height:1.05;
}
.assets.scene-gallery-active .scene-controls {
  padding: 5px 8px;
  flex:0 0 auto;
  display:block;
  border-top: 1px solid #cbeaff;
  background:#f6fbff;
  margin-top:4px;
}
.assets .scene-controls-toggle {
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  padding:9px 10px;
  border:1px solid #96c7ef;
  background:#e2f2ff;
  color:#125b95;
  border-radius:8px;
  font-size:12px;
  font-weight:850;
  text-align:left;
}
.assets .scene-controls-toggle:hover,
.assets .scene-controls-toggle:focus-visible {background:#cce9ff;outline:2px solid #68b2ed;outline-offset:1px}
.scene-toggle-chevron{font-size:16px;transition:transform .12s}
.assets .scene-controls-body {display:none}
.assets .scene-controls.is-open .scene-toggle-chevron {transform:rotate(180deg)}
.assets .scene-controls.is-open {
  position:absolute;
  left:6px;
  right:6px;
  bottom:38px;
  z-index:18;
  margin:0;
  border:2px solid #80bbed;
  border-radius:11px;
  padding:8px;
  max-height:calc(100% - 54px);
  overflow-y:auto;
  box-shadow:0 8px 24px #17486d4d;
  background:#f6fbff;
}
.assets .scene-controls.is-open .scene-controls-body {display:flex;flex-direction:column;gap:8px;padding:10px 3px 3px}
.assets.scene-gallery-active .asset-footer {margin-top:auto}
@media (max-height:680px) and (min-width:781px) {
  .assets.scene-gallery-active .asset-grid {
    height:170px;max-height:170px;min-height:145px;
    grid-auto-rows:73px;row-gap:5px;
  }
  .assets.scene-gallery-active .asset-tile.scenery {height:73px;min-height:73px;padding:2px}
  .assets.scene-gallery-active .asset-tile.scenery img {height:46px;min-height:46px}
  .assets.scene-gallery-active .asset-tile.scenery > div:first-child {height:46px !important;flex-basis:46px}
  .assets.scene-gallery-active .asset-tile.scenery span {font-size:8px}
  .assets.scene-gallery-active .scene-controls {margin-top:2px}
  .assets.scene-gallery-active .asset-footer {padding:5px 8px}
}
@media (max-width:780px) {
  .assets.scene-gallery-active .asset-grid {flex:0 0 205px;height:205px;min-height:205px;max-height:205px}
  .assets .scene-controls.is-open{bottom:22px}
}

/* A biblioteca também deve caber em janelas mais baixas. */
@media (max-height: 680px) and (min-width: 781px) {
  .assets.scene-gallery-active .panel-head {margin:5px 6px;padding:7px 8px;font-size:12px}
  .assets.scene-gallery-active .asset-tabs {padding:0 6px 3px;gap:3px}
  .assets.scene-gallery-active .asset-tabs button {padding:5px 1px;font-size:10px}
  .assets.scene-gallery-active .asset-intro {padding:3px 8px 5px;font-size:10px;line-height:1.2}
  .assets.scene-gallery-active .asset-footer {display:none}
  .assets.scene-gallery-active .scene-controls {padding:3px 7px}
  .assets.scene-gallery-active .scene-controls-toggle {padding:7px 9px}
}


/* 2.9.7 — Interface compacta: destaque para o quadro da HQ. */
@media (min-width:781px) {
  .topbar {
    min-height: 0;
    height: 61px;
    padding: 5px 11px;
    gap: 9px;
    flex-wrap: nowrap;
    border-bottom-width: 3px;
    background: linear-gradient(105deg, #07579c, #0874cc 63%, #07549c);
    box-shadow: 0 1px 4px #14508133;
  }
  .identity {gap: 8px; flex: 0 0 auto;}
  .identity strong {font-size: 21px; line-height: 1; letter-spacing:-.4px; white-space:nowrap;}
  .identity small {display:none;}
  .logo-mark {font-size: 23px; padding: 5px; border-radius: 9px; line-height:1.1;}
  .web-chip {font-size: 10px; padding: 5px 8px; border-radius: 6px; font-weight: 900;}
  .header-actions {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: #b3e2ff44 transparent;
  }
  .header-actions button {
    flex: 0 0 auto;
    font-size: 11px;
    padding: 7px 8px;
    line-height: 1.2;
    min-height: 31px;
    border-radius: 6px;
    box-shadow: none;
  }
  .workspace {
    grid-template-columns: minmax(190px, 215px) minmax(360px, 1fr) minmax(225px, 255px);
    gap: 6px;
    padding: 6px;
  }
  .pagebar {padding: 6px 9px; min-height: 39px;}
  .page-left strong {font-size: 13px;}
  .page-left span {padding: 4px 8px;}
  .page-tabs button, .tiny {padding: 6px 8px;}
  .toolbar-stack {padding: 3px 5px 4px; gap: 2px;}
  .toolbar-stack .toolbar {min-height: 31px; padding: 2px 4px; gap: 2px 7px;}
  .toolbar-stack .toolbar button {min-height: 25px; padding: 5px 7px;}
  .toolbar-stack .angle-label input {height: 26px;}
  .canvas-viewport {padding: 0 10px 16px;}
  .paper-wrap {width: min(100%, 760px);}
}
@media (min-width:781px) and (max-width:1150px) {
  .topbar {gap:7px; padding: 5px 8px;}
  .identity {gap:5px;}
  .identity strong {font-size: 18px;}
  .logo-mark {font-size: 21px; padding: 4px;}
  .web-chip {font-size: 9px; padding: 4px 6px;}
  .header-actions {gap: 3px;}
  .header-actions button {font-size: 10px; padding: 6px 6px;}
  .workspace {grid-template-columns: 170px minmax(300px,1fr) 210px;}
}
/* No celular, o cabeçalho continua responsivo, mas com marca e botões menores. */
@media (max-width:780px) {
  .topbar {gap: 7px; padding: 8px 9px; min-height: 0; border-bottom-width: 3px;}
  .identity {gap: 8px;}
  .identity strong {font-size: 21px;}
  .identity small {display:none;}
  .logo-mark {font-size: 23px; padding:4px;}
  .web-chip {padding:4px 7px; font-size:10px;}
  .header-actions {gap: 4px; justify-content:flex-start;}
  .header-actions button {padding:6px 8px; font-size:10px;}
}

/* HQ 2.9.13: busca de objetos e modo tela cheia */
.object-filters{display:flex;align-items:stretch;gap:5px;margin-top:7px;}
.object-filters input,.object-filters select{min-width:0;width:50%;font-size:11px;padding:7px 5px;border:1px solid #99bfdf;border-radius:7px;background:#fff;color:#155484;}
.object-filters input{width:57%;}.object-filters select{width:43%;}
.asset-tile[hidden]{display:none!important;}
#fullscreenToggle{background:#164986;border-color:#b5e7ff;}
#fullscreenToggle[aria-pressed="true"]{background:#ffd96b;color:#12385b;border-color:#fff2c0;}
.shell:fullscreen{height:100dvh;width:100vw;overflow:hidden;background:#e7f6ff;}
.shell:fullscreen .workspace{height:auto;min-height:0;flex:1;}
body.hq-fullscreen-fallback{overflow:hidden!important;}
body.hq-fullscreen-fallback .shell{position:fixed;inset:0;width:100vw;height:100dvh;overflow:hidden;z-index:999999;background:#e7f6ff;}
body.hq-fullscreen-fallback .workspace{height:auto;min-height:0;flex:1;}
@media(max-width:780px){
 .shell:fullscreen .workspace,body.hq-fullscreen-fallback .workspace{overflow-y:auto;}
 .object-filters{flex-direction:column;}
 .object-filters input,.object-filters select{width:100%;}
}
