/* ============================================================
   SKIN OF A MACHINE — NO INSIDE
   包豪斯画框 · 墙面平板 · 极简
   ============================================================ */

:root {
  --bone: #d9d6cb;
  --bone-dim: rgba(217, 214, 203, 0.55);
  --bone-faint: rgba(217, 214, 203, 0.22);
  --ink: #050506;
  --wall: #0a0a0c;
  --frame: #101013;
  --frame-edge: #26262b;
}

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

html,
body {
  height: 100%;
}

body {
  background:
    radial-gradient(1200px 800px at 50% 42%, #0c0c10 0%, var(--ink) 70%),
    var(--ink);
  color: var(--bone);
  font-family: "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.wall {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 4vh 4vw;
}

/* ---- 画框（挂在墙上的平板） ---- */
.frame {
  position: relative;
  background: var(--frame);
  border: 1px solid var(--frame-edge);
  padding: 14px;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.5),
    0 22px 70px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  transition: border-color 120ms linear, box-shadow 180ms ease;
}

body.is-sensed .frame {
  border-color: rgba(231, 191, 163, 0.42);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.5),
    0 22px 70px rgba(0, 0, 0, 0.55),
    0 0 34px rgba(194, 132, 105, 0.09),
    inset 0 0 0 1px rgba(238, 198, 169, 0.08);
}

canvas {
  display: block;
  width: min(72vw, 62vh);
  aspect-ratio: 4 / 5;
  background: #070709;
}

/* ---- 开场 ---- */
.veil {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  background: rgba(6, 6, 8, 0.92);
  opacity: 1;
  transition: opacity 0.8s ease;
  pointer-events: auto;
  cursor: default;
  z-index: 5;
}

.veil.hide {
  opacity: 0;
  pointer-events: none;
}

.veil-title {
  font-size: 20px;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  color: var(--bone);
  font-weight: 300;
}

.veil-sub {
  font-size: 11px;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  color: var(--bone-dim);
}

.veil-line {
  margin-top: 18px;
  font-size: 12px;
  line-height: 2.1;
  letter-spacing: 0.18em;
  color: rgba(217, 214, 203, 0.7);
}

.veil-hint {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  color: rgba(217, 214, 203, 0.46);
  animation: breath 3.2s ease-in-out infinite;
}

@keyframes breath {
  0%,
  100% {
    opacity: 0.28;
  }
  50% {
    opacity: 0.8;
  }
}

/* ---- 铭牌 ---- */
.plaque {
  text-align: center;
}

.plaque-en {
  font-size: 11px;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  color: var(--bone-dim);
  font-weight: 300;
}

.plaque-zh {
  margin-top: 7px;
  font-size: 11px;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  color: var(--bone-faint);
}

/* ---- 角落状态 ---- */
.status {
  position: fixed;
  right: 22px;
  bottom: 18px;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: rgba(217, 214, 203, 0.28);
  transition: color 120ms linear, opacity 120ms linear;
}

body.is-sensed .status {
  color: rgba(235, 191, 161, 0.7);
}

/* 调试读数（?debug=1 才显示，不影响正式展出） */
.debug {
  position: fixed;
  top: 16px;
  right: 18px;
  font-size: 10px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
  color: rgba(217, 214, 203, 0.38);
  background: rgba(5, 5, 6, 0.55);
  padding: 6px 10px;
  border: 1px solid rgba(217, 214, 203, 0.12);
  pointer-events: none;
  z-index: 9;
}

@media (max-width: 720px) {
  canvas {
    width: 88vw;
  }
  .veil-title {
    font-size: 16px;
  }
}
