/* ─────────────────────────────────────────────────────────────
   El Árbol de Victoria — styles
   Look: flat, textured "Vienna tree" illustration on warm paper.
   Layout: one non-scrolling app screen (tree in the middle),
           calendar as a bottom sheet, content as a flipping postcard.
   ───────────────────────────────────────────────────────────── */
:root {
  --paper: #f4ead9;
  --paper-2: #ebdcc3;
  --ink: #2b2420;
  --ink-soft: #6a5a4e;
  --red: #d14836;
  --red-d: #a9352a;
  --green: #3b6e50;
  --green-d: #23452f;
  --gold: #e6ae45;
  --gold-d: #bf8a2c;
  --teal: #7db7ad;
  --cream: #fbf5ea;

  --script: 'Dancing Script', 'Snell Roundhand', 'Brush Script MT', cursive;
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --caps: 'Oswald', 'Arial Narrow', 'Helvetica Neue', sans-serif;

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.5;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-user-select: none; user-select: none;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold-d); outline-offset: 3px; }

.script { font-family: var(--script); font-weight: 700; }
.caps {
  font-family: var(--caps); font-weight: 500; text-transform: uppercase;
  letter-spacing: .14em; font-size: .72rem; margin: 0;
}

/* paper grain over everything */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .22; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35  0 0 0 0 .28  0 0 0 0 .2  0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  border: 0; border-radius: 999px; padding: .85rem 1.6rem;
  font-family: var(--caps); font-weight: 500; letter-spacing: .1em; text-transform: uppercase; font-size: .85rem;
  text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, background .2s;
}
.btn:active { transform: scale(.96); }
.btn--gold { background: var(--gold); color: var(--ink); box-shadow: 0 4px 0 var(--gold-d); }
.btn--red  { background: var(--red); color: var(--cream); box-shadow: 0 4px 0 var(--red-d); }
.btn--link { background: none; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 4px; padding: .5rem 1rem; }
.btn--light { color: var(--cream); }
.btn--big { width: 100%; padding: 1rem 1.2rem; }
.btn__label { font-size: 1rem; }
.btn__sub { font-family: var(--serif); text-transform: none; letter-spacing: 0; font-size: .82rem; opacity: .85; font-style: italic; }
.btn[disabled] { opacity: .5; }
.is-calling { animation: call 2.4s ease-in-out infinite; }
@keyframes call { 0%,100% { box-shadow: 0 4px 0 var(--red-d), 0 0 0 0 rgba(209,72,54,.0); } 50% { box-shadow: 0 4px 0 var(--red-d), 0 0 0 10px rgba(209,72,54,.14); } }

.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: rgba(255,255,255,.55); color: var(--ink); font-family: var(--caps); font-size: 1.05rem;
}

/* ── Loader ─────────────────────────────────────────────── */
.loader {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  background: var(--green-d); color: var(--cream);
  padding: calc(var(--safe-t) + 24px) max(24px, var(--safe-r)) calc(var(--safe-b) + 24px) max(24px, var(--safe-l));
  transition: opacity .9s ease, transform 1.1s cubic-bezier(.6,0,.2,1);
}
.loader.is-leaving { opacity: 0; transform: scale(1.6); pointer-events: none; }
.loader__inner { text-align: center; display: grid; justify-items: center; gap: .6rem; max-width: 22rem; }
.loader__sketch { width: min(46vw, 190px); height: auto; overflow: visible; }
.loader__sketch .ink {
  fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 2.6s cubic-bezier(.5,0,.3,1) forwards;
}
.loader__sketch .ink:nth-child(1) { animation-delay: 0s; }
.loader__sketch .ink:nth-child(3) { animation-delay: 1.6s; }
.loader__sketch .ink:nth-child(5) { animation-delay: 1.9s; }
.loader__sketch .star { animation-delay: 2.1s; fill: var(--gold); fill-opacity: 0; animation: draw 1s ease forwards 2.1s, starfill .6s ease forwards 2.9s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes starfill { to { fill-opacity: 1; } }
.loader__eyebrow { font-family: var(--caps); text-transform: uppercase; letter-spacing: .18em; font-size: .7rem; opacity: .75; margin: .8rem 0 0; }
.loader__title { font-family: var(--script); font-weight: 700; font-size: clamp(2.6rem, 12vw, 4rem); line-height: .95; margin: 0; color: #f6d9a8; }
.loader__actions { display: grid; gap: .4rem; margin-top: 1.2rem; animation: rise .6s ease both; }
.loader__actions .btn--link { color: rgba(251,245,234,.7); }
.loader__count {
  position: absolute; right: max(20px, var(--safe-r)); bottom: calc(var(--safe-b) + 8px);
  font-family: var(--serif); font-weight: 400; font-size: clamp(4rem, 22vw, 9rem); line-height: 1;
  color: var(--cream); opacity: .9; font-variant-numeric: tabular-nums; transition: opacity .5s;
}
.loader.is-ready .loader__count { opacity: 0; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* ── App screen ─────────────────────────────────────────── */
.app {
  position: fixed; inset: 0; display: grid; grid-template-rows: auto 1fr auto;
  padding: calc(var(--safe-t) + 10px) max(16px, var(--safe-r)) calc(var(--safe-b) + 14px) max(16px, var(--safe-l));
  animation: appIn 1.2s ease both;
}
@keyframes appIn { from { opacity: 0; transform: scale(.94); } }

.garland { position: absolute; top: var(--safe-t); left: 0; width: 100%; height: 40px; z-index: 1; }
.garland-bulbs { position: absolute; top: var(--safe-t); left: 0; width: 100%; height: 40px; z-index: 2; pointer-events: none; }
.garland-bulbs i {
  position: absolute; width: 9px; height: 13px; margin-left: -4.5px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: var(--c); box-shadow: 0 0 10px var(--c); animation: twinkle 2.2s ease-in-out infinite;
}
.garland-bulbs i::before { content: ''; position: absolute; top: -3px; left: 2.5px; width: 4px; height: 4px; background: #5a4a3e; border-radius: 1px; }
@keyframes twinkle { 50% { opacity: .45; box-shadow: 0 0 2px var(--c); } }

.topbar { position: relative; z-index: 3; display: grid; grid-template-columns: 42px 1fr 42px; align-items: start; gap: 8px; padding-top: 22px; }
.topbar__title { text-align: center; }
.topbar h1 { margin: 0; font-size: clamp(1.7rem, 8vw, 2.8rem); white-space: nowrap; line-height: 1.05; color: var(--red); }
.topbar .caps { color: var(--ink-soft); margin-top: .25rem; }

.snow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.stage { position: relative; z-index: 2; min-height: 0; }
.stage canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.stage canvas:active { cursor: grabbing; }
.stage__hint {
  position: absolute; left: 0; right: 0; bottom: 0; text-align: center; margin: 0;
  font-style: italic; font-size: .85rem; color: var(--ink-soft); transition: opacity 1s;
}
.stage__hint.is-faded { opacity: 0; }

.dock { position: relative; z-index: 3; display: grid; gap: 10px; justify-items: center; width: min(100%, 420px); margin: 0 auto; }
.countdown-chip {
  font-family: var(--caps); text-transform: uppercase; letter-spacing: .12em; font-size: .72rem;
  background: var(--cream); border-radius: 999px; padding: .45rem 1rem; color: var(--ink-soft);
  box-shadow: 0 2px 0 var(--paper-2);
}
.countdown-chip b { font-family: var(--serif); font-size: 1rem; color: var(--red); letter-spacing: 0; }

/* ── Calendar sheet ─────────────────────────────────────── */
.sheet {
  position: fixed; inset: 0; z-index: 20; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--paper);
  padding: calc(var(--safe-t) + 14px) max(14px, var(--safe-r)) calc(var(--safe-b) + 24px) max(14px, var(--safe-l));
  transform: translateY(100%); transition: transform .45s cubic-bezier(.3,.8,.2,1);
}
.sheet.is-open { transform: none; }
.sheet__head { display: flex; justify-content: space-between; align-items: center; max-width: 720px; margin: 0 auto 10px; }
.sheet__head h2 { margin: 0; color: var(--red); font-size: 2.2rem; }

.grid {
  --gap: 8px; --cols: 4;
  --w: min(100vw - 28px - var(--safe-l) - var(--safe-r), 720px);
  display: grid; grid-template-columns: repeat(var(--cols), 1fr);
  grid-auto-rows: calc((var(--w) - (var(--cols) - 1) * var(--gap)) / var(--cols));
  grid-auto-flow: dense; gap: var(--gap); max-width: 720px; margin: 0 auto;
}
@media (min-width: 700px) { .grid { --cols: 6; } }

.tile {
  position: relative; border: 0; padding: 0; border-radius: 6px; perspective: 600px;
  background: #2b1f18; overflow: visible;
}
.tile--big   { grid-column: span 2; grid-row: span 2; }
.tile--wide  { grid-column: span 2; }
.tile--tall  { grid-row: span 2; }
.tile--eve   { grid-column: span 2; }
.tile--final { grid-column: 1 / -1; grid-row: span 2; }

.tile__inside {
  position: absolute; inset: 0; border-radius: 6px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 45%, #ffe3a3 0%, #e6ae45 35%, #7a4c32 100%);
}
.tile__inside img { width: 62%; max-width: 110px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); }

.tile__door {
  position: absolute; inset: 0; border-radius: 6px; display: grid; place-items: center; align-content: center;
  transform-origin: left center; transition: transform .7s cubic-bezier(.5,0,.2,1); backface-visibility: hidden;
  background: var(--bg); color: var(--fg); overflow: hidden;
}
/* flat illustrated details on the doors */
.tile__door::before {
  content: ''; position: absolute; inset: 6px; border-radius: 3px; border: 1.5px dashed var(--line);
}
.tile__door::after {
  content: ''; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.6px);
  background-size: 14px 14px; mask-image: linear-gradient(160deg, #000 0%, transparent 55%);
  -webkit-mask-image: linear-gradient(160deg, #000 0%, transparent 55%);
}
.tile--red   { --bg: var(--red);   --fg: var(--cream); --line: rgba(255,240,220,.45); --dot: rgba(255,240,220,.5); }
.tile--green { --bg: var(--green); --fg: var(--cream); --line: rgba(255,240,220,.35); --dot: rgba(255,240,220,.4); }
.tile--cream { --bg: var(--cream); --fg: var(--red);   --line: rgba(209,72,54,.35);   --dot: rgba(59,110,80,.35); }
.tile--gold  { --bg: var(--gold);  --fg: var(--ink);   --line: rgba(43,36,32,.3);     --dot: rgba(255,255,255,.55); }
.tile--teal  { --bg: var(--teal);  --fg: var(--ink);   --line: rgba(43,36,32,.25);    --dot: rgba(255,255,255,.6); }
.tile--eve   { --bg: var(--red-d); --fg: #f6d9a8; --line: rgba(230,174,69,.55); --dot: rgba(230,174,69,.35); }
.tile--final { --bg: var(--green-d); --fg: #f6d9a8; --line: rgba(230,174,69,.55); --dot: rgba(230,174,69,.4); }

.tile__num { position: relative; z-index: 1; font-family: var(--serif); font-weight: 600; font-size: clamp(1.5rem, 7vw, 2.2rem); line-height: 1; }
.tile--big .tile__num { font-size: clamp(3rem, 15vw, 4.6rem); }
.tile--final .tile__num { font-size: 4.2rem; }
.tile--eve .tile__num { font-size: 2.4rem; }
.tile__label { position: relative; z-index: 1; font-family: var(--script); font-size: 1.4rem; line-height: 1.1; }
.tile--final .tile__label { font-size: 2rem; }
.tile__knob { position: absolute; right: 12%; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--fg); opacity: .6; }
.tile__lock { position: absolute; bottom: 9px; left: 50%; width: 10px; height: 8px; margin-left: -5px; border-radius: 2px; background: var(--fg); opacity: .4; }
.tile__lock::before { content: ''; position: absolute; left: 2px; top: -5px; width: 6px; height: 6px; border: 1.5px solid var(--fg); border-bottom: 0; border-radius: 4px 4px 0 0; box-sizing: border-box; }

.tile.is-locked .tile__door { filter: saturate(.75); }
.tile.is-today .tile__door { box-shadow: inset 0 0 0 3px var(--gold), 0 0 0 0 rgba(230,174,69,.6); animation: todayGlow 1.8s ease-in-out infinite; }
@keyframes todayGlow { 50% { box-shadow: inset 0 0 0 3px var(--gold), 0 0 0 8px rgba(230,174,69,0); } }
.tile.is-opened .tile__door { transform: rotateY(-62deg); box-shadow: 6px 0 10px rgba(0,0,0,.2); }
.tile.is-opening .tile__door { transform: rotateY(-105deg); }
.tile.is-shaking { animation: shake .5s ease; }
@keyframes shake { 20% { transform: rotate(-4deg); } 40% { transform: rotate(4deg); } 60% { transform: rotate(-2.5deg); } 80% { transform: rotate(1.5deg); } }

/* ── Postcard modal ─────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; align-content: center; gap: 14px;
  padding: calc(var(--safe-t) + 16px) max(16px, var(--safe-r)) calc(var(--safe-b) + 16px) max(16px, var(--safe-l));
  opacity: 0; transition: opacity .35s;
}
.modal.is-open { opacity: 1; }
.modal__scrim { position: absolute; inset: 0; background: rgba(35,25,18,.72); }
.modal__actions { position: relative; display: flex; gap: 8px; align-items: center; }

.card3d {
  position: relative; width: min(88vw, 380px); height: min(72vh, 600px); perspective: 1400px;
  transform: translateY(30px) scale(.9); transition: transform .5s cubic-bezier(.2,.9,.3,1.2);
}
.modal.is-open .card3d { transform: none; }
.card3d__inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.5,0,.2,1); }
.card3d.is-flipped .card3d__inner { transform: rotateY(180deg); }
.card3d__face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 14px; background: var(--cream); padding: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.card3d__back { transform: rotateY(180deg); }

.pc-front {
  position: relative; height: 100%; border-radius: 8px; overflow: hidden;
  background: var(--card); color: var(--cream);
  display: grid; justify-items: center; align-content: center; gap: .3rem; text-align: center; padding: 1.5rem;
}
.pc-front::before { /* soft hills at the bottom, Vienna-ish */
  content: ''; position: absolute; left: -10%; right: -10%; bottom: -30%; height: 55%;
  background: radial-gradient(ellipse at 30% 0%, var(--cream) 0 40%, transparent 41%),
              radial-gradient(ellipse at 80% 10%, #efe4d1 0 42%, transparent 43%);
  opacity: .95;
}
.pc-front > * { position: relative; }
.pc-stamp {
  position: absolute; top: 14px; right: 14px; width: 54px; height: 64px; display: grid; place-items: center;
  background: var(--cream); color: var(--card-d); font-family: var(--serif); font-weight: 600; font-size: 1.4rem;
  outline: 3px dotted var(--cream); outline-offset: 1px; transform: rotate(4deg);
  box-shadow: inset 0 0 0 4px var(--cream), inset 0 0 0 5.5px var(--card);
}
.pc-orn { width: 46%; max-width: 170px; filter: drop-shadow(0 10px 14px rgba(0,0,0,.25)); animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px) rotate(2deg); } }
.pc-day { font-size: 2.6rem; margin: .4rem 0 0; line-height: 1; }
.pc-title { font-family: var(--serif); font-weight: 400; font-style: italic; font-size: 1.2rem; margin: 0; max-width: 18em; text-wrap: balance; }
.pc-hint { position: absolute; bottom: 16px; color: var(--ink-soft); }

.pc-back { height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 1.2rem 1rem 1.4rem; position: relative; user-select: text; -webkit-user-select: text; }
.pc-flip { position: absolute; top: 4px; right: 4px; border: 0; background: none; font-size: 1.2rem; color: var(--ink-soft); padding: 8px; }
.pc-kicker { color: var(--red); }
.pc-h { font-family: var(--serif); font-weight: 600; font-size: 1.45rem; line-height: 1.2; margin: .3rem 0 1rem; text-wrap: balance; }
.pc-text p, .letter p { margin: 0 0 .9em; }
.pc-caption { font-style: italic; color: var(--ink-soft); font-size: .92rem; text-align: center; }
.placeholder { border: 2px dashed var(--paper-2); border-radius: 10px; padding: 2.5rem 1rem; text-align: center; color: var(--ink-soft); }

.letter { background: repeating-linear-gradient(transparent 0 27px, rgba(125,183,173,.28) 27px 28px); line-height: 28px; font-size: 1.02rem; }
.letter__hi { font-size: 1.8rem; color: var(--red); margin-bottom: .4em !important; }
.letter__sig { font-size: 1.7rem; color: var(--red); text-align: right; }

.polaroids { display: grid; gap: 18px; justify-items: center; }
.polaroid { margin: 0; background: #fff; padding: 10px 10px 4px; box-shadow: 0 6px 16px rgba(0,0,0,.15); width: 92%; }
.polaroid:nth-child(odd) { transform: rotate(-2deg); } .polaroid:nth-child(even) { transform: rotate(2deg); }
.polaroid img { width: 100%; display: block; aspect-ratio: 1; object-fit: cover; }
.polaroid figcaption { text-align: center; font-size: 1.3rem; padding: 4px 0 2px; color: var(--ink); }
.polaroid--empty > div { aspect-ratio: 1; display: grid; place-items: center; text-align: center; background: var(--paper); color: var(--ink-soft); }
.pc-video { width: 100%; border-radius: 8px; background: #000; }

.voice { display: flex; align-items: center; gap: 12px; background: var(--paper); border-radius: 999px; padding: 10px 16px 10px 10px; }
.voice__play { flex: none; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--red); display: grid; place-items: center; }
.voice__play span { width: 0; height: 0; border-left: 16px solid var(--cream); border-top: 10px solid transparent; border-bottom: 10px solid transparent; margin-left: 4px; }
.voice__play.is-playing span { width: 14px; height: 18px; border: 0; margin: 0; border-left: 5px solid var(--cream); border-right: 5px solid var(--cream); }
.voice__wave { flex: 1; display: flex; align-items: center; gap: 3px; height: 40px; }
.voice__wave i { flex: 1; height: var(--h); background: var(--green); border-radius: 2px; opacity: .7; }
.voice__play.is-playing + .voice__wave i { animation: wave 1s ease-in-out infinite; }
.voice__wave i:nth-child(3n) { animation-delay: .2s !important; } .voice__wave i:nth-child(3n+1) { animation-delay: .45s !important; }
@keyframes wave { 50% { transform: scaleY(.4); } }

.song { display: flex; gap: 14px; align-items: center; margin-bottom: 1rem; }
.song__disc { width: 96px; animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.song__t { font-weight: 600; font-size: 1.2rem; margin: 0; } .song__a { margin: 0; color: var(--ink-soft); font-style: italic; }
.pc-back .btn { margin: .6rem auto 0; display: flex; width: fit-content; }

.coupon {
  position: relative; background: var(--gold); border-radius: 12px; padding: 1.4rem 1.2rem; text-align: center; overflow: hidden;
  mask: radial-gradient(circle 12px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 12px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
  -webkit-mask: radial-gradient(circle 12px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 12px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
}
.coupon__what { font-size: 2rem; line-height: 1.1; margin: .2rem 0 .4rem; color: var(--red-d); }
.coupon__det { margin: 0 0 .6rem; } .coupon__terms { font-size: .8rem; opacity: .75; margin: 0; font-style: italic; }
.coupon__stamp {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) rotate(-14deg) scale(1.6); opacity: 0;
  border: 3px solid var(--red); color: var(--red); font-family: var(--caps); text-transform: uppercase; letter-spacing: .2em; padding: .3rem .8rem; transition: .4s cubic-bezier(.3,1.6,.5,1);
}
.coupon.is-used .coupon__stamp { opacity: .85; transform: translate(-50%,-50%) rotate(-14deg) scale(1); }

.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: .5rem 0 1rem; }
.countdown div { background: var(--green); color: var(--cream); border-radius: 10px; padding: .7rem .2rem; text-align: center; }
.countdown b { display: block; font-size: 1.8rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.countdown span { font-family: var(--caps); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }

.giftcode { background: var(--paper); border-radius: 12px; padding: 1.2rem; text-align: center; }
.giftcode__desc { margin: .3rem 0 1rem; }
.giftcode__reveal { width: 100%; border: 2px dashed var(--gold-d); background: repeating-linear-gradient(45deg, var(--gold) 0 10px, #edc06a 10px 20px); color: var(--ink); border-radius: 10px; padding: 1rem; font-family: var(--caps); letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; }
.giftcode__code { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.giftcode__code code { font-size: 1.15rem; background: #fff; padding: .5rem .8rem; border-radius: 8px; letter-spacing: .06em; user-select: all; -webkit-user-select: all; word-break: break-all; }

.quiz__q { font-size: 1.2rem; font-weight: 600; margin: .4rem 0 .8rem; }
.quiz__opts { display: grid; gap: 8px; }
.quiz__opts button { text-align: left; border: 0; background: var(--paper); border-radius: 10px; padding: .8rem 1rem; transition: background .2s, transform .2s; }
.quiz__opts button.is-right { background: var(--green); color: var(--cream); }
.quiz__opts button.is-wrong { background: var(--red); color: var(--cream); animation: shake .45s; }
.quiz__fb { min-height: 1.5em; font-style: italic; color: var(--ink-soft); text-align: center; }
.quiz__end { text-align: center; } .quiz__end .script { font-size: 3.4rem; color: var(--red); margin: 0; }

/* ── Toast ─────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; top: calc(var(--safe-t) + 96px); z-index: 60; max-width: min(90vw, 380px);
  transform: translate(-50%, -16px); opacity: 0; visibility: hidden; pointer-events: none;
  transition: transform .4s cubic-bezier(.3,1.4,.5,1), opacity .3s, visibility 0s .4s;
  background: var(--ink); color: var(--cream); padding: .8rem 1.2rem; border-radius: 14px; text-align: center; font-size: .95rem;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition-delay: 0s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
