:root {
  --section-gap: 16px;
  --card-padding: 20px;
  --card-inline: 16px;
  --card-radius: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100%;
  background: #faf6ee;
  font-family: 'Tajawal', sans-serif;
  color: #22170d;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

html {
  scroll-padding-top: 20px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-image:
    radial-gradient(rgba(184, 134, 40, 0.12) 1.5px, transparent 1.5px);
  background-size: 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

button, a {
  touch-action: manipulation;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 3px solid #8c5d14;
  outline-offset: 4px;
}

/* الواجهة الافتتاحية */
.hero-screen {
  position: relative;
  width: 100%;
  min-height: auto;
  background-image: url('https://buharita.com/CX-01-cygnes-coeur/hero.webp');
  background-size: cover;
  background-position: center bottom;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding:
    calc(72px + env(safe-area-inset-top))
    14px
    clamp(100px, 28vw, 140px);
}

.hero-glass-card {
  width: 100%;
  max-width: 480px;
  padding: var(--card-padding) var(--card-inline);
  text-align: center;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(212, 175, 55, 0.7);
  border-radius: 28px;
  box-shadow:
    0 12px 35px rgba(50, 35, 12, 0.12),
    inset 0 1px 2px rgba(255, 255, 255, 0.9);
}

.hero-spacer {
  height: 20px;
  width: 100%;
  flex-shrink: 0;
}

.badge-names {
  width: 100%;
  max-width: 440px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid #d4af37;
  border-radius: 50px;
  box-shadow: 0 8px 25px rgba(126, 86, 24, 0.18);
}

.names-gold {
  display: inline-block;
  padding-bottom: 2px;
  font-family: 'Cairo', sans-serif;
  font-weight: 900;
  font-size: clamp(22px, 6.6vw, 30px);
  line-height: 1.4;
  background: linear-gradient(
    180deg,
    #996e1b 0%,
    #b88628 40%,
    #634107 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.names-amp {
  font-family: 'Amiri', serif;
  font-weight: 700;
  font-size: clamp(22px, 6.6vw, 30px);
  color: #996e1b;
}

/* العائلات */
.hosts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.host-box {
  min-width: 0;
  background: rgba(255, 255, 255, 0.75);
  border: 1.5px solid rgba(212, 175, 55, 0.5);
  border-radius: 18px;
  padding: 10px 6px;
}

.host-title {
  font-family: 'Amiri', serif;
  font-size: 24px;
  font-weight: 700;
  color: #8c5d14;
  line-height: 1.3;
}

.host-name {
  font-size: 13px;
  font-weight: 800;
  color: #3b2c1e;
  margin-top: 2px;
  line-height: 1.6;
}

/* الأقسام والبطاقات */
.content-container {
  width: 100%;
  max-width: 480px;
  padding: 16px 14px calc(110px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
}

.content-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--card-radius);
  border: 1.5px solid rgba(212, 175, 55, 0.5);
  box-shadow: 0 10px 28px rgba(78, 52, 17, 0.08);
  padding: var(--card-padding) var(--card-inline);
  text-align: center;
  scroll-margin-top: 20px;
}

/* التقويم */
.cal-header,
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.cal-header {
  font-size: clamp(10px, 2.8vw, 13px);
  font-weight: 800;
  color: #8c5d14;
  margin-bottom: 8px;
}

.cal-grid {
  row-gap: 8px;
  font-size: 16px;
  font-weight: 800;
  align-items: center;
}

.heart-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

.heart-wrapper {
  width: min(44px, 100%);
  height: 44px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: heartPulse 2.2s infinite ease-in-out;
}

.heart-wrapper svg {
  width: 100%;
  height: 44px;
}

.heart-num {
  position: absolute;
  color: #fff;
  font-weight: 900;
  font-size: 14px;
  padding-top: 2px;
}

@keyframes heartPulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 2px 6px rgba(220, 20, 60, 0.45));
  }

  50% {
    transform: scale(1.15);
    filter: drop-shadow(0 4px 14px rgba(220, 20, 60, 0.85));
  }
}

/* العداد */
.countdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 12px;
}

.count-card {
  flex: 1 1 0;
  min-width: 0;
  background: #fff;
  border: 1.5px solid rgba(212, 175, 55, 0.4);
  border-radius: 16px;
  padding: 10px 4px;
}

.count-card.active-sec {
  border: 2px solid #b88628;
  background: #fffcf5;
}

.count-num {
  font-family: 'Cairo', sans-serif;
  font-size: 26px;
  font-weight: 900;
  line-height: 1.2;
  min-height: 1.2em;
  font-variant-numeric: tabular-nums;
  display: block;
}

.count-lbl {
  font-size: 12px;
  font-weight: 800;
  color: #7d654f;
  margin-top: 4px;
  line-height: 1.6;
  display: block;
}

/* طاقم الحفل */
.crew-box {
  background: #fff;
  border: 1.5px solid rgba(212, 175, 55, 0.4);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: right;
  margin-bottom: 12px;
}

.crew-box > div {
  min-width: 0;
}

.crew-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fbf5e6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

/* الملاحظات */
.notes-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1.5px solid rgba(212, 175, 55, 0.4);
  background: #fff;
  text-align: right;
  font-size: 14px;
  margin-top: 8px;
}

.notes-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #f2e9d8;
  line-height: 1.85;
  vertical-align: middle;
  overflow-wrap: break-word;
}

.notes-table tr:last-child td {
  border-bottom: none;
}

.notes-table td.title-td {
  width: 29%;
  background: #fffcf5;
  font-size: 13px;
  font-weight: 800;
  color: #8c5d14;
  border-left: 1px solid #f2e9d8;
}

.notes-table td.desc-td {
  color: #3b2c1e;
  font-weight: 700;
}

/* الأزرار */
.btn-gold {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  background: linear-gradient(180deg, #c79632 0%, #a6741b 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.6;
  padding: 13px 16px;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(166, 116, 27, 0.35);
  border: 0;
  cursor: pointer;
  transition: transform 150ms ease;
}

.btn-gold:active {
  transform: scale(0.97);
}

.btn-gold > span:first-child {
  flex-shrink: 0;
}

.btn-gold > span:last-child {
  min-width: 0;
  overflow-wrap: break-word;
}

/* الصوت */
.audio-btn {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  left: max(14px, env(safe-area-inset-left));
  z-index: 999;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid #d4af37;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
}

/* التنقل */
.nav-bottom {
  position: fixed;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 440px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 50px;
  border: 1.5px solid rgba(212, 175, 55, 0.5);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 6px 10px;
  z-index: 900;
}

.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #6d543e;
  font-size: 12px;
  font-weight: 800;
  gap: 2px;
}

.nav-bottom .nav-link {
  flex: 1 1 0;
  min-width: 0;
  min-height: 48px;
  justify-content: center;
  border-radius: 30px;
  transition: color 150ms ease, background-color 150ms ease;
}

.nav-bottom .nav-link.is-active {
  color: #8c5d14;
  background: #fbf5e6;
}

.nav-bottom .presentation-34 {
  flex-shrink: 0;
}

#calendarReminder {
  min-height: 44px;
  justify-content: center;
  font-size: 13px;
  line-height: 1.7;
  padding: 6px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

#ambientCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 50;
}

/* العناوين والمسافات داخل البطاقات */
.presentation-1 {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #8c5d14;
  display: block;
  margin-bottom: 8px;
}

.presentation-2 {
  font-family: 'Amiri', serif;
  font-size: 22px;
  line-height: 1.6;
  font-weight: 700;
  color: #22170d;
  margin-bottom: 12px;
}

.presentation-3 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 0;
}

.presentation-4 {
  height: 1.5px;
  width: 45px;
  background: linear-gradient(to right, transparent, #b88628);
}

.presentation-5 {
  font-size: 28px;
  line-height: 1.4;
}

.presentation-6 {
  height: 1.5px;
  width: 45px;
  background: linear-gradient(to left, transparent, #b88628);
}

.presentation-7 {
  font-size: 15px;
  line-height: 1.85;
  color: #423020;
  font-weight: 800;
  margin-top: 0;
}

.presentation-8 {
  font-family: 'Cairo', sans-serif;
  font-size: 32px;
  font-weight: 900;
  color: #8c5d14;
  line-height: 1.3;
}

.presentation-9 {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #634107;
  display: block;
  margin: 6px 0 14px;
}

.presentation-10 {
  border-top: 1px solid #ebd9b8;
  margin-top: 16px;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.presentation-11 {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #fffcf5;
  border: 1.5px solid #d4af37;
  padding: 6px 12px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.7;
  color: #22170d;
  align-self: center;
}

.presentation-12 {
  color: #b88628;
}

.presentation-13 {
  font-size: 15px;
}

.presentation-14 {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #78614c;
  display: block;
  margin-bottom: 0;
  line-height: 1.7;
}

.presentation-15 {
  font-size: 20px;
  font-weight: 900;
  color: #b88628;
  padding-bottom: 12px;
}

.presentation-16 {
  font-size: 14px;
  line-height: 1.8;
  font-weight: 700;
  color: #6d543e;
  margin-top: 12px;
}

.presentation-10 .presentation-16 {
  margin-top: 0;
}

.presentation-17 {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #8c5d14;
  display: block;
  margin-bottom: 4px;
  line-height: 1.7;
}

.presentation-18,
.presentation-22 {
  font-family: 'Cairo', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: #22170d;
  line-height: 1.65;
  margin-bottom: 12px;
}

.presentation-19 {
  font-size: 12px;
  font-weight: 800;
  color: #b88628;
  display: block;
  line-height: 1.7;
  margin-bottom: 2px;
}

.presentation-20 {
  font-family: 'Cairo', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #22170d;
  line-height: 1.65;
}

.presentation-21 {
  margin-bottom: 0;
}

.presentation-23 {
  text-align: right;
  margin-bottom: 16px;
}

.presentation-24 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 800;
  color: #8c5d14;
  line-height: 1.7;
}

.presentation-25 {
  text-align: right;
}

.presentation-26 {
  font-family: 'Cairo', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: #22170d;
  line-height: 1.65;
  margin-bottom: 8px;
}

.presentation-27 {
  font-size: 13px;
  line-height: 1.8;
  font-weight: 700;
  color: #78614c;
  margin-bottom: 12px;
}

.presentation-28 {
  width: 100%;
  height: 210px;
  border-radius: 18px;
  overflow: hidden;
  border: 1.5px solid rgba(212, 175, 55, 0.5);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  margin-bottom: 12px;
}

.presentation-29 {
  border: 0;
  display: block;
}

.presentation-30 {
  font-size: 20px;
}

.presentation-31 {
  text-align: center;
  padding: 8px 0;
}

.presentation-32 {
  font-size: 14px;
  line-height: 1.8;
  font-weight: 800;
  color: #6d543e;
}

.presentation-33 {
  color: #b88628;
  margin-top: 6px;
  font-size: 18px;
  line-height: 1.4;
}

.presentation-34 {
  width: 1px;
  height: 18px;
  background: rgba(212, 175, 55, 0.35);
}

/* الشاشات الضيقة */
@media (max-width: 360px) {
  :root {
    --card-inline: 12px;
  }

  .hero-screen,
  .content-container {
    padding-inline: 10px;
  }

  .hosts-grid {
    gap: 8px;
  }

  .host-name {
    font-size: 12px;
  }

  .badge-names {
    gap: 10px;
    padding-inline: 12px;
  }

  .countdown-row {
    gap: 4px;
  }

  .count-num {
    font-size: 23px;
  }

  .presentation-15 {
    font-size: 16px;
  }

  .notes-table td {
    padding-inline: 8px;
  }

  .notes-table td.title-td {
    width: 30%;
  }

  .btn-gold {
    padding-inline: 12px;
    font-size: 15px;
  }

  .presentation-13 {
    font-size: 14px;
  }

  .presentation-18,
  .presentation-22,
  .presentation-26 {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html, body {
    scroll-behavior: auto;
  }

  .heart-wrapper {
    animation: none;
  }

  .btn-gold:active {
    transform: none;
  }

  .btn-gold,
  .nav-bottom .nav-link {
    transition: none;
  }
}