/* Language Toybox: start funnel */
:root {
  --space: #070B24;
  --midnight: #111A4B;
  --violet: #3A2B7C;
  --star: #FFF4DC;
  --star-soft: rgba(255, 244, 220, 0.76);
  --star-faint: rgba(255, 244, 220, 0.52);
  --flame: #F47B2A;
  --sun: #FFC85A;
  --sea: #4CC3F0;
  --card: rgba(20, 28, 78, 0.62);
  --card-hi: rgba(42, 52, 120, 0.85);
  --line: rgba(255, 244, 220, 0.16);
  --display: "Fredoka", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --text: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--space); color: var(--star);
  font: 17px/1.55 var(--text); -webkit-font-smoothing: antialiased;
}
.sky { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vmax 45vmax at 85% 6%, rgba(168, 76, 142, 0.28), transparent 70%),
    radial-gradient(70vmax 50vmax at 0% 50%, rgba(58, 43, 124, 0.55), transparent 70%),
    radial-gradient(60vmax 50vmax at 80% 100%, rgba(34, 120, 190, 0.22), transparent 70%),
    linear-gradient(180deg, #0A0F31 0%, var(--space) 60%, #050720 100%);
}
a { color: var(--star); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 10px; }
img, video { display: block; max-width: 100%; }

.f-header { display: flex; align-items: center; gap: 14px; padding: 14px 16px; width: min(720px, 100%); margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 1.05rem; color: var(--star); text-decoration: none; white-space: nowrap; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.f-progress { flex: 1; height: 6px; border-radius: 99px; background: rgba(255, 244, 220, 0.12); overflow: hidden; }
.f-progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--sun), var(--flame)); border-radius: 99px; transition: width .35s ease; }
.f-step-count { font-size: .85rem; color: var(--star-faint); min-width: 3.2em; text-align: right; }
@media (max-width: 420px) { .brand span { display: none; } }

.f-main { flex: 1; width: min(720px, 100%); margin: 0 auto; padding: 8px 16px 32px; }
.screen.enter { animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen.enter { animation: none; } .f-progress-bar { transition: none; } }

.f-back { background: none; border: 0; color: var(--star-faint); font: 700 .9rem var(--text); padding: 6px 0; margin: 0 0 6px; cursor: pointer; }
.f-back:hover { color: var(--star); }
.kicker { font-weight: 800; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--sun); margin: 6px 0 4px; }
h1 { font-family: var(--display); font-weight: 600; font-size: clamp(1.75rem, 6vw, 2.4rem); line-height: 1.1; margin: 0 0 .35em; letter-spacing: -0.01em; }
.sub { color: var(--star-soft); margin: 0 0 18px; }

.options { display: grid; gap: 10px; margin: 14px 0 18px; }
.options.grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.options.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 480px) { .options.grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.opt {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  min-height: 58px; padding: 12px 16px; border-radius: 16px; cursor: pointer;
  background: var(--card); border: 1.5px solid var(--line); color: var(--star);
  font: 700 1.02rem/1.25 var(--text); transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.opt:hover { background: var(--card-hi); }
.opt:active { transform: scale(.985); }
.opt[aria-pressed="true"] { border-color: var(--sun); background: rgba(255, 200, 90, 0.14); }
.opt .native { font-family: var(--display); font-weight: 600; font-size: 1.2rem; display: block; }
.opt .en { display: block; font-weight: 700; font-size: .82rem; color: var(--star-faint); }
.opt.lang { flex-direction: column; align-items: flex-start; gap: 0; }
.opt .tick { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.opt[aria-pressed="true"] .tick { border-color: var(--sun); background: var(--sun) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7' fill='none' stroke='%23070B24' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.opt.world { flex-direction: column; align-items: stretch; padding: 8px 8px 12px; gap: 8px; text-align: center; }
.opt.world img { width: 100%; aspect-ratio: 4/3; object-fit: contain; padding: 6px; border-radius: 11px; background: radial-gradient(circle at 50% 60%, rgba(255,244,220,.14), rgba(255,244,220,.03)); }
.opt.world .tick { position: absolute; top: 14px; right: 14px; background-color: rgba(7,11,36,.6); }
.opt.world { position: relative; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  min-height: 58px; padding: 14px 22px; border: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(180deg, #FFD272, var(--sun)); color: #2A1A05;
  font: 800 1.1rem var(--display); letter-spacing: .01em; text-decoration: none;
  box-shadow: 0 10px 30px rgba(255, 200, 90, 0.25);
}
.btn:hover { filter: brightness(1.04); }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--star); border: 1.5px solid var(--line); box-shadow: none; font-weight: 700; }
.linkish { background: none; border: 0; color: var(--star-soft); font: 700 .95rem var(--text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 8px 0; }
.center { text-align: center; }
.sticky-cta { position: sticky; bottom: 0; padding: 12px 0 calc(8px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, transparent, var(--space) 35%); }

/* Clip */
.clip { position: relative; width: min(360px, 100%); margin: 6px auto 16px; border-radius: 22px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.45), 0 0 0 1px var(--line); background: #1B2360; aspect-ratio: 3/4; }
.clip video { width: 100%; height: 100%; object-fit: cover; }
.sound { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; display: grid; place-items: center; background: rgba(7, 11, 36, 0.72); color: var(--star); box-shadow: 0 0 0 1px rgba(255, 244, 220, 0.22); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.sound svg { width: 22px; height: 22px; }
.sound .ic-on, .sound.on .ic-off { display: none; }
.sound.on .ic-on { display: block; }
.sound:not(.on)::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--sun); opacity: 0; animation: sound-hint 2.4s ease-out 1s 3; pointer-events: none; }
@keyframes sound-hint { 0% { opacity: .9; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) { .sound:not(.on)::after { animation: none; } }

/* Loading */
.loading { text-align: center; padding: 60px 0; }
.orbit { width: 84px; height: 84px; margin: 0 auto 22px; border-radius: 50%; border: 4px solid rgba(255,244,220,.12); border-top-color: var(--sun); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .orbit { animation: none; } }

/* Results */
.result-grid { display: grid; gap: 18px; }
@media (min-width: 680px) { .result-grid { grid-template-columns: 300px 1fr; align-items: start; } .result-grid .clip { margin: 0; } }
.perks { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.perks li { display: flex; gap: 10px; align-items: flex-start; color: var(--star-soft); }
.perks li b { color: var(--star); }
.perks .dot { flex: none; width: 24px; height: 24px; border-radius: 50%; background: rgba(76, 195, 240, .18); color: var(--sea); display: grid; place-items: center; font-weight: 800; font-size: .8rem; margin-top: 1px; }
.plans { display: grid; gap: 10px; margin: 8px 0 14px; }
.plan { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; padding: 14px 16px; border-radius: 18px; cursor: pointer; background: var(--card); border: 1.5px solid var(--line); color: var(--star); font: 700 1rem var(--text); position: relative; }
.plan[aria-pressed="true"] { border-color: var(--sun); background: rgba(255, 200, 90, 0.12); }
.plan .p-main { flex: 1; }
.plan .p-name { font-family: var(--display); font-size: 1.15rem; font-weight: 600; display: block; }
.plan .p-note { font-size: .85rem; color: var(--star-faint); }
.plan .p-price { text-align: right; font-family: var(--display); font-weight: 600; font-size: 1.15rem; }
.plan .p-price small { display: block; font-family: var(--text); font-size: .78rem; color: var(--star-faint); font-weight: 700; }
.plan .badge { position: absolute; top: -10px; right: 14px; background: var(--flame); color: #fff; font: 800 .72rem var(--text); letter-spacing: .04em; text-transform: uppercase; padding: 3px 10px; border-radius: 99px; }
.timeline { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 6px; font-size: .95rem; color: var(--star-soft); }
.timeline b { color: var(--star); }
.fine { font-size: .85rem; color: var(--star-faint); margin: 10px 0 0; }
.promo { display: flex; gap: 8px; margin-top: 6px; }
.promo input { flex: 1; min-width: 0; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: rgba(7,11,36,.6); color: var(--star); font: 700 1rem var(--text); text-transform: uppercase; }
.promo button { min-height: 48px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--star); font: 800 .95rem var(--text); cursor: pointer; }
.error { color: #FFB3A1; font-weight: 700; margin: 10px 0 0; }
.alt { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--star-faint); font-size: .92rem; text-align: center; }

/* Success */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.steps li::before { content: counter(s); width: 34px; height: 34px; border-radius: 50%; background: var(--sun); color: #2A1A05; display: grid; place-items: center; font: 800 1rem var(--display); }
.steps h3 { font-family: var(--display); font-weight: 600; font-size: 1.1rem; margin: 3px 0 4px; }
.steps p { margin: 0; color: var(--star-soft); }
.store-badge img { height: 52px; width: auto; margin-top: 10px; }
.get-app { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 26px; }
.get-app .store-badge img { margin-top: 10px; }
.qr { display: none; margin: 10px 0 0; align-items: center; gap: 14px; }
.qr img { width: 120px; height: 120px; padding: 8px; background: #fff; border-radius: 14px; flex: none; }
.qr figcaption { font-size: .9rem; line-height: 1.4; color: var(--star-soft); max-width: 190px; }
@media (hover: hover) and (pointer: fine) { .qr { display: flex; } }

.f-footer { text-align: center; color: var(--star-faint); font-size: .82rem; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
.f-footer a { color: var(--star-faint); }
.f-noscript { padding: 40px 0; }

/* Payment step */
.pay { max-width: 520px; margin: 0 auto; }
.summary { background: var(--card); border: 1.5px solid var(--line); border-radius: 18px; padding: 14px 16px; margin: 10px 0 18px; }
.s-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; }
.s-plan { font-family: var(--display); font-weight: 600; font-size: 1.1rem; }
.s-promo { color: var(--sea); font-weight: 800; font-size: .95rem; }
.s-total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; font-family: var(--display); font-weight: 600; font-size: 1.2rem; }
.s-total span:last-child { color: var(--sun); }
.s-note { margin: 6px 0 0; font-size: .92rem; color: var(--star-soft); }
.s-note b { color: var(--star); }
.linkish.small { font-size: .88rem; padding: 2px 0; }
.field { display: grid; gap: 6px; font-weight: 800; font-size: .95rem; color: #D9D0BE; }
.field input { min-height: 52px; padding: 13px 14px; border-radius: 14px; border: 1.5px solid #353C6B; background: #121A4C; color: var(--star); font: 600 16px var(--text); }
.field input::placeholder { color: #9A96A0; }
.field input:focus { outline: none; border-color: var(--sun); box-shadow: 0 0 0 3px rgba(255, 200, 90, 0.25); }
.hint { margin: 6px 0 18px; font-size: .88rem; color: var(--star-faint); }
.pay-box { min-height: 120px; margin-bottom: 16px; position: relative; }
.pay-loading { color: var(--star-faint); font-weight: 700; text-align: center; padding: 34px 0; margin: 0; }
.pay .btn { margin-top: 4px; }
.pay .error { margin: 0 0 12px; }
.secure { text-align: center; margin-top: 12px; }
.s-line { font-size: .95rem; color: var(--star-soft); }
.pay-label { margin: 0 0 8px; font-weight: 800; font-size: .95rem; color: #D9D0BE; }
.terms-plain { margin: 0 0 14px; font-size: .88rem; line-height: 1.5; color: var(--star-soft); }
.terms-plain b { color: var(--star); }
.terms-plain a { color: var(--star-soft); }
@supports (-webkit-appearance: -apple-pay-button) {
  .pay .btn.apple-pay { -webkit-appearance: -apple-pay-button; -apple-pay-button-type: subscribe; -apple-pay-button-style: white; min-height: 56px; border-radius: 14px; box-shadow: none; padding: 0; color: transparent; }
  .pay .btn.apple-pay:disabled { opacity: .6; }
}
.secure svg { width: 13px; height: 13px; display: inline-block; vertical-align: -1px; margin-right: 6px; }

/* fixes */
[hidden] { display: none !important; }
.opt.world[aria-pressed="true"] .tick { background-color: var(--sun); }
@media (max-width: 679px) { .result-grid .clip { width: min(240px, 70%); } }
