/* Vision board: mural de cortiça com polaroids e post-its. */

.mural {
  position: relative; height: calc(var(--altura, 900px) * var(--escala, 1)); width: min(100%, calc(740px * var(--escala, 1))); margin: 0 auto;
  border-radius: 22px; overflow: hidden; touch-action: pan-y;
  background-color: #C9A06A;
  background-image:
    radial-gradient(rgba(90, 55, 20, 0.35) 1px, transparent 1.6px),
    radial-gradient(rgba(255, 235, 200, 0.35) 1px, transparent 1.6px),
    radial-gradient(rgba(120, 75, 30, 0.25) 2px, transparent 2.6px);
  background-size: 9px 9px, 13px 13px, 23px 23px;
  background-position: 0 0, 4px 6px, 10px 3px;
  box-shadow: inset 0 0 0 12px #8E6232, inset 0 0 0 14px #6E4A22, inset 0 6px 30px rgba(0, 0, 0, 0.35), 0 18px 30px -18px rgba(0, 0, 0, 0.6);
}
/* o palco tem largura fixa e é reduzido/ampliado pra caber, assim a posição é a mesma em qualquer tela */
.mural-palco { position: absolute; left: 0; top: 0; width: 740px; height: var(--altura, 900px); transform: translate(var(--dx, 0px), var(--dy, 0px)) scale(var(--escala, 1)); transform-origin: 0 0; perspective: 1400px; }

/* tela cheia: o mural ocupa a tela toda, sem botões, pronto pra print */
.mural.em-tela-cheia { position: fixed !important; inset: 0; z-index: 200; width: 100vw !important; height: 100vh !important; height: 100dvh !important; margin: 0; border-radius: 0; box-shadow: none !important; }
.em-tela-cheia .mural-vazio { display: none !important; }
.sair-tela-cheia {
  position: fixed; z-index: 210; top: calc(14px + env(safe-area-inset-top)); right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, 0.85); color: #3B2A33; font-size: 26px; line-height: 1; cursor: pointer; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  opacity: 0.35; transition: opacity 0.2s ease;
}
.sair-tela-cheia:hover, .sair-tela-cheia:focus-visible { opacity: 1; }
body.m-tela-cheia { overflow: hidden; }
body.m-tela-cheia .barra-baixo { display: none !important; }
.mural-vazio { position: absolute; z-index: 1; inset: 30% 10% auto; text-align: center; color: #3B2416; background: rgba(255, 250, 240, 0.8); border-radius: 18px; padding: 18px; }
.mural-vazio .mao { font-size: 30px; margin: 0 0 6px; }
.mural-vazio .pequeno { margin: 0; }

.item-mural {
  --esc: 1;
  position: absolute; transform: rotate(var(--rot)) scale(var(--esc)); transform-style: preserve-3d; cursor: grab; touch-action: none; user-select: none;
  transition: transform 0.3s cubic-bezier(.3, 1.4, .5, 1), box-shadow 0.3s ease, filter 0.3s ease;
}
@media (hover: hover) {
  .item-mural:not(.selecionado):not(.segurando):hover { transform: rotate(var(--rot)) scale(var(--esc)) rotateX(10deg) rotateY(-8deg) translateZ(30px) scale(1.03); z-index: 5; }
}
.item-mural.segurando, .item-mural.selecionado { z-index: 20; }
.item-mural.arrastando { cursor: grabbing; transition: none; transform: rotate(var(--rot)) scale(var(--esc)) scale(1.06); filter: drop-shadow(0 26px 22px rgba(0, 0, 0, 0.45)); z-index: 30; }
.item-mural.selecionado { outline: 2px dashed rgba(255, 255, 255, 0.9); outline-offset: 6px; }

/* alça do canto: aumenta, diminui e gira com um dedo só (ou mouse) */
.alca {
  position: absolute; right: 0; bottom: 0; z-index: 8; display: none;
  width: calc(30px / (var(--escala, 1) * var(--esc, 1))); height: calc(30px / (var(--escala, 1) * var(--esc, 1)));
  transform: translate(45%, 45%); border-radius: 50%; padding: 4px; background: #fff; color: var(--destaque);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); cursor: nwse-resize; touch-action: none;
}
.item-mural.selecionado .alca, .item-mural.arrastando .alca { display: block; }
@media (hover: hover) { .item-mural:hover .alca { display: block; } }

.polaroid-mural {
  width: 220px; padding: 12px 12px 8px; background: var(--moldura, #FFFDF8); border-radius: 4px;
  box-shadow: 0 14px 20px -10px rgba(0, 0, 0, 0.5), 0 2px 3px rgba(0, 0, 0, 0.2);
}
.foto { width: 100%; aspect-ratio: 1; background: #EDE6DA; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.foto img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.legenda-foto { display: block; width: 100%; border: 0; background: transparent; padding: 8px 2px 2px; font-size: 24px; color: var(--texto-moldura, #3B2A33); text-align: center; cursor: pointer; line-height: 1.1; }

.nota {
  width: 190px; min-height: 170px; padding: 26px 16px 16px; background: var(--cor-nota);
  box-shadow: 0 16px 18px -12px rgba(0, 0, 0, 0.45), inset 0 -20px 30px -24px rgba(0, 0, 0, 0.25);
  border-radius: 2px 2px 18px 2px; display: flex;
}
.nota-texto { border: 0; background: transparent; width: 100%; font-size: 27px; line-height: 1.15; color: #3B2A33; text-align: center; cursor: pointer; overflow-wrap: anywhere; }
.pegador { position: absolute; inset: 0; pointer-events: none; }
.carregando-btn { opacity: 0.7; pointer-events: none; }
label.botao { cursor: pointer; }
label.botao:focus-within { outline: 3px solid #6E8BFF; outline-offset: 2px; }

/* animações */
.efeitos-ativos .vision.chegando .item-mural { animation: item-cai 0.8s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(var(--i) * 90ms); }
@keyframes item-cai { from { transform: rotate(var(--rot)) scale(var(--esc)) translateY(-120px) rotateX(70deg); opacity: 0; } to { transform: rotate(var(--rot)) scale(var(--esc)); opacity: 1; } }
.efeitos-ativos .item-mural.acabou-de-chegar { animation: item-cai 0.9s cubic-bezier(.3, 1.4, .5, 1) both; }
@media (hover: hover) { .efeitos-ativos .nota:not(.arrastando):hover { animation: nota-balanca 1.4s ease-in-out infinite; } }
@keyframes nota-balanca { 0%, 100% { transform: rotate(var(--rot)) scale(var(--esc)) rotateX(8deg) translateZ(24px); } 50% { transform: rotate(calc(var(--rot) + 3deg)) scale(var(--esc)) rotateX(12deg) translateZ(24px); } }
@media (prefers-reduced-motion: reduce) { .item-mural { animation: none !important; transition: none; } }

@media (max-width: 760px) {
  .mural { border-radius: 16px; }
  .mural-vazio .mao { font-size: 24px; }
}

/* ---------- Prendedores ---------- */
.prendedor { position: absolute; z-index: 4; pointer-events: none; }
.p-fita {
  top: -13px; left: 50%; width: 96px; height: 26px; transform: translateX(-50%) rotate(-4deg);
  background-color: var(--cor-p); opacity: 0.88; border-radius: 2px;
  clip-path: polygon(0 8%, 4% 0, 8% 10%, 12% 0, 100% 0, 96% 12%, 100% 25%, 96% 40%, 100% 55%, 96% 70%, 100% 85%, 97% 100%, 0 100%, 4% 85%, 0 70%, 4% 55%, 0 40%, 4% 25%);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15);
}
.estampa-listras { background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.55) 0 6px, transparent 6px 12px); }
.estampa-bolinhas { background-image: radial-gradient(rgba(255, 255, 255, 0.85) 2.2px, transparent 2.6px); background-size: 10px 10px; }
.estampa-xadrez { background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.45) 50%, transparent 50%), linear-gradient(rgba(255, 255, 255, 0.45) 50%, transparent 50%); background-size: 12px 12px; }
.estampa-coracoes { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='14'%3E%3Cpath d='M8 12C3 8.5 2 6.5 2 5c0-1.7 1.3-3 2.8-3C6 2 7.2 2.7 8 3.8 8.8 2.7 10 2 11.2 2 12.7 2 14 3.3 14 5c0 1.5-1 3.5-6 7z' fill='white' fill-opacity='0.8'/%3E%3C/svg%3E"); background-size: 16px 14px; }
.estampa-lisa { background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.25), transparent); }
.p-durex {
  top: -8px; width: 62px; height: 22px; background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.7); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); backdrop-filter: blur(0.5px);
}
.p-durex.esquerda { left: -16px; transform: rotate(-38deg); }
.p-durex.direita { right: -16px; transform: rotate(38deg); }
.p-clipe { top: -30px; left: 22%; filter: drop-shadow(1px 2px 1px rgba(0, 0, 0, 0.35)); }
.p-madeira { top: -40px; left: 50%; transform: translateX(-50%) rotate(3deg); filter: drop-shadow(2px 3px 2px rgba(0, 0, 0, 0.35)); }
.p-coracao { top: -14px; left: 50%; transform: translateX(-50%) rotate(-8deg); filter: drop-shadow(2px 3px 2px rgba(0, 0, 0, 0.35)); }
.p-alfinete {
  top: 8px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.85), var(--cor-p) 45%, rgba(0, 0, 0, 0.55) 120%);
  box-shadow: 2px 4px 4px rgba(0, 0, 0, 0.4);
}
.polaroid-mural .p-alfinete { top: 4px; }
.item-mural:hover .p-madeira, .item-mural:hover .p-coracao { animation: prendedor-mexe 0.6s ease; }
@keyframes prendedor-mexe { 0%, 100% { rotate: 0deg; } 40% { rotate: -8deg; } 70% { rotate: 5deg; } }

/* molduras e rabiscos */
.moldura-kraft { background-image: radial-gradient(rgba(90, 60, 20, 0.12) 1px, transparent 1.3px); background-size: 6px 6px; }
.moldura-preta .legenda-foto .suave { color: #CFC6BA; }
.rabiscos { position: absolute; inset: 0; pointer-events: none; }
.rabisco { position: absolute; fill: none; stroke: var(--texto-moldura, #3B2A33); stroke-width: 1.8; stroke-linejoin: round; opacity: 0.9; }
.rabisco-coracoes .rabisco { stroke: #D1477A; }
.rabisco-estrelas .rabisco { stroke: #C9A24A; }
.rabisco-flores .rabisco { stroke: #7C55D6; }
.rabisco-brilhos .rabisco { stroke: #3F66A8; }

/* janela: opções */
.opcoes-estilo { display: flex; flex-wrap: wrap; gap: 6px; }
.opcao-estilo input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opcao-estilo span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--suave); font-weight: 700; font-size: 13px; cursor: pointer; border: 2px solid transparent; }
.opcao-estilo input:checked + span { border-color: var(--destaque); background: #fff; }
.opcao-estilo input:focus-visible + span { outline: 3px solid #6E8BFF; }
.opcao-cor.pequena span:first-of-type { width: 32px; height: 32px; }
.janela.m-prendedor-durex .campo-cor-prendedor { display: none; }
.janela.m-tem-prendedor:not(.m-prendedor-fita) .campo-estampa { display: none; }

/* ---------- Fundos do mural ---------- */
.mural.fundo-feltro-rosa {
  background-color: #E9A9BC;
  background-image: radial-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1.4px), radial-gradient(rgba(120, 30, 60, 0.12) 1px, transparent 1.4px);
  background-size: 5px 5px, 7px 7px; box-shadow: inset 0 0 0 12px #D17C98, inset 0 0 0 14px #B5607E, inset 0 6px 30px rgba(0, 0, 0, 0.25), 0 18px 30px -18px rgba(0, 0, 0, 0.6);
}
.mural.fundo-feltro-verde {
  background-color: #7FA98A;
  background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1.4px), radial-gradient(rgba(20, 60, 30, 0.15) 1px, transparent 1.4px);
  background-size: 5px 5px, 7px 7px; box-shadow: inset 0 0 0 12px #5E8A6A, inset 0 0 0 14px #4A6E54, inset 0 6px 30px rgba(0, 0, 0, 0.25), 0 18px 30px -18px rgba(0, 0, 0, 0.6);
}
.mural.fundo-linho {
  background-color: #E9DFCC;
  background-image: repeating-linear-gradient(0deg, rgba(120, 100, 70, 0.08) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgba(120, 100, 70, 0.08) 0 1px, transparent 1px 3px);
  box-shadow: inset 0 0 0 12px #CDBFA3, inset 0 0 0 14px #B5A684, inset 0 6px 24px rgba(0, 0, 0, 0.15), 0 18px 30px -18px rgba(0, 0, 0, 0.5);
}
.mural.fundo-quadriculado {
  background-color: #FCFBF6;
  background-image: linear-gradient(rgba(63, 102, 168, 0.18) 1px, transparent 1px), linear-gradient(90deg, rgba(63, 102, 168, 0.18) 1px, transparent 1px);
  background-size: 26px 26px; box-shadow: inset 0 0 0 1px #DCD8CC, 0 18px 30px -18px rgba(0, 0, 0, 0.45);
}
.mural.fundo-madeira {
  background-color: #B9844F;
  background-image: repeating-linear-gradient(90deg, rgba(80, 40, 10, 0.18) 0 2px, transparent 2px 120px), repeating-linear-gradient(0deg, rgba(255, 220, 170, 0.08) 0 3px, rgba(80, 40, 10, 0.06) 3px 7px);
  box-shadow: inset 0 0 0 12px #8A5A2E, inset 0 0 0 14px #6E4522, inset 0 6px 30px rgba(0, 0, 0, 0.3), 0 18px 30px -18px rgba(0, 0, 0, 0.6);
}
.mural.fundo-lousa {
  background-color: #2F3B35;
  background-image: radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.07), transparent 60%), radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1.5px);
  background-size: auto, 6px 6px; box-shadow: inset 0 0 0 12px #A0774A, inset 0 0 0 14px #7A5530, inset 0 6px 30px rgba(0, 0, 0, 0.45), 0 18px 30px -18px rgba(0, 0, 0, 0.6);
}
.mural.fundo-lousa .mural-vazio { background: rgba(255, 255, 255, 0.9); }
.mural.fundo-estetica {
  background-color: var(--suave);
  background-image: radial-gradient(rgba(255, 255, 255, 0.6) 1.5px, transparent 1.8px);
  background-size: 18px 18px;
  box-shadow: inset 0 0 0 10px var(--cartao), inset 0 0 0 12px var(--destaque), 0 18px 30px -18px rgba(0, 0, 0, 0.5);
}

.seletor-fundo .fundos-mural { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.opcao-fundo { display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: 14px; border: 2.5px solid transparent; background: transparent; font-weight: 800; font-size: 13px; color: var(--tinta); cursor: pointer; }
.opcao-fundo[aria-pressed="true"] { border-color: var(--destaque); background: #fff; }
.amostra-fundo { display: block; min-height: 54px !important; height: 54px; border-radius: 10px; perspective: none; box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.12) !important; }

/* ---------- Adesivos no mural ---------- */
.gaveta-mural .pack-adesivos { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.sticker-mural { z-index: 6; }
.sticker-botao { width: 100%; height: 100%; border: 0; padding: 0; background: transparent; cursor: inherit; }
.sticker-botao img {
  width: 100%; height: 100%; display: block; pointer-events: none;
  filter: drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff) drop-shadow(0 8px 6px rgba(0, 0, 0, 0.3));
}
.sticker-mural .alca { width: calc(26px / var(--escala, 1)); height: calc(26px / var(--escala, 1)); }
@media (hover: hover) { .sticker-mural:not(.selecionado):not(.segurando):hover { transform: rotate(var(--rot)) scale(1.1) translateZ(30px); } }

/* ---------- Desenho por cima da foto ---------- */
.foto { position: relative; container-type: inline-size; }
/* textos e adesivos soltos por cima da foto (posição em % da foto, tamanho em % da largura) */
.objetos-foto { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.obj { position: absolute; transform: translate(-50%, -50%) rotate(var(--rot)); white-space: nowrap; line-height: 1; }
.obj-texto { font-family: 'Kalam', cursive; font-weight: 700; font-size: calc(var(--tam) * 1cqw); text-shadow: 0 0 2px rgba(255, 255, 255, 0.6); }
.obj-adesivo { width: calc(var(--tam) * 1cqw); }
.obj-adesivo img { width: 100%; height: auto; display: block; pointer-events: none; filter: drop-shadow(1px 0 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 1px 0 #fff) drop-shadow(0 -1px 0 #fff) drop-shadow(0 3px 3px rgba(0, 0, 0, 0.3)); }
.desenho-foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.btn-desenhar svg { width: 45%; height: 45%; }
.btn-desenhar {
  position: absolute; right: 6px; bottom: 6px; border-radius: 50%;
  /* mantém tamanho de dedo mesmo com o mural reduzido no celular */
  width: max(38px, calc(40px / (var(--escala, 1) * var(--esc, 1)))); height: max(38px, calc(40px / (var(--escala, 1) * var(--esc, 1)))); border: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.92); color: #3B2A33; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25); visibility: hidden; opacity: 0; transition: opacity 0.2s ease, transform 0.2s ease;
}
/* o lápis só aparece depois de tocar na foto */
.polaroid-mural.selecionado .btn-desenhar, .btn-desenhar:focus-visible { visibility: visible; opacity: 1; }
@media (hover: hover) { .polaroid-mural:hover .btn-desenhar { visibility: visible; opacity: 1; } }
.btn-desenhar:hover { transform: rotate(-12deg) scale(1.08); }

.editor-desenho {
  position: fixed; inset: 0; margin: auto; height: fit-content; max-height: calc(100vh - 20px); overflow: auto;
  width: min(720px, calc(100vw - 16px)); padding: 16px; color: var(--tinta); display: flex; flex-direction: column; gap: 12px;
}
.editor-desenho::backdrop { background: rgba(30, 20, 25, 0.6); backdrop-filter: blur(3px); }
.editor-topo { display: flex; align-items: center; justify-content: space-between; }
.editor-palco {
  position: relative; flex-shrink: 0; width: min(100%, 56vh); aspect-ratio: 1; margin: 0 auto; border-radius: 6px; overflow: hidden;
  background: #EDE6DA; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.5); touch-action: none;
}
.editor-palco { container-type: inline-size; }
.editor-foto, .editor-palco canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.camada-objetos { position: absolute; inset: 0; pointer-events: none; }
.camada-objetos .obj { pointer-events: auto; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; padding: 0.06em 0.12em; }
.modo-desenho .camada-objetos .obj { pointer-events: none; }
.camada-objetos .obj.selecionado { outline: 2px dashed rgba(255, 255, 255, 0.95); box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.25); border-radius: 6px; }
.camada-objetos .alca, .obj-apagar { display: none; }
.camada-objetos .obj.selecionado .alca { display: block; width: 30px; height: 30px; right: 0; bottom: 0; color: var(--destaque); }
.camada-objetos .alca { position: absolute; transform: translate(55%, 55%); border-radius: 50%; padding: 4px; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); }
.obj-apagar { position: absolute; left: 0; top: 0; width: 28px; height: 28px; transform: translate(-55%, -55%); border-radius: 50%; border: 0; background: #fff; color: #C8433A; font-size: 20px; line-height: 1; font-weight: 800; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); cursor: pointer; font-family: inherit; }
.camada-objetos .obj.selecionado .obj-apagar { display: block; }
.painel-texto .editor-texto { flex: 1 1 180px; min-width: 0; min-height: 44px; font-size: 24px; padding: 2px 12px; border: 2px dashed var(--destaque); border-radius: 12px; background: #fff; color: var(--tinta); }
.painel-adesivo { max-height: 150px; overflow-y: auto; }
.painel-adesivo .botao-sticker img { width: 44px; height: 44px; }
.dica-editor { margin: -4px 0 0; text-align: center; }
.editor-palco canvas { cursor: crosshair; touch-action: none; }
.editor-ferramentas { display: flex; flex-direction: column; gap: 10px; }
.editor-ferramentas [hidden], .dica-editor[hidden] { display: none !important; }
.editor-ferramentas .grupo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ferramenta { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 2px solid transparent; background: var(--suave); font-weight: 800; font-size: 13px; cursor: pointer; color: var(--tinta); }
.ferramenta.ativa { border-color: var(--destaque); background: #fff; }
.cor-editor { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); cursor: pointer; }
.cor-editor.ativa { box-shadow: 0 0 0 3px var(--tinta); transform: scale(1.1); }
.espessura { font-weight: 700; font-size: 13px; }
.espessura input { width: 160px; accent-color: var(--destaque); }
