:root {
  --bg-deep: #0A0A0F;
  --bg-card: #1A1A24;
  --gold: #FF8C00;
  --gold-light: #FFC270;
  --blue: #00BFFF;
  --text-main: #F5F5F5;
  --text-muted: #B0B0B8;
  --line: #2A2A3A;
  --success: #00E5A0;
  --font-display: Impact, "Arial Black", "Noto Sans SC", "PingFang SC", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Courier New", monospace;
  --container: 1200px;
  --container-narrow: 840px;
  --header-h: 76px;
  --radius: 12px;
  --shadow: 0 14px 38px rgba(0, 0, 0, 0.4);
  --grid-size: 44px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-main);
  background-color: var(--bg-deep);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 140, 0, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 140, 0, 0.035) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  pointer-events: none;
}

img, svg, video {
  max-width: 100%;
  display: block;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.25s ease;
}

a:hover {
  color: var(--gold);
}

ul, ol {
  list-style: none;
}

button {
  font: inherit;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: rgba(255, 140, 0, 0.35);
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 140, 0, 0.4);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 1001;
  padding: 12px 24px;
  background: var(--gold);
  color: var(--bg-deep);
  font-weight: 700;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(255, 140, 0, 0.35);
  transition: top 0.25s ease;
}

.skip-link:focus {
  top: 16px;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  box-shadow: 0 1px 6px rgba(255, 140, 0, 0.45);
  pointer-events: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 2;
  background: linear-gradient(90deg, var(--gold) 0%, var(--blue) 70%, transparent 130%);
  pointer-events: none;
}

.site-header__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  z-index: 102;
}

.site-brand:hover {
  color: var(--text-main);
}

.site-brand__name {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}

.site-brand__cn {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--text-main);
}

.site-brand__en {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.34em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}

.dice {
  display: inline-block;
  flex-shrink: 0;
  background-color: var(--bg-card);
  background-image:
    radial-gradient(circle, var(--gold) 0 1.75px, transparent 2.25px),
    radial-gradient(circle, var(--gold) 0 1.75px, transparent 2.25px),
    radial-gradient(circle, var(--gold) 0 1.75px, transparent 2.25px),
    radial-gradient(circle, var(--gold) 0 1.75px, transparent 2.25px),
    radial-gradient(circle, var(--gold) 0 1.75px, transparent 2.25px);
  background-repeat: no-repeat;
  background-size: 7px 7px;
  background-position:
    25% 25%,
    75% 25%,
    50% 50%,
    25% 75%,
    75% 75%;
  border: 1px solid rgba(255, 140, 0, 0.55);
  border-radius: 6px;
  box-shadow: 0 0 14px rgba(255, 140, 0, 0.18), inset 0 0 8px rgba(0, 0, 0, 0.6);
}

.dice--md {
  width: 30px;
  height: 30px;
  transform: rotate(45deg);
  transition: transform 0.5s var(--ease);
}

.site-brand:hover .dice--md {
  transform: rotate(225deg);
}

.dice--sm {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  transform: rotate(45deg);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav__item {
  position: relative;
}

.site-nav__link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.25s ease;
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.site-nav__link:hover {
  color: var(--gold);
}

.site-nav__link:hover::after,
.site-nav__link[aria-current="page"]::after {
  transform: scaleX(1);
}

.site-nav__link[aria-current="page"] {
  color: var(--gold);
}

.site-nav__index {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.site-nav__link:hover .site-nav__index {
  color: var(--gold);
}

.site-nav__cta {
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  padding-left: 28px;
  padding-right: 28px;
  margin-left: 6px;
}

.site-nav-toggle {
  display: none;
  position: relative;
  z-index: 102;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  transition: border-color 0.25s ease;
}

.site-nav-toggle:hover {
  border-color: var(--gold);
}

.site-nav-toggle__line {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--text-main);
  transition: transform 0.3s var(--ease), opacity 0.25s ease, background 0.25s ease;
}

.site-nav-toggle:hover .site-nav-toggle__line {
  background: var(--gold);
}

.site-nav-toggle[aria-expanded="true"] .site-nav-toggle__line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.site-nav-toggle[aria-expanded="true"] .site-nav-toggle__line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0.2);
}

.site-nav-toggle[aria-expanded="true"] .site-nav-toggle__line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 991px) {
  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 99;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 16px 24px 32px;
    background: rgba(10, 10, 15, 0.97);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), visibility 0s linear 0.3s;
  }

  .site-nav[data-open] {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), visibility 0s;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    border-top: 1px solid var(--line);
  }

  .site-nav__item {
    border-bottom: 1px solid var(--line);
  }

  .site-nav__link {
    padding: 14px 10px;
    font-size: 1.05rem;
    justify-content: space-between;
  }

  .site-nav__link::after {
    display: none;
  }

  .site-nav__link[aria-current="page"] {
    background: rgba(255, 140, 0, 0.07);
  }

  .site-nav__cta {
    margin-top: 20px;
    width: 100%;
    clip-path: none;
    border-radius: 8px;
  }

  .site-nav-toggle {
    display: inline-flex;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.4;
  border-radius: 8px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.2s var(--ease);
}

.btn--gold {
  background: var(--gold);
  color: var(--bg-deep);
  border: 1px solid transparent;
}

.btn--gold::after {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 50%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s var(--ease);
}

.btn--gold:hover {
  background: var(--gold-light);
  color: var(--bg-deep);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(255, 140, 0, 0.3);
}

.btn--gold:hover::after {
  left: 130%;
}

.btn--ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-main);
}

.btn--ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(255, 140, 0, 0.08);
}

.btn--blue {
  background: var(--blue);
  color: var(--bg-deep);
  border: 1px solid transparent;
}

.btn--blue:hover {
  background: #4ED2FF;
  color: var(--bg-deep);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 191, 255, 0.3);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: 64px;
}

.section--tight {
  padding-block: 32px;
}

.heading-display {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 4.5rem);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.heading-1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.heading-2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  text-wrap: balance;
}

.heading-3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  text-wrap: balance;
}

.heading-4 {
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.45;
}

.meta-text {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-muted);
  padding-top: 24px;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--gold);
}

.breadcrumb__sep {
  color: var(--line);
  font-family: var(--font-mono);
  font-size: 0.75em;
}

.breadcrumb [aria-current="page"] {
  color: var(--gold);
}

.page-heading {
  padding: 48px 0 32px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.page-heading__title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.01em;
  margin-bottom: 10px;
  text-wrap: balance;
}

.page-heading__title::before {
  content: attr(data-index);
  display: block;
  font-family: var(--font-mono);
  font-size: 0.35em;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: 0.3em;
  margin-bottom: 8px;
}

.page-heading__meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  position: relative;
}

.panel--diag::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 42px;
  height: 42px;
  clip-path: polygon(0 0, 100% 0, 0 100%);
  background: rgba(255, 140, 0, 0.9);
  border-radius: 0 0 0 10px;
}

.panel--glow {
  border-color: rgba(255, 140, 0, 0.3);
  box-shadow: 0 0 32px rgba(255, 140, 0, 0.07), var(--shadow);
}

.prose {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text-main);
}

.prose p {
  margin-bottom: 1.5em;
}

.prose a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.prose a:hover {
  color: var(--gold);
}

.prose h2,
.prose h3,
.prose h4 {
  font-weight: 700;
  margin-top: 2em;
  margin-bottom: 0.8em;
  text-wrap: balance;
}

.prose h2 {
  font-size: 1.5rem;
}

.prose h3 {
  font-size: 1.2rem;
}

.prose h4 {
  font-size: 1.05rem;
}

.prose ul,
.prose ol {
  margin-bottom: 1.5em;
}

.prose ul li {
  position: relative;
  padding-left: 1.2em;
  margin-bottom: 0.4em;
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
}

.prose ol {
  padding-left: 1.4em;
}

.prose ol li {
  list-style: decimal-leading-zero;
  margin-bottom: 0.4em;
}

.prose ol li::marker {
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 0.8em;
}

.grid {
  display: grid;
  gap: 24px;
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.index-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-transform: uppercase;
  padding: 2px 0;
  border-bottom: 1px solid rgba(255, 140, 0, 0.35);
  margin-bottom: 12px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.legend__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend__dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--gold);
}

.legend__dot--blue {
  background: var(--blue);
}

.legend__dot--green {
  background: var(--success);
}

.stat {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.stat__value {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.stat__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-muted);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.tag:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2em 0;
}

.divider--gold {
  width: 120px;
  border-top-color: rgba(255, 140, 0, 0.45);
}

.toc-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  font-size: 0.9rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.25s ease;
}

.toc-link:hover {
  color: var(--gold);
  border-color: rgba(255, 140, 0, 0.4);
}

.toc-link.is-active {
  color: var(--gold);
  border-color: rgba(255, 140, 0, 0.55);
  background: rgba(255, 140, 0, 0.08);
  box-shadow: 0 0 14px rgba(255, 140, 0, 0.15);
}

.img-frame {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #1A1A24 0%, #2A2A3A 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.img-frame::before {
  content: "";
  display: block;
  padding-top: 56.25%;
}

.img-frame--square::before {
  padding-top: 100%;
}

.img-frame--portrait::before {
  padding-top: 133%;
}

.img-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.img-frame:hover img {
  transform: scale(1.04);
}

.img-frame__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px) rotate(0.5deg);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.js [data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0) rotate(0deg);
}

.site-footer {
  position: relative;
  margin-top: 80px;
  border-top: 1px solid var(--line);
  background:
    linear-gradient(to bottom, rgba(10, 10, 15, 0.96), rgba(10, 10, 15, 0.995)),
    var(--bg-deep);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 1;
  background: linear-gradient(90deg, var(--gold), transparent 60%);
  pointer-events: none;
}

.site-footer::after {
  content: "OUHUANG";
  position: absolute;
  right: -30px;
  bottom: -40px;
  font-family: var(--font-display);
  font-size: clamp(5rem, 12vw, 12rem);
  font-weight: 900;
  color: rgba(255, 140, 0, 0.035);
  letter-spacing: 0.04em;
  line-height: 1;
  pointer-events: none;
  white-space: nowrap;
  z-index: 0;
}

.site-footer__grid {
  max-width: var(--container);
  margin-inline: auto;
  padding: 56px 24px 36px;
  display: grid;
  grid-template-columns: 4fr 3fr 4fr;
  gap: 48px;
  position: relative;
  z-index: 1;
}

.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
  margin-bottom: 14px;
}

.site-footer__brand:hover {
  color: var(--text-main);
}

.site-footer__brandtext {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.site-footer__brandtext strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.site-footer__brandtext span {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.34em;
  color: var(--text-muted);
  margin-top: 2px;
}

.site-footer__saying {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--gold);
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}

.site-footer__trust {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 36em;
}

.site-footer__links ul,
.site-footer__notice ul {
  margin: 0;
}

.site-footer__links li,
.site-footer__notice li {
  margin-bottom: 8px;
}

.site-footer__links a,
.site-footer__notice a,
.site-footer__links span,
.site-footer__notice span {
  display: inline-block;
  font-size: 0.925rem;
  color: var(--text-muted);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.site-footer__links a:hover,
.site-footer__notice a:hover {
  color: var(--gold);
  padding-left: 6px;
}

.site-footer__title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
}

.site-footer__title::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--gold);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  margin-right: 10px;
  flex-shrink: 0;
}

.site-footer__bottom {
  border-top: 1px solid var(--line);
  position: relative;
  z-index: 1;
}

.site-footer__bottom-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 18px 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 95;
  width: 54px;
  height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text-muted);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0s linear 0.3s, border-color 0.3s ease, box-shadow 0.3s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0s;
}

.back-to-top:hover {
  border-color: var(--gold);
  box-shadow: 0 0 24px rgba(255, 140, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.5);
}

.back-to-top__dice {
  width: 18px;
  height: 18px;
  display: block;
  background-color: var(--bg-card);
  background-image:
    radial-gradient(circle, var(--gold) 0 1.2px, transparent 1.6px),
    radial-gradient(circle, var(--gold) 0 1.2px, transparent 1.6px),
    radial-gradient(circle, var(--gold) 0 1.2px, transparent 1.6px),
    radial-gradient(circle, var(--gold) 0 1.2px, transparent 1.6px),
    radial-gradient(circle, var(--gold) 0 1.2px, transparent 1.6px);
  background-repeat: no-repeat;
  background-size: 5px 5px;
  background-position:
    25% 25%,
    75% 25%,
    50% 50%,
    25% 75%,
    75% 75%;
  border: 1px solid var(--gold);
  border-radius: 4px;
  transform: rotate(45deg);
  transition: transform 0.4s var(--ease);
}

.back-to-top:hover .back-to-top__dice {
  transform: rotate(225deg);
}

.back-to-top__label {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.18em;
  color: var(--gold);
}

@media (max-width: 991px) {
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .site-footer__info {
    grid-column: 1 / -1;
  }

  .site-footer::after {
    font-size: 8rem;
  }
}

@media (max-width: 767px) {
  :root {
    --header-h: 64px;
  }

  .container,
  .site-header__inner {
    padding-inline: 16px;
  }

  .site-header__inner {
    gap: 12px;
  }

  .section {
    padding-block: 40px;
  }

  .panel {
    padding: 20px;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
    padding: 40px 16px 28px;
    gap: 32px;
  }

  .site-footer__info {
    grid-column: auto;
  }

  .site-footer__bottom-inner {
    padding: 16px;
  }

  .site-footer::after {
    font-size: 5.5rem;
    right: -10px;
    bottom: -20px;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 48px;
    height: 48px;
  }

  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

  .heading-display {
    font-size: clamp(2.4rem, 11vw, 3.2rem);
  }

  .heading-1 {
    font-size: clamp(1.8rem, 8vw, 2.4rem);
  }

  .btn {
    width: auto;
  }

  .site-nav__cta {
    width: 100%;
  }

  .page-heading {
    padding: 32px 0 24px;
    margin-bottom: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .site-brand__dice,
  .back-to-top__dice {
    transform: rotate(45deg);
  }

  .btn--gold::after {
    display: none;
  }

  .site-nav__link::after,
  .site-nav__link:hover::after,
  .site-nav__link[aria-current="page"]::after {
    transform: scaleX(1);
  }
}
