/* GLPath — квиз. Цвета, шрифты и базовые элементы — из /app/style.css (как в приложении). */
body { background: var(--page); }
#quiz { max-width: var(--col); margin: 0 auto; min-height: 100dvh; background: var(--bg); position: relative; display: flex; flex-direction: column; }
.qwrap { flex: 1; display: flex; flex-direction: column; padding: 0 20px calc(120px + env(safe-area-inset-bottom, 0px)); }
/* Смена вопроса: лёгкий сдвиг и проявление (только transform/opacity — дёшево для телефона). */
.qwrap.q-in .qbody, .qwrap.q-in .qintro { animation: qin .34s cubic-bezier(.22,.8,.24,1) both; }
.qwrap.q-in-back .qbody { animation: qinb .34s cubic-bezier(.22,.8,.24,1) both; }
.qwrap.q-in .qopt, .qwrap.q-in-back .qopt { animation: qrise .38s cubic-bezier(.22,.8,.24,1) backwards; }
.qwrap .qopt:nth-child(2) { animation-delay: .03s; } .qwrap .qopt:nth-child(3) { animation-delay: .06s; } .qwrap .qopt:nth-child(4) { animation-delay: .09s; }
.qwrap .qopt:nth-child(5) { animation-delay: .12s; } .qwrap .qopt:nth-child(n+6) { animation-delay: .15s; }
@keyframes qin { from { opacity: 0; transform: translate3d(16px,0,0); } to { opacity: 1; transform: none; } }
@keyframes qinb { from { opacity: 0; transform: translate3d(-16px,0,0); } to { opacity: 1; transform: none; } }
@keyframes qrise { from { opacity: 0; transform: translate3d(0,8px,0); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .qwrap *, .qsteps li, .qspin { animation: none !important; transition: none !important; } }

/* шапка */
.qhead { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 12px 0 10px; background: var(--bg); }
.qback { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); flex: none; }
.qback[hidden] { visibility: hidden; display: grid !important; }
.qprog { flex: 1; height: 6px; border-radius: 3px; background: var(--muted); overflow: hidden; }
.qprog u { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .35s ease; }
.qlogo { display: flex; align-items: center; gap: 8px; flex: none; }
.qlogo img { border-radius: 8px; display: block; }
.qlogo.big b { font-size: 22px; font-weight: 700; }

/* заголовки */
.qbody { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }
.qtitle { font-size: 28px; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; text-wrap: balance; margin: 0; }
.qbody .eyebrow { color: var(--accent); letter-spacing: .08em; }
.qbody > .sub { margin-top: -4px; }

/* варианты ответа */
.qopts { display: flex; flex-direction: column; gap: 10px; padding-top: 8px; }
.qopt { display: flex; flex-direction: column; width: 100%; padding: 14px 16px; border-radius: var(--rs); background: var(--surface); border: 2px solid transparent; text-align: left; transition: border-color .2s ease, background-color .2s ease, transform .15s ease; -webkit-tap-highlight-color: transparent; }
.qopt:active { transform: scale(.985); }
.qopt.on { border-color: var(--accent); background: var(--accent-soft); }
.qrow { display: flex; align-items: center; gap: 12px; min-height: 32px; width: 100%; }
.qopt b { display: block; font-size: 17px; font-weight: 600; }
.qopt small { display: block; font-size: 14px; color: var(--t2); margin-top: 2px; }
/* Пояснение внутри выбранной карточки: плавно раскрывается по высоте (grid 0fr → 1fr). */
.qexp { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .3s cubic-bezier(.22,.8,.24,1), opacity .25s ease, margin .3s ease; }
.qexp > span { overflow: hidden; font-size: 15px; line-height: 1.45; color: #3a3a3c; }
.qexp b { display: block; font-size: 15px; margin-bottom: 2px; color: var(--ink); }
.qopt.on .qexp { grid-template-rows: 1fr; opacity: 1; margin-top: 10px; }
.qnote { font-size: 13px; color: var(--t2); margin: 4px 2px 0; line-height: 1.4; }
.qart { width: 44px; height: 44px; border-radius: 12px; background: var(--raised); display: grid; place-items: center; flex: none; }
.qtick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--t3); display: grid; place-items: center; flex: none; color: #fff; transition: background-color .2s ease, border-color .2s ease, transform .2s cubic-bezier(.3,1.6,.5,1); }
.qopt.on .qtick { transform: scale(1.08); }
.qtick svg { animation: qpop .22s ease both; }
@keyframes qpop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
.qopt.on .qtick { background: var(--accent); border-color: var(--accent); }
.qopt[role=checkbox] .qtick { border-radius: 7px; }
.qselect select { font: inherit; border: 0; background: var(--raised); border-radius: 10px; padding: 8px 10px; max-width: 55%; }

/* большие числовые поля */
.qbig { display: flex; align-items: baseline; justify-content: center; gap: 8px; padding: 28px 0 8px; }
.qbig input { width: 3.6ch; font-size: 56px; font-weight: 700; text-align: center; border: 0; border-bottom: 2px solid var(--sep); background: transparent; padding: 0 0 4px; outline: none; -moz-appearance: textfield; }
.qbig input:focus { border-bottom-color: var(--accent); }
.qbig input::-webkit-outer-spin-button, .qbig input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qbig.qbig-two input { width: 2.2ch; }
.qbig span { font-size: 20px; color: var(--t2); font-weight: 600; }
.qseg { align-self: center; margin-top: 8px; }
.qseg button { padding: 8px 18px; font-size: 15px; }

/* факты и сборка */
.qfact { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding-top: 40px; }
.qfact .eyebrow { color: var(--accent); letter-spacing: .08em; }
.qbuild { display: flex; flex-direction: column; align-items: center; gap: 18px; padding-top: 48px; text-align: center; }
.qspin { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); animation: qpulse 1.4s ease-in-out infinite; }
@keyframes qpulse { 50% { transform: scale(1.06); } }
.qsteps { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 10px; }
.qsteps li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--rs); background: var(--surface); opacity: 0; animation: qstep .4s ease forwards; text-align: left; }
.qsteps li span { flex: 1; font-weight: 600; }
.qsteps li i { color: var(--sage); }
@keyframes qstep { to { opacity: 1; } }

/* план */
.qtiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qtile { background: var(--surface); border-radius: var(--rs); padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.qtile small { color: var(--t2); font-size: 13px; }
.qtile b { font-size: 19px; }
.qday { background: var(--surface); }
.qmeal { display: flex; align-items: center; gap: 12px; }
.qmeal .thumb { width: 56px; height: 56px; border-radius: 14px; overflow: hidden; background: var(--raised); display: grid; place-items: center; flex: none; }
.qmeal .thumb img.ph { width: 100%; height: 100%; object-fit: cover; }
.qmeal b { display: block; font-size: 16px; line-height: 1.25; }
.qmeal small { display: block; font-size: 13px; color: var(--t2); }
.qchip { font-size: 12px; font-weight: 700; color: var(--sage); background: color-mix(in srgb, var(--sage) 14%, white); border-radius: 99px; padding: 4px 10px; }

/* вступление */
.qintro { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding-top: 16px; }
.qintro h1 { font-size: 34px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; margin: 0; }
.qhero { position: relative; width: 300px; height: 280px; display: grid; place-items: center; }
.qhero::before { content: ""; position: absolute; inset: 30px; border-radius: 50%; background: radial-gradient(circle, var(--accent-soft), transparent 70%); }
.qhero > img { position: relative; }
.qhero span { position: absolute; width: 76px; height: 76px; border-radius: 22px; background: var(--raised); box-shadow: 0 8px 24px rgba(0,0,0,.08); display: grid; place-items: center; }
.qhero .s1 { left: 6px; top: 22px; } .qhero .s2 { right: 4px; top: 40px; } .qhero .s3 { left: 22px; bottom: 18px; } .qhero .s4 { right: 18px; bottom: 6px; }

/* оплата */
.qbody.pay { gap: 14px; }
.qtimer { align-self: center; background: var(--accent-soft); color: var(--accent); border-radius: 99px; padding: 8px 16px; font-size: 15px; }
.qtimer b { font-variant-numeric: tabular-nums; }
.qwins { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.qwins li { display: flex; align-items: center; gap: 12px; font-size: 16px; }
.qplans { display: flex; flex-direction: column; gap: 12px; padding-top: 6px; }
.qplan { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 18px 16px 16px; border-radius: var(--rb); background: var(--surface); border: 2px solid transparent; text-align: left; }
.qplan.on { border-color: var(--accent); background: var(--accent-soft); }
.qplan b { display: block; font-size: 17px; }
.qplan small { display: block; font-size: 14px; color: var(--t2); margin-top: 2px; }
.qplan s { color: var(--t3); }
.qradio { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--t3); display: grid; place-items: center; color: #fff; flex: none; }
.qplan.on .qradio { background: var(--accent); border-color: var(--accent); }
.qper { text-align: right; flex: none; }
.qper b { font-size: 20px; } .qper small { font-size: 12px; }
.qbadge { position: absolute; top: -10px; left: 16px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .06em; border-radius: 99px; padding: 3px 10px; }
.qtrial { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; margin: 2px 0 0; }
.qterms { text-align: left; line-height: 1.5; font-size: 12px; color: var(--t2); }
.qterms a, .fine a { color: var(--accent); }
.qfaq details { border-top: 1px solid var(--sep); padding: 12px 0; }
.qfaq summary { font-weight: 600; cursor: pointer; }
.qfaq p { color: var(--t2); font-size: 15px; margin: 8px 0 0; }

/* нижняя кнопка */
.qbar { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(var(--col), 100%); padding: 12px 20px calc(14px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to top, var(--bg) 70%, rgba(255,255,255,0)); display: flex; flex-direction: column; gap: 8px; z-index: 6; }
.qbar.hide { display: none; }
.qbar .fine { margin: 0; }
.step-paywall ~ .qbar .btn-primary { background: var(--accent); }

/* фон на телефоне — белый, как в приложении (нет серой полосы под статус-баром) */
@media (max-width: 480px) { html, body { background: var(--bg); } }

/* числа: ввод, −/+, линейка, пропуск */
.qmeasure { display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--surface); border-radius: var(--r); padding: 16px 14px 12px; margin-top: 4px; transition: opacity .2s; }
.qmeasure.dim { opacity: .45; }
.qmeasure .qbig { padding: 6px 0 2px; }
.qstep { width: 44px; height: 44px; border-radius: 50%; background: var(--raised); box-shadow: 0 1px 4px rgba(0,0,0,.08); display: grid; place-items: center; flex: none; align-self: center; }
.qstep:active { transform: scale(.94); }
.qruler { width: 100%; accent-color: var(--accent); height: 28px; }
.qruler.big { height: 36px; }
.qhint { font-size: 12px; color: var(--t3); margin: 0; }
.qskip { align-self: center; display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; color: var(--accent); padding: 10px 14px; border-radius: 99px; }
.qskip.on { background: var(--accent-soft); }
.qerr[hidden] { display: none !important; }

/* срок */
.qtempo { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 6px; text-align: center; }
.qdate { font-size: 30px; font-weight: 800; letter-spacing: -.01em; }
.qchart svg { width: 100%; height: auto; display: block; }
.qhorizon { display: flex; gap: 4px; }
.qhorizon span { background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; text-align: center; padding: 10px 4px; border-radius: 10px; transition: flex .3s ease; }
.qhorizon span:first-child { background: var(--accent); color: #fff; }
.qbigval { font-size: 26px; }
.qdot { width: 8px; height: 8px; border-radius: 50%; background: var(--t3); display: inline-block; }
.qdot.acc { background: var(--accent); width: 14px; height: 4px; border-radius: 2px; }
.qchip.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, white); }

/* информационные экраны */
.qinfo { display: flex; flex-direction: column; gap: 12px; }
.qinfo > .qchip { align-self: flex-start; }
.qfield { padding: 6px 0; }
.qchecks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 15px; color: var(--t2); }
.qchecks li { display: flex; align-items: center; gap: 8px; } .qchecks .ic { color: var(--sage); }
.qintro .eyebrow { color: var(--accent); letter-spacing: .08em; }

/* витрина функций */
.qtabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 2px 20px; }
.qtabs::-webkit-scrollbar { display: none; }
.qtabs button { flex: none; padding: 8px 14px; border-radius: 99px; background: var(--surface); font-size: 14px; font-weight: 600; color: var(--t2); transition: background-color .2s, color .2s; }
.qtabs button.on { background: var(--ink); color: #fff; }
.qfeature { display: flex; flex-direction: column; gap: 8px; animation: qrise .3s cubic-bezier(.22,.8,.24,1) backwards; }
.qh2 { font-size: 22px; font-weight: 700; line-height: 1.2; margin: 0; }
.qpros { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.qpros li { display: flex; align-items: center; gap: 8px; } .qpros .ic { color: var(--sage); }
.qline { font-size: 15px; font-weight: 600; color: var(--accent); margin: 2px 0; }
.qchips { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.qchips span { background: var(--raised); border-radius: 99px; padding: 6px 12px; font-size: 14px; }
.qstrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.qd { display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: 10px; background: var(--raised); }
.qd small { font-size: 11px; color: var(--t2); } .qd b { font-size: 15px; }
.qd.soft { background: color-mix(in srgb, var(--sage) 16%, white); }
.qbox { width: 16px; height: 16px; border-radius: 5px; border: 2px solid var(--t3); display: inline-block; flex: none; }
