/* ==========================================================================
   澳门主站 · 共享样式 /assets/site.css
   纵向叙事长卷 · 命令栏头部 · 框景与坐标索引
   ========================================================================== */

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--am-header-h) + 16px);
}

body,
h1, h2, h3, h4, h5, h6,
p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; }

ul, ol { padding: 0; list-style: none; }

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

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

a { color: inherit; text-decoration: none; }

table { border-collapse: collapse; width: 100%; }

input, textarea, select { font: inherit; color: inherit; }

/* ---------- 变量 ---------- */
:root {
  --am-ink: #0B0F14;
  --am-paper: #F4F1EA;
  --am-white: #FFFFFF;
  --am-tile: #1F4E9C;
  --am-deep: #0F2B5C;
  --am-gold: #C9A227;
  --am-coral: #E0664A;
  --am-slate: #6C7A89;
  --am-mist: #D8E3F0;
  --am-jade: #2E7D6B;

  --am-ink-soft: #2B333D;
  --am-line: rgba(11, 15, 20, 0.14);
  --am-line-strong: rgba(11, 15, 20, 0.28);
  --am-line-light: rgba(244, 241, 234, 0.16);

  --am-radius: 3px;
  --am-shadow-s: 0 1px 2px rgba(11, 15, 20, 0.05);
  --am-shadow-m: 0 18px 34px -24px rgba(11, 15, 20, 0.55);

  --am-header-h: 66px;
  --am-container: 1280px;

  --am-font-head: "LXGW WenKai", "霞鹜文楷", "Songti SC", "STSong", "Source Han Serif SC", Georgia, "Times New Roman", serif;
  --am-font-body: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --am-font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;

  --am-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 基础排版 ---------- */
body {
  background-color: var(--am-paper);
  color: var(--am-ink);
  font-family: var(--am-font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:focus-visible {
  outline: 2px solid var(--am-coral);
  outline-offset: 3px;
  border-radius: 1px;
}

::selection {
  background: var(--am-tile);
  color: var(--am-white);
}

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

/* ---------- 跳至主要内容 ---------- */
.am-skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 90;
  padding: 10px 18px;
  background: var(--am-coral);
  color: var(--am-white);
  font-size: 14px;
  font-weight: 600;
  border-radius: 2px;
  box-shadow: 0 10px 24px -14px rgba(11, 15, 20, 0.9);
  transition: top 0.18s var(--am-ease);
}

.am-skip:focus {
  top: 12px;
}

/* ==========================================================================
   头部命令栏
   ========================================================================== */
.am-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--am-ink);
  color: var(--am-paper);
  border-bottom: 1px solid var(--am-line-light);
  transition: box-shadow 0.24s var(--am-ease);
}

.am-header.is-scrolled {
  box-shadow: 0 18px 40px -28px rgba(0, 0, 0, 0.95);
}

.am-header__progress {
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: rgba(244, 241, 234, 0.1);
}

.am-header__progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--am-tile) 0%, var(--am-gold) 62%, var(--am-coral) 100%);
  transition: width 0.12s linear;
}

.am-header__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: var(--am-header-h);
}

/* 品牌 */
.am-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  min-width: 0;
}

.am-brand__mark {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 2px;
  background-color: var(--am-tile);
  background-image:
    linear-gradient(0deg, transparent 44%, rgba(244, 241, 234, 0.88) 44%, rgba(244, 241, 234, 0.88) 56%, transparent 56%),
    linear-gradient(90deg, transparent 44%, rgba(244, 241, 234, 0.88) 44%, rgba(244, 241, 234, 0.88) 56%, transparent 56%);
  background-size: 50% 50%;
  box-shadow: inset 0 0 0 1px rgba(244, 241, 234, 0.35);
}

.am-brand__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.am-brand__name {
  font-family: var(--am-font-head);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.08em;
  color: inherit;
}

.am-brand__tag {
  font-family: var(--am-font-mono);
  font-size: 10.5px;
  line-height: 1.3;
  letter-spacing: 0.16em;
  color: rgba(244, 241, 234, 0.55);
  white-space: nowrap;
}

/* 导航 */
.am-nav {
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
}

.am-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
}

.am-nav__item {
  flex: 0 0 auto;
}

.am-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 2px;
  font-size: 14.5px;
  color: rgba(244, 241, 234, 0.76);
  white-space: nowrap;
  transition: color 0.18s var(--am-ease), background-color 0.18s var(--am-ease), box-shadow 0.18s var(--am-ease);
}

.am-nav__link:hover {
  color: var(--am-white);
  background: rgba(244, 241, 234, 0.07);
}

.am-nav__index {
  font-family: var(--am-font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--am-gold);
  opacity: 0.72;
  transition: opacity 0.18s var(--am-ease);
}

.am-nav__label {
  white-space: nowrap;
}

.am-nav__link[aria-current="page"] {
  color: var(--am-white);
  background: rgba(31, 78, 156, 0.42);
  box-shadow: inset 0 -2px 0 var(--am-gold);
}

.am-nav__link[aria-current="page"] .am-nav__index {
  opacity: 1;
  color: var(--am-gold);
}

/* 右侧状态与移动按钮 */
.am-header__aside {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  flex: 0 0 auto;
}

.am-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--am-font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(244, 241, 234, 0.6);
  white-space: nowrap;
}

.am-status__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--am-jade);
  box-shadow: 0 0 0 3px rgba(46, 125, 107, 0.25);
  animation: am-pulse 2.6s var(--am-ease) infinite;
}

@keyframes am-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.82); }
}

.am-burger {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid rgba(244, 241, 234, 0.3);
  border-radius: 2px;
  color: var(--am-paper);
  font-family: var(--am-font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  transition: border-color 0.18s var(--am-ease), background-color 0.18s var(--am-ease);
}

.am-burger:hover {
  border-color: var(--am-gold);
  background: rgba(244, 241, 234, 0.06);
}

.am-burger__bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  width: 16px;
  height: 12px;
}

.am-burger__bars i {
  display: block;
  height: 1.5px;
  width: 100%;
  background: currentColor;
  transition: transform 0.22s var(--am-ease), opacity 0.22s var(--am-ease);
}

.am-burger[aria-expanded="true"] .am-burger__bars i:nth-child(1) {
  transform: translateY(4.5px) rotate(45deg);
}

.am-burger[aria-expanded="true"] .am-burger__bars i:nth-child(2) {
  opacity: 0;
}

.am-burger[aria-expanded="true"] .am-burger__bars i:nth-child(3) {
  transform: translateY(-4.5px) rotate(-45deg);
}

.am-burger__text {
  white-space: nowrap;
}

/* 头部响应式 */
@media (max-width: 1180px) {
  .am-nav__link { padding: 9px 9px; font-size: 14px; }
}

@media (max-width: 1040px) {
  .am-brand__tag { display: none; }
  .am-status { display: none; }
}

@media (max-width: 899px) {
  .am-burger { display: inline-flex; }

  .am-header__inner { gap: 12px; }

  .am-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--am-ink);
    border-top: 1px solid var(--am-line-light);
    border-bottom: 3px solid var(--am-tile);
    box-shadow: 0 30px 44px -28px rgba(0, 0, 0, 0.95);
    max-height: calc(100vh - var(--am-header-h));
    overflow-y: auto;
    padding: 6px 0 14px;
  }

  .am-nav[data-open] {
    display: block;
    animation: am-drop 0.22s var(--am-ease) both;
  }

  .am-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-inline: 8px;
  }

  .am-nav__link {
    width: 100%;
    padding: 14px 14px;
    font-size: 16px;
    border-radius: 0;
    border-bottom: 1px solid rgba(244, 241, 234, 0.09);
  }

  .am-nav__index {
    width: 26px;
    font-size: 11px;
  }

  .am-nav__link[aria-current="page"] {
    box-shadow: inset 3px 0 0 var(--am-gold);
    background: rgba(31, 78, 156, 0.3);
  }
}

@keyframes am-drop {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   页脚
   ========================================================================== */
.am-footer {
  position: relative;
  margin-top: clamp(48px, 7vw, 96px);
  background: var(--am-deep);
  color: rgba(244, 241, 234, 0.82);
}

.am-footer__band {
  height: 5px;
  background: linear-gradient(
    90deg,
    var(--am-gold) 0 18%,
    var(--am-coral) 18% 30%,
    var(--am-tile) 30% 78%,
    var(--am-jade) 78% 100%
  );
}

.am-footer__inner {
  padding-block: clamp(40px, 5vw, 64px) 26px;
}

.am-footer__top {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 2fr;
  gap: 40px;
  align-items: start;
}

.am-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.am-brand--footer .am-brand__name {
  color: var(--am-white);
  font-size: 20px;
}

.am-brand--footer .am-brand__tag {
  color: rgba(244, 241, 234, 0.6);
}

.am-brand--footer .am-brand__mark {
  box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0.6);
}

.am-footer__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.am-footer__coltitle {
  margin-bottom: 14px;
  font-family: var(--am-font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--am-gold);
}

.am-footer__links {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 14px;
}

.am-footer__link {
  display: inline-block;
  color: rgba(244, 241, 234, 0.78);
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--am-ease), border-color 0.18s var(--am-ease);
}

.am-footer__link:hover {
  color: var(--am-white);
  border-bottom-color: var(--am-coral);
}

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

.am-footer__contact {
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(244, 241, 234, 0.7);
  word-break: break-word;
}

.am-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 20px;
  margin-top: 38px;
  padding-top: 18px;
  border-top: 1px solid var(--am-line-light);
  font-family: var(--am-font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: rgba(244, 241, 234, 0.55);
}

.am-footer__icp,
.am-footer__meta {
  margin: 0;
}

@media (max-width: 900px) {
  .am-footer__top { grid-template-columns: 1fr; gap: 34px; }
}

@media (max-width: 640px) {
  .am-footer__cols { grid-template-columns: 1fr 1fr; gap: 24px; }
}

@media (max-width: 420px) {
  .am-footer__cols { grid-template-columns: 1fr; }
}

/* ==========================================================================
   通用容器与章节
   ========================================================================== */
.am-container {
  width: 100%;
  max-width: var(--am-container);
  margin-inline: auto;
  padding-inline: 24px;
}

@media (max-width: 640px) {
  .am-container { padding-inline: 16px; }
}

.am-section {
  position: relative;
  padding-block: clamp(48px, 7vw, 96px);
}

.am-section--tight {
  padding-block: clamp(28px, 4vw, 56px);
}

.am-section--band {
  background: var(--am-mist);
}

.am-section--paper {
  background: var(--am-white);
}

.am-section--dark {
  background: var(--am-deep);
  color: var(--am-paper);
}

.am-section--dark .am-lead,
.am-section--dark .am-text {
  color: rgba(244, 241, 234, 0.78);
}

.am-section__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: clamp(24px, 4vw, 40px);
  padding-top: 18px;
  border-top: 1px solid var(--am-line);
}

.am-section__head--light {
  border-top-color: var(--am-line-light);
}

/* ==========================================================================
   文字与索引
   ========================================================================== */
.am-index {
  font-family: var(--am-font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--am-gold);
  text-transform: uppercase;
}

.am-h1 {
  font-family: var(--am-font-head);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: 0.01em;
}

.am-h2 {
  font-family: var(--am-font-head);
  font-size: clamp(24px, 3.4vw, 44px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.am-h3 {
  font-family: var(--am-font-head);
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 600;
  line-height: 1.3;
}

.am-h4 {
  font-family: var(--am-font-body);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
}

.am-lead {
  max-width: 62ch;
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.8;
  color: var(--am-ink-soft);
}

.am-text {
  font-size: 16px;
  line-height: 1.75;
  color: var(--am-ink-soft);
}

.am-muted {
  color: var(--am-slate);
}

.am-mono {
  font-family: var(--am-font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
}

.am-rule {
  border: 0;
  border-top: 1px solid var(--am-line);
  margin-block: 32px;
}

/* ==========================================================================
   面包屑
   ========================================================================== */
.am-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 14px;
  font-family: var(--am-font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--am-slate);
}

.am-breadcrumb a {
  color: var(--am-slate);
  transition: color 0.18s var(--am-ease);
}

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

.am-breadcrumb__sep {
  color: rgba(11, 15, 20, 0.26);
}

/* ==========================================================================
   按钮
   ========================================================================== */
.am-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--am-font-body);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.18s var(--am-ease), background-color 0.18s var(--am-ease),
    border-color 0.18s var(--am-ease), color 0.18s var(--am-ease), box-shadow 0.18s var(--am-ease);
}

.am-btn:hover {
  transform: translateY(-2px);
}

.am-btn--primary {
  background: var(--am-tile);
  color: var(--am-white);
}

.am-btn--primary:hover {
  background: #1a4285;
  box-shadow: 0 14px 26px -18px rgba(31, 78, 156, 0.9);
}

.am-btn--coral {
  background: var(--am-coral);
  color: var(--am-white);
}

.am-btn--coral:hover {
  background: #c9543c;
  box-shadow: 0 14px 26px -18px rgba(224, 102, 74, 0.9);
}

.am-btn--gold {
  background: var(--am-gold);
  color: var(--am-ink);
}

.am-btn--gold:hover {
  background: #b8931f;
}

.am-btn--ghost {
  background: transparent;
  border-color: rgba(11, 15, 20, 0.28);
  color: var(--am-ink);
}

.am-btn--ghost:hover {
  border-color: var(--am-tile);
  color: var(--am-tile);
}

.am-btn--onDark {
  background: transparent;
  border-color: rgba(244, 241, 234, 0.34);
  color: var(--am-paper);
}

.am-btn--onDark:hover {
  border-color: var(--am-gold);
  color: var(--am-gold);
}

.am-btn--sm {
  padding: 8px 14px;
  font-size: 13px;
}

/* ==========================================================================
   网格
   ========================================================================== */
.am-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
}

.am-grid--12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
}

.am-span-3 { grid-column: span 3; }
.am-span-4 { grid-column: span 4; }
.am-span-5 { grid-column: span 5; }
.am-span-6 { grid-column: span 6; }
.am-span-7 { grid-column: span 7; }
.am-span-8 { grid-column: span 8; }
.am-span-12 { grid-column: span 12; }

@media (max-width: 1024px) {
  .am-grid--12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .am-span-3,
  .am-span-4,
  .am-span-5 { grid-column: span 3; }
  .am-span-7,
  .am-span-8 { grid-column: span 6; }
}

@media (max-width: 700px) {
  .am-grid--12 { grid-template-columns: 1fr; gap: 18px; }
  .am-span-3,
  .am-span-4,
  .am-span-5,
  .am-span-6,
  .am-span-7,
  .am-span-8,
  .am-span-12 { grid-column: span 1; }
}

/* ==========================================================================
   卡片
   ========================================================================== */
.am-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  background: var(--am-white);
  border: 1px solid rgba(11, 15, 20, 0.12);
  border-radius: var(--am-radius);
  box-shadow: var(--am-shadow-s);
  transition: transform 0.22s var(--am-ease), box-shadow 0.22s var(--am-ease), border-color 0.22s var(--am-ease);
}

.am-card:hover {
  transform: translateY(-4px);
  border-color: rgba(31, 78, 156, 0.5);
  box-shadow: var(--am-shadow-m);
}

.am-card--tile {
  border-top: 3px solid var(--am-tile);
}

.am-card--gold {
  border-top: 3px solid var(--am-gold);
}

.am-card--mist {
  background: var(--am-mist);
  border-color: rgba(31, 78, 156, 0.18);
}

.am-card__index {
  font-family: var(--am-font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--am-gold);
}

.am-card__title {
  font-family: var(--am-font-head);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--am-ink);
}

.am-card__desc {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--am-slate);
}

.am-card__foot {
  margin-top: auto;
  padding-top: 8px;
  font-family: var(--am-font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--am-tile);
}

/* ==========================================================================
   标签
   ========================================================================== */
.am-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid rgba(31, 78, 156, 0.2);
  border-radius: 999px;
  background: var(--am-mist);
  color: var(--am-deep);
  font-family: var(--am-font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  line-height: 1.6;
}

.am-tag--jade {
  background: rgba(46, 125, 107, 0.12);
  border-color: rgba(46, 125, 107, 0.3);
  color: #215c4f;
}

.am-tag--gold {
  background: rgba(201, 162, 39, 0.14);
  border-color: rgba(201, 162, 39, 0.36);
  color: #7d6314;
}

.am-tag--coral {
  background: rgba(224, 102, 74, 0.12);
  border-color: rgba(224, 102, 74, 0.3);
  color: #a8432c;
}

/* ==========================================================================
   图片容器基类（页面阶段放入 .am-media__img）
   ========================================================================== */
.am-media {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(11, 15, 20, 0.1);
  border-radius: var(--am-radius);
  background-color: var(--am-mist);
  background-image:
    linear-gradient(0deg, transparent 48%, rgba(31, 78, 156, 0.14) 48%, rgba(31, 78, 156, 0.14) 52%, transparent 52%),
    linear-gradient(90deg, transparent 48%, rgba(31, 78, 156, 0.14) 48%, rgba(31, 78, 156, 0.14) 52%, transparent 52%);
  background-size: 44px 44px;
}

.am-media::before {
  content: "";
  display: block;
  padding-top: var(--am-ratio, 75%);
}

.am-media--wide { --am-ratio: 56.25%; }
.am-media--tall { --am-ratio: 75%; }
.am-media--super { --am-ratio: 133%; }
.am-media--square { --am-ratio: 100%; }

.am-media__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.am-media__cap {
  position: absolute;
  left: 0;
  bottom: 0;
  max-width: 100%;
  padding: 8px 12px;
  background: rgba(11, 15, 20, 0.78);
  color: var(--am-paper);
  font-family: var(--am-font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

/* ==========================================================================
   装饰：框景、色带、坐标、图例、瓷砖底纹
   ========================================================================== */
.am-frame {
  position: relative;
  border: 1px solid rgba(11, 15, 20, 0.16);
  background: var(--am-white);
}

.am-frame::before,
.am-frame::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--am-gold);
  pointer-events: none;
}

.am-frame::before {
  top: -1px;
  left: -1px;
  border-right: 0;
  border-bottom: 0;
}

.am-frame::after {
  right: -1px;
  bottom: -1px;
  border-left: 0;
  border-top: 0;
}

.am-band {
  height: 5px;
  background: linear-gradient(
    90deg,
    var(--am-tile) 0 40%,
    var(--am-deep) 40% 65%,
    var(--am-gold) 65% 85%,
    var(--am-coral) 85% 100%
  );
}

.am-coord {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 18px;
  padding-top: 8px;
  border-top: 1px dashed rgba(11, 15, 20, 0.2);
  font-family: var(--am-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--am-slate);
}

.am-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-family: var(--am-font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--am-slate);
}

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

.am-legend__swatch {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: var(--am-tile);
  box-shadow: inset 0 0 0 1px rgba(11, 15, 20, 0.15);
}

.am-legend__swatch--gold { background: var(--am-gold); }
.am-legend__swatch--coral { background: var(--am-coral); }
.am-legend__swatch--jade { background: var(--am-jade); }
.am-legend__swatch--mist { background: var(--am-mist); }

.am-tilepat {
  background-color: var(--am-tile);
  background-image:
    linear-gradient(0deg, transparent 45%, rgba(244, 241, 234, 0.35) 45%, rgba(244, 241, 234, 0.35) 55%, transparent 55%),
    linear-gradient(90deg, transparent 45%, rgba(244, 241, 234, 0.35) 45%, rgba(244, 241, 234, 0.35) 55%, transparent 55%);
  background-size: 40px 40px;
}

/* ==========================================================================
   显现、目录高亮与返回顶部
   ========================================================================== */
.am-js .am-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--am-ease), transform 0.5s var(--am-ease);
}

.am-js .am-reveal.is-in {
  opacity: 1;
  transform: none;
}

[data-section-link] {
  cursor: pointer;
}

[data-section-link].is-active {
  color: var(--am-tile);
}

.am-backtop {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 55;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(244, 241, 234, 0.24);
  border-radius: 2px;
  background: var(--am-ink);
  color: var(--am-paper);
  font-family: var(--am-font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  box-shadow: 0 16px 30px -18px rgba(11, 15, 20, 0.95);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.22s var(--am-ease), transform 0.22s var(--am-ease), visibility 0.22s var(--am-ease), border-color 0.22s var(--am-ease);
}

.am-backtop.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

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

@media (max-width: 640px) {
  .am-backtop {
    right: 14px;
    bottom: 14px;
    width: 44px;
    height: 44px;
  }
}

/* ==========================================================================
   降低动效偏好
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  .am-js .am-reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .am-btn:hover,
  .am-card:hover {
    transform: none;
  }

  .am-backtop {
    transform: none;
  }
}
