/* StarTrax - modern, mobile-friendly theme. Loaded after style.css on every page except AirPlay (body.air keeps its own look). */
:root{
  --bg:#f2f4f8;--card:#ffffff;--ink:#1c2333;--muted:#667085;--line:#e3e7ee;--accent:#3b5bdb;--accent2:#5c7cfa;--accent-ink:#fff;
  --ok:#12b76a;--warn:#f79009;--bad:#d92d20;--face:#ffffff;--lbl:#475467;--hover:#eef2ff;--shadow:0 1px 2px rgba(16,24,40,.06),0 6px 20px rgba(16,24,40,.07);--r:12px;
}
@media (prefers-color-scheme:dark){:root{--bg:#0f1420;--card:#171e2e;--ink:#e6eaf3;--muted:#98a2b3;--line:#2a3347;--accent:#6d8bff;--accent2:#8aa2ff;--accent-ink:#0b1020;--face:#171e2e;--lbl:#aab4c8;--hover:#212b44;--shadow:0 1px 2px rgba(0,0,0,.4),0 8px 24px rgba(0,0,0,.35)}}
html{-webkit-text-size-adjust:100%}
body:not(.air){font:15px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;letter-spacing:0;color:var(--ink);background:var(--bg)}
body.desk,body.stars{background:var(--bg) !important;overflow:auto}
body:not(.air) img.ico{image-rendering:auto}
body:not(.air) a{color:inherit}
body:not(.air) .desk-wrap{padding:16px 12px 40px;min-height:100%}

/* windows become cards */
body:not(.air) .win{position:static !important;left:auto !important;top:auto !important;margin:0 auto 16px !important;width:100% !important;max-width:1100px;background:var(--card);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow);overflow:visible}
body:not(.air) .win.mainwin{max-width:720px}
body:not(.air) .win.dlg,body:not(.air) .dlg{max-width:980px;margin-top:6px}
body:not(.air) .titlebar{height:auto;min-height:52px;padding:8px 14px;background:linear-gradient(135deg,var(--accent),var(--accent2));color:#fff;font-size:17px;font-weight:650;border-radius:var(--r) var(--r) 0 0;cursor:default !important;gap:10px}
body:not(.air) .titlebar .tbicon img{height:30px;width:auto;margin:0;background:rgba(255,255,255,.18);border-radius:8px;padding:3px}
body:not(.air) .tbtext{white-space:normal;overflow:visible;text-overflow:clip;line-height:1.25}
body:not(.air) .tbbtns{margin:0}
body:not(.air) .tb.tbmin{display:none}
body:not(.air) .tb.tbmax{width:34px;height:34px;border:0;border-radius:50%;background:rgba(255,255,255,.2);color:#fff;font-size:0;position:relative}
body:not(.air) .tb.tbmax::before{content:"\2715";font-size:16px;line-height:1}
body:not(.air) .tb.tbmax:hover{background:rgba(255,255,255,.35)}

/* menu bar -> nav row */
body:not(.air) .menubar{display:flex;flex-wrap:wrap;gap:2px;padding:6px 10px;background:var(--card);border-bottom:1px solid var(--line);font-size:14px;font-weight:600}
body:not(.air) .mb{padding:0;position:relative}
body:not(.air) .mbl{display:block;padding:8px 12px;border-radius:8px;color:var(--ink);cursor:pointer}
body:not(.air) .mbl u{text-decoration:none}
body:not(.air) .mb:hover .mbl,body:not(.air) .mb.open .mbl{background:var(--hover);color:var(--accent);padding:8px 12px;margin:0}
body:not(.air) .mb.open .mdrop{display:block}
body:not(.air) .mdrop{top:calc(100% + 2px);background:var(--card);border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow);min-width:210px;padding:6px;z-index:80}
body:not(.air) .mdrop a{padding:9px 12px;border-radius:7px;font-weight:500}
body:not(.air) .mdrop a:hover{background:var(--hover);color:var(--accent)}
body:not(.air) .mdrop hr{border-top:1px solid var(--line);margin:4px 0}
body:not(.air) .popup{background:var(--card);border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow);padding:6px;font-size:14px;font-weight:500;min-width:220px}
body:not(.air) .popup a{padding:10px 14px;border-radius:7px}
body:not(.air) .popup a:hover,body:not(.air) .popup a.hot{background:var(--hover);color:var(--accent)}

/* toolbar + buttons */
body:not(.air) .toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:10px 12px;background:var(--card);border-bottom:1px solid var(--line)}
body:not(.air) .tbtn{display:flex;align-items:center;justify-content:center;padding:6px 8px;border:1px solid var(--line);border-radius:9px;background:var(--card);min-height:40px}
body:not(.air) .tbtn:hover{background:var(--hover)}
body:not(.air) .tbtn img{height:24px;min-width:0;width:auto}
body:not(.air) .toolbar label{color:var(--lbl);margin-left:4px}
body:not(.air) .btn,body:not(.air) button.btn,body:not(.air) input.btn{background:var(--accent);color:var(--accent-ink);border:0;outline:0;border-radius:10px;padding:10px 20px;min-width:92px;font-size:15px;font-weight:600;min-height:42px;box-shadow:0 1px 2px rgba(16,24,40,.15);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
body:not(.air) .btn:hover{filter:brightness(1.07)}
body:not(.air) .btn:active{transform:translateY(1px)}
body:not(.air) .btn.sm,body:not(.air) .btn.sm2{padding:6px 12px;min-height:34px;min-width:0;font-size:13.5px;font-weight:600;background:var(--hover);color:var(--accent);border:1px solid var(--line);box-shadow:none}
body:not(.air) .btn.sm:hover,body:not(.air) .btn.sm2:hover{background:var(--accent);color:var(--accent-ink)}
body:not(.air) .btnrow{display:flex;flex-wrap:wrap;gap:10px;padding:12px 0}

/* inputs */
body:not(.air) input[type=text],body:not(.air) input[type=password],body:not(.air) input[type=date],body:not(.air) input[type=number],body:not(.air) input[type=time],body:not(.air) input[type=email],body:not(.air) input[type=search],body:not(.air) select,body:not(.air) textarea{font:inherit;background:var(--card);color:var(--ink);border:1px solid var(--line);border-radius:9px;padding:9px 11px;min-height:40px;max-width:100%}
body:not(.air) input:focus,body:not(.air) select:focus,body:not(.air) textarea:focus{outline:2px solid color-mix(in srgb,var(--accent) 40%,transparent);border-color:var(--accent)}
body:not(.air) input[type=checkbox],body:not(.air) input[type=radio]{width:18px;height:18px;accent-color:var(--accent)}
body:not(.air) fieldset{border:1px solid var(--line);border-radius:10px;padding:10px 14px;margin:12px 0;color:var(--lbl)}
body:not(.air) legend{padding:0 6px;font-weight:600}
body:not(.air) .frow{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin:10px 0}
body:not(.air) .frow>label,body:not(.air) .lbl{width:190px;flex:none;color:var(--lbl);font-weight:500}
body:not(.air) .chk{gap:8px}

/* notebook tabs -> pills */
body:not(.air) .notebook{padding:12px}
body:not(.air) .tabs{display:flex;flex-wrap:wrap;gap:6px;padding:0;margin:0 0 12px}
body:not(.air) .tab{border:1px solid var(--line);border-radius:999px;padding:8px 16px;margin:0;background:var(--card);color:var(--lbl);font-size:14px;font-weight:600;cursor:pointer}
body:not(.air) .tab.on{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
body:not(.air) .tab.names,body:not(.air) .tab.sched,body:not(.air) .tab.finfo,body:not(.air) .tab.notes,body:not(.air) .tab.audio,body:not(.air) .tab.attr{background:var(--card)}
body:not(.air) .tab.on.names,body:not(.air) .tab.on.sched,body:not(.air) .tab.on.finfo,body:not(.air) .tab.on.notes,body:not(.air) .tab.on.audio,body:not(.air) .tab.on.attr{background:var(--accent)}
body:not(.air) .page{border:0;padding:4px 2px 12px;min-height:0;background:transparent}
body:not(.air) .page h4{font-size:18px;margin:4px 0 14px;border-bottom:1px solid var(--line);padding-bottom:8px}

/* lists and tables */
body:not(.air) .listwrap{background:var(--card);height:auto;max-height:68vh;min-height:200px;overflow:auto;border:0;-webkit-overflow-scrolling:touch}
body:not(.air) table.datalist{font-size:14.5px;background:var(--card)}
body:not(.air) .datalist th{background:var(--bg);border:0;border-bottom:1px solid var(--line);height:auto;padding:10px 12px;font-weight:600;color:var(--muted);font-size:12.5px;text-transform:uppercase;letter-spacing:.04em}
body:not(.air) .datalist th span{border:0}
body:not(.air) .datalist td{border:0;border-bottom:1px solid var(--line);padding:10px 12px;height:auto}
body:not(.air) .datalist .sel{width:46px;padding:6px 10px}
body:not(.air) .datalist td.sel img{height:22px}
body:not(.air) .datalist tr:hover td{background:var(--hover)}
body:not(.air) .datalist tr.on td{background:var(--accent);color:var(--accent-ink)}
body:not(.air) .datalist tr.on:hover td{background:var(--accent)}
body:not(.air) table.plain,body:not(.air) .plain{background:var(--card);border-radius:8px;overflow:hidden}
body:not(.air) .plain th,body:not(.air) .plain td{border:0;border-bottom:1px solid var(--line);padding:8px 10px}
body:not(.air) .plain th{background:var(--bg);color:var(--muted);font-weight:600;font-size:12.5px;text-transform:uppercase;letter-spacing:.03em}
body:not(.air) .prg th{background:var(--bg);color:var(--muted)}
body:not(.air) .prg td{border-bottom:1px solid var(--line)}
body:not(.air) .statusbar{display:flex;align-items:center;gap:10px;padding:8px 12px;background:var(--bg);border-top:1px solid var(--line);border-radius:0 0 var(--r) var(--r)}
body:not(.air) .sicons{display:none}
body:not(.air) .sitems{border:0;padding:0;color:var(--muted);font-size:13px}

body:not(.air) .err{background:color-mix(in srgb,var(--bad) 12%,var(--card));border:1px solid var(--bad);border-radius:9px;color:var(--bad);padding:10px 14px}
body:not(.air) .ok{background:color-mix(in srgb,var(--ok) 12%,var(--card));border:1px solid var(--ok);border-radius:9px;color:var(--ok);padding:10px 14px}
body:not(.air) .help{background:var(--card);border-radius:var(--r);box-shadow:var(--shadow);height:auto;max-height:none}
body:not(.air) .help h2,body:not(.air) .help h3{color:var(--accent)}

/* login + main menu */
body.stars .frame,body.desk .frame{background:var(--card);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow);width:min(560px,100%);padding:0 0 14px;overflow:hidden}
body:not(.air) .frame.menuwin{border:0;box-shadow:none;width:100%;background:transparent;padding:0}
body:not(.air) .frame.login{margin:6vh auto 0}
body:not(.air) .logo{background:#05070f;padding:6px}
body:not(.air) .loginrow{color:var(--ink);font-size:16px;padding:14px 18px}
body:not(.air) .loginrow input{background:var(--card);border:1px solid var(--line);border-radius:9px;color:var(--ink);font-size:16px;padding:10px 12px}
body:not(.air) .silly{color:var(--muted);font-size:13px}
body:not(.air) .copy{color:var(--muted);font-size:12px}
body:not(.air) .menu-row1{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:12px;padding:14px}
body:not(.air) .menu-row2{display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:12px;padding:0 14px 14px}
body:not(.air) .menu-row1 a,body:not(.air) .menu-row2 a{border:1px solid var(--line);border-radius:14px;background:var(--card);overflow:hidden;box-shadow:var(--shadow);transition:transform .12s}
body:not(.air) .menu-row1 a:hover,body:not(.air) .menu-row2 a:hover{transform:translateY(-2px)}
body:not(.air) .menu-row1 img,body:not(.air) .menu-row2 img{border-radius:0}
body:not(.air) .bigbtns{gap:12px !important;padding:8px 16px !important}
body:not(.air) .bigbtns a,body:not(.air) .bigbtns button{border-radius:12px;overflow:hidden}

/* program grid, format editor, misc */
body:not(.air) .fmtop{flex-wrap:wrap}
body:not(.air) .two>*{min-width:260px}
body:not(.air) .grid168{background:var(--card);border:1px solid var(--line);border-radius:10px;overflow:auto}
body:not(.air) .pkey{background:var(--card);border:1px solid var(--line);border-radius:10px}
body:not(.air) [style*="color:#1f1fa0"],body:not(.air) [style*="color:#1a1aa0"]{color:var(--lbl) !important}
body:not(.air) [style*="background:var(--face)"]{background:var(--card) !important}

@media (max-width:760px){
  body:not(.air){font-size:16px}
  body:not(.air) .desk-wrap{padding:8px 6px 32px}
  body:not(.air) .win{border-radius:10px}
  body:not(.air) .titlebar{border-radius:10px 10px 0 0;font-size:16px;min-height:48px}
  body:not(.air) .menubar{overflow:visible}
  body:not(.air) .mdrop{position:fixed;left:8px;right:8px;top:auto;max-height:70vh;overflow:auto}
  body:not(.air) .frow>label,body:not(.air) .lbl{width:100%}
  body:not(.air) .frow input[type=text].w,body:not(.air) .frow select.w{width:100%}
  body:not(.air) .page,body:not(.air) .notebook,body:not(.air) form{overflow-x:auto}
  body:not(.air) .listwrap{max-height:62vh}
  body:not(.air) .datalist td,body:not(.air) .datalist th{white-space:nowrap}
  body:not(.air) .btn{flex:1 1 auto}
  body:not(.air) .fmwin{width:100% !important}
  body:not(.air) .two{flex-direction:column}
}
/* brand + main-menu tiles */
body:not(.air) .brand{display:flex;align-items:baseline;gap:10px;padding:22px 20px 10px;color:var(--accent);flex-wrap:wrap}
body:not(.air) .brand .mark{font-size:30px}body:not(.air) .brand b{font-size:28px;letter-spacing:-.5px}body:not(.air) .brand small{color:var(--muted);font-size:14px}
body:not(.air) .tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:12px;padding:16px}
body:not(.air) .tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:22px 10px;border:1px solid var(--line);border-radius:14px;background:var(--card);color:var(--ink);font-weight:600;text-align:center;cursor:pointer;box-shadow:var(--shadow);transition:transform .12s,background .12s;text-decoration:none}
body:not(.air) .tile svg{color:var(--accent)}
body:not(.air) .tile:hover{background:var(--hover);transform:translateY(-2px)}
body:not(.air) .tb{width:34px;height:34px;border:0;border-radius:50%;background:rgba(255,255,255,.2);color:#fff;font-size:15px}
body:not(.air) .titlebar .tbicon{display:none}
body:not(.air) .tbbtns .tb:first-child:not(:last-child){display:none}
body:not(.air) .btn[disabled],body:not(.air) button[disabled]{opacity:.45;cursor:not-allowed;filter:grayscale(.3)}
/* inline SVG icons (line icons) */
body:not(.air) svg.mi{width:22px;height:22px;display:block;flex:none;color:var(--accent)}
body:not(.air) .tbtn svg.mi{width:22px;height:22px}
body:not(.air) .datalist td.sel svg.mi{width:20px;height:20px}
body:not(.air) .titlebar svg.mi{color:#fff}
body:not(.air) a.tbtn{min-width:42px}

/* drag handles */
body:not(.air) .grip{cursor:grab;color:var(--muted);width:26px;text-align:center;user-select:none;touch-action:none;font-size:18px;line-height:1}
body:not(.air) .grip:active{cursor:grabbing}body:not(.air) tr.dragging td{background:var(--hover);box-shadow:0 4px 14px rgba(16,24,40,.18)}
body:not(.air) .dropzone{border:2px dashed var(--line);border-radius:var(--r);padding:26px;text-align:center;color:var(--muted)}
body:not(.air) .brand{align-items:center}body:not(.air) .logomark{flex:none;border-radius:22%}
