/*
 * AERON Skin Builder — Demonstração Imobiliária Mantovani
 * Identidade visual extraída do site e do Instagram da imobiliária (consultados em 21/11/2026):
 *   verde-escuro #1B2B1E (logotipo, posts, destaques), verde-claro #BEDEB1 (botões do site),
 *   fundo #FAFAFA, texto #424242, raios 11–17 px e botões em pílula (variáveis do site).
 *   #4E7A48 é um tom intermediário derivado, usado só em textos pequenos sobre fundo claro (contraste 4,8:1).
 * Panorama sem moldura, filtro ou película: contraste somente nos componentes.
 * Modos: desktop | celular vertical (≤700px) | tela baixa horizontal (altura ≤520px, largura >700px).
 */

:root {
  --mt-green: #1b2b1e;
  --mt-mint: #bedeb1;
  --mt-mint-hover: #cce6c1;
  --mt-mint-bg: #eef5ea;
  --mt-accent: #4e7a48;
  --mt-paper: #fafafa;
  --mt-ink: #424242;
  --mt-muted: #5b5b5b;
  --mt-line: #dddddd;
  --mt-radius: 17px;
  --mt-radius-sm: 11px;
  --mt-serif: Georgia, "Times New Roman", serif;
  --mt-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  --mt-safe-top: env(safe-area-inset-top, 0px);
  --mt-safe-bottom: env(safe-area-inset-bottom, 0px);
  --mt-safe-left: env(safe-area-inset-left, 0px);
  --mt-safe-right: env(safe-area-inset-right, 0px);
  --mt-edge: 24px;
}

/* Impede que o navegador móvel amplie textos pequenos por conta própria (font boosting). */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.mt-skin, .mt-skin *, .mt-skin *::before, .mt-skin *::after { box-sizing: border-box; }
.mt-skin { position: fixed; inset: 0; z-index: 3; pointer-events: none; font-family: var(--mt-sans); color: var(--mt-ink); }
.mt-skin [hidden] { display: none !important; }
/* Regras base com especificidade zero para não sobrescrever os componentes. */
:where(.mt-skin) :where(button, a) { -webkit-tap-highlight-color: transparent; font: inherit; }
:where(.mt-skin) :where(button) { border: 0; cursor: pointer; }
:where(.mt-skin) :where(a) { color: inherit; text-decoration: none; }
/* Foco visível em fundos claros e escuros: anel interno verde-escuro e externo verde-claro. */
.mt-skin button:focus-visible, .mt-skin a:focus-visible { outline: 3px solid var(--mt-mint); outline-offset: 2px; box-shadow: 0 0 0 2px var(--mt-green); }
.mt-skin svg { width: 20px; height: 20px; flex: none; }

.mt-eyebrow { font-size: 10px; letter-spacing: 2px; font-weight: 700; color: var(--mt-accent); line-height: 1.6; }
.mt-cta { background: var(--mt-mint); color: var(--mt-green); border-radius: 999px; font-weight: 700; display: inline-flex; align-items: center; gap: 10px; }
.mt-cta:hover { background: var(--mt-mint-hover); }

/* Preloader nativo do 3DVista com a marca Mantovani. */
.mt-preload { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; font-family: var(--mt-sans); color: var(--mt-muted); font-size: 13px; letter-spacing: 1px; }
.mt-preload img { width: 180px; height: auto; animation: mt-pulse 1.6s ease-in-out infinite; }
@keyframes mt-pulse { 50% { opacity: .55; } }

/* ---------- Abertura ---------- */
.mt-welcome { position: absolute; inset: 0; z-index: 5; pointer-events: auto; background: var(--mt-green); }
.mt-welcome-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mt-intro { position: absolute; top: 0; bottom: 0; left: 0; width: min(520px, 44%); background: var(--mt-paper); color: var(--mt-ink); padding: 5vh 56px; display: flex; flex-direction: column; justify-content: center; overflow-y: auto; }
/* O PNG do logotipo tem respiro interno de ~9,4% da largura; a margem negativa alinha o texto da marca à coluna. */
.mt-logo { width: 190px; height: auto; align-self: flex-start; margin: -2vh 0 1vh -18px; }
.mt-intro h1 { font-family: var(--mt-serif); font-size: clamp(30px, 3.1vw, 50px); font-weight: 400; line-height: 1.14; letter-spacing: -1px; color: var(--mt-green); margin: 20px 0; }
.mt-intro h1 em { color: var(--mt-accent); }
.mt-location { font-size: 14px; line-height: 1.7; color: var(--mt-muted); margin: 0; }
.mt-facts { display: flex; gap: 26px; border-top: 1px solid var(--mt-line); border-bottom: 1px solid var(--mt-line); padding: 18px 0; margin: 22px 0 26px; font-size: 12px; color: var(--mt-muted); }
.mt-facts strong { display: block; font-family: var(--mt-serif); font-size: 26px; font-weight: 400; color: var(--mt-green); margin-bottom: 4px; }
.mt-enter { justify-content: center; text-align: center; padding: 17px 22px; font-size: 15px; letter-spacing: .3px; width: 100%; max-width: 360px; }
.mt-intro-note { font-size: 12px; color: var(--mt-muted); margin: 14px 0 0; }
.mt-intro-foot { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; letter-spacing: 1px; color: var(--mt-muted); margin-top: 5vh; max-width: 360px; }
.mt-intro-foot a:hover { color: var(--mt-accent); text-decoration: underline; }

/* ---------- Interface do tour ---------- */
.mt-ui > * { pointer-events: auto; }
.mt-top { position: absolute; top: calc(var(--mt-edge) + var(--mt-safe-top)); left: calc(var(--mt-edge) + var(--mt-safe-left)); right: calc(var(--mt-edge) + var(--mt-safe-right)); display: flex; align-items: center; gap: 12px; pointer-events: none; }
.mt-top > * { pointer-events: auto; }
/* Logotipo verde-escuro sobre fundo transparente: precisa de cartão claro para ter contraste sobre o panorama. */
.mt-brand { width: 112px; height: 66px; padding: 4px 8px; border-radius: 14px; background: #fff; box-shadow: 0 6px 16px rgba(8, 14, 9, .25); flex: none; }
.mt-brand img { width: 100%; height: 100%; object-fit: contain; display: block; }
/* Sem fundo próprio: contraste garantido pelo contorno escuro do próprio texto. */
.mt-property { display: grid; gap: 3px; padding: 4px 6px; color: #fff;
  text-shadow: 0 0 2px #060b07, 0 0 2px #060b07, 0 1px 4px rgba(6, 11, 7, .95), 0 0 16px rgba(6, 11, 7, .85); }
.mt-property span { font-size: 10px; letter-spacing: 1.4px; color: #d3ebc8; font-weight: 700; }
.mt-property strong { font: 21px/1.1 var(--mt-serif); }
.mt-property small { font-size: 12px; font-weight: 700; color: #fff; }
.mt-contact { margin-left: auto; padding: 14px 22px; font-size: 13px; box-shadow: 0 6px 16px rgba(8, 14, 9, .22); }

.mt-utilities { position: absolute; top: calc(var(--mt-edge) + 80px + var(--mt-safe-top)); right: calc(var(--mt-edge) + var(--mt-safe-right)); display: grid; gap: 8px; }
.mt-utility { width: 44px; height: 44px; border-radius: 50%; background: var(--mt-paper); color: var(--mt-green); display: grid; place-items: center; box-shadow: 0 5px 14px rgba(8, 14, 9, .16); }
.mt-utility:hover { background: #fff; }
.mt-utility[aria-pressed="true"] { background: var(--mt-mint); }
/* Música: ícone de som ligado por padrão; aria-pressed="true" indica música desativada. */
#mt-music .mt-icon-off, #mt-music[aria-pressed="true"] .mt-icon-on { display: none; }
#mt-music[aria-pressed="true"] .mt-icon-off { display: block; }

.mt-scene { position: absolute; left: calc(var(--mt-edge) + var(--mt-safe-left)); bottom: calc(28px + var(--mt-safe-bottom)); display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; align-items: center; gap: 6px; width: 290px; padding: 8px; background: var(--mt-paper); border-radius: var(--mt-radius); box-shadow: 0 5px 14px rgba(8, 14, 9, .16); }
.mt-scene-name { min-width: 0; text-align: center; font: 19px/1.2 var(--mt-serif); color: var(--mt-green); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-step { width: 40px; height: 40px; border-radius: 50%; background: transparent; color: var(--mt-green); font-size: 26px; line-height: 1; padding: 0 0 3px; }
.mt-step:hover { background: var(--mt-mint-bg); }

.mt-dock { position: absolute; left: 50%; bottom: calc(28px + var(--mt-safe-bottom)); transform: translateX(-50%); display: flex; gap: 4px; padding: 7px; background: var(--mt-green); border-radius: 22px; box-shadow: 0 8px 22px rgba(8, 14, 9, .32); }
.mt-dock button { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; background: transparent; color: #fff; white-space: nowrap; font-size: 13px; border-radius: 16px; min-width: 0; }
.mt-dock button svg { color: var(--mt-mint); }
.mt-dock button:hover, .mt-dock button[aria-expanded="true"] { background: #ffffff1f; }


/* Painel: não-modal; hierarquia definida abaixo do dock e acima do panorama. */
.mt-panel { position: absolute; pointer-events: auto; margin: 0; border: 0; padding: 0 24px 24px; background: var(--mt-paper); color: var(--mt-ink); border-radius: var(--mt-radius); box-shadow: 0 12px 40px rgba(8, 14, 9, .32); overflow-y: auto; overscroll-behavior: contain;
  top: calc(var(--mt-edge) + 88px + var(--mt-safe-top)); left: calc(var(--mt-edge) + var(--mt-safe-left)); bottom: auto; right: auto;
  width: 410px; max-width: calc(100% - 32px); height: calc(100dvh - 88px - 2 * var(--mt-edge) - 110px - var(--mt-safe-top) - var(--mt-safe-bottom)); }
.mt-panel:not([open]) { display: none; }
.mt-panel-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; background: var(--mt-paper); padding: 18px 0 8px; }
.mt-panel-head .mt-eyebrow { font-size: 9px; }
.mt-close { width: 40px; height: 40px; border-radius: 50%; background: transparent; font-size: 28px; line-height: 1; color: var(--mt-green); }
.mt-close:hover { background: var(--mt-mint-bg); }
.mt-panel h2 { font: 30px/1.15 var(--mt-serif); color: var(--mt-green); margin: 8px 0 14px; }
.mt-panel h3 { font-size: 10px; letter-spacing: 1.6px; color: var(--mt-accent); margin: 22px 0 10px; }
.mt-panel p, .mt-panel li { font-size: 13px; line-height: 1.75; color: var(--mt-muted); }
.mt-panel ul { padding-left: 18px; margin: 8px 0; }
.mt-panel .mt-fine { font-size: 11px; line-height: 1.6; }
.mt-facts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 8px; margin: 18px 0; padding: 16px 10px; background: #fff; border: 1px solid var(--mt-line); border-radius: 14px; }
.mt-fact { display: grid; justify-items: center; gap: 6px; text-align: center; min-width: 0; }
.mt-fact span { font-size: 12px; color: var(--mt-muted); }
.mt-fact strong { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: var(--mt-ink); }
.mt-fact svg { width: 24px; height: 24px; color: var(--mt-green); }
.mt-panel .mt-checks { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.mt-panel .mt-checks li { position: relative; padding-left: 22px; line-height: 1.5; }
.mt-panel .mt-checks li::before { content: ""; position: absolute; left: 3px; top: 4px; width: 9px; height: 5px; border-left: 2px solid var(--mt-accent); border-bottom: 2px solid var(--mt-accent); transform: rotate(-45deg); }
.mt-panel .mt-plain { list-style: none; padding: 0; margin: 0 0 8px; }
.mt-notice { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--mt-line); }
.mt-notice p, .mt-notice li { font-size: 12px; line-height: 1.6; }
.mt-aeron-credit { display: block; margin: 22px 0 4px; padding: 14px 16px; background: #fff; border: 1px solid var(--mt-line); border-radius: 14px; }
.mt-aeron-credit img { display: block; width: 100%; max-width: 300px; height: auto; margin: 0 auto; }
.mt-aeron-credit:hover { border-color: var(--mt-accent); }
.mt-panel .mt-cta { justify-content: space-between; width: 100%; padding: 15px 22px; font-size: 13px; margin: 8px 0; }
.mt-link-secondary { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 14px 22px; border: 1.5px solid var(--mt-green); border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--mt-green); }
.mt-link-secondary:hover { background: var(--mt-mint-bg); }

.mt-scenes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mt-scene-card { display: grid; text-align: left; padding: 0; background: #fff; overflow: hidden; color: var(--mt-ink); border-radius: 12px; }
.mt-scene-card img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; display: block; background: var(--mt-line); }
.mt-scene-card span { padding: 9px 10px; font-size: 12px; font-weight: 600; line-height: 1.3; }
.mt-scene-card[aria-current="true"] { border-color: var(--mt-accent); box-shadow: 0 0 0 2px var(--mt-accent); }
.mt-scene-card[aria-current="true"] span::after { content: " · aqui"; color: var(--mt-accent); font-weight: 400; }

.mt-toast { position: absolute; left: 50%; bottom: calc(110px + var(--mt-safe-bottom)); transform: translateX(-50%); z-index: 6; max-width: calc(100% - 32px); background: var(--mt-green); color: #fff; padding: 12px 18px; border-radius: var(--mt-radius-sm); font-size: 13px; pointer-events: none; }
.mt-toast:empty { display: none; }

/* Interface limpa: somente o acionador permanece visível. */
.mt-skin.mt-minimal .mt-control { display: none !important; }

/* Desktop estreito: navegador de cenas sobe para não disputar a base com o dock. */
@media (max-width: 1100px) and (min-width: 701px) and (min-height: 521px) {
  .mt-scene { bottom: calc(100px + var(--mt-safe-bottom)); }
  .mt-panel { height: calc(100dvh - 88px - 2 * var(--mt-edge) - 180px - var(--mt-safe-top) - var(--mt-safe-bottom)); }
  .mt-skin.mt-panel-open .mt-scene { display: none; }
}

/* ---------- Celular vertical ---------- */
@media (max-width: 700px) {
  :root { --mt-edge: 12px; }
  .mt-welcome-photo img { height: 58%; object-position: 50% 68%; }
  .mt-intro { top: auto; width: 100%; max-height: 80%; padding: 16px 24px calc(18px + var(--mt-safe-bottom)); border-radius: 22px 22px 0 0; box-shadow: 0 -8px 28px rgba(8, 14, 9, .22); justify-content: flex-start; }
  .mt-logo { width: 120px; margin: -4px 0 0 -11px; }
  .mt-eyebrow { font-size: 9px; }
  .mt-intro h1 { font-size: 28px; margin: 6px 0 10px; }
  .mt-location { font-size: 12px; }
  .mt-facts { margin: 12px 0 14px; padding: 10px 0; gap: 0; justify-content: space-between; font-size: 11px; }
  .mt-facts strong { font-size: 22px; }
  .mt-enter { max-width: none; padding: 15px 18px; }
  .mt-intro-note { font-size: 11px; margin-top: 10px; }
  .mt-intro-foot { max-width: none; margin-top: 12px; font-size: 10px; letter-spacing: .4px; }

  .mt-top { gap: 8px; }
  .mt-brand { width: 76px; height: 48px; padding: 3px 6px; border-radius: 12px; }
  .mt-property { padding: 2px 4px; gap: 1px; min-width: 0; }
  .mt-property span { font-size: 9px; letter-spacing: 1px; }
  .mt-property strong { font-size: 16px; }
  .mt-property small { font-size: 11px; }
  .mt-contact { width: 48px; height: 48px; padding: 0; border-radius: 50%; justify-content: center; flex: none; }
  .mt-contact span { display: none; }
  .mt-contact svg { width: 24px; height: 24px; }

  .mt-utilities { top: calc(12px + 60px + var(--mt-safe-top)); }
  .mt-utility { width: 40px; height: 40px; }

  .mt-dock { left: calc(12px + var(--mt-safe-left)); right: calc(12px + var(--mt-safe-right)); bottom: calc(12px + var(--mt-safe-bottom)); transform: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 5px; border-radius: 20px; }
  .mt-dock button { display: grid; justify-items: center; gap: 4px; padding: 8px 4px; font-size: 11px; min-width: 0; border-radius: 15px; }
  .mt-dock button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

  .mt-scene { left: calc(12px + var(--mt-safe-left)); right: calc(12px + var(--mt-safe-right)); width: auto; bottom: calc(12px + 66px + 10px + var(--mt-safe-bottom)); padding: 6px; }
  .mt-skin.mt-panel-open .mt-scene { display: none; }

  .mt-panel { left: 0; right: 0; width: auto; max-width: none; padding: 0 18px 20px;
    top: calc(12px + 60px + var(--mt-safe-top)); bottom: calc(12px + 66px + 8px + var(--mt-safe-bottom));
    height: calc(100dvh - 12px - 60px - 12px - 66px - 8px - var(--mt-safe-top) - var(--mt-safe-bottom)); }
  .mt-panel h2 { font-size: 26px; }
  .mt-toast { bottom: calc(160px + var(--mt-safe-bottom)); }
}

@media (max-width: 700px) and (max-height: 640px) {
  .mt-logo { width: 84px; margin: -6px 0 -8px -8px; }
  .mt-intro { padding-top: 12px; }
  .mt-intro h1 { font-size: 26px; margin-top: 8px; }
  .mt-facts { margin: 10px 0 12px; padding: 9px 0; }
  .mt-facts strong { font-size: 20px; }
  .mt-intro-foot { margin-top: 8px; }
}

@media (max-width: 360px) {
  .mt-property small { display: none; }
  .mt-dock button { font-size: 10px; }
}

/* ---------- Tela baixa horizontal ---------- */
@media (max-height: 520px) and (min-width: 701px) {
  :root { --mt-edge: 12px; }
  .mt-intro { width: 50%; padding: 12px 32px; }
  .mt-logo { width: 104px; margin: 0 0 0 -10px; }
  .mt-eyebrow { font-size: 8px; }
  .mt-intro h1 { font-size: 24px; margin: 4px 0 8px; }
  .mt-location { font-size: 11px; line-height: 1.5; }
  .mt-facts { margin: 8px 0 10px; padding: 7px 0; gap: 20px; font-size: 10px; }
  .mt-facts strong { font-size: 19px; margin-bottom: 1px; }
  .mt-enter { padding: 12px 16px; font-size: 13px; }
  .mt-intro-note { display: none; }
  .mt-intro-foot { margin-top: 8px; font-size: 9px; }

  .mt-brand { width: 70px; height: 44px; padding: 3px 5px; border-radius: 11px; }
  .mt-property { padding: 2px 4px; gap: 1px; }
  .mt-property span { font-size: 9px; }
  .mt-property strong { font-size: 15px; }
  .mt-property small { display: none; }
  .mt-contact { padding: 11px 16px; font-size: 12px; }
  .mt-utilities { top: calc(12px + 54px + var(--mt-safe-top)); gap: 6px; }
  .mt-utility { width: 38px; height: 38px; }
  .mt-scene { width: 240px; bottom: calc(10px + var(--mt-safe-bottom)); padding: 4px; grid-template-columns: 36px minmax(0, 1fr) 36px; }
  .mt-step { width: 36px; height: 36px; }
  .mt-scene-name { font-size: 16px; }
  .mt-dock { left: auto; right: calc(12px + var(--mt-safe-right)); transform: none; bottom: calc(10px + var(--mt-safe-bottom)); padding: 4px; border-radius: 18px; }
  .mt-dock button { padding: 9px 11px; font-size: 12px; border-radius: 14px; }
  .mt-panel { top: calc(12px + 54px + var(--mt-safe-top)); width: 380px; padding: 0 18px 18px;
    height: calc(100dvh - 12px - 54px - 70px - var(--mt-safe-top) - var(--mt-safe-bottom)); }
  .mt-skin.mt-panel-open .mt-scene { display: none; }
  .mt-panel h2 { font-size: 24px; }
  .mt-toast { bottom: calc(70px + var(--mt-safe-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .mt-preload img { animation: none; }
}
