/* Quadro de ideias (29/11/2026) — js/quadro.js */
body.pagina-quadro { margin: 0; background: #121214; color: #f4f4f5; font-family: "DM Sans", system-ui, sans-serif; overflow: hidden; height: 100dvh; }
.q-bt { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 13px; border-radius: 11px; border: 1px solid #3f3f46; background: #1f1f23; color: #f4f4f5; font: 700 13.5px "DM Sans", sans-serif; cursor: pointer; text-decoration: none; white-space: nowrap; }
.q-bt:hover { border-color: #ff9800; }
.q-bt svg { width: 17px; height: 17px; }
.q-bt.q-ic { width: 38px; padding: 0; justify-content: center; }
.q-bt.q-prim { background: #ff9800; border-color: #ff9800; color: #161616; }
.q-bt.ativo { background: rgba(255,152,0,.16); border-color: #ff9800; color: #ffd08a; }
.q-sep { width: 1px; height: 24px; background: #3f3f46; flex: none; }

/* entrar e lista */
.q-entrar { position: fixed; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; }
.q-entrar h1 { font-size: 28px; margin: 0 0 8px; } .q-entrar p { color: #a1a1aa; margin: 0 0 18px; }
.q-lista { position: fixed; inset: 0; overflow-y: auto; padding: 24px clamp(16px, 4vw, 48px) 60px; }
.q-lista-cab { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.q-lista-cab > div { flex: 1; min-width: 220px; }
.q-lista-cab h1 { margin: 0; font-size: 26px; } .q-lista-cab p { margin: 4px 0 0; color: #a1a1aa; }
.q-cartoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.q-cartao { display: flex; align-items: center; gap: 8px; padding: 14px; border-radius: 16px; background: #1b1b1f; border: 1px solid #2c2c31; }
.q-cartao:hover { border-color: #ff9800; }
.q-cartao a { flex: 1; min-width: 0; color: inherit; text-decoration: none; display: flex; flex-direction: column; gap: 4px; }
.q-cartao b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .q-cartao small { color: #a1a1aa; }
.q-vazio { color: #a1a1aa; }

/* o quadro */
.q-quadro { position: fixed; inset: 0; }
.q-palco { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab;
  background-color: #141417; background-image: radial-gradient(circle, #2c2c33 1.2px, transparent 1.3px); background-size: calc(28px * var(--qz, 1)) calc(28px * var(--qz, 1)); }
.q-palco:active { cursor: grabbing; }
.q-palco[data-ferr="caneta"] { cursor: crosshair; }
.q-palco[data-ferr="nota"], .q-palco[data-ferr="texto"], .q-palco[data-ferr="acorde"], .q-palco[data-ferr="verso"], .q-palco[data-ferr="imagem"] { cursor: copy; }
.q-palco[data-ferr="ligar"] { cursor: alias; }
.q-mundo { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.q-mundo.q-anima { transition: transform .3s ease; }
.q-ligas, .q-tinta { position: absolute; left: 0; top: 0; overflow: visible; }
.q-tinta { pointer-events: none; z-index: 99999; }
.q-ligas path { fill: none; stroke-width: 3; stroke-linecap: round; pointer-events: stroke; cursor: pointer; }
.q-ligas path.sel { stroke-width: 5; filter: drop-shadow(0 0 4px #ff9800); }

.q-item { position: absolute; border-radius: 14px; user-select: none; -webkit-user-select: none; }
.q-item.sel { outline: 2px solid #ff9800; outline-offset: 4px; }
.q-alca { display: none; position: absolute; right: -9px; bottom: -9px; width: 16px; height: 16px; border-radius: 50%; background: #ff9800; border: 2px solid #161616; cursor: nwse-resize; }
.q-item.sel .q-alca { display: block; }
.q-txt { outline: none; white-space: pre-wrap; word-break: break-word; min-height: 1.3em; }
.q-txt[contenteditable="true"] { user-select: text; -webkit-user-select: text; cursor: text; }
.q-nota { background: var(--cor); color: #1c1917; padding: 16px 16px 18px; box-shadow: 0 10px 24px rgba(0,0,0,.35); border-radius: 6px 6px 14px 6px; font-family: "Caveat", "DM Sans", cursive; font-size: 26px; line-height: 1.15; min-height: 90px; }
.q-nota .q-txt:empty::before { content: "Escreva…"; opacity: .45; }
.q-texto { color: var(--cor); font-weight: 800; line-height: 1.15; padding: 4px 6px; }
.q-texto .q-txt:empty::before { content: "Texto"; opacity: .4; }
.q-acorde { background: #1b1b1f; border: 1px solid #34343b; padding: 12px; box-shadow: 0 10px 24px rgba(0,0,0,.35); }
.q-ac-nome { font-size: 30px; font-weight: 800; color: #ffb547; margin-bottom: 6px; }
.q-acorde svg, .q-ac-prev svg { width: 100%; height: auto; }
.q-ac-cordas { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.q-ac-prev { max-width: 320px; margin: 6px auto 0; }
.q-verso { background: #1d1a14; border: 1px solid #4a3a1c; border-left: 5px solid #ff9800; padding: 14px 16px; box-shadow: 0 10px 24px rgba(0,0,0,.35); }
.q-vs-ref { font-weight: 800; color: #ffb547; margin-bottom: 6px; font-size: 17px; }
.q-vs-txt p, .q-vs-prev p { margin: 0 0 6px; font-size: 17px; line-height: 1.45; color: #f5f0e6; font-family: Georgia, serif; }
.q-vs-txt sup, .q-vs-prev sup { color: #ffb547; font-family: "DM Sans", sans-serif; font-weight: 800; }
.q-vs-prev { max-height: 40vh; overflow-y: auto; margin: 8px 0; }
.q-imagem img { width: 100%; height: 100%; object-fit: contain; border-radius: 12px; display: block; pointer-events: none; }
.q-desenho { border-radius: 0; }
.q-desenho svg { display: block; overflow: visible; pointer-events: none; }
.q-desenho path { pointer-events: stroke; }
.q-desenho.sel { outline-style: dashed; }

/* barras */
.q-topo { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; align-items: center; gap: 8px; z-index: 10; pointer-events: none; }
.q-topo > * { pointer-events: auto; }
.q-titulo { height: 38px; min-width: 120px; width: min(360px, 40vw); padding: 0 12px; border-radius: 11px; border: 1px solid #3f3f46; background: rgba(31,31,35,.92); color: #fff; font: 800 16px "DM Sans", sans-serif; }
.q-titulo:focus { outline: none; border-color: #ff9800; }
.q-estado { color: #a1a1aa; font-size: 12.5px; background: rgba(20,20,23,.8); padding: 4px 8px; border-radius: 8px; }
.q-estado:empty { display: none; }
.q-esp { flex: 1; }
.q-ferr { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); z-index: 10; display: flex; flex-direction: column; gap: 4px; padding: 6px; border-radius: 16px; background: rgba(27,27,31,.95); border: 1px solid #2f2f35; box-shadow: 0 12px 30px rgba(0,0,0,.45); }
.q-ferr button { width: 58px; padding: 7px 0 5px; border-radius: 11px; border: 0; background: transparent; color: #d4d4d8; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; }
.q-ferr button svg { width: 20px; height: 20px; }
.q-ferr button small { font-size: 10.5px; font-weight: 700; }
.q-ferr button:hover { background: #27272a; }
.q-ferr button.ativo { background: #ff9800; color: #161616; }
.q-ferr .q-sep { width: 36px; height: 1px; margin: 2px auto; }
.q-caneta, .q-sel { position: absolute; z-index: 11; display: flex; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 14px; background: rgba(27,27,31,.97); border: 1px solid #3f3f46; box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.q-caneta[hidden], .q-sel[hidden] { display: none; }
.q-caneta { left: 84px; top: 50%; transform: translateY(-50%); flex-direction: column; }
.q-caneta .q-sep { width: 28px; height: 1px; }
.q-caneta button:not(.q-cor), .q-sel button:not(.q-cor) { min-width: 34px; height: 32px; padding: 0 9px; border-radius: 9px; border: 1px solid #3f3f46; background: #27272a; color: #f4f4f5; font-weight: 700; font-size: 12.5px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.q-caneta button.ativo, .q-sel button.ativo { border-color: #ff9800; color: #ffd08a; }
.q-sel button svg { width: 16px; height: 16px; }
.q-cor { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #3f3f46; background: var(--c); cursor: pointer; flex: none; }
.q-cor.ativo { border-color: #fff; box-shadow: 0 0 0 2px #ff9800; }
.q-zoom { position: absolute; right: 12px; bottom: 12px; z-index: 10; display: flex; gap: 6px; }
.q-zoom #qZoomTxt { min-width: 62px; justify-content: center; }
.q-dica { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); margin: 0; z-index: 9; color: #a1a1aa; font-size: 12.5px; background: rgba(20,20,23,.85); padding: 6px 12px; border-radius: 10px; max-width: calc(100vw - 260px); text-align: center; pointer-events: none; }
.q-chave { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; border: 1px solid #3f3f46; cursor: pointer; margin-bottom: 12px; }
.q-chave input { width: 18px; height: 18px; accent-color: #ff9800; margin-top: 2px; }
.q-chave small { display: block; color: #a1a1aa; margin-top: 2px; }

/* visitante: só ver */
.q-visitante .q-ferr, .q-visitante .q-caneta, .q-visitante .q-sel, .q-visitante #qApresentar { display: none !important; }
/* apresentar: só o quadro */
.q-apresentando .q-topo, .q-apresentando .q-ferr, .q-apresentando .q-caneta, .q-apresentando .q-sel, .q-apresentando .q-dica { display: none !important; }
.q-sair-apr { position: absolute; top: 10px; right: 10px; z-index: 12; padding: 8px 12px; border-radius: 10px; border: 1px solid #3f3f46; background: rgba(27,27,31,.7); color: #d4d4d8; font-weight: 700; opacity: .35; cursor: pointer; }
.q-sair-apr:hover { opacity: 1; }
.q-sair-apr[hidden] { display: none; }

@media (max-width: 700px) {
  .q-topo .q-bt span { display: none; }
  .q-topo .q-bt { width: 38px; padding: 0; justify-content: center; }
  .q-titulo { width: auto; flex: 1; min-width: 0; }
  .q-esp { display: none; }
  .q-ferr { top: auto; bottom: 64px; left: 50%; transform: translateX(-50%); flex-direction: row; max-width: calc(100vw - 16px); overflow-x: auto; }
  .q-ferr button { width: 52px; }
  .q-ferr .q-sep { width: 1px; height: 36px; margin: auto 2px; }
  .q-caneta { left: 50%; top: auto; bottom: 136px; transform: translateX(-50%); flex-direction: row; flex-wrap: wrap; justify-content: center; max-width: calc(100vw - 16px); }
  .q-caneta .q-sep { width: 1px; height: 24px; }
  .q-dica { display: none; }
}

/* 29/11/2026 — canetas das transmissões no quadro (caneta, marca-texto, reta, seta, círculo, caixa, emoji, número, laser, borracha) */
.q-caneta { align-items: stretch; gap: 8px; width: 300px; }
.q-modos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.q-modos button { height: auto !important; padding: 6px 2px !important; flex-direction: column; gap: 2px; }
.q-modos button svg { width: 18px; height: 18px; }
.q-modos button small { font-size: 9.5px; font-weight: 700; }
.q-modos button.ativo { background: #ff9800 !important; color: #161616 !important; border-color: #ff9800 !important; }
.q-cn-linha { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.q-cn-emojis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.q-cn-emojis button { font-size: 20px !important; height: 36px !important; padding: 0 !important; }
.q-cn-dica { margin: 0; color: #a1a1aa; font-size: 12px; }
.q-carimbo { padding: 0; }
.q-carimbo-txt { line-height: 1; text-shadow: 0 2px 8px rgba(0,0,0,.4); white-space: nowrap; }
.q-carimbo-txt.num { display: inline-grid; place-items: center; min-width: 1.4em; height: 1.4em; border-radius: 50%; background: var(--cor); color: #161616; font-weight: 800; font-size: 30px !important; text-shadow: none; padding: 0 .15em; }
.q-palco[data-ferr="caneta"][data-modo="borracha"] { cursor: cell; }
.q-palco[data-ferr="caneta"][data-modo="laser"] { cursor: none; }
@media (max-width: 700px) { .q-caneta { width: auto; bottom: 136px; } .q-modos { grid-template-columns: repeat(5, 1fr); } }
/* aberto por dentro (Página do Ochat, Sala de Aula): o × de quem abriu fica no canto */
.q-dentro .q-topo > a.q-bt:first-child { visibility: hidden; }

/* 29/11/2026 — votos, Mais opções, Levar para o Crono */
.q-voto { position: absolute; right: -10px; bottom: -14px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; border: 1px solid #3f3f46; background: #1f1f23; color: #f4f4f5; font: 700 13px "DM Sans", sans-serif; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.q-voto.meu { background: #ff9800; border-color: #ff9800; color: #161616; }
.q-mais-grade { display: grid; gap: 8px; margin-top: 6px; }
.q-mais-grade > button { display: grid; grid-template-columns: 28px 1fr; column-gap: 10px; align-items: center; text-align: left; padding: 12px; border-radius: 12px; border: 1px solid #3f3f46; background: transparent; color: inherit; cursor: pointer; }
.q-mais-grade > button:hover { border-color: #ff9800; }
.q-mais-grade > button svg { grid-row: span 2; width: 24px; height: 24px; color: #ff9800; }
.q-mais-grade small { opacity: .7; }
.q-mais-tit { margin: 14px 0 6px; font-size: 14px; }
.q-mais-rank { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.q-cr-lista { display: grid; gap: 6px; max-height: 42vh; overflow-y: auto; margin: 8px 0; }
.q-cr-lista label { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; border: 1px solid #3f3f46; cursor: pointer; }
.q-cr-lista input { accent-color: #ff9800; margin-top: 3px; }
@media (max-width: 700px) { #qMais span { display: none; } }
.q-env-modo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 8px; }
.q-env-modo button { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 12px; border: 1px solid #3f3f46; background: transparent; color: inherit; cursor: pointer; text-align: left; }
.q-env-modo button.ativo { border-color: #ff9800; background: rgba(255,152,0,.14); }
.q-env-modo small { opacity: .7; }
.q-env-ochat { width: 100%; display: flex; align-items: center; gap: 12px; margin: 4px 0 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid #ff9800; background: rgba(255,152,0,.12); color: inherit; text-align: left; cursor: pointer; }
.q-env-ochat svg { width: 24px; height: 24px; color: #ff9800; flex: none; }
.q-env-ochat > span { display: flex; flex-direction: column; gap: 2px; } .q-env-ochat small { opacity: .75; }
