/* Shop pages (/, /b/:sku, /?r=, /thanks, /quiz, /legal, errors) — on top of
   library.css, which holds the shared look: tokens, header, footer, buttons,
   forms, alerts, level chips. Same identity as /300. Light only, phone first. */

body.shop { background: var(--paper); }
.shop-main { flex: 1; }
.small { font-size: 13.5px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.btn-block { width: 100%; }
.btn-soft .ic, .btn-wa .ic { width: 18px; height: 18px; }
.cta-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, .35); box-shadow: none; }
.cta-ghost:hover { background: rgba(255, 255, 255, .08); }
.cta-ghost .ic { width: 18px; height: 18px; color: var(--yellow); }
.solo-band .k, .hero .k, .quiz-band .k { color: var(--yellow); }
.go { flex: none; }
.notice { margin: 16px 0 0; }

/* Header extras: currency pill + "My books" */
.cur { margin: 0; }
.cur select { appearance: none; -webkit-appearance: none; height: 40px; padding: 0 30px 0 14px; border: 1px solid rgba(255, 255, 255, .25); border-radius: var(--pill);
  background: rgba(255, 255, 255, .08) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23FFD54A' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center;
  color: #fff; font-family: var(--font); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.cur select option { color: var(--ink); background: #fff; }
.cur select:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.mybooks { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 15px; border-radius: var(--pill); background: var(--yellow); color: var(--navy);
  text-decoration: none; font-size: 14px; font-weight: 700; }
.mybooks:hover { background: var(--yellow-2); }
.mybooks .ic { width: 18px; height: 18px; }
.lf-about { display: flex; align-items: center; gap: 10px; flex: 1 1 100%; }
.lf-about .tile { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: #fff; flex: none; }
.lf-about p { color: #AEB3D6; font-size: 13.5px; }

/* Floating help: WhatsApp at the end side, the site chat at the start side */
body.shop .wa { inset-inline-start: auto; inset-inline-end: 14px; }
#lbChat { position: fixed; z-index: 36; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); inset-inline-start: 14px; }
.chat-fab { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px; border: 0; border-radius: var(--pill); background: var(--navy); color: #fff;
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; box-shadow: 0 10px 24px rgba(26, 29, 53, .3); }
.chat-fab::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px rgba(255, 213, 74, .25); }
.chat-fab:hover { background: var(--navy-2); }
.chat-panel { position: absolute; bottom: 58px; inset-inline-start: 0; width: min(360px, calc(100vw - 28px)); height: min(500px, 70dvh); display: flex; flex-direction: column;
  overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 24px 60px rgba(13, 15, 31, .3); }
.chat-panel[hidden] { display: none; }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--navy); color: #fff; border-bottom: 3px solid var(--yellow); }
.chat-x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.chat-log { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--paper); }
.msg { max-width: 85%; padding: 9px 13px; border-radius: 16px; white-space: pre-line; font-size: 14.5px; line-height: 1.5; }
.msg-them { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-end-start-radius: 4px; }
.msg-me { align-self: flex-end; background: var(--blue); color: #fff; border-end-end-radius: 4px; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: #fff; }
.input { width: 100%; min-width: 0; height: 46px; padding: 0 14px; font: inherit; font-size: 16px; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line-2); border-radius: 14px; }
.input:focus { outline: none; border-color: var(--blue); background: #fff; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 18px; border: 0; border-radius: var(--pill); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13.5px; margin-top: 6px; }

/* ── Home ───────────────────────────────────────────────────────────── */
.hero { color: #fff; padding: 30px 0 70px; overflow: hidden;
  background: radial-gradient(90% 120% at 100% 0%, rgba(255, 213, 74, .22) 0%, rgba(255, 213, 74, 0) 50%),
              radial-gradient(70% 90% at 0% 100%, rgba(0, 38, 255, .35) 0%, rgba(0, 38, 255, 0) 60%), var(--navy); }
.hero-in { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.hero h1 { font-size: 29px; font-weight: 800; }
[dir="rtl"] .hero h1 { font-weight: 700; }
.hero .lede { color: var(--navy-ink); margin: 10px auto 0; max-width: 36em; font-size: 15.5px; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.hero-cta .cta { width: auto; min-width: 200px; }
.hero-art img { display: block; width: min(86vw, 420px); height: auto; filter: drop-shadow(0 22px 34px rgba(0, 0, 0, .4)); }
.hero-art .hero-book { width: min(60vw, 260px); border-radius: 14px; }
.trust-wrap { position: relative; margin-top: -40px; }
.trust { list-style: none; margin: 0; padding: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.trust li { display: flex; align-items: center; gap: 10px; padding: 8px; font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.ti { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--yellow-soft); color: #8A5A00; flex: none; }
.ti .ic { width: 19px; height: 19px; }

.feature { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 26px; padding: 16px; border-radius: 24px; text-decoration: none; color: #fff; overflow: hidden;
  background: radial-gradient(80% 110% at 100% 0%, rgba(255, 213, 74, .25) 0%, rgba(255, 213, 74, 0) 55%), var(--navy-2); box-shadow: var(--shadow); }
.feature img { width: 100%; max-width: 360px; height: auto; margin: 0 auto; display: block; filter: drop-shadow(0 16px 26px rgba(0, 0, 0, .35)); }
.ft-body { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.ft-body .k { color: var(--yellow); }
.ft-body b { font-size: 20px; line-height: 1.35; }
.ft-price { font-family: var(--font); font-size: 22px; font-weight: 800; color: var(--yellow); }
.ft-cta { margin-top: 6px; width: auto; }

.sec-title { font-size: 23px; margin: 36px 0 16px; }
.shelf { margin-bottom: 26px; }
.shelf-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.shelf-head h3 { font-size: 17px; }
.shelf-head span { font-size: 13.5px; color: var(--muted); }
.lvl-badge { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; font-family: var(--font); font-weight: 800; font-size: 15px; flex: none; direction: ltr; }
.lvl-badge.big { width: 84px; height: 84px; border-radius: 24px; font-size: 30px; }
.bgrid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.bcard { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .15s ease, transform .15s ease; }
.bcard:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.bc-cover { display: block; background: linear-gradient(160deg, var(--cream), #F3ECDB); }
.cover { display: grid; place-items: center; aspect-ratio: 4 / 3; padding: 14px; }
.cover img { display: block; max-width: 100%; max-height: 100%; width: auto; height: 100%; object-fit: contain; border-radius: 8px; filter: drop-shadow(0 10px 18px rgba(26, 29, 53, .18)); }
.cover-fallback { display: grid; place-items: center; width: 60%; aspect-ratio: 3 / 4; border-radius: 12px; background: linear-gradient(160deg, var(--navy), var(--navy-3)); box-shadow: 0 12px 24px rgba(26, 29, 53, .25); }
.cover-fallback span { font-family: var(--font); font-size: 34px; font-weight: 800; color: var(--yellow); }
.bc-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.bc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pg-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: var(--pill); background: #F1F2F7; color: var(--muted); font-size: 12px; font-weight: 600; }
.pg-chip .ic { width: 14px; height: 14px; }
.bc-title { color: var(--ink); font-size: 17px; font-weight: 700; line-height: 1.4; text-decoration: none; }
.bc-title:hover { color: var(--blue); }
.bc-sub { margin: 0; color: var(--muted); font-size: 14px; }
.bc-desc { margin: 4px 0 0; color: var(--ink); font-size: 14.5px; }
.bc-foot { margin-top: auto; padding-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.price { font-family: var(--font); font-size: 22px; font-weight: 800; color: var(--navy); direction: ltr; text-align: start; }
[dir="rtl"] .price { text-align: end; }
.bc-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.bc-acts .cta { flex: 1 1 140px; }
.bc-acts .btn-soft { flex: 1 1 140px; min-height: 46px; }

.steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: none; }
.steps li { position: relative; padding: 18px 18px 18px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-sm); }
.step-n { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 8px; border-radius: 50%; background: var(--yellow); color: var(--navy); font-family: var(--font); font-weight: 800; }
.steps b { font-size: 16.5px; }
.steps p { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; }

.quiz-band { display: flex; flex-direction: column; gap: 14px; margin-top: 30px; padding: 22px 20px; border-radius: 24px; color: #fff;
  background: radial-gradient(80% 120% at 0% 0%, rgba(255, 213, 74, .22) 0%, rgba(255, 213, 74, 0) 55%), var(--navy); box-shadow: var(--shadow); }
.quiz-band h2 { font-size: 21px; }
.quiz-band p { margin: 4px 0 0; color: var(--navy-ink); }
.quiz-band .cta { width: auto; align-self: flex-start; }

.faq-i { background: #fff; border: 1px solid var(--line); border-radius: 16px; margin-bottom: 10px; box-shadow: var(--shadow-sm); }
.faq-i summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 12px 16px; cursor: pointer; font-weight: 700; list-style: none; }
.faq-i summary::-webkit-details-marker { display: none; }
.faq-i summary::after { content: '+'; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-weight: 700; flex: none; }
.faq-i[open] summary::after { content: '−'; }
.faq-i p { margin: 0; padding: 0 16px 16px; color: var(--muted); }

/* ── Book page ──────────────────────────────────────────────────────── */
.bhero { background: var(--navy); padding: 6px 0 56px; }
.book { position: relative; margin-top: -46px; display: grid; gap: 18px; }
.book-side { display: flex; flex-direction: column; gap: 10px; }
.book-side .cover { background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); max-width: 420px; width: 100%; margin: 0 auto; }
.book-main h1 { font-size: 26px; margin: 10px 0 0; }
.book-sub { margin: 6px 0 0; color: var(--muted); font-size: 16px; }
.desc { margin: 12px 0 0; white-space: pre-line; }
.book-main .trust { margin: 16px 0; box-shadow: var(--shadow-sm); }
.buybox { padding: 20px 18px; display: flex; flex-direction: column; gap: 12px; }
.bb-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); }
.bb-head .k { margin: 0; }
.buy-price { font-family: var(--font); font-size: 30px; font-weight: 800; color: var(--navy); direction: ltr; }
.buybox .fld { margin-bottom: 0; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; line-height: 1.5; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--blue); flex: none; }
.check span { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.check .ic { width: 18px; height: 18px; color: var(--blue); }
.gift-fields { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 16px; background: var(--cream); }
.gift-fields[hidden] { display: none; }
.coupon summary { cursor: pointer; color: var(--blue); font-weight: 600; font-size: 14.5px; min-height: 36px; display: flex; align-items: center; }
.coupon .fld { margin-top: 6px; }
.bb-notes { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bb-notes li { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.bb-notes .ic { width: 17px; height: 17px; margin-top: 2px; color: var(--ok); }

/* ── Personal page (offer) ──────────────────────────────────────────── */
.offer-band h1 { font-size: 26px; }
.offer-band .lede { margin: 6px 0 0; color: var(--navy-ink); }
.offer { display: flex; flex-direction: column; gap: 12px; }
.offer-book { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 14px; align-items: center; }
.offer-book .cover { aspect-ratio: 3 / 4; padding: 6px; background: var(--cream); border-radius: 14px; }
.offer-book h2 { font-size: 18px; margin: 2px 0; }
.offer-book .k { margin-bottom: 0; }
.offer-total { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-radius: 16px; background: var(--blue-soft); }
.offer-total span { font-weight: 700; color: var(--navy); }
.offer-total strong { font-family: var(--font); font-size: 26px; font-weight: 800; color: var(--blue); direction: ltr; }
.offer form { margin: 0; }
.offer-methods { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; font-size: 13.5px; color: var(--muted); }
.offer-methods .ic { width: 16px; height: 16px; color: var(--ok); }
.offer-legal, .offer-help { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }
.offer-all { text-align: center; margin: 18px 0 0; }
.offer-all a { color: var(--muted); font-weight: 600; }

/* ── Solo pages (thanks, legal, quiz, errors) ───────────────────────── */
.solo-wide { max-width: 820px; }
.solo-card { display: flex; flex-direction: column; gap: 12px; }
.solo-card > .cta { width: 100%; }
.solo-card form { margin: 0; }
.order-id { margin: 0; align-self: flex-start; padding: 3px 10px; border-radius: var(--pill); background: #F1F2F7; color: var(--muted); font-family: var(--font); font-size: 12.5px; font-weight: 600; }
.state { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 6px 0; }
.state p { margin: 0; font-weight: 600; }
.state.wait .spin { width: 42px; height: 42px; }
.dl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.dl-list li { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 12px; border: 1px solid var(--line-2); border-radius: 16px; }
.dl-list form { margin: 0; }
.dl-t { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 200px; }
.dl-t > .ic { width: 22px; height: 22px; color: var(--blue); flex: none; }
.dl-t > span { display: flex; flex-direction: column; }
.dl-t small { color: var(--muted); font-size: 12.5px; }
.dl-list .cta { width: auto; }
.legal { white-space: pre-line; line-height: 1.8; font-size: 15px; }

.quiz { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.q { min-width: 0; margin: 0; padding: 14px; border: 1px solid var(--line-2); border-radius: 18px; background: var(--paper); }
.q legend { display: flex; flex-direction: column; gap: 6px; padding: 0; margin-bottom: 10px; font-weight: 700; font-size: 16px; }
.qn { align-self: flex-start; padding: 2px 10px; border-radius: var(--pill); background: var(--navy); color: var(--yellow); font-family: var(--font); font-size: 12px; font-weight: 700; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opt { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 8px 12px; border: 1.5px solid var(--line-2); border-radius: 14px; background: #fff; cursor: pointer; font-weight: 600; }
.opt input { width: 18px; height: 18px; margin: 0; accent-color: var(--blue); flex: none; }
.opt:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.score { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.sec-h3 { font-size: 18px; margin: 6px 0 0; }
.bgrid-one { grid-template-columns: 1fr; }
.alert.live { flex-direction: column; align-items: flex-start; gap: 10px; }

/* ── Bigger screens ─────────────────────────────────────────────────── */
@media (min-width: 640px) {
  .trust { grid-template-columns: repeat(4, 1fr); }
  .book-main .trust { grid-template-columns: 1fr 1fr; }
  .bgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps ol { grid-template-columns: repeat(3, 1fr); }
  .quiz-band { flex-direction: row; align-items: center; justify-content: space-between; padding: 28px 30px; }
  .quiz-band .cta { align-self: center; flex: none; }
  .feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; padding: 22px 28px; }
  .opts { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 900px) {
  .hero { padding: 46px 0 90px; }
  .hero-in { flex-direction: row; text-align: start; justify-content: space-between; gap: 40px; }
  .hero-text { flex: 1; }
  .hero h1 { font-size: 42px; }
  .hero .lede { margin-inline: 0; font-size: 17px; }
  .hero-cta { justify-content: flex-start; }
  .hero-art img { width: 440px; }
  .bgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bgrid-one { grid-template-columns: 1fr; }
  .bcard-wide { flex-direction: row; }
  .bcard-wide .bc-cover { flex: 0 0 42%; }
  .bcard-wide .cover { height: 100%; aspect-ratio: auto; min-height: 300px; }
  .book { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 32px; align-items: start; }
  .book-side { position: sticky; top: 18px; }
  .book-main { padding-top: 56px; }
  .book-main h1 { font-size: 34px; }
  .bhero { padding-bottom: 60px; }
}
@media (max-width: 559px) {
  .mybooks { width: 40px; padding: 0; justify-content: center; }
  .mybooks span { display: none; }
  .lh-end { gap: 6px; }
  .cur select { padding: 0 26px 0 11px; background-position: right 8px center; }
  .lng { padding: 0 11px; }
  #lbChat .chat-fab { min-height: 46px; padding: 0 14px; font-size: 13px; }
  .hero-cta .cta { width: 100%; min-width: 0; }
}
@media (max-width: 359px) {
  .brandmark .bn { display: none; }
}
