@font-face {
  font-family: "Nacre Brush";
  src: url("vendor/fonts/LiuJianMaoCao-title.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* ============================================================
   螺鈿 · 幻境  —— NACRE PARTICLE ATELIER
   古典大漆 × 贝光粒子
   ============================================================ */
:root{
  --ink:        #050708;
  --ink-2:      #090c0e;
  --panel:      rgba(9, 11, 13, .62);
  --gold:       #c9a96e;
  --gold-soft:  #a8894f;
  --gold-line:  rgba(201, 169, 110, .28);
  --gold-line-2:rgba(201, 169, 110, .12);
  --ivory:      #efe5d2;
  --ivory-dim:  #c8bfae;
  --muted:      #8b857a;
  --seal:       #a53a2d;
  --brush: "Nacre Brush", "Microsoft YaHei", sans-serif;
  --sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --latin: "Cormorant Garamond", "Baskerville", "Palatino Linotype", "Times New Roman", serif;
  --panel-w: 348px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}
*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
button{ font-family: inherit; color: inherit; background: none; border: none; cursor: pointer; }
svg{ display: block; }
::selection{ background: rgba(201,169,110,.25); }

/* ---------- 底色 / 氛围 ---------- */
#stage{ position: fixed; inset: 0; overflow: hidden; }
.bg{
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 46% 40%, #151a1d 0%, #0b0f11 42%, #050708 78%, #030405 100%);
}
.ambient{
  position: absolute; left: 50%; top: 46%;
  width: 92vmax; height: 92vmax;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at 50% 50%, rgba(140,170,180,.10) 0%, rgba(160,130,170,.055) 26%, rgba(201,169,110,.03) 44%, transparent 66%);
  opacity: .9;
  transition: background 1.2s var(--ease);
  pointer-events: none;
}
.grain{
  position: absolute; inset: -20%;
  opacity: .028;
  pointer-events: none;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}
.vignette{
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 100% at 50% 42%, transparent 45%, rgba(0,0,0,.55) 100%);
}
#gl{
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; touch-action: none; cursor: grab;
}
#gl.dragging{ cursor: grabbing; }

/* ---------- 外框 ---------- */
.frame{
  position: absolute; inset: 18px;
  border: 1px solid rgba(201,169,110,.10);
  pointer-events: none;
  z-index: 6;
}
.frame::before{
  content: ""; position: absolute; inset: 6px;
  border: 1px solid rgba(201,169,110,.045);
}
.corner{ position: absolute; width: 46px; height: 46px; opacity: .6; }
.corner svg{ width: 100%; height: 100%; }
.corner.tl{ left: -1px; top: -1px; }
.corner.tr{ right: -1px; top: -1px; transform: scaleX(-1); }
.corner.bl{ left: -1px; bottom: -1px; transform: scaleY(-1); }
.corner.br{ right: -1px; bottom: -1px; transform: scale(-1,-1); }

/* ---------- 顶栏 ---------- */
.topbar{
  position: absolute; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 38px 44px 0;
  pointer-events: none;
}
.brand{ display: flex; align-items: center; gap: 16px; pointer-events: auto; }
.seal{
  position: relative;
  width: 50px; height: 50px; flex: 0 0 auto;
  background: linear-gradient(150deg, #b34334, #8f2c21 55%, #7c261d);
  color: #f4e7d6;
  display: grid; place-items: center;
  font-size: 23px; line-height: 1;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(255,225,200,.22), 0 6px 22px rgba(0,0,0,.45);
  transform: rotate(-1.5deg);
}
.seal::after{
  content: ""; position: absolute; inset: 4px;
  border: 1px solid rgba(255,230,210,.28);
}
.brand-copy{ display: flex; flex-direction: column; gap: 5px; padding-top: 2px; }
.brand-title{ display: flex; align-items: baseline; gap: 13px; }
.brand-title h1{
  margin: 0; font-family: var(--brush); font-size: 40px; line-height: 1.1; font-weight: 400;
  letter-spacing: .26em; color: var(--ivory);
  text-shadow: 0 0 26px rgba(201,169,110,.13);
}
.brand-subtitle {
  display: block;
  width: clamp(200px, 21vw, 272px);
  height: auto;
}
.brand-title .latin{
  font-family: var(--latin); font-size: 9px; letter-spacing: .42em;
  color: var(--gold); opacity: .8; text-transform: uppercase;
}
.toolbar{ display: flex; gap: 10px; pointer-events: auto; }
.tool{
  position: relative;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid rgba(201,169,110,.22);
  background: rgba(8,10,12,.4);
  color: var(--ivory-dim);
  transition: border-color .35s, color .35s, background .35s, transform .35s;
}
.tool svg{ width: 16px; height: 16px; }
.tool:hover{ border-color: rgba(201,169,110,.6); color: var(--ivory); background: rgba(201,169,110,.08); }
.tool:active{ transform: scale(.96); }
.tool::after{
  content: attr(data-tip);
  position: absolute; top: calc(100% + 9px); left: 50%; transform: translateX(-50%);
  white-space: nowrap; font-size: 9px; letter-spacing: .18em;
  color: var(--ivory-dim); background: rgba(6,8,9,.9);
  border: 1px solid rgba(201,169,110,.16);
  padding: 4px 7px; opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.tool:hover::after{ opacity: 1; }
.tool.on{ border-color: rgba(201,169,110,.62); color: var(--gold); background: rgba(201,169,110,.1); }
.tool .live{
  position: absolute; right: 7px; top: 7px; width: 4px; height: 4px;
  background: var(--seal); opacity: 0; transition: opacity .3s;
}
.tool.on .live{ opacity: 1; }

/* ---------- 左侧题签 ---------- */
.motif-caption {
  position: absolute;
  left: 36px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 13px;
  writing-mode: vertical-rl;
  text-orientation: upright;
  color: var(--ivory);
  pointer-events: none;
}
.motif-caption::before {
  content: "";
  width: 1px;
  height: 42px;
  background: var(--gold-line);
  margin-bottom: 6px;
}
.caption-medium { font-family: var(--brush); color: var(--gold); font-size: 25px; letter-spacing: .12em; }
.caption-dot { color: var(--gold); font-size: 18px; }
.motif-caption strong { font-family: var(--brush); font-size: clamp(46px, 5vw, 72px); font-weight: 400; letter-spacing: .1em; line-height: 1; }
.brand .seal, .loader h2, .loader .l-seal { font-family: var(--brush); }

/* ---------- 右侧面板 ---------- */
.panel{
  position: absolute; top: 94px; right: 24px; bottom: 24px;
  width: var(--panel-w);
  z-index: 40;
  display: flex; flex-direction: column;
  padding: 0;
  background:
    linear-gradient(180deg, rgba(16,19,21,.72), rgba(8,10,11,.66));
  border: 1px solid rgba(201,169,110,.22);
  box-shadow: 0 30px 80px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.035);
  overflow: hidden;
  transition: transform .7s var(--ease), opacity .5s var(--ease);
}
.panel-body{
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  padding: 22px 20px 4px;
  scrollbar-width: thin; scrollbar-color: rgba(201,169,110,.3) transparent;
}
.panel-body::-webkit-scrollbar{ width: 4px; }
.panel-body::-webkit-scrollbar-thumb{ background: rgba(201,169,110,.25); }
.panel-body::-webkit-scrollbar-track{ background: transparent; }
.panel.hidden{ transform: translateX(calc(100% + 32px)); opacity: 0; pointer-events: none; }
.panel-close{
  display: none;
  position: absolute; top: 9px; right: 10px; z-index: 8;
  width: 28px; height: 28px;
  color: var(--gold); font-size: 18px; font-family: var(--sans);
  border: 1px solid rgba(201,169,110,.18);
  background: rgba(5,7,8,.35);
  line-height: 1;
}

.panel-head{ display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; }
.panel-head .ph-title {
  margin: 0;
  font-weight: 400;
  font-size: 18px;
  letter-spacing: .16em;
  color: var(--ivory);
}

.sec-h{
  display: flex; align-items: center; gap: 10px;
  margin: 15px 0 9px;
}
.sec-h:first-of-type{ margin-top: 4px; }
.sec-h h2{ margin: 0; font-size: 13px; font-weight: 500; letter-spacing: .3em; color: var(--ivory); white-space: nowrap; }
.sec-h .en{ font-family: var(--latin); font-size: 8px; letter-spacing: .34em; color: var(--gold); opacity: .62; white-space: nowrap; }
.sec-h .line{ flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold-line), transparent); }
.sec-h .mini{ font-size: 9px; letter-spacing: .12em; color: var(--muted); }

/* 纹样目录 */
.shape-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px 7px;
}
.shape {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 39px;
  padding: 4px 6px;
  border-radius: 22px;
  color: var(--ivory-dim);
}
.shape .ico { width: 22px; height: 22px; flex: 0 0 22px; color: var(--gold-soft); }
.shape .ico svg { width: 100%; height: 100%; }
.shape .cn { font-size: 13px; letter-spacing: .1em; white-space: nowrap; }
.shape:hover { background: rgba(239,229,210,.048); color: var(--ivory); }
.shape.active { background: rgba(183,199,179,.12); color: var(--ivory); }
.shape.active .ico { color: #c3d0bb; }

.nacre-study {
  display: grid;
  grid-template-columns: minmax(86px, .9fr) minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  margin: 3px 0 10px;
}
.nacre-study a { display: block; border-radius: 9px 13px 10px 8px; }
.nacre-study img {
  display: block;
  width: 100%;
  height: 59px;
  object-fit: cover;
  border-radius: 9px 13px 10px 8px;
}
.nacre-study figcaption { color: var(--ivory-dim); font-size: 12px; line-height: 1.4; }
.nacre-study small { display: block; margin-top: 3px; color: #a9a89f; font-size: 10px; line-height: 1.5; }

/* 贝色 */
.palettes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; }
.pal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 5px 0;
  border-radius: 12px;
  color: var(--ivory-dim);
  font-size: 11px;
}
.pal:hover { background: rgba(239,229,210,.045); }
.pal .chip {
  display: block;
  width: 26px;
  height: 19px;
  border-radius: 42% 24% 43% 30% / 59% 43% 42% 31%;
  transform: rotate(-12deg);
  background:
    repeating-linear-gradient(161deg, transparent 0 2px, rgba(255,255,255,.13) 3px, transparent 5px),
    linear-gradient(153deg, var(--shell-edge), var(--shell-light) 30%, var(--shell-mid) 60%, var(--shell-light) 78%, var(--shell-edge));
  border: 1px solid rgba(255,255,255,.23);
}
.pal:nth-child(even) .chip { transform: rotate(9deg); border-radius: 25% 53% 27% 49%; }
.pal.active { background: rgba(183,199,179,.12); color: var(--ivory); }

/* 滑杆 */
.sliders{ display: flex; flex-direction: column; gap: 10px; margin-top: 2px; }
.slider-row{ display: flex; align-items: center; gap: 10px; }
.slider-row label{ width: 40px; flex: 0 0 auto; font-size: 10px; letter-spacing: .18em; color: var(--ivory-dim); }
.slider-row output{
  width: 38px; flex: 0 0 auto; text-align: right;
  font-family: var(--latin); font-size: 10px; letter-spacing: .06em;
  color: var(--gold); opacity: .9;
  font-variant-numeric: tabular-nums;
}
input[type=range]{
  -webkit-appearance: none; appearance: none;
  flex: 1; height: 16px; margin: 0; background: transparent; cursor: pointer;
}
input[type=range]::-webkit-slider-runnable-track{
  height: 1px; background: var(--track, linear-gradient(90deg, rgba(201,169,110,.12), rgba(201,169,110,.7)));
}
input[type=range]::-webkit-slider-thumb{
  -webkit-appearance: none; appearance: none;
  width: 9px; height: 9px; margin-top: -4px;
  border-radius: 50%;
  background: #0a0c0d;
  border: 1px solid var(--gold);

}
input[type=range]:hover::-webkit-slider-thumb { background: var(--gold-soft); }
#sHue { --track: linear-gradient(90deg, #c08890, #bcaa78, #8eae89, #7ba8ad, #9c8eb8, #c08890); }
#sHue::-moz-range-track { background: var(--track); }
input[type=range]::-moz-range-track{ height: 1px; background: rgba(201,169,110,.35); }
input[type=range]::-moz-range-thumb{
  width: 8px; height: 8px; border-radius: 50%;
  background: #0a0c0d; border: 1px solid var(--gold);
}

/* 手语 */
.cam{
  position: relative;
  height: 48px;
  border: 1px solid rgba(201,169,110,.18);
  background:
    radial-gradient(90% 100% at 50% 50%, rgba(201,169,110,.05), transparent 70%),
    #050708;
  overflow: hidden;
  transition: height .5s var(--ease);
}
.cam.live{ height: 112px; }
.cam video, .cam canvas{
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.cam video{ transform: scaleX(-1); opacity: 0; transition: opacity .6s; }
.cam canvas{ z-index: 2; }
.cam.live video{ opacity: .62; }
.cam .cam-idle{
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 10px;
  background: radial-gradient(70% 90% at 50% 50%, rgba(201,169,110,.06), rgba(5,7,8,.55) 75%);
  transition: opacity .5s;
}
.cam.live .cam-idle{ opacity: 0; pointer-events: none; }
.cam-idle .rings{ position: relative; width: 24px; height: 24px; flex: 0 0 auto; }
.cam-idle .rings i{
  position: absolute; inset: 0; border: 1px solid rgba(201,169,110,.18); border-radius: 50%;
}
.cam-idle .rings i:nth-child(2){ inset: 5px; border-color: rgba(201,169,110,.26); }
.cam-idle .rings i:nth-child(3){ inset: 10px; border-color: rgba(201,169,110,.4); background: rgba(201,169,110,.08); }
.cam-idle p{ margin: 0; font-size: 9.5px; letter-spacing: .24em; color: var(--ivory-dim); }
.cam-idle small{ display: none; font-size: 8px; letter-spacing: .16em; color: var(--muted); font-family: var(--sans); }
.cam .cam-tag{
  position: absolute; left: 7px; top: 7px; z-index: 4;
  display: flex; align-items: center; gap: 5px;
  padding: 3px 6px;
  background: rgba(4,6,7,.66);
  border: 1px solid rgba(201,169,110,.16);
  font-family: var(--sans); font-size: 8px; letter-spacing: .14em; color: var(--ivory-dim);
}
.cam .cam-tag i{ width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }
.cam.live .cam-tag i{ background: #a8c09a; box-shadow: 0 0 5px rgba(168,192,154,.9); }
.cam .cam-corner{ position: absolute; width: 9px; height: 9px; border: 1px solid rgba(201,169,110,.4); z-index: 4; }
.cam .cam-corner.a{ left: 4px; top: 4px; border-right: 0; border-bottom: 0; }
.cam .cam-corner.b{ right: 4px; top: 4px; border-left: 0; border-bottom: 0; }
.cam .cam-corner.c{ left: 4px; bottom: 4px; border-right: 0; border-top: 0; }
.cam .cam-corner.d{ right: 4px; bottom: 4px; border-left: 0; border-top: 0; }

.sense-row{
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin: 9px 0 1px;
}
.sense-row > span{ font-size: 10px; letter-spacing: .18em; color: var(--ivory-dim); }
.sense-opts{ display: flex; border: 1px solid rgba(201,169,110,.18); }
.sense-opts button{
  min-width: 42px; padding: 4px 9px;
  font-size: 9.5px; letter-spacing: .12em; color: var(--muted);
  border-left: 1px solid rgba(201,169,110,.14);
  transition: color .3s, background .3s;
}
.sense-opts button:first-child{ border-left: 0; }
.sense-opts button:hover{ color: var(--ivory); }
.sense-opts button.active{
  color: var(--ivory); background: rgba(201,169,110,.12);
  box-shadow: inset 0 0 12px rgba(201,169,110,.07);
}
.gest-legend{ display: flex; flex-direction: column; gap: 6px; margin: 8px 0 10px; }.gest-item{ display: flex; align-items: center; gap: 9px; }
.gest-item .gic{ width: 21px; height: 21px; flex: 0 0 auto; color: var(--gold-soft); opacity: .75; }
.gest-item .gic svg{ width: 100%; height: 100%; }
.gest-item .gt{ display: flex; flex-direction: column; gap: 2px; }
.gest-item b{ font-weight: 500; font-size: 10px; letter-spacing: .18em; color: var(--ivory-dim); }
.gest-item small{ font-family: var(--sans); font-size: 8px; letter-spacing: .04em; color: var(--muted); }
.gest-item .gstate{ margin-left: auto; font-family: var(--sans); font-size: 8px; letter-spacing: .08em; color: var(--muted); }
.gest-item .gstate.live{ color: var(--gold); }

.btn-hand{
  width: auto; align-self: stretch; flex: 0 0 auto;
  margin: 6px 20px 0;
  height: 38px;
  border: 1px solid rgba(201,169,110,.34);
  background: linear-gradient(180deg, rgba(201,169,110,.10), rgba(201,169,110,.03));
  color: var(--ivory); font-size: 10.5px; letter-spacing: .3em;
  transition: border-color .35s, background .35s, color .35s;
}
.btn-hand { border-radius: 22px; }
.btn-hand:hover{ border-color: rgba(201,169,110,.7); background: rgba(201,169,110,.14); }
.btn-hand.stop{ border-color: rgba(239,229,210,.14); color: var(--muted); background: none; }
.btn-hand:disabled{ opacity: .5; cursor: default; }

/* 面板底部 */
.panel-foot{
  flex: 0 0 auto;
  margin: 8px 20px 0;
  padding: 12px 0 14px;
  border-top: 1px solid rgba(201,169,110,.12);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.pf-item{ display: flex; align-items: center; gap: 7px; font-family: var(--sans); font-size: 8px; letter-spacing: .1em; color: var(--muted); }
.pf-item b{ font-weight: 400; color: var(--ivory-dim); }
.switch{ position: relative; width: 30px; height: 16px; border: 1px solid rgba(201,169,110,.3); background: rgba(0,0,0,.2); transition: background .35s, border-color .35s; }
.switch, .switch::after { border-radius: 10px; }
.switch::after{
  content: ""; position: absolute; left: 2px; top: 2px; width: 10px; height: 10px;
  background: var(--muted); transition: transform .35s var(--ease), background .35s;
}
.switch.on{ border-color: rgba(201,169,110,.6); background: rgba(201,169,110,.12); }
.switch.on::after{ transform: translateX(14px); background: var(--gold);  }

/* ---------- 底部提示 / 状态 ---------- */
.hints{
  position: absolute; left: 0; right: 0; bottom: 30px; z-index: 9;
  display: flex; justify-content: center; align-items: center; gap: 20px;
  font-family: var(--sans); font-size: 9px; letter-spacing: .18em; color: rgba(239,229,210,.4);
  pointer-events: none;
  transition: opacity 1s;
}
.hints span{ display: flex; align-items: center; gap: 6px; }
.hints i{ width: 3px; height: 3px; background: rgba(201,169,110,.6); transform: rotate(45deg); }
.hints.dim{ opacity: .42; }
.foot-meta{
  position: absolute; left: 44px; bottom: 30px; z-index: 9;
  display: flex; flex-direction: column; gap: 4px;
  font-family: var(--sans); font-size: 8px; letter-spacing: .14em; color: rgba(239,229,210,.34);
  pointer-events: none;
}
.foot-meta .fps{ color: rgba(201,169,110,.55); }

/* 手势 HUD */
.hand-hud{
  position: absolute; left: 44px; bottom: 78px; z-index: 12;
  display: flex; align-items: center; gap: 12px;
  padding: 9px 13px;
  background: rgba(6,8,9,.55);
  border: 1px solid rgba(201,169,110,.18);
  opacity: 0; transform: translateY(6px);
  transition: opacity .5s, transform .5s;
  pointer-events: none;
}
.hand-hud.show{ opacity: 1; transform: none; }
.hand-hud .hh-dot{ width: 5px; height: 5px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px rgba(201,169,110,.9); }
.hand-hud .hh-text{ font-family: var(--sans); font-size: 9px; letter-spacing: .12em; color: var(--ivory-dim); }
.hand-hud .hh-bars{ display: flex; gap: 8px; }
.hand-hud .hb{ width: 34px; height: 1px; background: rgba(201,169,110,.16); position: relative; }
.hand-hud .hb i{ position: absolute; left: 0; top: 0; height: 1px; width: 0; background: var(--gold); box-shadow: 0 0 5px rgba(201,169,110,.8); transition: width .12s linear; }

/* 手势浮标 */
.gesture-badge{
  position: absolute; top: 96px; left: 50%; transform: translate(-50%, -6px);
  z-index: 12; display: flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  font-family: var(--sans); font-size: 9px; letter-spacing: .2em; color: var(--ivory-dim);
  background: rgba(6,8,9,.5); border: 1px solid rgba(201,169,110,.14);
  opacity: 0; transition: opacity .4s, transform .4s;
  pointer-events: none;
}
.gesture-badge.show{ opacity: 1; transform: translate(-50%, 0); }
.gesture-badge .gb-ring{
  width: 13px; height: 13px; border-radius: 50%;
  border: 1px solid rgba(201,169,110,.35);
  position: relative;
}
.gesture-badge .gb-ring::after{
  content: ""; position: absolute; inset: 3px; border-radius: 50%;
  background: var(--gold); opacity: calc(.25 + var(--open, .5) * .7);
  transform: scale(calc(.6 + var(--open, .5) * .5));
}

/* ---------- Toast ---------- */
.toast{
  position: absolute; left: 50%; bottom: 92px; transform: translate(-50%, 8px);
  z-index: 80;
  max-width: min(560px, calc(100vw - 48px));
  padding: 10px 16px;
  background: rgba(7,9,10,.92);
  border: 1px solid rgba(201,169,110,.28);
  font-family: var(--sans); font-size: 10.5px; line-height: 1.7; letter-spacing: .06em;
  color: var(--ivory-dim);
  opacity: 0; pointer-events: none;
  transition: opacity .35s, transform .35s;
}
.toast.show{ opacity: 1; transform: translate(-50%, 0); }

/* ---------- 加载 ---------- */
.loader{
  position: fixed; inset: 0; z-index: 200;
  background: #040506;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  transition: opacity 1.1s var(--ease), visibility 1.1s;
}
.loader.done{ opacity: 0; visibility: hidden; }
.loader .l-seal{
  width: 58px; height: 58px; display: grid; place-items: center;
  border: 1px solid rgba(201,169,110,.4);
  color: var(--gold); font-size: 26px;
  position: relative;
}
.loader .l-seal::after{ content: ""; position: absolute; inset: 5px; border: 1px solid rgba(201,169,110,.16); }
.loader h2{ margin: 6px 0 0; font-size: 26px; font-weight: 400; letter-spacing: .5em; color: var(--ivory); }
.loader .l-en{ font-family: var(--latin); font-size: 8px; letter-spacing: .42em; color: var(--gold); opacity: .7; }
.loader .l-bar{ width: 150px; height: 1px; background: rgba(201,169,110,.14); margin-top: 8px; overflow: hidden; }
.loader .l-bar i{ display: block; height: 100%; width: 0; background: linear-gradient(90deg, transparent, var(--gold)); transition: width .4s; }
.loader .l-note{ font-family: var(--sans); font-size: 9px; letter-spacing: .3em; color: var(--muted); }

/* ---------- 移动端 ---------- */
.mobile-fab{ display: none; }
@media (max-width: 980px){
  .topbar{ padding: 22px 20px 0; }
  .brand{ gap: 11px; }
  .seal{ width: 42px; height: 42px; font-size: 19px; }
  .brand-title h1{ font-size: 31px; letter-spacing: .12em; }
  .brand-title .latin{ display: none; }
  .panel-close{ display: grid; place-items: center; width: 26px; height: 26px; font-size: 16px; }
  .panel-head{ padding-right: 34px; }
  .nacre-study img { height: 50px; }
  .panel-foot .pf-item:nth-child(3){ display: none; }
  body.panel-open .mobile-fab{ opacity: 0; pointer-events: none; transform: scale(.9); }
  .toolbar .tool{ width: 36px; height: 36px; }
  .foot-meta{ display: none; }
  .motif-caption { left: 20px; gap: 7px; }
  .motif-caption::before { height: 24px; }
  .motif-caption strong { font-size: 34px; }
  .caption-medium { font-size: 18px; }
  body.panel-open .motif-caption { top: 29%; }
  .hints{ bottom: 20px; gap: 12px; font-size: 8px; flex-wrap: wrap; padding: 0 18px; }
  .hints span:nth-child(3), .hints span:nth-child(4){ display: none; }
  .panel{
    top: auto; left: 10px; right: 10px; bottom: 10px; width: auto;
    max-height: 45vh;
    transform: none;
  }
  .panel-body{ padding: 18px 16px 4px; }
  .panel.hidden{ transform: translateY(calc(100% + 22px)); }
  .btn-hand{ margin: 4px 16px 0; height: 36px; }
  .panel-foot{ margin: 8px 16px 0; padding: 10px 0 12px; }
  .shape{ padding-inline: 5px; }
  .shape .ico{ width: 22px; height: 22px; }
  .shape .cn{ font-size: 11px; letter-spacing: .1em; }
  .cam{ height: 60px; }
  .cam.live{ height: 108px; }
  .sense-opts button{ min-width: 38px; padding: 4px 7px; }
  .mobile-fab{
    display: grid; place-items: center;
    position: absolute; right: 16px; bottom: 18px; z-index: 45;
    width: 46px; height: 46px; border-radius: 50%;
    border: 1px solid rgba(201,169,110,.4);
    background: rgba(8,10,12,.75);
    color: var(--gold);
    box-shadow: 0 8px 30px rgba(0,0,0,.5);
  }
  .mobile-fab svg{ width: 18px; height: 18px; }
  .hand-hud{ left: 20px; bottom: 74px; }
  .gesture-badge{ top: 78px; }
}

@media (max-height: 760px) and (min-width: 981px){
  .panel{ top: 88px; bottom: 16px; }
  .panel-body{ padding-top: 18px; }
  .cam{ height: 108px; }
  .sec-h{ margin: 16px 0 9px; }
  .sliders{ gap: 10px; }
  .gest-legend{ gap: 6px; }
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* Keep the static grain layer out of the default compositing path. */
.eco .grain { display: none; }
.eco .ambient { filter: none; }

/* The lacquer-black surface keeps the relief and fine chips visible. */
.bg { background: radial-gradient(ellipse at 43% 42%, #181c1c 0%, #0d1112 55%, #07090a 100%); }
.vignette { background: radial-gradient(ellipse at 48% 47%, transparent 62%, rgba(0,0,0,.25) 100%); }
.topbar { align-items: flex-start; }
.brand-title { gap: 16px; }
.brand-title h1 { letter-spacing: .17em; }
.tool { border-radius: 50%; border-color: transparent; background: rgba(14,17,18,.76); }
.tool:focus-visible, .shape:focus-visible, .pal:focus-visible, .nacre-study a:focus-visible,
.material-reset:focus-visible, .material-more summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.panel {
  border-radius: 18px;
  background: linear-gradient(155deg, #181b1a, #101313 50%, #0b0e10);
  border-color: var(--gold-line);
}
.panel-body { padding-bottom: 12px; }
.sec-h h2 { font-size: 14px; letter-spacing: .13em; }
.pal span, .slider-row label, .slider-row output { font-size: 11px; }
.slider-row label { width: 61px; letter-spacing: .04em; }
.slider-row output { width: 42px; }
.material-reset, .material-more summary {
  color: var(--ivory-dim);
  letter-spacing: .06em;
  font-size: 11px;
  cursor: pointer;
}
.material-reset { padding: 5px 0 5px 8px; }
.material-more { border-top: 1px solid var(--gold-line-2); padding-top: 7px; }
.material-more summary { padding: 4px 0 6px; }
.material-more .slider-row { margin-top: 8px; }
.frame .corner { opacity: .42; }
@media (max-width: 600px) {
  .brand-title .latin { display: none; }
  .brand-title h1 { font-size: 27px; }
  .brand-subtitle { width: clamp(160px, 48vw, 205px); }
  .topbar { display: block; padding-inline: 17px; }
  .toolbar { position: absolute; top: 22px; right: 17px; gap: 5px; }
  .tool { width: 34px; height: 34px; }
  .seal { width: 34px; height: 34px; }
  .brand { width: max-content; align-items: flex-start; gap: 8px; }
  .brand-copy { gap: 8px; }
}
@media (max-width: 380px) {
  .topbar { padding-inline: 13px; }
  .brand { gap: 6px; }
  .brand-title h1 { font-size: 24px; letter-spacing: .09em; }
  .seal { width: 29px; height: 29px; }
  .toolbar { right: 13px; gap: 4px; }
  .toolbar .tool { width: 30px; height: 30px; }
}
