/* V129 — responsive dimensions, not browser zoom. Scoped to existing portal components. */
:root {
  --av129-space: clamp(10px, 2dvh, 22px);
  --av129-header: clamp(48px, 7.3dvh, 58px);
  --av129-nav: clamp(44px, 7dvh, 55px);
  --av129-card-min: clamp(118px, 17dvh, 160px);
}
/* Preserve natural text wrapping and intrinsic grid sizes. */
main.site-container, .site-container.section {min-width:0}
.av-header .main-header > *, .av95-heading > *, .dv120-feature-grid > *,
.nj-layout > *, .darshan-sanctum > *, .avv-watch-layout > * {min-width:0}
#primary-nav .nav-parent .nav-sub, #primary-nav .av94-music-sub, .av-search-popover {max-height: min(65dvh, 480px);overflow-y:auto;overscroll-behavior:contain}
@media (min-width: 1200px) {
 body {--av99-ad-width:clamp(160px, 15vw, 320px);--av97-panel-width:clamp(280px, 22vw, 410px)}
 .av99-layout .av96-history-grid,.av96-side-open .av99-layout .av96-history-grid {grid-template-columns:repeat(auto-fit,minmax(min(100%,165px),1fr))}
}
/* Reserve only the player column on compact desktops; no ad resizing. */
@media (min-width: 1200px) and (max-width: 1439px) {
 body {--av99-ad-width:0px;--av101-left-gap:0px;--av97-panel-width:clamp(280px,22vw,320px)}
 main.av95-music.av99-layout {margin-left:0}
 body.av96-side-open main.av95-music.av99-layout {margin-left:0}
 main.av95-music.av99-layout .av99-ad-slot {display:none}
 body:has(main.av99-layout) .av-footer {margin-left:0}
}
@media (min-width: 691px) and (max-height: 849px) {
 .av-header .main-header {min-height:var(--av129-header)!important;gap:clamp(8px,1.2vw,16px);padding-block:2px}
 .av-header .av-brand-wordmark img {max-height:calc(var(--av129-header) - 5px);width:auto;max-width:100%;object-fit:contain}
 .av-header .search {height:36px}
 #primary-nav .nav-scroll>a,#primary-nav .nav-scroll>.nav-parent>a {min-height:var(--av129-nav);padding-block:3px 7px;gap:2px}
 #primary-nav .av107-nav-icon {width:20px;height:20px;flex-basis:20px}
 .section-heading {margin-bottom:var(--av129-space)}
 .hero-main {min-height:clamp(235px,44dvh,345px);padding:clamp(16px,3dvh,30px)}
 .hero-main h1 {font-size:clamp(30px,5dvh,46px);margin:10px 0}
 .av95-music.av99-layout,body.av96-side-open .av95-music.av99-layout {padding-top:var(--av129-space)}
 .av95-music > .av95-filters {gap:8px;margin-bottom:var(--av129-space);padding-top:4px;padding-bottom:11px}
 .av95-music .av95-filters a {min-height:34px;padding:6px 12px;font-size:13px}
 .av95-music .av95-shelf {margin-bottom:clamp(16px,3dvh,26px)}
 .av95-music .av95-heading {margin-bottom:10px}
 .av95-music .av95-heading h2 {font-size:clamp(18px,2.8dvh,23px)}
 .av99-layout .av95-rail,.av96-side-open .av99-layout .av95-rail {grid-auto-columns:var(--av129-card-min);gap:12px}
 .av99-layout .av95-grid,.av96-side-open .av99-layout .av95-grid {grid-template-columns:repeat(auto-fill,minmax(min(100%,var(--av129-card-min)),1fr))}
 #av-player.av96-side:not([hidden]) {gap:6px;padding-top:30px;padding-bottom:10px;overflow-y:auto;overscroll-behavior:contain}
 #av-player.av96-side .player-meta {padding:8px;gap:6px;flex-shrink:0}
 #av-player.av96-side .player-meta img#player-cover {width:min(100%,clamp(96px,23dvh,200px));max-height:23dvh}
 #av-player.av96-side .player-actions {gap:7px;flex-shrink:0}
 #av-player.av96-side .av96-queue {min-height:0;flex-shrink:0}
 .av-dv-index .dv120-topics {padding:10px 12px;margin-bottom:10px}
 .av-dv-index .dv120-topic-groups {gap:8px}
 .av-dv-index .dv120-topic {min-height:76px;padding:5px;gap:2px}
 .av-dv-index .dv120-topic svg {width:28px;height:28px}
 .av-dv-index .dv120-feature-grid {gap:14px}
 .av-dv-index .dv122-ticker-group a {padding-block:6px}
 .nj-page:not(.nj-is-focus) .nj-visual-stage {min-height:0;margin-block:8px 12px}
 .nj-page:not(.nj-is-focus) .nj-deity-hero {height:clamp(190px,42dvh,340px)}
 .nj-page:not(.nj-is-focus) .nj-counter {width:min(100%,clamp(200px,42dvh,385px))}
 .darshan-sanctum .darshan-main-photo {max-height:clamp(240px,54dvh,455px)}
 .darshan-sanctum .darshan-main-photo>img {object-fit:contain}
 .darshan-sanctum .darshan-puja-controls {margin-top:8px;padding:7px 10px}
 .avv-hero.avv-hero-slider {min-height:clamp(240px,47dvh,380px)!important;padding:clamp(16px,3dvh,32px)!important}
 .avv-watch-layout-v39 .avv-suggest-list {min-height:0;max-height:max(160px,calc(100dvh - 220px))}
 .avv-shorts-player {width:min(100%,calc(65dvh * 9 / 16),420px);max-height:none}
 .avv-shorts-list {max-height:65dvh}
 .av-library .lib-grid {gap:12px}
 .jy-hero {padding-block:var(--av129-space)}
 .av-v92-pdf .av-read-topbar {min-height:48px;padding-block:5px}
 .av-read-shell:not(.av-v92-pdf) .av-scribd-reader {min-height:200px;height:max(200px,calc(100dvh - 145px))}
 .av-search-results {gap:9px}
 .avs-page .avs-grid {gap:12px}
}
@media (min-width: 691px) and (max-height: 599px) {
 /* Very short windows: allow ordinary page scrolling instead of trapping controls. */
 .av95-music > .av95-filters {position:relative;top:auto}
 .av-dv-index>.dv122-ticker {position:relative;top:auto}
 .avv-watch-layout-v39 .avv-suggest {position:static}
 .darshan-sanctum>.darshan-detail {position:relative;top:auto;max-height:none}
}
@media (max-width:690px) {
 .av95-music > .av95-filters {flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;gap:7px}
 .av95-music > .av95-filters a {flex:0 0 auto;white-space:nowrap}
 .av95-music > .av95-filters::-webkit-scrollbar {display:none}
 .avv-shorts-player {width:min(100%,calc(70dvh * 9 / 16),365px);max-height:none}
}
