/* Screen-specific styles. Mobile first; wide (website) overrides live in container queries at the bottom. */

/* ---------- public website: hero and footer ---------- */
.site-hero { display: flex; flex-direction: column; gap: 10px; padding: 8px 0 4px; }
.site-hero h1 { font-size: 30px; }
.site-hero p { font-size: 17px; color: var(--ink-2); max-width: 46ch; }
.site-foot { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.site-foot > div { display: flex; flex-direction: column; gap: 2px; }
.site-foot b { color: var(--ink); font-weight: 600; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.site-foot a { color: var(--ink-2); }

/* ---------- home ---------- */
.greet { display: flex; align-items: center; gap: 12px; }
.greet .ava { width: 44px; height: 44px; border-radius: 50%; background: var(--accent-strong); color: var(--accent-ink); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; flex: none; }
.greet-t { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.greet-t span { font-size: 13px; color: var(--ink-2); }
.greet-t b { font-family: var(--font-display); font-weight: 600; font-size: 17px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hero-rail { display: grid; grid-auto-flow: column; grid-auto-columns: 86%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); scroll-padding-inline: var(--gutter); }
.hero-rail::-webkit-scrollbar { display: none; }
.hero-rail > * { scroll-snap-align: start; cursor: pointer; }
.hero-rail .banner { aspect-ratio: 4 / 3; }
.hero-rail .banner-title { font-size: 22px; }
.dots { display: flex; gap: 6px; justify-content: center; }
.dots i { width: 6px; height: 6px; border-radius: 99px; background: var(--line); transition: width .2s, background .2s; }
.dots i.on { width: 18px; background: var(--accent); }
.continue { display: grid; grid-template-columns: 64px minmax(0, 1fr) 44px; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px; cursor: pointer; }
.continue:active { background: var(--press); }
.continue .banner { aspect-ratio: 1; border-radius: 12px; }
.continue .banner-txt, .continue .banner-top { display: none; }
.continue-meta { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.continue-meta b { font-weight: 600; font-size: 14px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.play-dot { width: 44px; height: 44px; border-radius: 50%; background: var(--accent-strong); color: var(--accent-ink); display: grid; place-items: center; }
.play-dot svg { width: 18px; height: 18px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
.chips::-webkit-scrollbar { display: none; }
.chips button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; min-height: 40px; padding: 6px 14px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.chips button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; cursor: pointer; min-width: 0; transition: transform .12s; }
.card:active { transform: scale(.985); }
.card .banner { border-radius: 0; }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-meta { display: flex; gap: 6px 12px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; align-items: center; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 4px; }
.price { font-family: var(--font-display); font-weight: 700; font-size: 17px; white-space: nowrap; }
.price s { font-family: var(--font-body); font-weight: 400; font-size: 13px; color: var(--ink-2); margin-left: 6px; }

/* ---------- landing ---------- */
.landing { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.landing-main { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.landing-aside { display: none; }
.l-hero { display: flex; flex-direction: column; gap: 14px; }
.l-hero .banner { aspect-ratio: 4 / 3; }
.l-hero .banner-title { font-size: 25px; }
.l-price { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.l-price .price { font-size: 22px; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat b { font-family: var(--font-display); font-size: 15px; font-weight: 600; }
.stat span { font-size: 13px; color: var(--ink-2); }
.checks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr; gap: 10px; }
.checks li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.checks li::before { content: ""; width: 22px; height: 22px; border-radius: 7px; background: var(--ok-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F9950' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 14px no-repeat; }
.checks.who li::before { background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F2541B' stroke-width='3' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / 14px no-repeat; }
.next-hint { font-size: 13px; color: var(--ink-2); display: flex; gap: 8px; align-items: flex-start; }
.next-hint .ico { width: 18px; height: 18px; margin-top: 1px; }
.author { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 14px; align-items: start; }
.author .ava-lg { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 20px; color: #fff; background: linear-gradient(140deg, var(--accent), #8C1F4A); }
.reviews { display: grid; grid-auto-flow: column; grid-auto-columns: 84%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 2px; scroll-padding-inline: var(--gutter); }
.reviews::-webkit-scrollbar { display: none; }
.review { scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.stars { color: #F5A524; letter-spacing: 2px; font-size: 14px; }
details.faq { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 0 14px; }
details.faq + details.faq { margin-top: 8px; }
details.faq summary { cursor: pointer; padding: 14px 0; min-height: 48px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--ink-2); }
details.faq[open] summary::after { content: "−"; }
details.faq p { padding-bottom: 14px; color: var(--ink-2); }
.owned { display: flex; flex-direction: column; gap: 10px; background: var(--ok-soft); border-radius: var(--r-lg); padding: 14px; }
.owned-head { display: flex; align-items: center; gap: 8px; color: var(--ok-text); font-weight: 700; }
.buycard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.buycard .price { font-size: 26px; }
.incl { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.incl li { display: flex; gap: 8px; align-items: center; }
.incl li svg { width: 18px; height: 18px; color: var(--ok); }

/* ---------- course content blocks ---------- */
.hero-rail.single { grid-auto-columns: 100%; }
.quote { margin: 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--accent); font-family: var(--font-display); font-weight: 500; font-size: 17px; line-height: 1.35; text-wrap: pretty; }
.gloss { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.gloss > div { background: var(--surface); padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.gloss b { font-weight: 600; }
.gloss span { font-size: 14px; color: var(--ink-2); }
.blocks { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.blocks li::marker { color: var(--ink-2); font-family: var(--font-mono); font-size: 13px; }
details.faq.promo { border: 0; padding: 0; background: none; }
details.faq.promo summary { color: var(--accent); font-weight: 500; padding: 10px 0; min-height: 44px; }
details.faq.promo summary::after { content: ""; }

.soon { display: grid; grid-template-columns: 1fr; gap: 8px; }
.soon > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 12px 14px; border: 1px dashed var(--line); border-radius: var(--r-md); background: var(--surface); }
.soon b { font-weight: 600; }
.soon span.sub { grid-column: 1; font-size: 13px; color: var(--ink-2); }
.soon .badge { grid-row: 1 / span 2; grid-column: 2; }
.practice { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--r-lg); background: var(--accent-soft); }
.practice .eyebrow { color: var(--accent); }
.practice b { font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.practice .btn { align-self: flex-start; }
.practice.dim { opacity: .75; }

/* ---------- program: lectures → episodes ---------- */
.mods { display: flex; flex-direction: column; gap: 8px; }
details.mod { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
details.mod > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; min-height: 60px; }
details.mod > summary::-webkit-details-marker { display: none; }
details.mod > summary:active { background: var(--press); }
.mod-num { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); font-family: var(--font-display); font-weight: 700; font-size: 15px; }
details.mod[open] .mod-num { background: var(--accent-strong); color: var(--accent-ink); }
.mod-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mod-t b { font-weight: 600; font-size: 15px; line-height: 1.3; }
.mod-t span { font-size: 13px; color: var(--ink-2); }
.mod-lock { width: 18px; height: 18px; color: var(--ink-2); }
.mod-desc { padding: 0 14px 12px; font-size: 14px; color: var(--ink-2); }
.lessons.flat { border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.lessons.flat .lesson { padding-left: 20px; min-height: 52px; }
.lessons.flat .lesson .num { width: 30px; height: 30px; border-radius: 9px; font-size: 12px; }
.card.big .banner { aspect-ratio: 4 / 3; }
.card.big .banner-title { font-size: 26px; }
.grid.few { grid-template-columns: 1fr; }
.legal { display: flex; flex-wrap: wrap; gap: 6px 14px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12px; }
.legal a { color: var(--ink-2); }
.consents { display: flex; flex-direction: column; gap: 10px; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 13px; line-height: 1.4; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent-strong); }
.eps-edit { display: flex; flex-direction: column; gap: 8px; }
.ep-edit { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); }
.ep-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 72px; gap: 8px; align-items: center; }
.ep-row .num { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; font-family: var(--font-mono); font-size: 12px; }
.ep-row2 { display: grid; grid-template-columns: 1fr; gap: 8px; }

.checkin { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--r-lg); background: var(--accent-soft); }
.checkin .eyebrow { color: var(--accent); }
.checkin b { font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.checkin-row { display: flex; gap: 8px; flex-wrap: wrap; }
.checkin-row .btn { flex: 1 1 auto; background: var(--surface); }
.p-next { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(0,0,0,.7); text-align: center; }
.p-next > div { display: flex; flex-direction: column; gap: 8px; align-items: center; padding: 12px; max-width: 320px; }
.p-next b { font-size: 16px; }

.p-choice { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; background: rgba(6,8,16,.78); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.p-choice > div { display: flex; flex-direction: column; gap: 8px; align-items: stretch; width: min(300px, 86%); text-align: center; }
.p-choice b { font-size: 16px; }
.p-choice .btn { min-height: 40px; }
.p-choice .btn:not(.primary) { background: rgba(255,255,255,.14); color: #fff; }
.p-choice .check { color: rgba(255,255,255,.85); justify-content: center; grid-template-columns: 20px auto; justify-self: center; }
.p-choice-hint { font-size: 12px; color: rgba(255,255,255,.7); }
.p-launch { position: absolute; inset: 0; z-index: 6; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(6,8,16,.35); color: #fff; font-size: 13px; font-weight: 600; text-shadow: 0 1px 6px rgba(0,0,0,.6); cursor: pointer; }
.link-row { display: flex; align-items: center; gap: 4px 12px; flex-wrap: wrap; }
.link-btn { align-self: flex-start; border: 0; background: none; padding: 6px 0; min-height: 36px; color: var(--ink-2); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.handoff-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 calc(var(--gutter) * -1); padding: 8px var(--gutter); background: var(--ok-soft); color: var(--ok-text); font-size: 13px; font-weight: 600; }
.handoff-bar span { display: flex; align-items: center; gap: 6px; }
.handoff-bar .ico { width: 16px; height: 16px; }
.steps { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.steps li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; color: var(--ink-2); }
.steps li::before { content: ""; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; border: 2px solid var(--line); }
.steps li.done { color: var(--ink); }
.steps li.done::before { border-color: var(--ok); background: var(--ok); box-shadow: inset 0 0 0 3px var(--surface); }

/* ---------- checkout ---------- */
.co-head { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: center; }
.co-head .banner { aspect-ratio: 1; border-radius: 14px; }
.co-head .banner-txt, .co-head .banner-top { display: none; }
.pay-opt { display: grid; grid-template-columns: 40px 1fr 22px; gap: 12px; align-items: center; border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 12px; min-height: 64px; cursor: pointer; background: none; text-align: left; width: 100%; }
.pay-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.pay-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-weight: 700; font-size: 17px; background: var(--surface-2); }
.radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); }
.pay-opt.on .radio { border: 7px solid var(--accent); }
.tg-invoice { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 6px 0; }
.tg-invoice .star-big { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 34px; background: linear-gradient(140deg, #FFD54A, #F5A524); }
.tg-balance { display: flex; justify-content: space-between; width: 100%; font-size: 13px; color: var(--ink-2); padding: 10px 12px; background: var(--surface-2); border-radius: 12px; }
.success { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 8px 0 4px; }
.success-ico { width: 72px; height: 72px; border-radius: 50%; background: var(--ok-soft); color: var(--ok-text); display: grid; place-items: center; animation: pop .35s cubic-bezier(.2,1.6,.4,1); }
.success-ico svg { width: 36px; height: 36px; stroke-width: 2.6; }

/* ---------- learn ---------- */
.learn { display: flex; flex-direction: column; gap: 16px; }
.learn-main { display: contents; }
.player-wrap { position: sticky; top: calc(var(--sat) + var(--head-h)); z-index: 12; background: #000; }
.player { position: relative; aspect-ratio: 16 / 9; max-width: 100%; overflow: hidden; background: #000; color: #fff; }
.player video { width: 100%; height: 100%; display: block; background: #000; }
.player .banner { position: absolute; inset: 0; border-radius: 0; aspect-ratio: auto; }
.player .banner-txt, .player .banner-top { display: none; }
.p-center { position: absolute; inset: 0; display: grid; place-items: center; }
.p-play { width: 68px; height: 68px; border-radius: 50%; border: 0; background: rgba(255,255,255,.94); color: #111; display: grid; place-items: center; box-shadow: 0 8px 30px rgba(0,0,0,.35); transition: opacity .2s; }
.p-play svg { width: 28px; height: 28px; }
.p-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.75)); display: flex; flex-direction: column; gap: 8px; }
.p-track { height: 4px; border-radius: 99px; background: rgba(255,255,255,.25); overflow: hidden; }
.p-track i { display: block; height: 100%; background: var(--accent); }
.p-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12px; }
.p-row button { border: 0; background: rgba(255,255,255,.16); color: #fff; border-radius: 8px; min-height: 36px; min-width: 36px; padding: 4px 10px; font-size: 12px; display: inline-grid; place-items: center; }
.p-row button svg { width: 16px; height: 16px; }
.p-ctrl { display: flex; gap: 6px; align-items: center; }
.wm { position: absolute; z-index: 3; left: 8%; top: 20%; font: 600 11px/1 var(--font-mono); letter-spacing: .08em; color: rgb(160,160,160); pointer-events: none; white-space: nowrap; opacity: 0; transition: opacity .8s ease; }
.p-lesson { position: absolute; top: 10px; left: 10px; max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; }
.p-locked { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.6); }
.p-locked > div { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 12px; max-width: 360px; }
.lesson-head { display: flex; flex-direction: column; gap: 6px; }
.lesson-head h1 { font-size: 21px; }
.materials { display: flex; flex-direction: column; gap: 8px; }
.material { display: flex; gap: 10px; align-items: center; min-height: 48px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: var(--r-sm); font-size: 14px; background: none; text-align: left; width: 100%; }
.chat-card { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; }
.chat-ico { width: 44px; height: 44px; border-radius: 12px; background: #2AABEE; color: #fff; display: grid; place-items: center; }
.chat-ico svg { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.course-prog { display: flex; flex-direction: column; gap: 6px; }

/* ---------- my, profile ---------- */
.mc { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px; cursor: pointer; }
.mc:active { background: var(--press); }
.mc .banner { border-radius: 12px; aspect-ratio: 1; }
.mc .banner-txt, .mc .banner-top { display: none; }
.mc-meta { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mc-meta b { font-weight: 600; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.profile-head { display: flex; gap: 14px; align-items: center; }
.profile-head .ava-lg { width: 60px; height: 60px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-family: var(--font-display); font-size: 22px; font-weight: 700; flex: none; }
.menu { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.menu button, .menu a { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 52px; padding: 10px 14px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; color: var(--ink); text-decoration: none; width: 100%; }
.menu > :first-child { border-top: 0; }
.menu button:active, .menu a:active { background: var(--press); }
.menu .mi { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); }
.menu .mi svg { width: 16px; height: 16px; }
.menu .chev { color: var(--ink-2); width: 18px; height: 18px; }

/* ---------- admin ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile b { font-family: var(--font-display); font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile span { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; hyphens: auto; }
.adm-list { display: flex; flex-direction: column; gap: 10px; }
.adm-course { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px; }
.adm-course .banner { border-radius: 12px; aspect-ratio: 1; }
.adm-course .banner-txt, .adm-course .banner-top { display: none; }
.adm-course-meta { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.adm-course-meta b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.sales { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.sale { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 14px; }
.sale:first-child { border-top: 0; }
.sale b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sale .amt { font-family: var(--font-mono); text-align: right; white-space: nowrap; }
.sale .sub { font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.presets button { aspect-ratio: 16 / 9; border-radius: 10px; border: 3px solid transparent; position: relative; overflow: hidden; padding: 0; }
.presets button.on { border-color: var(--accent); }
.drop { border: 1.5px dashed var(--line); border-radius: var(--r-md); padding: 16px; text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; color: var(--ink-2); font-size: 14px; cursor: pointer; min-height: 48px; }
.drop.over { border-color: var(--accent); color: var(--ink); }
.list-edit { display: flex; flex-direction: column; gap: 8px; }
.list-edit .li { display: grid; grid-template-columns: minmax(0, 1fr) 40px; gap: 8px; }
.les-edit { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.les-edit > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; min-height: 52px; }
.les-edit > summary::-webkit-details-marker { display: none; }
.les-edit > summary .num { width: 32px; height: 32px; border-radius: 9px; background: var(--surface-2); display: grid; place-items: center; font-family: var(--font-mono); font-size: 12px; }
.les-edit > summary b { font-weight: 600; font-size: 14px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.les-body { padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--line); }
.seg.fade { mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.seg.fade button:last-child { margin-right: 24px; }
.confirm-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }

/* ---------- certificate ---------- */
.cert { aspect-ratio: 4 / 3; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 8px; padding: 20px; }

/* ---------- tablet & website ---------- */
@container app (min-width: 640px) {
  .grid.few { grid-template-columns: repeat(2, 1fr); }
  .ep-row2 { grid-template-columns: auto 1fr; }
  .soon { grid-template-columns: 1fr 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .hero-rail { grid-auto-columns: 60%; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .checks.two { grid-template-columns: 1fr 1fr; }
  .reviews { grid-auto-columns: 48%; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
}
@container app (min-width: 900px) {
  .site-hero { padding: 32px 0 12px; }
  .site-hero h1 { font-size: 46px; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .hero-rail { grid-auto-columns: calc(50% - 5px); margin: 0; padding: 0; }
  .hero-rail .banner { aspect-ratio: 16 / 8; }
  .hero-rail .banner-title { font-size: 30px; }
  .card:hover { box-shadow: var(--shadow); }
  .landing { grid-template-columns: minmax(0, 1fr) 340px; }
  .landing-aside { display: block; position: sticky; top: calc(var(--head-h) + 24px); }
  .l-hero .banner { aspect-ratio: 16 / 8; }
  .l-hero .banner-title { font-size: 32px; }
  .reviews { margin: 0; padding: 0 0 4px; }
  .learn { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
  .learn-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
  .learn-side { position: sticky; top: calc(var(--head-h) + 24px); }
  .player-wrap { position: static; border-radius: var(--r-lg); overflow: hidden; }
  .adm-course { grid-template-columns: 140px minmax(0, 1fr); align-items: center; }
  .adm-course .banner { aspect-ratio: 16 / 9; }
}

/* phone turned sideways: the player fits the screen height */
@media (orientation: landscape) and (max-height: 500px) {
  .player-wrap { position: static; }
  .player { height: calc(100vh - var(--sat) - var(--head-h) - var(--bottom-ui) - 8px); height: calc(100dvh - var(--sat) - var(--head-h) - var(--bottom-ui) - 8px); aspect-ratio: 16 / 9; width: auto; margin-inline: auto; }
}
/* fullscreen player */
.player-wrap:fullscreen { display: grid; place-items: center; }
.player-wrap:fullscreen .player { width: 100%; height: auto; max-height: 100vh; }
