/* Guide TV grid */
.vge-overlay{position:fixed;z-index:9999;left:0;top:0;width:100%;height:100%;background:rgba(0,0,0,.94);color:#f4f7fb;padding:36px 48px;font-family:inherit}
.vge-panel{height:100%;display:flex;flex-direction:column;min-height:0}
.vge-bar{display:flex;align-items:center;gap:28px;min-height:70px}
.vge-bar h1{font-size:36px;margin:0}
.vge-now{color:#93a2b5;font-size:21px;flex:1}
.vge-close{min-width:140px;background:#1a2d45;color:#fff;border:2px solid #294963;border-radius:12px;padding:14px;font-size:20px}
.vge-close:focus{outline:4px solid #36eadc}
.vge-feature{background:#101f31;border:1px solid #294963;border-radius:16px;padding:20px 26px;margin:10px 0 18px;min-height:130px}
.vge-feature small{color:#36eadc;letter-spacing:2px;font-weight:bold}
.vge-feature h2{font-size:30px;margin:8px 0}
.vge-feature p{font-size:19px;color:#adbac8;margin:0}
.vge-grid{flex:1;overflow:auto;background:#080f19;border-radius:14px;padding:10px}
.vge-grid-head,.vge-row{display:flex;min-height:62px;align-items:stretch}
.vge-grid-head{position:sticky;top:0;z-index:2;background:#111e2d;color:#a9b6c5}
.vge-channel-head,.vge-channel{width:300px;flex:0 0 300px;display:flex;align-items:center;gap:12px;padding:8px 14px;overflow:hidden}
.vge-channel-head{font-weight:bold}
.vge-channel img{width:56px;height:40px;object-fit:contain;background:#fff;border-radius:5px}
.vge-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:18px}
.vge-time-head,.vge-track{position:relative;flex:1;min-width:0}
.vge-time-head{display:flex;align-items:center}
.vge-time-head span{width:16.666%;padding-left:8px;font-size:17px}
.vge-row{border-bottom:1px solid #253241}
.vge-track{height:62px;background:repeating-linear-gradient(90deg,#151e29 0,#151e29 calc(16.666% - 1px),#303a46 16.666%)}
.vge-program{position:absolute;top:5px;bottom:5px;overflow:hidden;text-align:left;white-space:normal;background:#26313d;color:#c9d1dc;border:1px solid #333f4d;border-radius:5px;padding:5px 9px;font-size:15px}
.vge-program b,.vge-program span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.vge-program b{font-size:13px;color:#9ba9b8;margin-bottom:3px}
.vge-program.is-now{background:#e7edf5;color:#111923;border-color:#36eadc}
.vge-program.is-now b{color:#245d66}
.vge-program:focus{z-index:3;outline:3px solid #36eadc;background:#284e68;color:#fff}
.vge-error{padding:30px;color:#ff9caa;font-size:24px}

.vge-marker{position:absolute;z-index:1;top:0;bottom:0;width:2px;background:#ff5c9c;pointer-events:none}

/* Touch layouts: keep the guide inside the viewport and allow two-axis browsing. */
.vge-panel{min-height:0}
.vge-grid{min-height:0;min-width:0;overflow:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;touch-action:pan-x pan-y}
@media (max-width:900px){
  .vge-overlay{box-sizing:border-box;padding:10px}
  .vge-bar{min-height:42px;gap:8px;flex:0 0 auto}
  .vge-bar h1{font-size:20px}
  .vge-now{font-size:12px;min-width:0}
  .vge-close{min-width:76px;padding:8px 10px;font-size:14px}
  .vge-feature{flex:0 0 auto;min-height:0;padding:10px 12px;margin:6px 0 8px}
  .vge-feature small{font-size:10px;letter-spacing:1px}
  .vge-feature h2{font-size:17px;margin:4px 0}
  .vge-feature p{font-size:12px;line-height:1.35}
  .vge-grid{flex:1 1 0;width:100%;max-height:none}
  .vge-grid-head,.vge-row{min-width:960px;min-height:54px}
  .vge-channel-head,.vge-channel{position:sticky;left:0;z-index:3;width:180px;flex:0 0 180px;padding:6px 9px;background:#101b29}
  .vge-channel-head{z-index:4}
  .vge-channel img{width:38px;height:30px}
  .vge-name{font-size:13px}
  .vge-time-head,.vge-track{min-width:780px}
  .vge-time-head span{font-size:13px;padding-left:5px}
  .vge-track{height:54px}
  .vge-program{font-size:12px;padding:4px 6px}
  .vge-program b{font-size:10px}
}
@media (max-width:900px) and (orientation:landscape){
  .vge-overlay{box-sizing:border-box;padding:6px}
  .vge-bar{min-height:34px}
  .vge-bar h1{font-size:18px}
  .vge-close{min-height:32px;padding:5px 8px}
  .vge-feature{padding:6px 10px;margin:4px 0 6px}
  .vge-feature h2{font-size:15px}
  .vge-feature p{font-size:11px;max-height:30px;overflow:hidden}
}

/* Readable TV rows; focus updates full programme details. */
.vge-bar{flex-shrink:0;gap:16px}.vge-page{font-size:22px;min-height:54px;padding:10px 16px}.vge-feature{flex-shrink:0;max-height:220px;overflow:auto}.vge-feature p{line-height:1.4}.vge-grid-head,.vge-row{min-height:92px}.vge-track{height:92px}.vge-program{font-size:23px;padding:8px 12px;min-height:0}.vge-program b{font-size:18px}.vge-program span{white-space:normal;line-height:1.2;max-height:2.4em}.vge-channel-head,.vge-channel{width:330px;flex-basis:330px;background:#101b29;position:sticky;left:0;z-index:4}.vge-name{font-size:24px;white-space:normal}.vge-empty{display:block;padding:28px 18px;color:#899db0;font-size:22px}.vge-time-head span{font-size:23px}.vge-grid-head{z-index:5}.vge-program.is-now{background:#173d49;color:#efffff}.vge-program.is-now b{color:#59eadc}
@media(max-width:900px){
html.vge-open{width:100%;height:100%;overflow:hidden}.vge-overlay{padding:8px;background:#07111e}.vge-bar{flex-wrap:wrap;gap:6px;min-height:46px}.vge-bar h1{font-size:20px}.vge-now{font-size:12px;flex:1;min-width:70px}.vge-close,.vge-page{font-size:12px;min-height:34px;min-width:0;padding:6px 8px}.vge-feature{max-height:130px;margin:6px 0;padding:10px}.vge-feature h2{font-size:17px;line-height:1.2}.vge-feature p{font-size:12px;max-height:48px;overflow:auto}.vge-grid-head,.vge-row{min-width:1040px;min-height:72px}.vge-channel-head,.vge-channel{width:140px;flex:0 0 140px;padding:6px}.vge-name{font-size:13px;line-height:1.2}.vge-channel img{width:28px;height:28px;flex:none}.vge-time-head,.vge-track{min-width:900px}.vge-track{height:72px}.vge-program{font-size:14px;padding:5px}.vge-program b{font-size:11px}.vge-time-head span{font-size:13px}.vge-empty{font-size:13px;padding:22px 10px}
}

@media(max-width:900px){.vge-channel-head{font-size:14px}}

.vge-detail{position:absolute;left:0;top:0;right:0;bottom:0;background:rgba(2,8,17,.88);z-index:30;display:flex;align-items:center;justify-content:center;padding:30px}.vge-detail-sheet{width:100%;max-width:1050px;max-height:95%;overflow:auto;padding:38px;border-radius:24px;border:2px solid #3b7d8d;background:#102437;box-shadow:0 16px 70px #000}.vge-detail-sheet small{color:#59eadc}.vge-detail-sheet h2{font-size:36px;margin:20px 0}.vge-detail-sheet p{font-size:26px;line-height:1.45;margin-bottom:24px}.vge-detail-sheet button{margin:6px;background:#1a4256;border:2px solid #468496}.vge-detail-sheet button:focus{outline:4px solid #36eadc}
@media(max-width:900px){.vge-detail{padding:10px}.vge-detail-sheet{padding:18px;border-radius:16px}.vge-detail-sheet small{font-size:12px}.vge-detail-sheet h2{font-size:22px;margin:12px 0}.vge-detail-sheet p{font-size:15px}.vge-detail-sheet button{font-size:14px;min-height:40px;padding:8px 12px}}
