* {
  box-sizing: border-box;
}

:root {
  --primary: #4f5d50;
  --secondary: #d8c8a8;
  --text: #2f2f2f;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

body {
  font-family: "Poppins", sans-serif;
  color: var(--text);

  background:
    linear-gradient(
      rgba(255,255,255,0.25),
      rgba(255,255,255,0.25)
    ),
    url("bg.jpg") center center / cover no-repeat fixed;
}

/* PAGINA */

.memorial-page {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;

  display: flex;
  justify-content: center;
  align-items: center;

  padding:
    max(20px, env(safe-area-inset-top))
    16px
    max(20px, env(safe-area-inset-bottom));
}

/* CARD */

.memorial-card {
  width: 100%;
  max-width: 500px;

 
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  border-radius: 24px;

  padding: 28px 22px;

  box-shadow:
    0 12px 35px rgba(0,0,0,0.08);

  text-align: center;
  
   overflow-y: auto;
  max-height: calc(100dvh - 32px);

 background:
  linear-gradient(
    rgba(255,255,255,0.55),
    rgba(255,255,255,0.55)
  ),
  url("bg.jpg") center center / cover no-repeat;

  background-position: center center;
  background-size: 100%;
}

/* FOTO */

.photo-wrapper {
  margin-bottom: 24px;
}

#fotoPersona {
  width: 220px;
  max-width: 100%;
  height: 280px;
  object-fit: cover;

  border-radius: 16px;

  border: 4px solid var(--secondary);

  box-shadow:
    0 12px 30px rgba(0,0,0,0.12);
}

/* TESTI */

.small-title {
  margin: 0;

  font-size: 18px;

  color: #666;
}

h1 {
  margin: 10px 0;

  font-family: "Cormorant Garamond", serif;

  font-size: 42px;

  line-height: 1.1;

  color: var(--primary);
}

.memorial-symbol {
  font-size: 38px;
  margin: 12px 0 18px;
  text-align: center;
  line-height: 1;
}

.life-dates {
  margin: 0 0 24px;

  font-size: 16px;

  color: #777;
  
  white-space: pre-line;
	line-height: 1.8;
	font-size: 17px;
}

.family-message {
  margin: 0 0 28px;

  line-height: 1.8;

  font-size: 17px;
}

/* FRASE */
.quote-box,
.info-row {
  background: rgba(255,255,255,0.45);
}

.quote-box {
  margin: 30px 0;

  padding: 20px;

  border-left: 4px solid var(--secondary);

  background: rgba(216,200,168,0.15);

  border-radius: 12px;

  text-align: left;
}

#frase {
  margin: 0;

  font-style: italic;

  line-height: 1.8;
}

#autoreFrase {
  display: block;

  margin-top: 12px;

  font-size: 14px;

  color: #666;
}

/* CERIMONIA */

.ceremony-box {
  margin-top: 35px;
}

.ceremony-box h2 {
  font-family: "Cormorant Garamond", serif;

  font-size: 32px;

  margin-bottom: 24px;

  color: var(--primary);
}

.ceremony-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 10px;

  justify-content: center;

  padding: 12px;

  border-radius: 12px;

  background: rgba(0,0,0,0.03);
}

.info-icon {
  font-size: 18px;
}

/* TESTO FINALE */

.final-text {
  margin-top: 35px;

  line-height: 1.8;

  color: #666;
}

/* PULSANTI */

.actions {
  margin-top: 35px;

  display: flex;
  flex-direction: column;

  gap: 14px;
}

.action-btn {
  text-decoration: none;

  background: var(--primary);

  color: white;

  padding: 15px 20px;

  border-radius: 14px;

  font-weight: 600;

  transition: 0.2s;
}

.action-btn:hover {
  transform: translateY(-2px);
}

/* UTILITY */

.hidden {
  display: none !important;
}

/* MOBILE PICCOLI */

@media (max-width: 380px) {

  h1 {
    font-size: 34px;
  }

  .ceremony-box h2 {
    font-size: 28px;
  }

  #fotoPersona {
    width: 140px;
    height: 140px;
  }
}

/* MUSICA */
.audio-overlay {
  position: fixed;
  inset: 0;

  width: 100%;
  height: 100%;

  border: none;
  background: transparent;

  z-index: 99999;
  cursor: default;
}