/* dive.lle.sh (18/10/2026): creme, letra grossa Figtree, minúsculas, uma cor de destaque */
a, button, input, select, textarea, [tabindex] { outline: none; -webkit-tap-highlight-color: transparent; }
:focus, :focus-visible { outline: none; box-shadow: none; }
:root { --creme: #FFFBF3; --tinta: #2B2729; --cinza: #8A8486; --linha: #D6D4CE; --linha2: #C8C4B9; --capa: #F4EFE4; --rosa: #F48591; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--creme); color: var(--tinta); overflow: hidden; }
body { font: 600 18px/1.35 Figtree, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

#capa { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }
#capa h1 { margin: 0; font-weight: 900; font-size: 160px; letter-spacing: -.04em; }

/* topo: o caminho em migalhas */
#topo { position: fixed; top: 0; left: 0; right: 0; z-index: 20; padding: 28px 40px 18px; pointer-events: none;
  background: linear-gradient(var(--creme) 60%, rgba(255,251,243,0)); }
#migalhas { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-weight: 800; font-size: 22px; pointer-events: auto; max-width: 100%; }
#migalhas .m { cursor: pointer; color: var(--cinza); white-space: nowrap; }
#migalhas .m:hover { color: var(--tinta); }
#migalhas .m.atual { color: var(--tinta); cursor: text; }
#migalhas .sep { color: var(--linha2); font-weight: 700; }

/* palco = o canvas infinito */
#palco { position: fixed; inset: 0; overflow: hidden; touch-action: none; cursor: default; }
#palco.mao { cursor: grab; } #palco.mao.puxando { cursor: grabbing; }
#palco.caneta, #palco.caneta * { cursor: crosshair !important; }
#mundo { position: absolute; left: 0; top: 0; width: 1px; height: 1px; transform-origin: 0 0; will-change: transform; }
#mundo.anda { transition: transform .5s cubic-bezier(.6,0,.2,1), opacity .5s ease; }

/* cartões */
.c { position: absolute; border-radius: 14px; user-select: none; -webkit-user-select: none; }
.c.sel { box-shadow: 0 0 0 2px var(--rosa); }
.c .rz { position: absolute; right: -6px; bottom: -6px; width: 22px; height: 22px; cursor: nwse-resize; z-index: 3; }
.c.arrastando { opacity: .92; box-shadow: 0 14px 40px rgba(43,39,41,.16); }

.c.quadro .capa { position: absolute; inset: 0; border-radius: 14px; background: var(--capa); border: 1.5px solid var(--linha); overflow: hidden; cursor: pointer; }
.c.quadro .capa:hover { border-color: var(--linha2); }
.c.quadro .tit { position: absolute; left: 2px; bottom: 100%; margin-bottom: 8px; max-width: 100%; font-weight: 800; font-size: 17px; letter-spacing: .02em; text-transform: uppercase; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-wrap: balance; }
.c.quadro .tit[contenteditable="true"] { display: block; text-transform: none; overflow: visible; user-select: text; -webkit-user-select: text; min-width: 40px; }
.mini { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; }
.mini .c { box-shadow: none !important; }
.mini .c.quadro .capa { background: #EDE7DA; }

.c.texto .txt { padding: 6px 8px; min-height: 36px; font-size: 20px; font-weight: 600; white-space: pre-wrap; word-break: break-word; }
.c.texto.titulo .txt { font-size: 34px; font-weight: 800; line-height: 1.12; }
.c.nota { background: #FFB872; }
.c.nota .txt { position: absolute; inset: 0; padding: 24px; overflow: hidden; font-size: 18px; font-weight: 600; white-space: pre-wrap; word-break: break-word; }
.txt[contenteditable="true"] { user-select: text; -webkit-user-select: text; cursor: text; caret-color: var(--tinta); }
.c.texto .txt:empty::before { content: "escreve"; color: var(--linha2); }

.c.imagem { background: var(--capa); }
.c.imagem img { border-radius: 14px; display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }

.c.link { background: #fff; border: 1.5px solid var(--linha); display: flex; flex-direction: column; }
.c.link .im { border-radius: 12.5px 12.5px 0 0; flex: 1 1 auto; min-height: 0; background: var(--capa) center/cover no-repeat; }
.c.link .tx { overflow: hidden; flex: 0 0 auto; padding: 16px 24px 20px; }
.c.link .lt { font-weight: 800; font-size: 17px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.c.link .lh { margin-top: 6px; font-weight: 600; font-size: 14px; color: var(--cinza); display: flex; gap: 8px; align-items: center; }
.c.link .lh img { width: 16px; height: 16px; border-radius: 4px; }
.c.link.sem .im { display: none; }
.c.link.sem .tx { flex: 1; display: flex; flex-direction: column; justify-content: center; }

.c.pdf { background: #fff; border: 1.5px solid var(--linha); display: flex; flex-direction: column; }
.c.pdf .pg { border-radius: 12.5px 12.5px 0 0; flex: 1; min-height: 0; background: var(--capa); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.c.pdf canvas { max-width: 100%; max-height: 100%; display: block; }
.c.pdf .pn { padding: 12px 24px 16px; font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.c.tinta { pointer-events: none; border-radius: 0; }
.c.tinta svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.c.tinta .toque { pointer-events: stroke; stroke: transparent; }
.c.tinta.sel { box-shadow: none; outline: 1.5px dashed var(--rosa); outline-offset: 4px; }
.c.tinta .rz { pointer-events: auto; }
#risco { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }

.c.pedindo { background: #fff; border: 1.5px solid var(--linha); padding: 24px; display: flex; align-items: center; }
.c.pedindo input { width: 100%; font: 700 18px Figtree, sans-serif; border: 0; border-bottom: 1.5px solid var(--linha2); background: transparent; padding: 6px 0; color: var(--tinta); }
.c.subindo { opacity: .55; }

/* barra de baixo */
#ferr { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 20; display: flex; gap: 6px; padding: 8px; background: var(--tinta); border-radius: 999px; box-shadow: 0 10px 30px rgba(43,39,41,.18); }
#ferr button { color: var(--creme); font-weight: 800; font-size: 16px; padding: 10px 18px; border-radius: 999px; }
#ferr button:hover { background: rgba(255,251,243,.12); }
#ferr button.liga { background: var(--creme); color: var(--tinta); }

/* menu do botão direito */
#menu { position: fixed; z-index: 40; min-width: 160px; background: #fff; border: 1.5px solid var(--linha); border-radius: 14px; padding: 6px; box-shadow: 0 10px 30px rgba(43,39,41,.14); }
#menu button { display: block; width: 100%; text-align: left; padding: 10px 14px; border-radius: 9px; font-weight: 700; font-size: 16px; }
#menu button:hover { background: var(--capa); }
#menu .cores { display: flex; gap: 8px; padding: 8px 14px 10px; }
#menu .cores button { width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 1.5px solid rgba(43,39,41,.12); }
