:root {
  --bg-page: #f5f5f7;
  --color-primary: #0E0E0E;
  --color-secondary: #4D4D4D;
  --color-tertiary: #888888;
  --color-border: #ECECEE;

  --rosa-app: #FCE8E5;
  --rosa-app-soft: #FFF3F0;
  --viola-scalapay: #5C4EE5;
  --viola-soft: #EEEAFF;

  --color-accent: #FF3B30;
  --color-accent-soft: #FFE5E3;

  --screen-bg: #ffffff;
}

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

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-page);
  color: var(--color-primary);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

body {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 16px 16px;
  min-height: 100vh;
}

@media (min-height: 920px) {
  body { padding: 32px 16px; align-items: center; }
}

.stage {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 56px;
  align-items: start;
  max-width: 1100px;
  width: 100%;
}

@media (max-width: 880px) { .stage { grid-template-columns: 1fr; gap: 24px; } }

.phone-frame {
  position: relative;
  width: 390px;
  height: 844px;
  background: #000;
  border-radius: 56px;
  padding: 12px;
  box-shadow: 0 0 0 1.5px #2a2a2a, 0 0 0 6px #1a1a1a, 0 30px 60px -20px rgba(0,0,0,0.35);
  flex-shrink: 0;
  margin: 0 auto;
}

.phone-side { position: absolute; background: #2a2a2a; border-radius: 2px; }
.phone-side-power { right: -2px; top: 200px; width: 4px; height: 100px; }
.phone-side-volume-up { left: -2px; top: 170px; width: 4px; height: 60px; }
.phone-side-volume-down { left: -2px; top: 240px; width: 4px; height: 60px; }
.phone-side-silent { left: -2px; top: 130px; width: 4px; height: 30px; }

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--screen-bg);
  border-radius: 44px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.status-bar {
  position: absolute; top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 28px 6px;
  font-size: 15px; font-weight: 700;
  color: var(--color-primary);
  height: 44px;
  pointer-events: none;
}
.status-time { letter-spacing: -0.3px; }
.status-icons { display: flex; align-items: center; gap: 6px; }
.status-signal { display: flex; align-items: flex-end; gap: 2px; height: 12px; }
.status-signal span { width: 3px; background: currentColor; border-radius: 1px; }
.status-signal span:nth-child(1) { height: 4px; }
.status-signal span:nth-child(2) { height: 6px; }
.status-signal span:nth-child(3) { height: 9px; }
.status-signal span:nth-child(4) { height: 12px; }
.status-wifi { display: flex; align-items: center; }
.status-battery {
  position: relative; width: 26px; height: 12px;
  border: 1.5px solid currentColor; border-radius: 3.5px;
  padding: 1.5px; opacity: 0.45;
}
.status-battery::after {
  content: ""; position: absolute; right: -3px; top: 3px;
  width: 2px; height: 4px; background: currentColor; border-radius: 0 1px 1px 0;
}
.status-battery-fill { display: block; width: 35%; height: 100%; background: #FFB800; border-radius: 1px; }

.dynamic-island {
  position: absolute; top: 11px; left: 50%; transform: translateX(-50%);
  width: 120px; height: 35px;
  background: #000; border-radius: 999px;
  z-index: 20; pointer-events: none;
}

.screen-viewport {
  flex: 1;
  overflow-y: auto; overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  background: var(--screen-bg);
  position: relative;
}
.screen-viewport::-webkit-scrollbar { display: none; }

.screen { display: none; animation: screenFadeIn 0.32s cubic-bezier(0.32, 0.72, 0, 1); }
.screen.active { display: block; }
@keyframes screenFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.bottom-nav {
  position: relative;
  display: flex; justify-content: space-around; align-items: center;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 0.5px solid rgba(0, 0, 0, 0.08);
  padding: 8px 4px 6px;
  flex-shrink: 0;
  height: 84px;
}
.nav-tab {
  background: transparent; border: none;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 10px; font-weight: 500;
  color: #888;
  transition: color 0.18s ease;
  flex: 1;
  border-radius: 14px;
  -webkit-tap-highlight-color: transparent;
}
.nav-tab.active {
  color: #fff;
  background: var(--viola-scalapay);
  font-weight: 700;
}
.nav-tab.active svg { stroke-width: 2.2; }
.nav-tab:active { transform: scale(0.96); }

.home-indicator {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  width: 134px; height: 5px;
  background: var(--color-primary); border-radius: 3px;
  opacity: 0.85; pointer-events: none;
}

.hint-panel {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 24px;
  max-width: 380px;
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
@media (max-width: 880px) { .hint-panel { max-width: 100%; position: static; } }
.hint-eyebrow {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--color-tertiary); margin-bottom: 8px; font-weight: 600;
}
.hint-title {
  font-size: 22px; font-weight: 700; letter-spacing: -0.5px;
  margin-bottom: 10px; line-height: 1.2;
}
.hint-desc {
  font-size: 14px; color: var(--color-secondary);
  line-height: 1.55; margin-bottom: 20px;
}
.hint-controls { display: flex; flex-direction: column; gap: 6px; }
.hint-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--viola-scalapay);
  margin: 12px 0 4px;
  padding-left: 4px;
}
.hint-section-label:first-child { margin-top: 0; }
.hint-btn {
  background: #fff; border: 1px solid var(--color-border);
  padding: 12px 14px; border-radius: 12px;
  font-family: inherit; font-size: 13px; font-weight: 500;
  text-align: left; cursor: pointer; color: var(--color-primary);
  transition: all 0.15s ease;
  display: flex; align-items: center; gap: 10px;
}
.hint-btn:hover { border-color: var(--viola-scalapay); background: var(--viola-soft); }
.hint-btn.active {
  background: var(--viola-scalapay); color: #fff; border-color: var(--viola-scalapay);
}
.hint-btn.active .hint-num { background: rgba(255,255,255,0.25); color: #fff; }
.hint-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--viola-soft); color: var(--viola-scalapay);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.app-rosa-bg { background: var(--rosa-app); padding-top: 50px; padding-bottom: 16px; }

.app-header {
  padding: 0 20px 12px;
  display: flex; justify-content: space-between; align-items: center;
}
.app-header-user { display: flex; align-items: center; gap: 12px; }
.app-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.app-avatar svg { width: 22px; height: 22px; }
.app-username { font-size: 26px; font-weight: 800; letter-spacing: -0.6px; }
.app-abbonati {
  background: var(--viola-soft); border: none;
  padding: 9px 16px; border-radius: 999px;
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700;
  color: var(--color-primary); font-family: inherit;
}
.app-abbonati .crown {
  width: 14px; height: 14px;
  background: var(--viola-scalapay);
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 16L3 6l5.5 4L12 4l3.5 6L21 6l-2 10H5zm0 2h14v2H5v-2z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 16L3 6l5.5 4L12 4l3.5 6L21 6l-2 10H5zm0 2h14v2H5v-2z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.app-buying-power {
  margin: 0 20px 16px; background: #fff;
  border-radius: 18px; padding: 16px 18px;
}
.bp-row { display: flex; justify-content: space-between; align-items: center; }
.bp-label { font-size: 14px; font-weight: 600; }
.bp-link { font-size: 14px; color: var(--viola-scalapay); font-weight: 600; text-decoration: underline; }
.bp-amount-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.bp-amount-blur {
  flex: 1; height: 18px;
  background: linear-gradient(90deg, #d8d8d8 0%, #c0c0c0 50%, #d8d8d8 100%);
  border-radius: 4px; filter: blur(4px); max-width: 180px;
}
.bp-eye { color: var(--viola-scalapay); font-size: 18px; }
.bp-totale { font-size: 15px; font-weight: 600; margin-top: 14px; }
.bp-totale b { font-weight: 800; }

.app-services-card {
  margin: 0 20px 18px;
  background: #fff; border-radius: 20px; padding: 18px 14px;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px 4px;
}
.service-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.service-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: #fff; border: 0.5px solid #f0f0f0;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-primary);
}
.service-icon svg { width: 26px; height: 26px; }
.service-icon.pago { font-size: 9px; font-weight: 800; color: var(--viola-scalapay); }
.service-label { font-size: 11px; font-weight: 600; text-align: center; line-height: 1.15; }

.app-search {
  margin: 0 20px 14px; background: #fff;
  border-radius: 999px; padding: 6px 6px 6px 18px;
  display: flex; align-items: center; gap: 8px;
  height: 50px;
}
.app-search-text { flex: 1; font-size: 14px; color: #888; }
.app-search-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--viola-scalapay);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.app-search-btn svg { width: 18px; height: 18px; }

.app-toggle-online {
  background: #fff;
  border-radius: 999px;
  padding: 4px;
  display: flex;
  margin: 0 60px 16px;
  position: relative;
}
.toggle-pill {
  flex: 1;
  padding: 10px 0;
  text-align: center;
  font-size: 14px; font-weight: 600;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; border: none; background: transparent;
  font-family: inherit; color: var(--color-primary);
}
.toggle-pill.active { background: var(--viola-scalapay); color: #fff; }
.toggle-pill svg { width: 14px; height: 14px; }

.section-title {
  font-size: 22px; font-weight: 800;
  margin: 22px 20px 12px;
  letter-spacing: -0.4px;
  display: flex; justify-content: space-between; align-items: center;
}
.section-title-arrow {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #fff; border: 0.5px solid var(--color-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-primary);
}
.section-title-arrow svg { width: 18px; height: 18px; }

.brand-circles-row {
  display: flex; gap: 14px;
  overflow-x: auto;
  padding: 6px 20px 12px;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}
.brand-circles-row::-webkit-scrollbar { display: none; }
.brand-circle-wrap {
  flex: 0 0 auto; width: 76px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  scroll-snap-align: start;
  position: relative;
}
.brand-circle {
  width: 70px; height: 70px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
  letter-spacing: -0.3px;
  position: relative;
  overflow: hidden;
  text-align: center; line-height: 1;
}
.brand-circle.has-payment-badge::after {
  content: "";
  position: absolute;
  top: -2px; right: -2px;
  width: 24px; height: 24px;
  background: var(--rosa-app);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'%3E%3Crect x='4' y='4' width='16' height='10' rx='2' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3Crect x='4' y='7' width='16' height='2' fill='%23000'/%3E%3C/svg%3E");
  background-size: 14px;
  background-position: center;
  background-repeat: no-repeat;
}
.brand-circle-name {
  font-size: 12px; text-align: center;
  color: var(--color-secondary); line-height: 1.2;
  width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 500;
}

.tile-carousel {
  display: flex; gap: 10px;
  overflow-x: auto;
  padding: 0 20px 14px;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}
.tile-carousel::-webkit-scrollbar { display: none; }
.tile-card {
  flex: 0 0 auto;
  width: 220px;
  background: #fff;
  border-radius: 18px;
  padding: 0 0 12px;
  scroll-snap-align: start;
}
.tile-img {
  position: relative;
  width: 100%;
  aspect-ratio: 1.1;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 26px;
  letter-spacing: -0.5px; text-align: center;
}
.tile-name {
  font-size: 16px; font-weight: 700;
  margin: 12px 14px 0;
  letter-spacing: -0.3px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px;
}
.tile-heart {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--viola-soft);
  display: flex; align-items: center; justify-content: center;
  color: #888;
  flex-shrink: 0;
}

.discount-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--rosa-app);
  border-radius: 999px;
  padding: 5px 12px 5px 9px;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; gap: 5px;
  z-index: 1;
}
.discount-badge::before {
  content: "";
  width: 12px; height: 12px;
  background: #FFC1A8;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.59 1.41.59s1.05-.23 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.56-.23-1.06-.59-1.43z'/%3E%3Ccircle cx='6.5' cy='6.5' r='1.5' fill='white'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.59 1.41.59s1.05-.23 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.56-.23-1.06-.59-1.43z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.tile-payment-badge {
  position: absolute;
  bottom: 8px; right: 8px;
  width: 32px; height: 32px;
  background: var(--rosa-app);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.tile-payment-badge::before {
  content: "";
  width: 18px; height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'%3E%3Crect x='4' y='4' width='16' height='10' rx='2' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3Crect x='4' y='7' width='16' height='2' fill='%23000'/%3E%3C/svg%3E");
  background-size: contain; background-repeat: no-repeat;
}

.location-badge {
  position: absolute;
  bottom: 12px; left: 12px;
  background: #1A8A7E;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}
.location-badge::before {
  content: "";
  width: 16px; height: 16px;
  background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C8 2 5 5 5 9c0 5 7 13 7 13s7-8 7-13c0-4-3-7-7-7zm0 9.5a2.5 2.5 0 1 1 0-5 2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C8 2 5 5 5 9c0 5 7 13 7 13s7-8 7-13c0-4-3-7-7-7zm0 9.5a2.5 2.5 0 1 1 0-5 2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.codici-banner {
  margin: 8px 20px 0;
  background: linear-gradient(135deg, #FFE0D5 0%, #FFC1A8 100%);
  border-radius: 18px;
  padding: 18px 20px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px; position: relative; overflow: hidden;
}
.codici-banner-text { z-index: 1; }
.codici-banner-title {
  font-size: 22px; font-weight: 800;
  letter-spacing: -0.5px; margin-bottom: 4px; line-height: 1.1;
}
.codici-banner-sub {
  font-size: 13px; line-height: 1.35;
  color: var(--color-primary); font-weight: 500;
  max-width: 200px;
}
.codici-banner-arrow {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: var(--viola-scalapay);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}
.codici-banner-arrow svg { width: 22px; height: 22px; color: #fff; }

.banner-carousel-section { margin: 14px 0 22px; }
.banner-carousel {
  display: flex; gap: 12px;
  overflow-x: auto;
  padding: 0 20px;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}
.banner-carousel::-webkit-scrollbar { display: none; }
.banner-tile {
  flex: 0 0 92%;
  height: 130px;
  border-radius: 18px;
  scroll-snap-align: center;
  position: relative; overflow: hidden;
  display: flex; align-items: center;
  padding: 16px 20px;
  font-weight: 700;
}
.banner-dots {
  display: flex; justify-content: center; gap: 6px;
  margin-top: 8px;
}
.banner-dot { width: 6px; height: 6px; border-radius: 50%; background: #ccc; }
.banner-dot.active { background: var(--color-primary); width: 24px; border-radius: 999px; }

.cat-circles-row {
  display: flex; gap: 14px;
  overflow-x: auto;
  padding: 6px 20px 16px;
  scrollbar-width: none;
}
.cat-circles-row::-webkit-scrollbar { display: none; }
.cat-circle-wrap {
  flex: 0 0 auto; width: 110px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.cat-circle {
  width: 110px; height: 110px;
  border-radius: 50%;
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  text-align: center; color: #fff;
  font-size: 13px; font-weight: 700;
  padding: 8px; letter-spacing: -0.2px;
}

.exclusive-card {
  flex: 0 0 240px; height: 220px;
  border-radius: 18px;
  scroll-snap-align: start;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
  text-align: center; padding: 20px;
  color: #fff; position: relative;
}

.placeholder-screen {
  padding: 60px 24px; text-align: center;
  min-height: 600px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px;
}
.placeholder-screen .label { font-weight: 700; font-size: 22px; letter-spacing: -0.4px; }
.placeholder-screen .description {
  max-width: 240px; line-height: 1.55;
  color: var(--color-tertiary); font-size: 14px;
}

.brand-spotlight {
  position: absolute;
  border: 3px solid var(--color-accent);
  border-radius: 14px;
  pointer-events: none;
  animation: spotlightPulse 1.8s ease-in-out infinite;
  z-index: 5;
  display: none;
}
.brand-spotlight.show { display: block; }
.brand-spotlight.is-circle { border-radius: 50%; }
@keyframes spotlightPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.55); }
  50% { box-shadow: 0 0 0 12px rgba(255, 59, 48, 0); }
}

.spotlight-label {
  position: absolute;
  background: var(--color-accent); color: #fff;
  font-size: 11px; font-weight: 800;
  padding: 5px 10px; border-radius: 7px;
  pointer-events: none; z-index: 6;
  white-space: nowrap; letter-spacing: 0.4px;
  display: none; text-transform: uppercase;
}
.spotlight-label.show { display: block; }
.spotlight-label::after {
  content: ""; position: absolute;
  border: 6px solid transparent;
  left: 50%; transform: translateX(-50%);
}
.spotlight-label.tooltip-below::after { bottom: 100%; border-bottom-color: var(--color-accent); border-top: 0; }
.spotlight-label.tooltip-above::after { top: 100%; border-top-color: var(--color-accent); border-bottom: 0; }

.cat-tile-double-row {
  display: flex; gap: 10px;
  overflow-x: auto;
  padding: 0 20px 12px;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}
.cat-tile-double-row::-webkit-scrollbar { display: none; }
.cat-tile-large {
  flex: 0 0 calc(50% - 5px);
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  scroll-snap-align: start;
}
.cat-tile-large-img {
  aspect-ratio: 1.05;
  width: 100%;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 22px;
  letter-spacing: -0.5px; text-align: center;
  padding: 16px;
}
.cat-tile-large-name {
  padding: 12px 16px;
  font-size: 16px; font-weight: 700;
  letter-spacing: -0.3px;
  display: flex; justify-content: space-between; align-items: center;
}
