.ar-body {
  margin: 0;
  min-height: 100%;
  background: #0f1610;
  color: #f4f7ef;
  font-family: "Source Serif 4", "Iowan Old Style", "Times New Roman", Times, serif;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.ar-app {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(157, 184, 138, 0.22), transparent 45%),
    radial-gradient(ellipse at 70% 80%, rgba(240, 212, 138, 0.16), transparent 40%),
    linear-gradient(160deg, #101810 0%, #1a261c 50%, #0f1610 100%);
}

.ar-camera,
.ar-canvas {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ar-canvas {
  z-index: 2;
  touch-action: none;
}

.ar-camera {
  z-index: 1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.ar-app.is-live .ar-camera {
  opacity: 1;
}

.ar-vignette {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 42%, rgba(8, 12, 8, 0.55) 100%);
}

.ar-sparkles {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(232, 245, 200, 0.7) 0 1px, transparent 2px),
    radial-gradient(circle at 80% 20%, rgba(240, 212, 138, 0.7) 0 1px, transparent 2px),
    radial-gradient(circle at 60% 70%, rgba(232, 245, 200, 0.55) 0 1px, transparent 2px),
    radial-gradient(circle at 30% 85%, rgba(240, 212, 138, 0.5) 0 1px, transparent 2px);
  background-size: 100% 100%;
  animation: ar-twinkle 4.5s ease-in-out infinite;
}

@keyframes ar-twinkle {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.45; }
}

.ar-top {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: start;
  padding: calc(0.75rem + env(safe-area-inset-top)) 0.9rem 0.75rem;
  background: linear-gradient(180deg, rgba(8, 12, 8, 0.72), transparent);
}

.ar-back,
.ar-badge {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #f4f7ef;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.ar-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.ar-brand img {
  width: auto;
  height: 2.2rem;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.35));
}

.ar-brand > span {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.ar-brand-mark {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(244, 247, 239, 0.72);
}

.ar-brand-title {
  font-family: "Source Serif 4", "Iowan Old Style", "Times New Roman", Times, serif;
  font-size: clamp(0.95rem, 3.5vw, 1.15rem);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ar-hint {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  max-width: min(88vw, 320px);
  text-align: center;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: rgba(15, 22, 16, 0.55);
  border: 1px solid rgba(216, 230, 200, 0.25);
  backdrop-filter: blur(8px);
  font-size: 0.88rem;
  line-height: 1.35;
  pointer-events: auto;
}

.ar-app.is-live .ar-hint,
.ar-app.is-fantasy .ar-hint {
  animation: ar-hint-fade 5s ease forwards;
}

@keyframes ar-hint-fade {
  0%, 70% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}

.ar-dock {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.75rem 0.75rem calc(0.9rem + env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(8, 12, 8, 0.82), transparent);
}

.ar-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
  color: #f4f7ef;
  border-radius: 999px;
  min-height: 2.5rem;
  padding: 0.45rem 0.95rem;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.ar-btn-primary {
  background: #d8e6c8;
  color: #000000;
  border-color: transparent;
}

.ar-btn-whatsapp {
  background: #1f6b43;
  border-color: transparent;
}

.ar-status {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: calc(4.6rem + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  margin: 0;
  max-width: min(92vw, 420px);
  text-align: center;
  font-size: 0.8rem;
  color: rgba(244, 247, 239, 0.82);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

@media (min-width: 900px) {
  .ar-brand-title { max-width: 28rem; }
}
