/* ============================================================
   UKILLA VIBE — Estilos Principais
   ============================================================ */

/* ── Aviso de rotação no welcome ── */
.welcome-rotate {
  font-size: 0.78rem;
  color: rgba(201,168,76,0.7);
  line-height: 1.6;
  margin-bottom: 0.8rem;
  font-family: 'Courier New', monospace;
  text-align: center;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold:    #c9a84c;
  --gold-lt: #e8c97a;
  --dark:    #0a0a0a;
  --smoke:   rgba(10,10,10,0.75);
  --font:    'Georgia', serif;
  --mono:    'Courier New', monospace;
}

html, body {
  width: 100%; height: 100%;
  background: var(--dark);
  color: #f0ead6;
  font-family: var(--font);
  overflow: hidden;
  user-select: none;
}

/* ── Tela de Loading ── */
#loading-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--dark);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1.5rem;
  transition: opacity 0.8s ease;
}
#loading-screen.hidden { opacity: 0; pointer-events: none; }
#loading-screen .loading-logo { text-align: center; }
#loading-screen .loading-logo-img {
  max-width: clamp(140px, 30vw, 240px);
  max-height: 120px;
  object-fit: contain;
}
#loading-screen .logo {
  font-size: clamp(2rem, 6vw, 4rem);
  letter-spacing: 0.3em;
  color: var(--gold);
  font-style: italic;
}
#loading-screen .bar-wrap {
  width: 200px; height: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}
#loading-screen .bar {
  height: 100%;
  background: var(--gold);
  width: 0%;
  transition: width 0.3s ease;
}

/* ── Modal Boas-vindas ── */
.welcome-box {
  max-width: 460px;
  text-align: center;
}
#welcome-logo {
  margin-bottom: 1.2rem;
}
#welcome-logo img {
  max-width: 180px;
  max-height: 90px;
  object-fit: contain;
}
#welcome-logo-text {
  font-size: 1.8rem;
  letter-spacing: 0.3em;
  color: var(--gold);
  font-style: italic;
}
#welcome-title {
  font-size: 1.1rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: 0.6rem;
}
#welcome-msg {
  font-size: 1.05rem;
  color: rgba(240,234,214,0.85);
  line-height: 1.8;
  margin-bottom: 0.8rem;
}
.welcome-warning {
  font-size: 0.82rem;
  color: #e07b3a;
  background: rgba(224,123,58,0.1);
  border: 1px solid rgba(224,123,58,0.3);
  border-radius: 4px;
  padding: 0.5rem 0.8rem;
  margin-bottom: 0.8rem;
  line-height: 1.5;
  display: none;
}
.welcome-warning.show { display: block; }
.welcome-session {
  font-size: 0.72rem;
  color: rgba(240,234,214,0.4);
  line-height: 1.6;
  margin-bottom: 1.4rem;
  font-family: var(--mono);
}
.btn-enter {
  background: var(--gold);
  color: #0a0a0a;
  border: none;
  padding: 0.8rem 2.4rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-enter:hover { background: var(--gold-lt); }

/* ── Game Container ── */
#game {
  position: fixed; inset: 0;
  overflow: hidden;
}

/* ── Sala (fundo) ── */
#room {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease;
}
#room.fading { opacity: 0; }

/* ── Hotspots ── */
.hotspot {
  position: absolute;
  cursor: pointer;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease;
}
.hotspot:hover { transform: translate(-50%, -50%) scale(1.15); }

/* Hotspot visível (objeto grande) */
.hotspot-visible {
  width: clamp(60px, 8vw, 100px);
  height: clamp(60px, 8vw, 100px);
  background: rgba(201,168,76,0.0);
  border: 2px solid rgba(201,168,76,0.0);
  border-radius: 50%;
  transition: background 0.3s, border 0.3s, transform 0.2s;
}
.hotspot-visible:hover {
  background: rgba(201,168,76,0.15);
  border-color: rgba(201,168,76,0.5);
}

/* Hotspot escondido (página, chave) */
.hotspot-hidden {
  width: clamp(30px, 4vw, 50px);
  height: clamp(30px, 4vw, 50px);
  background: transparent;
}
.hotspot-hidden::after {
  content: '';
  position: absolute; inset: 30%;
  border-radius: 50%;
  background: rgba(201,168,76,0.0);
  transition: background 0.4s;
}
.hotspot-hidden:hover::after {
  background: rgba(201,168,76,0.25);
  box-shadow: 0 0 12px rgba(201,168,76,0.4);
}

/* Pulsação sutil — objetos interativos principais */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0px rgba(201,168,76,0); }
  50%       { box-shadow: 0 0 18px rgba(201,168,76,0.35); }
}
.hotspot-pulsing { animation: pulse-glow 2.8s ease-in-out infinite; }

/* Chave com brilho forte */
@keyframes key-shimmer {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(201,168,76,0.4)) brightness(0.7); }
  50%       { filter: drop-shadow(0 0 18px rgba(201,168,76,1)) drop-shadow(0 0 35px rgba(201,168,76,0.7)) brightness(1.3); }
}
.key-shimmer { animation: key-shimmer 2s ease-in-out infinite; }

/* Fragmento visível na sala */
@keyframes page-float {
  0%, 100% { transform: translate(-50%, -50%) rotate(var(--rot)) translateY(0px); }
  50%       { transform: translate(-50%, -50%) rotate(var(--rot)) translateY(-4px); }
}
.hotspot-page {
  width: clamp(90px, 10vw, 130px);
  height: auto;
  background: transparent;
  border-radius: 0;
  transform: translate(-50%, -50%) rotate(var(--rot, -8deg));
  filter: drop-shadow(0 0 10px rgba(201,168,76,0.5)) drop-shadow(0 4px 14px rgba(0,0,0,0.9));
  animation: page-float 3s ease-in-out infinite;
  transition: filter 0.2s, transform 0.2s;
}
.hotspot-page:hover {
  filter: drop-shadow(0 0 20px rgba(201,168,76,0.9)) drop-shadow(0 4px 16px rgba(0,0,0,0.8)) brightness(1.15);
  transform: translate(-50%, -50%) rotate(var(--rot, -8deg)) scale(1.1);
  animation: none;
}
.hotspot-page img {
  width: 100%;
  display: block;
  pointer-events: none;
}

/* Tooltip de hint */
.hotspot-label {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%; transform: translateX(-50%);
  background: var(--smoke);
  color: var(--gold-lt);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.hotspot:hover .hotspot-label { opacity: 1; }

/* ── Navegação entre salas ── */
.nav-arrow {
  position: fixed;
  top: 50%; transform: translateY(-50%);
  z-index: 100;
  background: rgba(10,10,10,0.4);
  border: 1px solid rgba(201,168,76,0.3);
  color: var(--gold);
  width: 44px; height: 80px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1.4rem;
  transition: background 0.2s, border-color 0.2s;
  backdrop-filter: blur(4px);
}
.nav-arrow:hover {
  background: rgba(201,168,76,0.15);
  border-color: var(--gold);
}
#nav-left  { left: 0;  border-radius: 0 6px 6px 0; }
#nav-right { right: 0; border-radius: 6px 0 0 6px; }

/* Indicador de sala */
#room-indicator {
  position: fixed;
  bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px;
  z-index: 100;
}
.room-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(201,168,76,0.3);
  transition: background 0.3s;
}
.room-dot.active { background: var(--gold); }

/* ── Inventário ── */
#inventory {
  position: fixed;
  top: 1.2rem; right: 1.2rem;
  z-index: 200;
  background: rgba(10,10,10,0.7);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  backdrop-filter: blur(8px);
  min-width: 160px;
}
#inventory h4 {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.inv-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.72rem;
  color: rgba(240,234,214,0.5);
  padding: 3px 0;
  transition: color 0.3s;
}
.inv-item.found { color: #f0ead6; cursor: pointer; }
.inv-item.found:hover { color: var(--gold-lt); }
.inv-item.found .inv-icon { filter: none; }
.inv-icon {
  font-size: 1rem;
  filter: grayscale(1) opacity(0.3);
  transition: filter 0.3s;
}
.inv-item.found .inv-icon { filter: none; }

/* ── Modal Base ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.85);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease;
  backdrop-filter: blur(6px);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal-box {
  background: #111;
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 6px;
  padding: 2rem;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.4s ease;
}
.modal-overlay.open .modal-box { transform: translateY(0); }

.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none;
  color: rgba(240,234,214,0.5);
  font-size: 1.4rem; cursor: pointer;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--gold); }

/* ── Lightbox de camiseta ── */
#modal-shirt .modal-box {
  background: transparent;
  border: none;
  max-width: 92vw;
  padding: 0;
}
#modal-shirt img {
  width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}

/* ── Modal Página (parábola) ── */
#modal-page .modal-box {
  max-width: 480px;
  text-align: center;
}
#modal-page .page-img {
  width: 100%;
  max-width: 340px;
  margin: 0 auto 1.2rem;
  display: block;
}
#modal-page .fragment-num {
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
#modal-page .fragment-text {
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #d4c9a8;
}
#modal-page .btn-close-page {
  margin-top: 1.5rem;
  background: none;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 0.5rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: background 0.2s;
}
#modal-page .btn-close-page:hover { background: rgba(201,168,76,0.15); }

/* ── Modal Notebook ── */
#modal-notebook .modal-box {
  max-width: 700px;
}
#modal-notebook h2 {
  font-size: 1rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin-bottom: 1rem;
  text-transform: uppercase;
}
#modal-notebook img {
  width: 100%;
  border-radius: 4px;
}

/* ── Modal Livro (código) ── */
#modal-book .modal-box {
  max-width: 440px;
  text-align: center;
}
#modal-book .book-img {
  width: 220px;
  margin: 0 auto 1.2rem;
  display: block;
  filter: drop-shadow(0 0 20px rgba(201,168,76,0.3));
}
#modal-book h2 {
  font-size: 1rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
  color: #f0ead6;
}
#modal-book p {
  font-size: 0.82rem;
  color: rgba(240,234,214,0.6);
  margin-bottom: 1.4rem;
  line-height: 1.6;
}
#modal-book .code-inputs {
  display: flex; gap: 10px; justify-content: center;
  margin-bottom: 1rem;
}
#modal-book .code-inputs input {
  width: 52px; height: 62px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(201,168,76,0.4);
  border-radius: 4px;
  color: var(--gold-lt);
  font-size: 1.8rem;
  text-align: center;
  font-family: var(--mono);
  outline: none;
  transition: border-color 0.2s;
}
#modal-book .code-inputs input:focus { border-color: var(--gold); }
#modal-book .code-error {
  font-size: 0.78rem;
  color: #c0392b;
  min-height: 1.2em;
  margin-bottom: 0.5rem;
}
#modal-book .btn-unlock {
  background: var(--gold);
  color: #0a0a0a;
  border: none;
  padding: 0.7rem 2rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: background 0.2s;
  text-transform: uppercase;
}
#modal-book .btn-unlock:hover { background: var(--gold-lt); }

/* Mensagem: precisa da chave */
#modal-book .need-key {
  font-size: 0.85rem;
  line-height: 1.7;
  color: rgba(240,234,214,0.7);
  margin-bottom: 1rem;
}

/* ── Modal Unlock (sucesso) ── */
#modal-unlock .modal-box {
  max-width: 520px;
  text-align: center;
}
#modal-unlock .unlock-page-img {
  width: 260px;
  margin: 0 auto 1.2rem;
  display: block;
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
#modal-unlock h2 {
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
#modal-unlock .unlock-sub {
  font-size: 0.82rem;
  color: rgba(240,234,214,0.65);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

/* ── Escolha de camiseta ── */
#shirt-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 1.4rem;
}
.shirt-option {
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.shirt-option img { width: 100%; display: block; }
.shirt-option:hover { transform: scale(1.03); border-color: rgba(201,168,76,0.4); }
.shirt-option.selected { border-color: var(--gold); }

/* ── Modal Email ── */
#modal-email .modal-box {
  max-width: 420px;
  text-align: center;
}
#modal-email .selected-shirt-preview {
  width: 120px;
  margin: 0 auto 1rem;
  display: block;
  border-radius: 4px;
}
#modal-email h2 {
  font-size: 1rem;
  color: var(--gold);
  margin-bottom: 0.4rem;
  letter-spacing: 0.1em;
}
#modal-email p {
  font-size: 0.82rem;
  color: rgba(240,234,214,0.6);
  margin-bottom: 1.2rem;
  line-height: 1.6;
}
#modal-email input[type="email"] {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(201,168,76,0.4);
  border-radius: 4px;
  color: #f0ead6;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  outline: none;
  margin-bottom: 0.8rem;
  font-family: var(--mono);
  transition: border-color 0.2s;
}
#modal-email input[type="email"]:focus { border-color: var(--gold); }
.lgpd-text {
  font-size: 0.68rem;
  color: rgba(240,234,214,0.4);
  margin-bottom: 1rem;
  line-height: 1.5;
  text-align: left;
}
.btn-reserve {
  width: 100%;
  background: var(--gold);
  color: #0a0a0a;
  border: none;
  padding: 0.8rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-reserve:hover { background: var(--gold-lt); }
.btn-reserve:disabled { background: #555; cursor: not-allowed; }
.email-error {
  font-size: 0.78rem;
  color: #c0392b;
  min-height: 1em;
  margin-bottom: 0.5rem;
}

/* ── Modal Confirmação final ── */
#modal-confirm .modal-box {
  max-width: 400px;
  text-align: center;
}
#modal-confirm .confirm-icon { font-size: 3rem; margin-bottom: 1rem; }
#modal-confirm h2 {
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 0.6rem;
  letter-spacing: 0.1em;
}
#modal-confirm p {
  font-size: 0.85rem;
  color: rgba(240,234,214,0.7);
  line-height: 1.7;
}
#modal-confirm .btn-pdf {
  margin-top: 1.5rem;
  display: inline-block;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 0.6rem 1.8rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}
#modal-confirm .btn-pdf:hover { background: rgba(201,168,76,0.15); }

/* ── Notificação de item coletado ── */
#item-toast {
  position: fixed;
  bottom: 5rem; left: 50%; transform: translateX(-50%) translateY(20px);
  z-index: 300;
  background: rgba(10,10,10,0.85);
  border: 1px solid var(--gold);
  color: var(--gold-lt);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  padding: 0.6rem 1.4rem;
  border-radius: 30px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  backdrop-filter: blur(8px);
}
#item-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Animação: livro desbloqueando ── */
@keyframes unlock-flash {
  0%   { filter: brightness(1); }
  40%  { filter: brightness(3) saturate(0.3); }
  100% { filter: brightness(1); }
}
.unlocking { animation: unlock-flash 0.8s ease forwards; }

/* ══════════════════════════════════════════════
   MOBILE — Portrait (< 768px)
   ══════════════════════════════════════════════ */
@media (max-width: 767px) {

  /* ── Base ── */
  html, body { font-size: 15px; }

  /* ── Loading screen ── */
  .loading-logo-img {
    max-width: 150px;
    max-height: 90px;
  }
  #loading-screen .bar-wrap { width: 180px; }

  /* ── Welcome popup ── */
  #modal-welcome { padding: 1rem; }
  .welcome-box {
    max-width: 100%;
    width: 100%;
    padding: 2rem 1.4rem 2.4rem;
    border-radius: 14px;
  }
  #welcome-logo img { max-width: 120px; max-height: 65px; }
  #welcome-msg { font-size: 0.95rem; line-height: 1.6; }
  .welcome-session { font-size: 0.72rem; }
  .btn-enter { width: 100%; padding: 1rem; font-size: 0.85rem; margin-top: 1.2rem; }

  /* ── Nome da sala (topo) ── */
  #room-name {
    display: block;
    position: fixed;
    top: 0.7rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.56rem;
    letter-spacing: 0.18em;
    color: rgba(201,168,76,0.75);
    text-transform: uppercase;
    z-index: 100;
    pointer-events: none;
    background: rgba(0,0,0,0.5);
    padding: 3px 14px;
    border-radius: 20px;
    backdrop-filter: blur(6px);
    white-space: nowrap;
  }

  /* ── Setas de navegação ── */
  .nav-arrow {
    width: 32px;
    height: 60px;
    font-size: 0.95rem;
    opacity: 0.65;
  }

  /* ── Dots de sala — área de toque maior ── */
  #room-indicator {
    bottom: 0.8rem;
    gap: 14px;
    padding: 6px 10px;
  }
  .room-dot {
    width: 10px;
    height: 10px;
    cursor: pointer;
    /* Aumenta área de toque sem alterar visual */
    padding: 6px;
    box-sizing: content-box;
    margin: -6px;
  }

  /* ── Hotspots — toque mínimo 48px ── */
  .hotspot-visible {
    width: clamp(52px, 13vw, 72px);
    height: clamp(52px, 13vw, 72px);
  }
  .hotspot-hidden {
    min-width: 48px;
    min-height: 48px;
  }
  .hotspot-page {
    width: clamp(70px, 17vw, 100px);
  }
  /* Feedback de toque */
  .hotspot:active {
    opacity: 0.65;
    transform: translate(-50%, -50%) scale(0.9);
  }

  /* ── Inventário desktop oculto ── */
  #inventory { display: none !important; }

  /* ── Inventário mobile ── */
  #inventory-mobile {
    position: fixed;
    bottom: 3rem;
    right: 0.75rem;
    z-index: 200;
  }

  #inv-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    background: rgba(10,10,10,0.82);
    border: 1px solid rgba(201,168,76,0.35);
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    backdrop-filter: blur(8px);
    margin-left: auto;
    position: relative;
    transition: border-color 0.2s;
    -webkit-tap-highlight-color: transparent;
  }
  #inv-toggle.has-items { border-color: var(--gold); }
  #inv-toggle:active { opacity: 0.7; }

  #inv-badge {
    position: absolute;
    top: -3px; right: -3px;
    background: var(--gold);
    color: #0a0a0a;
    font-size: 0.58rem;
    font-family: var(--mono);
    font-weight: bold;
    width: 17px; height: 17px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
  }
  #inv-badge.show { opacity: 1; }

  #inv-drawer {
    position: absolute;
    bottom: 54px;
    right: 0;
    background: rgba(10,10,10,0.94);
    border: 1px solid rgba(201,168,76,0.3);
    border-radius: 10px;
    padding: 1rem 1.1rem;
    min-width: 195px;
    backdrop-filter: blur(12px);
    display: none;
    box-shadow: 0 -4px 28px rgba(0,0,0,0.55);
  }
  #inv-drawer.open { display: block; }
  #inv-drawer h4 {
    font-size: 0.56rem;
    letter-spacing: 0.2em;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 0.6rem;
  }
  #inv-drawer .inv-item {
    font-size: 0.8rem;
    padding: 5px 0;
    min-height: 36px;
    display: flex;
    align-items: center;
  }

  /* ── Toast ── */
  #item-toast {
    bottom: 4.8rem;
    font-size: 0.76rem;
    padding: 0.5rem 1.2rem;
  }

  /* ── Modais — bottom sheet ── */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .modal-box {
    width: 100%;
    max-width: 100%;
    max-height: 92dvh;
    border-radius: 18px 18px 0 0;
    padding: 1.6rem 1.2rem 2rem;
    margin: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* Alça visual */
  .modal-box::before {
    content: '';
    display: block;
    width: 38px;
    height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    margin: 0 auto 1.2rem;
  }
  .modal-close {
    top: 1.1rem;
    right: 1rem;
    font-size: 1.6rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Lightbox camiseta — full screen */
  #modal-shirt .modal-overlay,
  #modal-shirt { align-items: center; }
  #modal-shirt .modal-box {
    background: rgba(0,0,0,0.97);
    border-radius: 0;
    max-height: 100dvh;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
  }
  #modal-shirt .modal-box::before { display: none; }
  #modal-shirt img {
    max-height: 78dvh;
    width: 100%;
    object-fit: contain;
  }

  /* Fragmento */
  #modal-page .page-img { max-width: 190px; }
  #modal-page .fragment-text { font-size: 0.88rem; }
  #modal-page .btn-close-page {
    width: 100%;
    text-align: center;
    padding: 0.85rem;
    font-size: 0.78rem;
  }

  /* Notebook */
  #modal-notebook h2 { font-size: 0.85rem; }
  #modal-notebook img { border-radius: 6px; }

  /* Livro */
  #modal-book .book-img { width: 120px; margin-bottom: 0.9rem; }
  #modal-book h2 { font-size: 0.95rem; }
  #modal-book p  { font-size: 0.8rem; }
  #modal-book .code-inputs { gap: 8px; }
  #modal-book .code-inputs input {
    width: 54px;
    height: 62px;
    font-size: 1.7rem;
  }
  .btn-unlock { width: 100%; padding: 0.9rem; font-size: 0.78rem; }

  /* Unlock */
  #modal-unlock .unlock-page-img { width: 150px; }
  #modal-unlock h2 { font-size: 1rem; }
  #modal-unlock .unlock-sub { font-size: 0.8rem; }

  /* Picker de camiseta */
  #shirt-picker { gap: 8px; }
  .shirt-option { border-radius: 6px; }

  /* Email */
  #modal-email h2 { font-size: 0.95rem; }
  #modal-email p  { font-size: 0.8rem; }
  #modal-email input[type="email"] {
    font-size: 1rem;
    padding: 0.9rem 1rem;
  }
  .btn-reserve { padding: 1rem; font-size: 0.82rem; }
  .lgpd-text { font-size: 0.68rem; }

  /* Confirmação */
  #modal-confirm h2 { font-size: 1rem; }
  #modal-confirm p  { font-size: 0.82rem; }
  #modal-confirm .confirm-icon { font-size: 2.2rem; }

  /* Welcome — modal centralizado (não bottom sheet) */
  #modal-welcome { align-items: center; }
  #modal-welcome .modal-box {
    border-radius: 14px;
    max-height: 88dvh;
    padding: 2rem 1.4rem;
  }
  #modal-welcome .modal-box::before { display: none; }
}

/* ── Desktop — esconde elementos mobile-only ── */
@media (min-width: 768px) {
  #inv-toggle, #inv-badge, #inv-drawer, #room-name { display: none; }
  #inventory-mobile { display: none; }
}

/* Acessibilidade: reduzir movimento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

