/* ---------- palco (vale para a rua e para a mesa) ---------- */
.viewport { position: absolute; inset: 0; overflow: hidden; background: #07040b; }
.world { position: absolute; left: 0; top: 0; width: 2752px; height: 1536px; transform-origin: 0 0; }
.layer { position: absolute; left: 0; top: 0; width: 2752px; height: 1536px; }
.layer > * { position: absolute; left: 0; top: 0; }
.plate { position: absolute; left: 0; top: 0; width: 2752px; height: 1536px; user-select: none; pointer-events: none; }
.hot { pointer-events: none; }
.hot > * { pointer-events: auto; }
.q { transform-origin: 0 0; }
canvas.fx { width: 2752px; height: 1536px; pointer-events: none; }

#street .world { filter: brightness(var(--power, 1)); }

/* ---------- letreiros de neon ---------- */
.sign { overflow: hidden; --c: var(--pink); --c2: var(--cyan); --core: #fff2fb; --on: 1; }
.sign .panel { position: absolute; inset: 0; background:
  radial-gradient(120% 90% at 50% 50%, rgba(40, 14, 48, .9), rgba(9, 4, 12, .98) 70%),
  repeating-linear-gradient(90deg, rgba(255, 255, 255, .015) 0 2px, transparent 2px 6px); }
.sign.round { border-radius: 50%; }
.sign .tube { position: absolute; border-radius: 12px; border: 3px solid #ffe9f6;
  box-shadow: 0 0 2px #fff, 0 0 6px var(--tc), 0 0 14px var(--tc), inset 0 0 6px var(--tc), inset 0 0 12px var(--tc);
  transition: border-color .05s, box-shadow .05s; }
.sign .tube.off { border-color: rgba(255, 220, 240, .14); box-shadow: none; }
.sign .row { position: absolute; left: 0; right: 0; display: flex; justify-content: center; align-items: center; white-space: nowrap;
  font-family: var(--f-neon); line-height: 1; letter-spacing: .02em; }
.sign .l { display: inline-block; color: var(--core);
  text-shadow: 0 0 1px #fff, 0 0 4px var(--lc, var(--c)), 0 0 10px var(--lc, var(--c)), 0 0 22px var(--lc, var(--c)); }
.sign .l.off { color: rgba(255, 215, 235, .13); text-shadow: 0 0 1px rgba(255, 255, 255, .05); }
.sign .l.sp { width: .32em; }
.sign svg { position: absolute; overflow: visible; }
.sign svg .t { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.sign svg .t-glow { stroke: var(--sc, var(--c)); stroke-width: 7; opacity: .45; }
.sign svg .t-mid { stroke: var(--sc, var(--c)); stroke-width: 3.6; }
.sign svg .t-core { stroke: #fff6fb; stroke-width: 1.4; }
.sign svg g.off .t-glow, .sign svg g.off .t-mid { stroke: rgba(255, 220, 240, .12); opacity: 1; }
.sign svg g.off .t-core { stroke: rgba(255, 255, 255, .06); }
.sign .mirror { transform: scaleX(-1); }
.sign.dim { filter: brightness(.82) saturate(.9); }

/* lousa de cavalete */
.sign.board .panel { background:
  radial-gradient(90% 70% at 40% 30%, rgba(255, 255, 255, .05), transparent 60%),
  linear-gradient(180deg, #1a1420, #120c16); }
.board-txt { position: absolute; inset: 14px 10px; display: grid; place-content: center; text-align: center; gap: 2px;
  font-family: var(--f-hand); color: #ff7ccc; text-shadow: 0 0 1px rgba(255, 180, 230, .7); line-height: .95; }
.board-txt .b1 { font-size: 30px; font-weight: 700; letter-spacing: .02em; }
.board-txt .b2 { font-size: 22px; color: #f1e7ff; }
.board-txt .b3 { font-size: 24px; color: #8fe6ff; }
.board-txt.write { animation: chalk .9s steps(18) both; }
@keyframes chalk { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* clone de brilho por cima da foto (a luz que vaza para a parede) */
.sign.glow { overflow: visible; mix-blend-mode: screen; pointer-events: none; opacity: calc(var(--on) * var(--gk, .85));
  filter: blur(var(--gb, 9px)) saturate(1.3); }
.sign.glow .panel { background: none; }
.sign.glow .halo { position: absolute; inset: -38%; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 55%, transparent), transparent); opacity: .5; }
.sign.glow .l.off, .sign.glow .tube.off { opacity: 0; }
.sign.glow .board-txt { opacity: .7; }

/* ---------- porta ---------- */
.door-leaf { backface-visibility: hidden; }
.door-leaf svg { display: block; width: 100%; height: 100%; }
.door-shade { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; }
.glass-pane { overflow: hidden; }
.glass-pane svg { display: block; width: 100%; height: 100%; }
#interior { pointer-events: none; }

/* ---------- efeitos sobre a foto ---------- */
.spot { border-radius: 50%; mix-blend-mode: screen; pointer-events: none; transform: translate(-50%, -50%); }
.sky-fx, .puddle-fx { width: 2752px; height: 1536px; pointer-events: none; }
.sky-fx { -webkit-mask: url(../assets/sky.png) 0 0 / 2752px 1536px no-repeat; mask: url(../assets/sky.png) 0 0 / 2752px 1536px no-repeat; }
.puddle-fx { mix-blend-mode: screen; -webkit-mask: url(../assets/puddles.png) 0 0 / 2752px 1536px no-repeat; mask: url(../assets/puddles.png) 0 0 / 2752px 1536px no-repeat; }
.puddle-fx > i { position: absolute; border-radius: 50%; filter: blur(14px); transform: translate(-50%, -50%); }
.cloud { position: absolute; border-radius: 50%; filter: blur(22px); background: rgba(150, 140, 190, .16); }
.chime { transform-origin: var(--px) var(--py); filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .5)); }
.house-win { mix-blend-mode: screen; opacity: 0; transition: opacity 1.2s ease; }
.house-win.on { opacity: 1; }
.sun-glint { width: 260px; height: 260px; mix-blend-mode: screen; transform: translate(-50%, -50%);
  background: linear-gradient(115deg, transparent 40%, rgba(255, 220, 150, .55) 50%, transparent 60%) no-repeat;
  background-size: 300% 100%; background-position: 150% 0;
  -webkit-mask: radial-gradient(circle, #000 45%, transparent 70%); mask: radial-gradient(circle, #000 45%, transparent 70%); }
.sun-glint.go { animation: glint 2.4s ease-in-out; }
@keyframes glint { from { background-position: 150% 0; } to { background-position: -50% 0; } }

/* gato preto */
.cat { position: absolute; width: 300px; height: 212px; pointer-events: auto; cursor: pointer; transform-origin: 50% 100%; }
.cat::before { content: ""; position: absolute; left: 12%; right: 20%; bottom: 3%; height: 9%; border-radius: 50%; background: radial-gradient(closest-side, rgba(6, 0, 12, .7), transparent); }
.cat-quadro { position: absolute; inset: 0; background: url("../assets/gato.webp") 0 0 / 1200% 300% no-repeat; }

/* áreas clicáveis do cenário */
.hotspot { background: transparent; border-radius: 12px; cursor: pointer; }
.hotspot:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 4px; }
.hotspot.door { cursor: pointer; }

/* ---------- HUD da rua ---------- */
.street-shade { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 100% at 50% 40%, transparent 55%, rgba(5, 2, 9, .55) 100%),
              linear-gradient(0deg, rgba(5, 2, 9, .7), transparent 32%); }
.hud-top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center;
  padding: max(18px, env(safe-area-inset-top)) 24px 0; pointer-events: none; z-index: 3; }
.hud-top > * { pointer-events: auto; }
.logo { display: grid; justify-items: start; gap: 4px; }
.logo-sub { font-family: var(--f-caps); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--paper); text-shadow: 0 1px 6px rgba(0, 0, 0, .9); }
.hud-tools { display: flex; gap: 10px; }

.street-menu { position: absolute; left: 24px; bottom: calc(26px + var(--safe-b)); display: grid; gap: 6px; z-index: 3; }
.menu-item { display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 0 22px 0 8px; border-radius: 12px;
  text-align: left; transition: background .25s, transform .25s; }
.mi-num { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line);
  font-family: var(--f-caps); font-size: 12px; color: var(--gold); transition: all .25s; }
.mi-txt { font-family: var(--f-caps); font-weight: 700; font-size: 17px; letter-spacing: .12em; text-transform: uppercase; color: var(--paper);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .8); transition: color .25s, text-shadow .25s; }
.menu-item.is-main .mi-txt { font-size: 22px; color: var(--gold-hi); }
.menu-item.is-main .mi-num { border-color: rgba(246, 213, 140, .6); }
.menu-item:hover, .menu-item:focus-visible { background: rgba(20, 8, 30, .55); transform: translateX(4px); }
.menu-item:hover .mi-txt, .menu-item:focus-visible .mi-txt { color: #fff; text-shadow: 0 0 6px var(--pink), 0 0 18px rgba(255, 63, 174, .6); }
.menu-item:hover .mi-num, .menu-item:focus-visible .mi-num { border-color: var(--pink); color: #fff; box-shadow: 0 0 12px rgba(255, 63, 174, .6); }

#street .hud-top, #street .street-menu, #street .credito { opacity: 0; transform: translateY(10px); transition: opacity 1s ease, transform 1s ease; }
#street.ready .hud-top, #street.ready .street-menu, #street.ready .credito { opacity: 1; transform: none; }

/* a assinatura no canto: pequena, sem competir com a rua */
.credito { position: absolute; right: 24px; bottom: calc(18px + var(--safe-b)); z-index: 3; padding: 6px 10px; border-radius: 8px; font-family: var(--f-text); font-size: 15px; font-style: italic; color: var(--paper-dim); text-decoration: none; text-shadow: 0 1px 6px rgba(0, 0, 0, .9); }
.credito { display: inline-flex; align-items: center; gap: 8px; }
.credito img { display: block; height: 26px; width: auto; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .8)); }
.credito:hover, .credito:focus-visible { color: var(--paper); }
.credito:hover img, .credito:focus-visible img { filter: drop-shadow(0 0 6px rgba(246, 213, 140, .8)); }

/* a bola da vitrine depois do clique: mesmo tamanho, névoa lenta e o convite em neon */
.vitrine-bola { width: var(--d); aspect-ratio: 1; border-radius: 50%; overflow: hidden; pointer-events: none; transform: translate(-50%, -50%); opacity: 0; transition: opacity .8s ease; }
.vitrine-bola.on { opacity: 1; }
.vitrine-bola[hidden] { display: none; }
.vb-nevoa { position: absolute; inset: -25%; mix-blend-mode: screen; opacity: .55; background: radial-gradient(38% 30% at 34% 40%, rgba(255, 190, 245, .75), transparent 70%), radial-gradient(34% 28% at 68% 62%, rgba(150, 120, 255, .7), transparent 70%); animation: vbGira 11s linear infinite; }
.vb-nevoa.b { opacity: .4; animation-duration: 17s; animation-direction: reverse; }
@keyframes vbGira { to { transform: rotate(360deg); } }
.vb-neon { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(closest-side, rgba(58, 12, 92, .5), rgba(58, 12, 92, .2) 62%, transparent); }
.vb-neon span { font-family: var(--f-neon); font-size: 19px; line-height: 1; color: #fff7fc; white-space: nowrap;
  text-shadow: 0 0 2px #fff, 0 0 5px #ff7fc4, 0 0 11px #ff3fae; animation: vbPalavra 1.7s ease-in-out both; }
@keyframes vbPalavra { 0% { opacity: 0; transform: scale(.92); filter: blur(1.5px); } 28%, 72% { opacity: 1; transform: none; filter: none; } 100% { opacity: 0; transform: scale(1.05); filter: blur(1.5px); } }
@media (prefers-reduced-motion: reduce) { .vb-nevoa { animation: none; } .vb-neon span { animation: none; } }

.door-hint { position: absolute; z-index: 3; transform: translate(-50%, -100%); display: flex; align-items: center; gap: 10px;
  padding: 10px 18px 10px 14px; border-radius: 999px; background: rgba(15, 6, 22, .78); border: 1px solid rgba(246, 213, 140, .45);
  font-family: var(--f-caps); font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-hi); white-space: nowrap;
  opacity: 0; transition: opacity .6s ease; pointer-events: none; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.door-hint.on { opacity: 1; animation: hintBob 2.4s ease-in-out infinite; }
.hint-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 0 rgba(255, 63, 174, .7); animation: ping 1.6s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 12px rgba(255, 63, 174, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 63, 174, 0); } }
@keyframes hintBob { 50% { transform: translate(-50%, calc(-100% - 6px)); } }

.skip-hint { position: absolute; bottom: calc(24px + var(--safe-b)); left: 50%; transform: translateX(-50%); font-family: var(--f-caps); font-size: 12px;
  letter-spacing: .3em; text-transform: uppercase; color: var(--paper-dim); opacity: 0; transition: opacity .5s; pointer-events: none; z-index: 3; }
.skip-hint.on { opacity: .8; }

/* rua no celular: o mesmo menu do computador, em tamanho menor; a porta segue tocável */
@media (max-width: 900px) and (orientation: portrait), (orientation: landscape) and (max-height: 520px) {
  .hud-top { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
  .door-hint { display: none; }
  .street-menu { left: max(10px, env(safe-area-inset-left)); bottom: calc(8px + var(--safe-b)); gap: 0; }
  .menu-item { min-height: 40px; gap: 11px; padding: 0 14px 0 2px; }
  .mi-num { width: 28px; height: 28px; font-size: 11px; }
  .mi-txt { font-size: 14px; letter-spacing: .11em; }
  .menu-item.is-main .mi-txt { font-size: 18px; }
  .menu-item:hover, .menu-item:focus-visible { transform: none; }
  .credito { right: 14px; bottom: calc(8px + var(--safe-b)); font-size: 12px; padding: 2px 4px; }
  .credito img { height: 19px; }
}
/* em pé o menu cai sobre a calçada: um pouco mais de sombra para ler bem */
@media (max-width: 900px) and (orientation: portrait) {
  .street-shade { background: linear-gradient(0deg, rgba(5, 2, 9, .9), rgba(5, 2, 9, .62) 22%, transparent 40%); }
  .street-menu { bottom: calc(34px + var(--safe-b)); }
}
