:root {
  --bg: #09090b;
  --surface: #131316;
  --surface-2: #1b1b20;
  --line: #2a2a31;
  --text: #f5f5f6;
  --muted: #a3a3ad;
  --accent: #ff8a1f;
  --accent-hi: #ffa94d;
  --accent-ink: #1a1206;
  --flix: #e5383b;
  --radius: 18px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--font-body); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.02; margin: 0; letter-spacing: .01em; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }
:focus-visible { outline: 3px solid var(--accent-hi); outline-offset: 3px; border-radius: 8px; }
.ico { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(9, 9, 11, .82); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 22px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand-tag { font-size: 11px; color: var(--muted); max-width: 250px; }
.brand-tag-badge { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--accent); max-width: none; letter-spacing: .01em; }
.nav { display: flex; gap: 24px; font-weight: 500; font-size: 15px; }
.nav a { text-decoration: none; color: var(--muted); padding: 6px 0; position: relative; transition: color .15s; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); scale: 0 1; transition: scale .2s var(--ease); }
.nav a:hover { color: var(--text); }
.nav a:hover::after { scale: 1 1; }

.menu-btn { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; padding: 0; place-content: center; gap: 5px; }
.menu-btn span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s var(--ease), opacity .2s; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; border: 2px solid transparent;
  font: 600 15px/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform .15s var(--ease), background .15s, border-color .15s, box-shadow .2s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 22px -8px rgba(255, 138, 31, .7); }
.btn-primary:hover { background: var(--accent-hi); box-shadow: 0 10px 28px -8px rgba(255, 138, 31, .85); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); }
.btn-flix { background: var(--flix); color: #fff; box-shadow: 0 6px 22px -8px rgba(229, 56, 59, .7); }
.btn-flix:hover { background: #ee5a5c; transform: translateY(-1px); }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(48px, 8vw, 96px) 0 clamp(48px, 7vw, 88px);
  background:
    radial-gradient(900px 480px at 88% -8%, rgba(255, 138, 31, .26), transparent 62%),
    radial-gradient(600px 400px at -5% 105%, rgba(255, 138, 31, .12), transparent 60%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 75% 30%, #000 0%, transparent 65%);
}
.hero-grid { position: relative; display: grid; gap: 48px; grid-template-columns: 1.05fr .95fr; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; text-transform: uppercase; letter-spacing: .15em; font-size: 12.5px; font-weight: 600; color: var(--accent); margin: 0 0 14px; }
.hero h1 { font-size: clamp(54px, 8.6vw, 108px); font-weight: 800; text-transform: uppercase; }
.lead { font-size: clamp(17px, 2vw, 21px); color: var(--muted); max-width: 44ch; margin: 22px 0 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-price { margin: 22px 0 0; color: var(--muted); font-size: 14px; }
.hero-price strong { color: var(--text); }

.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ff4d4f; box-shadow: 0 0 0 0 rgba(255, 77, 79, .7); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(255, 77, 79, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 77, 79, 0); } }

/* TV mockup */
.hero-visual { position: relative; padding: 24px 12px 30px; }
.tv { transform: perspective(1400px) rotateY(-9deg) rotateX(3deg); transition: transform .5s var(--ease); }
.hero-visual:hover .tv { transform: perspective(1400px) rotateY(-3deg) rotateX(1deg); }
.tv-screen {
  background: #050506; border-radius: 22px; border: 3px solid #26262c;
  box-shadow: 0 40px 80px -30px rgba(255, 138, 31, .45), 0 0 0 1px #000, inset 0 0 40px rgba(0, 0, 0, .8);
}
.tv-stand { width: 34%; height: 10px; margin: 0 auto; background: linear-gradient(#26262c, #0d0d10); border-radius: 0 0 12px 12px; }
.float-chip {
  position: absolute; padding: 10px 16px; border-radius: 999px; font-size: 13px; color: var(--muted);
  background: rgba(27, 27, 32, .92); border: 1px solid var(--line); backdrop-filter: blur(8px);
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .8); animation: float 6s ease-in-out infinite;
}
.float-chip strong { color: var(--text); }
.chip-1 { left: -6px; bottom: 4px; }
.chip-2 { right: 0; top: 0; animation-delay: -3s; }
@keyframes float { 50% { transform: translateY(-9px); } }

.brand-logo { height: 40px; width: auto; }

/* ---------- Feature row ---------- */
.features { border-block: 1px solid var(--line); background: var(--surface); }
.feature-row { display: grid; grid-template-columns: repeat(5, 1fr); }
.feature { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 26px 10px; border-right: 1px solid var(--line); }
.feature:last-child { border-right: 0; }
.feature .ico { color: var(--accent); margin-bottom: 8px; width: 28px; height: 28px; }
.feature strong { font: 700 24px/1 var(--font-display); text-transform: uppercase; }
.feature span { color: var(--muted); font-size: 13px; }

/* ---------- Sections ---------- */
.section { padding: clamp(60px, 8vw, 104px) 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { margin-bottom: 40px; }
.section-head .eyebrow { margin-bottom: 10px; }
.section h2 { font-size: clamp(38px, 5.4vw, 62px); font-weight: 800; text-transform: uppercase; }
.section-sub { color: var(--muted); margin: 12px 0 0; max-width: 58ch; }

/* ---------- Plans ---------- */
.plans { display: grid; gap: 16px; grid-template-columns: repeat(5, 1fr); }
.plan {
  position: relative; display: flex; flex-direction: column;
  padding: 28px 22px 22px; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  transition: border-color .2s, transform .25s var(--ease), box-shadow .25s;
}
.plan:hover { border-color: rgba(255, 138, 31, .7); transform: translateY(-5px); box-shadow: 0 24px 50px -28px rgba(255, 138, 31, .5); }
.plan h3 { font-size: 24px; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
.price { font: 800 68px/1 var(--font-display); margin: 12px 0 2px; }
.price .cur { font-size: 28px; vertical-align: top; position: relative; top: 9px; margin-right: 2px; color: var(--accent); }
.price .per { font-size: 20px; color: var(--muted); margin-left: 4px; font-weight: 600; }
.per-device { margin: 0 0 20px; padding-bottom: 18px; border-bottom: 1px dashed var(--line); font-size: 13px; color: var(--accent-hi); font-weight: 500; }
.plan-list { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 10px; font-size: 14.5px; flex: 1; }
.plan-list li { padding-left: 26px; position: relative; }
.plan-list li::before {
  content: ""; position: absolute; left: 1px; top: .4em; width: 12px; height: 7px;
  border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg);
}
.plan-best { border-color: var(--accent); background: linear-gradient(180deg, rgba(255, 138, 31, .16), var(--surface) 60%); box-shadow: 0 0 0 1px var(--accent), 0 30px 60px -32px rgba(255, 138, 31, .6); }
.badge { position: absolute; top: -13px; left: 50%; translate: -50% 0; background: var(--accent); color: var(--accent-ink); font: 700 12px/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase; padding: 7px 14px; border-radius: 999px; white-space: nowrap; }

/* FLIX banner */
.flix {
  margin-top: 22px; display: grid; gap: 28px; grid-template-columns: 1fr auto; align-items: center;
  padding: 32px clamp(22px, 4vw, 44px); border-radius: var(--radius);
  border: 1px solid rgba(229, 56, 59, .45);
  background: radial-gradient(600px 240px at 100% 0, rgba(229, 56, 59, .22), transparent 70%), linear-gradient(180deg, var(--surface-2), var(--surface));
}
.flix h3 { font-size: clamp(34px, 4.6vw, 48px); font-weight: 800; text-transform: uppercase; margin: 10px 0 6px; }
.badge-inline { position: static; translate: none; display: inline-block; background: var(--flix); color: #fff; }
.flix-sub { color: var(--muted); margin: 0 0 16px; max-width: 46ch; }
.flix-apps { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.flix-apps li { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); font-size: 14px; font-weight: 500; }
.flix-note { margin: 0; font-size: 13px; color: var(--muted); }
.flix-buy { text-align: center; min-width: 220px; }
.flix-buy .price { margin: 0 0 14px; }
.flix-buy .price .cur { color: var(--flix); }

/* ---------- How it works ---------- */
.how { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); counter-reset: none; }
.how li { position: relative; padding: 30px 26px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.how .ico { width: 34px; height: 34px; color: var(--accent); margin-bottom: 16px; }
.how h3 { font-size: 28px; font-weight: 700; text-transform: uppercase; margin-bottom: 8px; }
.how p { margin: 0; color: var(--muted); font-size: 15px; }
.num { position: absolute; top: -12px; right: 14px; font: 800 120px/1 var(--font-display); color: rgba(255, 255, 255, .04); pointer-events: none; }

/* ---------- App steps ---------- */
.steps { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
.step-card { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.step-card h3 { display: flex; align-items: center; gap: 12px; font-size: 28px; font-weight: 700; text-transform: uppercase; margin-bottom: 16px; }
.step-n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 800 18px/1 var(--font-display); }
.step-card ol { margin: 0; padding-left: 22px; display: grid; gap: 10px; color: var(--muted); }
.step-card strong { color: var(--text); }
.code { display: inline-block; padding: 1px 14px; border-radius: 10px; letter-spacing: .14em; font: 700 22px/1.5 var(--font-display); background: var(--accent); color: var(--accent-ink); }
.devices { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.devices p { margin: 0; color: var(--muted); font-size: 14px; }
.devices ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.devices li { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; background: var(--surface); }

/* ---------- Install video (post-checkout welcome page) ---------- */
.video-frame { width: 100%; max-width: 720px; margin: 0 auto 32px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; background: #000; display: block; }
.video-frame video { width: 100%; display: block; max-height: 70vh; }

/* ---------- FAQ ---------- */
.faq { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 44px 22px 0; position: relative; font-weight: 600; font-size: 17px; transition: color .15s; }
.faq summary:hover { color: var(--accent-hi); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; translate: 0 -50%; font: 300 30px/1 var(--font-body); color: var(--accent); transition: rotate .25s var(--ease); }
.faq[open] summary::after { rotate: 45deg; }
.faq p { margin: 0 0 24px; color: var(--muted); }

/* ---------- CTA ---------- */
.cta { padding: clamp(48px, 6vw, 80px) 0; }
.cta-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
  padding: clamp(28px, 5vw, 52px); border-radius: 24px;
  background: radial-gradient(500px 260px at 90% 0, rgba(255, 255, 255, .22), transparent 70%), linear-gradient(120deg, #ff8a1f, #d9530e);
  color: var(--accent-ink);
}
.cta h2 { font-size: clamp(36px, 5vw, 56px); font-weight: 800; text-transform: uppercase; }
.cta p { margin: 8px 0 0; font-weight: 500; max-width: 46ch; }
.cta .btn-primary { background: #0b0b0d; color: #fff; box-shadow: none; }
.cta .btn-primary:hover { background: #1c1c21; }

/* ---------- Footer / dialog ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: 14px; color: var(--muted); }
.footer-row { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; align-items: center; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; }

dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); color: var(--text); width: min(440px, calc(100% - 32px)); padding: 28px; }
dialog::backdrop { background: rgba(0, 0, 0, .72); backdrop-filter: blur(3px); }
dialog h3 { font-size: 32px; text-transform: uppercase; margin-bottom: 8px; }
dialog p { margin: 0 0 12px; }
#checkout-plan { font-weight: 600; color: var(--accent-hi); }
dialog .btn { margin-top: 8px; }

/* ---------- Reveal on scroll (only when JS is on) ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease) var(--d, 0ms), transform .6s var(--ease) var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .plans { grid-template-columns: repeat(6, 1fr); }
  .plan { grid-column: span 2; }
  .plan:nth-child(4), .plan:nth-child(5) { grid-column: span 3; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 560px; margin-inline: auto; width: 100%; }
}
@media (max-width: 860px) {
  .menu-btn { display: grid; }
  .brand-tag { display: none; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    background: #0b0b0d; border-bottom: 1px solid var(--line); padding: 8px 16px 16px;
    display: none;
  }
  .menu-open .nav { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav a::after { display: none; }
  .header-row { gap: 12px; }
  .feature-row { grid-template-columns: repeat(2, 1fr); }
  .feature { border-bottom: 1px solid var(--line); }
  .feature:nth-child(2n) { border-right: 0; }
  .feature:last-child { grid-column: 1 / -1; border-bottom: 0; }
  .how, .steps { grid-template-columns: 1fr; }
  .flix { grid-template-columns: 1fr; }
  .flix-buy { text-align: left; }
}
@media (max-width: 640px) {
  .plans { grid-template-columns: 1fr; }
  .plan, .plan:nth-child(4), .plan:nth-child(5) { grid-column: auto; }
  .float-chip { display: none; }
  .tv { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- DVR add-on ---------- */
.addon {
  margin-bottom: 22px; padding: 18px 22px; border-radius: var(--radius);
  border: 1px solid var(--line);
  background: radial-gradient(500px 160px at 0 0, rgba(255, 138, 31, .14), transparent 70%), linear-gradient(180deg, var(--surface-2), var(--surface));
  transition: border-color .2s, box-shadow .2s;
}
.addon:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 20px 44px -28px rgba(255, 138, 31, .6); }
.addon-switch { display: flex; align-items: center; gap: 18px; cursor: pointer; }
.addon-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.track { position: relative; flex: none; width: 56px; height: 32px; border-radius: 999px; background: #33333a; transition: background .2s; }
.track::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.addon-switch input:checked + .track { background: var(--accent); }
.addon-switch input:checked + .track::after { transform: translateX(24px); }
.addon-switch input:focus-visible + .track { outline: 3px solid var(--accent-hi); outline-offset: 3px; }
.addon-text { display: flex; flex-direction: column; gap: 2px; }
.addon-title { font: 700 26px/1.1 var(--font-display); text-transform: uppercase; letter-spacing: .02em; }
.addon-title em { font-style: normal; color: var(--accent); margin-left: 6px; }
.addon-desc { color: var(--muted); font-size: 14px; max-width: 70ch; }

.plan-addon { margin: -6px 0 16px; min-height: 0; font-size: 14px; font-weight: 600; color: var(--text); }
.plan-addon.on { padding: 8px 12px; border-radius: 10px; background: rgba(255, 138, 31, .14); border: 1px solid rgba(255, 138, 31, .45); }

/* ---------- Business page ---------- */
.page-hero {
  padding: clamp(48px, 7vw, 88px) 0 clamp(36px, 5vw, 56px);
  background: radial-gradient(800px 380px at 90% -20%, rgba(255, 138, 31, .24), transparent 62%);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { font-size: clamp(48px, 7.4vw, 92px); font-weight: 800; text-transform: uppercase; }
.plans-3 { grid-template-columns: repeat(3, 1fr); }
.what { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
.what-item { padding: 26px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); }
.what-item .ico { width: 32px; height: 32px; color: var(--accent); margin-bottom: 14px; }
.what-item h3 { font-size: 26px; font-weight: 700; text-transform: uppercase; margin-bottom: 6px; }
.what-item p { margin: 0; color: var(--muted); font-size: 15px; }
.nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"]::after { scale: 1 1; }

.form { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; padding: clamp(20px, 4vw, 32px); border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.field { display: grid; gap: 6px; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field textarea {
  width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font: 400 16px/1.4 var(--font-body);
  color-scheme: dark;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 138, 31, .25); }

@media (max-width: 860px) { .plans-3, .what { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .form { grid-template-columns: 1fr; } }

/* ---------- Account pages (login / signup / profile) ---------- */
.auth { padding-top: clamp(36px, 6vw, 72px); }
.auth-card { max-width: 500px; margin: 0 auto; padding: clamp(22px, 4vw, 36px); border-radius: 22px; border: 1px solid var(--line); background: radial-gradient(500px 200px at 0 0, rgba(255, 138, 31, .12), transparent 70%), linear-gradient(180deg, var(--surface-2), var(--surface)); }
.auth-card h1 { font-size: clamp(38px, 6vw, 52px); font-weight: 800; text-transform: uppercase; margin-bottom: 18px; }
.auth-alt { margin: 20px 0 0; text-align: center; color: var(--muted); }
.auth-alt a { color: var(--accent-hi); font-weight: 600; }
.auth-fine { margin: 10px 0 0; text-align: center; color: var(--muted); font-size: 13px; }

.stack { display: grid; gap: 16px; }
.stack .btn-lg { margin-top: 4px; }
.opt, .hint { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.hint { display: block; margin-top: 2px; }
.field select {
  width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font: 400 16px/1.4 var(--font-body); color-scheme: dark;
}
.field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 138, 31, .25); }
.field input[readonly] { color: var(--muted); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 76px; }
.pw-toggle { position: absolute; right: 8px; top: 50%; translate: 0 -50%; border: 0; background: transparent; color: var(--accent-hi); font: 600 13px var(--font-body); padding: 8px 10px; cursor: pointer; border-radius: 8px; }
.pw-toggle:hover { background: rgba(255, 255, 255, .06); }

.msg { display: none; padding: 12px 14px; border-radius: 12px; font-size: 14px; }
.msg.show { display: block; }
.msg.err { background: rgba(229, 56, 59, .14); border: 1px solid rgba(229, 56, 59, .55); }
.msg.ok { background: rgba(34, 197, 94, .12); border: 1px solid rgba(34, 197, 94, .5); }
.msg.warn { background: rgba(255, 138, 31, .12); border: 1px solid rgba(255, 138, 31, .5); }

.summary { display: grid; gap: 12px; padding: 16px; border-radius: 14px; background: rgba(255, 138, 31, .08); border: 1px solid rgba(255, 138, 31, .35); }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 15px; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.check em { font-style: normal; color: var(--accent-hi); margin-left: 4px; }
.check input:disabled + span { opacity: .55; }
.plan-total-line { margin: 0; font-weight: 600; }

.acct-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.acct-head h1 { font-size: clamp(40px, 6vw, 60px); font-weight: 800; text-transform: uppercase; }
.acct-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); align-items: start; }
.card { padding: 24px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface-2), var(--surface)); display: grid; gap: 14px; }
.card h2 { font-family: var(--font-display); font-size: 28px; font-weight: 700; text-transform: uppercase; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-lead { margin: 0; font-size: 18px; font-weight: 600; }
/* The account page's current plan/price - deliberately much louder than a plain .card-lead line, so
   it's the first thing anyone notices on that card, not something they have to hunt for. */
.plan-display {
  margin: 0; padding: 14px 18px; border-radius: 12px;
  background: rgba(255, 138, 31, .1); border: 1px solid rgba(255, 138, 31, .35);
  font-family: var(--font-display); font-size: clamp(22px, 4vw, 30px); font-weight: 700; line-height: 1.15;
  color: var(--text);
}
.status { padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.status.good { background: rgba(34, 197, 94, .14); border-color: rgba(34, 197, 94, .5); color: #86efac; }
.status.warn { background: rgba(255, 138, 31, .14); border-color: rgba(255, 138, 31, .5); color: var(--accent-hi); }
.pay-box { display: grid; gap: 8px; }
.pay-box .hint { text-align: center; }
.locked { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; padding: 14px 16px; border-radius: 12px; background: var(--bg); border: 1px dashed var(--line); font-size: 14px; }
.locked span { color: var(--muted); }
.locked b { letter-spacing: .2em; color: var(--muted); }
button:disabled { opacity: .6; cursor: not-allowed; }
@media (max-width: 860px) { .acct-grid { grid-template-columns: 1fr; } }

/* ---------- Sign-up flow: guest buttons, progress steps, package picker ---------- */
[hidden] { display: none !important; }

.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cta .btn-ghost { border-color: rgba(26, 18, 6, .45); color: var(--accent-ink); }
.cta .btn-ghost:hover { border-color: var(--accent-ink); background: rgba(26, 18, 6, .08); }

.card-wide { grid-column: 1 / -1; }

.steps-mini { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 14px; color: var(--muted); }
.steps-mini li { display: inline-flex; align-items: center; gap: 8px; }
.steps-mini span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); font-size: 12px; font-weight: 700; }
.steps-mini .done { color: var(--text); }
.steps-mini .done span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.steps-mini .current { color: var(--text); font-weight: 600; }
.steps-mini .current span { border-color: var(--accent); color: var(--accent-hi); box-shadow: 0 0 0 3px rgba(255, 138, 31, .22); }

.picker { display: grid; gap: 18px; }
.pick-title { margin: 0 0 8px; font: 700 15px/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pick-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); }
.pick { position: relative; display: grid; gap: 2px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; transition: border-color .15s, background .15s, transform .15s var(--ease); }
.pick:hover { border-color: rgba(255, 138, 31, .6); transform: translateY(-2px); }
.pick input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pick-name { font-weight: 600; }
.pick-price { font: 800 26px/1.1 var(--font-display); color: var(--accent-hi); }
.pick:has(input:checked) { border-color: var(--accent); background: rgba(255, 138, 31, .12); box-shadow: 0 0 0 1px var(--accent); }
.pick:has(input:checked)::after { content: ""; position: absolute; top: 12px; right: 12px; width: 12px; height: 7px; border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg); }
.pick:has(input:focus-visible) { outline: 3px solid var(--accent-hi); outline-offset: 2px; }

@media (max-width: 480px) {
  .header-row { gap: 8px; }
  .header-row .btn-sm { padding: 9px 14px; font-size: 13px; }
}

/* ---------- Admin subscriber table ---------- */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; white-space: nowrap; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table th { color: var(--muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }
.table tbody tr:hover { background: rgba(255, 255, 255, .03); }

/* ---------- Admin: Finances ---------- */
.fin-top { flex-wrap: wrap; align-items: flex-end; }
.fin-period { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.fin-period .field select { min-width: 120px; }
.fin-stats { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.fin-stat { display: grid; gap: 2px; align-content: start; padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.fin-stat strong { font-family: var(--font-display); font-size: 30px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fin-stat-hi { border-color: rgba(255, 138, 31, .5); background: rgba(255, 138, 31, .08); }
.fin-stat-hi strong { color: var(--accent-hi); }
.fin-label { font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.fin-stat .neg { color: #fca5a5; }
.fin-add > summary { list-style: none; display: inline-flex; cursor: pointer; }
.fin-add > summary::-webkit-details-marker { display: none; }
.fin-add[open] > summary { margin-bottom: 14px; }
.fin-form { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); padding: 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.fin-form .msg { grid-column: 1 / -1; }
.fin-form-actions { display: flex; }
@media (max-width: 860px) { .fin-form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .fin-form { grid-template-columns: 1fr; } }
.fin-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.fin-tab { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: 600 13px var(--font-body); cursor: pointer; }
.fin-tab.is-on { background: var(--text); color: var(--bg); border-color: var(--text); }
.table .money-col { text-align: right; font-variant-numeric: tabular-nums; }
.table td.neg { color: #fca5a5; }
.btn-link-danger { background: none; border: 0; color: var(--muted); font: 600 13px var(--font-body); cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.btn-link-danger:hover { color: #fca5a5; }

/* ---------- Admin: set-password dialog + row action buttons ---------- */
.admin-dialog { width: min(440px, calc(100% - 32px)); padding: 24px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface-2), var(--surface)); color: var(--text); }
.admin-dialog::backdrop { background: rgba(0, 0, 0, .7); }
.admin-dialog h2 { font-family: var(--font-display); font-size: 28px; font-weight: 700; text-transform: uppercase; }
.admin-dialog .muted { margin: 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
.row-actions { display: flex; gap: 6px; }
/* Subscribers table: stacked cells so it fits the card without sideways scrolling. */
#subs-body td { white-space: normal; vertical-align: top; }
#subs-body .cell-main { font-weight: 600; }
#subs-body .cell-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; overflow-wrap: anywhere; }
#subs-body .cell-badges { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
#subs-body .row-actions { flex-wrap: wrap; max-width: 260px; }
.worker-picker { min-width: 130px; }
.worker-admin-card { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.worker-admin-fields { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.worker-admin-fields .field span { font-size: 13px; font-weight: 600; color: var(--muted); }
.worker-clients { display: grid; gap: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.worker-clients h4 { margin: 0; font-family: var(--font-display); font-size: 16px; text-transform: uppercase; }
.worker-client-row { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); align-items: end; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.worker-client-row .field span { font-size: 12px; font-weight: 600; color: var(--muted); }
.link-activity { display: grid; gap: 10px; padding-top: 4px; }
.link-activity h4 { margin: 0; font-family: var(--font-display); font-size: 16px; text-transform: uppercase; }

/* ---------- Admin: section tabs + app-backend panels (App billing / Events / Domains) ---------- */
.admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 18px; }
.admin-tab { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: 600 14px var(--font-body); cursor: pointer; }
.admin-tab.is-on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.bk-note { margin: 0; }
.bk-h3 { font-family: var(--font-display); font-size: 20px; text-transform: uppercase; margin-top: 6px; }
.bk-manual { display: grid; gap: 10px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.bk-manual .row-actions { flex-wrap: wrap; }
.live-row { display: flex; align-items: baseline; gap: 12px; }
.live-count { font-family: var(--font-display); font-size: 48px; font-weight: 800; line-height: 1; }
.live-bar { height: 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.live-fill { height: 100%; width: 0; background: #22c55e; transition: width .3s; }
.live-fill.is-warn { background: var(--accent); }
.live-fill.is-full { background: #ef4444; }
.upd-box { display: grid; gap: 12px; padding: 16px; border-radius: 12px; border: 1px dashed var(--line); }
.upd-result { display: grid; gap: 8px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; }
.upd-err { padding: 8px 10px; border-radius: 8px; background: rgba(229, 56, 59, .14); border: 1px solid rgba(229, 56, 59, .55); }
.upd-warn { padding: 8px 10px; border-radius: 8px; background: rgba(255, 138, 31, .12); border: 1px solid rgba(255, 138, 31, .5); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(34, 197, 94, .18); color: #86efac; }
.ev-list { display: grid; gap: 14px; }
.ev-card { display: grid; gap: 12px; padding: 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.ev-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.ev-title { font-weight: 700; font-size: 17px; }
.ev-thumb { width: 120px; height: 68px; object-fit: cover; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); flex: 0 0 auto; }
.ev-fields { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.dm-add { display: flex; gap: 10px; }
.ch-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ch-stat { display: grid; gap: 6px; align-content: start; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.ch-stat-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.ch-stat strong { font-family: var(--font-display); font-size: 36px; font-weight: 800; line-height: 1; }
.ch-stat.is-live { background: rgba(255, 138, 31, .08); border-color: rgba(255, 138, 31, .35); }
.ch-stat.is-live strong { color: var(--accent); }
.ch-filters { display: grid; grid-template-columns: 1.4fr 1fr .7fr; gap: 12px; align-items: end; }
.ch-stack { display: grid; gap: 2px; }
.ch-stack small { color: var(--muted); font-size: 12px; }
.ch-time { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.ch-where { display: inline-flex; align-items: center; gap: 6px; }
.ch-kick { border: 0; background: transparent; color: var(--muted); font: 600 14px var(--font-body); cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.ch-kick:hover { color: #fca5a5; background: rgba(239, 68, 68, .1); }
@media (max-width: 900px) { .ch-stats, .ch-filters { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .ch-filters { grid-template-columns: 1fr; } }
.sh-days { display: flex; flex-wrap: wrap; gap: 6px; }
.sh-days .btn.is-on { border-color: var(--accent); color: var(--accent-hi); }
.status.bad { background: rgba(239, 68, 68, .14); border-color: rgba(239, 68, 68, .5); color: #fca5a5; }
.dm-add input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; }
.dm-add input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 138, 31, .25); }
@media (max-width: 560px) { .dm-add { flex-direction: column; } .ev-head { flex-direction: column; } }
.card-top { flex-wrap: wrap; }
.row-actions .btn { white-space: nowrap; }

/* "Watch online" link in the top menu - opens the browser player (app.viptvstreaming.org). */
.nav .nav-watch { color: var(--accent); font-weight: 600; }
.nav .nav-watch::before { content: "\25B6"; font-size: .8em; margin-right: 6px; }
.nav a { white-space: nowrap; }
.header-row .btn { white-space: nowrap; flex-shrink: 0; }
/* The top menu (now 6 links incl. "Watch online") only fits in one row on wide screens: below 1100px it
   switches to the same ☰ dropdown phones use (these are the 860px header rules, just starting earlier),
   and the small tagline next to the logo steps aside a bit before that. */
@media (max-width: 1240px) { .brand-tag { display: none; } }
@media (max-width: 1100px) {
  .menu-btn { display: grid; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    background: #0b0b0d; border-bottom: 1px solid var(--line); padding: 8px 16px 16px;
    display: none;
  }
  .menu-open .nav { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav a::after { display: none; }
  .header-row { gap: 12px; }
}

/* ---------- /appstore: direct-link page for Android TV boxes (remote control friendly) ---------- */
.store { min-height: 100vh; background: radial-gradient(1200px 500px at 50% -10%, rgba(255, 138, 31, .14), transparent 60%), var(--bg); }
.store-head { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 28px 16px 8px; }
.store-badge { font-family: var(--font-display); font-size: 26px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.store-main { width: min(900px, 100% - 32px); margin: 0 auto; padding: 8px 0 48px; display: grid; gap: 22px; }
.store-hint { margin: 0; text-align: center; color: var(--muted); font-size: 18px; }
.store-app { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px; padding: 24px; border-radius: 22px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.store-app-main { border-color: rgba(255, 138, 31, .55); box-shadow: 0 20px 60px rgba(255, 138, 31, .12); }
.store-icon { width: 96px; height: 96px; border-radius: 22px; background: var(--surface); object-fit: contain; }
.store-info h1, .store-info h3 { margin: 0; font-family: var(--font-display); font-size: 44px; font-weight: 800; text-transform: uppercase; line-height: 1; }
.store-info h3 { font-size: 34px; }
.store-meta { margin: 8px 0 0; color: var(--muted); font-size: 18px; }
.store-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; padding: 0 30px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 700 22px var(--font-body); text-decoration: none; white-space: nowrap; border: 3px solid transparent; transition: transform .12s, box-shadow .12s; }
/* Remote-control focus: impossible to miss from the couch. */
.store a:focus, .store summary:focus, .store-btn:focus { outline: 5px solid #fff; outline-offset: 5px; transform: scale(1.05); box-shadow: 0 0 0 10px rgba(255, 138, 31, .35); }
.store-details { padding: 18px 24px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); font-size: 18px; }
.store-details summary { cursor: pointer; font-weight: 600; font-size: 20px; border-radius: 10px; }
.store-details p { white-space: pre-wrap; color: var(--muted); margin: 12px 0 0; }
.store-steps { padding: 24px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); }
.store-steps h2 { margin: 0 0 12px; font-family: var(--font-display); font-size: 30px; text-transform: uppercase; }
.store-steps ol { margin: 0; padding-left: 28px; display: grid; gap: 12px; font-size: 20px; line-height: 1.5; }
.store-note { color: var(--muted); font-size: 17px; }
.store-help { text-align: center; color: var(--muted); font-size: 17px; margin: 8px 0 0; }
@media (max-width: 640px) {
  .store-app { grid-template-columns: auto 1fr; }
  .store-btn { grid-column: 1 / -1; }
  .store-icon { width: 72px; height: 72px; }
  .store-info h1 { font-size: 36px; }
}

/* ---------- Account: Refer a friend ---------- */
.ref-link { display: flex; gap: 10px; }
.ref-link input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 500 15px ui-monospace, Menlo, Consolas, monospace; }
@media (max-width: 560px) { .ref-link { flex-direction: column; } }

/* ---------- Support chat button (bottom right, links to Telegram) ---------- */
.support-chat {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 40;
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px 12px 14px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font: 700 15px var(--font-body); text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .08) inset; transition: transform .15s var(--ease), background .15s;
}
.support-chat:hover { background: var(--accent-hi); transform: translateY(-2px); }
.support-chat svg { width: 22px; height: 22px; fill: currentColor; flex: 0 0 auto; }
@media (max-width: 560px) {
  .support-chat { padding: 14px; }
  .support-chat span { display: none; }
}
@media print { .support-chat { display: none; } }

/* ---------- Admin: Support inbox ---------- */
.tab-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--flix); color: #fff; font-size: 12px; font-weight: 700; }
.sp-row { cursor: pointer; }
.sp-row td { white-space: normal; }
.sp-row .hint { max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-row.is-new td { font-weight: 700; }
.sp-row.is-open { background: rgba(255, 138, 31, .08); }
.sp-body { white-space: pre-wrap; word-break: break-word; padding: 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); line-height: 1.6; }
.sp-reply-item { display: grid; gap: 6px; padding-left: 16px; border-left: 3px solid var(--accent); }

/* Plan form: password confirm error shown right at the field */
.field.has-err input { border-color: #e5383b; box-shadow: 0 0 0 2px rgba(229, 56, 59, .35); }
.field-err { display: block; color: #ff6b6d; font-size: 14px; font-weight: 600; margin-top: 6px; }
.field-err[hidden] { display: none; }

/* Free trial strip above the plans */
.trial-strip { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 24px; margin: 0 0 20px; padding: 18px 22px; border: 1px solid rgba(255, 138, 31, .55); border-radius: var(--radius); background: rgba(255, 138, 31, .08); }
.trial-strip h3 { margin: 0; font: 800 clamp(22px, 3vw, 28px)/1.15 var(--font-display); text-transform: uppercase; }
.trial-strip p { margin: 4px 0 0; color: var(--muted); }

/* Home hero tab */
.hh-results { display: grid; gap: 8px; margin: 10px 0; }
/* Admin: My sources */
.ms-step { font-size: 15px; margin: 18px 0 8px; }
.ms-picked { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; border: 1px solid rgba(255, 138, 31, .5); background: rgba(255, 138, 31, .08); margin: 10px 0; }
.ms-picked img { width: 96px; height: 54px; object-fit: cover; border-radius: 6px; flex: 0 0 auto; }
.ms-noimg { width: 96px; height: 54px; border-radius: 6px; flex: 0 0 auto; background: var(--surface-2); }
.ms-episode { display: flex; gap: 12px; }
.ms-episode .field { width: 120px; }
.ms-pm { margin-top: 10px; }
.ms-files { display: grid; gap: 6px; margin: 8px 0; max-height: 420px; overflow-y: auto; }
.ms-file-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.ms-file-row.is-on { border-color: rgba(255, 138, 31, .6); }
.ms-folder { cursor: pointer; }
.ms-folder:hover { background: var(--surface-2); }
.ms-file-name { font-weight: 600; overflow-wrap: anywhere; }
#ms-rows td { white-space: normal; }
#ms-rows .ms-video { overflow-wrap: anywhere; color: var(--muted); }
.hh-result { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.hh-result img { width: 96px; height: 54px; object-fit: cover; border-radius: 6px; flex: 0 0 auto; background: var(--surface-2); }
.hh-result .hh-r-text { flex: 1; min-width: 0; }
.hh-result .hh-r-title { font-weight: 700; }
.hh-preview { position: relative; width: 240px; height: 135px; border-radius: 10px; overflow: hidden; flex: 0 0 auto; background: var(--surface-2); border: 1px solid var(--line); }
.hh-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hh-preview::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18,18,18,.92) 0%, rgba(18,18,18,.55) 45%, rgba(18,18,18,0) 75%); }
.hh-preview-text { position: absolute; left: 10px; top: 10px; right: 40%; z-index: 1; color: #fff; font-size: 10px; line-height: 1.25; }
.hh-preview-text b { display: block; font-size: 13px; margin: 2px 0; }
.hh-preview-text span { opacity: .8; }
@media (max-width: 560px) { .hh-preview { width: 100%; height: auto; aspect-ratio: 16 / 9; } }
.hh-picks { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.hh-pick { padding: 0; border: 2px solid transparent; border-radius: 6px; background: none; cursor: pointer; line-height: 0; }
.hh-pick img { width: 56px; height: 32px; object-fit: cover; border-radius: 4px; }
.hh-pick.is-on { border-color: var(--accent); }

/* admin > App Settings */
.as-section { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.as-section h3 { margin: 0 0 4px; font-size: 17px; }
.as-row { display: grid; grid-template-columns: minmax(180px, 320px) 1fr auto; gap: 10px 14px; align-items: center; padding: 8px 0; border-bottom: 1px dashed rgba(255,255,255,.06); }
.as-row label { font-size: 14px; font-weight: 600; }
.as-row .hint { grid-column: 1 / -1; margin-top: -4px; }
.as-row input[type=text], .as-row input[type=url], .as-row input[type=number], .as-row textarea { width: 100%; background: var(--surface-2); border: 1px solid rgba(255,255,255,.2); color: var(--text); border-radius: 10px; padding: 8px 10px; font: 14px var(--font-body); }
.as-row textarea { min-height: 90px; resize: vertical; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.as-row.is-changed label::after { content: " • changed"; color: var(--accent-hi); font-weight: 500; font-size: 12px; }
.as-switch { position: relative; display: inline-block; vertical-align: middle; width: 46px; height: 26px; flex: 0 0 auto; }
.as-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.as-switch span { position: absolute; inset: 0; border-radius: 26px; background: #3a3a44; cursor: pointer; transition: background .15s; }
.as-switch span::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: transform .15s; }
.as-switch input:checked + span { background: #22c55e; }
.as-switch input:checked + span::before { transform: translateX(20px); }
.as-switch input:focus-visible + span { box-shadow: 0 0 0 3px rgba(255,138,31,.45); }
.as-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; }
.as-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.as-table th { text-align: left; color: var(--muted); font-weight: 600; padding: 4px 6px; }
.as-table td { padding: 4px 6px; }
.as-table input[type=text] { width: 100%; min-width: 70px; background: var(--surface-2); border: 1px solid rgba(255,255,255,.2); color: var(--text); border-radius: 8px; padding: 6px 8px; }
.as-key { display: grid; grid-template-columns: minmax(180px, 300px) 1fr auto auto; gap: 8px 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed rgba(255,255,255,.06); }
.as-key .hint { grid-column: 1 / -1; }
.as-ok { color: #22c55e; } .as-bad { color: #ef4444; }
@media (max-width: 720px) { .as-row, .as-key { grid-template-columns: 1fr; } }
.as-row.as-wide { grid-template-columns: 1fr auto; }
.as-row.as-wide > .as-editor { grid-column: 1 / -1; }
.as-table td.as-name { min-width: 150px; }
.as-table td.as-btns { white-space: nowrap; }
.as-table td.as-btns .btn { margin-left: 4px; }
.as-key input[type=text] { width: 100%; background: var(--surface-2); border: 1px solid rgba(255,255,255,.2); color: var(--text); border-radius: 10px; padding: 8px 10px; font: 14px var(--font-body); }

/* admin > VPN */
.vpn-acct { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-top: 14px; background: rgba(255,255,255,.015); }
.vpn-acct.is-off { opacity: .6; }
.vpn-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.vpn-head h3 { margin: 0; font-size: 17px; }
.vpn-tag { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: #2b2b33; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.vpn-tag.ok { background: rgba(34,197,94,.15); color: #4ade80; } .vpn-tag.bad { background: rgba(229,56,59,.15); color: #f87171; }
.vpn-bar { flex: 1 1 160px; min-width: 140px; height: 8px; background: #2b2b33; border-radius: 8px; overflow: hidden; }
.vpn-bar span { display: block; height: 100%; background: var(--accent); }
.vpn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px 14px; margin: 12px 0; align-items: end; }
.vpn-grid label { font-size: 13px; color: var(--muted); display: grid; gap: 4px; }
.vpn-grid input[type=text], .vpn-grid input[type=password], .vpn-grid input[type=number] { background: var(--surface-2); border: 1px solid rgba(255,255,255,.2); color: var(--text); border-radius: 10px; padding: 8px 10px; font: 14px var(--font-body); }
.vpn-row { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.vpn-files { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
.vpn-files td, .vpn-files th { padding: 5px 6px; border-top: 1px dashed rgba(255,255,255,.06); text-align: left; }
.vpn-files th { color: var(--muted); font-weight: 600; }
.vpn-files td.r { white-space: nowrap; text-align: right; }
.vpn-add { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; }

.st-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 14px; }
.st-bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; margin-top: 4px; }
.st-bar > span { display: block; height: 100%; background: var(--accent, #e50914); }
