/* Lumen — plans & payments, account, business console, TV guide, downloads, TV remote mode.
   Same rules as design.css: neutral surfaces, 1px lines, the accent only where it means "act". */

/* ── shared bits ── */
body:not(.billing-on) .billing-only { display: none !important; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.table th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.table td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table td small { display: block; font-size: 12px; margin-top: 2px; }
.table .num { text-align: right; }
.table tr.off td { opacity: .55; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; text-transform: capitalize; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.status.ok::before { background: var(--ok); }
.status.bad::before { background: var(--live); }
.status.pending::before { background: #d6a03a; }
.chip.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.chip.bad { color: var(--live); border-color: color-mix(in srgb, var(--live) 35%, transparent); }
.chip.sm { height: 20px; padding: 0 8px; font-size: 11px; font-style: normal; }
.chip .i { width: 13px; height: 13px; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); margin-bottom: 18px; font-size: 14px; line-height: 1.5; }
.notice .i { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--text-2); }
.notice.warn { border-color: color-mix(in srgb, #d6a03a 45%, transparent); background: color-mix(in srgb, #d6a03a 8%, transparent); }
.notice a { text-decoration: underline; text-underline-offset: 2px; }
.row-gap { display: flex; align-items: center; gap: 10px; }
.row-gap.wrap { flex-wrap: wrap; }
.loading-block { display: grid; place-items: center; padding: 60px; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--text); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.mono { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 13px; }
.hint { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--text-2); margin-top: 14px; }
.hint .i { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.hint a { text-decoration: underline; }
.price-tag { display: inline-flex; align-items: center; gap: 5px; font-weight: 650; color: #fff; }
.price-tag .i { width: 15px; height: 15px; }

/* payment-method marks: plain type, no borrowed logos */
.pay-marks { display: flex; flex-wrap: wrap; gap: 6px; }
.pay-mark { display: inline-flex; align-items: center; height: 28px; padding: 0 11px; border-radius: 6px; border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 650; letter-spacing: .01em; color: var(--text-2); background: var(--bg-2); white-space: nowrap; }
.pay-mark.sm { height: 22px; padding: 0 8px; font-size: 11.5px; }

/* ── card flags (locked / rented) ── */
.card-flag.locked, .card-flag.rented { display: inline-flex; align-items: center; gap: 4px; width: auto; padding: 0 7px; font-size: 11.5px; font-weight: 650; color: #fff; background: rgba(12, 12, 14, .78); border: 1px solid rgba(255, 255, 255, .14); }
.card-flag.locked .i, .card-flag.rented .i { width: 13px; height: 13px; }
.card-flag.rented { color: #9be3c0; }
.card-media .card-flag { position: absolute; top: 8px; right: 8px; height: 22px; border-radius: 6px; z-index: 3; }

/* ── checkout sheet ── */
.modal-co { width: min(460px, calc(100vw - 24px)); }
.co { display: grid; gap: 14px; }
.co .modal-title { margin: 2px 0 0; }
.co-note { margin-top: -6px; font-size: 14px; }
.co-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.co-total span { color: var(--muted); font-size: 14px; }
.co-total b { font-size: 26px; font-weight: 650; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.co-methods { display: grid; gap: 8px; }
.co-method { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; text-align: left; padding: 13px 14px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--bg-2); transition: border-color .15s, background .15s; }
.co-method:hover { background: var(--surface-2); }
.co-method[aria-checked='true'] { border-color: var(--text); background: var(--surface); }
.co-radio { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; }
.co-method[aria-checked='true'] .co-radio { border-color: var(--text); }
.co-method[aria-checked='true'] .co-radio::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--text); }
.co-m-text { display: grid; gap: 2px; }
.co-m-text b { font-size: 14.5px; font-weight: 600; }
.co-m-text small { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.co-tag, .co-size { font-style: normal; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.co-tag { padding: 2px 7px; border-radius: 5px; border: 1px solid var(--line-2); }
.co-pay { width: 100%; }
.co-fine { font-size: 12px; line-height: 1.5; }
.btn.loading { pointer-events: none; opacity: .7; }

/* ── plans page ── */
.plans-page { max-width: 1120px; }
.plans-head { display: grid; gap: 12px; justify-items: start; margin-bottom: 36px; }
.plans-head .display { font-size: clamp(34px, 4.6vw, 58px); line-height: 1.02; max-width: 16ch; }
.plans-head .display em { color: var(--text-2); }
.plan-now { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 14px; }
.plan-now .i { width: 16px; height: 16px; color: var(--ok); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; align-items: stretch; }
.plan { position: relative; display: grid; grid-template-rows: auto auto 1fr auto auto; gap: 16px; padding: 26px 24px 22px; border-radius: var(--radius-lg); border: 1px solid var(--line-2); background: var(--bg-2); animation: planIn .4s ease-out backwards; animation-delay: calc(var(--i) * 60ms); }
@keyframes planIn { from { opacity: 0; transform: translateY(10px); } }
.plan.featured { border-color: var(--text); box-shadow: 0 24px 60px -36px rgba(0, 0, 0, .7); }
.plan.current { border-color: var(--ok); }
.plan-flag { position: absolute; top: -11px; left: 22px; padding: 3px 10px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 11.5px; font-weight: 650; }
.plan h3 { font-size: 15px; font-weight: 600; color: var(--text-2); }
.plan-price { display: flex; align-items: flex-end; gap: 8px; }
.plan-price b { font-family: var(--display); font-weight: 400; font-size: 64px; line-height: .85; letter-spacing: -.02em; }
.plan-price span { font-size: 15px; font-weight: 600; line-height: 1.15; padding-bottom: 4px; }
.plan-price small { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.plan-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; align-content: start; }
.plan-perks li { display: flex; gap: 10px; align-items: center; font-size: 14.5px; }
.plan-perks .i { width: 17px; height: 17px; color: var(--text-2); flex: none; }
.plan .btn { width: 100%; }
.plan-fine { font-size: 12px; color: var(--muted); text-align: center; }
.plans-foot { display: grid; gap: 12px; justify-items: center; margin-top: 30px; text-align: center; }

/* ── paywall ── */
.paywall { position: relative; overflow: hidden; border-radius: var(--radius-lg); aspect-ratio: 16 / 9; max-height: 74vh; display: grid; align-items: end; background: #0d0d0f; color: #ececec; --text: #ececec; --text-2: #c2c2c6; --muted: #9a9aa0; --line: #2a2a2d; --line-2: #3a3a3e; --surface-2: rgba(255,255,255,.08); --bg-2: #141416; }
.paywall-bg { position: absolute; inset: 0; }
.paywall-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s; }
.paywall-bg img.ok { opacity: .5; }
.paywall::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 10, 12, .92) 0%, rgba(10, 10, 12, .72) 45%, rgba(10, 10, 12, .1) 100%), linear-gradient(0deg, rgba(10, 10, 12, .85), transparent 55%); }
.paywall-body { position: relative; z-index: 1; display: grid; gap: 12px; justify-items: start; padding: clamp(20px, 4vw, 44px); max-width: 560px; }
.paywall-body h2 { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 4vw, 50px); line-height: 1; }
.paywall-body .muted { font-size: 15px; line-height: 1.5; }
.paywall-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.paywall .btn-primary { background: #f2f2f2; color: #111; }
.paywall .btn-glass { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .18); color: #fff; }
.paywall .pay-mark { background: rgba(255,255,255,.06); }
.watch.locked .watch-main { grid-column: 1 / -1; }
.live-wall { min-height: 420px; }
.rent-note { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--ok); margin: 4px 0 8px; }
.rent-note .i { width: 16px; height: 16px; }
.ticket-ok { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border-radius: 999px; background: rgba(63, 182, 127, .14); color: #8be0b7; font-weight: 600; font-size: 14px; }
.ticket-ok .i { width: 16px; height: 16px; }

/* ── payment return / test sheet ── */
.pay-page { display: grid; place-items: center; min-height: 70vh; }
.pay-card { width: min(460px, 100%); display: grid; gap: 12px; justify-items: center; text-align: center; padding: 34px 28px; border: 1px solid var(--line-2); border-radius: var(--radius-lg); background: var(--bg-2); }
.pay-card h1 { font-size: 24px; font-weight: 650; letter-spacing: -.01em; }
.pay-ico { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); }
.pay-ico .i { width: 28px; height: 28px; }
.pay-ico.ok { background: rgba(63, 182, 127, .14); border-color: transparent; color: var(--ok); animation: pop .35s ease-out; }
.pay-ico.bad { background: rgba(229, 72, 77, .12); border-color: transparent; color: var(--live); }
.pay-ico.spin .i { animation: spin 1.2s linear infinite; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.pay-ref { font-size: 13px; color: var(--muted); }
.pay-ref b { color: var(--text); font-family: ui-monospace, Consolas, monospace; }
.pay-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 8px; width: 100%; }
.pay-actions .btn { flex: 1 1 160px; }
.test-sheet { justify-items: stretch; text-align: left; padding-top: 0; overflow: hidden; }
.test-band { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 -28px 10px; padding: 9px; background: color-mix(in srgb, #d6a03a 16%, transparent); color: #e8bf6a; font-size: 12.5px; font-weight: 650; }
.test-band .i { width: 15px; height: 15px; }
.ts-merchant { display: flex; align-items: center; gap: 12px; }
.ts-merchant .brand-mark { width: 38px; height: 38px; }
.ts-merchant div { display: grid; }
.ts-merchant small { color: var(--muted); font-size: 12px; }
.ts-amount { font-size: 40px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 6px; }
.ts-what { color: var(--text-2); margin-top: -6px; }

/* ── account & billing ── */
.account-page { max-width: 1040px; }
.acct-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.acct-grid .panel { display: grid; gap: 14px; align-content: start; justify-items: start; backdrop-filter: none; }
.acct-grid h2, .acct-section h2 { font-size: 15px; font-weight: 650; }
.acct-section { margin-top: 30px; display: grid; gap: 14px; }
.sub-card { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; }
.sub-card > div { display: grid; gap: 3px; }
.sub-name { font-family: var(--display); font-weight: 400; font-size: 34px; line-height: 1; }
.sub-left { text-align: right; justify-items: end; }
.sub-left b { font-size: 15px; }
.sub-bar { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 8px; }
.sub-bar i { display: block; height: 100%; background: var(--ok); border-radius: inherit; }
.phone-num { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.phone-num > .i { width: 18px; height: 18px; color: var(--text-2); }
.own-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.own { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.own:hover { background: var(--surface); }
.own span { display: grid; }
.own-ico { width: 36px; height: 36px; border-radius: 8px; place-items: center; background: var(--surface-2); }
.own-ico .i { width: 18px; height: 18px; }
.own > .i { width: 16px; height: 16px; color: var(--muted); }
.receipts td:nth-child(2) { white-space: normal; min-width: 200px; }

/* ── business console ── */
.admin-page { max-width: 1180px; }
.admin-tabs { margin-bottom: 22px; max-width: 100%; overflow-x: auto; scrollbar-width: none; border-radius: 12px; }
.admin-tabs button { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; height: 38px; padding: 0 14px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.admin-tabs button .i { width: 16px; height: 16px; }
.admin-tabs button[aria-selected='true'] { background: var(--surface-2); color: var(--text); }
.admin-body { display: grid; gap: 16px; }
.admin-body > .panel, .pay-settings .panel, .tv-admin .panel { backdrop-filter: none; display: grid; gap: 12px; }
.admin-body h3 { font-size: 15px; font-weight: 650; }
.pane-intro { max-width: 70ch; }
.biz-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.biz-kpi { background: var(--bg); padding: 18px 20px; display: grid; gap: 4px; align-content: start; }
.biz-kpi small { color: var(--muted); font-size: 12.5px; }
.biz-kpi b { font-size: 30px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.biz-kpi span { font-size: 13px; color: var(--muted); }
.rev-split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rev-split div { display: grid; gap: 4px; }
.rev-split small { color: var(--muted); font-size: 12.5px; }
.rev-split i { display: block; height: 4px; border-radius: 4px; background: var(--line); position: relative; overflow: hidden; }
.rev-split i::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--text-2); border-radius: inherit; }
.plan-admin { display: grid; gap: 8px; }
.plan-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.plan-row > div:first-child { display: grid; gap: 3px; }
.plan-row.off { opacity: .6; }
.price-defaults { backdrop-filter: none; display: grid; gap: 8px; justify-items: start; }
.field-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; margin-top: 0; }
.price-title { display: flex; align-items: center; gap: 12px; min-width: 240px; }
.price-title > span:last-child { display: grid; }
.pt-thumb { width: 72px; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; flex: none; }
.pt-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.pt-thumb img.ok { opacity: 1; }
.input.sm { height: 34px; border-radius: 8px; padding: 0 10px; }
.input.num { width: 92px; text-align: right; }
.pricing td { white-space: nowrap; }
.switch-row.big { padding: 4px 0; gap: 20px; }
.switch-row.big > span { display: grid; gap: 2px; font-weight: 600; }
.switch-row.big small { font-weight: 400; font-size: 13px; line-height: 1.45; }
.prov header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.prov.is-ready { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.prov details summary { cursor: pointer; color: var(--muted); }
.prov details[open] { display: grid; gap: 10px; }
.field-hint code { font-size: 12px; }
.sticky-save { position: sticky; bottom: 12px; display: flex; justify-content: flex-end; z-index: 4; }
.sticky-save .btn { box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .6); }
.seg-pick { display: inline-flex; flex-wrap: wrap; gap: 4px; border-radius: 12px; }
.seg-pick label { position: relative; cursor: pointer; }
.seg-pick input { position: absolute; opacity: 0; pointer-events: none; }
.seg-pick span { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.seg-pick input:checked + span { background: var(--surface-2); color: var(--text); }
.seg-pick input:focus-visible + span { outline: 2px solid var(--text); }

/* ── TV guide ── */
.tv-page { max-width: 1500px; }
.tv-top { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: stretch; }
.tv-screen { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.tv-player, .tv-player .player { height: 100%; }
.tv-osd { position: absolute; top: 16px; right: 16px; z-index: 30; display: grid; justify-items: end; gap: 2px; padding: 10px 14px; border-radius: 10px; background: rgba(10, 10, 12, .78); color: #fff; pointer-events: none; }
.tv-osd.in { animation: osdIn .25s ease-out; }
.tv-osd b { font-size: 34px; font-weight: 650; line-height: 1; font-variant-numeric: tabular-nums; }
.tv-osd span { font-weight: 600; }
.tv-osd small { color: #bbb; font-size: 12.5px; }
@keyframes osdIn { from { opacity: 0; transform: translateY(-6px); } }
.tv-now { display: grid; gap: 16px; align-content: start; backdrop-filter: none; }
.tvn-ch { display: flex; align-items: center; gap: 12px; }
.tvn-ch > div { display: grid; }
.tvn-num { min-width: 26px; font-size: 13px; font-weight: 650; color: var(--muted); font-variant-numeric: tabular-nums; text-align: center; }
.tvn-num .i { width: 15px; height: 15px; color: var(--live); }
.tv-logo { width: 42px; height: 42px; border-radius: 9px; display: grid; place-items: center; overflow: hidden; background: #fff; color: #fff; font-size: 13px; font-weight: 700; flex: none; }
.tv-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.tvn-prog { display: grid; gap: 6px; }
.tvn-prog h3 { font-size: 20px; font-weight: 650; line-height: 1.2; }
.tvn-prog p { font-size: 13.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.tvn-bar { height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.tvn-bar i { display: block; height: 100%; background: var(--accent); }
.tvn-next { display: grid; gap: 2px; padding-top: 14px; border-top: 1px solid var(--line); }
.tvn-zap { margin-top: auto; }
.tv-empty { display: grid; gap: 10px; justify-items: start; }
.tv-empty > .i { width: 28px; height: 28px; color: var(--muted); }
.tv-guide-head { margin: 26px 0 10px; }
.tv-guide-head h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 650; }
.tv-keys { display: inline-flex; align-items: center; gap: 6px; }
.tv-keys .i { width: 15px; height: 15px; }
.tv-guide { overflow: auto; max-height: 60vh; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-2); outline: none; }
.tg-inner { min-width: calc(var(--w) + 220px); }
.tg-times, .tg-row { display: grid; grid-template-columns: 220px auto; }
.tg-times { position: sticky; top: 0; z-index: 3; background: var(--bg-2); border-bottom: 1px solid var(--line-2); height: 34px; }
.tg-times .tg-line span { position: absolute; top: 9px; font-size: 12px; color: var(--muted); transform: translateX(6px); font-variant-numeric: tabular-nums; }
.tg-ch { position: sticky; left: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 0 12px; background: var(--bg-2); border-right: 1px solid var(--line); }
.tg-times .tg-ch { z-index: 4; }
.tg-ch .tv-logo { width: 34px; height: 34px; border-radius: 7px; font-size: 11px; }
.tg-name { font-size: 13.5px; font-weight: 600; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.tg-name .i { width: 13px; height: 13px; color: var(--muted); }
.tg-line { position: relative; display: block; height: 100%; }
.tg-row { width: 100%; height: 58px; border-bottom: 1px solid var(--line); text-align: left; }
.tg-row:hover .tg-ch, .tg-row:focus-visible .tg-ch { background: var(--raise); }
.tg-row.on .tg-ch { box-shadow: inset 3px 0 0 var(--accent); background: var(--raise); }
.tg-row.locked { opacity: .7; }
.tg-prog { position: absolute; top: 6px; bottom: 6px; display: grid; align-content: center; gap: 1px; padding: 0 10px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.tg-prog b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-prog small { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tg-prog.now { background: var(--surface-2); border-color: var(--line-2); }
.tg-row.on .tg-prog.now { border-color: var(--text-2); }
.tg-prog.live { border-color: color-mix(in srgb, var(--live) 50%, transparent); background: color-mix(in srgb, var(--live) 10%, transparent); }
.tg-prog.none { background: transparent; border-style: dashed; }
.tg-nowline { position: absolute; top: 0; bottom: -100vh; width: 2px; background: var(--accent); z-index: 1; pointer-events: none; }
.tg-nowline::before { content: ''; position: absolute; top: 0; left: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.tv-guide .tg-inner { position: relative; overflow: hidden; }

/* ── downloads ── */
.downloads-page { max-width: 1040px; }
.storage-meter { display: grid; gap: 6px; min-width: 200px; }
.storage-meter i { display: block; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.storage-meter b { display: block; height: 100%; background: var(--text-2); }
.dl-stage { margin-bottom: 22px; border-radius: var(--radius-lg); overflow: hidden; }
.dl-list { display: grid; gap: 10px; }
.dl-item { display: grid; grid-template-columns: 180px 1fr auto; gap: 18px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-lg); animation: planIn .35s ease-out backwards; animation-delay: calc(var(--i) * 40ms); }
.dl-item.expired { opacity: .6; }
.dl-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; }
.dl-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.dl-thumb img.ok { opacity: 1; }
.dl-thumb .card-play { opacity: 1; transform: none; }
.dl-text { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.dl-text h3 { font-size: 16px; font-weight: 600; }
.dl-actions { display: flex; gap: 6px; }
.dl-pill { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 300; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; background: var(--menu-bg); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 13.5px; font-weight: 600; overflow: hidden; }
.dl-pill .i { width: 16px; height: 16px; }
.dl-pill i { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--accent); transition: width .3s; }
body.offline-mode .sidebar, body.offline-mode .nav, body.offline-mode .tabbar { display: none !important; }
body.offline-mode .view { margin-left: 0; padding-top: 24px; }

/* ── phone sign-in ── */
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; margin: 16px 0 12px; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.auth-phone { width: 100%; }
.phone-field { display: flex; align-items: stretch; gap: 8px; }
.phone-field .cc { display: grid; place-items: center; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2); font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.phone-field .input { flex: 1; font-size: 17px; letter-spacing: .02em; }
.otp-input { font-size: 24px; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; }

/* ── TV remote mode: bigger targets, unmistakable focus ── */
html.tv { font-size: 17px; }
html.tv :focus-visible, html.tv :focus { outline: 3px solid var(--text) !important; outline-offset: 3px !important; border-radius: 10px; }
html.tv .card:focus, html.tv .card:focus-visible { transform: scale(1.05); z-index: 5; outline-offset: 4px !important; }
html.tv .btn { min-height: 48px; }
html.tv .sb-nav a { min-height: 48px; }
html.tv .tg-row { height: 68px; }
html.tv .tg-row:focus .tg-ch { background: var(--raise); }
html.tv .ply-controls button { min-width: 48px; min-height: 48px; }
html.tv * { scroll-behavior: smooth; }

/* ── responsive ── */
@media (max-width: 1100px) {
  .tv-top { grid-template-columns: 1fr; }
  .biz-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .acct-grid { grid-template-columns: 1fr; }
  .rev-split, .field-grid.three { grid-template-columns: 1fr; }
  .dl-item { grid-template-columns: 112px 1fr; }
  .dl-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .tg-times, .tg-row { grid-template-columns: 132px auto; }
  .tg-inner { min-width: calc(var(--w) + 132px); }
  .tg-ch .tv-logo { display: none; }
  .paywall { aspect-ratio: auto; min-height: 380px; }
  .paywall::after { background: linear-gradient(0deg, rgba(10, 10, 12, .95) 35%, rgba(10, 10, 12, .3)); }
  .plan-price b { font-size: 54px; }
  .biz-kpi b { font-size: 24px; }
  .tv-keys { display: none; }
  .dl-pill { bottom: calc(76px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .plan, .dl-item { animation: none; } }

.tv-lock { position: absolute; inset: 0; z-index: 25; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 20px; background: radial-gradient(circle at 50% 40%, #1d1d21, #09090a 70%); color: #ececec; }
.tv-lock > .i { width: 30px; height: 30px; color: #9a9aa0; }
.tv-lock h3 { font-size: 20px; font-weight: 650; }
.tv-lock .muted { color: #9a9aa0; }
.tv-lock .btn-primary { background: #f2f2f2; color: #111; margin-top: 6px; }
.storage-note a { text-decoration: underline; text-underline-offset: 2px; color: var(--text); }
.field-grid.three .field:last-child:nth-child(odd) { grid-column: auto; }
.tg-name { display: block; min-width: 0; }
.tg-name .i { vertical-align: -2px; }
.tg-ch { min-width: 0; }

/* ── per-feature pricing: locks, unlock prompt, add-ons ── */
.sb-nav a.locked::after { content: ''; width: 14px; height: 14px; margin-left: auto; flex: none; opacity: .55;
  background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='10.5' width='14' height='10' rx='2' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M8 10.5V7.5a4 4 0 0 1 8 0v3' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='10.5' width='14' height='10' rx='2' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M8 10.5V7.5a4 4 0 0 1 8 0v3' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat; }
body.sb-collapsed .sb-nav a.locked::after { display: none; }
.unlock { display: grid; gap: 12px; justify-items: start; }
.unlock .modal-title { margin: 0; }
.unlock-badge { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); }
.unlock-badge .i { width: 20px; height: 20px; }
.unlock-opts { display: grid; gap: 8px; width: 100%; margin-top: 4px; }
.unlock-opt { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; text-align: left; padding: 14px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--bg-2); transition: border-color .15s, background .15s; }
.unlock-opt:hover { border-color: var(--text-2); background: var(--surface); }
.unlock-opt > span:nth-child(2) { display: grid; gap: 2px; }
.unlock-opt b { font-size: 14.5px; font-weight: 600; }
.unlock-opt small { color: var(--muted); font-size: 13px; }
.unlock-opt > .i { width: 16px; height: 16px; color: var(--muted); }
.unlock-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); }
.unlock-ico .i { width: 17px; height: 17px; }
.locked-page { display: grid; place-items: center; min-height: 70vh; }
.unlock.big { width: min(520px, 100%); padding: 34px 30px; border: 1px solid var(--line-2); border-radius: var(--radius-lg); background: var(--bg-2); }
.unlock.big .display { font-size: clamp(32px, 4vw, 46px); line-height: 1.05; }
.addons { margin-top: 40px; display: grid; gap: 8px; }
.addons h2 { font-size: 18px; font-weight: 650; }
.addon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; margin-top: 8px; }
.addon { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-2); }
.addon > div:nth-child(2) { display: grid; gap: 2px; min-width: 0; }
.addon-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); }
.addon-ico .i { width: 18px; height: 18px; }
.addon-buy { display: grid; justify-items: end; gap: 4px; text-align: right; }
.addon-buy > b { font-size: 16px; font-variant-numeric: tabular-nums; }
.free-line { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 22px; font-size: 13.5px; color: var(--text-2); text-align: center; }
.free-line .i { width: 15px; height: 15px; color: var(--ok); }
/* features table */
.features-table td { vertical-align: middle; }
.features-table .switch-row { padding: 0; justify-content: flex-start; }
.feat-name { display: flex; align-items: center; gap: 12px; min-width: 240px; }
.feat-name > span:last-child { display: grid; gap: 2px; }
.feat-name small { white-space: normal; max-width: 34ch; }
.feat-plans { display: flex; flex-wrap: wrap; gap: 6px; min-width: 200px; }
.chk { position: relative; display: inline-flex; cursor: pointer; }
.chk input { position: absolute; opacity: 0; pointer-events: none; }
.chk span { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 600; color: var(--muted); transition: all .15s; }
.chk input:checked + span { background: var(--text); color: var(--bg); border-color: var(--text); }
.chk input:disabled + span { opacity: .4; cursor: not-allowed; }
.chk input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 2px; }
.chk.dim span { opacity: .7; }
.feat-pick { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.feat-pick legend { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.feat-dots { display: flex; gap: 3px; margin-top: 6px; }
.feat-dots i { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: var(--surface); color: var(--dim); }
.feat-dots i.on { background: var(--surface-2); color: var(--text); }
.feat-dots .i { width: 12px; height: 12px; }
.co-phone { margin-top: -4px; }
@media (max-width: 760px) { .addon-grid { grid-template-columns: 1fr; } .addon { grid-template-columns: auto 1fr; } .addon-buy { grid-column: 1 / -1; grid-template-columns: auto auto 1fr; align-items: center; justify-items: start; } .addon-buy .btn, .addon-buy .chip { justify-self: end; } }
