/* Layla AI · the selling layer (popup + smart buy bar), shared by the homepage and the free class pages.
   Flat Blush Sheet colours, no gradients, no blur. Pixel font for names and prices, DM Sans for the rest. */
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 100 1000; font-display: swap;
  src: url("/assets/fonts/dmsans-latin.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

.ly-up, .ly-bar {
  --ly-ink: #382c2c; --ly-paper: #fdf2f0; --ly-white: #fffdfc; --ly-pink: #f6b3c4; --ly-blush: #fbe3e8; --ly-gold: #f2b53a;
  --ly-soft: #765450; --ly-line: rgba(56, 44, 44, .12); --ly-line2: rgba(56, 44, 44, .22);
  --ly-px: "Jersey 15", ui-monospace, monospace; --ly-sans: "DM Sans", ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-family: var(--ly-sans); color: var(--ly-ink); -webkit-font-smoothing: antialiased; text-align: left;
}
.ly-i { width: 12px; height: 12px; fill: currentColor; flex: none; }
.ly-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; min-height: 40px; padding: 0 16px;
  border-radius: 10px; border: 1.5px solid var(--ly-line2); background: var(--ly-white); color: var(--ly-ink);
  font: 600 15px/1 var(--ly-sans); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.ly-btn:hover { border-color: var(--ly-ink); }
.ly-btn--pink { background: var(--ly-pink); border: 2px solid var(--ly-ink); box-shadow: 0 3px 0 var(--ly-ink); }
@media (hover: hover) { .ly-btn--pink:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--ly-ink); } }
.ly-btn--pink:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ly-ink); }
.ly-btn .ly-i { width: 15px; height: 13px; }

/* ---------- the popup ---------- */
.ly-up {
  width: min(460px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 26px 24px 16px; margin: auto;
  border: 2px solid var(--ly-ink); border-radius: 22px; background: var(--ly-white); box-shadow: 0 10px 0 var(--ly-ink);
}
.ly-up:focus { outline: none; }
.ly-up::backdrop { background: rgba(56, 44, 44, .55); }
.ly-up[open] { animation: ly-pop .28s ease-out; }
@keyframes ly-pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.ly-up__x { position: absolute; top: 12px; right: 12px; margin: 0; }
.ly-up__x button { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--ly-line2); background: var(--ly-white); color: var(--ly-ink); cursor: pointer; }
.ly-up__tag { display: inline-flex; align-items: center; gap: 8px; margin: 0; font: 400 18px/1 var(--ly-px); color: var(--ly-soft); }
.ly-up__tag .ly-i { width: 15px; height: 13px; color: #e59ab0; }
.ly-up h2 { margin: 10px 0 0; padding-right: 40px; font: 400 40px/.95 var(--ly-px); color: var(--ly-ink); text-wrap: balance; }
.ly-up__lead { margin: 8px 0 0; font-size: 15px; line-height: 1.45; color: var(--ly-soft); text-wrap: pretty; }
.ly-up__list { display: grid; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.ly-up__list li { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; border: 1px solid var(--ly-line); }
.ly-up__best { background: var(--ly-blush); border: 1.5px solid var(--ly-ink) !important; }
.ly-up__art { display: block; width: 84px; height: 72px; }
/* the kit mockup in small (same look as the kit cards: a tilted cover card on the kit's colour) */
.ly-mock { position: relative; display: block; width: 100%; height: 100%; border-radius: 12px; overflow: hidden; background: #fbe3e8; }
.ly-mock--hustle { background: #fbe7bf; }
.ly-mock--bundle { background: #f6b3c4; }
.ly-mock__c { position: absolute; left: 50%; top: 50%; display: block; padding: 4px; border-radius: 6px; background: #fffdfc; border: 1px solid rgba(56, 44, 44, .22); translate: -50% -42%; rotate: -4deg; z-index: 2; line-height: 0; }
.ly-mock__c img { display: block; width: 58px; height: 53px; max-width: none; border-radius: 2px; } /* a smooth shrink: pixel-perfect only applies to enlarging */
.ly-mock--bundle .ly-mock__c img { width: 60px; height: 53px; }
.ly-mock__c--back, .ly-mock__c--b1, .ly-mock__c--b2 { width: 68px; height: 63px; z-index: 1; }
.ly-mock__c--back { translate: -34% -50%; rotate: 7deg; background: #fffbf9; }
.ly-mock__c--b1 { translate: -22% -52%; rotate: 9deg; background: #fbe7bf; }
.ly-mock__c--b2 { translate: -80% -48%; rotate: -12deg; background: #fbe3e8; }
.ly-up__name { display: grid; gap: 3px; min-width: 0; }
.ly-up__name b { font: 400 21px/1 var(--ly-px); white-space: nowrap; }
.ly-up__line { font-size: 13px; line-height: 1.3; color: var(--ly-soft); text-wrap: balance; }
.ly-up__price { font-size: 14px; font-weight: 700; }
.ly-up__price s { font-weight: 500; color: var(--ly-soft); margin-left: 2px; }
.ly-up__code { margin: 14px 0 0; text-align: center; font-size: 13px; color: var(--ly-soft); }
.ly-up__code b { font: 400 16px/1 var(--ly-px); color: var(--ly-ink); background: var(--ly-gold); padding: 2px 6px 1px; border-radius: 5px; }
.ly-up form { margin: 0; }
.ly-up__later { display: block; margin: 8px auto 0; border: 0; background: none; padding: 8px; cursor: pointer; font: 500 14px/1.4 var(--ly-sans); color: var(--ly-soft); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- the smart buy bar ---------- */
.ly-bar {
  position: fixed; z-index: 40; left: 50%; bottom: 16px; width: min(660px, calc(100% - 32px));
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto 32px; align-items: center; gap: 12px; padding: 8px 8px 8px 10px;
  background: var(--ly-white); border: 2px solid var(--ly-ink); border-radius: 18px; box-shadow: 0 6px 0 var(--ly-ink);
  translate: -50% calc(100% + 40px); opacity: 0; pointer-events: none;
  transition: translate .38s cubic-bezier(.2, .8, .2, 1), opacity .25s ease;
}
.ly-bar.is-on { translate: -50% 0; opacity: 1; pointer-events: auto; }
.ly-still { transition: none; }
.ly-bar__art { display: block; width: 52px; height: 44px; }
.ly-bar__art .ly-mock { border-radius: 10px; }
.ly-bar__words { display: grid; gap: 2px; min-width: 0; }
.ly-bar__words b { font: 400 20px/1 var(--ly-px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ly-bar__words span { font-size: 13px; line-height: 1.3; color: var(--ly-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ly-bar__go { min-height: 44px; }
.ly-bar__x { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--ly-soft); cursor: pointer; }
.ly-bar__x:hover { background: var(--ly-blush); color: var(--ly-ink); }
.ly-bar__x .ly-i { width: 10px; height: 10px; }

@media (max-width: 639px) {
  .ly-bar { bottom: 0; width: 100%; border-radius: 16px 16px 0 0; border-width: 2px 0 0; box-shadow: none;
    grid-template-columns: minmax(0, 1fr) auto 28px; gap: 10px; padding: 10px 8px calc(10px + env(safe-area-inset-bottom)) 16px; }
  .ly-bar__art { display: none; }
  .ly-bar__words b { font-size: 18px; }
  .ly-bar__words span { font-size: 12px; }
  .ly-bar__go { min-height: 42px; padding: 0 14px; font-size: 14px; }
  .ly-up { padding: 22px 16px 12px; }
  .ly-up h2 { font-size: 34px; }
  /* phones: the kit name gets its own full line, the price and the button share the line under it */
  .ly-up__list li { grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "art name name" "art price btn"; column-gap: 12px; row-gap: 6px; padding: 10px; }
  .ly-up__art { grid-area: art; width: 56px; height: 56px; align-self: center; }
  .ly-up__name { display: contents; }
  .ly-up__name b { grid-area: name; font-size: 20px; align-self: end; }
  .ly-up__price { grid-area: price; align-self: center; }
  .ly-up__list .ly-btn { grid-area: btn; min-height: 38px; padding: 0 14px; font-size: 14px; }
  .ly-up__line { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ly-up[open] { animation: none; } .ly-bar, .ly-btn { transition: none; } }
