:root {
  color-scheme: light;

  --chao: #ECECEA;
  --ponto: rgba(17, 17, 19, 0.16);
  --tinta: #111113;
  --tinta-2: #45454B;
  --tinta-3: #616168;
  --branco: #FFFFFF;
  --casca: rgba(255, 255, 255, 0.55);
  --anel: rgba(17, 17, 19, 0.07);
  --hover: #F1F1EF;
  --azul: #2B4BF2;
  --perigo: #C8323F;

  /* cores das pessoas (fundo da nota) */
  --c-amarelo: #FFE48A; --c-coral: #FFC4AE; --c-menta: #BDEBD2; --c-ceu: #C3DDFF;
  --c-lilas: #DCCDFF; --c-rosa: #FFCAE2; --c-areia: #EADCC4; --c-limao: #DDF19C;
  /* cores dos temas (grupos e resumo) */
  --t-azul: #2B4BF2; --t-laranja: #E0590E; --t-verde: #0E9455; --t-roxo: #7440E0;
  --t-vermelho: #D7374A; --t-petroleo: #0D8585;

  --sombra-ilha: 0 1px 1px rgba(17, 17, 19, 0.04), 0 10px 24px -8px rgba(17, 17, 19, 0.12), 0 28px 56px -24px rgba(17, 17, 19, 0.14);
  --sombra-nota: 0 1px 1px rgba(17, 17, 19, 0.05), 0 3px 8px -2px rgba(17, 17, 19, 0.08);
  --sombra-ergue: 0 2px 3px rgba(17, 17, 19, 0.06), 0 22px 40px -12px rgba(17, 17, 19, 0.26);
  --brilho: inset 0 1px 0 rgba(255, 255, 255, 0.7);

  /* tokens de movimento (transitions.dev) */
  --duration-stagger: 40ms;
  --duration-quick: 150ms;
  --duration-fast: 250ms;
  --duration-medium: 350ms;
  --duration-slow: 400ms;
  --duration-very-slow: 500ms;
  --ease-smooth-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce: cubic-bezier(0.34, 1.36, 0.64, 1);
  --ease-press: cubic-bezier(0.2, 0, 0, 1);

  --seguro-baixo: env(safe-area-inset-bottom, 0px);
  --seguro-topo: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Geist", ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--tinta);
  background: var(--chao);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}
::selection { background: rgba(43, 75, 242, 0.2); color: var(--tinta); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; border-radius: 10px; }
[hidden] { display: none !important; }

.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ic-sm { width: 16px; height: 16px; }

/* ---------- quadro ---------- */
.quadro {
  position: fixed; inset: 0;
  background-color: var(--chao);
  overflow: hidden;
  touch-action: none;
  cursor: default;
  user-select: none; -webkit-user-select: none;
}
.quadro.arrastando { cursor: grabbing; }
.grade {
  position: absolute; inset: -64px; pointer-events: none; will-change: transform;
  background-image: radial-gradient(circle, var(--ponto) 1px, transparent 1.3px);
  background-size: 24px 24px; background-position: 0 0;
}
.mundo { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }

/* ---------- nota ---------- */
.nota {
  position: absolute; left: 0; top: 0;
  width: 248px;
  padding: 14px 16px 12px;
  border-radius: 18px;
  background: var(--fundo, var(--c-amarelo));
  box-shadow: var(--sombra-nota), var(--brilho);
  z-index: 2;
  cursor: grab;
  transition-property: scale, rotate, box-shadow;
  transition-duration: var(--duration-quick);
  transition-timing-function: var(--ease-smooth-out);
}
.nota.erguida, .nota.movendo { will-change: transform; }
.nota.erguida { scale: 1.025; rotate: -0.8deg; box-shadow: var(--sombra-ergue), var(--brilho); z-index: 6; cursor: grabbing; }
.nota.editando { z-index: 5; cursor: auto; box-shadow: 0 0 0 2px var(--tinta), var(--sombra-ergue); }
.nota.destaque { box-shadow: 0 0 0 3px var(--azul), var(--sombra-ergue); }
.nota.chegando { animation: nota-entra var(--duration-fast) var(--ease-smooth-out) both; }
.nota.saindo { animation: nota-sai var(--duration-quick) ease-out both; pointer-events: none; }
@keyframes nota-entra { from { opacity: 0; scale: 0.96; filter: blur(2px); } }
@keyframes nota-sai { to { opacity: 0; scale: 0.97; } }

.nota-topo { display: flex; align-items: center; gap: 6px; height: 24px; margin-bottom: 6px; color: rgba(17, 17, 19, 0.66); }
.nota-topo .ic { width: 17px; height: 17px; }
.nota-tipo { font-size: 12.5px; font-weight: 600; letter-spacing: 0.01em; }
.nota-digitando { font-size: 12px; font-weight: 500; color: var(--tinta-2); margin-left: 2px; }
.nota-digitando:empty { display: none; }
.nota-apagar {
  margin-left: auto; width: 30px; height: 30px; margin-right: -8px; display: grid; place-items: center;
  border-radius: 999px; color: rgba(17, 17, 19, 0.55);
  opacity: 0; transition: opacity var(--duration-quick) ease-out, background-color var(--duration-quick) ease-out;
}
.nota:hover .nota-apagar, .nota.editando .nota-apagar { opacity: 1; }
.nota-apagar:hover { background: rgba(17, 17, 19, 0.08); color: var(--perigo); }
@media (pointer: coarse) { .nota-apagar { display: none; } }

.nota-texto { font-size: 15px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; text-wrap: pretty; min-height: 22px; }
.nota-texto.vazia { color: rgba(17, 17, 19, 0.45); }
.nota[data-tipo="citacao"] .nota-texto { font-size: 16.5px; line-height: 1.45; font-weight: 500; letter-spacing: -0.005em; }
.nota[data-tipo="pergunta"] .nota-texto { font-weight: 600; letter-spacing: -0.005em; }

.nota-ref {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; max-width: 100%;
  padding: 5px 10px 5px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.62); box-shadow: inset 0 0 0 1px rgba(17, 17, 19, 0.06);
  font-size: 13px; font-weight: 600; color: var(--tinta); text-decoration: none;
  transition: background-color var(--duration-quick) ease-out;
}
.nota-ref span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nota-ref .ic { width: 16px; height: 16px; }
.nota-ref[href]:hover { background: #fff; }
.nota-ref:not([href]) { cursor: inherit; }
.nota-ref.oculta { display: none; }

.nota-pe { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 12.5px; color: rgba(17, 17, 19, 0.62); font-variant-numeric: tabular-nums; }
.nota-autor { font-weight: 600; color: rgba(17, 17, 19, 0.78); }
.nota-hora::before { content: "·"; margin-right: 6px; }

/* edição na própria nota (mouse) */
.nota-tipos { display: none; gap: 2px; padding: 2px; border-radius: 999px; background: rgba(255, 255, 255, 0.55); }
.nota.editando .nota-tipos { display: inline-flex; }
.nota.editando .nota-topo > .ic, .nota.editando .nota-tipo { display: none; }
.nota-tipos button { height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; color: rgba(17, 17, 19, 0.6); }
.nota-tipos button[aria-pressed="true"] { background: #fff; color: var(--tinta); box-shadow: 0 1px 2px rgba(17, 17, 19, 0.1); }
.nota-campo, .nota-campo-ref {
  display: block; width: 100%; border: 0; outline: 0; background: transparent; resize: none; padding: 0;
  font-size: inherit; line-height: inherit; font-weight: inherit; letter-spacing: inherit; caret-color: var(--tinta);
}
.nota-campo::placeholder, .nota-campo-ref::placeholder { color: rgba(17, 17, 19, 0.45); }
.nota-campo-ref {
  margin-top: 10px; padding: 7px 10px; border-radius: 10px; font-size: 13px; font-weight: 500;
  background: rgba(255, 255, 255, 0.6); box-shadow: inset 0 0 0 1px rgba(17, 17, 19, 0.07);
}

/* imagem anexada */
.nota-img { display: block; margin: 2px -6px 10px; border-radius: 12px; overflow: hidden; background: rgba(255, 255, 255, 0.5); cursor: zoom-in; }
.nota-img img { display: block; width: 100%; height: auto; max-height: 340px; object-fit: cover; outline: 1px solid oklch(0 0 0 / 0.1); outline-offset: -1px; border-radius: 12px; -webkit-user-drag: none; }
.nota-img.oculta { display: none; }
.nota.so-imagem .nota-texto { display: none; }
.nota.editando.so-imagem .nota-texto { display: block; }

/* ---------- grupos (organizar) ---------- */
.grupo {
  position: absolute; left: 0; top: 0; z-index: 1;
  padding: 6px; border-radius: 34px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: 0 0 0 1px rgba(17, 17, 19, 0.05), 0 18px 40px -26px rgba(17, 17, 19, 0.25);
}
.grupo-miolo { width: 100%; height: 100%; border-radius: 28px; background: rgba(255, 255, 255, 0.5); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9); }
.grupo-topo { display: flex; align-items: center; gap: 10px; height: 58px; padding: 0 12px 0 20px; cursor: grab; }
.grupo-ponto { width: 12px; height: 12px; border-radius: 999px; background: var(--tema, var(--t-azul)); flex: none; box-shadow: 0 0 0 4px color-mix(in oklab, var(--tema, var(--t-azul)) 16%, transparent); }
.grupo-topo h3 { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grupo-n { font-size: 13px; color: var(--tinta-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.grupo-tirar { margin-left: auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 999px; color: var(--tinta-3); opacity: 0; transition: opacity var(--duration-quick) ease-out, background-color var(--duration-quick) ease-out; }
.grupo:hover .grupo-tirar { opacity: 1; }
.grupo-tirar:hover { background: rgba(17, 17, 19, 0.06); color: var(--tinta); }
.grupo.entrando { animation: grupo-entra var(--duration-slow) var(--ease-smooth-out) both; animation-delay: var(--atraso, 0ms); }
.grupo.saindo { animation: nota-sai var(--duration-quick) ease-out both; }
@keyframes grupo-entra { from { opacity: 0; scale: 0.98; } }

/* ---------- cursores dos outros ---------- */
.cursores { position: fixed; inset: 0; pointer-events: none; z-index: 20; overflow: hidden; }
.cursor { position: absolute; left: 0; top: 0; transition: opacity var(--duration-medium) ease-out; will-change: transform; }
.cursor.parado { opacity: 0; }
.cursor svg { width: 18px; height: 20px; display: block; filter: drop-shadow(0 1px 1.5px rgba(17, 17, 19, 0.3)); }
.cursor-nome {
  position: absolute; left: 14px; top: 16px; padding: 3px 9px; border-radius: 999px; white-space: nowrap;
  font-size: 12px; font-weight: 600; color: var(--tinta); background: var(--cor);
  box-shadow: 0 0 0 1px rgba(17, 17, 19, 0.08), 0 4px 10px -4px rgba(17, 17, 19, 0.3);
}

/* ---------- ilhas (moldura dupla) ---------- */
.ilha {
  position: fixed; z-index: 30;
  padding: 5px; border-radius: 999px;
  background: rgba(250, 250, 249, 0.86);
  box-shadow: 0 0 0 1px var(--anel), var(--sombra-ilha);
}
.ilha > .miolo {
  display: flex; align-items: center; gap: 2px;
  border-radius: 999px; background: var(--branco);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 0 0 1px rgba(17, 17, 19, 0.04);
  padding: 4px;
}
.ilha-dia { top: calc(14px + var(--seguro-topo)); left: 14px; }
.ilha-gente { top: calc(14px + var(--seguro-topo)); right: 14px; }
.barra { left: 50%; bottom: calc(16px + var(--seguro-baixo)); translate: -50% 0; }
.zoom { right: 14px; bottom: calc(16px + var(--seguro-baixo)); }
@media (min-width: 761px) {
  .barra { transition: translate var(--duration-slow) var(--ease-smooth-out); }
  body.com-painel .barra { translate: calc(-50% - 226px) 0; }
  body.com-painel .zoom, body.com-painel .ilha-gente { opacity: 0; pointer-events: none; }
  .zoom, .ilha-gente { transition: opacity var(--duration-quick) ease-out; }
}

.marca { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; }
.marca svg { width: 30px; height: 30px; }
.bt-ic {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; color: var(--tinta-2);
  transition: background-color var(--duration-quick) ease-out, scale var(--duration-quick) var(--ease-press), color var(--duration-quick) ease-out;
}
@media (hover: hover) { .bt-ic:hover { background: var(--hover); color: var(--tinta); } }
.bt-ic:active { scale: 0.96; }
.bt-ic:disabled { opacity: 0.35; cursor: default; background: none; }
.dia {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px;
  font-weight: 600; letter-spacing: -0.01em; white-space: nowrap;
  transition: background-color var(--duration-quick) ease-out, scale var(--duration-quick) var(--ease-press);
}
@media (hover: hover) { .dia:hover { background: var(--hover); } }
.dia:active { scale: 0.96; }
.dia .ic { color: var(--tinta-3); }
.bt-hoje {
  height: 32px; padding: 0 12px; margin: 0 4px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--tinta); color: #fff;
  transition: scale var(--duration-quick) var(--ease-press);
}
.bt-hoje:active { scale: 0.96; }

.gente { display: flex; align-items: center; padding: 0 4px 0 6px; }
.av {
  position: relative; display: grid; place-items: center; width: 34px; height: 34px; margin-left: -8px; border-radius: 999px;
  background: var(--cor); color: var(--tinta); font-size: 13px; font-weight: 700;
  box-shadow: 0 0 0 2.5px #fff;
  transition: translate var(--duration-fast) var(--ease-smooth-out);
}
.av:first-child { margin-left: 0; }
.gente:hover .av { translate: 0 0; }
.av.eu::after { content: ""; position: absolute; inset: -5px; border-radius: 999px; box-shadow: 0 0 0 1.5px rgba(17, 17, 19, 0.18); }
.av.mais { background: var(--hover); font-size: 12px; }
.av { overflow: hidden; }
.av img { width: 100%; height: 100%; object-fit: cover; border-radius: 999px; display: block; }
.av.eu { overflow: visible; }
.nota-av { width: 20px; height: 20px; margin: 0 1px 0 0; font-size: 10px; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.75); flex: none; }

/* link resumido na nota */
.nota-link { margin-top: 10px; padding: 12px 12px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.66); box-shadow: inset 0 0 0 1px rgba(17, 17, 19, 0.06); }
.nota-link.oculta, .nota-texto.oculta { display: none; }
.nl-estado { margin: 0; font-size: 13px; font-weight: 600; }
.nl-estado:empty { display: none; }
.nl-titulo { display: block; font-size: 14.5px; line-height: 1.3; font-weight: 650; letter-spacing: -0.01em; text-wrap: balance; }
.nl-autor { display: block; margin-top: 3px; font-size: 12.5px; color: rgba(17, 17, 19, 0.62); font-weight: 500; }
.nl-resumo { margin: 8px 0 0; font-size: 13.5px; line-height: 1.5; text-wrap: pretty; }
.nl-pontos { margin: 8px 0 0; padding: 0 0 0 16px; font-size: 13px; line-height: 1.45; display: grid; gap: 3px; }
.nl-pontos:empty { display: none; }
.nl-pontos li::marker { color: rgba(17, 17, 19, 0.4); }
.nl-abrir { display: inline-flex; align-items: center; gap: 4px; margin-top: 9px; font-size: 12.5px; font-weight: 650; color: var(--tinta); text-decoration: none; }
.nl-abrir .ic { width: 14px; height: 14px; transition: translate var(--duration-fast) var(--ease-smooth-out); }
.nl-abrir:hover .ic { translate: 2px -2px; }
.av.entrando { animation: av-entra var(--duration-fast) var(--ease-bounce) both; }
@keyframes av-entra { from { scale: 0.6; opacity: 0; } }
.bt-texto {
  display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px 0 12px; border-radius: 999px; font-weight: 600; font-size: 14px;
  transition: background-color var(--duration-quick) ease-out, scale var(--duration-quick) var(--ease-press);
}
@media (hover: hover) { .bt-texto:hover { background: var(--hover); } }
.bt-texto:active { scale: 0.96; }

.conexao {
  position: fixed; z-index: 31; top: calc(20px + var(--seguro-topo)); left: 50%; translate: -50% 0;
  padding: 8px 14px; border-radius: 999px; background: var(--tinta); color: #fff; font-size: 13px; font-weight: 600;
  box-shadow: var(--sombra-ilha);
}

/* barra de ferramentas */
.ferr {
  position: relative; display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px 0 13px; border-radius: 999px;
  font-weight: 600; font-size: 14.5px; letter-spacing: -0.005em; white-space: nowrap;
  transition: background-color var(--duration-quick) ease-out, scale var(--duration-quick) var(--ease-press), opacity var(--duration-quick) ease-out;
}
@media (hover: hover) { .ferr:hover { background: var(--hover); } }
.ferr:active { scale: 0.96; }
.ferr:disabled { cursor: progress; }
.ferr .ic { width: 21px; height: 21px; }
.ferr[data-novo="ideia"] .ic { color: #B48A00; }
.ferr[data-novo="citacao"] .ic { color: var(--t-azul); }
.ferr[data-novo="pergunta"] .ic { color: var(--t-vermelho); }
.divisor { width: 1px; height: 24px; margin: 0 6px; background: rgba(17, 17, 19, 0.1); }
.ferr-principal { padding: 0 5px 0 18px; gap: 12px; margin-left: 4px; background: var(--tinta); color: #fff; }
@media (hover: hover) { .ferr-principal:hover { background: #26262A; } }
.ferr-txt-curto { display: none; }
.ninho {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; background: rgba(255, 255, 255, 0.14);
  transition: translate var(--duration-fast) var(--ease-smooth-out), scale var(--duration-fast) var(--ease-smooth-out);
}
.ninho .ic { width: 19px; height: 19px; color: #FFE48A; }
.ferr-principal:hover .ninho, .bt-grande:hover .ninho { translate: 2px -1px; scale: 1.05; }
.selo {
  position: absolute; top: 2px; right: 2px; width: 12px; height: 12px; border-radius: 999px;
  background: #FFE48A; box-shadow: 0 0 0 2.5px var(--tinta);
  animation: selo-entra var(--duration-very-slow) var(--ease-bounce) both;
}
@keyframes selo-entra { from { scale: 0.25; opacity: 0; } }

.rotulo-troca { position: relative; display: inline-grid; }
.rotulo-troca > span { grid-area: 1 / 1; transition: opacity var(--duration-quick) ease-in-out, translate var(--duration-quick) ease-in-out, filter var(--duration-quick) ease-in-out; }
.carregando .brilho-texto {
  background: linear-gradient(100deg, var(--tinta-3) 35%, var(--tinta) 50%, var(--tinta-3) 65%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: brilho 1.6s linear infinite;
}
@keyframes brilho { from { background-position: 120% 0; } to { background-position: -120% 0; } }

.zoom-valor { min-width: 48px; text-align: center; font-size: 13px; font-weight: 600; color: var(--tinta-2); font-variant-numeric: tabular-nums; }

/* ---------- vazio ---------- */
.vazio { position: fixed; z-index: 3; left: 50%; top: 46%; translate: -50% -50%; width: min(420px, calc(100vw - 48px)); text-align: center; pointer-events: none; }
.vazio-titulo { margin: 0 0 8px; font-size: 22px; font-weight: 650; letter-spacing: -0.02em; text-wrap: balance; }
.vazio-texto { margin: 0; color: var(--tinta-2); text-wrap: balance; }
.vazio-toque { display: none; }
@media (pointer: coarse) { .vazio-fino { display: none; } .vazio-toque { display: block; } }
.vazio.mostra > * { animation: sobe var(--duration-very-slow) var(--ease-smooth-out) both; }
.vazio.mostra > :nth-child(2), .vazio.mostra > :nth-child(3) { animation-delay: 80ms; }
@keyframes sobe { from { opacity: 0; translate: 0 12px; filter: blur(3px); } }

/* ---------- painel do resumo ---------- */
.painel {
  position: fixed; z-index: 40; top: 12px; right: 12px; bottom: 12px; width: min(440px, calc(100vw - 24px));
  opacity: 0; translate: 24px 0; filter: blur(2px); pointer-events: none; visibility: hidden;
  transition: opacity var(--duration-medium) ease-out, translate var(--duration-medium) var(--ease-smooth-out), filter var(--duration-medium) ease-out, visibility 0s linear var(--duration-medium);
}
.painel.aberto {
  opacity: 1; translate: 0 0; filter: blur(0); pointer-events: auto; visibility: visible;
  transition: opacity var(--duration-slow) ease-out, translate var(--duration-slow) var(--ease-smooth-out), filter var(--duration-slow) ease-out, visibility 0s;
}
.painel-casca {
  height: 100%; padding: 6px; border-radius: 34px; background: var(--casca);
  box-shadow: 0 0 0 1px var(--anel), var(--sombra-ilha);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
}
.painel-miolo { height: 100%; display: flex; flex-direction: column; border-radius: 28px; background: #fff; overflow: hidden; box-shadow: 0 0 0 1px rgba(17, 17, 19, 0.04); }
.painel-topo { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 4px 24px; }
.painel-nome { font-size: 14px; font-weight: 600; color: var(--tinta-3); }
.painel-corpo { flex: 1; overflow-y: auto; padding: 6px 24px 28px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(17, 17, 19, 0.18) transparent; }
.painel-corpo::-webkit-scrollbar { width: 8px; }
.painel-corpo::-webkit-scrollbar-thumb { background: rgba(17, 17, 19, 0.16); border-radius: 99px; border: 2px solid #fff; }

.r-titulo { margin: 6px 0 10px; font-size: 30px; line-height: 1.12; font-weight: 700; letter-spacing: -0.03em; text-wrap: balance; }
.r-meta { margin: 0 0 18px; font-size: 13px; color: var(--tinta-3); font-variant-numeric: tabular-nums; }
.r-sintese { margin: 0 0 8px; font-size: 16px; line-height: 1.6; color: var(--tinta); text-wrap: pretty; }
.r-aviso {
  display: flex; align-items: center; gap: 12px; margin: 16px 0 0; padding: 10px 10px 10px 16px; border-radius: 16px;
  background: #FFF6D6; font-size: 14px; color: #5A4300;
}
.r-aviso button { margin-left: auto; flex: none; }
.r-secao { margin-top: 30px; }
.r-secao h3 { margin: 0 0 12px; font-size: 13px; font-weight: 650; letter-spacing: 0.01em; color: var(--tinta-3); }
.r-temas, .r-estudar, .r-perguntas { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.r-tema { padding: 14px 16px; border-radius: 18px; background: #F6F6F4; }
.r-tema-topo { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 650; letter-spacing: -0.01em; }
.r-tema-topo .grupo-ponto { width: 10px; height: 10px; box-shadow: 0 0 0 3px color-mix(in oklab, var(--tema) 16%, transparent); }
.r-tema p { margin: 6px 0 0; color: var(--tinta-2); font-size: 14.5px; line-height: 1.55; text-wrap: pretty; }
.r-fichas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ficha {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 30px; padding: 0 10px 0 4px; border-radius: 999px;
  background: #fff; box-shadow: 0 0 0 1px rgba(17, 17, 19, 0.07); font-size: 13px; color: var(--tinta-2);
  transition: box-shadow var(--duration-quick) ease-out, scale var(--duration-quick) var(--ease-press);
}
.ficha:hover { box-shadow: 0 0 0 1px rgba(17, 17, 19, 0.2); color: var(--tinta); }
.ficha:active { scale: 0.96; }
.ficha .av { width: 22px; height: 22px; margin: 0; font-size: 10.5px; box-shadow: none; flex: none; }
.ficha span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.r-citacao { margin: 0 0 10px; padding: 16px 18px; border-radius: 18px; background: #F6F6F4; cursor: pointer; transition: background-color var(--duration-quick) ease-out; }
.r-citacao:hover { background: #F0F0EE; }
.r-citacao p { margin: 0; font-size: 16px; line-height: 1.5; font-weight: 500; letter-spacing: -0.005em; text-wrap: pretty; }
.r-citacao p::before { content: "“"; } .r-citacao p::after { content: "”"; }
.r-citacao footer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--tinta-3); }
.r-citacao footer a { color: var(--tinta); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(17, 17, 19, 0.25); text-underline-offset: 3px; }

.r-link {
  display: flex; align-items: flex-start; gap: 14px; padding: 14px 12px 14px 14px; border-radius: 18px; text-decoration: none; color: inherit;
  background: #F6F6F4; transition: background-color var(--duration-quick) ease-out, scale var(--duration-quick) var(--ease-press);
}
.r-link:hover { background: #EFEFEC; }
.r-link:active { scale: 0.985; }
.r-link-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: #fff; flex: none; box-shadow: 0 0 0 1px rgba(17, 17, 19, 0.06); }
.r-link-txt { flex: 1; min-width: 0; }
.r-link-txt strong { display: block; font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.r-link-txt small { display: block; margin-top: 2px; font-size: 13px; color: var(--azul); font-weight: 600; }
.r-link-txt span { display: block; margin-top: 4px; font-size: 14px; color: var(--tinta-2); line-height: 1.5; }
.r-link-seta { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; background: #fff; flex: none; transition: translate var(--duration-fast) var(--ease-smooth-out); }
.r-link:hover .r-link-seta { translate: 2px -2px; }
.r-perguntas li { padding: 12px 16px; border-radius: 16px; background: #F6F6F4; font-weight: 500; line-height: 1.5; text-wrap: pretty; }
.r-rodape { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; padding-top: 18px; border-top: 1px solid rgba(17, 17, 19, 0.07); }

.revelar > * { animation: sobe var(--duration-very-slow) var(--ease-smooth-out) both; animation-delay: calc(var(--i, 0) * 70ms); }

.r-vazio { padding: 28px 0 0; }
.r-vazio h2 { margin: 0 0 10px; font-size: 26px; line-height: 1.15; font-weight: 700; letter-spacing: -0.025em; text-wrap: balance; }
.r-vazio p { margin: 0 0 20px; color: var(--tinta-2); font-size: 15.5px; line-height: 1.6; text-wrap: pretty; }
.r-erro { margin: 16px 0 0; padding: 12px 16px; border-radius: 14px; background: #FDECEE; color: #8A1E2A; font-size: 14px; }

.pensando { padding: 34px 0 0; }
.pensando-linha { margin: 0 0 22px; font-size: 22px; font-weight: 650; letter-spacing: -0.02em; min-height: 1.3em; }
.pensando .esq { display: grid; gap: 10px; }
.pensando .esq span { display: block; height: 14px; border-radius: 8px; background: #F0F0EE; animation: esq 1.4s ease-in-out infinite; }
.pensando .esq span:nth-child(2) { width: 86%; animation-delay: 0.12s; } .pensando .esq span:nth-child(3) { width: 64%; animation-delay: 0.24s; }
.pensando .esq.bloco span { height: 68px; border-radius: 18px; }
@keyframes esq { 50% { opacity: 0.45; } }
.troca-entra { animation: troca var(--duration-fast) ease-in-out both; }
@keyframes troca { from { opacity: 0; translate: 0 4px; filter: blur(2px); } }

/* botões */
.bt-pri, .bt-sec, .bt-perigo {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 999px;
  font-weight: 600; font-size: 14.5px; white-space: nowrap;
  transition: background-color var(--duration-quick) ease-out, scale var(--duration-quick) var(--ease-press), opacity var(--duration-quick) ease-out;
}
.bt-pri { background: var(--tinta); color: #fff; }
.bt-pri:hover { background: #26262A; }
.bt-sec { background: #F1F1EF; color: var(--tinta); }
.bt-sec:hover { background: #E8E8E5; }
.bt-perigo { color: var(--perigo); padding: 0 14px; }
.bt-perigo:hover { background: #FDECEE; }
.bt-pri:active, .bt-sec:active, .bt-perigo:active { scale: 0.96; }
.bt-pri:disabled, .bt-sec:disabled { opacity: 0.45; cursor: default; scale: 1; }
.bt-pri .ic, .bt-sec .ic, .bt-perigo .ic { width: 18px; height: 18px; }
.bt-grande { width: 100%; height: 56px; padding: 0 6px 0 22px; justify-content: space-between; font-size: 16px; margin-top: 8px; }
.ninho-claro { width: 44px; height: 44px; }
.ninho-claro .ic { color: #fff; }

/* ---------- popover de dias ---------- */
.pop { position: fixed; z-index: 41; top: calc(76px + var(--seguro-topo)); left: 14px; width: min(380px, calc(100vw - 28px)); transform-origin: top left; }
.pop.abrindo { animation: pop-entra var(--duration-fast) var(--ease-smooth-out) both; }
.pop.fechando { animation: pop-sai var(--duration-quick) ease-out both; }
@keyframes pop-entra { from { opacity: 0; scale: 0.97; translate: 0 -4px; } }
@keyframes pop-sai { to { opacity: 0; scale: 0.99; } }
.pop-casca { padding: 6px; border-radius: 30px; background: var(--casca); box-shadow: 0 0 0 1px var(--anel), var(--sombra-ilha); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.pop-miolo { border-radius: 24px; background: #fff; padding: 16px 8px 8px; max-height: min(520px, 70dvh); overflow-y: auto; }
.pop-titulo { margin: 0 12px 10px; font-size: 13px; font-weight: 650; color: var(--tinta-3); }
.dias { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.dias button { width: 100%; text-align: left; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 11px 12px; border-radius: 16px; transition: background-color var(--duration-quick) ease-out; }
.dias button:hover, .dias button[aria-current="true"] { background: #F4F4F2; }
.dias strong { font-weight: 650; font-size: 15px; }
.dias .n { font-size: 13px; color: var(--tinta-3); font-variant-numeric: tabular-nums; align-self: center; }
.dias .t { grid-column: 1 / -1; font-size: 13.5px; color: var(--tinta-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dias .sem { padding: 12px; color: var(--tinta-3); font-size: 14px; }

/* ---------- folha (editor no celular) ---------- */
.folha-fundo { position: fixed; inset: 0; z-index: 50; background: rgba(17, 17, 19, 0.28); animation: fundo var(--duration-fast) ease-out both; }
@keyframes fundo { from { opacity: 0; } }
.folha {
  position: fixed; z-index: 51; left: 8px; right: 8px; bottom: calc(8px + var(--teclado, 0px));
  padding: 6px; border-radius: 34px; background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 0 1px var(--anel), var(--sombra-ilha);
  animation: folha-entra var(--duration-slow) var(--ease-smooth-out) both;
}
.folha.fechando { animation: folha-sai var(--duration-quick) ease-out both; }
@keyframes folha-entra { from { translate: 0 40px; opacity: 0; } }
@keyframes folha-sai { to { translate: 0 16px; opacity: 0; } }
.folha-miolo { border-radius: 28px; background: #fff; padding: 12px 16px 16px; }
.folha-topo { display: flex; align-items: center; justify-content: space-between; margin: 0 -6px 8px 4px; }
.folha-topo h2 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.abas { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; border-radius: 999px; background: #F1F1EF; margin-bottom: 14px; }
.abas button { position: relative; z-index: 1; height: 40px; border-radius: 999px; font-weight: 600; font-size: 14.5px; color: var(--tinta-2); transition: color var(--duration-fast) ease-out; }
.abas button[aria-selected="true"] { color: var(--tinta); }
.abas-pilula { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 3); border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(17, 17, 19, 0.12); transition: translate var(--duration-fast) var(--ease-smooth-out); }
.campo { display: block; margin-bottom: 12px; }
.campo-rotulo { display: block; margin: 0 0 6px 4px; font-size: 13px; font-weight: 600; color: var(--tinta-2); }
.campo-rotulo em { font-style: normal; font-weight: 500; color: var(--tinta-3); }
.campo textarea, .campo input {
  display: block; width: 100%; border: 0; outline: 0; border-radius: 16px; padding: 12px 14px; font-size: 16px; line-height: 1.5;
  background: #F6F6F4; box-shadow: inset 0 0 0 1px rgba(17, 17, 19, 0.06); caret-color: var(--tinta); resize: none;
  transition: box-shadow var(--duration-quick) ease-out, background-color var(--duration-quick) ease-out;
}
.campo textarea:focus, .campo input:focus { background: #fff; box-shadow: inset 0 0 0 1.5px var(--tinta); }
.campo textarea::placeholder, .campo input::placeholder { color: #8A8A90; }
.folha-acoes { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.espaco { flex: 1; }

.anexo { margin-bottom: 12px; }
.bt-anexar { width: 100%; height: 46px; background: #F6F6F4; box-shadow: inset 0 0 0 1px rgba(17, 17, 19, 0.06); }
.anexo-previa { position: relative; margin: 0; border-radius: 16px; overflow: hidden; background: #F6F6F4; }
.anexo-previa img { display: block; width: 100%; max-height: 180px; object-fit: cover; outline: 1px solid oklch(0 0 0 / 0.1); outline-offset: -1px; border-radius: 16px; }
.anexo-previa.enviando img { opacity: 0.55; }
.anexo-tirar { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 999px; background: rgba(17, 17, 19, 0.72); color: #fff; }

/* visor de imagem */
.visor { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; background: rgba(17, 17, 19, 0.82); animation: fundo var(--duration-fast) ease-out both; cursor: zoom-out; }
.visor img { max-width: 100%; max-height: 100%; border-radius: 16px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6); animation: visor-entra var(--duration-fast) var(--ease-smooth-out) both; }
@keyframes visor-entra { from { opacity: 0; scale: 0.96; } }
.visor-fechar { position: absolute; top: calc(14px + var(--seguro-topo)); right: 14px; background: rgba(255, 255, 255, 0.14); color: #fff; }
.visor-fechar:hover { background: rgba(255, 255, 255, 0.24); color: #fff; }
.soltar-aqui { position: fixed; inset: 10px; z-index: 75; display: grid; place-items: center; border-radius: 30px; background: rgba(43, 75, 242, 0.06); box-shadow: inset 0 0 0 2px rgba(43, 75, 242, 0.5); pointer-events: none; }
.soltar-aqui span { padding: 12px 20px; border-radius: 999px; background: var(--tinta); color: #fff; font-weight: 600; box-shadow: var(--sombra-ilha); }

/* ---------- entrada (nome e cor) ---------- */
.abas-2 { grid-template-columns: repeat(2, 1fr); margin-bottom: 18px; }
.abas-2 .abas-pilula { width: calc((100% - 8px) / 2); }
.perfil-foto { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.av-grande { width: 68px; height: 68px; margin: 0; font-size: 26px; flex: none; box-shadow: inset 0 0 0 1px rgba(17, 17, 19, 0.08); transition: scale var(--duration-quick) var(--ease-press); }
.av-grande:active { scale: 0.96; }
.perfil-foto .campo-rotulo { margin-left: 0; }
.perfil-foto-acoes { display: flex; gap: 6px; }
.bt-peq { height: 38px; padding: 0 14px; font-size: 13.5px; }
.entrada-dica { margin: -4px 4px 14px; font-size: 13px; line-height: 1.5; color: var(--tinta-3); text-wrap: pretty; }
.acesso-linha { display: flex; gap: 8px; margin: 0 0 8px; }
.acesso-linha input { flex: 1; min-width: 0; border: 0; outline: 0; border-radius: 14px; padding: 0 12px; height: 44px; font-size: 13.5px; background: #F6F6F4; box-shadow: inset 0 0 0 1px rgba(17, 17, 19, 0.06); color: var(--tinta-2); }
#entrada-acesso { margin-top: 6px; padding-top: 16px; border-top: 1px solid rgba(17, 17, 19, 0.07); }
.entrada { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(236, 236, 234, 0.55); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); animation: fundo var(--duration-fast) ease-out both; }
.entrada-casca { width: min(440px, 100%); padding: 7px; border-radius: 38px; background: rgba(255, 255, 255, 0.6); box-shadow: 0 0 0 1px var(--anel), var(--sombra-ilha); animation: entrada-sobe var(--duration-very-slow) var(--ease-smooth-out) both; }
@keyframes entrada-sobe { from { opacity: 0; translate: 0 16px; scale: 0.98; } }
.entrada-miolo { border-radius: 31px; background: #fff; padding: 30px 26px 24px; }
.entrada-titulo { margin: 0 0 8px; font-size: 28px; line-height: 1.1; font-weight: 700; letter-spacing: -0.03em; text-wrap: balance; }
.entrada-texto { margin: 0 0 22px; color: var(--tinta-2); line-height: 1.55; text-wrap: pretty; }
.cores { border: 0; padding: 0; margin: 4px 0 12px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.cores legend { padding: 0; margin-bottom: 8px; }
.cor-op { position: relative; aspect-ratio: 1; border-radius: 999px; background: var(--cor); box-shadow: inset 0 0 0 1px rgba(17, 17, 19, 0.08); transition: scale var(--duration-quick) var(--ease-press); min-width: 32px; }
.cor-op:active { scale: 0.94; }
.cor-op .ic { position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; stroke-width: 2.2; opacity: 0; scale: 0.25; filter: blur(4px); transition: opacity var(--duration-fast) var(--ease-press), scale var(--duration-fast) var(--ease-press), filter var(--duration-fast) var(--ease-press); }
.cor-op[aria-checked="true"] { box-shadow: inset 0 0 0 1px rgba(17, 17, 19, 0.08), 0 0 0 2px #fff, 0 0 0 4px var(--tinta); }
.cor-op[aria-checked="true"] .ic { opacity: 1; scale: 1; filter: blur(0); }

/* ---------- toasts ---------- */
.toasts { position: fixed; z-index: 70; left: 50%; bottom: calc(96px + var(--seguro-baixo)); translate: -50% 0; display: grid; gap: 8px; justify-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 24px); }
.toast {
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 18px; min-height: 48px; border-radius: 999px;
  background: var(--tinta); color: #fff; font-size: 14px; font-weight: 500; box-shadow: var(--sombra-ilha); pointer-events: auto;
  animation: toast-entra var(--duration-slow) var(--ease-smooth-out) both;
}
.toast:not(:has(button)) { padding-right: 18px; }
.toast button { height: 34px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); color: #fff; font-weight: 600; font-size: 13.5px; transition: background-color var(--duration-quick) ease-out, scale var(--duration-quick) var(--ease-press); }
.toast button:hover { background: rgba(255, 255, 255, 0.22); }
.toast button:active { scale: 0.96; }
.toast.saindo { animation: toast-sai var(--duration-medium) ease-out both; }
@keyframes toast-entra { from { opacity: 0; translate: 0 14px; filter: blur(3px); } }
@keyframes toast-sai { to { opacity: 0; translate: 0 6px; } }

/* ---------- celular ---------- */
@media (max-width: 1100px) { .zoom { display: none; } }
@media (max-width: 760px) {
  .ilha-dia { left: 8px; top: calc(8px + var(--seguro-topo)); }
  .ilha-gente { right: 8px; top: calc(8px + var(--seguro-topo)); }
  .marca { display: none; }
  .dia { padding: 0 10px; font-size: 14px; }
  .bt-texto span { display: none; }
  .bt-texto { width: 40px; padding: 0; justify-content: center; }
  .gente .av:nth-child(n + 4):not(.mais) { display: none; }
  .zoom { display: none; }
  .barra { left: 8px; right: 8px; translate: none; bottom: calc(8px + var(--seguro-baixo)); }
  .barra .miolo { justify-content: space-between; }
  .barra .miolo { gap: 0; padding: 4px; }
  .ferr { flex-direction: column; gap: 3px; height: 58px; padding: 0; min-width: 0; flex: 1 1 0; font-size: 11px; letter-spacing: -0.01em; justify-content: center; border-radius: 22px; }
  .ferr .ic { width: 22px; height: 22px; }
  .divisor { display: none; }

  .ferr-principal { flex-direction: column-reverse; gap: 3px; padding: 0; margin-left: 2px; font-size: 11px; }
  .ferr-principal .ninho { width: 26px; height: 22px; background: none; }
  .ferr-principal .ninho .ic { width: 22px; height: 22px; }
  .ferr-principal:hover .ninho { translate: 0 0; scale: 1; }
  .ferr-txt { display: none; }
  .ferr-txt-curto { display: inline; }
  .toasts { bottom: calc(92px + var(--seguro-baixo)); }
  .painel { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; height: calc(100dvh - 56px - var(--seguro-topo)); translate: 0 40px; }
  .painel.aberto { translate: 0 0; }
  .painel-corpo { padding: 4px 20px calc(24px + var(--seguro-baixo)); }
  .r-titulo { font-size: 26px; }
  .pop { left: 8px; top: calc(64px + var(--seguro-topo)); }
}
@media (min-width: 761px) { .folha { left: 50%; right: auto; width: 480px; translate: -50% 0; bottom: 24px; } @keyframes folha-entra { from { translate: -50% 40px; opacity: 0; } } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
  .nota.erguida { rotate: 0deg; scale: 1; }
}
