/* Живой телефон на главной (demo-app.js). Копия экранов приложения 0.6.4
   по снимкам store/cards-064/src: 04 главная, 07/09 карточка, 13 «Спроси». */

/* ---------- рамка: на ПК крупнее, на телефоне — во весь экран ---------- */
.demo { display: flex; flex-direction: column; align-items: center; }
.demo .phone { width: 340px; max-width: calc(100vw - 32px); box-sizing: border-box; }
.demo .demo-screen { height: 680px; overflow: hidden; padding: 0; }
@media (max-width: 900px) { .demo .demo-screen { height: 600px; } }
.demo-cap { max-width: 340px; text-align: center; margin: 14px 0 0; font-size: 14px; color: var(--muted); line-height: 1.4; }
.demo-cap b { display: block; color: var(--dark); font-size: 15px; margin-bottom: 2px; }
.demo-full { display: none; margin-top: 10px; border: 0; border-radius: 999px; background: var(--dark); color: #fff; font: inherit; font-weight: 700; font-size: 14px; padding: 11px 20px; cursor: pointer; }
@media (max-width: 700px) { .demo-full { display: inline-block; } }
.demo.is-full { position: fixed; inset: 0; z-index: 2147483000; background: #fff; }
.demo.is-full .phone { width: 100%; max-width: none; height: 100%; padding: 0; border-radius: 0; box-shadow: none; }
.demo.is-full .phone-screen { border-radius: 0; height: 100%; }
.demo.is-full .demo-cap { display: none; }
.demo.is-full .demo-full { position: fixed; top: 10px; right: 50%; transform: translateX(50%); z-index: 2147483001; padding: 6px 14px; font-size: 12px; opacity: .85; }
html.demo-locked, html.demo-locked body { overflow: hidden; }

/* ---------- основа ---------- */
.app { position: absolute; inset: 0; z-index: 3; background: #fff; animation: appIn .35s ease; color: #12351f; }
@keyframes appIn { from { opacity: 0; transform: translateY(10px); } }
.app-body { position: absolute; inset: 0; display: flex; flex-direction: column; font-size: 13px; }
.a-scroll { flex: 1; overflow-y: auto; padding: 20px 16px 18px; scrollbar-width: none; }
.a-scroll::-webkit-scrollbar { display: none; }
.app button { font: inherit; color: inherit; cursor: pointer; text-align: left; background: none; border: 0; padding: 0; }
.app svg { display: block; }
.t-good { --tc: #087a3d; --tb: #ddf2d8; }
.t-mid { --tc: #b07d00; --tb: #fcefc7; }
.t-low { --tc: #d04545; --tb: #fbe1e1; }
.sh { box-shadow: 0 4px 14px rgba(18,53,31,.1); }

/* ---------- нижнее меню ---------- */
.a-nav { flex: none; display: flex; align-items: center; justify-content: space-around; height: 62px; border-top: 1px solid #eef1ee; background: #fff; }
.app .n-i { display: flex; flex-direction: column; align-items: center; gap: 3px; color: #5c6b60; font-size: 10.5px; width: 56px; }
.n-i svg { width: 22px; height: 22px; }
.app .n-i.on { color: #087a3d; font-weight: 700; }
.app .n-scan { width: 46px; height: 46px; border-radius: 15px; background: #087a3d; color: #fff; display: flex; align-items: center; justify-content: center; }
.n-scan svg { width: 24px; height: 24px; }

/* ---------- главная ---------- */
.h-top { display: flex; gap: 10px; }
.h-top div { flex: 1; }
.h-top b { font-size: 25px; font-weight: 800; letter-spacing: -.01em; }
.h-top p { margin: 4px 0 0; color: #5c6b60; font-size: 13px; line-height: 1.35; }
.h-top svg { width: 22px; height: 22px; margin-top: 6px; }
.h-search { display: flex; align-items: center; gap: 10px; margin-top: 14px; border-radius: 14px; padding: 12px 14px; background: #fff; box-shadow: 0 2px 10px rgba(18,53,31,.12); color: #5c6b60; }
.h-search svg { width: 20px; height: 20px; flex: none; }
.h-search input { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; font-size: 15px; background: none; color: #12351f; }
.app .h-scan { display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 14px; border-radius: 16px; padding: 12px 14px; background: #12351f; color: #fff; font-weight: 700; font-size: 15px; }
.h-scan span { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; }
.h-scan svg { width: 22px; height: 22px; }
.h-photo { text-align: center; color: #087a3d; font-size: 13px; margin: 12px 0 0; }
.h-h { font-size: 16px; font-weight: 800; margin: 18px 0 8px; }
.h-h small { display: block; font-size: 11.5px; font-weight: 400; color: #5c6b60; margin-top: 2px; }
.h-empty { color: #5c6b60; }
.h-row { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 4px 16px 10px; scrollbar-width: none; }
.h-row::-webkit-scrollbar { display: none; }
.h-row .g-card { flex: 0 0 118px; }
.h-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-bottom: 6px; }
.app .g-card { position: relative; display: flex; flex-direction: column; background: #fff; border-radius: 16px; padding: 10px; box-shadow: 0 3px 12px rgba(18,53,31,.11); }
.g-grade { position: absolute; top: 8px; left: 8px; z-index: 1; width: 22px; height: 22px; border-radius: 50%; background: var(--tc); color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.g-img { height: 82px; display: flex; align-items: center; justify-content: center; }
.g-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.g-card > b { font-size: 12.5px; font-weight: 600; line-height: 1.25; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.g-score { color: #5c6b60; font-size: 11px; margin-top: 4px; }
.g-score b { color: var(--tc); font-size: 18px; font-weight: 800; }
.g-type { align-self: flex-start; margin-top: 6px; font-size: 10.5px; background: #eef2ee; border-radius: 8px; padding: 3px 7px; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ---------- карточка ---------- */
.c-bar-top { display: flex; justify-content: space-between; }
.c-round { width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(18,53,31,.14); display: flex; align-items: center; justify-content: center; color: #12351f; }
.app .c-round { display: flex; }
.c-round.flat { box-shadow: none; width: 30px; }
.c-round svg { width: 21px; height: 21px; }
.c-head { display: flex; gap: 14px; margin-top: 12px; align-items: flex-start; }
.c-photo { flex: none; width: 130px; height: 130px; border-radius: 18px; background: #fff; box-shadow: 0 3px 14px rgba(18,53,31,.12); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.c-photo img { width: 100%; height: 100%; object-fit: contain; }
.c-noimg { color: #5c6b60; font-size: 11px; }
.c-name { min-width: 0; padding-top: 4px; }
.c-name small { display: block; color: #087a3d; font-size: 11.5px; text-transform: uppercase; letter-spacing: .02em; }
.c-name b { display: block; font-size: 19px; line-height: 1.22; font-weight: 700; margin-top: 4px; overflow-wrap: anywhere; }
.c-name span { display: block; color: #5c6b60; font-size: 12.5px; margin-top: 6px; }
.c-expl { color: #5c6b60; font-size: 12px; line-height: 1.38; margin: 12px 0 0; }
.c-score { display: grid; grid-template-columns: 1fr auto auto; align-items: center; column-gap: 8px; margin-top: 10px; border-radius: 16px; padding: 12px 14px 8px; background: linear-gradient(180deg, #fff, #f6f8f6); box-shadow: 0 3px 14px rgba(18,53,31,.11); }
.c-score > span:first-child { font-weight: 600; font-size: 15px; }
.c-grade { width: 26px; height: 26px; border-radius: 50%; background: var(--tb); color: var(--tc); font-style: normal; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.c-score > b { color: var(--tc); font-size: 23px; font-weight: 800; }
.c-score > b small { color: #5c6b60; font-size: 14px; font-weight: 500; }
.c-line { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: #e7ebe7; margin-top: 8px; overflow: hidden; }
.c-line u { display: block; height: 100%; border-radius: 999px; background: var(--tc); animation: barIn .9s cubic-bezier(.22,1,.36,1); }
@keyframes barIn { from { width: 0; } }
.c-scale { grid-column: 1 / -1; display: flex; justify-content: space-between; color: #5c6b60; font-size: 10px; margin-top: 4px; }
.app .c-box { display: block; width: 100%; box-sizing: border-box; background: #fff; border-radius: 16px; padding: 12px 14px; margin-top: 10px; box-shadow: 0 3px 14px rgba(18,53,31,.11); }
.c-boxh { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 15px; }
.c-boxh svg, .c-alt > svg, .c-ask > svg { width: 20px; height: 20px; flex: none; }
.c-why ul { list-style: none; margin: 8px 0 0; padding: 0; }
.c-why li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.35; margin-top: 7px; }
.c-why li i { flex: none; width: 20px; height: 20px; border-radius: 50%; color: #fff; font-style: normal; font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; line-height: 1; }
.c-why li.plus i { background: #087a3d; }
.c-why li.minus i { background: #e3a21a; }
.c-warn { display: flex; gap: 10px; margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: #fdf3d6; color: #7a5a00; font-size: 11.5px; line-height: 1.35; }
.c-warn i { flex: none; width: 20px; height: 20px; border-radius: 50%; background: #e3a21a; color: #fff; font-style: normal; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.app .c-ask { display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box; margin-top: 10px; padding: 11px 14px; border-radius: 16px; border: 2px solid #087a3d; background: linear-gradient(90deg, #fff, #eef8ec); }
.c-ask-l svg { width: 40px; height: 40px; background: #ddf2d8; border-radius: 50%; padding: 5px; box-sizing: border-box; }
.c-ask-t { flex: 1; }
.c-ask-t b { display: block; font-size: 15px; font-weight: 600; }
.c-ask-t small { color: #5c6b60; font-size: 12px; }
.c-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.c-tiles .c-box { display: flex !important; flex-direction: column; gap: 5px; }
.c-tile-h { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 13.5px; }
.c-tile-h svg { width: 17px; height: 17px; color: #087a3d; }
.c-tile-t { font-size: 13px; line-height: 1.35; }
.c-tiles small { color: #5c6b60; font-size: 11.5px; line-height: 1.3; }
.k-row { display: flex; justify-content: space-between; font-size: 12.5px; }
.k-row small { color: #5c6b60; font-size: 12px; }
.k-none { color: #5c6b60; font-size: 12px; }
.app .c-alt { display: flex; justify-content: space-between; align-items: center; }

/* ---------- Спроси СЕКВО ---------- */
.q-top { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.q-top > svg { width: 30px; height: 30px; }
.q-top b { color: #087a3d; font-size: 16px; }
.q-bot { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 10px; }
.q-bot > svg { width: 26px; height: 26px; flex: none; }
.q-bot p { margin: 0; background: #fff; border-radius: 4px 16px 16px 16px; padding: 10px 12px; box-shadow: 0 3px 12px rgba(18,53,31,.1); font-size: 12.5px; line-height: 1.45; white-space: pre-line; }
.q-me { margin: 0 0 10px auto; max-width: 80%; width: fit-content; background: #087a3d; color: #fff; border-radius: 16px 4px 16px 16px; padding: 9px 12px; font-size: 12.5px; }
.q-typing { color: #5c6b60; font-style: italic; }
.q-quick { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding-left: 34px; }
.app .q-quick button { border: 1px solid #5c6b60; border-radius: 999px; padding: 7px 14px; font-size: 12.5px; font-weight: 600; }
.q-form { flex: none; display: flex; gap: 8px; padding: 10px 12px 14px; background: #fff; }
.q-form input { flex: 1; min-width: 0; border: 0; border-radius: 999px; padding: 11px 16px; font: inherit; font-size: 14px; box-shadow: 0 2px 10px rgba(18,53,31,.14); outline: none; }
.app .q-form button { width: 42px; height: 42px; border-radius: 50%; background: #eef2ee; display: flex; align-items: center; justify-content: center; color: #12351f; }
.q-form svg { width: 20px; height: 20px; }

/* ---------- шторки ---------- */
.app-sheet { position: absolute; inset: 0; background: rgba(10,25,15,.35); display: flex; align-items: flex-end; z-index: 5; }
.app-sheet[hidden] { display: none; }
.s-panel { width: 100%; max-height: 82%; overflow-y: auto; background: #fff; border-radius: 22px 22px 0 0; padding: 8px 16px 16px; box-sizing: border-box; animation: sheetUp .3s cubic-bezier(.22,1,.36,1); font-size: 13px; }
@keyframes sheetUp { from { transform: translateY(100%); } }
.s-grip { display: block; width: 36px; height: 4px; border-radius: 4px; background: #d5dbd5; margin: 0 auto 12px; }
.s-h { display: block; font-size: 17px; font-weight: 800; margin-bottom: 10px; }
.s-pil { display: grid; grid-template-columns: auto 1fr; column-gap: 6px; margin-bottom: 10px; font-size: 12.5px; }
.s-pil span { font-weight: 600; }
.s-pil b { text-align: right; color: #5c6b60; font-weight: 600; }
.s-pil i { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: #e7ebe7; margin-top: 5px; overflow: hidden; }
.s-pil u { display: block; height: 100%; background: #087a3d; border-radius: 999px; }
.s-sub { font-weight: 800; margin: 12px 0 4px; }
.s-f { margin: 4px 0; font-weight: 600; }
.s-f.plus { color: #05602f; }
.s-f.minus { color: #9a6a00; }
.s-comp { line-height: 1.6; margin: 0; }
.s-comp .att { background: #fcefc7; border-radius: 4px; padding: 0 2px; }
.s-note { color: #5c6b60; font-size: 12px; }
.app .s-alt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 0; border-bottom: 1px solid #eef1ee; }
.s-alt img, .s-alt > span:first-child { width: 46px; height: 46px; object-fit: contain; flex: none; }
.s-alt > span { flex: 1; min-width: 0; }
.s-alt b { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.25; }
.s-alt small { color: #087a3d; font-size: 11px; }
.s-alt em { font-style: normal; font-weight: 800; color: var(--tc); font-size: 16px; }
.app .s-close { display: block; width: 100%; margin-top: 14px; border-radius: 12px; padding: 11px; background: #eef5ec; font-weight: 700; text-align: center; color: #087a3d; }

@media (prefers-reduced-motion: reduce) {
  .app, .s-panel, .c-line u { animation: none; }
}
.demo .res { padding: 18px 14px; }

/* ---------- камера ---------- */
.cam { position: absolute; inset: 0; background: #0b1d12; }
.cam video { width: 100%; height: 100%; object-fit: cover; }
.cam-frame { position: absolute; left: 12%; right: 12%; top: 38%; height: 22%; border: 3px solid #6ee7a0; border-radius: 18px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.cam-hint { position: absolute; left: 16px; right: 16px; bottom: 40px; text-align: center; color: #fff; font-size: 14px; font-weight: 600; }
.app .cam-x { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; font-size: 18px; text-align: center; }
.cam-miss { text-align: center; padding-top: 30px; }
.cam-miss svg { width: 80px; height: 80px; margin: 0 auto 12px; }
.cam-miss b { font-size: 17px; }
.cam-miss p { color: #5c6b60; }
.demo.is-full .a-scroll { padding-top: 52px; }
/* Лупа стоит над подписью и поверх края телефона, а не под ним. */
.phone-wrap .lupa-wrap { bottom: 118px; z-index: 6; }
@media (min-width: 1121px) { .phone-wrap .lupa-wrap { left: -36px; } }
@media (max-width: 1120px) and (min-width: 901px) { .phone-wrap .lupa-wrap { left: -40px; } }
@media (max-width: 900px) { .phone-wrap .lupa-wrap { right: -8px; bottom: 150px; } }

/* ---------- анимации как в приложении ---------- */
.go-fwd { animation: goFwd .32s cubic-bezier(.22,1,.36,1); }
.go-back { animation: goBack .32s cubic-bezier(.22,1,.36,1); }
.go-fade { animation: goFade .25s ease; }
@keyframes goFwd { from { transform: translateX(36px); opacity: 0; } }
@keyframes goBack { from { transform: translateX(-36px); opacity: 0; } }
@keyframes goFade { from { opacity: 0; } }
.go-fwd .c-head, .go-fwd .c-expl, .go-fwd .c-score, .go-fwd .c-box, .go-fwd .c-ask, .go-fwd .c-tiles,
.h-row .g-card, .h-list .g-card, .q-quick button { animation: rise .45s cubic-bezier(.22,1,.36,1) backwards; }
.go-fwd .c-expl { animation-delay: .04s; } .go-fwd .c-score { animation-delay: .08s; }
.go-fwd .c-why { animation-delay: .12s; } .go-fwd .c-ask { animation-delay: .16s; }
.go-fwd .c-tiles { animation-delay: .2s; } .go-fwd .c-alt { animation-delay: .24s; }
.g-card:nth-child(2) { animation-delay: .04s; } .g-card:nth-child(3) { animation-delay: .08s; }
.g-card:nth-child(4) { animation-delay: .12s; } .g-card:nth-child(n+5) { animation-delay: .16s; }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } }
.q-bot, .q-me { animation: rise .35s cubic-bezier(.22,1,.36,1) backwards; }
.app button { transition: transform .12s ease, filter .12s ease; -webkit-tap-highlight-color: transparent; }
.app button:active { transform: scale(.96); filter: brightness(.96); }
.app .n-scan:active, .app .h-scan:active { transform: scale(.93); }
.app .g-card:hover, .app .c-box:hover, .app .c-ask:hover { box-shadow: 0 6px 18px rgba(18,53,31,.16); }
.app-sheet:not([hidden]) { animation: goFade .25s ease; }
@media (prefers-reduced-motion: reduce) {
  .go-fwd, .go-back, .go-fade, .go-fwd *, .g-card, .q-bot, .q-me, .q-quick button { animation: none !important; }
}
/* Лупа левее, текст меняется плавно. */
.phone-wrap .lupa-say { transition: opacity .35s ease, transform .35s ease; }
.phone-wrap .lupa-say.is-swap { opacity: 0; transform: translateX(-50%) translateY(6px); }
@media (min-width: 1121px) { .phone-wrap .lupa-wrap { left: -68px; } }
@media (max-width: 1120px) and (min-width: 901px) { .phone-wrap .lupa-wrap { left: -50px; } }
