/* v265 — Samsung-only geometry parity. V261 AVEE renderer/dynamics are untouched. */

/* The Samsung vinyl disc must be a real square before border-radius is applied.
   Older landscape rules combined width/height with max-width, which could cap only
   the width and turn the disc into an ellipse. */
html.samsung-device:not([data-player-style="avee"]) .vinyl{
  box-sizing:border-box!important;
  aspect-ratio:1 / 1!important;
  flex:none!important;
  align-self:center!important;
  justify-self:center!important;
  border-radius:50%!important;
}
html.samsung-device:not([data-player-style="avee"]) .vinyl-label{
  aspect-ratio:1 / 1!important;
  border-radius:50%!important;
}

@media (orientation:portrait){
  html.samsung-device:not([data-player-style="avee"]) .vinyl{
    --samsung-vinyl-size:min(85vw,405px);
    width:var(--samsung-vinyl-size)!important;
    height:var(--samsung-vinyl-size)!important;
    min-width:0!important;
    min-height:0!important;
    max-width:var(--samsung-vinyl-size)!important;
    max-height:var(--samsung-vinyl-size)!important;
  }
}

@media (orientation:landscape) and (pointer:coarse){
  html.samsung-device:not([data-player-style="avee"]) .vinyl{
    --samsung-vinyl-size:min(62vh,310px,38vw);
    width:var(--samsung-vinyl-size)!important;
    height:var(--samsung-vinyl-size)!important;
    min-width:0!important;
    min-height:0!important;
    max-width:none!important;
    max-height:none!important;
  }
}

/* Installed Samsung PWA: lock the AVEE stage to one coherent geometry. The old
   rule could cap width without capping height, and standalone has a taller viewport
   than Samsung Browser. This made the same v261 renderer look different in PWA. */
@media (display-mode:standalone) and (orientation:landscape) and (pointer:coarse){
  html.samsung-device[data-player-style="avee"] .vinyl{
    --samsung-avee-stage:min(74vh,430px,44vw);
    width:var(--samsung-avee-stage)!important;
    height:var(--samsung-avee-stage)!important;
    min-width:0!important;
    min-height:0!important;
    max-width:none!important;
    max-height:none!important;
    aspect-ratio:1 / 1!important;
    margin:auto!important;
    overflow:hidden!important;
  }
  html.samsung-device[data-player-style="avee"] .avee-canvas{
    inset:0!important;
    width:100%!important;
    height:100%!important;
    transform:none!important;
  }
}

/* Portrait Samsung PWA has no browser chrome, so dvh is substantially taller than
   Samsung Browser. Keep the approved browser-like v261 hero footprint tied to the
   physical CSS width rather than the standalone viewport height. */
@media (display-mode:standalone) and (orientation:portrait) and (pointer:coarse){
  html.samsung-device[data-player-style="avee"] .vinyl{
    --samsung-avee-pwa-height:min(570px,115vw);
    width:calc(100% + 48px)!important;
    height:var(--samsung-avee-pwa-height)!important;
    min-height:0!important;
    max-width:none!important;
    max-height:var(--samsung-avee-pwa-height)!important;
    aspect-ratio:auto!important;
    margin:0 -24px -10px!important;
    overflow:hidden!important;
  }
  html.samsung-device[data-player-style="avee"] .avee-canvas{
    inset:0!important;
    width:100%!important;
    height:100%!important;
    transform:none!important;
  }
}
