html:has(.content-page),
html:has(#browse-view[hidden]) {
  height: auto;
  min-height: 100%;
  overflow-y: auto;
  scrollbar-gutter: stable;
}
body:has(.content-page),
body:has(#browse-view[hidden]) {
  height: auto;
  min-height: 100dvh;
  overflow: visible;
}
body:has(.content-page) {
  background: var(--rs-background);
  color: var(--rs-text);
  font-family: var(--rs-font);
}
body:has(#browse-view[hidden]) .app-shell {
  display: block;
  height: auto;
  min-height: 100dvh;
  padding: 0;
}
.content-page,
body:has(#browse-view[hidden]) main {
  box-sizing: border-box;
  width: min(960px, calc(100% - 80px));
  max-width: none;
  min-height: 100dvh;
  height: auto;
  margin: 0 0 0 max(80px, calc((100% - 880px) / 2));
  padding: 48px 40px 24px;
  overflow: visible;
  overflow-wrap: anywhere;
}
.page-panel:not([hidden]) {
  height: auto;
  width: min(100%, 760px);
  margin: 0;
  padding: 0;
  overflow: visible;
  overscroll-behavior: auto;
}
.submission-panel { max-width: 760px; }
.page-panel > h1,
.page-panel > .page-heading h1 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -1.2px;
  margin: 20px 0;
  font-weight: 650;
}
@media (min-width: 761px) and (min-height: 501px), (min-width: 1001px) {
  body:has(#browse-view[hidden]) .site-header {
    position: fixed;
    inset: 0 auto 0 0;
    width: 80px;
    height: 100dvh;
  }
}
@media (max-width: 760px), (max-height: 500px) and (max-width: 1000px) {
  .content-page,
  body:has(#browse-view[hidden]) main {
    width: 100%;
    margin-left: 0;
    padding: 24px 20px calc(var(--mobile-rail-height, 60px) + 24px);
  }
}
