/* =========================================================================
   PRONTO MASSAGGIO — Luxury Wellness Booking
   Front-end prototype: HTML5 + Bootstrap 5 + jQuery + vanilla JS
   ========================================================================= */

:root {
  --bg-deep:      #0a0f24;
  --bg-mid:       #111735;
  --bg-card:      #161d3e;
  --bg-card-2:    #1b234a;
  --line:         rgba(255, 255, 255, .08);
  --line-strong:  rgba(255, 255, 255, .22);
  --text:         #eef1fb;
  --text-soft:    #aab2d5;
  --text-muted:   #6f78a0;
  --gold:         #e0a94f;
  --gold-soft:    #d4a24e;
  --man:          #5b8def;
  --woman:        #e0728f;
  --radius:       18px;
  --radius-sm:    12px;
  --shadow:       0 18px 50px rgba(0, 0, 0, .45);
  --font-serif:   "Playfair Display", "Times New Roman", serif;
  --font-sans:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-sans);
  color: var(--text);
  background: radial-gradient(ellipse at 50% 0%, #16204a 0%, var(--bg-mid) 38%, var(--bg-deep) 100%);
  -webkit-font-smoothing: antialiased;
}

/* --- Starry constellation background ------------------------------------ */
.starfield {
  position: fixed;
  inset: -2px;
  z-index: 0;
  pointer-events: none;
}
/* Two layers: crisp white stars + soft blue glow stars, gently twinkling */
.starfield::before,
.starfield::after {
  content: "";
  position: absolute;
  inset: 0;
}
.starfield::before {
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.85), transparent),
    radial-gradient(1px 1px at 32% 62%, rgba(255,255,255,.55), transparent),
    radial-gradient(1.6px 1.6px at 58% 28%, rgba(255,255,255,.90), transparent),
    radial-gradient(1px 1px at 74% 72%, rgba(255,255,255,.50), transparent),
    radial-gradient(1px 1px at 88% 22%, rgba(255,255,255,.70), transparent),
    radial-gradient(1px 1px at 22% 88%, rgba(255,255,255,.50), transparent),
    radial-gradient(1.6px 1.6px at 46% 92%, rgba(255,255,255,.75), transparent),
    radial-gradient(1px 1px at 66% 48%, rgba(255,255,255,.45), transparent),
    radial-gradient(1px 1px at  6% 52%, rgba(255,255,255,.60), transparent),
    radial-gradient(1px 1px at 94% 64%, rgba(255,255,255,.55), transparent);
  background-size: 380px 380px, 320px 320px, 460px 460px, 300px 300px,
                   420px 420px, 360px 360px, 500px 500px, 280px 280px,
                   340px 340px, 410px 410px;
  animation: twinkle 5.5s ease-in-out infinite alternate;
}
.starfield::after {
  background-image:
    radial-gradient(1.8px 1.8px at 20% 35%, rgba(135,178,255,.70), transparent),
    radial-gradient(2px 2px   at 70% 18%, rgba(150,190,255,.60), transparent),
    radial-gradient(1.4px 1.4px at 44% 70%, rgba(120,165,255,.55), transparent),
    radial-gradient(2px 2px   at 84% 80%, rgba(150,190,255,.55), transparent),
    radial-gradient(1.4px 1.4px at 10% 78%, rgba(130,175,255,.50), transparent),
    radial-gradient(1.8px 1.8px at 60% 44%, rgba(140,185,255,.45), transparent);
  background-size: 540px 540px, 600px 600px, 480px 480px,
                   560px 560px, 520px 520px, 640px 640px;
  filter: drop-shadow(0 0 3px rgba(120,165,255,.5));
  animation: twinkle 7s ease-in-out infinite alternate-reverse;
}
@keyframes twinkle {
  0%   { opacity: .35; }
  50%  { opacity: .85; }
  100% { opacity: .55; }
}
@media (prefers-reduced-motion: reduce) {
  .starfield::before, .starfield::after { animation: none; opacity: .7; }
}

.app { position: relative; z-index: 1; min-height: 100vh; }

/* --- Screen system ------------------------------------------------------ */
.screen { display: none; min-height: 100vh; padding: 28px 16px 80px; }
.screen.is-active { display: block; animation: fade .4s ease both; }
/* opacity-only: animating `transform` here would make the screen a
   containing block and break `position: fixed` on the CTA bar. */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.wrap { max-width: 760px; margin: 14px auto 90px; }

/* --- Running recap of choices ------------------------------------------ */
.recap { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 22px; }
.recap:empty { display: none; }
.recap .chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(224,169,79,.10);
  border: 1px solid rgba(224,169,79,.32);
  color: #f0d9ad;
  padding: 8px 14px; border-radius: 999px;
  font-size: .85rem; white-space: nowrap;
}
.recap .chip i { color: var(--gold); font-size: .95rem; }
.recap .chip b { color: var(--text); font-weight: 600; }
.recap .chip.expandable { cursor: pointer; }
.recap .chip.expandable:hover { border-color: var(--gold); }
.recap .chip .rc-names { display: none; }
.recap .chip.open .rc-count { display: none; }
.recap .chip.open .rc-names { display: inline; }
.recap .chip .caret { font-size: .7rem; opacity: .7; }

/* --- Typography --------------------------------------------------------- */
.brand-title {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: .22em;
  font-size: clamp(2rem, 5vw, 3.4rem);
  text-align: center;
  margin: 0;
}
.brand-sub {
  text-align: center;
  color: var(--gold);
  letter-spacing: .42em;
  font-size: .72rem;
  font-weight: 600;
  margin-top: 10px;
  text-transform: uppercase;
}
.screen-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  text-align: center;
  margin: 6px 0 4px;
}
.screen-sub {
  text-align: center;
  color: var(--text-soft);
  letter-spacing: .22em;
  text-transform: uppercase;
  font-size: .72rem;
  margin-bottom: 30px;
}

/* --- Top bar ------------------------------------------------------------ */
.topbar {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 20;
}
/* top-left back button removed — back lives in the bottom action bar */

/* Language selector */
.lang { position: relative; }
.lang-toggle {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-size: .7rem; font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.lang-toggle small { display: block; font-size: .58rem; color: var(--text-soft); }
.lang-menu {
  position: absolute;
  right: 0; top: 60px;
  width: 190px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 6px;
  display: none;
}
.lang-menu.open { display: block; }
.lang-menu button {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  background: none; border: 0; color: var(--text);
  padding: 10px 12px; border-radius: 8px;
  cursor: pointer; font-size: .92rem;
}
.lang-menu button:hover,
.lang-menu button.active { background: rgba(255,255,255,.07); }
.lang-menu button .code { margin-left: auto; color: var(--text-muted); font-size: .72rem; }
.flag {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: grid; place-items: center;
  font-size: .62rem; font-weight: 700;
}

/* --- Home --------------------------------------------------------------- */
.home-hero { display: flex; justify-content: center; align-items: center; margin-top: 22px; }

.promo-card {
  position: relative;
  height: 340px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background-size: cover;
  background-position: center;
}
.promo-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.78));
}
.promo-card span {
  position: absolute; left: 22px; bottom: 20px; z-index: 2;
  font-family: var(--font-serif); font-size: 1.4rem;
}

.book-cluster { display: grid; justify-items: center; gap: 22px; }
.book-btn {
  width: 168px; height: 168px;
  border-radius: 50%;
  background: #fff; color: #1a1f3a;
  border: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; text-align: center;
  box-shadow: 0 0 0 14px rgba(255,255,255,.06), 0 22px 50px rgba(0,0,0,.5);
  transition: transform .2s;
}
.book-btn:hover { transform: scale(1.04); }
.book-btn .ico {
  font-size: 1.8rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.book-btn .ico i { display: block; line-height: 1; }
.book-btn .lbl { font-weight: 800; letter-spacing: .14em; font-size: .95rem; }
.book-btn .lbl small { display: block; font-weight: 600; color: #7d83a8; letter-spacing: .3em; font-size: .62rem; margin-top: 3px; }

.gender-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.gender-btn {
  width: 92px; height: 92px;
  border-radius: 50%;
  border: 0; color: #fff;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px;
  cursor: pointer; text-align: center;
  font-weight: 600; font-size: .85rem;
  line-height: 1;
  box-shadow: 0 14px 30px rgba(0,0,0,.4);
  transition: transform .2s, box-shadow .2s;
}
.gender-btn .ico {
  font-size: 1.35rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.gender-btn .ico i { display: block; line-height: 1; }
.gender-btn.man   { background: var(--man); }
.gender-btn.woman { background: var(--woman); }
.gender-btn.any   { background: linear-gradient(180deg, #8b93b8, #6f78a0); }
.gender-btn:hover { transform: translateY(-3px); }
.gender-btn.selected { box-shadow: 0 0 0 4px rgba(255,255,255,.5), 0 14px 30px rgba(0,0,0,.4); }

.book-hint { color: var(--text-soft); font-size: .9rem; }
.dots { display: flex; gap: 8px; }
.dots i {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--line-strong); display: inline-block;
}
.dots i.active { width: 26px; border-radius: 6px; background: var(--gold); }

.home-foot { text-align: center; margin-top: 70px; }
.home-foot .links { display: flex; gap: 34px; justify-content: center; margin-bottom: 14px; }
.home-foot a { color: var(--text-soft); text-decoration: none; font-size: .95rem; }
.home-foot a:hover { color: var(--text); }
.home-foot .copy { color: var(--text-muted); font-size: .82rem; }

/* --- Generic option / list cards --------------------------------------- */
.opt-card {
  background: linear-gradient(180deg, var(--bg-card), var(--bg-card-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 18px;
  cursor: pointer;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.opt-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.opt-card.selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 14px 36px rgba(224,169,79,.18);
}
.opt-card .emoji { font-size: 1.5rem; }
.opt-card h3 { font-family: var(--font-serif); font-style: italic; font-size: 1.4rem; margin: 14px 0 10px; }
.opt-card.disabled { opacity: .35; cursor: not-allowed; pointer-events: none; }

.tr-op-pill {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  background: rgba(40, 167, 69, .15);
  color: #6fdc8c;
  border: 1px solid rgba(40, 167, 69, .35);
}
.tr-op-pill i { font-size: .8rem; }
.tr-op-pill--empty { background: rgba(220, 53, 69, .12); color: #ffb3ba; border-color: rgba(220, 53, 69, .35); }

/* === Treat pool live counter === */
.treat-pool-count {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 18px 0;
  padding: 14px 22px;
  border-radius: 14px;
  font-size: .92rem;
  letter-spacing: .02em;
  text-align: center;
  animation: fade .25s ease;
}
.treat-pool-count i { font-size: 1.2rem; }
.treat-pool-count.tp-ok {
  background: linear-gradient(135deg, rgba(40,167,69,.16), rgba(40,167,69,.08));
  border: 1px solid rgba(40,167,69,.4);
  color: #b8efc8;
}
.treat-pool-count.tp-ok strong { color: #ffffff; }
.treat-pool-count.tp-ko {
  background: rgba(220,53,69,.12);
  border: 1px solid rgba(220,53,69,.4);
  color: #ffd5d9;
}

/* === Stripe Embedded Modal === */
.pm-stripe-modal {
  position: fixed; inset: 0;
  display: none;
  z-index: 2000;
}
.pm-stripe-modal.is-open { display: block; }
.pm-stripe-backdrop {
  position: absolute; inset: 0;
  background: rgba(8, 10, 24, .8);
  backdrop-filter: blur(10px);
  animation: fadeIn .2s ease;
}
.pm-stripe-dialog {
  position: relative;
  max-width: 560px;
  margin: 4vh auto;
  background: linear-gradient(180deg, #161d3e 0%, #0f1530 100%);
  border: 1px solid rgba(214,180,106,.35);
  border-radius: 18px;
  box-shadow: 0 40px 100px rgba(0,0,0,.6);
  overflow: hidden;
  animation: slideUp .25s ease;
  max-height: 92vh;
  display: flex; flex-direction: column;
}
.pm-stripe-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(214,180,106,.18);
  color: #efe7d2;
}
.pm-stripe-title { font-family: 'Playfair Display', serif; font-size: 1.2rem; color: #d6b46a; font-weight: 600; }
.pm-stripe-head small { color: rgba(239,231,210,.55); font-size: .72rem; display: block; margin-top: 2px; }
.pm-stripe-head small i { color: #6fdc8c; }
.pm-stripe-close {
  background: transparent; border: none; color: rgba(239,231,210,.7);
  font-size: 1.8rem; cursor: pointer; line-height: 1; padding: 0 8px;
}
.pm-stripe-close:hover { color: #fff; }
.pm-stripe-body {
  padding: 18px;
  overflow-y: auto;
  background: #fff;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 600px) {
  .pm-stripe-dialog { margin: 0; max-width: none; min-height: 100vh; border-radius: 0; }
}
.opt-card p  { color: var(--text-soft); margin: 0; font-size: .95rem; }

/* Stepper card */
.stepper-card {
  display: flex; align-items: center; gap: 18px;
  background: linear-gradient(180deg, var(--bg-card), var(--bg-card-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 26px;
}
.stepper-card .ic {
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(224,169,79,.16); color: var(--gold);
  display: grid; place-items: center; font-size: 1.2rem; flex: 0 0 auto;
}
.stepper-card .meta h4 { margin: 0 0 3px; font-family: var(--font-serif); font-size: 1.1rem; }
.stepper-card .meta p  { margin: 0; color: var(--text-soft); font-size: .85rem; }
.stepper { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.stepper button {
  width: 42px; height: 42px; border-radius: 50%;
  border: 0; cursor: pointer; font-size: 1.2rem; font-weight: 700;
}
.stepper .minus { background: rgba(255,255,255,.08); color: var(--text); }
.stepper .plus  { background: var(--gold); color: #1a1f3a; }
.stepper .val   { min-width: 26px; text-align: center; font-size: 1.2rem; font-weight: 700; }

/* Number of massages — dedicated step */
.mass-box {
  background: linear-gradient(180deg, var(--bg-card), var(--bg-card-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 48px 28px;
  margin-top: 30px;
  text-align: center;
}
.mass-ic {
  width: 84px; height: 84px; margin: 0 auto 30px;
  border-radius: 50%;
  background: rgba(224,169,79,.16); color: var(--gold);
  display: grid; place-items: center; font-size: 2rem;
}
.mass-stepper {
  display: flex; align-items: center; justify-content: center; gap: 34px;
}
.mass-stepper button {
  width: 64px; height: 64px; border-radius: 50%;
  border: 0; cursor: pointer; font-size: 1.7rem; font-weight: 700;
  transition: transform .15s, filter .15s;
}
.mass-stepper button:hover { transform: scale(1.06); }
.mass-stepper button:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.mass-stepper .minus { background: rgba(255,255,255,.08); color: var(--text); }
.mass-stepper .plus  { background: var(--gold); color: #1a1f3a; }
.mass-stepper .val   { min-width: 70px; font-size: 3rem; font-weight: 800; }
.mass-hint { color: var(--text-soft); font-size: .9rem; margin: 26px 0 0; }

/* Duration big cards */
.dur-card {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 40px; margin-bottom: 22px;
  text-align: center; cursor: pointer;
  background: rgba(255,255,255,.02);
  transition: .2s;
}
.dur-card:hover { background: rgba(255,255,255,.05); }
.dur-card.selected { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.dur-card .num { font-size: 3.2rem; font-weight: 800; line-height: 1; }
.dur-card .unit { color: var(--text-soft); letter-spacing: .3em; font-size: .72rem; text-transform: uppercase; margin-top: 8px; }

/* Info banner */
.note {
  display: flex; gap: 12px; align-items: flex-start;
  background: rgba(224,169,79,.08);
  border: 1px solid rgba(224,169,79,.3);
  color: #f0d9ad;
  border-radius: var(--radius-sm);
  padding: 16px 18px; margin-bottom: 28px; font-size: .9rem;
}
.note .muted { color: var(--text-muted); }
.banner-progress {
  display: flex; gap: 12px; align-items: center;
  background: linear-gradient(180deg, rgba(224,169,79,.10), rgba(224,169,79,.04));
  border: 1px solid rgba(224,169,79,.3);
  border-radius: var(--radius-sm);
  padding: 16px 18px; margin-bottom: 24px;
}
.banner-progress .ic { color: var(--gold); font-size: 1.2rem; }
.banner-progress strong { display: block; }
.banner-progress small { color: var(--text-soft); }
.banner-progress .pips { margin-left: auto; display: flex; gap: 7px; }
.banner-progress .pips i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.banner-progress .pips i.on { background: var(--gold); }

/* Date strip */
.sec-label { color: var(--text-muted); letter-spacing: .22em; text-transform: uppercase; font-size: .72rem; margin: 22px 0 12px; }
.day-strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: thin; }
.day {
  flex: 0 0 auto;
  width: 78px; padding: 16px 0;
  text-align: center; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: rgba(255,255,255,.03);
  transition: .2s;
}
.day:hover { border-color: var(--line-strong); }
.day .dow { color: var(--text-soft); font-size: .68rem; letter-spacing: .14em; }
.day .dnum { font-size: 1.5rem; font-weight: 700; margin-top: 4px; }
.day.selected { background: #fff; color: #1a1f3a; border-color: #fff; }
.day.selected .dow { color: #6f78a0; }

.time-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.slot {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 16px 0; text-align: center; cursor: pointer;
  background: rgba(255,255,255,.02); transition: .2s; font-size: .95rem;
}
.slot:hover { border-color: var(--line-strong); }
.slot.selected { background: var(--gold); color: #1a1f3a; border-color: var(--gold); font-weight: 700; }

/* Therapist grid */
.thera-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.thera {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden; cursor: pointer;
  aspect-ratio: 3 / 4;
  background: linear-gradient(180deg, #c9cedd, #8b91ad);
  display: flex; flex-direction: column;
  justify-content: flex-end;
  transition: .2s;
}
.thera img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thera .ph { position: absolute; inset: 0; display: grid; place-items: center; color: #6c7290; font-size: 2.4rem; }
.thera .info {
  position: relative; z-index: 2;
  background: linear-gradient(transparent, rgba(0,0,0,.7));
  padding: 18px 16px 14px; text-align: center;
}
.thera .info .nm { font-family: var(--font-serif); font-size: 1.15rem; }
.thera .info .rt { color: var(--gold); font-size: .85rem; margin-top: 4px; }
.thera.selected { box-shadow: 0 0 0 3px var(--gold); }
.thera.disabled { opacity: .42; cursor: not-allowed; }
.thera.disabled:hover { transform: none; }
.thera .badge {
  position: absolute; top: 12px; left: 12px; z-index: 3;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--gold); color: #1a1f3a;
  display: none; place-items: center; font-weight: 800; font-size: .85rem;
}
.thera .check {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--gold); color: #1a1f3a;
  display: none; place-items: center;
}
.thera.selected .badge,
.thera.selected .check { display: grid; }

/* Summary panels */
.panel {
  background: linear-gradient(180deg, var(--bg-card), var(--bg-card-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-bottom: 22px;
}
.panel-title { font-family: var(--font-serif); font-size: 1.5rem; margin: 0 0 20px; }

.sum-line { display: flex; gap: 16px; align-items: flex-start; padding: 14px 0; }
.sum-line .si {
  width: 30px; height: 30px; flex: 0 0 auto;
  display: grid; place-items: center;
  color: var(--gold); font-size: 1.05rem;
}
.sum-line .sk { color: var(--text-soft); font-size: .9rem; }
.sum-line .sv { font-weight: 700; font-size: 1.05rem; margin-top: 3px; }

.total-row {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--line);
  margin-top: 10px; padding-top: 22px;
}
.total-row > span:first-child { color: var(--text-soft); font-size: 1.05rem; }
.total-amount { font-family: var(--font-serif); font-size: 2rem; font-weight: 700; color: var(--gold); }

/* Form fields */
.fld-label { display: block; color: var(--text-soft); font-size: .85rem; margin-bottom: 8px; }
.fld-label i { color: var(--gold); font-style: normal; }
.fld {
  width: 100%;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 14px 16px; font-size: .95rem;
  transition: border-color .2s, background .2s;
}
.fld::placeholder { color: var(--text-muted); }
.fld:focus { outline: 0; border-color: var(--gold); background: rgba(255,255,255,.06); }
.fld.invalid { border-color: #e0728f; }

/* Fixed bottom CTA — always reachable while scrolling (mobile-friendly) */
.cta-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 45;
  padding: 16px;
  display: flex; justify-content: center; gap: 12px;
  background: linear-gradient(180deg, rgba(10,15,36,0), rgba(10,15,36,.85) 38%, var(--bg-deep));
  backdrop-filter: blur(4px);
}
.cta-bar .btn-prev {
  flex: 0 0 auto;
  width: 160px;                 /* ~25% of the action row */
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,.06);
  color: var(--text);
  border-radius: 14px;
  font-size: 1.2rem;
  cursor: pointer;
  display: grid; place-items: center;
  transition: background .2s, border-color .2s;
}
.cta-bar .btn-prev:hover { background: rgba(255,255,255,.12); border-color: var(--gold); }
.cta-bar .btn-gold { flex: 0 1 556px; width: auto; }   /* ~75% */
.btn-gold {
  width: 100%; padding: 16px;
  background: linear-gradient(180deg, #ecb95f, var(--gold));
  color: #1a1f3a; font-weight: 800; letter-spacing: .04em;
  border: 0; border-radius: 14px; cursor: pointer;
  box-shadow: 0 14px 30px rgba(224,169,79,.28);
  font-size: 1rem; transition: .2s;
}
.btn-gold:hover { filter: brightness(1.05); }
.btn-gold:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }

/* Floating buttons */
.fab-help, .fab-bot {
  position: fixed; bottom: 26px; z-index: 50;
  border: 0; cursor: pointer; box-shadow: var(--shadow);
}
.fab-help {
  left: 26px;
  display: flex; align-items: center; gap: 10px;
  background: #1c2347; color: var(--text);
  border: 1px solid var(--line);
  padding: 12px 20px; border-radius: 30px; font-size: .9rem;
}
.fab-help .dot { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold); display: grid; place-items: center; font-size: .7rem; }
.fab-bot {
  right: 26px;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--gold); color: #1a1f3a;
  font-size: 1.4rem; display: grid; place-items: center;
}

/* --- Responsive -------------------------------------------------------- */
@media (max-width: 720px) {
  .home-hero { grid-template-columns: 1fr; }
  .promo-card { height: 200px; }
  .book-cluster { order: -1; }
  .time-grid { grid-template-columns: repeat(3, 1fr); }
  .thera-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 460px) {
  .time-grid { grid-template-columns: repeat(2, 1fr); }
  .fab-help span { display: none; }
  /* native-app style: full-width bottom CTA, FABs floating above it */
  .cta-bar {
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
    background: var(--bg-deep);
    border-top: 1px solid var(--line);
  }
  .cta-bar { gap: 10px; }
  .cta-bar .btn-prev { width: auto; flex: 0 0 25%; }
  .cta-bar .btn-gold { flex: 1 1 auto; max-width: none; }
  .screen:has(.cta-bar) { padding-bottom: 150px; }
  .fab-help, .fab-bot { bottom: 88px; }
  .fab-help {
    left: 16px; width: 46px; height: 46px;
    padding: 0; justify-content: center; border-radius: 50%;
  }
  .fab-bot { right: 16px; width: 46px; height: 46px; font-size: 1.15rem; }
}
