/* Shared public-shell layout extracted from css.css.
   Keep page-specific study/main/login rules out of this file. */

:root {
  --study-shell-max-width: 1920px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: var(--study-layer-skip-link);
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(8, 29, 49, 0.96);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-140%);
  transition: transform 0.18s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

[data-loading-root] {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  z-index: calc(var(--study-layer-page-alert, 10010) + 10);
}

[data-loading-root][hidden] {
  display: none;
}

[data-loading-root] > img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
}

.headWrapper {
  width: 100%;
  top: -3px;
  left: 0;
  font-size: clamp(18px, 1.5vmax, 28px);
  z-index: var(--study-layer-shell-header);
  position: fixed;
}

.headInner {
  max-width: var(--study-shell-max-width);
  min-width: 0;
  width: 100%;
  margin: 0 auto;
  position: relative;
}

body:not(.study-page):not(.main-page) :is(.viewportRoot, .mainWrapper) {
  width: min(100dvw, var(--study-shell-max-width));
  height: 100dvh;
  background: #828f9a;
  position: relative;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
  -webkit-touch-callout: none;
}

body:not(.study-page):not(.main-page) :is(.mainWrapper, .mainInner) {
  position: relative;
  padding-top: clamp(130px, 10vw, 200px);
  width: min(100dvw, var(--study-shell-max-width));
  height: 100dvh;
  min-width: min(1200px, 100dvw);
  max-width: var(--study-shell-max-width);
  margin: 0 auto;
  background: url("../img/main_bg2.webp?v") no-repeat center center;
  background-size: cover;
  aspect-ratio: 16 / 9;
  box-sizing: border-box;
}

@media screen and (min-width: 768px) and (max-width: 1600px) {
  body:not(.study-page):not(.main-page) {
    position: fixed;
  }

  body:not(.study-page):not(.main-page) :is(.viewportRoot, .mainWrapper, .mainInner) {
    width: 100dvw;
    height: 100dvh;
    margin: 0;
    aspect-ratio: inherit;
  }
}

@media screen and (max-width: 767px) {
  body:not(.study-page):not(.main-page) {
    overflow-x: hidden;
  }

  body:not(.study-page):not(.main-page) :is(.viewportRoot, .mainWrapper, .mainInner) {
    width: 100vw;
    min-width: 0;
    max-width: none;
  }

  body:not(.study-page):not(.main-page) :is(.mainWrapper, .mainInner) {
    padding-top: clamp(95px, 25vw, 130px);
    overflow: hidden;
  }

  #main-content {
    outline: none;
  }
}
