:root { color-scheme: light; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  background: oklch(93% 0.02 45);
}

body {
  font-family: 'Nunito', system-ui, sans-serif;
}

button, textarea {
  font: inherit;
}

button:focus, textarea:focus {
  outline: none;
}

@keyframes vwSlide {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes vwConfettiFall {
  0% { transform: translateY(-30px) rotate(0deg); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translateY(480px) rotate(340deg); opacity: 0; }
}

.vw-app {
  --accent: #D2596B;
  max-width: 480px;
  margin: 0 auto;
  /* A fixed viewport height (not min-height) is what makes .vw-content's
     flex:1 + overflow-y:auto below actually scroll internally instead of
     the whole card growing past the viewport and pushing .vw-nextbar off
     the bottom. dvh tracks the real visible viewport on mobile browsers,
     where vh overshoots under the address/toolbar chrome; vh stays as the
     fallback for browsers without dvh support. */
  height: 100vh;
  height: 100dvh;
  background: oklch(97% 0.012 50);
  box-shadow: 0 30px 60px -30px oklch(30% 0.02 40 / 0.3);
  display: flex;
  flex-direction: column;
  font-family: 'Nunito', system-ui, sans-serif;
  color: oklch(26% 0.03 30);
  position: relative;
  overflow: hidden;
}

.vw-header {
  flex-shrink: 0;
  padding: 18px 24px 0;
  display: flex;
  justify-content: center;
}

.vw-logo {
  height: 24px;
  width: auto;
  object-fit: contain;
}

.vw-topbar {
  flex-shrink: 0;
  padding: 20px 24px 0;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 34px;
}

.vw-dots {
  display: flex;
  gap: 8px;
  flex: 1;
  justify-content: center;
}

.vw-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: oklch(88% 0.02 45);
  transition: background .2s;
}

.vw-dot.is-active {
  background: var(--accent);
}

.vw-bar-track {
  flex: 1;
  height: 8px;
  background: oklch(89% 0.02 45);
  border-radius: 6px;
  overflow: hidden;
}

.vw-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 6px;
  transition: width .3s ease;
}

.vw-content {
  flex: 1;
  /* Flex items default to min-height:auto, which refuses to shrink below
     content size and defeats overflow — this override is what lets the
     column actually compress and hand its excess to the scrollbar instead
     of growing .vw-app past the viewport. */
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 28px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.vw-screen {
  animation: vwSlide .45s ease both;
}

.vw-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  margin: 0;
}

.vw-sub {
  font-size: 16px;
  line-height: 1.6;
  color: oklch(45% 0.025 35);
  margin: 0;
}

.vw-note {
  font-size: 13px;
  color: oklch(55% 0.02 35);
  margin-top: 8px;
  font-weight: 700;
}

.vw-hero-img {
  height: 170px;
  width: 100%;
  border-radius: 24px;
  object-fit: cover;
  display: block;
}

.vw-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.vw-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  background: oklch(94% 0.015 45);
  color: oklch(28% 0.03 30);
  border: 2px solid oklch(87% 0.02 45);
  border-radius: 18px;
  padding: 13px 18px;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  font-size: 15.5px;
  cursor: pointer;
  transform: scale(1);
  transition: all .15s ease;
}

.vw-chip.is-selected {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 800;
  transform: scale(1.03);
  box-shadow: 0 6px 14px -6px var(--accent);
}

.vw-ticker-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  color: oklch(45% 0.02 35);
}

.vw-ticker-track {
  position: relative;
  height: 6px;
  background: oklch(89% 0.02 45);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  touch-action: none;
  margin: 0 4px;
}

.vw-ticker-fill {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 6px;
  border-radius: 3px;
  background: var(--accent);
  transition: width .15s ease;
}

.vw-ticker-stop {
  border-radius: 50%;
  transition: all .15s ease;
  cursor: pointer;
  flex-shrink: 0;
}

.vw-scenario-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vw-scenario-scrim {
  position: absolute;
  inset: 0;
  background-color: #000000B9;
}

.vw-scenario-brand {
  position: absolute;
  left: 0;
  right: 0;
  top: 42%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.45));
}

.vw-scenario-logo {
  height: 30px;
  width: auto;
  object-fit: contain;
}

.vw-scenario-remaining {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 6px 14px;
}

.vw-scenario-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 110px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 26px;
}

.vw-scenario-line {
  font-size: 14.5px;
  line-height: 1.55;
  color: oklch(96% 0.01 50);
  font-weight: 600;
}

.vw-scenario-cta {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 26px;
}

.vw-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 18px;
  padding: 17px;
  font-weight: 800;
  font-size: 17px;
  font-family: 'Nunito', sans-serif;
  width: 100%;
  cursor: pointer;
  transition: all .15s ease;
  text-decoration: none;
}

.vw-btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px -8px var(--accent);
}

.vw-btn--primary.is-disabled {
  background: oklch(88% 0.015 45);
  color: oklch(60% 0.02 40);
  cursor: not-allowed;
  box-shadow: none;
}

.vw-nextbar {
  flex-shrink: 0;
  padding: 14px 24px calc(26px + env(safe-area-inset-bottom, 0px));
  background: oklch(97% 0.012 50);
  box-shadow: 0 -8px 16px -12px oklch(30% 0.02 40 / 0.25);
  position: relative;
  z-index: 1;
}

.vw-nextbar-row {
  display: flex;
  gap: 12px;
}

.vw-validation-msg {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  color: var(--accent);
  font-weight: 700;
  font-size: 13.5px;
  text-align: center;
  transition: opacity .2s ease, max-height .2s ease, margin .2s ease;
}
.vw-validation-msg.is-visible {
  max-height: 24px;
  opacity: 1;
  margin-bottom: 8px;
}

@keyframes vwShake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}
.vw-btn.is-shaking {
  animation: vwShake .4s ease;
}

/* .vw-btn defaults to width:100% for its usual full-width, standalone use;
   override to flex:1 here so it shares the row with .vw-back-footer
   instead of trying to fill the whole row on its own. */
.vw-nextbar-row .vw-btn {
  flex: 1;
  width: auto;
}

.vw-back-footer {
  flex-shrink: 0;
  width: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid oklch(87% 0.02 45);
  border-radius: 18px;
  background: #fff;
  color: oklch(28% 0.03 30);
  font-size: 20px;
  cursor: pointer;
  transition: background .15s ease;
}
.vw-back-footer:active {
  background: oklch(92% 0.015 45);
}

.vw-textarea {
  margin-top: 6px;
  border: 2px solid oklch(89% 0.02 45);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 15px;
  color: oklch(28% 0.03 30);
  background: #fff;
  resize: none;
  min-height: 70px;
  font-family: 'Nunito', sans-serif;
  width: 100%;
}

.vw-confetti-piece {
  position: absolute;
  top: -20px;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  animation-name: vwConfettiFall;
  animation-timing-function: ease-in;
  animation-iteration-count: infinite;
}

.vw-volunteer-card {
  position: relative;
  width: 100%;
  background: oklch(96% 0.015 45);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
  margin-top: 6px;
}

.vw-volunteer-question {
  font-size: 15.5px;
  font-weight: 700;
  color: oklch(30% 0.03 30);
  line-height: 1.4;
}

.vw-volunteer-optional {
  font-size: 12px;
  color: oklch(55% 0.02 35);
  margin-top: 4px;
}

.vw-volunteer-thanks {
  font-size: 15px;
  font-weight: 700;
  color: oklch(30% 0.03 30);
}

.vw-volunteer-phone-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vw-chip.is-on-card:not(.is-selected) {
  background: #fff;
}

.vw-share {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.vw-share-label {
  font-size: 13px;
  font-weight: 700;
  color: oklch(50% 0.02 35);
}

.vw-share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.vw-btn--outline {
  background: #fff;
  color: oklch(28% 0.03 30);
  border: 2px solid oklch(87% 0.02 45);
  border-radius: 16px;
  padding: 13px 16px;
  font-weight: 700;
  font-size: 15px;
  flex: 1 1 auto;
  min-width: 120px;
  width: auto;
}

.vw-btn--whatsapp {
  background: #2FAE60;
  color: #fff;
  border: 2px solid #2FAE60;
  border-radius: 16px;
  padding: 13px 16px;
  font-weight: 800;
  font-size: 15px;
  flex: 1 1 auto;
  min-width: 120px;
  width: auto;
}

@media (max-width: 480px) {
  .vw-app {
    box-shadow: none;
  }
}
