/* THEME_COLORS_REPLACE: plajă — cer, apă, nisip, verde tropical */
:root {
  --color-sky-top: #d8f2fc;
  --color-sky-mid: #7ecfe0;
  --color-ocean: #2a9d8f;
  --color-ocean-deep: #1d7a6e;
  --color-sand: #e8d4b5;
  --color-sand-light: #f3e6d4;
  --color-primary: #0f9b8e;
  --color-primary-dark: #0a6b62;
  --color-accent: #f4a261;
  --color-accent-soft: #ffe8d6;
  --color-warn: #e76f51;
  --color-text: #164036;
  --color-text-muted: #3d6b62;
  --color-card: #fffef9;
  --color-card-glass: rgba(255, 254, 249, 0.82);
  --color-scratch-cover: #7ec4b8;
  --shadow-soft: 0 8px 28px rgba(13, 92, 74, 0.2);
  --shadow-card: 0 6px 24px rgba(13, 92, 74, 0.14);
  --shadow-float: 0 16px 40px rgba(13, 92, 74, 0.22);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tap-size: min(100%, 52px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-ocean-deep);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* ── Fundal plajă ─────────────────────────────────────────── */
.beach-atmosphere {
  position: fixed;
  inset: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background: linear-gradient(
    180deg,
    var(--color-sky-top) 0%,
    var(--color-sky-mid) 38%,
    var(--color-ocean) 72%,
    var(--color-sand-light) 92%,
    var(--color-sand) 100%
  );
}

.beach-atmosphere__sun {
  position: absolute;
  top: min(6%, 48px);
  right: 6%;
  width: clamp(72px, 22vw, 110px);
  height: clamp(72px, 22vw, 110px);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff9e6 0%, #ffe08a 45%, rgba(255, 200, 100, 0.35) 62%, transparent 72%);
  box-shadow: 0 0 40px rgba(255, 220, 140, 0.55);
  animation: sunPulse 6s ease-in-out infinite alternate;
}

@keyframes sunPulse {
  from { transform: scale(1); opacity: 0.95; }
  to   { transform: scale(1.06); opacity: 1; }
}

.beach-atmosphere__wave {
  position: absolute;
  left: -15%;
  width: 130%;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.beach-atmosphere__wave--back  { bottom: 18%; opacity: 0.7; animation: waveShift 8s ease-in-out infinite; }
.beach-atmosphere__wave--front { bottom: 14%; height: 44px; opacity: 0.5; animation: waveShift 6s ease-in-out infinite reverse; }

@keyframes waveShift {
  0%, 100% { transform: translateX(0); }
  50%       { transform: translateX(4%); }
}

.beach-atmosphere__palm {
  position: absolute;
  bottom: -12px;
  width: clamp(100px, 32vw, 140px);
  height: auto;
  filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.12));
  opacity: 0.88;
}

.beach-atmosphere__palm--left  { left: -6%; transform: rotate(-4deg); }
.beach-atmosphere__palm--right { right: -6%; transform: scaleX(-1) rotate(-4deg); }

/* ── App shell ────────────────────────────────────────────── */
.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: 1rem 1.15rem calc(1.5rem + var(--safe-bottom));
  position: relative;
  z-index: 1;
}

/* ── Progress bar ─────────────────────────────────────────── */
.progress-bar-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.progress-bar-track {
  flex: 1;
  height: 7px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
  border-radius: 99px;
  transition: width 0.5s ease;
}

.progress-bar-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-text-muted);
  white-space: nowrap;
}

/* ── Screens ──────────────────────────────────────────────── */
.screen {
  display: none;
  min-height: calc(100dvh - 3rem - var(--safe-bottom));
  align-items: center;
  justify-content: center;
  text-align: center;
  animation: screenIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.screen.is-active { display: flex; }

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

.screen__inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
}

.screen__inner--puzzle { gap: 0.65rem; }

/* ── Typography ───────────────────────────────────────────── */
.screen__title {
  font-size: clamp(1.3rem, 5vw + 0.5rem, 1.8rem);
  font-weight: 800;
  line-height: 1.22;
  margin: 0;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.6);
}

.screen__title--q        { font-size: clamp(1.15rem, 4vw + 0.45rem, 1.5rem); }
.screen__title--small    { font-size: clamp(1rem, 3.5vw + 0.4rem, 1.2rem); font-weight: 700; }
.screen__title--celebrate {
  font-size: clamp(1.2rem, 4.5vw + 0.5rem, 1.7rem);
  color: var(--color-primary-dark);
}

.screen__subtitle {
  font-size: clamp(0.92rem, 3vw + 0.3rem, 1.08rem);
  color: var(--color-text-muted);
  line-height: 1.5;
  margin: 0;
  max-width: 24rem;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

/* ── Q-chip (screeen label) ───────────────────────────────── */
.q-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.9rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(15, 155, 142, 0.18);
  color: var(--color-primary-dark);
  border: 1.5px solid rgba(15, 155, 142, 0.3);
  backdrop-filter: blur(6px);
}

.q-chip--warn { background: rgba(231, 111, 81, 0.15); color: var(--color-warn); border-color: rgba(231, 111, 81, 0.3); }
.q-chip--glow { background: rgba(244, 162, 97, 0.2); color: #8a4810; border-color: rgba(244, 162, 97, 0.45); }

/* ── Intro screen specifics ───────────────────────────────── */
.screen--intro .screen__inner { gap: 1.25rem; }

.intro-bounce .screen__title    { animation: titlePop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.intro-bounce .screen__subtitle { animation: fadeUp 0.55s 0.15s ease both; }
.intro-bounce .intro-checklist  { animation: fadeUp 0.5s 0.28s ease both; }
.intro-bounce .btn              { animation: fadeUp 0.5s 0.42s ease both; }
.intro-bounce .intro-disclaimer { animation: fadeUp 0.4s 0.55s ease both; }

@keyframes titlePop {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

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

/* Floating hero emoji on each question screen */
.hero-emoji {
  font-size: 3.8rem;
  line-height: 1;
  display: block;
  animation: heroFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.15));
}

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

.intro-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  border-radius: 99px;
  background: linear-gradient(135deg, var(--color-ocean) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  box-shadow: var(--shadow-soft);
}

.intro-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
  max-width: 280px;
  text-align: left;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--color-card-glass);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.checklist-icon { font-size: 1.2rem; }

.intro-disclaimer {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin: 0;
  opacity: 0.75;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 1.02rem;
  padding: 1rem 1.5rem;
  min-height: var(--tap-size);
  border-radius: var(--radius-md);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  touch-action: manipulation;
  width: 100%;
  max-width: 290px;
}

.btn:active { transform: scale(0.96); }

.btn--large { padding: 1.1rem 1.75rem; font-size: 1.12rem; border-radius: var(--radius-lg); max-width: 320px; }

.btn--primary {
  background: linear-gradient(170deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  box-shadow: var(--shadow-soft), 0 2px 0 rgba(0, 0, 0, 0.1);
}
.btn--primary:hover { filter: brightness(1.06); }

.btn--secondary {
  background: var(--color-card);
  color: var(--color-primary-dark);
  border: 2.5px solid var(--color-primary);
  box-shadow: var(--shadow-card);
}

a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
a.btn--primary  { color: #fff; }
a.btn--secondary{ color: var(--color-primary-dark); }

/* ── Choice cards ─────────────────────────────────────────── */
.choices {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  width: 100%;
  max-width: 340px;
}

.btn--choice {
  background: var(--color-card-glass);
  color: var(--color-text);
  border: 2px solid rgba(15, 155, 142, 0.25);
  box-shadow: var(--shadow-card);
  max-width: 100%;
  backdrop-filter: blur(8px);
}
.btn--choice:hover { border-color: var(--color-primary); }

.choice-card {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.75rem;
  text-align: left;
  padding: 0.85rem 1rem;
  min-height: 62px;
}

.choice-emoji {
  grid-row: 1 / 3;
  align-self: center;
  font-size: 1.7rem;
  line-height: 1;
}

.choice-label { font-size: 0.97rem; font-weight: 700; line-height: 1.2; }
.choice-sub   { font-size: 0.78rem; color: var(--color-text-muted); font-weight: 500; margin-top: 0.1rem; }

.btn--choice.is-pressed { animation: choicePop 0.35s ease; }

@keyframes choicePop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* ── Scale row (Q3b 1–10) ─────────────────────────────────── */
.scale-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  max-width: 320px;
}

.btn--scale {
  width: 48px;
  min-height: 48px;
  padding: 0.4rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  max-width: 48px;
  background: var(--color-card-glass);
  color: var(--color-text);
  border: 2px solid rgba(15, 155, 142, 0.25);
  box-shadow: 0 2px 6px rgba(0,0,0,0.07);
  backdrop-filter: blur(6px);
  transition: background 0.15s, transform 0.12s, box-shadow 0.12s;
}

.btn--scale:hover, .btn--scale.is-selected {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary-dark);
  box-shadow: var(--shadow-soft);
  transform: scale(1.1);
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 320px;
  font-size: 0.72rem;
  color: var(--color-text-muted);
  font-weight: 600;
  margin: 0;
  padding: 0 0.25rem;
}

/* ── Escape zone (Da fuge) ───────────────────────────────── */
.escape-zone {
  position: relative;
  width: 100%;
  max-width: 340px;
  height: 200px;
  margin-top: 0.25rem;
  border-radius: var(--radius-lg);
  background: var(--color-card-glass);
  border: 2px dashed rgba(15, 155, 142, 0.4);
  backdrop-filter: blur(8px);
}

.escape-zone__yes,
.escape-zone__no {
  position: absolute;
  width: auto;
  min-width: 110px;
  max-width: 135px;
  padding-left: 1.1rem;
  padding-right: 1.1rem;
}

.escape-zone__yes {
  left: 24px;
  top: 42px;
  z-index: 2;
  transition: left 0.2s cubic-bezier(0.22,1,0.36,1), top 0.2s cubic-bezier(0.22,1,0.36,1);
  will-change: left, top;
}

.escape-zone__no {
  right: 24px;
  bottom: 42px;
  z-index: 1;
}

.escape-hint {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin: 0;
  font-style: italic;
  opacity: 0.8;
}

.hint {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-warn);
}

.hint--soft { animation: wiggle 0.5s ease; }

@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  25%       { transform: rotate(-2.5deg); }
  75%       { transform: rotate(2.5deg); }
}

/* ── Result card ──────────────────────────────────────────── */
.result-card {
  background: var(--color-card-glass);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.25rem;
  width: 100%;
  max-width: 340px;
  box-shadow: var(--shadow-float);
  border: 2px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  text-align: center;
}

.result-card__emoji {
  font-size: 3.2rem;
  line-height: 1;
  margin-bottom: 0.5rem;
  display: block;
  animation: resultBounce 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes resultBounce {
  from { transform: scale(0.4) rotate(-15deg); opacity: 0; }
  to   { transform: scale(1) rotate(0); opacity: 1; }
}

.result-card__badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  border-radius: 99px;
  padding: 0.2rem 0.75rem;
  margin-bottom: 0.4rem;
}

.result-card__title {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 0.4rem;
  color: var(--color-primary-dark);
}

.result-card__desc {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin: 0 0 1.1rem;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  border-top: 1.5px solid rgba(15, 155, 142, 0.2);
  padding-top: 1rem;
}

.result-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.result-stat__value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-primary-dark);
}

.result-stat__label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Scratch / puzzle ─────────────────────────────────────── */
.scratch-wrap {
  position: relative;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-float);
  touch-action: none;
}

.scratch-wrap--voucher {
  aspect-ratio: 2 / 3;
  max-width: min(270px, 86vw);
  background: #0c3d36;
}

.scratch-under {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0c3d36;
}

.scratch-voucher-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.scratch-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

.puzzle-hint {
  margin: 0;
  font-size: 0.92rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.progress-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--color-card-glass);
  border-radius: 99px;
  padding: 0.45rem 1rem;
  font-size: 0.88rem;
  color: var(--color-text);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  border: 1.5px solid rgba(15, 155, 142, 0.25);
}

/* ── Final screen ─────────────────────────────────────────── */
.screen--final .screen__inner {
  position: relative;
  z-index: 2;
  gap: 1rem;
}

.final-hero-badge {
  font-size: 3.5rem;
  line-height: 1;
  animation: heroPop 0.8s cubic-bezier(0.34, 1.6, 0.64, 1) both;
}

@keyframes heroPop {
  from { transform: scale(0.3) rotate(-20deg); opacity: 0; }
  to   { transform: scale(1) rotate(0); opacity: 1; }
}

/* Final voucher card */
.final-voucher-card {
  width: 100%;
  max-width: 320px;
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, #0e5c52 0%, #0a3d36 100%);
  color: #fff;
  padding: 1.25rem 1.25rem 1.1rem;
  box-shadow: var(--shadow-float), 0 0 0 3px rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
}

.final-voucher-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Ccircle cx='30' cy='30' r='28' stroke='rgba(255,255,255,0.05)' stroke-width='1'/%3E%3C/g%3E%3C/svg%3E") repeat;
  opacity: 0.6;
  pointer-events: none;
}

.final-voucher-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.final-voucher-card__waves {
  font-size: 0.9rem;
  opacity: 0.7;
}

.final-voucher-card__logo {
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: #fff;
  text-align: center;
  flex: 1;
}

.final-voucher-card__sublabel {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  margin-bottom: 0.3rem;
}

.final-voucher-card__tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 99px;
  padding: 0.2rem 0.6rem;
}

.final-voucher-card__footer {
  margin-top: 0.75rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
}

.final-voucher-card__amount {
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.final-voucher-card__details {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 0.65rem;
}

.voucher-detail {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.voucher-detail__label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  flex-shrink: 0;
}

.voucher-detail__value {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  text-align: right;
}

.voucher-code {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  font-family: monospace;
  word-break: break-all;
}

.final-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
  max-width: 320px;
  align-items: center;
}

.final-note {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin: 0;
  font-style: italic;
}

/* ── Confetti ─────────────────────────────────────────────── */
.confetti-root {
  position: fixed;
  inset: 0;
  max-width: 480px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -12px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
  opacity: 0.92;
}

@keyframes confettiFall {
  to { transform: translateY(110vh) rotate(720deg); }
}

/* ── Toast ────────────────────────────────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.5rem + var(--safe-bottom));
  transform: translateX(-50%) translateY(20px);
  max-width: calc(100% - 2rem);
  padding: 0.8rem 1.2rem;
  background: rgba(22, 64, 54, 0.95);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
  text-align: center;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Modal ────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.modal[hidden] { display: none !important; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 60, 55, 0.5);
  backdrop-filter: blur(6px);
}

.modal__panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 88dvh;
  overflow-y: auto;
  background: var(--color-card);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 1.25rem 1.25rem calc(1.75rem + var(--safe-bottom));
  animation: modalUp 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
  z-index: 1;
}

@keyframes modalUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

/* ── Mute button ──────────────────────────────────────────────────── */
.btn-mute {
  position: fixed;
  top: max(0.8rem, env(safe-area-inset-top, 0.8rem));
  right: 0.9rem;
  z-index: 300;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 254, 249, 0.82);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(0,0,0,0.15);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn-mute:active { transform: scale(0.9); }
.btn-mute.is-muted { opacity: 0.55; }

.modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 44px;
  height: 44px;
  border: none;
  background: var(--color-sky-top);
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text);
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal__title {
  margin: 0 2rem 1rem 0;
  font-size: 1.15rem;
  color: var(--color-primary-dark);
  font-weight: 800;
}

.voucher-frame {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #0c3d36;
  box-shadow: var(--shadow-card);
}

.voucher-modal-img {
  display: block;
  width: 100%;
  height: auto;
}

.modal__download { margin-top: 1rem; }

.modal-message {
  background: linear-gradient(135deg, rgba(15, 155, 142, 0.08) 0%, rgba(42, 157, 143, 0.05) 100%);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-primary);
  padding: 0.85rem 1rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.modal-message p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--color-text);
  line-height: 1.6;
}

.modal__note {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.screen--final .btn--download { margin-top: 0; }

/* ── Desktop adjustment ───────────────────────────────────── */
@media (min-width: 480px) {
  .modal { align-items: center; padding: 1rem; }
  .modal__panel { border-radius: var(--radius-lg); padding: 1.5rem; }
}

/* ── Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .escape-zone__yes { transition: none; }
  .beach-atmosphere__sun,
  .beach-atmosphere__wave--back,
  .beach-atmosphere__wave--front { animation: none !important; }
}
