/* First paint and settled content share the same header rail and media sizes. */
html { scrollbar-gutter: stable; }
html.mg-public-booting #app { display: none; }
html.mg-public-booting body { margin: 0 !important; padding: 0 !important; width: 100% !important; max-width: none !important; }
body.auth-page-open { margin: 0 !important; padding: 0 !important; width: 100% !important; max-width: none !important; }
body.auth-page-open > #app { max-width: 760px; margin-inline: auto; }
#mogoo-public-boot { min-height: 100dvh; background: #fff; color: #243348; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; line-height: 1.5; }
#mogoo-public-boot,#mogoo-public-boot * { box-sizing: border-box; }
#mogoo-public-boot [hidden] { display: none !important; }
.mg-loading-head { height: 88px; background: #fff; }
.mg-loading-head>div { width: min(1184px,calc(100% - 96px)); height: 100%; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.mg-loading-logo { display: inline-flex; align-items: center; width: 148px; height: 52px; flex-shrink: 0; }
.mg-loading-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.mg-loading-head nav { display: flex; gap: 28px; }
.mg-loading-head a { text-decoration: none; color: #435164; font-size: 14px; font-weight: 600; }
.mg-loading-account { min-width: 88px; padding: 12px; text-align: center; border-radius: 10px; background: #eef5ff; }
.mg-loading-mobile-nav { display: none; }
.mg-loading-main { width: min(1000px,calc(100% - 48px)); margin: 0 auto; padding: 46px 0 72px; }
.mg-loading-main h1 { margin: 0 0 10px; font-size: 34px; line-height: 1.3; }
.mg-loading-status { color: #707780; font-size: 14px; line-height: 1.65; min-height: 24px; }
.mg-loading-controls { display: flex; gap: 12px; margin: 26px 0; }
.mg-loading-controls i { width: 100px; height: 44px; border-radius: 8px; background: #f0f3f7; }
.mg-loading-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.mg-loading-card { min-width: 0; }
.mg-loading-card>i { display: block; height: 180px; background: #f0f3f7; border-radius: 12px; animation: mg-loading-pulse 1.2s ease-in-out infinite alternate; }
.mg-loading-card>span { display: block; margin-top: 14px; width: 80%; height: 14px; background: #f0f3f7; border-radius: 4px; }
.mg-loading-card>span:last-child { width: 55%; }
[data-loading-kind=catalog] .mg-loading-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
[data-loading-kind=catalog] .mg-loading-card>i { height: auto; aspect-ratio: 2/3; }
[data-loading-kind=detail] .mg-loading-grid { grid-template-columns: 1.7fr 1fr; }
[data-loading-kind=detail] .mg-loading-card:first-child { grid-row: span 2; }
[data-loading-kind=detail] .mg-loading-card:first-child>i { height: 410px; }
[data-loading-kind=form] .mg-loading-main { max-width: 720px; }
[data-loading-kind=form] .mg-loading-grid,[data-loading-kind=article] .mg-loading-grid { grid-template-columns: 1fr; }
[data-loading-kind=form] .mg-loading-card>i { height: 56px; }
[data-loading-kind=auth] { background: #f6f7f9 !important; padding: 50px 0; box-sizing: border-box; }
[data-loading-kind=auth] .mg-loading-main { max-width: 420px; padding: 28px 32px; border-radius: 24px; background: #fff; text-align: center; box-sizing: border-box; }
[data-loading-kind=auth] .mg-loading-logo { width: 180px; margin: 10px auto 32px; }
[data-loading-kind=auth] .mg-loading-main h1 { font-size: 28px; }
[data-loading-kind=auth] .mg-loading-controls { display: none; }
[data-loading-kind=auth] .mg-loading-grid { grid-template-columns: 1fr; margin-top: 28px; }
[data-loading-kind=auth] .mg-loading-card>i { height: 52px; }
[data-loading-kind=auth] .mg-loading-card>span { display: none; }
.mg-boot-notice { margin: 24px 0; padding: 16px; border: 1px solid #dce5ef; border-radius: 10px; }
.mg-boot-notice span { display: block; margin: 8px 0; }
.mg-boot-notice button { padding: 10px 16px; color: #1374c7; background: #fff; border: 1px solid #c8d9ec; border-radius: 8px; font: inherit; cursor: pointer; }
.auth-connection-notice { position: fixed; z-index: 1500; left: 16px; right: 16px; bottom: 24px; max-width: 600px; margin: 0 auto; padding: 16px; background: #f6f8fb; border: 1px solid #dde5ef; border-radius: 10px; color: #435164; box-shadow: 0 8px 30px #21354720; }
.ranking-list.ranking-loading { min-height: 440px; }
.library-expiry { min-height: 180px; }
.library-poster,.library-expiry-poster,.personal-pick-poster { overflow: hidden; aspect-ratio: 2/3; }
.personal-pick-subscriptions { min-height: 44px; }
.content-finder .personal-pick[data-pick-state=loading] { grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 16px; }
.content-finder .personal-pick[data-pick-state=loading] .personal-pick-result { grid-column: 2; grid-row: 1; }
.content-finder .personal-pick-waiting { display: inline-flex; align-items: center; justify-content: center; width: 108px; height: 44px; color: #778396; font-size: 12px; }
.content-finder .personal-pick[data-pick-state=login_required] .personal-pick-empty a { min-width: 108px; box-sizing: border-box; justify-content: center; }
.ranking-request-status { min-height: 24px; margin: 0; color: #707780; font-size: 12px; }
.ott-top10 { container-type: inline-size; }
.ott-ranking-note { min-height: 20px; }
.content-explorer-page .content-finder .ott-top10 .ranking-list { min-height: calc((100cqw - 72px)*.3 + 120px); }
@media(max-width:1000px) { .content-explorer-page .content-finder .ott-top10 .ranking-list { min-height: calc((100cqw - 42px)*.46875 + 120px); } }
@media(max-width:600px) { .content-explorer-page .content-finder .ott-top10 .ranking-list { min-height: calc((100cqw - 18px)*2/3 + 120px); } }
.host-trust-panel { min-height: 90px; }
.party-update-status { min-height: 24px; margin: 8px 0; color: #667589; font-size: 13px; }
.party-update-status button { border: 0; background: transparent; color: #1374c7; text-decoration: underline; font: inherit; cursor: pointer; }
.party-list-loading,.party-empty { min-height: 260px; }
body.page-list #party-list { min-height: 600px; align-content: start; }
body.page-list #party-list .party-list-loading { min-height: 600px; grid-column: 1 / -1; }
@keyframes mg-loading-pulse { to { opacity: .5; } }
@media(max-width:800px) {
  .mg-loading-head { height: 64px; }
  .mg-loading-head>div { width: auto; margin: 0 12px; }
  .mg-loading-logo { width: 110px; height: 40px; }
  .mg-loading-head nav { display: none; }
  .auth-connection-notice { bottom: calc(86px + env(safe-area-inset-bottom)); }
  .mg-loading-mobile-nav { position: fixed; z-index: 1001; inset: auto 0 0; display: flex; align-items: center; justify-content: space-around; min-height: 70px; padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid #edf0f4; }
  .mg-loading-mobile-nav a { padding: 18px 3px; color: #435164; font-size: 11px; text-decoration: none; }
  .mg-loading-main { width: calc(100% - 32px); padding-top: 28px; }
  .mg-loading-main h1 { font-size: 26px; }
  .mg-loading-grid,[data-loading-kind=catalog] .mg-loading-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
  [data-loading-kind=detail] .mg-loading-grid { grid-template-columns: 1fr; }
  [data-loading-kind=detail] .mg-loading-card:first-child>i { height: 220px; }
  [data-loading-kind=auth] { padding-top: 24px; }
  [data-loading-kind=auth] .mg-loading-main { padding-inline: 24px; }
}
@media(prefers-reduced-motion:reduce) { .mg-loading-card>i { animation: none; } }

#account-dashboard:has(.wallet-loading) > #mogoo-billing-card { display: none !important; }

.content-library .library-providers small { width: 7ch; min-width: 7ch; white-space: nowrap; }
@media (max-width: 800px) { .content-library .library-heading { flex-direction: column; align-items: flex-start; gap: 4px; } .content-library .library-heading p { margin: 0; min-height: 1.7em; } }

/* Static fallback content remains available without JavaScript; live entries reveal only the current UI. */
.mg-loading-circle { display: none; }
.mg-public-js #mogoo-public-boot > .mg-loading-head,
.mg-public-js #mogoo-public-boot > .mg-loading-mobile-nav,
.mg-public-js #mogoo-public-boot [data-boot-preview] { display: none; }
.mg-public-js #mogoo-public-boot { padding: 0; background: #fff !important; }
.mg-public-js #mogoo-public-boot > .mg-loading-main { width: 100%; max-width: none; min-height: 100dvh; margin: 0; padding: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #fff; border-radius: 0; }
.mg-public-js .mg-loading-circle { display: block; }
.mg-loading-circle i { display: block; width: 36px; height: 36px; border: 3px solid #e6edf5; border-top-color: #1374c7; border-radius: 50%; animation: mg-loading-spin .8s linear infinite; }
.mg-loading-status:empty { display: none; }
@keyframes mg-loading-spin { to { transform: rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { .mg-loading-circle i { animation: none; } }

.mg-inline-loading { display: inline-block; width: 22px; height: 22px; border: 2px solid #e6edf5; border-top-color: #1374c7; border-radius: 50%; animation: mg-loading-spin .8s linear infinite; }
.home .ranking-list.ranking-loading { min-height: 230px; }
.home .trailer-rail:has(> .mg-inline-loading) { min-height: 150px; }
.lowest-price-status:empty { display: inline-block; min-height: 1.2em; min-width: 4ch; background: #e6edf5; border-radius: 6px; }
@media(prefers-reduced-motion:reduce) { .mg-inline-loading { animation: none; } }
