/* ==========================================================================
   BABBO NATALE SEGRETO — "Cozy & Aesthetic Christmas"
   Palette: Deep Forest (#0f241d), Champagne Gold (#d4af37), Warm Ivory (#fbf7ef)
   Approccio: Mobile-First, Zero Horizontal Scroll, 60fps Animations
   ========================================================================== */

:root {
  --bg-forest-deep: #0b1b15;
  --bg-forest: #0f241d;
  --bg-forest-soft: #163329;
  --gold-light: #f3df9b;
  --gold: #d4af37;
  --gold-deep: #a5821f;
  --crimson: #8f1d28;
  --crimson-soft: #b32937;
  --ivory: #fcf8f0;
  --ivory-warm: #f5ecdc;
  --ink-dark: #182922;
  --ink-muted: #4b5d55;
  --text-cream: #f8f4ec;
  --text-muted: rgba(248, 244, 236, 0.74);
  --glass-bg: rgba(22, 50, 40, 0.62);
  --glass-border: rgba(212, 175, 55, 0.28);
  --glass-border-strong: rgba(212, 175, 55, 0.58);
  --danger: #ff8a8a;

  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --shadow-soft: 0 16px 40px rgba(4, 12, 9, 0.42);
  --shadow-gold: 0 10px 28px rgba(212, 175, 55, 0.22);
}

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

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg-forest);
  background-image:
    radial-gradient(circle at 18% 12%, rgba(212, 175, 55, 0.12), transparent 42%),
    radial-gradient(circle at 84% 85%, rgba(143, 29, 40, 0.16), transparent 46%),
    linear-gradient(180deg, #0b1c16 0%, #0f241d 52%, #0a1914 100%);
  color: var(--text-cream);
  font-family: var(--font-sans);
  line-height: 1.55;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

/* ==========================================================================
   SFONDO NEVE & BAGLIORI AMBIENTALI
   ========================================================================== */
#snow-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(85px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

.ambient-glow--top {
  width: 280px;
  height: 280px;
  top: -90px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(212, 175, 55, 0.18);
}

.ambient-glow--bottom {
  width: 320px;
  height: 320px;
  bottom: -120px;
  right: -80px;
  background: rgba(143, 29, 40, 0.2);
}

/* ==========================================================================
   CONTAINER PRINCIPALE (Mobile-First -> Tablet 680px -> Desktop 760px)
   ========================================================================== */
.app-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 1.75rem 1.1rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ==========================================================================
   HERO HEADER
   ========================================================================== */
.hero-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.season-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.36rem 0.85rem;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--gold-light);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 7vw, 2.95rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--text-cream);
}

.hero-title em {
  font-style: italic;
  color: var(--gold-light);
  background: linear-gradient(135deg, #fff3c4 0%, #d4af37 65%, #f3df9b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  max-width: 52ch;
  color: var(--text-muted);
  font-size: 0.94rem;
}

/* Icon sizes */
.icon-xs {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.icon-sm {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.icon-md {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.icon-lg {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.gold-text {
  color: var(--gold-light);
}

/* ==========================================================================
   PANNELLI E GRIGLIA PARTECIPANTI ("Chi sei?")
   ========================================================================== */
.view-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.15rem;
  box-shadow: var(--shadow-soft);
  animation: fadeSlideUp 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.32rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.budget-mini-pill {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.16);
  border: 1px solid rgba(212, 175, 55, 0.42);
  color: var(--gold-light);
}

/* Mobile (< 640px): Griglia a 2 colonne */
.participants-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.participant-card {
  appearance: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.025) 100%);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-md);
  padding: 1.1rem 0.8rem;
  min-height: 118px;
  color: var(--text-cream);
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.55rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.22s ease,
              background-color 0.22s ease,
              box-shadow 0.22s ease;
  -webkit-tap-highlight-color: transparent;
}

.participant-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.18), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.participant-card:active {
  transform: scale(0.97);
}

.participant-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.24), rgba(212, 175, 55, 0.08));
  border: 1px solid rgba(212, 175, 55, 0.45);
  display: grid;
  place-items: center;
  color: var(--gold-light);
  position: relative;
  z-index: 1;
  transition: transform 0.25s ease;
}

.participant-name {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--text-cream);
  position: relative;
  z-index: 1;
}

.participant-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.25;
  position: relative;
  z-index: 1;
}

.privacy-note {
  margin-top: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

/* ==========================================================================
   MODALE PIN E TASTIERINO NUMERICO AESTHETIC
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(5, 13, 10, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

.modal-card {
  width: 100%;
  max-width: 390px;
  background: linear-gradient(180deg, #153127 0%, #0d2019 100%);
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.25rem 1.35rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  position: relative;
  animation: modalPop 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-close-btn {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-cream);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(212, 175, 55, 0.45);
}

.modal-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.7rem;
  padding-inline: 1.2rem;
}

.modal-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.16);
  border: 1px solid rgba(212, 175, 55, 0.48);
  color: var(--gold-light);
  display: grid;
  place-items: center;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-cream);
}

.pin-display-wrapper {
  position: relative;
  margin-top: 1.15rem;
}

/* Input numerico reale posizionato sopra gli slot ma trasparente per supportare auto-focus e incolla */
.sr-pin-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  font-size: 18px; /* Evita auto-zoom su iOS Safari */
  cursor: pointer;
  z-index: 2;
}

.pin-slots {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
}

.pin-slot {
  width: 54px;
  height: 60px;
  border-radius: 14px;
  background: rgba(7, 18, 14, 0.68);
  border: 1.5px solid rgba(212, 175, 55, 0.3);
  display: grid;
  place-items: center;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.pin-slot.is-active {
  border-color: var(--gold-light);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
}

.pin-slot.is-filled {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.12);
}

.pin-slot span {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--gold-light);
  transform: scale(0);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pin-slot.is-filled span {
  transform: scale(1);
}

.pin-slot.is-error {
  border-color: var(--danger);
  background: rgba(255, 107, 107, 0.12);
}

.pin-error-msg {
  min-height: 1.35rem;
  margin-top: 0.6rem;
  margin-bottom: 0.5rem;
  text-align: center;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--danger);
}

/* Tastierino numerico: tutti i pulsanti >= 52px di altezza */
.numpad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.numpad-key {
  appearance: none;
  min-height: 54px;
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 55, 0.24);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-cream);
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  display: grid;
  place-items: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
}

.numpad-key:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: rgba(212, 175, 55, 0.5);
}

.numpad-key:active {
  transform: scale(0.95);
  background: rgba(212, 175, 55, 0.25);
}

.numpad-key--utility {
  font-size: 0.95rem;
  color: var(--gold-light);
  background: rgba(212, 175, 55, 0.08);
}

/* Animazione Shake per PIN errato */
.is-shaking {
  animation: pinShake 0.44s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes pinShake {
  10%, 90% { transform: translate3d(-4px, 0, 0); }
  20%, 80% { transform: translate3d(7px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-9px, 0, 0); }
  40%, 60% { transform: translate3d(9px, 0, 0); }
}

/* ==========================================================================
   SCHERMATA SCATOLA REGALO & RIVELAZIONE FLIP 3D
   ========================================================================== */
.logged-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.18);
}

.logged-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: var(--text-cream);
}

.logged-user-chip strong {
  color: var(--gold-light);
}

.text-action-btn {
  appearance: none;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.82rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 0.4rem 0.2rem;
}

.text-action-btn:hover {
  color: var(--gold-light);
}

/* Palco Scatola Regalo */
.gift-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.8rem 0.5rem 1.2rem;
  gap: 1.1rem;
}

.gift-prompt {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--gold-light);
}

.gift-box-btn {
  appearance: none;
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  width: 210px;
  height: 210px;
  display: grid;
  place-items: center;
  -webkit-tap-highlight-color: transparent;
}

.gift-aura {
  position: absolute;
  width: 165px;
  height: 165px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.34) 0%, transparent 70%);
  animation: pulseAura 2.6s ease-in-out infinite;
}

.gift-svg {
  width: 196px;
  height: 196px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.45));
  animation: gentleFloat 3s ease-in-out infinite;
}

.gift-lid-group {
  transform-origin: 110px 80px;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.55s ease;
}

.gift-inner-glow {
  transition: opacity 0.4s ease, transform 0.6s ease;
  transform-origin: 110px 108px;
}

/* Stato vibrazione pre-apertura */
.gift-stage.is-vibrating .gift-svg {
  animation: giftVibrate 0.58s linear infinite;
}

/* Stato apertura coperchio */
.gift-stage.is-opening .gift-lid-group {
  transform: translate3d(18px, -68px, 0) rotate(22deg) scale(0.95);
  opacity: 0;
}

.gift-stage.is-opening .gift-inner-glow {
  opacity: 1;
  transform: scale(2.2);
}

.sparkle-dot {
  animation: twinkle 2s ease-in-out infinite alternate;
}
.sparkle-dot.s2 { animation-delay: 0.5s; }
.sparkle-dot.s3 { animation-delay: 0.9s; }
.sparkle-dot.s4 { animation-delay: 1.3s; }

.primary-gold-btn {
  appearance: none;
  min-height: 52px;
  padding: 0.85rem 1.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 245, 204, 0.6);
  background: linear-gradient(135deg, #f5df94 0%, #d4af37 55%, #b68e22 100%);
  color: #16261f;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.primary-gold-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 14px 32px rgba(212, 175, 55, 0.34);
}

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

/* ==========================================================================
   CARD RISULTATO CON EFFETTO FLIP 3D (Carta Avorio Calda & Dettagli Oro)
   ========================================================================== */
.flip-scene {
  perspective: 1400px;
  width: 100%;
}

.flip-card {
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  transform: rotateY(0deg);
}

.flip-card.is-flipped {
  transform: rotateY(180deg);
}

.flip-face {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 22px;
}

.flip-face--front {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #7e1923 0%, #4e0e15 100%);
  border: 2px solid rgba(212, 175, 55, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  color: var(--gold-light);
  box-shadow: var(--shadow-soft);
}

.seal-emblem {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.18);
  border: 2px solid var(--gold-light);
  display: grid;
  place-items: center;
}

.seal-caption {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 600;
}

.seal-sub {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

.flip-face--back {
  transform: rotateY(180deg);
}

/* Stile Carta Avorio Prestigiosa */
.ivory-result-card {
  background: linear-gradient(180deg, var(--ivory) 0%, var(--ivory-warm) 100%);
  color: var(--ink-dark);
  border: 2px solid rgba(212, 175, 55, 0.65);
  padding: 1.4rem 1.15rem;
  box-shadow: 0 20px 45px rgba(4, 12, 9, 0.45);
}

.result-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.secret-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--crimson);
}

.budget-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.9rem;
  border-radius: 999px;
  background: var(--bg-forest);
  color: var(--gold-light);
  border: 1px solid var(--gold);
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(15, 36, 29, 0.18);
}

.recipient-hero {
  text-align: center;
  padding: 0.35rem 0.25rem;
}

.recipient-prefix {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 0.2rem;
}

.recipient-name {
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 8vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--crimson);
  letter-spacing: -0.01em;
}

.divider-ornament {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.05rem 0;
  color: var(--gold-deep);
  font-size: 0.9rem;
}

.divider-ornament::before,
.divider-ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(165, 130, 31, 0.45), transparent);
}

/* Sezione Wishlist */
.wishlist-section {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.wishlist-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--bg-forest);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.wishlist-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.wishlist-tag {
  background: #ffffff;
  border: 1px solid rgba(24, 41, 34, 0.13);
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  padding: 0.48rem 0.72rem;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink-dark);
  line-height: 1.35;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.original-note-box {
  background: rgba(15, 36, 29, 0.055);
  border: 1px dashed rgba(15, 36, 29, 0.22);
  border-radius: 14px;
  padding: 0.9rem 0.95rem;
}

.original-note-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  margin-bottom: 0.4rem;
}

.original-quote {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--ink-dark);
  line-height: 1.58;
}

/* Azioni Card Risultato */
.result-actions {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.copy-reminder-btn {
  flex: 1;
  appearance: none;
  min-height: 50px;
  padding: 0.8rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--bg-forest);
  background: var(--bg-forest);
  color: var(--text-cream);
  font-family: var(--font-sans);
  font-size: 0.94rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.copy-reminder-btn:hover {
  background: var(--bg-forest-soft);
}

.copy-reminder-btn:active {
  transform: scale(0.98);
}

.copy-reminder-btn.is-copied {
  background: #1d5c3f;
  border-color: #1d5c3f;
}

.icon-festive-btn {
  appearance: none;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  border: 1px solid rgba(165, 130, 31, 0.45);
  background: rgba(212, 175, 55, 0.18);
  color: var(--ink-dark);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.icon-festive-btn:hover {
  background: rgba(212, 175, 55, 0.32);
}

/* Barra Logout Discreta in Basso */
.bottom-session-bar {
  margin-top: 1.25rem;
  display: flex;
  justify-content: center;
}

.logout-btn {
  appearance: none;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(248, 244, 236, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.logout-btn:hover {
  color: var(--text-cream);
  border-color: rgba(212, 175, 55, 0.45);
  background: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   TOAST NOTIFICA COPIA
   ========================================================================== */
.toast-banner {
  position: fixed;
  bottom: 1.35rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  background: #143829;
  color: var(--gold-light);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 0.68rem 1.15rem;
  font-size: 0.86rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  animation: toastSlideIn 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   KEYFRAMES ANIMAZIONI
   ========================================================================== */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes modalPop {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@keyframes pulseAura {
  0%, 100% { transform: scale(0.95); opacity: 0.55; }
  50% { transform: scale(1.1); opacity: 0.9; }
}

@keyframes giftVibrate {
  0% { transform: rotate(0deg) scale(1.02); }
  20% { transform: rotate(-5deg) translate(-3px, -2px) scale(1.04); }
  40% { transform: rotate(5deg) translate(3px, 1px) scale(1.05); }
  60% { transform: rotate(-6deg) translate(-3px, 2px) scale(1.06); }
  80% { transform: rotate(6deg) translate(3px, -2px) scale(1.06); }
  100% { transform: rotate(0deg) scale(1.04); }
}

@keyframes twinkle {
  from { opacity: 0.25; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1.25); }
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, 12px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* ==========================================================================
   BREAKPOINT TABLET / iPAD (640px - 1024px)
   Container centrato max-width 680px, griglia a 3 colonne
   ========================================================================== */
@media (min-width: 640px) {
  .app-shell {
    max-width: 680px;
    padding: 2.5rem 1.5rem 3.5rem;
    gap: 1.85rem;
  }

  .view-panel {
    padding: 1.85rem 1.75rem;
  }

  .participants-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }

  .participant-card {
    min-height: 136px;
    padding: 1.25rem 0.95rem;
  }

  .ivory-result-card {
    padding: 1.85rem 1.75rem;
  }
}

/* ==========================================================================
   BREAKPOINT DESKTOP (> 1024px)
   Layout centrato elegante max-width 760px con micro-interazioni hover 60fps
   ========================================================================== */
@media (min-width: 1025px) {
  .app-shell {
    max-width: 760px;
    padding: 3.2rem 1.75rem 4rem;
  }

  .view-panel {
    padding: 2.15rem 2.15rem;
  }

  .participants-grid {
    gap: 1.15rem;
  }

  .participant-card:hover {
    transform: translateY(-4px);
    border-color: var(--glass-border-strong);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35), 0 0 22px rgba(212, 175, 55, 0.14);
  }

  .participant-card:hover::before {
    opacity: 1;
  }

  .participant-card:hover .participant-avatar {
    transform: scale(1.08);
  }

  .ivory-result-card {
    padding: 2.2rem 2.2rem;
  }
}

/* Rispetto preferenze accessibilità movimento ridotto */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
