/* ==========================================================================
   Skyline Scanner by RDG Events — Stylesheet
   Dark premium mode, gold accents, mobile-first
   ========================================================================== */

:root {
  --bg-deep: #0b0f1a;
  --bg-panel: #12182b;
  --bg-panel-2: #171f38;
  --bg-elevated: #1c2540;
  --gold: #d4af37;
  --gold-soft: #f0d580;
  --text-primary: #f5f6fa;
  --text-secondary: #a8afc4;
  --text-muted: #6f7794;
  --border-soft: rgba(212, 175, 55, 0.18);
  --shadow-deep: 0 20px 60px rgba(0, 0, 0, 0.55);
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --nav-height: 78px;
  --header-height: 60px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

body {
  background:
    radial-gradient(circle at 15% -10%, rgba(212,175,55,0.10), transparent 45%),
    radial-gradient(circle at 100% 0%, rgba(60,90,180,0.14), transparent 40%),
    var(--bg-deep);
  min-height: 100vh;
}

button { font-family: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }
.hidden-input { display: none; }

/* ---------- WELCOME SCREEN ---------- */
.welcome-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 28px calc(48px + var(--safe-bottom));
  z-index: 100;
  overflow: hidden;
  background: linear-gradient(180deg, #0b0f1a 0%, #0d1220 60%, #0a0d17 100%);
}

.welcome-glow {
  position: absolute;
  width: 140vw;
  height: 60vh;
  bottom: -30vh;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(212,175,55,0.22), transparent 65%);
  pointer-events: none;
  animation: pulseGlow 6s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.welcome-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 420px;
  animation: fadeUp 0.9s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.welcome-logo {
  width: 84px;
  margin: 0 auto 28px;
  filter: drop-shadow(0 4px 18px rgba(212,175,55,0.25));
}

.welcome-eyebrow {
  color: var(--gold-soft);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 18px;
  font-weight: 600;
}

.welcome-title {
  font-size: 34px;
  line-height: 1.18;
  font-weight: 700;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

.text-gold {
  background: linear-gradient(120deg, var(--gold-soft), var(--gold) 60%, #b8912c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.welcome-subtitle {
  color: var(--text-secondary);
  font-size: 15.5px;
  line-height: 1.5;
  margin: 0 0 36px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px 28px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--gold-soft), var(--gold));
  color: #1a1406;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(212,175,55,0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:active {
  transform: scale(0.97);
  box-shadow: 0 6px 18px rgba(212,175,55,0.22);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-secondary:active { transform: scale(0.97); background: rgba(255,255,255,0.09); }

/* ---------- APP SHELL ---------- */
.app {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-deep);
}

.app-header {
  height: calc(var(--header-height) + var(--safe-top));
  padding-top: var(--safe-top);
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 20px;
  padding-right: 20px;
  background: rgba(11,15,26,0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
  z-index: 10;
}

.header-logo { width: 26px; height: 26px; object-fit: contain; }
.header-title { font-size: 16px; font-weight: 700; letter-spacing: 0.01em; }

.app-main {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 20px);
}

.tab-panel { display: none; animation: fadeIn 0.35s ease; }
.tab-panel.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- BOTTOM NAV ---------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: flex;
  background: rgba(14,19,34,0.92);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--border-soft);
  z-index: 50;
}

.nav-item {
  flex: 1;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px 0 4px;
  position: relative;
}

.nav-icon { font-size: 22px; filter: grayscale(1) opacity(0.6); transition: filter 0.25s ease, transform 0.25s ease; }
.nav-label { font-size: 11px; font-weight: 600; letter-spacing: 0.01em; }

.nav-item.active { color: var(--gold-soft); }
.nav-item.active .nav-icon { filter: grayscale(0) opacity(1); transform: translateY(-2px); }
.nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold));
}

/* ---------- SKYLINE TAB — carosello panoramico scrollabile ---------- */
.skyline-carousel {
  display: flex;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.skyline-carousel::-webkit-scrollbar { display: none; }

.skyline-panel {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #05070d;
  scroll-snap-align: start;
}

.skyline-bg { width: 100%; height: 100%; object-fit: cover; }

.skyline-overlay-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,15,26,0) 55%, rgba(11,15,26,0.95) 100%);
  pointer-events: none;
}

.skyline-panel-label {
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-soft);
  background: rgba(11,15,26,0.6);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  backdrop-filter: blur(6px);
}

.skyline-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  padding: 12px 0 2px;
}

.skyline-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.skyline-dot.active {
  background: linear-gradient(120deg, var(--gold-soft), var(--gold));
  transform: scale(1.3);
}

.skyline-hint {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-secondary);
  padding: 4px 20px 0;
}

.pins-layer { position: absolute; inset: 0; }

.pin {
  position: absolute;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  border: none;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-soft), var(--gold) 65%);
  box-shadow: 0 0 0 6px rgba(212,175,55,0.18), 0 4px 16px rgba(0,0,0,0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #1a1406;
  font-weight: 800;
  animation: pinPulse 2.6s ease-in-out infinite;
}

.pin:active { transform: translate(-50%, -50%) scale(0.9); }

@keyframes pinPulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(212,175,55,0.18), 0 4px 16px rgba(0,0,0,0.5); }
  50% { box-shadow: 0 0 0 12px rgba(212,175,55,0.08), 0 4px 16px rgba(0,0,0,0.5); }
}

.pin-label {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 6px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--text-primary);
  background: rgba(11,15,26,0.75);
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  pointer-events: none;
}

.skyline-actions {
  display: flex;
  justify-content: center;
  padding: 18px 20px 6px;
}

/* ---------- OPERA TAB ---------- */
.opera-header, .contatti-header {
  padding: 22px 20px 10px;
}

.opera-header h2, .contatti-header h2 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
}

.section-sub {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13.5px;
}

.opera-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.opera-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.opera-item:active { transform: scale(0.98); background: var(--bg-panel-2); }

.opera-number {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #1a1406;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.opera-item-title { font-weight: 700; font-size: 15px; margin: 0 0 2px; }
.opera-item-author { font-size: 12.5px; color: var(--text-secondary); margin: 0; }
.opera-item-arrow { margin-left: auto; color: var(--text-muted); font-size: 18px; }

/* ---------- CONTATTI TAB ---------- */
.contact-selector {
  display: flex;
  gap: 8px;
  padding: 14px 16px 4px;
  overflow-x: auto;
}

.contact-chip {
  flex-shrink: 0;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: var(--bg-panel);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.contact-chip.active {
  background: linear-gradient(120deg, var(--gold-soft), var(--gold));
  color: #1a1406;
  border-color: transparent;
}

.contact-card {
  margin: 16px;
  padding: 26px 22px;
  background: linear-gradient(155deg, var(--bg-panel-2), var(--bg-panel));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-deep);
}

.contact-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  color: #1a1406;
  margin-bottom: 16px;
}

.contact-name { font-size: 20px; font-weight: 700; margin: 0 0 2px; }
.contact-role { font-size: 13.5px; color: var(--gold-soft); font-weight: 600; margin: 0 0 18px; }

.contact-detail-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 14.5px;
}

.contact-detail-row:first-of-type { border-top: none; }
.contact-detail-icon { width: 20px; text-align: center; opacity: 0.85; }
.contact-note {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(212,175,55,0.08);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.contact-save-btn { width: 100%; margin-top: 22px; }

/* ---------- DRAWER (bottom sheet) ---------- */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.drawer-overlay.visible { opacity: 1; }

.drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 82vh;
  background: var(--bg-panel-2);
  border-radius: 24px 24px 0 0;
  border: 1px solid var(--border-soft);
  border-bottom: none;
  z-index: 201;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  padding-bottom: calc(28px + var(--safe-bottom));
  box-shadow: 0 -20px 60px rgba(0,0,0,0.5);
}

.drawer.visible { transform: translateY(0); }

.drawer-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.2);
  margin: 12px auto 0;
}

.drawer-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  z-index: 2;
}

.drawer-content {
  padding: 18px 22px 6px;
  overflow-y: auto;
  max-height: 76vh;
}

.drawer-title { font-size: 21px; font-weight: 700; margin: 0 0 2px; }
.drawer-subtitle { font-size: 13px; color: var(--gold-soft); font-weight: 600; margin: 0 0 20px; }

.drawer-section { margin-bottom: 20px; }
.drawer-section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 8px;
}

.drawer-section-body { font-size: 14.5px; line-height: 1.6; color: var(--text-primary); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 4px;
}

.stat-box {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.stat-box-label { font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 3px; }
.stat-box-value { font-size: 14.5px; font-weight: 700; }

.pitch-box {
  background: linear-gradient(155deg, rgba(212,175,55,0.14), rgba(212,175,55,0.04));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 14px;
  line-height: 1.55;
  font-style: italic;
  color: var(--text-primary);
}

/* Opera drawer specifics */
.opera-original-incipit {
  font-size: 13.5px;
  font-style: italic;
  color: var(--text-secondary);
  margin: -8px 0 18px;
}

.opera-caption-note {
  font-size: 12.5px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
  border: 1px dashed var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.opera-lyrics {
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 14.5px;
  line-height: 1.9;
  white-space: pre-line;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--border-soft);
}

.applause-btn {
  width: 100%;
  margin-top: 18px;
}

/* ---------- APPLAUSE ANIMATION ---------- */
.applause-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 300;
  overflow: hidden;
}

.applause-particle {
  position: absolute;
  bottom: -40px;
  font-size: 26px;
  animation: floatUp 2.4s ease-in forwards;
}

@keyframes floatUp {
  0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(-90vh) translateX(var(--drift, 0px)) rotate(20deg); opacity: 0; }
}

/* ---------- PHOTO MODAL ---------- */
.photo-modal {
  position: fixed;
  inset: 6vh 5vw;
  background: var(--bg-panel-2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  z-index: 210;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: var(--shadow-deep);
}

.photo-modal h3 { margin: 4px 0 14px; font-size: 17px; text-align: center; }

#photo-canvas {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: #000;
}

.photo-modal-actions { margin-top: 16px; width: 100%; }
.photo-modal-actions .btn-primary { display: flex; }

/* ==========================================================================
   CALIBRAZIONE BUSSOLA (onboarding WebAR)
   ========================================================================== */

.calibration-screen {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  transition: opacity 0.5s ease;
}

.calibration-screen.fade-out { opacity: 0; }

.calibration-content {
  max-width: 380px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.infinity-anim {
  position: relative;
  width: 160px;
  height: 90px;
  margin-bottom: 22px;
}

.infinity-svg {
  width: 100%;
  height: 100%;
}

.infinity-svg path {
  fill: none;
  stroke: var(--border-soft);
  stroke-width: 3;
  stroke-dasharray: 6 8;
}

.infinity-phone {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 26px;
  transform-origin: center;
  animation: infinityMove 3.5s ease-in-out infinite;
}

@keyframes infinityMove {
  0%   { transform: translate(-90px, 0) scale(1); }
  25%  { transform: translate(-15px, -22px) scale(1.05); }
  50%  { transform: translate(60px, 0) scale(1); }
  75%  { transform: translate(-15px, 22px) scale(1.05); }
  100% { transform: translate(-90px, 0) scale(1); }
}

.calibration-title {
  font-size: 22px;
  margin: 0 0 10px;
  color: var(--gold-soft);
}

.calibration-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 8px;
  line-height: 1.5;
}

.calibration-instruction {
  font-size: 13px;
  color: var(--text-secondary);
  opacity: 0.85;
  margin: 0 0 26px;
}

.calibration-progress-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  overflow: hidden;
  margin-bottom: 20px;
}

.calibration-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold));
  border-radius: 999px;
}

.calibration-success {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--gold-soft);
  margin-bottom: 18px;
  animation: fadeUp 0.4s ease;
}

.calibration-check { font-size: 18px; }

.calibration-screen .btn-primary { width: 100%; margin-bottom: 16px; }

.calibration-skip {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 12.5px;
  opacity: 0.8;
  cursor: pointer;
  line-height: 1.5;
}

.calibration-skip u { color: var(--gold-soft); }

/* ==========================================================================
   VISTA AR LIVE + TOGGLE MODALITÀ (tab Skyline)
   ========================================================================== */

.skyline-view { position: relative; display: block; }
.skyline-view.hidden { display: none; }

.ar-container {
  position: relative;
  height: 62vh;
  min-height: 320px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
}

.ar-container a-scene, .ar-container canvas, .ar-container video {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}

.ar-hint {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-secondary);
  padding: 8px 20px 0;
}

.ar-loading, .ar-error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background: rgba(11,15,26,0.9);
  color: var(--text-secondary);
  font-size: 13.5px;
}

.ar-loading.hidden, .ar-error.hidden { display: none; }

.ar-spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid rgba(212,175,55,0.2);
  border-top-color: var(--gold);
  animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.skyline-mode-toggle {
  display: flex;
  gap: 8px;
  padding: 10px 4px 4px;
}

.mode-toggle-btn {
  flex: 1;
  padding: 9px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.mode-toggle-btn.active {
  background: linear-gradient(120deg, var(--gold-soft), var(--gold));
  color: #1a1406;
  border-color: transparent;
}

/* ---------- Scrollbar polish ---------- */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-thumb { background: rgba(212,175,55,0.3); border-radius: 4px; }

@media (min-width: 560px) {
  .welcome-title { font-size: 40px; }
  .contact-card { max-width: 420px; margin-left: auto; margin-right: auto; }
  .drawer, .photo-modal { max-width: 480px; left: 50%; transform: translate(-50%, 100%); right: auto; }
  .drawer.visible { transform: translate(-50%, 0); }
  .photo-modal { transform: translateX(-50%); }
}
