/* Tablet responsiveness for Sunday Sync pages. Desktop styles remain untouched. */

@media (min-width:1081px) and (max-width:1366px){
  :root{
    --sync-nav-width:76px;
    --sync-nav-link-width:58px;
    --sync-nav-link-height:72px;
    --sync-nav-logo-size:58px;
    --sync-shell-padding:8px;
    --sync-shell-gap:8px;
  }

  body.production-shell-page .app,
  body.production-shell-page .sync-app,
  body[data-viewer-mode="true"] .app{
    gap:8px;
    padding:8px;
  }

  body.production-shell-page .nav,
  body.production-shell-page .sync-nav,
  body[data-viewer-mode="true"] .nav{
    padding:7px 0 9px;
    border-radius:18px;
  }

  body.production-shell-page .topbar,
  body.production-shell-page .sync-topbar,
  body[data-viewer-mode="true"] .topbar{
    min-height:50px;
    padding:7px 10px;
    gap:8px;
  }

  body.production-shell-page .topbar-name,
  body.production-shell-page .sync-topbar-name,
  body[data-viewer-mode="true"] .topbar-name{font-size:16px}

  body.production-shell-page .topbar-meta,
  body.production-shell-page .sync-topbar-meta,
  body[data-viewer-mode="true"] .topbar-meta{font-size:11px}

  body.production-shell-page .live-spine,
  body.production-shell-page .sync-live-spine,
  body[data-viewer-mode="true"] .live-spine{
    min-width:0;
    gap:5px;
  }

  body.production-shell-page .live-spine-cell,
  body.production-shell-page .sync-live-spine-cell,
  body[data-viewer-mode="true"] .live-spine-cell{padding:4px 7px}

  body.production-shell-page .live-spine-value,
  body.production-shell-page .sync-live-spine-value,
  body[data-viewer-mode="true"] .live-spine-value{font-size:12px}

  body.production-shell-page .card-header,
  body.production-shell-page .sync-card-header,
  body[data-viewer-mode="true"] .card-header{padding:8px 11px 7px}

  body.production-shell-page .card-title,
  body.production-shell-page .sync-card-title,
  body[data-viewer-mode="true"] .card-title{font-size:12px}

  body.page-foh .app{
    grid-template-columns:var(--sync-nav-width) minmax(0,.92fr) minmax(0,1.08fr) minmax(0,.8fr);
    grid-template-rows:52px minmax(0,1fr);
  }
  body.page-foh .meter-wrap{min-height:118px;padding:9px 14px 10px}
  body.page-foh .meter-value{font-size:clamp(40px,4.8vw,52px)}
  body.page-foh .meter-stats{margin-top:5px}
  body.page-foh .smaart-rta-panel{margin:0 10px 9px;padding:7px 8px}
  body.page-foh .smaart-rta-canvas-wrap{height:86px}
  body.page-foh .person-row{grid-template-columns:40px minmax(0,1fr) auto;gap:10px;padding:12px}
  body.page-foh .person-avatar{width:40px;height:40px}
  body.page-foh .person-name{font-size:19px}
  body.page-foh .person-role{font-size:15px}
  body.page-foh .people-next-section{padding:12px;gap:6px}
  body.page-foh .people-next-title{font-size:14px}
  body.page-foh .foh-timer-stack{gap:7px}

  body.page-lighting .app{
    grid-template-columns:var(--sync-nav-width) minmax(0,1fr) minmax(0,1.35fr) minmax(0,.9fr);
    gap:10px;
    padding:10px;
  }

  body.page-pm .app{
    grid-template-columns:var(--sync-nav-width) repeat(3,minmax(0,1fr));
    grid-template-rows:52px minmax(0,1fr) 124px;
  }

  body.page-pm .timer-row,
  body.page-producer .timer-row{
    gap:8px;
  }

  body.page-pm .timer-card,
  body.page-producer .timer-card{padding:9px 12px 10px}

  body.page-pm .timer-num,
  body.page-producer .timer-num{font-size:clamp(24px,2.3vw,32px)}

  body.page-pm .control-bay{
    min-height:72px;
  }

  body.page-producer .app,
  body:not(.production-shell-page):not([data-viewer-mode="true"]) > .app.app-content{
    grid-template-columns:var(--sync-nav-width) repeat(3,minmax(0,1fr));
    grid-template-rows:54px minmax(0,1fr) 124px;
  }

  body.page-producer .topbar,
  body:not(.production-shell-page):not([data-viewer-mode="true"]) > .app.app-content > .topbar{
    grid-template-columns:minmax(170px,.85fr) minmax(0,1fr) auto;
  }

  body[data-viewer-mode="true"] .app{
    grid-template-columns:var(--sync-nav-width) minmax(0,1fr) minmax(0,1.05fr) minmax(0,.78fr);
    grid-template-rows:52px minmax(0,1fr) 124px;
  }

  body.page-home .home-hub-main{
    gap:10px;
    grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr);
    grid-template-rows:minmax(230px,1fr) minmax(210px,.8fr);
  }
  body.page-home .home-readiness-grid{
    grid-template-columns:minmax(0,1.2fr) repeat(3,minmax(0,1fr));
    gap:9px;
  }
  body.page-home .home-countdown{padding:14px}
  body.page-home .home-countdown-value{font-size:clamp(42px,4.8vw,56px)}
  body.page-home .home-ready-tile,
  body.page-home .home-launch-button{padding:11px}
  body.page-home .home-ready-value{font-size:clamp(17px,1.8vw,21px)}
}

@media (min-width:769px) and (max-width:1180px){
  :root{
    --sync-nav-width:68px;
    --sync-nav-link-width:52px;
    --sync-nav-link-height:66px;
    --sync-nav-logo-size:52px;
    --sync-shell-padding:7px;
    --sync-shell-gap:7px;
  }

  body.production-shell-page .app,
  body.production-shell-page .sync-app,
  body[data-viewer-mode="true"] .app{
    gap:7px;
    padding:7px;
  }

  body.production-shell-page .topbar,
  body.production-shell-page .sync-topbar,
  body[data-viewer-mode="true"] .topbar{
    min-height:46px;
    padding:6px 9px;
    gap:6px;
  }

  body.production-shell-page .topbar-meta,
  body[data-viewer-mode="true"] .topbar-meta{
    min-width:0;
  }

  body.production-shell-page .live-spine,
  body[data-viewer-mode="true"] .live-spine{
    min-width:0;
    grid-template-columns:minmax(82px,1fr) minmax(82px,1fr) minmax(72px,.75fr);
    gap:4px;
  }

  body.production-shell-page .live-spine-cell,
  body[data-viewer-mode="true"] .live-spine-cell{padding:4px 6px}

  body.production-shell-page .live-spine-label,
  body[data-viewer-mode="true"] .live-spine-label{font-size:8px}

  body.production-shell-page .live-spine-value,
  body[data-viewer-mode="true"] .live-spine-value{font-size:11px}

  body.page-foh .app{
    grid-template-columns:var(--sync-nav-width) minmax(0,.95fr) minmax(0,1.05fr) minmax(0,.78fr);
    grid-template-rows:46px minmax(0,1fr);
  }
  body.page-foh .left-col{gap:7px}
  body.page-foh .meter-wrap{min-height:104px;padding:7px 10px 8px}
  body.page-foh .meter-value{font-size:clamp(34px,4.4vw,44px)}
  body.page-foh .meter-copy{font-size:10px}
  body.page-foh .meter-stats{margin-top:4px}
  body.page-foh .meter-stat strong{font-size:18px}
  body.page-foh .smaart-rta-panel{margin:0 8px 7px;padding:6px 7px}
  body.page-foh .smaart-rta-canvas-wrap{height:72px}
  body.page-foh .smaart-rta-meta{gap:7px;font-size:8px}
  body.page-foh .foh-timer-stack{gap:6px}
  body.page-foh .foh-timer-stack .timer-card{padding:6px 8px 7px}
  body.page-foh .foh-timer-stack .timer-glyph,
  body.page-foh .foh-timer-stack .timer-sparkline{display:none}
  body.page-foh .foh-timer-stack .timer-num{font-size:clamp(18px,2.2vw,26px)}
  body.page-foh .person-row{grid-template-columns:34px minmax(0,1fr);gap:9px;padding:10px}
  body.page-foh .person-status{grid-column:2;justify-self:start}
  body.page-foh .person-avatar{width:34px;height:34px;font-size:12px}
  body.page-foh .person-name{font-size:17px}
  body.page-foh .person-role{font-size:13px}
  body.page-foh .people-next-section{padding:10px;gap:5px}
  body.page-foh .people-next-title{font-size:13px}
  body.page-foh .people-next-meta{font-size:11px;gap:5px 8px}

  body.page-lighting .app{
    grid-template-columns:var(--sync-nav-width) minmax(0,1fr) minmax(0,1.28fr) minmax(0,.9fr);
    grid-template-rows:46px minmax(0,1fr);
  }
  body.page-lighting{
    --page-gap:7px;
  }
  body.page-lighting .card-header{padding:6px 9px 5px}
  body.page-lighting .moment-card{padding:10px}
  body.page-lighting .moment-title{font-size:clamp(20px,2.6vw,24px)}
  body.page-lighting .moment-time{font-size:clamp(16px,2vw,18px)}
  body.page-lighting .checklist,
  body.page-lighting .meta-grid,
  body.page-lighting .pco-lighting-notes,
  body.page-lighting .mini-run{padding:8px}

  body.page-pm .app{
    grid-template-columns:var(--sync-nav-width) repeat(3,minmax(0,1fr));
    grid-template-rows:46px minmax(0,1fr) 126px;
  }
  body.page-pm .control-bay{min-height:76px}

  body.page-producer .app,
  body:not(.production-shell-page):not([data-viewer-mode="true"]) > .app.app-content{
    grid-template-columns:var(--sync-nav-width) repeat(3,minmax(0,1fr));
    grid-template-rows:46px minmax(0,1fr) 126px;
  }

  body.page-producer .right-col,
  body:not(.production-shell-page):not([data-viewer-mode="true"]) > .app.app-content > .right-col{
    grid-column:4;
    grid-row:2;
  }

  body.page-producer .timer-row,
  body:not(.production-shell-page):not([data-viewer-mode="true"]) > .app.app-content > .timer-row,
  body[data-viewer-mode="true"] .timer-row{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  body[data-viewer-mode="true"] .app{
    grid-template-columns:var(--sync-nav-width) minmax(0,1fr) minmax(0,1fr) minmax(0,.78fr);
    grid-template-rows:46px minmax(0,1fr) 126px;
  }

  body.page-home .home-hub-main{
    grid-column:2 / span 2;
    gap:7px;
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:auto auto auto;
    overflow:visible;
  }
  body.page-home .home-readiness-card{grid-column:auto}
  body.page-home .home-readiness-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:7px;
  }
  body.page-home .home-countdown{padding:12px}
  body.page-home .home-countdown-value{font-size:clamp(32px,4.8vw,46px)}
  body.page-home .home-countdown-sub,
  body.page-home .home-ready-note,
  body.page-home .home-launch-copy{font-size:11px}
  body.page-home .home-launch-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:7px;
  }
  body.page-home .home-launch-button{min-height:118px}
}

@media (max-width:900px) and (orientation:portrait){
  html,body{
    height:auto;
    overflow-y:auto;
    overflow-x:hidden;
  }

  body.production-shell-page .app,
  body.production-shell-page .sync-app,
  body[data-viewer-mode="true"] .app{
    height:auto;
    min-height:100svh;
    overflow:visible;
  }

  body.production-shell-page .nav,
  body.production-shell-page .sync-nav,
  body[data-viewer-mode="true"] .nav{
    grid-row:1 / -1;
  }

  body.production-shell-page .topbar,
  body.production-shell-page .sync-topbar,
  body[data-viewer-mode="true"] .topbar{
    height:auto;
    min-height:82px;
    align-content:center;
  }

  body.production-shell-page .btn.small,
  body[data-viewer-mode="true"] .btn.small,
  body.page-producer .btn.small{
    height:24px;
    min-height:24px;
  }

  body.production-shell-page .live-spine,
  body.production-shell-page .sync-live-spine,
  body[data-viewer-mode="true"] .live-spine{
    width:100%;
    min-width:0;
    grid-template-columns:1fr 1fr .8fr;
  }

  body.page-foh .app{
    grid-template-columns:var(--sync-nav-width) minmax(0,1fr) minmax(0,1fr);
    grid-template-rows:auto auto auto auto;
  }
  body.page-foh .topbar{grid-column:2 / span 2}
  body.page-foh .left-col{grid-column:2 / span 2;grid-row:2;overflow:visible}
  body.page-foh .mid-col{grid-column:2 / span 2;grid-row:3;min-height:520px}
  body.page-foh .right-col{grid-column:2 / span 2;grid-row:4;display:grid;grid-template-columns:1fr 1fr;gap:7px}
  body.page-foh .right-col > .card{min-height:240px}
  body.page-foh .spl-card{min-height:0}
  body.page-foh .meter-wrap{min-height:106px}
  body.page-foh .smaart-rta-canvas-wrap{height:82px}
  body.page-foh .foh-timer-stack{min-height:280px}

  body.page-lighting .app{
    grid-template-columns:var(--sync-nav-width) minmax(0,1fr);
    grid-template-rows:auto auto auto auto;
  }
  body.page-lighting .topbar,
  body.page-lighting .left-col,
  body.page-lighting .mid-col,
  body.page-lighting .right-col{grid-column:2;grid-row:auto}
  body.page-lighting .left-col,
  body.page-lighting .mid-col,
  body.page-lighting .right-col{min-height:320px}

  body.page-pm .app{
    grid-template-columns:var(--sync-nav-width) minmax(0,1fr);
    grid-template-rows:auto auto auto auto auto;
  }
  body.page-pm .topbar,
  body.page-pm .left-col,
  body.page-pm .mid-col,
  body.page-pm .right-col,
  body.page-pm .timer-row{grid-column:2;grid-row:auto}
  body.page-pm .left-col,
  body.page-pm .mid-col,
  body.page-pm .right-col{min-height:320px}
  body.page-pm .timer-row{min-height:260px;grid-template-columns:1fr}
  body.page-pm .control-bay{
    min-height:72px;
    flex:0 0 auto;
  }

  body.page-producer .app,
  body:not(.production-shell-page):not([data-viewer-mode="true"]) > .app.app-content{
    grid-template-columns:var(--sync-nav-width) minmax(0,1fr);
    grid-template-rows:auto auto auto auto auto;
  }
  body.page-producer .topbar,
  body.page-producer .left-col,
  body.page-producer .mid-col,
  body.page-producer .right-col,
  body.page-producer .timer-row,
  body:not(.production-shell-page):not([data-viewer-mode="true"]) > .app.app-content > .topbar,
  body:not(.production-shell-page):not([data-viewer-mode="true"]) > .app.app-content > .left-col,
  body:not(.production-shell-page):not([data-viewer-mode="true"]) > .app.app-content > .mid-col,
  body:not(.production-shell-page):not([data-viewer-mode="true"]) > .app.app-content > .right-col,
  body:not(.production-shell-page):not([data-viewer-mode="true"]) > .app.app-content > .timer-row{
    grid-column:2;
    grid-row:auto;
  }
  body.page-producer .left-col,
  body.page-producer .mid-col,
  body.page-producer .right-col,
  body:not(.production-shell-page):not([data-viewer-mode="true"]) > .app.app-content > .left-col,
  body:not(.production-shell-page):not([data-viewer-mode="true"]) > .app.app-content > .mid-col,
  body:not(.production-shell-page):not([data-viewer-mode="true"]) > .app.app-content > .right-col{
    min-height:320px;
  }
  body.page-producer .timer-row,
  body:not(.production-shell-page):not([data-viewer-mode="true"]) > .app.app-content > .timer-row{
    min-height:260px;
    grid-template-columns:1fr;
  }
  body.page-producer .slides-list,
  body:not(.production-shell-page):not([data-viewer-mode="true"]) > .app.app-content .slides-list{
    flex-direction:row;
    overflow-x:auto;
    overflow-y:hidden;
  }
  body.page-producer .slide-card,
  body:not(.production-shell-page):not([data-viewer-mode="true"]) > .app.app-content .slide-card{
    flex:0 0 min(220px,70vw);
  }

  body[data-viewer-mode="true"] .app{
    grid-template-columns:var(--sync-nav-width) minmax(0,1fr);
    grid-template-rows:auto auto auto auto auto;
  }
  body[data-viewer-mode="true"] .topbar,
  body[data-viewer-mode="true"] .left-col,
  body[data-viewer-mode="true"] .mid-col,
  body[data-viewer-mode="true"] .right-col,
  body[data-viewer-mode="true"] .timer-row{grid-column:2;grid-row:auto}
  body[data-viewer-mode="true"] .left-col,
  body[data-viewer-mode="true"] .mid-col,
  body[data-viewer-mode="true"] .right-col{min-height:320px}
  body[data-viewer-mode="true"] .timer-row{min-height:260px;grid-template-columns:1fr}

  body.sync-utility-page .sync-app{
    grid-template-columns:var(--sync-nav-width) minmax(0,1fr);
    grid-template-rows:auto auto auto auto;
  }
  body.sync-utility-page .sync-topbar,
  body.sync-utility-page .sync-col,
  body.sync-utility-page .sync-col-left,
  body.sync-utility-page .sync-col-mid,
  body.sync-utility-page .sync-col-right{
    grid-column:2;
    grid-row:auto;
  }

  body.page-home .home-hub-main{
    grid-column:2;
    grid-template-columns:1fr;
    grid-template-rows:none;
    overflow:visible;
    gap:8px;
  }
  body.page-home .home-readiness-card{grid-column:auto}
  body.page-home .home-readiness-grid,
  body.page-home .home-launch-grid{
    grid-template-columns:1fr;
    gap:8px;
  }
  body.page-home .home-countdown-value{font-size:clamp(34px,8vw,46px)}
  body.page-home .home-countdown,
  body.page-home .home-ready-tile,
  body.page-home .home-launch-button{
    min-height:0;
  }
}

@media (max-width:700px){
  :root{
    --sync-nav-width:62px;
    --sync-nav-link-width:48px;
    --sync-nav-link-height:60px;
    --sync-nav-logo-size:48px;
  }

  body.page-foh .right-col,
  body.page-foh .people-list{
    grid-template-columns:1fr;
  }

  body.page-foh .right-col{
    display:flex;
    flex-direction:column;
  }
}
