
  @font-face { font-family: "Inter"; src: url("assets/fonts/inter.woff2") format("woff2"); font-weight: 100 900; }
  :root {
    --font: "Inter", "Nirmala UI", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --bg: #F3F4F7; --panel: #FFFFFF; --line: #E6E8EC; --text: #1D2433; --muted: #667085; --chip: #F2F4F7;
    --red: #C8102E; --red-bg: #FDECEE; --navy: #0E2A5C; --green: #16A34A; --green-bg: #E7F6EC; --amber: #B45309; --amber-bg: #FFF4E5;
    --azure: #2563EB; --azure-bg: #EAF1FE; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  }
  [data-theme="dark"] {
    --bg: #0F141C; --panel: #171D27; --line: #273042; --text: #E8ECF3; --muted: #95A0B4; --chip: #222B3A;
    --red-bg: #3A1620; --green-bg: #12301F; --amber: #FBBF24; --amber-bg: #3A2A12; --azure-bg: #16264A; --shadow: none;
  }
  * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
  html, body { margin: 0; height: 100%; }
  body { background: var(--bg); font: 15px/1.45 var(--font); color: var(--text); overscroll-behavior-y: contain; }
  .screen { position: fixed; inset: 0; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; background: var(--bg);
            padding-top: env(safe-area-inset-top); }
  .tabs { padding-bottom: max(8px, env(safe-area-inset-bottom)) !important; }
  button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
  input, textarea { font: inherit; color: var(--text); }
  /* top bar */
  .top { flex: none; padding: 10px 16px 10px; display: flex; align-items: center; gap: 10px; }
  .top .mark { width: 30px; height: 30px; border-radius: 8px; }
  .top .ttl { font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
  .top .back { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; margin-left: -6px; }
  .top .back:active { background: var(--chip); }
  .top .spacer { flex: 1; }
  .top .iconbtn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 21px; position: relative; }
  .top .iconbtn .dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); border: 2px solid var(--bg); }
  .pcpick { margin: 0 16px 10px; display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
  .pcpick .nm { font-weight: 600; flex: 1; } .pcpick .sub { font-size: 12px; color: var(--muted); }
  .pcpick .on { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-bg); }
  /* body */
  .body { flex: 1; overflow-y: auto; padding: 0 16px 16px; scrollbar-width: none; }
  .body::-webkit-scrollbar { display: none; }
  .card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); margin-bottom: 12px; }
  .card .hd { display: flex; align-items: center; gap: 8px; padding: 12px 14px 0; font-weight: 600; }
  .card .hd .more { margin-left: auto; font-size: 13px; color: var(--red); font-weight: 600; }
  .card .bd { padding: 12px 14px; }
  .sec { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 16px 2px 8px; }
  .banner { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; margin-bottom: 12px; font-weight: 600; }
  .banner i { font-size: 22px; } .banner small { display: block; font-weight: 400; color: var(--muted); }
  .banner.ok { background: var(--green-bg); color: var(--green); } .banner.ok small { color: inherit; opacity: .8; }
  .banner.warn { background: var(--amber-bg); color: var(--amber); }
  .chip { white-space: nowrap; flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; letter-spacing: .02em; }
  .chip.onair { background: var(--green); color: #fff; } .chip.offair { background: var(--red); color: #fff; }
  .chip.soft { background: var(--chip); color: var(--muted); font-weight: 600; }
  .chip.live { background: var(--red); color: #fff; }
  /* a channel on Home */
  .ch { display: flex; gap: 12px; padding: 12px; align-items: center; }
  .ch + .ch { border-top: 1px solid var(--line); }
  .thumb { width: 96px; height: 54px; border-radius: 10px; flex: none; position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 5px 6px; color: #fff; font-size: 10px; font-weight: 600; }
  .thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.45)); }
  .thumb span { position: relative; z-index: 1; line-height: 1.2; }
  .thumb .logo { position: absolute; top: 5px; right: 6px; z-index: 1; font-size: 8px; font-weight: 800; background: rgba(255,255,255,.85); color: #0E2A5C; padding: 1px 4px; border-radius: 3px; }
  .ch .info { flex: 1; min-width: 0; }
  .ch .nm { font-weight: 650; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
  .ch .nm .cn { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .ch .now { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ch .outs { display: flex; gap: 8px; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
  .ok-dot, .bad-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 3px; vertical-align: 1px; }
  .ok-dot { background: var(--green); } .bad-dot { background: var(--red); }
  .chev { color: var(--muted); font-size: 18px; }
  /* channel screen */
  .player { border-radius: 16px; overflow: hidden; position: relative; aspect-ratio: 16 / 9; margin-bottom: 12px; box-shadow: var(--shadow); }
  .player .frame { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 14px 54px 34px 14px; color: #fff; font-weight: 700; font-size: 18px; }
  .player .frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.15), transparent 30%, transparent 55%, rgba(0,0,0,.55)); }
  .player .frame > * { position: relative; z-index: 1; }
  .player .tl { position: absolute; top: 10px; left: 10px; z-index: 2; display: flex; gap: 6px; }
  .player .tr { position: absolute; top: 10px; right: 10px; z-index: 2; font-size: 11px; background: rgba(0,0,0,.45); color: #fff; padding: 3px 7px; border-radius: 6px; }
  .player .ticker { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; background: rgba(14,42,92,.92); color: #fff; font-size: 11px; white-space: nowrap; overflow: hidden; display: flex; }
  .player .ticker .tw { flex: 1; overflow: hidden; padding: 4px 0; }
  .player .ticker span { display: inline-block; animation: tick 14s linear infinite; padding-left: 100%; }
  @keyframes tick { to { transform: translateX(-100%); } }
  .player .full { position: absolute; bottom: 30px; right: 10px; z-index: 2; width: 32px; height: 32px; border-radius: 8px; background: rgba(0,0,0,.45); color: #fff; display: grid; place-items: center; font-size: 18px; }
  .nowcard .t { font-weight: 650; font-size: 16px; }
  .bar { height: 6px; border-radius: 3px; background: var(--chip); overflow: hidden; margin: 10px 0 6px; }
  .bar i { display: block; height: 100%; background: var(--red); border-radius: 3px; }
  .times { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
  .next { display: flex; gap: 10px; align-items: center; padding: 8px 0; font-size: 14px; }
  .next + .next { border-top: 1px solid var(--line); }
  .next .when { width: 48px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
  .next .nm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
  .act { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; box-shadow: var(--shadow); }
  .act i { font-size: 24px; } .act.danger i { color: var(--red); } .act:active { transform: scale(.97); }
  .row { display: flex; align-items: center; gap: 10px; padding: 11px 0; }
  .row + .row { border-top: 1px solid var(--line); }
  .row .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; flex: none; }
  .row .tx { flex: 1; min-width: 0; } .row .tx small { display: block; color: var(--muted); font-size: 12.5px; }
  .row .tx .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ic.green { background: var(--green-bg); color: var(--green); } .ic.red { background: var(--red-bg); color: var(--red); }
  .ic.amber { background: var(--amber-bg); color: var(--amber); } .ic.azure { background: var(--azure-bg); color: var(--azure); }
  .ic.gray { background: var(--chip); color: var(--muted); }
  /* switch */
  .sw { width: 46px; height: 28px; border-radius: 14px; background: #CBD2DC; position: relative; transition: .2s; flex: none; }
  .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: .2s; }
  .sw.on { background: var(--green); } .sw.on::after { left: 21px; }
  /* graphics: logo on the picture, ticker styles, pickers */
  .plogo { position: absolute; z-index: 2; border-radius: 6px; overflow: hidden; display: grid; place-items: center; transition: .25s; }
  .plogo img { width: 100%; height: 100%; object-fit: contain; }
  .plogo.def { background: rgba(255,255,255,.9); color: #0E2A5C; font-weight: 800; letter-spacing: .02em; }
  .plogo.s { width: 34px; height: 20px; font-size: 7px; } .plogo.m { width: 50px; height: 28px; font-size: 9px; } .plogo.l { width: 70px; height: 40px; font-size: 12px; }
  .plogo.tl { top: 38px; left: 10px; } .plogo.tr { top: 38px; right: 10px; } .plogo.bl { bottom: 30px; left: 10px; } .plogo.br { bottom: 30px; right: 10px; }
  .player.noticker .plogo.bl, .player.noticker .plogo.br { bottom: 10px; }
  .ticker.navy { background: rgba(14,42,92,.92); color: #fff; } .ticker.red { background: #C8102E; color: #fff; }
  .ticker.black { background: rgba(0,0,0,.82); color: #fff; } .ticker.yellow { background: #FACC15; color: #111; }
  .ticker .lbl { flex: none; background: #fff; color: #C8102E; font-weight: 800; padding: 0 7px; line-height: 23px; }
  .picks { display: flex; gap: 8px; flex-wrap: wrap; }
  .pick { height: 38px; padding: 0 14px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--panel); font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
  .pick.on { border-color: var(--red); color: var(--red); background: var(--red-bg); }
  .swatch { width: 16px; height: 16px; border-radius: 4px; display: inline-block; border: 1px solid rgba(0,0,0,.15); }
  .lbl2 { font-size: 13px; font-weight: 600; margin: 14px 0 8px; } .lbl2:first-child { margin-top: 0; }
  .corners { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; aspect-ratio: 16/7; border: 1.5px dashed var(--line); border-radius: 12px; padding: 8px; }
  .corners button { border-radius: 8px; background: var(--chip); font-size: 12.5px; font-weight: 600; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 4px; }
  .corners button.on { background: var(--red); color: #fff; }
  .msg { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; }
  .msg + .msg { border-top: 1px solid var(--line); }
  .msg .n { width: 22px; height: 22px; border-radius: 50%; background: var(--chip); color: var(--muted); font-size: 12px; font-weight: 700; display: grid; place-items: center; flex: none; margin-top: 1px; }
  .msg .tx { flex: 1; font-size: 14px; } .msg.brk .n { background: var(--red); color: #fff; }
  .gfx { display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: 100%; text-align: left; }
  .gfx + .gfx { border-top: 1px solid var(--line); }
  .gfx .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; flex: none; }
  .gfx .tx { flex: 1; min-width: 0; } .gfx .tx b { display: block; } .gfx .tx small { color: var(--muted); font-size: 12.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .adrow { display: flex; gap: 10px; align-items: center; padding: 12px; }
  .adrow + .adrow { border-top: 1px solid var(--line); } .adrow.paused .mini, .adrow.paused .tx { opacity: .5; }
  .adrow .mini { width: 64px; height: 36px; border-radius: 7px; flex: none; position: relative; }
  .adrow .mini span { position: absolute; right: 3px; bottom: 2px; font-size: 9px; color: #fff; font-weight: 700; }
  .adrow .tx { flex: 1; min-width: 0; } .adrow .tx .nm { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .adrow .tx small { display: block; color: var(--muted); font-size: 12px; }
  .choose { display: flex; gap: 10px; align-items: center; padding: 10px; border: 1.5px solid var(--line); border-radius: 12px; margin-bottom: 8px; width: 100%; text-align: left; background: var(--panel); }
  .choose.on { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }
  .tinput { height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: var(--panel); font-size: 15px; width: 130px; }
  .hint { font-size: 12.5px; color: var(--muted); background: var(--chip); border-radius: 10px; padding: 10px 12px; margin: 14px 0; }
  textarea.tick { width: 100%; min-height: 70px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--bg); resize: none; }
  .btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; border-radius: 12px; font-weight: 650; width: 100%; }
  .btn.red { background: var(--red); color: #fff; } .btn.red:active { filter: brightness(.92); }
  .btn.line { border: 1px solid var(--line); background: var(--panel); }
  .btn.green { background: #25D366; color: #fff; }
  .btn.sm { height: 40px; font-size: 14px; }
  /* playlist */
  .pl { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
  .pl + .pl { border-top: 1px solid var(--line); }
  .pl.onair { background: var(--green-bg); }
  .pl .mini { width: 64px; height: 36px; border-radius: 7px; flex: none; }
  .pl .tx { flex: 1; min-width: 0; } .pl .tx .nm { font-size: 14px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pl .tx small { color: var(--muted); font-size: 12px; }
  .pl .drag { color: var(--muted); font-size: 20px; }
  .pl .dots { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; color: var(--muted); }
  .fab { position: absolute; right: 18px; bottom: 92px; height: 52px; padding: 0 20px; border-radius: 26px; background: var(--red); color: #fff; font-weight: 650; display: flex; align-items: center; gap: 8px; box-shadow: 0 6px 18px rgba(200,16,46,.35); z-index: 5; }
  /* alerts */
  .seg { display: flex; background: var(--chip); border-radius: 12px; padding: 3px; margin-bottom: 12px; }
  .seg button { flex: 1; height: 34px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
  .seg button.on { background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
  .al { display: flex; gap: 12px; padding: 12px 14px; }
  .al + .al { border-top: 1px solid var(--line); }
  .al .tx { flex: 1; } .al .t { font-weight: 600; font-size: 14.5px; } .al .d { font-size: 13px; color: var(--muted); }
  .al .when { font-size: 12px; color: var(--muted); white-space: nowrap; }
  /* tabs */
  .tabs { flex: none; display: flex; background: var(--panel); border-top: 1px solid var(--line); padding: 6px 6px 22px; }
  .tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 6px 0; position: relative; }
  .tabs button i { font-size: 24px; }
  .tabs button.on { color: var(--red); }
  .tabs .badge { position: absolute; top: 2px; left: calc(50% + 6px); background: var(--red); color: #fff; font-size: 10px; min-width: 17px; height: 17px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--panel); }
  /* sheets, toasts */
  .scrim { position: absolute; inset: 0; background: rgba(9,20,44,.45); z-index: 20; display: none; }
  .sheet { position: absolute; left: 0; right: 0; bottom: 0; background: var(--panel); border-radius: 22px 22px 0 0; padding: 8px 18px 28px; z-index: 21; transform: translateY(105%); transition: transform .25s ease; max-height: 86%; overflow-y: auto; }
  .sheet.open { transform: none; } .scrim.open { display: block; }
  .sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 12px; }
  .sheet h3 { margin: 0 0 6px; font-size: 18px; } .sheet p { margin: 0 0 14px; color: var(--muted); }
  .sheet .btns { display: grid; gap: 10px; }
  .toast { position: absolute; left: 16px; right: 16px; bottom: 96px; background: #1D2433; color: #fff; border-radius: 12px; padding: 12px 14px; font-size: 14px; display: flex; gap: 10px; align-items: center; z-index: 30; opacity: 0; transform: translateY(10px); transition: .2s; pointer-events: none; }
  .toast.show { opacity: 1; transform: none; } .toast i { color: #4ADE80; font-size: 20px; }
  /* sign-in */
  .signin { flex: 1; padding: 28px 24px; display: flex; flex-direction: column; overflow-y: auto; }
  .signin .logo { width: 72px; height: 72px; border-radius: 18px; margin: 20px auto 14px; box-shadow: 0 8px 24px rgba(14,42,92,.25); }
  .signin h2 { text-align: center; margin: 0; font-size: 22px; letter-spacing: -.01em; }
  .signin .lead { text-align: center; color: var(--muted); margin: 6px 0 24px; }
  .fld { margin-bottom: 14px; } .fld label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
  .inp { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); height: 50px; padding: 0 14px; gap: 8px; }
  .inp input { border: 0; outline: 0; flex: 1; background: none; font-size: 16px; }
  .inp .cc { font-weight: 600; color: var(--muted); border-right: 1px solid var(--line); padding-right: 10px; }
  .or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 16px 0; }
  .or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
  .code { display: flex; gap: 8px; justify-content: center; margin: 10px 0 18px; }
  .code input { width: 44px; height: 54px; text-align: center; font-size: 22px; font-weight: 700; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); outline: 0; }
  .code input:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }
  .fine { text-align: center; font-size: 12px; color: var(--muted); margin-top: auto; padding-top: 18px; }
  .period { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 16px; }
  .period button { border: 1.5px solid var(--line); border-radius: 14px; padding: 12px; text-align: left; background: var(--panel); }
  .period button.on { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }
  .period b { display: block; font-size: 16px; } .period small { color: var(--muted); } .period .save { color: var(--green); font-weight: 700; font-size: 12px; }
  .ok-big { text-align: center; padding: 16px 0 6px; } .ok-big i { font-size: 64px; color: var(--green); }
  .hidden { display: none !important; }
  /* the real app (27/11/2026) */
  .top .ttl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .signin { padding-top: calc(28px + env(safe-area-inset-top)); }
  .code1 { width: 100%; height: 58px; text-align: center; font-size: 28px; letter-spacing: .4em; font-weight: 700; border: 1px solid var(--line);
           border-radius: 12px; background: var(--panel); outline: 0; margin: 12px 0 16px; padding-left: .4em; }
  .code1:focus, .inp:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }
  .err { color: var(--red); font-size: 13.5px; font-weight: 600; min-height: 20px; margin: 4px 0 8px; text-align: center; }
  .btn[disabled] { opacity: .55; pointer-events: none; }
  .link { color: var(--red); font-weight: 600; font-size: 14px; padding: 10px; display: block; margin: 4px auto 0; }
  .thumb.ph { background: linear-gradient(135deg, #1e293b, #475569); }
  .thumb .ini { position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; font-weight: 800; color: rgba(255,255,255,.85); z-index: 0; }
  .player { background: #0b0f16; }
  .player img.live { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .player .msg { position: absolute; inset: 0; display: grid; place-items: center; color: #cbd5e1; font-size: 13.5px; text-align: center; padding: 20px; z-index: 1; }
  .player .msg i { display: block; font-size: 30px; margin-bottom: 6px; }
  .spin { width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; animation: rot 1s linear infinite; margin: 0 auto 8px; }
  @keyframes rot { to { transform: rotate(360deg); } }
  .empty { text-align: center; color: var(--muted); padding: 34px 16px; } .empty i { font-size: 40px; display: block; margin-bottom: 6px; }
  .offline { background: var(--chip); color: var(--muted); }
  .pulling { text-align: center; font-size: 12px; color: var(--muted); padding: 4px 0 8px; }
  .chip.gray { background: var(--chip); color: var(--muted); }
  .tabs .badge:empty { display: none; }
