/* Знакомство использует палитру, типографику и компоненты продукта. */
#product-preview{width:min(720px,calc(100% - 24px));max-width:720px;max-height:calc(100dvh - 24px);margin:auto;padding:0;border:1px solid var(--line);border-radius:var(--r-lg);background:var(--bg);color:var(--ink);box-shadow:var(--shadow);overflow:auto;overscroll-behavior:contain}
#product-preview::backdrop{background:rgba(64,54,56,.48)}
#product-preview .preview-top{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 20px;background:var(--bg);border-bottom:1px solid var(--line)}
#product-preview .eyebrow{margin:0}
#product-preview .preview-body{padding:22px 20px}
#product-preview section{display:grid;gap:18px;min-width:0}
#product-preview h2{font-size:28px}
#product-preview h3{margin-bottom:12px}
#product-preview .block{min-width:0}
#product-preview .preview-nav{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;border-top:1px solid var(--line)}
#product-preview #preview-return{flex-basis:100%;text-align:center;background:none;border:0;padding:8px}
#product-preview audio,#product-preview video{display:block;width:100%;max-width:100%;margin-top:16px}
#product-preview video{max-height:52dvh;background:#000;border-radius:var(--r-sm)}
#product-preview textarea{display:block;width:100%;min-height:120px;resize:vertical;margin:12px 0}
#product-preview .cta{white-space:normal;max-width:100%;text-align:center}
#product-preview .preview-results{list-style:none;padding:0;margin:0;display:grid;gap:12px}
#product-preview .preview-results li{padding-left:20px;position:relative}
#product-preview .preview-results li:before{content:'—';position:absolute;left:0}
body.preview-open{overflow:hidden}
@media(max-width:500px){#product-preview{width:calc(100% - 12px);max-height:calc(100dvh - 12px)}#product-preview .preview-body,#product-preview .preview-nav{padding:16px 14px}#product-preview .preview-top{padding:10px 14px}#product-preview h2{font-size:25px}#product-preview .block{padding:18px 14px}}

#product-preview [hidden]{display:none!important}
#product-preview .preview-choices{border:0;padding:0;margin:18px 0;min-width:0}
#product-preview .preview-choices legend{font-weight:600;margin-bottom:12px}
#product-preview .preview-option{display:flex;gap:12px;align-items:flex-start;min-height:44px;padding:12px;margin:8px 0;border:1px solid var(--line);border-radius:12px;cursor:pointer;overflow-wrap:anywhere}
#product-preview .preview-option input{flex:0 0 20px;width:20px;height:20px;margin:3px 0 0;accent-color:#526957}
#product-preview .preview-option:has(input:checked){background:#eef3eb;border-color:#526957}
#product-preview .preview-option:focus-within{outline:2px solid #526957;outline-offset:2px}
#product-preview .preview-invitation{display:grid;gap:18px}
#product-preview textarea{box-sizing:border-box;font-size:18px;scroll-margin:90px 0 24px}
@media(max-height:500px){#product-preview .preview-top{position:static}}

/* Both tale files are portrait 9:16; preserve the full frame. */
#product-preview #preview-tale{width:min(100%,360px,29.25dvh);height:auto;aspect-ratio:9/16;max-height:none;object-fit:contain;margin-inline:auto}
#fairytale{width:min(100%,420px,42.1875dvh)!important;height:auto;aspect-ratio:9/16;max-height:none!important;object-fit:contain;margin-inline:auto}
#product-preview .preview-practice{margin-top:22px;padding-top:20px;border-top:1px solid var(--line)}
#product-preview #preview-reflection{margin-top:20px}

/* Presentation follows an already validated server session; never grants access. */
[data-authorized-only]{display:none!important}
body[data-access-open] [data-public-offer]{display:none!important}
body[data-access-open] [data-authorized-only]{display:block!important}
.access-ready .cta{margin-top:16px}
#preview-reaction-note{margin-top:18px;padding:14px;border-left:3px solid var(--ink);background:var(--bg);border-radius:8px}
#preview-explanation p+p{margin-top:14px}

/* TZ34: presentation only; server session remains the sole access gate. */
/* TZ37: only explicitly marked public-offer blocks are hidden after login. */
body[data-access-open] #product-preview{display:none!important}
body[data-access-open] .topbar-actions{flex-wrap:wrap;justify-content:flex-end}
@media(max-width:500px){body[data-access-open] .topbar-actions{flex-basis:100%;justify-content:space-between}}
