:root {
  /*
   * 430px 是设计稿宽度；0.138dvh 用来保证完整内容在矮屏中也能放进一屏。
   * 尺寸同时受视口宽、高约束，桌面端最大保持设计稿原尺寸。
   */
  --design-pixel: min(0.23255814vw, 0.138dvh, 1px);
  --content-top: max(12dvh, env(safe-area-inset-top));
  color-scheme: dark;
  background: #000;
  font-family:
    "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei",
    "Noto Sans CJK SC", "Source Han Sans SC", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000;
}

button {
  appearance: none;
}

.page {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: #000;
  color: #fff;
}

.canvas {
  position: relative;
  z-index: 1;
  width: calc(430 * var(--design-pixel));
  height: 100%;
  margin: 0 auto;
  overflow: hidden;
  isolation: isolate;
  background: transparent;
}

.background {
  position: fixed;
  z-index: 0;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  object-fit: cover;
  object-position: center top;
  mask: url("/site-navigation/mask.svg") center / 100% 100% no-repeat;
}

.logo {
  position: absolute;
  top: var(--content-top);
  left: calc(79 * var(--design-pixel));
  width: calc(251 * var(--design-pixel));
  height: calc(56 * var(--design-pixel));
  object-fit: contain;
}

.site-panel {
  position: absolute;
  top: calc(var(--content-top) + 110 * var(--design-pixel));
  left: calc(38 * var(--design-pixel));
  display: flex;
  width: calc(363 * var(--design-pixel));
  flex-direction: column;
  gap: calc(20 * var(--design-pixel));
  padding: calc(30 * var(--design-pixel));
  border: calc(1 * var(--design-pixel)) solid #484848;
  border-radius: calc(30 * var(--design-pixel));
  background: rgb(255 255 255 / 12%);
  box-shadow: 0 calc(16 * var(--design-pixel)) calc(42 * var(--design-pixel))
    rgb(0 0 0 / 28%);
  backdrop-filter: blur(calc(4.75 * var(--design-pixel)));
}

.heading {
  display: flex;
  height: calc(24 * var(--design-pixel));
  align-items: center;
  justify-content: space-between;
  gap: calc(4 * var(--design-pixel));
}

.heading-line {
  min-width: 0;
  height: calc(1 * var(--design-pixel));
  flex: 1;
  background: url("/site-navigation/divider.svg") center / 100% 100% no-repeat;
}

.heading h1 {
  width: calc(137 * var(--design-pixel));
  margin: 0;
  flex: none;
  font-size: calc(20 * var(--design-pixel));
  font-weight: 500;
  line-height: normal;
  letter-spacing: calc(-0.3 * var(--design-pixel));
  text-align: center;
  white-space: nowrap;
}

.site-list {
  display: flex;
  flex-direction: column;
  gap: calc(20 * var(--design-pixel));
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: calc(330 * var(--design-pixel));
  overflow-y: auto;
  scrollbar-width: none;
}

.site-list::-webkit-scrollbar {
  display: none;
}

.site-button,
.confirm-button {
  display: flex;
  width: 100%;
  min-height: calc(44 * var(--design-pixel));
  height: calc(50 * var(--design-pixel));
  align-items: center;
  justify-content: center;
  gap: calc(8 * var(--design-pixel));
  padding: calc(9 * var(--design-pixel)) calc(24 * var(--design-pixel));
  border-radius: 999px;
  color: #fff;
  font: inherit;
  font-size: calc(16 * var(--design-pixel));
  line-height: calc(22 * var(--design-pixel));
  text-align: center;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(calc(2 * var(--design-pixel)));
}

.site-button {
  border: calc(1 * var(--design-pixel)) solid #61460f;
  background: #413a2c;
  color: #ffd98c;
  cursor: pointer;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    transform 120ms ease;
}

.site-button[aria-checked="true"] {
  border-color: #98690a;
  background: #98690a;
  color: #fff;
}

.site-button:disabled {
  border-color: #4d3e20;
  background: #2e2a23;
  color: #7b6f56;
  cursor: not-allowed;
  opacity: 0.72;
}

.site-button:active,
.confirm-button:active {
  transform: scale(0.985);
}

.site-button:focus-visible,
.confirm-button:focus-visible {
  outline: calc(2 * var(--design-pixel)) solid #fff;
  outline-offset: calc(2 * var(--design-pixel));
}

.confirm-button {
  border: 0;
  background: linear-gradient(90deg, #ae6c01 0%, #f3780e 100%);
  cursor: pointer;
}

.confirm-button img {
  width: calc(16 * var(--design-pixel));
  height: calc(16 * var(--design-pixel));
  flex: none;
}

@media (prefers-reduced-motion: reduce) {
  .site-button {
    transition: none;
  }
}
