* { box-sizing: border-box; }
:root {
  --paper: #fffaf0;
  --ink: #342744;
  --purple: #5a3896;
}
html { min-width: 300px; }
body {
  margin: 0;
  min-height: 100svh;
  background-color: var(--paper);
  background-image: radial-gradient(#ddd2ba 0.65px, transparent 0.65px);
  background-size: 21px 21px;
  color: var(--ink);
  font-family: 'Nunito', ui-rounded, system-ui, sans-serif;
  position: relative;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
.homepage {
  position: relative;
  z-index: 1;
  width: min(100% - 40px, 650px);
  margin-inline: auto;
  padding: 34px 0 25px;
  text-align: center;
  animation: arrive 450ms ease-out both;
}
.brand { margin: 0 auto 14px; }
.brand-logo { display: block; width: min(100%, 350px); height: auto; margin: auto; mix-blend-mode: multiply; }
.intro { margin: 18px 0 30px; }
h1 { margin: 0; color: #b07d00; font-size: clamp(20px, 3.5vw, 30px); line-height: 1.3; letter-spacing: .2px; font-weight: 900; }

.actions {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 28px;
  width: min(100%, 460px);
  margin: auto;
  padding: 12px 0;
}
.action {
  flex: 1 1 0;
  width: 100%;
  max-width: 190px;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1 / 1;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 9px;
  padding: 24px;
  border: 2px solid #ffffffc9;
  border-radius: 50%;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.4;
  letter-spacing: .2px;
  text-align: center;
  box-shadow: inset 0 3px 15px #ffffffc9, 0 7px 0 var(--action-rim), 0 15px 28px var(--action-glow);
  animation: action-float 4.2s ease-in-out infinite;
  transition: filter 180ms ease;
  -webkit-tap-highlight-color: transparent;
}
.action::before {
  content: '';
  position: absolute;
  inset: -9px;
  border: 2px solid var(--action-ring);
  border-radius: inherit;
  box-shadow: 0 0 22px 8px var(--action-glow);
  pointer-events: none;
  z-index: -1;
  opacity: .45;
  animation: action-glow 3.4s ease-in-out infinite;
}
.action-club {
  --action-rim: #dfb346;
  --action-glow: #efc73c5c;
  --action-ring: #efc73c8c;
  background: radial-gradient(circle at 35% 24%, #fff7ca, #f8d66f 67%, #f1c64a);
  color: #624209;
}
.action-custom {
  --action-rim: #73be94;
  --action-glow: #55cf9157;
  --action-ring: #5ecb9394;
  background: radial-gradient(circle at 35% 24%, #eefff3, #ace5c6 67%, #83d3aa);
  color: #20563c;
  animation-delay: -2.1s;
}
.action-custom::before { animation-delay: -1.7s; }
.button-icon {
  width: 50px;
  height: 50px;
  background: #ffffffc9;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 2px 12px #ffffff80;
}
.button-icon svg { width: 29px; height: 29px; }
.action-club .button-icon { color: #b47900; }
.action-custom .button-icon { background: #168a4b; color: white; }
.button-label { display: block; max-width: 100%; }
.action:hover { animation-play-state: paused; filter: brightness(1.035); }
.action:active { animation: none; transform: scale(.98); }
.action:focus-visible { outline: 3px solid #2f6fa7; outline-offset: 13px; animation-play-state: paused; }
.status { min-height: 19px; margin: 15px auto 0; max-width: 450px; font-size: 12px; color: #67557b; }
.status:empty { display: none; }

footer { margin-top: 19px; }
.color-dots { display: flex; justify-content: center; gap: 6px; }
.color-dots i { display: block; width: 6px; height: 6px; border-radius: 50%; background: #ec865c; }
.color-dots i:nth-child(2) { background: #efb449; }
.color-dots i:nth-child(3) { background: #9abb7b; }
.color-dots i:nth-child(4) { background: #68b3ad; }
.color-dots i:nth-child(5) { background: #738cc4; }
.color-dots i:nth-child(6) { background: #a486b8; }
footer p { font-size: 12px; margin: 13px 0 8px; color: #84788b; }
footer small { font-size: 10px; color: #9c929f; }
.decoration { position: absolute; z-index: 0; pointer-events: none; }
.decoration-yellow { width: 240px; height: 240px; border-radius: 45% 55% 69% 31% / 49% 49% 51% 51%; background: #f9e6a8; top: 65px; left: max(-135px, calc(50% - 640px)); transform: rotate(20deg); }
.decoration-lilac { width: 175px; height: 220px; border-radius: 56% 44% 32% 68% / 39% 45% 55% 61%; background: #e8dcf2; top: 260px; right: max(-105px, calc(50% - 640px)); transform: rotate(-18deg); }
.decoration-mint { width: 200px; height: 130px; background: #deead9; bottom: 20px; left: max(-130px, calc(50% - 600px)); border-radius: 56% 44% 42% 58% / 65% 74% 26% 35%; transform: rotate(16deg); }
.tiny-mark { position: absolute; font-size: 33px; line-height: 1; pointer-events: none; }
.mark-one { color: #d5a55e; top: 205px; left: calc(50% - 340px); transform: rotate(12deg); }
.mark-two { color: #9876b4; top: 87px; right: calc(50% - 270px); font-size: 45px; transform: rotate(-12deg); }
.mark-three { color: #81aa99; bottom: 145px; right: calc(50% - 325px); font-size: 25px; }

@keyframes arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes action-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes action-glow { 0%, 100% { opacity: .35; transform: scale(1); } 50% { opacity: .8; transform: scale(1.025); } }

@media (min-width: 1600px) { .homepage { padding-top: 65px; } }
@media (max-width: 640px) {
  .homepage { width: min(100% - 38px, 450px); padding-top: 25px; }
  .brand-logo { width: 285px; max-width: 90%; }
  .brand { margin-bottom: 18px; }
  h1 { font-size: clamp(20px, 5.4vw, 23px); letter-spacing: .2px; }
  .actions { width: min(100%, 370px); gap: 20px; }
  .action { max-width: 170px; padding: 16px 10px; font-size: clamp(9px, 2.7vw, 11px); letter-spacing: .1px; gap: 7px; }
  .button-icon { width: 38px; height: 38px; }
  .button-icon svg { width: 25px; height: 25px; }
  .decoration-yellow { width: 165px; height: 165px; left: -115px; top: 140px; }
  .decoration-lilac { width: 125px; height: 175px; right: -90px; top: 340px; }
  .mark-one { top: 198px; left: 16px; font-size: 18px; }
  .mark-two { top: 142px; right: 18px; font-size: 25px; }
  .mark-three { display: none; }
  footer { margin-top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .homepage, .action, .action::before { animation: none; }
  .action { transition: none; }
  .action:active { transform: none; }
}

/* Accesso personale: il server inserisce questo link solo per il proprietario. */
.admin-access {
  display: inline-block;
  margin-top: 12px;
  color: inherit;
  font-size: 0.8rem;
  text-underline-offset: 3px;
  opacity: 0.7;
}
.admin-access:hover,
.admin-access:focus-visible { opacity: 1; }
