.page {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  z-index: 1;
  overflow-y: auto;
  overflow-x: hidden;
}
.page.page-active {
  display: flex;
  opacity: 1;
  animation: none;
}
.page.page-out {
  display: flex;
  pointer-events: none;
  animation: none;
}
.light-page {
  background: var(--bg);
}
.section-loader {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
.section-loader.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: none;
}
.section-loader-disc {
  position: relative;
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.section-loader-ico {
  width: 42px;
  height: 42px;
  color: #ffffff;
  animation: loaderPulse 1.8s ease-in-out infinite;
}
.light-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.light-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(4px) saturate(0.92) brightness(1);
  transform: scale(1.05);
}
.light-bg-ov {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to top,
      color-mix(in srgb, var(--accent) 74%, transparent) 0%,
      color-mix(in srgb, var(--accent) 55%, transparent) 30%,
      color-mix(in srgb, var(--accent) 32%, transparent) 60%,
      color-mix(in srgb, var(--accent) 10%, transparent) 100%);
}
.page-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: max(96px, var(--fixed-controls-safe-top)) max(56px, calc((100% - 1088px) / 2)) 56px;
  overflow-y: auto;
  height: 100dvh;
  max-height: 100dvh;
  scroll-padding-top: max(96px, var(--fixed-controls-safe-top));
  scrollbar-width: thin;
  scrollbar-color: var(--ink3) transparent;
  box-sizing: border-box;
}
.page-inner::-webkit-scrollbar {
  width: 8px;
}
.page-inner::-webkit-scrollbar-button {
  display: none;
}
.page-inner::-webkit-scrollbar-track {
  background: transparent;
}
.page-inner::-webkit-scrollbar-thumb {
  background: var(--ink3);
  border-radius: 4px;
}
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 44px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--accent-border);
}
.page-header h2 {
  font-family: "DM Sans", sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.units-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 0 4px;
}
.units-pagination[hidden] {
  display: none;
}
.upag-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 7px;
  font-family: "DM Sans", sans-serif;
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: #ffffff;
  color: #111111;
  border: none;
  box-shadow: 0 0 0 2px var(--accent-ui-border);
  cursor: pointer;
  transition:
    background 0.2s,
    box-shadow 0.2s,
    color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  .upag-btn:hover:not(:disabled) {
    background: var(--accent-faint);
    border-color: var(--accent-strong);
    color: var(--accent-btn);
  }
}
.upag-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.upag-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.upag-page {
  font-family: "DM Sans", sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent-strong);
  letter-spacing: 0.04em;
}
.upag-dots {
  display: flex;
  gap: 5px;
  align-items: center;
}
.upag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-faint2);
  transition:
    width 0.25s,
    background 0.25s,
    border-radius 0.25s;
}
.upag-dot.active {
  width: 18px;
  border-radius: 3px;
  background: var(--accent);
}
.page-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 28px 0 16px;
  margin-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
}
.footer-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(245, 241, 235, 0.45));
}
.footer-copy {
  font-size: 0.55rem;
  letter-spacing: 0.22em;
  color: #8a8a8a;
  text-transform: uppercase;
}
.prisma-credit {
  color: #8a8a8a;
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease);
}
@media (hover: hover) {
  .prisma-credit:hover {
    text-decoration: underline;
  }
}
.loader {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s;
}
.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.loader-disc {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.loader-logo {
  position: relative;
  width: 120px;
  max-width: 50vw;
  filter: brightness(0) invert(1) opacity(0.8);
}
.loader-dots {
  display: flex;
  gap: 9px;
}
.loader-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  animation: loaderDots 1.2s ease-in-out infinite;
}
.loader-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.loader-dots span:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes loaderDots {
  0%, 80%, 100% {
    opacity: 0.2;
  }
  40% {
    opacity: 1;
  }
}
.menu-btn {
  position: fixed;
  top: var(--ui-btn-top, calc(22px + env(safe-area-inset-top)));
  left: var(--ui-btn-edge, 22px);
  z-index: 3100;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: rgba(240, 240, 238, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  color: #1a1a18;
  cursor: pointer;
  transition:
    background 0.3s var(--ease),
    border-color 0.3s var(--ease),
    transform 0.3s var(--ease),
    left 0.35s var(--ease);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 0 0 2px var(--accent-ui-border);
}
@media (hover: hover) {
  .menu-btn:hover {
    transform: scale(1.05);
  }
}
.menu-btn:active {
  transform: scale(0.96);
}
.menu-btn-icon {
  width: 31px;
  height: 31px;
  transition: transform 0.4s var(--ease);
}
.menu-btn-closed {
  display: block;
  opacity: 1;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.menu-btn-open {
  display: none;
  opacity: 0;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.menu-btn.active .menu-btn-closed {
  opacity: 0;
  display: none;
}
.menu-btn.active .menu-btn-open {
  display: block;
  opacity: 1;
}
.back-btn {
  position: fixed;
  top: var(--ui-btn-top, calc(22px + env(safe-area-inset-top)));
  left: calc(var(--ui-btn-edge, 22px) + var(--ui-btn-size, 42px) + var(--ui-btn-gap, 10px));
  z-index: 3300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s var(--ease),
    left 0.35s var(--ease),
    background 0.15s,
    transform 0.15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 0 0 2px var(--accent-ui-border);
}
.back-btn.visible {
  opacity: 1;
  pointer-events: auto;
}
.back-btn.menu-open {
  opacity: 0;
  pointer-events: none;
}
.back-btn:active {
  transform: scale(0.96);
}
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  z-index: 2000;
  transition: opacity 0.3s;
  will-change: opacity;
}
.menu-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.side-menu {
  position: fixed;
  top: 14px;
  left: 14px;
  bottom: 14px;
  width: min(250px, 80vw);
  background: #f5f1eb;
  z-index: 3400;
  display: flex;
  flex-direction: column;
  transform: translateX(calc(-100% - 70px));
  transition: transform 0.35s var(--ease);
  will-change: transform;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.side-menu::-webkit-scrollbar {
  display: none;
}
.side-menu.active {
  transform: translateX(0);
}
.side-menu::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 0;
  background:
    linear-gradient(
      to bottom,
      transparent,
      var(--accent-dim),
      transparent);
  transition: height 0.7s var(--ease) 0.1s;
}
.side-menu.active::after {
  height: 100%;
}
.menu-header {
  position: relative;
  padding: 28px 16px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--accent-contrast);
  border-bottom: 0.5px solid color-mix(in srgb, var(--accent) 16%, transparent);
  border-radius: 0 0 18px 18px;
  gap: 12px;
  flex-shrink: 0;
}
.menu-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: #f5f1eb;
  border: none;
  border-radius: 50%;
  color: var(--accent);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.menu-close svg {
  width: 20px;
  height: 20px;
}
@media (hover: hover) {
  .menu-close:hover {
    background: var(--accent-contrast);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  }
}
.menu-logo-link {
  display: block;
  width: 57%;
  margin-inline: auto;
  text-decoration: none;
}
.menu-logo {
  width: 100%;
  display: block;
  transition: transform 0.35s var(--ease);
}
@media (hover: hover) {
  .menu-logo:hover {
    transform: scale(1.02);
  }
}
.menu-tagline {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: var(--accent);
  text-transform: uppercase;
  text-align: center;
}
.menu-nav {
  padding: 16px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}
.menu-nav a {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 12px;
  background: transparent;
  border-radius: 9px;
  font-family: "DM Sans", sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: #2a2f30;
  transition: color 0.2s, background 0.2s;
  text-decoration: none;
}
@media (hover: hover) {
  .menu-nav a:hover {
    color: var(--accent);
    background: var(--accent-faint);
  }
}
.menu-nav a.menu-active {
  color: var(--accent-contrast-ink);
  font-weight: 500;
  background: color-mix(in srgb, var(--accent-contrast) 45%, #f5f1eb);
  box-shadow: inset 4px 0 0 var(--accent);
}
.menu-nav a.menu-active .menu-icon {
  color: var(--accent);
}
.menu-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7a8080;
  background: transparent;
  transition: color 0.2s;
}
.menu-icon svg {
  width: 20px;
  height: 20px;
}
@media (hover: hover) {
  .menu-nav a:hover .menu-icon {
    color: var(--accent);
  }
}
.mt {
  flex: 1;
}
.menu-footer {
  margin-top: auto;
  padding: 14px 22px 20px;
  border-top: 1px solid var(--accent-faint);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.menu-social {
  display: flex;
  gap: 18px;
}
.menu-social-link {
  display: flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--accent);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  .menu-social-link:hover {
    background: var(--accent-faint);
  }
}
.menu-copy {
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  color: #8a8a8a;
  text-transform: uppercase;
}
@media (max-height: 500px) {
  .side-menu {
    width: 40vw;
    top: 0;
    left: 0;
    bottom: 0;
    border-radius: 0 18px 18px 0;
  }
  .menu-header {
    padding: 16px 16px 14px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    flex-shrink: 0;
  }
  .menu-logo-link {
    width: auto;
  }
  .menu-logo {
    width: 64px;
  }
  .menu-tagline {
    display: block;
  }
  .menu-nav {
    padding: 6px 14px 4px;
    gap: 4px;
  }
  .menu-nav a {
    padding: 11px 10px;
    font-size: 0.95rem;
    gap: 13px;
  }
  .menu-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
  }
  .menu-icon svg {
    width: 20px;
    height: 20px;
  }
  .menu-footer {
    padding: 10px 18px 14px;
    flex-shrink: 0;
  }
}
@media (min-width: 900px) and (min-height: 501px) {
  .menu-logo-link {
    width: 49%;
    margin-inline: auto;
  }
}
@media (max-height: 680px) and (min-height: 501px) {
  .menu-header {
    padding: 16px 16px 14px;
  }
  .menu-logo {
    width: 100%;
  }
  .menu-nav {
    padding: 8px 18px 4px;
    gap: 0;
  }
  .menu-nav a {
    padding: 11px 8px;
    font-size: 0.95rem;
    gap: 13px;
  }
  .menu-icon {
    width: 26px;
    height: 26px;
    border-radius: 5px;
  }
  .menu-icon svg {
    width: 20px;
    height: 20px;
  }
  .menu-footer {
    padding: 6px 22px 12px;
  }
}
