/* ==========================================================================
   神秘猪灵 PiguinL · 个人档案
   灵感：Minecraft 堡垒遗迹 × 明日方舟式战术档案界面
   纹理：Minecraft Wiki / Mojang Studios（黑石、镶金黑石、金块、黑石砖）
   ========================================================================== */

:root {
  --bg: #070909;
  --bg-deep: #050707;
  --bg-soft: #0a0d0d;
  --panel: #0d1111;
  --panel-2: #121717;
  --panel-3: #171d1c;
  --ivory: #ece9dd;
  --white: #f7f3e7;
  --muted: #969b92;
  --dim: #62685f;
  --gold: #d6a13b;
  --gold-light: #f4c968;
  --gold-deep: #805b1d;
  --danger: #d96f5c;
  --line: rgba(235, 231, 218, 0.1);
  --line-strong: rgba(235, 231, 218, 0.22);
  --gold-line: rgba(214, 161, 59, 0.4);
  --header-h: 76px;
  --shell: 1200px;
  --cut: 12px;
  --font-body: "Noto Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-display: "Arial Black", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 78% 0%, rgba(214, 161, 59, 0.06), transparent 30rem),
    var(--bg);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.nav-open {
  overflow: hidden;
}

body.dialog-open {
  overflow: hidden;
}

::selection {
  background: var(--gold);
  color: #0b0d0d;
}

h1,
h2,
h3,
h4,
p,
dl,
dd,
ol,
ul {
  margin: 0;
}

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

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

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

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

code {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.shell {
  width: min(var(--shell), calc(100% - 80px));
  margin-inline: auto;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 19px;
  height: 19px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-small {
  width: 13px;
  height: 13px;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mono-label b {
  color: var(--gold);
  font-weight: 700;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--gold);
  color: #090b0b;
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* -------------------------------------------------------------------------- */
/* 按钮 / 文本链接                                                            */
/* -------------------------------------------------------------------------- */

.btn {
  position: relative;
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 0;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--ivory);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
  transition: transform 0.16s ease, background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.btn::after {
  position: absolute;
  right: 8px;
  bottom: 5px;
  width: 4px;
  height: 4px;
  background: currentColor;
  content: "";
  opacity: 0.45;
}

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

.btn-primary {
  background: var(--gold);
  box-shadow: inset 0 0 0 1px var(--gold-light);
  color: #11130f;
}

.btn-primary:hover {
  background: var(--gold-light);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.btn-ghost:hover {
  color: var(--gold-light);
  box-shadow: inset 0 0 0 1px var(--gold);
}

.btn-dark {
  background: #151817;
  box-shadow: inset 0 0 0 1px rgba(20, 22, 18, 0.35);
  color: var(--ivory);
}

.btn-small {
  min-height: 40px;
  padding-inline: 14px;
  font-size: 11px;
}

.btn-sub {
  margin-left: 4px;
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.1em;
  opacity: 0.55;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.16s ease;
}

.text-link:hover {
  color: var(--gold-light);
}

.text-btn {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease;
}

.text-btn .icon {
  width: 14px;
  height: 14px;
}

.text-btn:hover {
  border-color: var(--gold);
  background: rgba(214, 161, 59, 0.08);
  color: var(--gold-light);
}

.text-btn.is-loading .icon {
  animation: spin 0.8s linear infinite;
}

.icon-btn {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.icon-btn .icon {
  width: 16px;
  height: 16px;
}

.icon-btn:hover {
  border-color: var(--line-strong);
  background: var(--panel-3);
  color: var(--ivory);
}

button:disabled,
.icon-btn:disabled {
  opacity: 0.4;
  cursor: progress;
  pointer-events: none;
}

/* -------------------------------------------------------------------------- */
/* 顶部导航                                                                   */
/* -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 90;
  height: var(--header-h);
  border-bottom: 1px solid rgba(214, 161, 59, 0.26);
  background: rgba(6, 8, 8, 0.92);
  backdrop-filter: blur(16px);
}

.header-texture {
  position: absolute;
  inset: 0;
  background-image: url("../img/blocks/blackstone.png");
  background-size: 96px 96px;
  image-rendering: pixelated;
  opacity: 0.12;
  mask-image: linear-gradient(90deg, #000, transparent 58%);
  pointer-events: none;
}

.site-header::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 18%, rgba(214, 161, 59, 0.1) 60%, transparent);
  content: "";
  opacity: 0.65;
}

.header-inner {
  position: relative;
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 11px;
}

.brand-icon {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(214, 161, 59, 0.5);
  background: #0b0e0d;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.brand-icon img {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

.brand-icon i {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 6px;
  height: 6px;
  background: var(--gold);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-copy strong {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.brand-copy span {
  margin-top: 4px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.brand-copy b {
  color: var(--gold);
  font-weight: 700;
}

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

.nav-link {
  position: relative;
  display: inline-flex;
  height: 36px;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.nav-link span {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.nav-link:hover {
  color: var(--ivory);
}

.nav-link.is-active {
  background: rgba(214, 161, 59, 0.09);
  color: var(--gold-light);
}

.nav-link.is-active span {
  color: var(--gold);
}

.nav-link.is-active::after {
  position: absolute;
  right: 10px;
  bottom: 2px;
  left: 10px;
  height: 1px;
  background: var(--gold);
  content: "";
}

.nav-bili {
  display: inline-flex;
  height: 36px;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  color: var(--ivory);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease;
}

.nav-bili .icon {
  width: 14px;
  height: 14px;
}

.nav-bili:hover {
  border-color: var(--gold);
  background: var(--gold);
  color: #10120e;
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ivory);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.menu-toggle .icon {
  width: 17px;
  height: 17px;
}

/* 进度条 / 侧边栏 ---------------------------------------------------------- */

.scroll-progress {
  position: fixed;
  top: var(--header-h);
  right: 0;
  left: 0;
  z-index: 88;
  height: 2px;
  background: rgba(235, 231, 218, 0.06);
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-light));
  box-shadow: 0 0 12px rgba(214, 161, 59, 0.55);
}

.section-rail {
  position: fixed;
  top: 50%;
  right: 20px;
  z-index: 65;
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 7px;
  transform: translateY(-50%);
}

.rail-caption,
.rail-code {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.14em;
  writing-mode: vertical-rl;
}

.rail-caption {
  margin-bottom: 12px;
  color: var(--gold-deep);
}

.rail-code {
  margin-top: 12px;
  opacity: 0.65;
}

.rail-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 8px;
  transition: color 0.16s ease;
}

.rail-link span {
  width: 14px;
  text-align: right;
}

.rail-link i {
  width: 10px;
  height: 1px;
  background: var(--line-strong);
  transition: width 0.2s ease, background-color 0.2s ease;
}

.rail-link em {
  overflow: hidden;
  max-width: 0;
  font-style: normal;
  opacity: 0;
  transition: max-width 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
}

.rail-link:hover,
.rail-link.is-active {
  color: var(--gold-light);
}

.rail-link:hover em,
.rail-link.is-active em {
  max-width: 54px;
  opacity: 1;
}

.rail-link.is-active i {
  width: 22px;
  background: var(--gold);
}

/* -------------------------------------------------------------------------- */
/* 首屏                                                                       */
/* -------------------------------------------------------------------------- */

.scroll-section {
  position: relative;
}

.hero {
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  overflow: hidden;
  padding: calc(var(--header-h) + 42px) 0 24px;
  background: var(--bg-soft);
}

.hero-bg,
.section-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(7, 9, 9, 0.98) 0%, rgba(7, 9, 9, 0.86) 42%, rgba(7, 9, 9, 0.34) 72%, rgba(7, 9, 9, 0.72) 100%),
    linear-gradient(180deg, rgba(7, 9, 9, 0.15), transparent 28%, transparent 72%, rgba(7, 9, 9, 0.86));
  content: "";
}

.hero-layer {
  position: absolute;
  image-rendering: pixelated;
}

.hero-layer-stone {
  inset: 0;
  background-image: url("../img/blocks/blackstone.png");
  background-size: 128px 128px;
  opacity: 0.55;
  transform: translate3d(0, var(--hero-shift, 0px), 0) scale(1.04);
}

.hero-layer-bricks {
  top: -5%;
  right: -4%;
  bottom: -5%;
  width: 43%;
  background-image: url("../img/blocks/polished_blackstone_bricks.png");
  background-size: 96px 96px;
  opacity: 0.22;
  mask-image: linear-gradient(90deg, transparent, #000 32%, #000);
}

.hero-glow {
  position: absolute;
  top: 14%;
  right: 9%;
  width: 530px;
  height: 530px;
  background: radial-gradient(circle, rgba(214, 161, 59, 0.25), rgba(214, 161, 59, 0.05) 44%, transparent 68%);
  filter: blur(12px);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(236, 233, 221, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(236, 233, 221, 0.05) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at 66% 44%, #000 0%, transparent 72%);
  opacity: 0.65;
}

.hero-mark {
  position: absolute;
  top: -80px;
  right: 42px;
  color: transparent;
  font-family: var(--font-display);
  font-size: 410px;
  font-weight: 900;
  letter-spacing: -0.12em;
  line-height: 1;
  opacity: 0.32;
  -webkit-text-stroke: 1px rgba(236, 233, 221, 0.09);
}

.hero-hazard {
  position: absolute;
  top: 18%;
  bottom: 18%;
  left: 0;
  width: 3px;
  background: repeating-linear-gradient(
    -45deg,
    var(--gold) 0 4px,
    transparent 4px 10px
  );
  opacity: 0.5;
}

.hero-layout {
  position: relative;
  z-index: 2;
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 1fr) 350px;
  align-items: center;
  gap: clamp(44px, 6vw, 86px);
}

.hero-copy {
  min-width: 0;
  animation: heroIn 0.8s cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.tech-line {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1.5;
}

.tech-index {
  color: var(--gold);
}

.tech-line i {
  width: 38px;
  height: 1px;
  flex: none;
  background: var(--line-strong);
}

.hero-overline {
  margin-top: 24px;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.hero-overline b {
  color: var(--dim);
  font-weight: 400;
}

.hero h1 {
  display: flex;
  flex-direction: column;
  margin: 18px 0 23px;
}

.hero-name {
  width: fit-content;
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(4.2rem, 8vw, 7.25rem);
  font-weight: 900;
  letter-spacing: -0.075em;
  line-height: 0.92;
}

.hero-latin {
  position: relative;
  width: fit-content;
  margin-top: 13px;
  padding-left: 5px;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1;
}

.hero-latin::before {
  position: absolute;
  top: 50%;
  left: -34px;
  width: 22px;
  height: 1px;
  background: var(--gold);
  content: "";
}

.hero-lead {
  max-width: 530px;
  color: #b9beb3;
  font-size: 14px;
  line-height: 1.95;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 27px;
}

.hero-meta {
  display: flex;
  max-width: 600px;
  margin-top: 37px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.hero-meta > div {
  flex: 1;
  min-width: 0;
  padding-right: 18px;
}

.hero-meta > div + div {
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.hero-meta dt {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.hero-meta dd {
  margin-top: 5px;
  color: var(--ivory);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.hero-meta dd a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--gold);
}

.hero-meta dd a:hover {
  color: var(--gold-light);
}

/* 角色卡 ------------------------------------------------------------------ */

.operator-wrap {
  width: 100%;
  max-width: 350px;
  justify-self: end;
  animation: operatorIn 0.95s 0.1s cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.operator-card {
  position: relative;
  z-index: 1;
  background:
    linear-gradient(160deg, rgba(7, 9, 9, 0.65), rgba(7, 9, 9, 0.94)),
    url("../img/blocks/blackstone.png");
  background-size: auto, 96px 96px;
  box-shadow:
    inset 0 0 0 1px var(--gold-line),
    14px 14px 0 rgba(0, 0, 0, 0.3);
  clip-path: polygon(
    0 0,
    calc(100% - var(--cut)) 0,
    100% var(--cut),
    100% 100%,
    var(--cut) 100%,
    0 calc(100% - var(--cut))
  );
  transform: translate3d(0, var(--operator-shift, 0px), 0);
}

.operator-card::before {
  position: absolute;
  top: -1px;
  right: 26px;
  left: 20px;
  height: 2px;
  background: var(--gold);
  content: "";
  opacity: 0.8;
}

.operator-card::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 72px;
  height: 72px;
  background: linear-gradient(225deg, rgba(214, 161, 59, 0.11), transparent 62%);
  content: "";
  pointer-events: none;
}

.operator-head,
.operator-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.operator-head {
  height: 38px;
  padding: 0 13px;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.operator-head b {
  color: var(--gold);
  font-weight: 700;
}

.signal {
  display: flex;
  gap: 3px;
}

.signal i {
  width: 4px;
  height: 4px;
  background: var(--dim);
}

.signal i:first-child {
  background: var(--gold);
}

.signal i:last-child {
  background: #586a52;
}

.operator-visual {
  position: relative;
  aspect-ratio: 2 / 3;
  margin: 11px;
  overflow: hidden;
  border: 1px solid rgba(236, 233, 221, 0.14);
  background:
    radial-gradient(circle at 50% 42%, rgba(214, 161, 59, 0.15), transparent 62%),
    #0a0d0c;
}

.operator-visual::before {
  position: absolute;
  top: 11%;
  left: 9%;
  width: 82%;
  aspect-ratio: 1;
  border: 1px solid rgba(214, 161, 59, 0.22);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 161, 59, 0.11), transparent 67%);
  content: "";
}

.operator-visual::after {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    transparent 0 3px,
    rgba(7, 9, 9, 0.14) 3px 4px
  );
  content: "";
  pointer-events: none;
}

.operator-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(236, 233, 221, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(236, 233, 221, 0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, #000, transparent 86%);
}

.profile-image {
  position: absolute;
  inset: 4%;
  z-index: 2;
  width: 92%;
  height: 92%;
  object-fit: contain;
  filter: drop-shadow(0 16px 14px rgba(0, 0, 0, 0.4));
}

.operator-index {
  position: absolute;
  right: 7px;
  bottom: 8px;
  z-index: 1;
  color: transparent;
  font-family: var(--font-display);
  font-size: 92px;
  font-weight: 900;
  letter-spacing: -0.1em;
  line-height: 1;
  opacity: 0.4;
  -webkit-text-stroke: 1px rgba(236, 233, 221, 0.12);
}

.operator-stamp {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  padding: 5px 6px;
  border: 1px solid rgba(214, 161, 59, 0.55);
  background: rgba(7, 9, 9, 0.72);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-align: center;
}

.operator-vertical {
  position: absolute;
  bottom: 12px;
  left: 8px;
  z-index: 3;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 0.13em;
  writing-mode: vertical-rl;
}

.operator-visual .corner {
  z-index: 3;
}

.operator-foot {
  min-height: 52px;
  padding: 0 13px;
  border-top: 1px solid var(--line);
}

.operator-foot > div {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.operator-foot strong {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.operator-foot span {
  margin-top: 3px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 0.11em;
}

.operator-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.operator-link:hover {
  color: var(--gold-light);
}

.operator-caption {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 11px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.operator-caption i {
  height: 1px;
  flex: 1;
  background: var(--line);
}

.operator-caption span:last-child {
  color: var(--gold-deep);
}

.corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--gold);
  border-style: solid;
  opacity: 0.75;
  pointer-events: none;
}

.corner-tl {
  top: 8px;
  left: 8px;
  border-width: 1px 0 0 1px;
}

.corner-tr {
  top: 8px;
  right: 8px;
  border-width: 1px 1px 0 0;
}

.corner-bl {
  bottom: 8px;
  left: 8px;
  border-width: 0 0 1px 1px;
}

.corner-br {
  right: 8px;
  bottom: 8px;
  border-width: 0 1px 1px 0;
}

/* 首屏底部 ---------------------------------------------------------------- */

.hero-floor {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 34px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.material-index {
  display: flex;
  align-items: center;
  gap: 19px;
}

.material-title {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.material-title b {
  color: var(--gold);
  font-weight: 700;
}

.material-list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.material-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.04em;
}

.block-swatch {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(236, 233, 221, 0.18);
  image-rendering: pixelated;
  box-shadow: inset -2px -2px 0 rgba(0, 0, 0, 0.12);
}

.block-blackstone {
  background-image: url("../img/blocks/blackstone.png");
  background-size: 16px 16px;
}

.block-gilded {
  background-image: url("../img/blocks/gilded_blackstone.png");
  background-size: 16px 16px;
}

.block-gold {
  background-image: url("../img/blocks/gold_block.png");
  background-size: 16px 16px;
}

.block-bricks {
  background-image: url("../img/blocks/polished_blackstone_bricks.png");
  background-size: 16px 16px;
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.1em;
  transition: color 0.16s ease;
}

.scroll-cue:hover {
  color: var(--gold-light);
}

.scroll-cue i {
  position: relative;
  width: 56px;
  height: 1px;
  overflow: hidden;
  background: var(--line-strong);
}

.scroll-cue i::after {
  position: absolute;
  top: 0;
  left: -20%;
  width: 20%;
  height: 100%;
  background: var(--gold);
  content: "";
  animation: scanLine 2.3s ease-in-out infinite;
}

.scroll-cue .icon {
  width: 12px;
  height: 12px;
  transform: rotate(180deg);
}

/* -------------------------------------------------------------------------- */
/* 内容 section                                                               */
/* -------------------------------------------------------------------------- */

.scroll-section:not(.hero) {
  display: flex;
  min-height: 100svh;
  align-items: flex-start;
  overflow: hidden;
  padding: 112px 0 80px;
}

.section-tutorials {
  background: #090c0c;
  border-top: 1px solid var(--line);
}

.section-downloads {
  background: #080a0a;
  border-top: 1px solid var(--line);
}

.section-texture {
  position: absolute;
  image-rendering: pixelated;
}

.section-texture-bricks {
  top: -12%;
  right: -3%;
  width: 48%;
  height: 124%;
  background-image: url("../img/blocks/polished_blackstone_bricks.png");
  background-size: 110px 110px;
  opacity: 0.12;
  mask-image: linear-gradient(90deg, transparent, #000 45%, #000);
}

.section-texture-stone {
  inset: 0;
  background-image: url("../img/blocks/polished_blackstone.png");
  background-size: 104px 104px;
  opacity: 0.14;
  mask-image: linear-gradient(180deg, transparent, #000 25%, #000 80%, transparent);
}

.section-texture-gilded {
  bottom: -12%;
  left: -5%;
  width: 34%;
  height: 70%;
  background-image: url("../img/blocks/gilded_blackstone.png");
  background-size: 96px 96px;
  opacity: 0.16;
  mask-image: radial-gradient(ellipse at 30% 70%, #000, transparent 70%);
}

.section-glow {
  position: absolute;
  top: 10%;
  right: 18%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 161, 59, 0.08), transparent 66%);
  filter: blur(20px);
}

.section-glow-gold {
  top: 36%;
  right: auto;
  left: -12%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(214, 161, 59, 0.16), transparent 66%);
}

.section-mark {
  position: absolute;
  top: 28px;
  right: 24px;
  color: transparent;
  font-family: var(--font-display);
  font-size: clamp(180px, 26vw, 380px);
  font-weight: 900;
  letter-spacing: -0.12em;
  line-height: 1;
  opacity: 0.28;
  pointer-events: none;
  -webkit-text-stroke: 1px rgba(236, 233, 221, 0.07);
}

.section-hazard {
  position: absolute;
  top: 18%;
  bottom: 18%;
  left: 0;
  width: 2px;
  background: repeating-linear-gradient(
    -45deg,
    var(--gold) 0 4px,
    transparent 4px 10px
  );
  opacity: 0.36;
}

.section-inner {
  position: relative;
  z-index: 2;
}

.section-head {
  margin-bottom: 32px;
}

.section-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  align-items: end;
  gap: clamp(34px, 5vw, 72px);
  margin-top: 15px;
}

.section-title-row h2 {
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 5.8vw, 5.3rem);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 0.98;
}

.section-title-row h2 em {
  color: var(--gold);
  font-style: normal;
}

.section-title-row h2 > span {
  color: var(--gold);
}

.section-aside {
  padding: 0 0 6px 21px;
  border-left: 1px solid var(--gold-line);
}

.section-aside p {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.9;
}

.section-aside .text-link {
  margin-top: 15px;
}

.gold-rule {
  position: relative;
  height: 1px;
  margin-top: 23px;
  background: linear-gradient(90deg, var(--gold-line), var(--line) 42%, transparent);
}

.gold-rule::before {
  position: absolute;
  top: -3px;
  left: 0;
  width: 7px;
  height: 7px;
  background: var(--gold);
  content: "";
}

/* 筛选 -------------------------------------------------------------------- */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 23px;
}

.filter-btn {
  position: relative;
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border: 0;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%);
  transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.filter-btn b {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
}

.filter-btn:hover {
  color: var(--ivory);
  box-shadow: inset 0 0 0 1px var(--gold-line);
}

.filter-btn.is-active {
  background: var(--gold);
  box-shadow: inset 0 0 0 1px var(--gold-light);
  color: #10120e;
}

.filter-btn.is-active b {
  color: rgba(16, 18, 14, 0.55);
}

/* 教程卡片 ---------------------------------------------------------------- */

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

.tutorial-card {
  position: relative;
  display: flex;
  min-height: 300px;
  flex-direction: column;
  overflow: hidden;
  padding: 20px 20px 17px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.035), transparent 52%),
    linear-gradient(rgba(8, 10, 10, 0.82), rgba(8, 10, 10, 0.88)),
    url("../img/blocks/blackstone.png");
  background-size: auto, auto, 96px 96px;
  box-shadow: inset 0 0 0 1px var(--line);
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 0 100%);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tutorial-card::before {
  position: absolute;
  right: 10px;
  bottom: 39px;
  z-index: 0;
  color: transparent;
  content: attr(data-index);
  font-family: var(--font-display);
  font-size: 94px;
  font-weight: 900;
  letter-spacing: -0.1em;
  line-height: 1;
  opacity: 0.4;
  pointer-events: none;
  -webkit-text-stroke: 1px rgba(236, 233, 221, 0.1);
}

.tutorial-card::after {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--gold);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.tutorial-card > * {
  position: relative;
  z-index: 1;
}

.tutorial-card:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 0 0 1px var(--gold-line);
}

.tutorial-card:hover::after {
  transform: scaleX(1);
}

.tutorial-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tutorial-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  box-shadow: inset 0 0 0 1px rgba(214, 161, 59, 0.32);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.tutorial-cat::before {
  width: 4px;
  height: 4px;
  background: currentColor;
  content: "";
}

.tutorial-number {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.09em;
}

.tutorial-card h3 {
  margin: 24px 0 10px;
  color: var(--ivory);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.4;
}

.tutorial-summary {
  flex: 1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.85;
}

.tutorial-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.tutorial-level {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.tutorial-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.16s ease;
}

.tutorial-open .icon {
  width: 12px;
  height: 12px;
  transition: transform 0.16s ease;
}

.tutorial-open:hover {
  color: var(--gold-light);
}

.tutorial-open:hover .icon {
  transform: translate(2px, -2px);
}

.no-script {
  padding: 22px;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--muted);
  font-size: 12px;
}

.section-tail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 24px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.tail-code {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.tail-code b {
  color: var(--gold);
  font-weight: 700;
}

/* -------------------------------------------------------------------------- */
/* 素材区                                                                     */
/* -------------------------------------------------------------------------- */

.library-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.74fr) minmax(0, 1.26fr);
  align-items: stretch;
  gap: 15px;
}

.upload-panel,
.library-panel {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.025), transparent 45%),
    #0c1010;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 13px, 100% 100%, 0 100%);
}

.upload-panel::before,
.library-panel::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), rgba(214, 161, 59, 0.08) 55%, transparent);
  content: "";
}

.upload-panel {
  display: flex;
  flex-direction: column;
  padding: 19px;
}

.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-top .mono-label {
  color: var(--muted);
}

.local-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.local-badge i {
  width: 4px;
  height: 4px;
  background: #6d8c5e;
}

.dropzone {
  display: flex;
  min-height: 298px;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 26px 16px 22px;
  border: 1px dashed rgba(214, 161, 59, 0.38);
  background:
    linear-gradient(rgba(5, 7, 7, 0.86), rgba(6, 8, 8, 0.94)),
    url("../img/blocks/polished_blackstone.png");
  background-size: auto, 82px 82px;
  text-align: center;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.dropzone:hover,
.dropzone.is-dragging {
  border-color: var(--gold);
  background-color: rgba(214, 161, 59, 0.05);
}

.dropzone.is-dragging {
  border-style: solid;
}

.drop-art {
  position: relative;
  width: 64px;
  height: 64px;
  margin-bottom: 19px;
}

.drop-block {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(244, 201, 104, 0.7);
  image-rendering: pixelated;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.25);
}

.drop-arrow {
  position: absolute;
  right: 0;
  bottom: 0;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  background: var(--gold);
  color: #0d100d;
}

.drop-arrow .icon {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

.dropzone h3 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.dropzone > p {
  max-width: 250px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.8;
}

.btn-upload {
  min-height: 41px;
  margin: 17px 0 13px;
  padding-inline: 17px;
  font-size: 11px;
}

.upload-limit {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.06em;
}

.upload-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 13px;
  color: var(--dim);
  font-size: 9.5px;
  line-height: 1.7;
}

.upload-note .icon {
  width: 12px;
  height: 12px;
  margin-top: 2px;
}

.upload-note code {
  color: var(--muted);
  font-size: 9px;
}

/* 上传队列 ---------------------------------------------------------------- */

.upload-queue {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
}

.queue-clear {
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 7px;
  cursor: pointer;
}

.queue-clear:hover {
  color: var(--gold);
}

.queue-list {
  max-height: 150px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.queue-item {
  padding: 8px 0;
  border-bottom: 1px solid rgba(236, 233, 221, 0.06);
}

.queue-item:last-child {
  border-bottom: 0;
}

.queue-item-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.queue-name {
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-state {
  flex: none;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 7px;
}

.queue-track {
  height: 2px;
  margin-top: 6px;
  background: rgba(236, 233, 221, 0.08);
}

.queue-fill {
  display: block;
  width: 0;
  height: 100%;
  background: var(--gold);
  transition: width 0.18s ease, background-color 0.2s ease;
}

.queue-item[data-state="done"] .queue-fill {
  background: #729563;
}

.queue-item[data-state="error"] .queue-fill {
  background: var(--danger);
}

.queue-item[data-state="done"] .queue-state {
  color: #829f73;
}

.queue-item[data-state="error"] .queue-state {
  color: var(--danger);
}

/* 文件列表 ---------------------------------------------------------------- */

.library-panel {
  display: flex;
  min-height: 456px;
  flex-direction: column;
  padding: 20px 22px 17px;
}

.library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.library-head .mono-label {
  color: var(--dim);
}

.library-head h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 6px;
  color: var(--ivory);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}

.file-count {
  display: inline-grid;
  min-width: 23px;
  height: 23px;
  place-items: center;
  padding: 0 6px;
  background: var(--gold);
  color: #0c0f0c;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
}

.file-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin-top: 7px;
}

.file-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  animation: fileIn 0.28s ease both;
}

.file-item:last-child {
  border-bottom: 0;
}

.file-badge {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(236, 233, 221, 0.16);
  background: #161b1a;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%);
}

.file-badge.type-image {
  border-color: rgba(214, 161, 59, 0.4);
  color: #d9b36b;
}

.file-badge.type-video {
  border-color: rgba(188, 112, 93, 0.4);
  color: #c98772;
}

.file-badge.type-audio {
  border-color: rgba(158, 164, 116, 0.4);
  color: #b3b789;
}

.file-badge.type-archive {
  border-color: rgba(121, 153, 99, 0.45);
  color: #96b57f;
}

.file-badge.type-doc {
  border-color: rgba(117, 151, 158, 0.4);
  color: #94b4ba;
}

.file-badge.type-code {
  border-color: rgba(144, 132, 171, 0.4);
  color: #b2a7c8;
}

.file-info {
  min-width: 0;
}

.file-name {
  display: block;
  overflow: hidden;
  color: var(--ivory);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-name:hover {
  color: var(--gold-light);
}

.file-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 7px;
  margin-top: 4px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 8px;
}

.file-meta .meta-sep {
  width: 2px;
  height: 2px;
  background: var(--dim);
}

.file-actions {
  display: flex;
  align-items: center;
  gap: 1px;
}

.file-actions .file-download {
  border-color: var(--gold-line);
  color: var(--gold);
}

.file-actions .file-download:hover {
  background: var(--gold);
  color: #0c0f0c;
}

.file-actions .file-delete:hover {
  border-color: rgba(217, 111, 92, 0.55);
  background: rgba(217, 111, 92, 0.12);
  color: var(--danger);
}

.library-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.05em;
}

.status-dot-small {
  width: 4px;
  height: 4px;
  flex: none;
  background: #718d61;
}

/* 空状态 / 错误 / 骨架屏 -------------------------------------------------- */

.empty-state,
.error-state {
  display: flex;
  min-height: 280px;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 26px 16px;
  border: 1px dashed rgba(236, 233, 221, 0.16);
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--gold);
}

.empty-icon .icon {
  width: 20px;
  height: 20px;
}

.empty-state h4,
.error-state h4 {
  margin-top: 15px;
  color: var(--ivory);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.empty-state p,
.error-state p {
  max-width: 260px;
  margin-top: 5px;
  color: var(--dim);
  font-size: 10.5px;
  line-height: 1.8;
}

.empty-state .text-link,
.error-state .text-link {
  margin-top: 15px;
  font-size: 9px;
  cursor: pointer;
}

.file-skeleton {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.file-skeleton span {
  width: 42px;
  height: 42px;
  background: #171c1b;
}

.file-skeleton div {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.file-skeleton i {
  display: block;
  width: 48%;
  height: 8px;
  background: #171c1b;
}

.file-skeleton i + i {
  width: 28%;
  height: 6px;
}

.file-skeleton span,
.file-skeleton i {
  position: relative;
  overflow: hidden;
}

.file-skeleton span::after,
.file-skeleton i::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(236, 233, 221, 0.04), transparent);
  content: "";
  transform: translateX(-100%);
  animation: shimmer 1.4s infinite;
}

/* -------------------------------------------------------------------------- */
/* 教程弹窗                                                                   */
/* -------------------------------------------------------------------------- */

.tutorial-dialog {
  width: min(660px, calc(100vw - 32px));
  max-height: 90vh;
  padding: 0;
  border: 0;
  background: #ece7d9;
  color: #171a16;
  box-shadow: 18px 18px 0 rgba(0, 0, 0, 0.35);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

.tutorial-dialog::backdrop {
  background: rgba(4, 6, 6, 0.82);
  backdrop-filter: blur(5px);
}

.tutorial-dialog[open] {
  animation: dialogIn 0.22s ease both;
}

.dialog-inner {
  max-height: 90vh;
  overflow-y: auto;
  padding: 31px 33px 27px;
}

.dialog-top {
  display: flex;
  align-items: center;
  gap: 11px;
}

.dialog-badge {
  display: inline-flex;
  padding: 4px 9px;
  background: #151815;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.dialog-code {
  color: #968d79;
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.dialog-close {
  margin-left: auto;
  border-color: #c9c1af;
  color: #171a16;
}

.dialog-close:hover {
  border-color: #151815;
  background: #151815;
  color: #ece7d9;
}

.tutorial-dialog h2 {
  margin: 18px 0 9px;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 4vw, 2.1rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.22;
}

.dialog-summary {
  color: #625f50;
  font-size: 12px;
  line-height: 1.85;
}

.dialog-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 21px;
  color: #8d8572;
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.dialog-rule i {
  height: 1px;
  flex: 1;
  background: #d0c8b5;
}

.dialog-notes {
  margin-top: 1px;
  counter-reset: note;
}

.dialog-notes li {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 11px;
  padding: 12px 0;
  border-bottom: 1px solid #d4cbb8;
  color: #34372e;
  font-size: 12.5px;
  line-height: 1.8;
  counter-increment: note;
}

.dialog-notes li::before {
  display: inline-grid;
  width: 23px;
  height: 23px;
  place-items: center;
  margin-top: 1px;
  background: #171a16;
  color: var(--gold);
  content: counter(note, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
}

.dialog-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 21px;
  padding-top: 16px;
  border-top: 1px solid #d0c7b4;
}

.dialog-bottom p {
  max-width: 330px;
  color: #817967;
  font-size: 9px;
  line-height: 1.7;
}

.dialog-bottom code {
  color: #625c4d;
  font-size: 8px;
}

.dialog-bottom .btn {
  box-shadow: none;
}

/* -------------------------------------------------------------------------- */
/* 页脚 / 回到顶部 / 提示                                                     */
/* -------------------------------------------------------------------------- */

.site-footer {
  position: relative;
  border-top: 1px solid var(--gold-line);
  background:
    linear-gradient(rgba(5, 7, 7, 0.82), rgba(5, 7, 7, 0.94)),
    url("../img/blocks/blackstone.png");
  background-size: auto, 128px 128px;
}

.site-footer::before {
  display: block;
  height: 3px;
  background-image: url("../img/blocks/gold_block.png");
  background-size: 24px 24px;
  content: "";
  opacity: 0.55;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: center;
  gap: 30px;
  padding: 27px 0 22px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-face {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: #0b0d0d;
}

.footer-face img {
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
}

.footer-brand div {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.footer-brand strong {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.footer-brand div span {
  margin-top: 3px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.footer-brand b {
  color: var(--gold);
}

.footer-credit {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.03em;
  text-align: right;
}

.footer-credit a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: rgba(214, 161, 59, 0.4);
  text-underline-offset: 3px;
}

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

.footer-links {
  display: flex;
  align-items: center;
  gap: 17px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: color 0.16s ease;
}

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

.footer-links .icon {
  width: 13px;
  height: 13px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0 16px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.06em;
}

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 75;
  display: flex;
  width: 38px;
  height: 43px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  border: 1px solid var(--gold-line);
  background: rgba(9, 12, 12, 0.94);
  color: var(--gold);
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 0 100%);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.16s ease, color 0.16s ease;
}

.back-to-top .icon {
  width: 14px;
  height: 14px;
}

.back-to-top span {
  font-family: var(--font-mono);
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--gold);
  color: #0c0f0c;
}

.toast-region {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 160;
  display: flex;
  width: min(330px, calc(100vw - 88px));
  flex-direction: column;
  gap: 7px;
  pointer-events: none;
}

.toast {
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--gold);
  background: #0d1110;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.34);
  color: var(--ivory);
  font-size: 11px;
  line-height: 1.6;
  animation: toastIn 0.24s ease both;
}

.toast--success {
  border-left-color: #779565;
}

.toast--error {
  border-left-color: var(--danger);
}

.toast.is-leaving {
  animation: toastOut 0.2s ease both;
}

/* -------------------------------------------------------------------------- */
/* 404                                                                        */
/* -------------------------------------------------------------------------- */

.not-found {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 40px 0;
  background:
    linear-gradient(rgba(5, 7, 7, 0.84), rgba(5, 7, 7, 0.95)),
    url("../img/blocks/blackstone.png");
  background-size: auto, 128px 128px;
}

.not-found .shell {
  display: grid;
  place-items: center;
}

.not-found-card {
  position: relative;
  max-width: 660px;
  padding: 48px;
  background: rgba(9, 12, 12, 0.92);
  box-shadow: inset 0 0 0 1px var(--gold-line), 13px 13px 0 rgba(0, 0, 0, 0.35);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

.not-found-card::before {
  position: absolute;
  top: 0;
  right: 30px;
  left: 0;
  height: 2px;
  background: var(--gold);
  content: "";
}

.not-found-card .mono-label {
  color: var(--dim);
}

.not-found-art {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 32px;
  margin-top: 25px;
}

.not-found-art span {
  width: 16px;
  background: var(--gold);
}

.not-found-art span:nth-child(1) {
  height: 11px;
  opacity: 0.5;
}

.not-found-art span:nth-child(2) {
  height: 21px;
  opacity: 0.75;
}

.not-found-art span:nth-child(3) {
  height: 32px;
}

.not-found-card h1 {
  margin: 20px 0 15px;
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 4.2rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 1.06;
}

.not-found-card > p {
  max-width: 430px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}

.not-found-card .btn {
  margin-top: 25px;
}

.not-found-card .not-found-meta {
  margin-top: 30px;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
}

/* -------------------------------------------------------------------------- */
/* 动效                                                                       */
/* -------------------------------------------------------------------------- */

@keyframes heroIn {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes operatorIn {
  from {
    opacity: 0;
    transform: translate(16px, 24px);
  }
  to {
    opacity: 1;
    transform: translate(0, 0);
  }
}

@keyframes fileIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dialogIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateX(-12px);
  }
}

@keyframes scanLine {
  0% {
    left: -22%;
  }
  55%,
  100% {
    left: 110%;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 浏览器支持滚动驱动动画时，内容随滚动渐入。旧浏览器直接显示。 */
@supports (animation-timeline: view()) {
  .reveal {
    animation: revealUp linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 55%;
  }
}

@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;
  }

  .reveal {
    animation: none !important;
  }
}

/* -------------------------------------------------------------------------- */
/* 响应式                                                                     */
/* -------------------------------------------------------------------------- */

@media (max-width: 1360px) {
  .section-rail {
    display: none;
  }
}

@media (max-width: 1080px) {
  :root {
    --shell: 100%;
  }

  .shell {
    width: calc(100% - 56px);
  }

  .hero-layout {
    grid-template-columns: minmax(0, 1fr) 326px;
    gap: 40px;
  }

  .hero-name {
    font-size: clamp(4rem, 8.6vw, 6.3rem);
  }

  .operator-wrap {
    max-width: 326px;
  }

  .hero-floor {
    gap: 16px;
  }

  .material-index {
    gap: 12px;
  }

  .material-list {
    gap: 10px;
  }

  .section-title-row {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .library-layout {
    grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  }
}

@media (max-width: 920px) {
  :root {
    --header-h: 68px;
  }

  .shell {
    width: calc(100% - 40px);
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    top: calc(var(--header-h) + 8px);
    right: 16px;
    left: 16px;
    display: none;
    max-height: calc(100vh - var(--header-h) - 24px);
    overflow-y: auto;
    padding: 9px;
    border: 1px solid var(--line-strong);
    background:
      linear-gradient(rgba(7, 9, 9, 0.92), rgba(7, 9, 9, 0.97)),
      url("../img/blocks/blackstone.png");
    background-size: auto, 96px 96px;
    box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.35);
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  }

  .site-header.nav-open .site-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    animation: fileIn 0.18s ease both;
  }

  .nav-link {
    height: auto;
    min-height: 44px;
    padding: 0 12px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
  }

  .nav-link.is-active::after {
    display: none;
  }

  .nav-link.is-active {
    box-shadow: inset 2px 0 0 var(--gold);
  }

  .nav-bili {
    height: 42px;
    margin: 7px 0 0;
    justify-content: center;
  }

  .hero {
    min-height: auto;
    padding-top: calc(var(--header-h) + 48px);
    padding-bottom: 26px;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .hero-copy {
    max-width: 680px;
  }

  .hero-name {
    font-size: clamp(4rem, 12vw, 6.2rem);
  }

  .operator-wrap {
    width: min(100%, 320px);
    max-width: 320px;
    justify-self: center;
  }

  .hero-floor {
    margin-top: 35px;
    padding-top: 13px;
  }

  .scroll-section:not(.hero) {
    min-height: 0;
    padding: 76px 0 62px;
  }

  .section-title-row {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 14px;
  }

  .section-aside {
    max-width: 620px;
    padding-left: 17px;
  }

  .section-title-row h2 {
    font-size: clamp(3rem, 9.4vw, 4.4rem);
  }

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

  .library-layout {
    grid-template-columns: 1fr;
  }

  .upload-panel,
  .library-panel {
    min-height: 0;
  }

  .dropzone {
    min-height: 280px;
  }

  .library-panel {
    min-height: 390px;
  }

  .section-mark {
    top: 14px;
    right: 10px;
    font-size: 220px;
    opacity: 0.2;
  }

  .footer-top {
    grid-template-columns: 1fr auto;
    gap: 18px;
  }

  .footer-credit {
    grid-column: 1 / -1;
    text-align: left;
    order: 3;
  }
}

@media (max-width: 700px) {
  .shell {
    width: calc(100% - 32px);
  }

  .brand-copy span {
    display: none;
  }

  .brand-icon {
    width: 34px;
    height: 34px;
  }

  .brand-icon img {
    width: 28px;
    height: 28px;
  }

  .hero {
    padding-top: calc(var(--header-h) + 40px);
  }

  .hero-name {
    font-size: clamp(3.3rem, 15vw, 5rem);
  }

  .hero-latin {
    font-size: clamp(1.4rem, 6vw, 1.9rem);
    letter-spacing: 0.13em;
  }

  .hero-latin::before {
    display: none;
  }

  .hero-lead {
    font-size: 13px;
  }

  .hero-actions {
    gap: 8px;
  }

  .hero-actions .btn {
    min-height: 45px;
    padding-inline: 13px;
    font-size: 11px;
  }

  .hero-meta {
    margin-top: 28px;
  }

  .hero-meta > div {
    padding-right: 10px;
  }

  .hero-meta > div + div {
    padding-left: 12px;
  }

  .hero-meta dd {
    font-size: 8px;
  }

  .hero-floor {
    align-items: flex-start;
    flex-direction: column;
  }

  .material-index {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .material-list {
    gap: 10px 13px;
  }

  .scroll-cue {
    display: none;
  }

  .hero-hazard,
  .section-hazard {
    display: none;
  }

  .section-head {
    margin-bottom: 24px;
  }

  .section-title-row h2 {
    font-size: clamp(2.55rem, 11vw, 3.6rem);
  }

  .filter-bar {
    gap: 5px;
    margin-bottom: 18px;
  }

  .filter-btn {
    min-height: 32px;
    padding-inline: 10px;
    font-size: 10px;
  }

  .tutorial-grid {
    grid-template-columns: 1fr;
  }

  .tutorial-card {
    min-height: 0;
    padding: 18px 17px 15px;
  }

  .tutorial-card h3 {
    margin-top: 20px;
    font-size: 19px;
  }

  .tutorial-summary {
    flex: none;
  }

  .section-tail {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .upload-panel {
    padding: 16px;
  }

  .dropzone {
    min-height: 255px;
    padding: 23px 14px 20px;
  }

  .library-panel {
    min-height: 360px;
    padding: 17px 15px 14px;
  }

  .library-head h3 {
    font-size: 21px;
  }

  .file-item {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 9px;
  }

  .file-badge {
    width: 38px;
    height: 38px;
    font-size: 6px;
  }

  .file-name {
    font-size: 12px;
  }

  .file-actions .icon-btn {
    width: 28px;
    height: 28px;
  }

  .file-actions .icon-btn .icon {
    width: 14px;
    height: 14px;
  }

  .dialog-inner {
    padding: 23px 20px 21px;
  }

  .dialog-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }

  .dialog-code {
    display: none;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 14px;
    padding-top: 22px;
  }

  .footer-links {
    gap: 16px;
  }

  .footer-credit {
    order: 0;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
    width: 35px;
    height: 39px;
  }

  .toast-region {
    right: 14px;
    bottom: 14px;
    left: 14px;
    width: auto;
  }
}

@media (max-width: 480px) {
  .menu-toggle-text {
    display: none;
  }

  .eyebrow,
  .hero-overline {
    letter-spacing: 0.08em;
  }

  .hero-overline {
    font-size: 8px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: flex-start;
  }

  .hero-actions .btn-sub {
    margin-left: auto;
  }

  .hero-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 13px 0;
  }

  .hero-meta > div {
    padding-right: 0;
  }

  .hero-meta > div + div {
    padding-left: 0;
    border-left: 0;
  }

  .hero-meta > div:nth-child(2) {
    padding-left: 14px;
    border-left: 1px solid var(--line);
  }

  .hero-meta > div:nth-child(3) {
    grid-column: 1 / -1;
    padding-top: 11px;
    border-top: 1px solid var(--line);
  }

  .hero-name {
    font-size: clamp(3rem, 16.5vw, 4.35rem);
  }

  .hero-latin {
    font-size: 1.35rem;
  }

  .operator-wrap {
    width: min(100%, 290px);
  }

  .section-title-row h2 {
    font-size: clamp(2.3rem, 12vw, 3.1rem);
  }

  .section-aside {
    padding-left: 13px;
  }

  .section-aside p {
    font-size: 11.5px;
  }

  .operator-foot strong {
    font-size: 18px;
  }

  .tutorial-dialog {
    width: calc(100vw - 20px);
  }

  .dialog-notes li {
    grid-template-columns: 23px minmax(0, 1fr);
    gap: 8px;
    font-size: 11.5px;
  }

  .file-actions .file-copy {
    display: none;
  }

  .file-meta {
    gap: 3px 5px;
    font-size: 7px;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}
