html {
  width: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  min-width: 0;
  margin: 0;
}
main {
  width: 100%;
  box-sizing: border-box;
  padding-inline: clamp(16px, 3.5vw, 40px);
}
body > header {
  width: calc(100% - 40px);
  box-sizing: border-box;
}
img,
video,
canvas {
  max-width: 100%;
}
.grid > *,
.feature-grid > *,
.join-layout > *,
.overview-columns > *,
.row > * {
  min-width: 0;
}
.card p,
.rule-point span,
.answer,
.news-article,
.history-admin-row h3 {
  overflow-wrap: anywhere;
}
.mobile-menu-toggle {
  display: none;
}
@media (max-width: 900px) {
  html {
    scroll-padding-top: 100px;
  }
  body > header {
    position: sticky;
    top: max(10px, env(safe-area-inset-top));
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 16px;
    width: auto;
    max-width: none;
    min-height: 70px;
    margin: 10px max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left));
    padding: 8px 14px;
    border-radius: 25px;
    z-index: 50;
  }
  body > header > .brand {
    min-width: 0;
    flex: 1;
  }
  body > header .nav-logo {
    width: 105px;
    height: 50px;
    max-width: 100%;
    object-fit: contain;
  }
  .mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    min-height: 44px;
    padding: 10px;
    border: 1px solid #b8eaff45;
    border-radius: 16px;
    color: #e6f7ff;
    background:
      linear-gradient(
        140deg,
        #d2f2ff1f,
        #69bfff0d);
    box-shadow: inset 0 1px #ffffff40;
    cursor: pointer;
  }
  .mobile-menu-toggle span {
    display: block;
    width: 21px;
    height: 2px;
    border-radius: 3px;
    background: currentColor;
    transition: transform .22s, opacity .22s;
  }
  .mobile-menu-open .mobile-menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .mobile-menu-open .mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
  }
  .mobile-menu-open .mobile-menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
  body > header > nav {
    position: absolute;
    inset: calc(100% + 10px) 0 auto;
    display: none;
    grid-template-columns: minmax(0, 1fr);
    width: auto;
    max-height: calc(100svh - 120px);
    overflow-y: auto;
    padding: 12px;
    gap: 5px;
    justify-content: stretch;
    border: 1px solid #c6ecff40;
    border-radius: 24px;
    background:
      linear-gradient(
        135deg,
        #18394ff5,
        #0b2137fa);
    box-shadow: inset 0 1px #ffffff40, 0 18px 55px #00101c99;
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
  }
  body > header.mobile-menu-open > nav {
    display: grid;
    animation: mobile-menu-arrive .2s ease-out;
  }
  body > header > nav > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 12px 16px;
    font-size: 14px;
    letter-spacing: .6px;
    white-space: normal;
    border-radius: 15px;
    box-sizing: border-box;
  }
  body > header > nav > a:after {
    content: "\2197";
    font-size: 18px;
    color: #9bdfff;
  }
  .mobile-menu-toggle:focus-visible,
  body > header > nav > a:focus-visible {
    outline: 2px solid #b6eaff;
    outline-offset: 3px;
  }
  .cinematic {
    margin-top: -80px;
    min-height: 720px;
    min-height: min(850px, 100svh);
    padding: 135px clamp(20px, 5vw, 40px) 65px;
  }
  .main-logo {
    width: clamp(220px, 65vw, 430px);
    height: clamp(150px, 40vw, 240px);
    max-width: 100%;
  }
  .cinematic h1 {
    font-size: clamp(19px, 3.7vw, 27px);
    max-width: 100%;
    line-height: 1.4;
  }
  .hero-center > p {
    font-size: clamp(14px, 2.1vw, 17px);
    max-width: 540px;
    line-height: 1.7;
  }
  .hero-buttons {
    width: 100%;
    max-width: 560px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .hero-buttons .btn {
    min-width: 0;
    width: 100%;
    min-height: 64px;
    padding: 14px;
    font-size: 12px;
    box-sizing: border-box;
    gap: 10px;
  }
  .hero-buttons .btn small {
    font-size: 11px;
    line-height: 1.5;
  }
  .community-strip {
    padding: 24px 8px;
    gap: 18px;
    margin-bottom: 40px;
  }
  .section-title h2,
  .page-intro h1 {
    font-size: clamp(29px, 6vw, 48px);
  }
  .section-title > p,
  .lead,
  .card p,
  .rule-point,
  .news-card p {
    font-size: 15px;
    line-height: 1.75;
  }
  .feature-grid,
  .join-layout,
  .news-admin-layout,
  .overview-columns {
    grid-template-columns: minmax(0, 1fr);
  }
  .feature-card {
    min-width: 0;
  }
  .btn {
    min-height: 44px;
  }
  input,
  select,
  textarea {
    font-size: 16px;
    max-width: 100%;
    box-sizing: border-box;
  }
  dialog {
    width: calc(100% - 24px);
    max-width: 650px;
    max-height: calc(100dvh - 32px);
    box-sizing: border-box;
    padding: clamp(20px, 5vw, 36px);
    overflow-y: auto;
  }
  .toolbar,
  .panel-heading {
    flex-wrap: wrap;
    gap: 14px;
  }
  footer {
    flex-wrap: wrap;
    gap: 18px;
    padding-inline: 20px;
  }
}
@media (max-width: 540px) {
  .hero-buttons {
    max-width: 390px;
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-buttons .btn {
    min-height: 63px;
    font-size: 13px;
    padding: 14px 18px;
  }
  .cinematic {
    min-height: 760px;
    min-height: max(720px, 94svh);
    padding-top: 125px;
  }
  .hero-scroll {
    font-size: 10px;
    letter-spacing: 1.5px;
    margin-top: 26px;
  }
  .community-strip {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px 6px;
    gap: 0;
  }
  .community-strip > div {
    justify-content: flex-start;
    border-right: 0;
    border-bottom: 1px solid #ffffff12;
    padding: 20px 10px;
    gap: 18px;
  }
  .community-strip > div > span:last-child {
    font-size: 11px;
  }
  .community-strip b {
    font-size: 14px;
  }
  .feature-card,
  .row {
    grid-template-columns: minmax(0, 1fr);
  }
  .staff-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }
  .staff-nav button {
    min-width: 0;
    white-space: normal;
    min-height: 48px;
  }
  .dashboard-heading h1 {
    font-size: clamp(25px, 7vw, 34px);
  }
  .history-admin-row .btn {
    width: 100%;
  }
}
@media (max-width: 360px) {
  .cinematic h1 {
    font-size: 18px;
  }
  .hero-center > p {
    font-size: 14px;
  }
  .main-logo {
    width: 220px;
  }
  .staff-nav {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-height: 550px) and (orientation: landscape) {
  .cinematic {
    min-height: 620px;
  }
  .main-logo {
    height: 160px;
  }
  .hero-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@keyframes mobile-menu-arrive {
  0% {
    opacity: 0;
    transform: translateY(-7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-menu-toggle span,
  body > header.mobile-menu-open > nav {
    animation: none;
    transition: none;
  }
}
