/* BANAT SINGLE-VIEW INSTRUMENT — FINAL/S 95
   One honest screen language in every orientation:
   SCENE / COUNT at left, RPM at centre, SOUND at right.
   BANAT is one continuous view, so reel arrows do not belong here. */

#p1 .portal-shell > .view-rail.has-banat-rev-counter{
  --banat-instrument-side:clamp(94px,15%,132px);
  grid-template-columns:
    var(--banat-instrument-side)
    minmax(0,1fr)
    var(--banat-instrument-side) !important;
}

#p1 .portal-shell > .view-rail.has-banat-rev-counter::before{
  content:none !important;
  display:none !important;
}

#p1 .portal-shell > .view-rail.has-banat-rev-counter > .view-rail-arrow{
  display:none !important;
}

#p1 .portal-shell > .view-rail.has-banat-rev-counter > .view-rail-readout{
  display:contents !important;
}

#p1 .portal-shell > .view-rail.has-banat-rev-counter .banat-view-meta{
  grid-column:1;
  grid-row:1;
  min-width:0;
  display:grid;
  grid-template-columns:1fr;
  grid-template-rows:auto auto;
  align-content:center;
  justify-items:center;
  align-self:stretch;
  justify-self:stretch !important;
  gap:10px;
  padding:0 8px;
  box-sizing:border-box;
  border-right:0;
  background:linear-gradient(90deg,
    rgba(82,160,4,.15) 0%,
    rgba(82,160,4,.075) 54%,
    rgba(82,160,4,.018) 100%);
  white-space:nowrap;
}

#p1 .portal-shell > .view-rail.has-banat-rev-counter .banat-view-meta > span:first-child{
  color:rgba(255,255,255,.62);
  font-size:13px;
  line-height:1;
  letter-spacing:.20em;
}

#p1 .portal-shell > .view-rail.has-banat-rev-counter .banat-view-meta > .view-rail-count{
  display:grid;
  grid-template-columns:auto auto auto;
  align-items:center;
  column-gap:7px;
  justify-self:center;
  color:rgba(255,255,255,.88);
  font-size:24px;
  line-height:1;
  letter-spacing:.06em;
}

#p1 .portal-shell > .view-rail.has-banat-rev-counter .banat-view-meta .view-rail-divider{
  color:rgba(255,255,255,.58);
  font-size:21px;
  line-height:1;
  letter-spacing:1.6px;
}

#p1 .portal-shell > .view-rail.has-banat-rev-counter .banat-view-meta :is([data-view-current],[data-view-total]){
  transform:translateY(2px);
}

#p1 .portal-shell > .view-rail.has-banat-rev-counter .banat-rev-strip{
  grid-column:2 !important;
  grid-row:1 !important;
  align-self:center;
  justify-self:center;
  width:min(84%,286px);
  min-width:0;
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:auto 20px;
  align-content:center;
  justify-items:center;
  gap:4px;
  transform:scale(1.3);
  transform-origin:center;
}

#p1 .portal-shell > .view-rail.has-banat-rev-counter .banat-rev-caption{
  grid-column:1;
  grid-row:1;
  justify-self:center;
  color:rgba(255,255,255,.62);
  font-size:10px;
  line-height:1;
  letter-spacing:2px;
}

#p1 .portal-shell > .view-rail.has-banat-rev-counter .banat-rev-track{
  grid-column:1;
  grid-row:2;
  justify-self:center;
  width:90.7%;
}

#p1 .portal-shell > .view-rail.has-banat-rev-counter > .screen-sound-toggle{
  grid-column:3 !important;
  grid-row:1;
  border-left:0;
  border-right:0;
  background:linear-gradient(270deg,
    rgba(82,160,4,.15) 0%,
    rgba(82,160,4,.075) 54%,
    rgba(82,160,4,.018) 100%);
}

/* The smaller phone glass keeps the same equal-ended architecture. */
body.banat-reel-embed #p1 .portal-shell > .view-rail.has-banat-rev-counter{
  --banat-instrument-side:74px;
  grid-template-columns:74px minmax(0,1fr) 74px !important;
}

body.banat-reel-embed #p1 .portal-shell > .view-rail.has-banat-rev-counter .banat-view-meta{
  gap:4px;
  padding:0 4px;
}

body.banat-reel-embed #p1 .portal-shell > .view-rail.has-banat-rev-counter .banat-view-meta > span:first-child{
  font-size:7px;
  letter-spacing:.13em;
}

body.banat-reel-embed #p1 .portal-shell > .view-rail.has-banat-rev-counter .banat-view-meta > .view-rail-count{
  font-size:11px;
  letter-spacing:.08em;
}

body.banat-reel-embed #p1 .portal-shell > .view-rail.has-banat-rev-counter .banat-rev-strip{
  width:min(88%,286px);
}

/* ALL-SECTOR VIEW INSTRUMENT — FINAL/S 95
   The BANAT screen base is now the common chassis. Multi-scene sectors keep
   their navigation, seated quietly inside the two outer information cells. */
:is(#p2,#p3,#p5,#p6,#p7) .view-rail.has-latest-section-instrument{
  --section-instrument-side:clamp(156px,19%,196px);
  grid-template-columns:
    var(--section-instrument-side)
    minmax(0,1fr)
    var(--section-instrument-side) !important;
  min-height:clamp(72px,7vw,86px);
}

:is(#p2,#p3,#p5,#p6,#p7) .view-rail.has-latest-section-instrument > .view-rail-readout{
  display:contents !important;
}

:is(#p2,#p3,#p5,#p6,#p7) .view-rail.has-latest-section-instrument .section-view-meta{
  grid-column:1;
  grid-row:1;
  align-self:stretch;
  justify-self:stretch;
  min-width:0;
  box-sizing:border-box;
  display:grid;
  grid-template-columns:1fr;
  grid-template-rows:auto auto;
  align-content:center;
  justify-items:center;
  gap:10px;
  padding:0 10px 0 48px;
  background:linear-gradient(90deg,
    rgba(82,160,4,.15) 0%,
    rgba(82,160,4,.075) 54%,
    rgba(82,160,4,.018) 100%);
  white-space:nowrap;
}

:is(#p2,#p3,#p5,#p6,#p7) .view-rail.has-latest-section-instrument .section-view-meta > span:first-child{
  color:rgba(255,255,255,.62);
  font-size:13px;
  line-height:1;
  letter-spacing:.20em;
}

:is(#p2,#p3,#p5,#p6,#p7) .view-rail.has-latest-section-instrument .section-view-meta > .view-rail-count{
  display:grid;
  grid-template-columns:auto auto auto;
  align-items:center;
  column-gap:7px;
  justify-self:center;
  color:rgba(255,255,255,.88);
  font-size:24px;
  line-height:1;
  letter-spacing:.06em;
}

:is(#p2,#p3,#p5,#p6,#p7) .view-rail.has-latest-section-instrument .section-view-meta .view-rail-divider{
  color:rgba(255,255,255,.58);
  font-size:21px;
  line-height:1;
  letter-spacing:1.6px;
}

:is(#p2,#p3,#p5,#p6,#p7) .view-rail.has-latest-section-instrument .section-view-meta :is([data-view-current],[data-view-total]){
  transform:translateY(2px);
}

:is(#p2,#p3,#p5,#p6,#p7) .view-rail.has-latest-section-instrument .section-rev-strip{
  grid-column:2 !important;
  grid-row:1 !important;
  align-self:center;
  justify-self:center;
  width:min(84%,286px);
  min-width:0;
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:auto 20px;
  align-content:center;
  justify-items:center;
  gap:4px;
  transform:scale(1.3);
  transform-origin:center;
}

:is(#p2,#p3,#p5,#p6,#p7) .view-rail.has-latest-section-instrument .section-rev-caption{
  grid-column:1;
  grid-row:1;
  justify-self:center;
  color:rgba(255,255,255,.62);
  font-size:10px;
  line-height:1;
  letter-spacing:2px;
}

:is(#p2,#p3,#p5,#p6,#p7) .view-rail.has-latest-section-instrument .section-rev-track{
  grid-column:1;
  grid-row:2;
  justify-self:center;
  width:90.7%;
}

:is(#p2,#p3,#p5,#p6,#p7) .view-rail.has-latest-section-instrument > .screen-sound-toggle{
  grid-column:3 !important;
  grid-row:1;
  align-self:stretch;
  justify-self:stretch;
  box-sizing:border-box;
  padding:0 48px 0 0;
  border-left:0;
  border-right:0;
  background:linear-gradient(270deg,
    rgba(82,160,4,.15) 0%,
    rgba(82,160,4,.075) 54%,
    rgba(82,160,4,.018) 100%);
}

:is(#p2,#p3,#p5,#p6,#p7) .view-rail.has-latest-section-instrument > .view-rail-arrow{
  grid-row:1;
  align-self:stretch;
  z-index:4;
  width:48px;
  padding:0;
  border:0 !important;
  background:transparent;
  font-size:clamp(17px,1.25vw,21px);
}

:is(#p2,#p3,#p5,#p6,#p7) .view-rail.has-latest-section-instrument > .view-rail-arrow:first-child{
  grid-column:1;
  justify-self:start;
}

:is(#p2,#p3,#p5,#p6,#p7) .view-rail.has-latest-section-instrument > .view-rail-arrow:last-child{
  grid-column:3;
  justify-self:end;
}

:is(#p2,#p3,#p5,#p6,#p7) .view-rail.has-latest-section-instrument > .view-rail-arrow > span{
  transform:none;
}

/* SCENE COUNTER — one clean, unbezeled instrument across all six PORTS. */
:is(.banat-rev-track,.section-rev-track)::before{
  border:0 !important;
  box-shadow:0 4px 8px rgba(0,0,0,.82) !important;
}

/* SCENE COUNTER NEEDLE — fluorescent Banatti orange gives the instrument one
   living pulse. The white-hot crown stays legible over every colour zone while
   a crisp black contact edge remains visible beneath and to the right of the
   orange face, including over the dial's red end. */
#p1 .banat-rev-sweep::after,
:is(#p2,#p3,#p5,#p6,#p7) .section-rev-sweep::after{
  right:-5px;
  width:12px;
  background:linear-gradient(180deg,#fff1a8 0%,#ffb000 25%,#ff6500 68%,#e63d00 100%);
  border:1px solid rgba(255,196,54,.96);
  border-right:2px solid #000;
  border-bottom:2px solid #000;
  box-shadow:
    2.5px 1px 0 .75px #000,
    0 0 4px rgba(255,119,0,.82),
    0 0 9px rgba(255,70,0,.34);
  filter:
    drop-shadow(1.8px 2.2px 1.1px rgba(0,0,0,.9))
    drop-shadow(0 0 2px rgba(255,128,0,.64));
}

/* APPROVED VIEW-RAIL VOCABULARY LOCK.
   Both SCENE labels read at the same optical size as PORT. The counter caption
   compensates for its inherited 1.3 scale so the finished letters are 19 px. */
@media (min-width:861px){
  #p1 .portal-shell > .view-rail.has-banat-rev-counter .banat-view-meta > span:first-child,
  :is(#p2,#p3,#p5,#p6,#p7) .view-rail.has-latest-section-instrument .section-view-meta > span:first-child{
    font-size:19px;
    letter-spacing:.20em;
  }

  #p1 .portal-shell > .view-rail.has-banat-rev-counter .banat-view-meta,
  :is(#p2,#p3,#p5,#p6,#p7) .view-rail.has-latest-section-instrument .section-view-meta{
    /* APPROVED: complete SCENE + count group, four visible pixels upward. */
    transform:translateY(-6px);
  }

  #p1 .portal-shell > .view-rail.has-banat-rev-counter .banat-rev-caption,
  :is(#p2,#p3,#p5,#p6,#p7) .view-rail.has-latest-section-instrument .section-rev-caption{
    font-size:calc(19px / 1.3);
    letter-spacing:.20em;
  }

  #p1 .portal-shell > .view-rail.has-banat-rev-counter .banat-rev-strip,
  :is(#p2,#p3,#p5,#p6,#p7) .view-rail.has-latest-section-instrument .section-rev-strip{
    /* APPROVED: complete SCENE COUNTER instrument, two visible pixels upward. */
    transform:translateY(-3px) scale(1.3);
  }
}

/* LOWER VIEWER RAIL — WORKBENCH OPTICAL LOCK 2026-08-30
   A wider, finer speaker with a restrained instrument pulse. */
.view-rail > .screen-sound-toggle .screen-sound-icon{
  transform:scaleX(1.3);
  transform-origin:center;
}

.view-rail > .screen-sound-toggle .screen-sound-icon path{
  stroke-width:1.2;
}

.view-rail > .screen-sound-toggle[aria-pressed="true"] .screen-sound-icon{
  transform:scaleX(1.3);
}

@keyframes speakerSignal{
  0%,100%{
    opacity:.82;
    transform:scaleX(1.3) scale(.985);
    filter:drop-shadow(0 0 2px rgba(82,160,4,.24));
  }
  50%{
    opacity:.96;
    transform:scaleX(1.3) scale(1.015);
    filter:drop-shadow(0 0 4px rgba(82,160,4,.42));
  }
}

@keyframes banatGateSpeakerBeacon{
  0%,4%,24%,31%,46%,53%,76%,100%{
    opacity:.82;
    transform:scaleX(1.3) scale(.985);
    color:var(--green);
    filter:drop-shadow(0 0 2px rgba(82,160,4,.24));
  }
  10%,23%{
    opacity:.88;
    transform:scaleX(1.3) scale(.995);
    color:#82ce3f;
    filter:drop-shadow(0 0 3px rgba(114,200,50,.34));
  }
  32%,45%{
    opacity:.92;
    transform:scaleX(1.3) scale(1.008);
    color:#9bdd59;
    filter:drop-shadow(0 0 4px rgba(143,235,73,.4));
  }
  54%,67%{
    opacity:.96;
    transform:scaleX(1.3) scale(1.018);
    color:#b8e987;
    filter:drop-shadow(0 0 5px rgba(168,235,103,.48));
  }
}

/* Three sound arcs answer the three BANAT gate rings in reverse spatial order:
   the BANAT rings travel inward while the speaker signal travels outward. */
#p1.is-banat-gated .view-rail > .screen-sound-toggle[aria-pressed="false"] .screen-sound-icon{
  animation:none;
  opacity:1;
  transform:scaleX(1.3);
  color:var(--green);
  filter:drop-shadow(0 0 1px rgba(82,160,4,.14));
}

#p1.is-banat-gated .view-rail > .screen-sound-toggle[aria-pressed="false"] .screen-sound-wave{
  opacity:.28;
  stroke-width:1;
  transform-box:fill-box;
  transform-origin:center;
}

#p1.is-banat-gated.is-banat-signal-clock .view-rail > .screen-sound-toggle[aria-pressed="false"] .screen-sound-wave-1{
  animation:banatSpeakerWaveOne 4.8s steps(1,end) infinite both;
}

#p1.is-banat-gated.is-banat-signal-clock .view-rail > .screen-sound-toggle[aria-pressed="false"] .screen-sound-wave-2{
  animation:banatSpeakerWaveTwo 4.8s steps(1,end) infinite both;
}

#p1.is-banat-gated.is-banat-signal-clock .view-rail > .screen-sound-toggle[aria-pressed="false"] .screen-sound-wave-3{
  animation:banatSpeakerWaveThree 4.8s steps(1,end) infinite both;
}

@keyframes banatSpeakerWaveOne{
  0%,24.99%{opacity:0;filter:none;}
  25%,100%{opacity:.72;color:#62bd08;filter:drop-shadow(0 0 1px rgba(95,178,35,.32));}
}

@keyframes banatSpeakerWaveTwo{
  0%,49.99%{opacity:0;filter:none;}
  50%,100%{opacity:.86;color:#75e60d;filter:drop-shadow(0 0 2px rgba(117,230,13,.52)) drop-shadow(0 0 4px rgba(82,160,4,.18));}
}

@keyframes banatSpeakerWaveThree{
  0%,74.99%{opacity:0;filter:none;}
  75%,100%{opacity:.96;color:#9cff54;filter:drop-shadow(0 0 2px rgba(156,255,84,.68)) drop-shadow(0 0 5px rgba(117,230,13,.34));}
}

/* ALL-PORT REEL EYE — the same purposeful start gesture lives in every
   cockpit. The equal empty seat on the left preserves the true centerline. */
:is(#p2,#p3,#p5,#p6,#p7) .view-rail.has-latest-section-instrument.has-reel-instrument{
  --architecture-unspool-seat:clamp(66px,7.25%,82px);
  grid-template-columns:
    var(--section-instrument-side)
    var(--architecture-unspool-seat)
    minmax(0,1fr)
    var(--architecture-unspool-seat)
    var(--section-instrument-side) !important;
}

#p1 .portal-shell > .view-rail.has-banat-rev-counter.has-reel-instrument{
  --architecture-unspool-seat:clamp(66px,7.25%,82px);
  grid-template-columns:
    var(--banat-instrument-side)
    var(--architecture-unspool-seat)
    minmax(0,1fr)
    var(--architecture-unspool-seat)
    var(--banat-instrument-side) !important;
}

:is(#p2,#p3,#p5,#p6,#p7) .view-rail.has-latest-section-instrument .section-view-meta{
  grid-column:1;
}

:is(#p1,#p2,#p3,#p5,#p6,#p7) .view-rail.has-reel-instrument .scene-unspool-control{
  grid-column:4;
  grid-row:1;
  z-index:5;
  align-self:stretch;
  justify-self:stretch;
  min-width:0;
  display:grid;
  grid-template-rows:42px auto;
  align-content:center;
  justify-items:center;
  gap:1px;
  padding:3px 6px 1px;
  appearance:none;
  border:0;
  border-left:1px solid rgba(82,160,4,.14);
  border-right:1px solid rgba(82,160,4,.14);
  background:radial-gradient(ellipse at center,rgba(82,160,4,.10),rgba(82,160,4,.018) 68%,transparent 72%);
  color:rgba(119,218,34,.86);
  cursor:pointer;
  transition:color .28s ease,background .28s ease,box-shadow .28s ease;
  -webkit-tap-highlight-color:transparent;
}

:is(#p1,#p2,#p3,#p5,#p6,#p7) .view-rail.has-reel-instrument .scene-unspool-control:hover,
:is(#p1,#p2,#p3,#p5,#p6,#p7) .view-rail.has-reel-instrument .scene-unspool-control:focus-visible{
  outline:none;
  color:#fff;
  background:radial-gradient(ellipse at center,rgba(82,160,4,.23),rgba(82,160,4,.055) 64%,transparent 72%);
  box-shadow:inset 0 0 18px rgba(82,160,4,.10);
}

:is(#p1,#p2,#p3,#p5,#p6,#p7) .scene-unspool-icon{
  display:block;
  width:52px;
  height:38px;
}

:is(#p1,#p2,#p3,#p5,#p6,#p7) .scene-unspool-icon svg{
  display:block;
  width:100%;
  height:100%;
  overflow:visible;
}

:is(#p1,#p2,#p3,#p5,#p6,#p7) .scene-unspool-eye,
:is(#p1,#p2,#p3,#p5,#p6,#p7) .scene-unspool-reel,
:is(#p1,#p2,#p3,#p5,#p6,#p7) .scene-unspool-arc{
  fill:none;
  stroke:currentColor;
  stroke-linecap:round;
  stroke-linejoin:round;
}

:is(#p1,#p2,#p3,#p5,#p6,#p7) .scene-unspool-eye{
  stroke-width:1.15;
  opacity:.64;
}

:is(#p1,#p2,#p3,#p5,#p6,#p7) .scene-unspool-reel{
  stroke-width:1.4;
  opacity:.92;
  transform-origin:26px 19px;
}

:is(#p1,#p2,#p3,#p5,#p6,#p7) .scene-unspool-arc{
  stroke-width:1.25;
  opacity:.72;
  transform-origin:26px 19px;
}

:is(#p1,#p2,#p3,#p5,#p6,#p7) .scene-unspool-play{
  fill:currentColor;
  opacity:.9;
}

:is(#p1,#p2,#p3,#p5,#p6,#p7) .scene-unspool-caption{
  color:rgba(255,255,255,.58);
  font-family:'DM Mono',monospace;
  font-size:8px;
  font-weight:700;
  line-height:1;
  letter-spacing:.20em;
  text-indent:.20em;
}

:is(#p1,#p2,#p3,#p5,#p6,#p7) .scene-unspool-control.is-unspooling{
  color:#fff;
  animation:architectureUnspoolSeat .98s cubic-bezier(.2,.72,.2,1) both;
}

:is(#p1,#p2,#p3,#p5,#p6,#p7) .scene-unspool-control.is-unspooling .scene-unspool-reel{
  animation:architectureUnspoolReel .98s cubic-bezier(.16,.82,.22,1) both;
}

:is(#p1,#p2,#p3,#p5,#p6,#p7) .scene-unspool-control.is-unspooling .scene-unspool-arc{
  animation:architectureUnspoolArc .98s cubic-bezier(.16,.82,.22,1) both;
}

:is(#p2,#p3,#p5,#p6,#p7) .view-rail.has-latest-section-instrument .section-rev-strip{
  grid-column:3 !important;
}

#p1 .portal-shell > .view-rail.has-banat-rev-counter.has-reel-instrument .banat-rev-strip{
  grid-column:3 !important;
}

:is(#p1,#p2,#p3,#p5,#p6,#p7) .view-rail.has-reel-instrument > .screen-sound-toggle{
  grid-column:5 !important;
}

#p1 .portal-shell > .view-rail.has-banat-rev-counter.has-reel-instrument > .screen-sound-toggle{
  grid-column:5 !important;
}

@keyframes architectureUnspoolSeat{
  0%,100%{box-shadow:inset 0 0 0 rgba(82,160,4,0);}
  34%{box-shadow:inset 0 0 24px rgba(116,224,29,.22),0 0 12px rgba(82,160,4,.12);}
}

@keyframes architectureUnspoolReel{
  0%{transform:rotate(0deg) scale(.92);}
  44%{transform:rotate(220deg) scale(1.08);}
  100%{transform:rotate(360deg) scale(1);}
}

@keyframes architectureUnspoolArc{
  0%{transform:rotate(0deg);opacity:.32;}
  44%{opacity:1;}
  100%{transform:rotate(-360deg);opacity:.72;}
}

@media (prefers-reduced-motion:reduce){
  :is(#p1,#p2,#p3,#p5,#p6,#p7) .scene-unspool-control.is-unspooling,
  :is(#p1,#p2,#p3,#p5,#p6,#p7) .scene-unspool-control.is-unspooling .scene-unspool-reel,
  :is(#p1,#p2,#p3,#p5,#p6,#p7) .scene-unspool-control.is-unspooling .scene-unspool-arc{
    animation:none;
  }
}

/* MASTER SCENE RAIL — Reel and position share the left bay, with the
   counter, slide grid, and sound controls following in one quiet sequence. */
body:not(.portrait-bypass) #p1 .portal-shell > .view-rail.has-banat-rev-counter.has-reel-instrument.has-mstr-scene-grid{
  grid-template-columns:minmax(220px,27%) minmax(0,1fr) clamp(56px,6%,84px) clamp(150px,18%,220px) !important;
}

body:not(.portrait-bypass) #p1 .portal-shell > .view-rail.has-mstr-scene-grid > .view-rail-arrow{
  display:none !important;
}

body:not(.portrait-bypass) #p1 .portal-shell > .view-rail.has-mstr-scene-grid > .mstr-scene-left-zone{
  grid-column:1;
  grid-row:1;
  border-right:1px solid rgba(82,160,4,.20);
  background:linear-gradient(90deg,rgba(82,160,4,.14),rgba(82,160,4,.045));
}

body:not(.portrait-bypass) :is(#p2,#p3,#p6,#p7) .portal-shell > .view-rail.has-mstr-scene-grid,
body:not(.portrait-bypass) #p5 .bay-media-shell > .view-rail.has-mstr-scene-grid{
  grid-template-columns:48px minmax(210px,24%) minmax(0,1fr) clamp(56px,6%,84px) clamp(140px,18%,210px) 48px !important;
}

body:not(.portrait-bypass) :is(#p2,#p3,#p6,#p7) .portal-shell > .view-rail.has-mstr-scene-grid > .mstr-scene-left-zone,
body:not(.portrait-bypass) #p5 .bay-media-shell > .view-rail.has-mstr-scene-grid > .mstr-scene-left-zone{
  grid-column:2;
  grid-row:1;
  border-right:1px solid rgba(82,160,4,.20);
  background:linear-gradient(90deg,rgba(82,160,4,.14),rgba(82,160,4,.045));
}

body:not(.portrait-bypass) :is(#p2,#p3,#p6,#p7) .portal-shell > .view-rail.has-mstr-scene-grid > .view-rail-arrow:first-child,
body:not(.portrait-bypass) #p5 .bay-media-shell > .view-rail.has-mstr-scene-grid > .view-rail-arrow:first-child{
  grid-column:1;
}

body:not(.portrait-bypass) :is(#p2,#p3,#p6,#p7) .portal-shell > .view-rail.has-mstr-scene-grid > .view-rail-arrow:last-child,
body:not(.portrait-bypass) #p5 .bay-media-shell > .view-rail.has-mstr-scene-grid > .view-rail-arrow:last-child{
  grid-column:6;
}

body:not(.portrait-bypass) :is(#p1,#p2,#p3,#p5,#p6,#p7) .view-rail.has-mstr-scene-grid > .mstr-scene-left-zone{
  min-width:0;
  display:grid;
  grid-template-columns:minmax(72px,35%) minmax(0,1fr);
  align-items:stretch;
  overflow:hidden;
}

body:not(.portrait-bypass) :is(#p1,#p2,#p3,#p5,#p6,#p7) .view-rail.has-mstr-scene-grid .mstr-scene-left-zone > .scene-unspool-control{
  grid-column:1 !important;
  grid-row:1 !important;
  min-width:0;
  display:grid;
  grid-template-rows:16px 1fr;
  align-content:center;
  justify-items:center;
  gap:0;
  padding:9px 2px 3px;
  border:0;
  background:transparent;
}

body:not(.portrait-bypass) :is(#p1,#p2,#p3,#p5,#p6,#p7) .view-rail.has-mstr-scene-grid .mstr-scene-left-zone .scene-unspool-caption{
  grid-row:1;
  align-self:center;
  color:rgba(255,255,255,.62);
  font-size:13px;
  letter-spacing:.20em;
  text-indent:.20em;
}

body:not(.portrait-bypass) :is(#p1,#p2,#p3,#p5,#p6,#p7) .view-rail.has-mstr-scene-grid .mstr-scene-left-zone .scene-unspool-icon{
  grid-row:2;
  align-self:center;
  width:52px;
  height:38px;
}

body:not(.portrait-bypass) :is(#p1,#p2,#p3,#p5,#p6,#p7) .view-rail.has-mstr-scene-grid .mstr-scene-left-zone > :is(.banat-view-meta,.section-view-meta){
  grid-column:2 !important;
  grid-row:1 !important;
  align-content:start;
  justify-items:center;
  gap:10px;
  padding:12px 8px 0;
  border:0;
  background:transparent !important;
}

body:not(.portrait-bypass) :is(#p1,#p2,#p3,#p5,#p6,#p7) .view-rail.has-mstr-scene-grid > :is(.banat-rev-strip,.section-rev-strip){
  grid-column:2 !important;
  grid-row:1 !important;
  justify-self:center;
  width:min(84%,420px);
}

body:not(.portrait-bypass) #p1 .portal-shell > .view-rail.has-mstr-scene-grid > .banat-rev-strip{
  grid-column:2 !important;
}

body:not(.portrait-bypass) :is(#p2,#p3,#p6,#p7) .portal-shell > .view-rail.has-mstr-scene-grid > .section-rev-strip,
body:not(.portrait-bypass) #p5 .bay-media-shell > .view-rail.has-mstr-scene-grid > .section-rev-strip{
  grid-column:3 !important;
}

body:not(.portrait-bypass) #p1 .portal-shell > .view-rail.has-mstr-scene-grid > .mstr-scene-grid-toggle{
  grid-column:3;
}

body:not(.portrait-bypass) :is(#p2,#p3,#p6,#p7) .portal-shell > .view-rail.has-mstr-scene-grid > .mstr-scene-grid-toggle,
body:not(.portrait-bypass) #p5 .bay-media-shell > .view-rail.has-mstr-scene-grid > .mstr-scene-grid-toggle{
  grid-column:4;
}

body:not(.portrait-bypass) #p1 .portal-shell > .view-rail.has-mstr-scene-grid > .screen-sound-toggle{
  grid-column:4 !important;
}

body:not(.portrait-bypass) :is(#p2,#p3,#p6,#p7) .portal-shell > .view-rail.has-mstr-scene-grid > .screen-sound-toggle,
body:not(.portrait-bypass) #p5 .bay-media-shell > .view-rail.has-mstr-scene-grid > .screen-sound-toggle{
  grid-column:5 !important;
}

/* MASTER SCENE RAIL — a finer balance for the REEL and scene readout. */
body:not(.portrait-bypass) :is(#p1,#p2,#p3,#p5,#p6,#p7) .view-rail.has-mstr-scene-grid .mstr-scene-left-zone > .scene-unspool-control{
  transform:translate(50px,4px);
}

body:not(.portrait-bypass) :is(#p1,#p2,#p3,#p5,#p6,#p7) .view-rail.has-mstr-scene-grid .mstr-scene-left-zone > :is(.banat-view-meta,.section-view-meta){
  position:relative;
  top:4px;
}

body:not(.portrait-bypass) :is(#p1,#p2,#p3,#p5,#p6,#p7) .view-rail.has-mstr-scene-grid .mstr-scene-left-zone .scene-unspool-caption,
body:not(.portrait-bypass) :is(#p1,#p2,#p3,#p5,#p6,#p7) .view-rail.has-mstr-scene-grid .mstr-scene-left-zone > :is(.banat-view-meta,.section-view-meta) > span:first-child{
  font-family:'DM Mono',monospace;
  font-size:16px;
  font-weight:400;
  line-height:1;
  letter-spacing:.18em;
}

body:not(.portrait-bypass) :is(#p1,#p2,#p3,#p5,#p6,#p7) .view-rail.has-mstr-scene-grid .mstr-scene-left-zone .scene-unspool-caption{
  position:relative;
  left:-18px;
  text-indent:0;
  transform:translateY(-3px);
}

body:not(.portrait-bypass) :is(#p1,#p2,#p3,#p5,#p6,#p7) .view-rail.has-mstr-scene-grid .mstr-scene-left-zone .scene-unspool-icon{
  width:60px;
  height:44px;
  transform:translate(-20px,-4px);
}

body:not(.portrait-bypass) :is(#p1,#p2,#p3,#p5,#p6,#p7) .view-rail.has-mstr-scene-grid .mstr-scene-left-zone > :is(.banat-view-meta,.section-view-meta) > .view-rail-count{
  font-size:21px;
  letter-spacing:.05em;
  transform:translateY(5px);
}

body:not(.portrait-bypass) :is(#p1,#p2,#p3,#p5,#p6,#p7) .view-rail.has-mstr-scene-grid .mstr-scene-left-zone .view-rail-divider{
  font-size:18px;
}

body:not(.portrait-bypass) :is(#p1,#p2,#p3,#p5,#p6,#p7) .view-rail.has-mstr-scene-grid > :is(.banat-rev-strip,.section-rev-strip){
  width:min(76%,420px);
}

@media (min-width:861px){
  body:not(.portrait-bypass) :is(#p1,#p2,#p3,#p5,#p6,#p7) .view-rail.has-mstr-scene-grid > .banat-rev-strip .banat-rev-caption,
  body:not(.portrait-bypass) :is(#p1,#p2,#p3,#p5,#p6,#p7) .view-rail.has-mstr-scene-grid > .section-rev-strip .section-rev-caption{
    font-size:calc(16px / 1.3);
    letter-spacing:.18em;
  }
}

body:not(.portrait-bypass) :is(#p1,#p2,#p3,#p5,#p6,#p7) .view-rail.has-mstr-scene-grid > .mstr-scene-grid-toggle{
  z-index:5;
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
  appearance:none;
  border:0;
  border-left:1px solid rgba(82,160,4,.18);
  border-right:1px solid rgba(82,160,4,.18);
  background:rgba(82,160,4,.025);
  color:#3d8104;
  cursor:pointer;
  transition:color .22s ease,background .22s ease,box-shadow .22s ease;
  -webkit-tap-highlight-color:transparent;
}

body:not(.portrait-bypass) :is(#p1,#p2,#p3,#p5,#p6,#p7) .view-rail.has-mstr-scene-grid > .mstr-scene-grid-toggle:hover,
body:not(.portrait-bypass) :is(#p1,#p2,#p3,#p5,#p6,#p7) .view-rail.has-mstr-scene-grid > .mstr-scene-grid-toggle:focus-visible,
body:not(.portrait-bypass) :is(#p1,#p2,#p3,#p5,#p6,#p7) .view-rail.has-mstr-scene-grid > .mstr-scene-grid-toggle[aria-pressed="true"]{
  outline:none;
  color:#75e60d;
  background:rgba(82,160,4,.11);
  box-shadow:inset 0 0 16px rgba(82,160,4,.10);
}

body:not(.portrait-bypass) :is(#p1,#p2,#p3,#p5,#p6,#p7) .view-rail.has-mstr-scene-grid > .mstr-scene-grid-toggle:is(:hover,:focus-visible,[aria-pressed="true"]) .mstr-scene-grid-icon rect{
  fill:var(--mstr-grid-hover-fill,currentColor);
}

body:not(.portrait-bypass) .mstr-scene-grid-icon{
  display:block;
  width:42px;
  height:42px;
  overflow:visible;
}

body:not(.portrait-bypass) .mstr-scene-grid-gallery{
  position:absolute;
  z-index:100;
  inset:5.5%;
  display:none;
  flex-direction:column;
  min-width:0;
  min-height:0;
  overflow:hidden;
  box-sizing:border-box;
  border:1px solid rgba(82,160,4,.78);
  border-radius:clamp(22px,4.5%,58px);
  background:rgba(0,0,0,.96);
  color:#fff;
  box-shadow:0 0 0 5px rgba(0,0,0,.76),inset 0 0 24px rgba(82,160,4,.075),0 0 25px rgba(82,160,4,.12);
}

body:not(.portrait-bypass) .mstr-scene-grid-gallery.is-open{display:flex;}

body:not(.portrait-bypass) .mstr-scene-grid-gallery-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:clamp(12px,2vw,25px) clamp(16px,2.5vw,32px);
  border-bottom:1px solid rgba(82,160,4,.34);
  background:linear-gradient(90deg,rgba(82,160,4,.15),transparent 62%);
}

body:not(.portrait-bypass) .mstr-scene-grid-gallery-title{
  min-width:0;
  overflow:hidden;
  color:rgba(255,255,255,.88);
  font-family:'DM Mono',monospace;
  font-size:clamp(12px,1.15vw,17px);
  letter-spacing:.16em;
  text-overflow:ellipsis;
  white-space:nowrap;
}

body:not(.portrait-bypass) .mstr-scene-grid-gallery-close{
  flex:0 0 auto;
  width:clamp(34px,3vw,46px);
  height:clamp(34px,3vw,46px);
  border:1px solid rgba(82,160,4,.45);
  border-radius:50%;
  background:rgba(82,160,4,.08);
  color:#fff;
  font-size:clamp(24px,2vw,32px);
  line-height:1;
  cursor:pointer;
}

body:not(.portrait-bypass) .mstr-scene-grid-slide-list{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(clamp(150px,17%,250px),1fr));
  align-content:start;
  gap:clamp(10px,1.4vw,20px);
  min-height:0;
  overflow:auto;
  padding:clamp(14px,2vw,26px);
}

body:not(.portrait-bypass) .mstr-scene-grid-card{
  min-width:0;
  overflow:hidden;
  border:1px solid rgba(82,160,4,.28);
  border-radius:10px;
  background:linear-gradient(145deg,rgba(82,160,4,.10),rgba(0,0,0,.6) 55%);
}

body:not(.portrait-bypass) .mstr-scene-grid-card.is-current{
  border-color:#72d91b;
  box-shadow:0 0 12px rgba(82,160,4,.24),inset 0 0 0 1px rgba(82,160,4,.24);
}

body:not(.portrait-bypass) .mstr-scene-grid-thumb{
  display:grid;
  place-items:center;
  aspect-ratio:16/9;
  overflow:hidden;
  background:radial-gradient(ellipse at center,rgba(82,160,4,.18),#030503 74%);
  color:rgba(255,255,255,.68);
  font-family:'DM Mono',monospace;
  font-size:clamp(16px,1.6vw,24px);
  letter-spacing:.12em;
}

body:not(.portrait-bypass) .mstr-scene-grid-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
}

body:not(.portrait-bypass) .mstr-scene-grid-caption{
  display:grid;
  gap:6px;
  padding:10px 12px 12px;
  color:rgba(255,255,255,.82);
  font-size:clamp(11px,.9vw,14px);
  line-height:1.35;
}

body:not(.portrait-bypass) .mstr-scene-grid-group,
body:not(.portrait-bypass) .mstr-scene-grid-current{
  color:rgba(126,220,53,.76);
  font-family:'DM Mono',monospace;
  font-size:.78em;
  letter-spacing:.12em;
  text-transform:uppercase;
}

body.portrait-bypass :is(#p2,#p3,#p5,#p6,#p7) .view-rail.has-latest-section-instrument{
  grid-template-columns:var(--section-instrument-side) minmax(0,1fr) var(--section-instrument-side) !important;
}

body.portrait-bypass #p1 .view-rail.has-banat-rev-counter{
  grid-template-columns:var(--banat-instrument-side) minmax(0,1fr) var(--banat-instrument-side) !important;
}

body.portrait-bypass :is(#p1,#p2,#p3,#p5,#p6,#p7) .scene-unspool-control{
  display:none !important;
}

body.portrait-bypass :is(#p2,#p3,#p5,#p6,#p7) .view-rail.has-latest-section-instrument .section-rev-strip{
  grid-column:2 !important;
}

body.portrait-bypass #p1 .view-rail.has-banat-rev-counter .banat-rev-strip{
  grid-column:2 !important;
}

body.portrait-bypass :is(#p2,#p3,#p5,#p6,#p7) .view-rail.has-latest-section-instrument > .screen-sound-toggle{
  grid-column:3 !important;
}

body.portrait-bypass #p1 .view-rail.has-banat-rev-counter > .screen-sound-toggle{
  grid-column:3 !important;
}

/* VIEW-SCREEN CROWN — two source pixels survive the 67% workbench reduction
   as one clean visible line. A slightly taller ellipse keeps the curve present
   after a cold load without making the frame heavy. */
@media (min-width:861px){
  body:not(.verticale-edition) :is(#p1,#p2,#p3,#p5,#p6,#p7) .master-screen > :is(.golden-box,.bay-golden){
    border-top-width:2px;
    border-top-color:rgba(117,230,13,.82);
    border-radius:72px 72px 0 0 / 48px 48px 0 0;
  }

  body:not(.verticale-edition) :is(#p1,#p2,#p3,#p5,#p6,#p7) .master-screen > :is(.golden-box,.bay-golden)::before{
    border-radius:62px 62px 0 0 / 42px 42px 0 0;
    border-top-color:rgba(117,230,13,.34);
  }

  body:not(.verticale-edition) :is(#p1,#p2,#p3,#p5,#p6,#p7) .master-screen > :is(.golden-box,.bay-golden) > .gb-corner.gc-tl{
    height:2px;
  }
}

/* Temporary album proposal: the existing view screen supplies its only frame. */
body:not(.portrait-bypass) .mstr-scene-grid-gallery{
  inset:0;
  border:0;
  border-radius:0;
  background:#000;
  box-shadow:none;
}
body:not(.portrait-bypass) .mstr-scene-grid-gallery-heading{
  flex:0 0 auto;
  gap:12px;
  padding:28px 40px 0;
  border:0;
  background:none;
}
body:not(.portrait-bypass) .mstr-scene-grid-gallery-title{
  font-size:15px;
  letter-spacing:.1em;
}
body:not(.portrait-bypass) .mstr-scene-grid-gallery-close{
  width:26px;
  height:26px;
  border:0;
  background:none;
  font-size:25px;
}
body:not(.portrait-bypass) .mstr-scene-grid-slide-list{
  flex:1 1 auto;
  grid-template-columns:repeat(auto-fill,minmax(min(100%,180px),1fr));
  grid-auto-rows:max-content;
  align-content:start;
  gap:10px;
  padding:10px 18px 18px;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:#315e08 transparent;
}
body:not(.portrait-bypass) .mstr-scene-grid-card{
  position:relative;
  align-self:start;
  border-color:rgba(82,160,4,.35);
  border-radius:6px;
  background:#000;
}
body:not(.portrait-bypass) .mstr-scene-grid-thumb{
  aspect-ratio:var(--mstr-album-picture-ratio,1.65);
  background:#000;
  white-space:pre-line;
  text-align:center;
  font-size:clamp(12px,1.05vw,17px);
  letter-spacing:.04em;
  line-height:1.3;
}
body:not(.portrait-bypass) .mstr-scene-grid-thumb img{
  display:block;
  object-fit:contain;
}
body:not(.portrait-bypass) .mstr-scene-grid-caption{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap;
}

/* A quiet film label, contained within its existing album thumbnail. */
body:not(.portrait-bypass) .mstr-scene-grid-thumb{position:relative;}
body:not(.portrait-bypass) .mstr-scene-grid-reel-indicator{
  position:absolute;right:6px;bottom:6px;
  display:grid;place-items:center;
  width:15%;min-width:22px;max-width:28px;aspect-ratio:1;
  border-radius:4px;background:rgba(0,0,0,.76);color:#fff;
  pointer-events:none;
}
body:not(.portrait-bypass) .mstr-scene-grid-reel-indicator svg{
  display:block;width:55%;height:64%;margin-left:1px;
}

/* Curated album controls: familiar elliptical exit and direct picture choices. */
body:not(.portrait-bypass) .mstr-scene-grid-gallery-close{
  display:grid;place-items:center;box-sizing:border-box;
  width:58px;height:42px;padding:0;
  border:1px solid #579d0b;border-radius:999px;
  background:linear-gradient(180deg,#1b3907,#091803);
  color:#91ef31;font:400 25px/1 'DM Mono',monospace;
  box-shadow:none;cursor:pointer;-webkit-tap-highlight-color:transparent;
}
body:not(.portrait-bypass) .mstr-scene-grid-gallery-close:is(:hover,:focus-visible){
  border-color:#8bf22e;background:linear-gradient(180deg,#315f08,#163504);color:#e6ffd0;
}
body:not(.portrait-bypass) .mstr-scene-grid-gallery-close:focus-visible{outline:2px solid #91ef31;outline-offset:2px;}
body:not(.portrait-bypass) .mstr-scene-grid-card-action{
  appearance:none;display:block;box-sizing:border-box;width:100%;padding:0;border:0;
  background:none;color:inherit;text-align:inherit;cursor:pointer;
}
body:not(.portrait-bypass) .mstr-scene-grid-card-action:is(:hover,:focus-visible){outline:2px solid #75e60d;outline-offset:-2px;}
body:not(.portrait-bypass) .mstr-scene-grid-record{
  position:absolute;z-index:1;inset:auto 0 0;display:grid;gap:1px;
  padding:4px 3px 5px;background:linear-gradient(0deg,rgba(0,0,0,.94),rgba(0,0,0,.55) 76%,transparent);
  color:#fff;text-align:center;font-family:'IBM Plex Sans',sans-serif;line-height:1.1;text-shadow:none;pointer-events:none;
}
body:not(.portrait-bypass) .mstr-scene-grid-record small{font-size:clamp(7px,.62vw,10px);font-weight:600;letter-spacing:.015em;}
body:not(.portrait-bypass) .mstr-scene-grid-record strong{font-size:clamp(10px,1.05vw,16px);font-weight:800;line-height:1.04;}


/* Fixed lower Port exit, aligned with the nine-square control below the picture. */
body:not(.portrait-bypass) .mstr-scene-grid-gallery-footer{
  position:relative;flex:0 0 44px;min-height:44px;
  border-top:1px solid rgba(82,160,4,.25);background:#000;
}
body:not(.portrait-bypass) .mstr-scene-grid-gallery-return{
  position:absolute;left:var(--mstr-grid-return-x,calc(100% - 42px));top:4px;
  transform:translateX(-50%);width:52px;height:34px;font-size:21px;
}


/* The same approved Port silhouette for both desktop grid exits. */
body:not(.portrait-bypass) .mstr-scene-grid-gallery-close{
  position:relative;isolation:isolate;width:96px;height:42px;padding:0;
  border:0;border-radius:0;background:transparent;color:#e7ffd4;
  box-shadow:none;text-shadow:none;font:400 23px/1 'DM Mono',monospace;
}
body:not(.portrait-bypass) .mstr-scene-grid-gallery-close::before{
  content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:url('portrait-port-button.svg?v=20261027-text-ends-clear-v148') center/100% 100% no-repeat;
}
body:not(.portrait-bypass) .mstr-scene-grid-gallery-close:is(:hover,:focus-visible){
  border:0;background:transparent;color:#fff;
}
body:not(.portrait-bypass) .mstr-scene-grid-gallery-close:is(:hover,:focus-visible)::before{
  background-image:url('portrait-port-button-hover.svg?v=20261027-text-ends-clear-v148');
}
body:not(.portrait-bypass) .mstr-scene-grid-gallery-return{top:0;width:96px;height:44px;font-size:22px;}

/* Readable titles under the photographs; no covering gradient or title shadow. */
body:not(.portrait-bypass) .mstr-scene-grid-caption{
  position:static;display:flex;flex-direction:column;gap:2px;box-sizing:border-box;
  width:auto;height:auto;min-height:39px;padding:7px 8px 8px;margin:0;
  overflow:visible;clip-path:none;white-space:normal;background:#030603;
  color:rgba(246,255,239,.9);font:400 13px/1.2 'IBM Plex Sans',sans-serif;
  text-shadow:none;
}
body:not(.portrait-bypass) .mstr-scene-grid-caption-name{
  display:block;overflow-wrap:anywhere;
}
body:not(.portrait-bypass) .mstr-scene-grid-group,
body:not(.portrait-bypass) .mstr-scene-grid-current{font-size:9px;line-height:1.15;letter-spacing:.05em;}
