:root {
  --bg: #07110d;
  --bg-deep: #040a07;
  --surface: #0c1713;
  --surface-2: #101e18;
  --surface-3: #15261f;
  --ink: #f2ecdd;
  --ink-soft: #d6cfbf;
  --muted: #93a096;
  --muted-2: #6f7d73;
  --gold: #d8b979;
  --gold-bright: #f0d49a;
  --mint: #8ed8bd;
  --line: rgba(216, 185, 121, 0.18);
  --line-soft: rgba(233, 226, 208, 0.09);
  --species-base: #e8822b;
  --species-glow: #f0a15a;
  --species-accent: #f6ebd5;
  --species-edge: #171310;
  --serif: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  --sans: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Hiragino Sans GB", sans-serif;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --radius-xl: 24px;
  --radius-lg: 17px;
  --radius-md: 12px;
  --shadow-panel: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body.modal-open {
  overflow: hidden;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 1px solid var(--gold-bright);
  outline-offset: 3px;
}

::selection {
  background: rgba(216, 185, 121, 0.28);
  color: #fffaf0;
}

/* ---------- atmosphere ---------- */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 13% 6%, rgba(42, 86, 63, 0.32), transparent 58%),
    radial-gradient(ellipse 65% 55% at 88% 92%, rgba(75, 55, 29, 0.24), transparent 65%),
    linear-gradient(135deg, #08130f 0%, #06100c 48%, #050c09 100%);
}

.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.24;
  animation: aurora-drift 26s ease-in-out infinite alternate;
}

.aurora-a {
  width: 55vw;
  height: 58vh;
  left: -16vw;
  top: -24vh;
  background: rgba(52, 119, 90, 0.7);
}

.aurora-b {
  width: 46vw;
  height: 48vh;
  right: -14vw;
  top: 22vh;
  background: rgba(103, 78, 35, 0.6);
  animation-delay: -9s;
}

.aurora-c {
  width: 38vw;
  height: 40vh;
  left: 30vw;
  bottom: -24vh;
  background: rgba(32, 83, 74, 0.55);
  animation-delay: -16s;
}

@keyframes aurora-drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(4vw, 3vh, 0) scale(1.12); }
}

.firefly {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #e8cd8d;
  box-shadow: 0 0 14px 4px rgba(232, 205, 141, 0.4);
  opacity: 0;
  animation: firefly 9s ease-in-out infinite;
}

.f1 { left: 7%; top: 35%; animation-delay: 0s; }
.f2 { left: 19%; top: 73%; animation-delay: -2s; width: 2px; height: 2px; }
.f3 { left: 38%; top: 16%; animation-delay: -5s; }
.f4 { left: 57%; top: 84%; animation-delay: -7s; width: 2px; height: 2px; }
.f5 { left: 69%; top: 28%; animation-delay: -3s; }
.f6 { left: 81%; top: 61%; animation-delay: -6s; width: 2px; height: 2px; }
.f7 { left: 91%; top: 18%; animation-delay: -1s; }
.f8 { left: 46%; top: 48%; animation-delay: -8s; width: 2px; height: 2px; }

@keyframes firefly {
  0%, 100% { opacity: 0; transform: translate3d(0, 18px, 0) scale(0.6); }
  24% { opacity: 0.7; }
  55% { opacity: 0.25; transform: translate3d(12px, -24px, 0) scale(1); }
  78% { opacity: 0.56; }
}

.botanical {
  position: absolute;
  width: 26vw;
  height: 48vh;
  opacity: 0.1;
  background:
    radial-gradient(ellipse at 20% 80%, transparent 52%, rgba(166, 192, 143, 0.55) 53%, transparent 54%),
    radial-gradient(ellipse at 72% 28%, transparent 52%, rgba(166, 192, 143, 0.48) 53%, transparent 54%),
    radial-gradient(ellipse at 48% 50%, transparent 55%, rgba(166, 192, 143, 0.3) 56%, transparent 57%);
  filter: blur(0.4px);
}

.botanical-left {
  left: -8vw;
  bottom: -14vh;
  transform: rotate(-22deg);
}

.botanical-right {
  right: -9vw;
  top: -10vh;
  transform: rotate(158deg);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.62'/%3E%3C/svg%3E");
}

/* ---------- top bar ---------- */
.topbar {
  position: relative;
  z-index: 10;
  height: 78px;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(4, 11, 8, 0.65), rgba(4, 11, 8, 0));
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(216, 185, 121, 0.44);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, rgba(216, 185, 121, 0.15), transparent 70%);
}

.brand-mark svg {
  width: 27px;
  height: 27px;
  stroke: var(--gold);
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-word {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.brand-word strong {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 1;
}

.brand-word em {
  font-family: var(--mono);
  font-style: normal;
  font-size: 8px;
  letter-spacing: 0.24em;
  color: var(--muted);
}

.topbar-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.24em;
  white-space: nowrap;
}

.topbar-line {
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(216, 185, 121, 0.4));
}

.topbar-line:last-child {
  transform: scaleX(-1);
}

.topbar-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.08em;
  transition: 0.25s ease;
}

.btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.015);
}

.btn-ghost:hover {
  border-color: rgba(216, 185, 121, 0.46);
  background: rgba(216, 185, 121, 0.06);
}

.btn-solid {
  color: #171208;
  background: linear-gradient(135deg, #e6cb91, #c9a35f);
  box-shadow: 0 8px 26px rgba(194, 152, 78, 0.16);
  font-weight: 600;
}

.btn-solid:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

.btn-count {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(17, 13, 6, 0.18);
  font-family: var(--mono);
  font-size: 9px;
}

/* ---------- main layout ---------- */
.layout {
  position: relative;
  z-index: 2;
  height: calc(100vh - 78px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 392px;
  gap: 20px;
  padding: 18px 28px 20px;
  min-height: 0;
}

.showcase {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 12px;
  min-width: 0;
  min-height: 0;
}

/* ---------- stage ---------- */
.stage {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(ellipse 52% 68% at 50% 47%, rgba(28, 52, 40, 0.5), transparent 70%),
    linear-gradient(150deg, rgba(17, 32, 25, 0.76), rgba(5, 13, 9, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), var(--shadow-panel);
  isolation: isolate;
}

.stage::before {
  content: "";
  position: absolute;
  inset: 9px;
  z-index: 1;
  border: 1px solid rgba(216, 185, 121, 0.08);
  border-radius: calc(var(--radius-xl) - 8px);
  pointer-events: none;
}

.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(216, 185, 121, 0.4), transparent 14%) top left / 34px 1px no-repeat,
    linear-gradient(180deg, rgba(216, 185, 121, 0.4), transparent 14%) top left / 1px 34px no-repeat,
    linear-gradient(270deg, rgba(216, 185, 121, 0.4), transparent 14%) top right / 34px 1px no-repeat,
    linear-gradient(180deg, rgba(216, 185, 121, 0.4), transparent 14%) top right / 1px 34px no-repeat,
    linear-gradient(90deg, rgba(216, 185, 121, 0.22), transparent 14%) bottom left / 34px 1px no-repeat,
    linear-gradient(0deg, rgba(216, 185, 121, 0.22), transparent 14%) bottom left / 1px 34px no-repeat,
    linear-gradient(270deg, rgba(216, 185, 121, 0.22), transparent 14%) bottom right / 34px 1px no-repeat,
    linear-gradient(0deg, rgba(216, 185, 121, 0.22), transparent 14%) bottom right / 1px 34px no-repeat;
}

.stage-glow {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 48%;
  width: min(74%, 760px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--species-glow) 34%, transparent) 0%, transparent 64%);
  filter: blur(22px);
  opacity: 0.5;
  transition: background 0.9s ease;
  pointer-events: none;
}

.stage-top {
  position: absolute;
  z-index: 5;
  top: 24px;
  left: 28px;
  right: 28px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  pointer-events: none;
}

.specimen-caption .eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.22em;
  color: var(--muted-2);
  text-transform: uppercase;
}

.specimen-caption .eyebrow b {
  color: var(--gold);
  font-weight: 500;
}

.specimen-caption .eyebrow i {
  font-style: normal;
  opacity: 0.4;
}

.specimen-caption h1 {
  margin: 9px 0 2px;
  font-family: var(--serif);
  font-size: clamp(24px, 2.2vw, 33px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: 0.09em;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.specimen-caption > p {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.08em;
}

.specimen-caption > p i {
  font-family: var(--serif);
}

.stage-tools {
  display: flex;
  gap: 7px;
  pointer-events: auto;
}

.icon-btn {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: rgba(4, 11, 8, 0.24);
  transition: 0.22s ease;
  backdrop-filter: blur(8px);
}

.icon-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn:hover {
  color: var(--gold-bright);
  border-color: rgba(216, 185, 121, 0.45);
  background: rgba(216, 185, 121, 0.07);
}

.halo {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 48%;
  width: min(82%, 800px);
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
}

.halo-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(216, 185, 121, 0.1);
}

.halo-ring-a {
  inset: 6%;
  border-style: dashed;
  border-color: rgba(216, 185, 121, 0.11);
  animation: slow-spin 80s linear infinite;
}

.halo-ring-b {
  inset: 19%;
  border-color: rgba(216, 185, 121, 0.15);
}

.halo-ring-c {
  inset: 32%;
  border-color: rgba(216, 185, 121, 0.07);
}

.halo-ring-a::before,
.halo-ring-b::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(216, 185, 121, 0.8);
}

.halo-ring-b::before {
  left: 17%;
  top: 10%;
  width: 3px;
  height: 3px;
  opacity: 0.7;
}

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

.halo-orbit {
  position: absolute;
  left: 3%;
  right: 3%;
  top: 36%;
  height: 31%;
  border: 1px solid rgba(216, 185, 121, 0.12);
  border-radius: 50%;
  transform: rotate(-11deg);
}

.halo-orbit::after {
  content: "";
  position: absolute;
  right: 8%;
  top: 12%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--species-glow);
  box-shadow: 0 0 12px var(--species-glow);
}

.halo-cross {
  position: absolute;
  width: 9px;
  height: 9px;
  opacity: 0.4;
}

.halo-cross::before,
.halo-cross::after {
  content: "";
  position: absolute;
  background: var(--gold);
}

.halo-cross::before {
  left: 4px;
  top: 0;
  width: 1px;
  height: 9px;
}

.halo-cross::after {
  left: 0;
  top: 4px;
  width: 9px;
  height: 1px;
}

.halo-cross-a { left: 2%; top: 48%; }
.halo-cross-b { right: 2%; top: 48%; }

.butterfly-mount {
  position: absolute;
  z-index: 2;
  inset: 0;
}

.butterfly-webgl {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}

.butterfly-webgl.is-dragging {
  cursor: grabbing;
}

.stage-foot {
  position: absolute;
  z-index: 5;
  left: 28px;
  right: 28px;
  bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  color: var(--muted-2);
}

.live-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.live-tag i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px rgba(142, 216, 189, 0.7);
  animation: live-pulse 2.8s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.rotation-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rotation-state.is-on {
  color: var(--gold);
}

.drag-note {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(214, 207, 191, 0.35);
  font-size: 9px;
  letter-spacing: 0.14em;
  pointer-events: none;
}

.drag-note svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
}

/* ---------- control bar ---------- */
.control-bar {
  min-height: 102px;
  display: grid;
  grid-template-columns: minmax(250px, 1fr) auto minmax(250px, 1fr);
  align-items: center;
  gap: 18px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(120deg, rgba(20, 37, 29, 0.84), rgba(7, 16, 12, 0.9)),
    rgba(9, 20, 15, 0.85);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.gesture-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.camera-frame {
  position: relative;
  flex: 0 0 138px;
  width: 138px;
  height: 88px;
  overflow: hidden;
  border: 1px solid rgba(216, 185, 121, 0.16);
  border-radius: 11px;
  background:
    radial-gradient(circle at 50% 40%, rgba(44, 76, 61, 0.38), transparent 70%),
    #07100c;
  transition: border-color 0.3s ease;
}

.camera-frame video,
.camera-frame canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.camera-frame canvas {
  pointer-events: none;
}

.gesture-card.is-on .camera-frame,
.gesture-card.is-loading .camera-frame {
  border-color: rgba(216, 185, 121, 0.46);
}

.gesture-card.is-on .camera-frame video,
.gesture-card.is-on .camera-frame canvas {
  opacity: 1;
}

.camera-idle {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: opacity 0.25s ease;
}

.gesture-card.is-on .camera-idle,
.gesture-card.is-loading .camera-idle {
  opacity: 0;
  pointer-events: none;
}

.camera-hand {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  color: rgba(216, 185, 121, 0.46);
}

.camera-hand svg {
  width: 35px;
  height: 35px;
  stroke: currentColor;
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.camera-enable {
  padding: 3px 10px;
  border: 1px solid rgba(216, 185, 121, 0.35);
  border-radius: 999px;
  color: var(--gold-bright);
  font-size: 9px;
  letter-spacing: 0.12em;
  transition: 0.22s ease;
}

.camera-enable:hover {
  background: rgba(216, 185, 121, 0.12);
}

.camera-enable:disabled {
  opacity: 0.5;
  cursor: wait;
}

.camera-loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: rgba(5, 12, 9, 0.86);
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.gesture-card.is-loading .camera-loading {
  display: flex;
}

.mini-spinner {
  width: 17px;
  height: 17px;
  border: 1.5px solid rgba(216, 185, 121, 0.18);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

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

.camera-badge {
  position: absolute;
  z-index: 5;
  top: 6px;
  left: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(4, 11, 8, 0.68);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  backdrop-filter: blur(6px);
}

.camera-badge i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted-2);
}

.gesture-card.is-on .camera-badge {
  color: var(--ink-soft);
}

.gesture-card.is-on .camera-badge i {
  background: var(--mint);
  box-shadow: 0 0 7px var(--mint);
}

.gesture-card.gesture-open .camera-badge i {
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}

.gesture-card.gesture-fist .camera-badge i {
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
}

.gesture-card.has-error .camera-frame {
  border-color: rgba(207, 108, 91, 0.6);
}

.gesture-stop {
  position: absolute;
  z-index: 6;
  top: 5px;
  right: 5px;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(4, 11, 8, 0.64);
  color: var(--ink-soft);
}

.gesture-stop svg {
  width: 10px;
  height: 10px;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.gesture-copy {
  min-width: 0;
  flex: 1;
}

.gesture-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.gesture-title-row strong {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.finger-dots {
  display: flex;
  gap: 3px;
}

.finger-dots i {
  width: 4px;
  height: 11px;
  border-radius: 999px;
  background: rgba(214, 207, 191, 0.16);
  transition: 0.2s ease;
}

.finger-dots i.filled {
  background: var(--gold);
  box-shadow: 0 0 7px rgba(216, 185, 121, 0.4);
}

.gesture-copy p {
  margin: 5px 0 8px;
  min-height: 27px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  letter-spacing: 0.02em;
}

.manual-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.manual-row button {
  height: 21px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
  transition: 0.2s ease;
}

.manual-row button:hover,
.manual-row button.is-active {
  border-color: rgba(216, 185, 121, 0.5);
  color: var(--gold-bright);
  background: rgba(216, 185, 121, 0.08);
}

.manual-row > span {
  margin-left: 3px;
  color: rgba(147, 160, 150, 0.38);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
}

.rotate-stack {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-top: 2px;
}

.orbit-btn {
  position: relative;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.orbit-btn-halo {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(216, 185, 121, 0.3);
  animation: slow-spin 30s linear infinite;
}

.orbit-btn-halo::before {
  content: "";
  position: absolute;
  top: -3px;
  left: calc(50% - 2px);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(216, 185, 121, 0.8);
}

.orbit-btn-core {
  position: absolute;
  inset: 6px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(216, 185, 121, 0.35);
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 30%, rgba(216, 185, 121, 0.14), transparent 60%),
    rgba(8, 19, 14, 0.92);
  box-shadow: inset 0 0 20px rgba(216, 185, 121, 0.06), 0 0 26px rgba(216, 185, 121, 0.05);
  transition: 0.3s ease;
}

.orbit-btn-core svg {
  width: 31px;
  height: 31px;
  stroke: var(--gold);
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: 0.3s ease;
}

.orbit-btn:hover .orbit-btn-core {
  border-color: rgba(216, 185, 121, 0.7);
  box-shadow: inset 0 0 24px rgba(216, 185, 121, 0.12), 0 0 32px rgba(216, 185, 121, 0.16);
}

.orbit-btn.is-active .orbit-btn-core {
  background: linear-gradient(135deg, #f0d49a, #cba35d);
  border-color: transparent;
  box-shadow: 0 0 34px rgba(216, 185, 121, 0.34);
}

.orbit-btn.is-active .orbit-btn-core svg {
  stroke: #171208;
}

.orbit-btn.is-active .orbit-btn-halo {
  animation-duration: 6s;
  border-color: rgba(240, 212, 154, 0.6);
}

.rotate-label {
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.rotate-sub {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.stage-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 13px;
  min-width: 0;
}

.gesture-hint {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  text-align: right;
}

.gesture-hint b {
  color: var(--ink-soft);
  font-weight: 500;
}

.gesture-hint > i {
  width: 1px;
  height: 11px;
  background: var(--line);
}

.hint-hand {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold);
}

.hint-hand svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.species-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-arrow {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-soft);
  transition: 0.22s ease;
}

.nav-arrow svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-arrow:hover {
  border-color: rgba(216, 185, 121, 0.5);
  color: var(--gold-bright);
  background: rgba(216, 185, 121, 0.06);
}

.nav-count {
  min-width: 62px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  font-family: var(--mono);
}

.nav-count b {
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
}

.nav-count i {
  color: var(--muted-2);
  font-size: 9px;
  font-style: normal;
}

/* ---------- catalog strip ---------- */
.catalog-strip {
  min-height: 104px;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(100deg, rgba(17, 32, 25, 0.68), rgba(6, 14, 10, 0.82));
}

.strip-head {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--line-soft);
  padding-right: 14px;
}

.strip-head strong {
  margin: 5px 0 6px;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.strip-head button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0;
  color: var(--gold);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-align: left;
}

.strip-head button span {
  transition: transform 0.2s ease;
}

.strip-head button:hover span {
  transform: translateX(3px);
}

.strip-track {
  display: flex;
  gap: 7px;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 22px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 22px), transparent);
  padding: 0 4px;
}

.strip-track::-webkit-scrollbar {
  display: none;
}

.strip-item {
  position: relative;
  flex: 0 0 64px;
  width: 64px;
  height: 82px;
  padding: 3px 3px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.012);
  scroll-snap-align: center;
  transition: 0.22s ease;
}

.strip-item canvas {
  width: 57px;
  height: 50px;
  display: block;
}

.strip-item .no {
  position: absolute;
  top: 3px;
  left: 5px;
  color: rgba(147, 160, 150, 0.5);
  font-family: var(--mono);
  font-size: 6.5px;
}

.strip-item .name {
  max-width: 100%;
  margin-top: 1px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.strip-item:hover {
  background: rgba(216, 185, 121, 0.04);
  border-color: rgba(216, 185, 121, 0.16);
}

.strip-item.is-active {
  border-color: rgba(216, 185, 121, 0.52);
  background: linear-gradient(180deg, rgba(216, 185, 121, 0.11), rgba(216, 185, 121, 0.025));
}

.strip-item.is-active .name {
  color: var(--gold-bright);
}

.strip-item.is-active::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: 16px;
  height: 1px;
  transform: translateX(-50%);
  background: var(--gold-bright);
  box-shadow: 0 0 9px var(--gold);
}

/* ---------- info panel ---------- */
.info-panel {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(216, 185, 121, 0.035), transparent 20%),
    linear-gradient(145deg, #111f19, #0b1611 58%, #08110d);
  box-shadow: var(--shadow-panel), inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.info-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 30px;
  right: 30px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--species-glow), transparent);
  opacity: 0.62;
  transition: background 0.6s ease;
}

.panel-inner {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px 25px 22px;
  scrollbar-width: thin;
  scrollbar-color: rgba(216, 185, 121, 0.26) transparent;
}

.panel-inner::-webkit-scrollbar {
  width: 4px;
}

.panel-inner::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(216, 185, 121, 0.24);
}

.panel-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line-soft);
}

.family-chip,
.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 8.5px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.family-chip {
  border: 1px solid rgba(216, 185, 121, 0.3);
  color: var(--gold);
  background: rgba(216, 185, 121, 0.045);
}

.status-chip {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
}

.status-chip.is-protected {
  color: #eccf91;
  background: rgba(210, 163, 71, 0.12);
}

.status-chip.is-watch {
  color: #b6d9c4;
  background: rgba(101, 171, 137, 0.11);
}

.status-chip::before {
  content: "";
  width: 3px;
  height: 3px;
  margin-right: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.8;
}

.panel-heading {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
  padding: 17px 0 10px;
}

.panel-index {
  font-family: var(--serif);
  font-size: 42px;
  line-height: 0.9;
  font-weight: 400;
  color: transparent;
  -webkit-text-stroke: 1px rgba(216, 185, 121, 0.44);
  opacity: 0.72;
}

.panel-name {
  min-width: 0;
}

.panel-name h2 {
  margin: -2px 0 3px;
  font-family: var(--serif);
  font-size: clamp(30px, 2.3vw, 38px);
  font-weight: 500;
  line-height: 1.13;
  letter-spacing: 0.08em;
}

.panel-name p {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 12.5px;
  letter-spacing: 0.035em;
}

.panel-name > span {
  display: inline-block;
  margin-top: 6px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.intro {
  margin: 9px 0 16px;
  color: #b8c1b8;
  font-size: 12.2px;
  line-height: 1.85;
  letter-spacing: 0.02em;
  text-align: justify;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background: var(--line-soft);
}

.stat-cell {
  min-height: 60px;
  padding: 10px 11px;
  background: rgba(7, 17, 12, 0.78);
}

.stat-cell span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: 0.13em;
}

.stat-cell strong {
  display: block;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0.02em;
}

.panel-section {
  margin-top: 20px;
}

.section-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.section-title > span {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 8px;
}

.section-title h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.section-title i {
  margin-left: auto;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 7px;
  font-style: normal;
  letter-spacing: 0.16em;
}

.traits {
  display: flex;
  flex-direction: column;
}

.trait-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 9px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
}

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

.trait-item span {
  color: rgba(216, 185, 121, 0.52);
  font-family: var(--mono);
  font-size: 8px;
}

.trait-item p {
  margin: 0;
  color: #c1c9c0;
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.02em;
}

.range-card {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.012);
}

.range-row {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  gap: 9px;
  padding: 10px 11px;
}

.range-row + .range-row {
  border-top: 1px solid var(--line-soft);
}

.range-row svg {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  stroke: var(--gold);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.7;
}

.range-row span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.range-row p {
  margin: 0;
  color: #bcc5bb;
  font-size: 10.5px;
  line-height: 1.55;
}

.fact-card {
  position: relative;
  margin: 21px 0 17px;
  padding: 15px 16px 15px 17px;
  overflow: hidden;
  border: 1px solid rgba(216, 185, 121, 0.25);
  border-radius: 11px;
  background:
    radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--species-glow) 14%, transparent), transparent 58%),
    linear-gradient(135deg, rgba(216, 185, 121, 0.075), rgba(216, 185, 121, 0.015));
}

.fact-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.16em;
}

.fact-kicker i {
  margin-left: 4px;
  color: var(--muted);
  font-style: normal;
  letter-spacing: 0.08em;
}

.fact-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #c8cfc5;
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.85;
  letter-spacing: 0.035em;
  text-align: justify;
}

.fact-mark {
  position: absolute;
  right: -4px;
  bottom: -8px;
  width: 70px;
  height: 70px;
  stroke: var(--gold);
  stroke-width: 0.6;
  opacity: 0.11;
}

.panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 2px;
}

.palette-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.palette-row > span {
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.palette {
  display: flex;
  gap: 4px;
}

.palette i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.next-species {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0 7px 9px;
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.next-species span {
  font-family: var(--mono);
  transition: transform 0.2s ease;
}

.next-species:hover span {
  transform: translateX(4px);
}

.panel-disclaimer {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.6;
  letter-spacing: 0.04em;
}

/* panel update transition */
.panel-inner.is-updating .panel-heading,
.panel-inner.is-updating .intro,
.panel-inner.is-updating .stats-grid,
.panel-inner.is-updating .panel-section,
.panel-inner.is-updating .fact-card {
  animation: panel-in 0.48s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

.panel-inner.is-updating .intro { animation-delay: 0.03s; }
.panel-inner.is-updating .stats-grid { animation-delay: 0.06s; }
.panel-inner.is-updating .panel-section { animation-delay: 0.09s; }
.panel-inner.is-updating .fact-card { animation-delay: 0.12s; }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.stage.is-switching .butterfly-mount {
  animation: specimen-in 0.7s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

@keyframes specimen-in {
  from { opacity: 0.2; transform: scale(0.96); filter: blur(2px); }
  to { opacity: 1; transform: scale(1); filter: blur(0); }
}

/* ---------- modals ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 28px;
}

.modal.is-open {
  display: grid;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 7, 5, 0.78);
  backdrop-filter: blur(15px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100vw - 56px));
  max-height: min(88vh, 880px);
  padding: 27px 30px 28px;
  overflow: hidden;
  border: 1px solid rgba(216, 185, 121, 0.28);
  border-radius: 22px;
  background:
    radial-gradient(ellipse 60% 50% at 15% 0%, rgba(56, 92, 72, 0.24), transparent 62%),
    linear-gradient(150deg, #13231b, #08120d 70%);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex: 0 0 auto;
}

.modal-head h2 {
  margin: 6px 0 4px;
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 500;
  letter-spacing: 0.08em;
}

.modal-head h2 i {
  margin-left: 7px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 12px;
  font-style: normal;
  vertical-align: super;
}

.modal-head p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.modal-close {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transition: 0.22s ease;
}

.modal-close svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
}

.modal-close:hover {
  color: var(--gold-bright);
  border-color: rgba(216, 185, 121, 0.5);
  transform: rotate(90deg);
}

.catalog-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: 0 0 auto;
  margin: 22px 0 15px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.family-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-btn {
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  transition: 0.2s ease;
}

.filter-btn:hover {
  color: var(--ink-soft);
  border-color: rgba(216, 185, 121, 0.32);
}

.filter-btn.is-active {
  color: #171208;
  border-color: transparent;
  background: var(--gold);
}

.search-box {
  flex: 0 0 235px;
  height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.02);
}

.search-box:focus-within {
  border-color: rgba(216, 185, 121, 0.42);
}

.search-box svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  stroke: var(--muted-2);
  stroke-width: 1.3;
  stroke-linecap: round;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: none;
  color: var(--ink-soft);
  font-size: 10.5px;
  letter-spacing: 0.02em;
}

.search-box input::placeholder {
  color: var(--muted-2);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  min-height: 0;
  padding: 2px 6px 6px 2px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(216, 185, 121, 0.24) transparent;
}

.catalog-grid::-webkit-scrollbar {
  width: 4px;
}

.catalog-grid::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(216, 185, 121, 0.24);
}

.catalog-card {
  position: relative;
  min-height: 160px;
  padding: 9px 9px 10px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.015);
  text-align: left;
  transition: 0.22s ease;
}

.catalog-card:hover {
  border-color: rgba(216, 185, 121, 0.38);
  background: rgba(216, 185, 121, 0.045);
  transform: translateY(-2px);
}

.catalog-card.is-active {
  border-color: rgba(216, 185, 121, 0.58);
  background: linear-gradient(180deg, rgba(216, 185, 121, 0.10), rgba(216, 185, 121, 0.02));
}

.catalog-card canvas {
  width: 100%;
  height: 83px;
  display: block;
}

.card-no {
  position: absolute;
  top: 10px;
  left: 11px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 7px;
}

.card-name {
  flex: 0 0 auto;
  margin-top: 6px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-latin {
  flex: 0 0 auto;
  margin-top: 1px;
  overflow: hidden;
  color: var(--muted-2);
  font-family: var(--serif);
  font-size: 8.5px;
  font-style: italic;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-family {
  flex: 0 0 auto;
  margin-top: auto;
  padding-top: 5px;
  color: var(--gold);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  opacity: 0.8;
}

.catalog-empty {
  padding: 40px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

/* guide */
.guide-panel {
  width: min(880px, calc(100vw - 56px));
}

.guide-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--line-soft);
}

.guide-step {
  position: relative;
  padding: 22px 20px 20px;
  background: rgba(7, 17, 12, 0.88);
}

.guide-num {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.guide-icon {
  width: 74px;
  height: 74px;
  margin: 16px 0 13px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(216, 185, 121, 0.2);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 185, 121, 0.09), transparent 68%);
  color: var(--gold);
}

.guide-icon svg {
  width: 48px;
  height: 48px;
  stroke: currentColor;
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.guide-step h3 {
  margin: 0 0 7px;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.guide-step p {
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.75;
}

.guide-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  padding: 13px 15px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.015);
}

.note-dot {
  flex: 0 0 5px;
  width: 5px;
  height: 5px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
}

.guide-note p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.guide-note kbd {
  display: inline-block;
  min-width: 17px;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 8px;
  text-align: center;
}

.guide-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
}

.toast {
  position: fixed;
  z-index: 300;
  left: 50%;
  bottom: 30px;
  max-width: min(460px, calc(100vw - 40px));
  padding: 10px 16px;
  border: 1px solid rgba(216, 185, 121, 0.32);
  border-radius: 999px;
  background: rgba(7, 17, 12, 0.94);
  color: var(--ink-soft);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  transition: 0.3s ease;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* fullscreen */
.showcase:fullscreen {
  padding: 18px;
  background: #07110d;
  display: grid;
}

.showcase:fullscreen .stage {
  min-height: 0;
}

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 356px;
    gap: 16px;
    padding: 16px 20px 18px;
  }

  .control-bar {
    grid-template-columns: minmax(232px, 1fr) auto minmax(220px, 1fr);
    gap: 12px;
    padding: 10px 14px;
  }

  .camera-frame {
    flex-basis: 122px;
    width: 122px;
    height: 82px;
  }

  .gesture-hint {
    font-size: 9px;
  }

  .topbar-center {
    display: none;
  }
}

@media (max-width: 1060px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 328px;
  }

  .control-bar {
    grid-template-columns: minmax(210px, 1fr) auto minmax(170px, 1fr);
  }

  .camera-frame {
    flex-basis: 106px;
    width: 106px;
    height: 76px;
  }

  .gesture-card {
    gap: 9px;
  }

  .gesture-copy p {
    font-size: 9.5px;
  }

  .gesture-hint {
    display: none;
  }

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

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .topbar {
    height: 68px;
    padding: 0 18px;
  }

  .brand-word strong {
    font-size: 18px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .btn-ghost {
    padding: 0 11px;
  }

  .layout {
    height: auto;
    grid-template-columns: 1fr;
    padding: 12px 14px 18px;
  }

  .showcase {
    grid-template-rows: minmax(500px, 66vh) auto auto;
  }

  .stage {
    min-height: 500px;
  }

  .info-panel {
    margin-top: 2px;
  }

  .panel-inner {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .panel-name h2 {
    font-size: 34px;
  }

  .control-bar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .stage-nav {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding-top: 4px;
    border-top: 1px solid var(--line-soft);
  }

  .gesture-hint {
    display: flex;
  }

  .catalog-strip {
    grid-template-columns: 100px minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  .topbar {
    padding: 0 13px;
  }

  .brand-word em {
    display: none;
  }

  .btn-ghost {
    font-size: 0;
    width: 34px;
    padding: 0;
  }

  .btn-ghost svg {
    width: 17px;
    height: 17px;
  }

  .btn-solid {
    padding: 0 11px;
    font-size: 10px;
  }

  .layout {
    padding: 10px 10px 16px;
  }

  .showcase {
    grid-template-rows: minmax(410px, 59vh) auto auto;
    gap: 9px;
  }

  .stage {
    min-height: 410px;
  }

  .stage-top {
    left: 18px;
    right: 18px;
    top: 18px;
  }

  .specimen-caption h1 {
    font-size: 24px;
  }

  .stage-foot {
    left: 18px;
    right: 18px;
    bottom: 14px;
  }

  .drag-note {
    display: none;
  }

  .control-bar {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 14px;
    gap: 12px;
  }

  .gesture-card {
    width: 100%;
    justify-content: center;
  }

  .camera-frame {
    flex-basis: 128px;
    width: 128px;
    height: 84px;
  }

  .gesture-copy {
    max-width: 190px;
  }

  .gesture-title-row {
    justify-content: flex-start;
    gap: 10px;
  }

  .stage-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .gesture-hint {
    justify-content: center;
    text-align: center;
  }

  .species-nav {
    justify-content: space-between;
  }

  .catalog-strip {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .strip-head {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 0 0 6px;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .strip-head strong {
    margin: 0;
  }

  .strip-head button {
    margin-left: auto;
  }

  .strip-track {
    min-height: 82px;
  }

  .info-panel {
    border-radius: 18px;
  }

  .panel-inner {
    padding: 20px 18px;
  }

  .modal {
    padding: 10px;
  }

  .modal-panel {
    width: 100%;
    max-height: 92vh;
    padding: 20px 16px;
    border-radius: 18px;
  }

  .modal-head h2 {
    font-size: 26px;
  }

  .catalog-tools {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    flex-basis: auto;
    width: 100%;
  }

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

  .guide-steps {
    grid-template-columns: 1fr;
  }

  .guide-step {
    display: grid;
    grid-template-columns: 45px 1fr;
    column-gap: 12px;
    padding: 15px;
  }

  .guide-num {
    grid-column: 1 / -1;
  }

  .guide-icon {
    grid-row: 2 / 4;
    width: 45px;
    height: 45px;
    margin: 6px 0 0;
  }

  .guide-icon svg {
    width: 30px;
    height: 30px;
  }

  .guide-step h3 {
    margin-top: 9px;
  }

  .guide-actions {
    justify-content: stretch;
  }

  .guide-actions .btn {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aurora,
  .firefly,
  .halo-ring-a,
  .orbit-btn-halo {
    animation: none !important;
  }
}
