@import url("https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Noto+Serif+SC:wght@300;400;600&family=Rajdhani:wght@300;500;700&display=swap");

:root {
  --bg: #080c10;
  --panel: #0d1520;
  --border: #1a3048;
  --accent: #2af5d0;
  --accent2: #0ea5e9;
  --warn: #f59e0b;
  --text: #c8dde8;
  --dim: #b9d3df;
  --white: #eaf6fb;
  --red: #ef4444;
  --radius: 4px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Serif SC", serif;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── SCREENS ─────────────────────────────────────────────── */
.screen {
  display: none;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}
.screen.active {
  display: flex;
}

/* ─── TITLE SCREEN ────────────────────────────────────────── */
#title-screen {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 60%, #0a1e30 0%, #080c10 70%);
}
#title-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 39px,
      #0d1e2e55 39px,
      #0d1e2e55 40px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 39px,
      #0d1e2e55 39px,
      #0d1e2e55 40px
    );
}
.title-main {
  font-family: "Rajdhani", sans-serif;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--white);
  text-shadow:
    0 0 40px var(--accent2),
    0 0 80px #0ea5e940;
  position: relative;
}
.title-sub {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.85rem;
  letter-spacing: 0.4em;
  color: var(--dim);
  margin-top: 0.5rem;
  position: relative;
}
.title-btn {
  margin-top: 3rem;
  padding: 0.75rem 2.5rem;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: "Share Tech Mono", monospace;
  font-size: 1rem;
  letter-spacing: 0.2em;
  cursor: pointer;
  position: relative;
  transition:
    background 0.2s,
    color 0.2s,
    box-shadow 0.2s;
}
.title-btn:hover {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 20px var(--accent);
}

/* ─── VN SCREEN ────────────────────────────────────────────── */
#vn-screen {
  flex-direction: column;
}

.vn-bg {
  position: absolute;
  inset: 0;
  background: #0a1520;
  transition: background 1s;
  overflow: hidden;
}
.vn-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 1s;
}

.vn-ui {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* top HUD */
.vn-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1.2rem;
  background: linear-gradient(to bottom, #080c10cc, transparent);
  font-family: "Share Tech Mono", monospace;
  font-size: 0.7rem;
  color: var(--dim);
  letter-spacing: 0.1em;
}
.vn-hud span {
  color: var(--accent2);
}

/* spacer */
.vn-middle {
  flex: 1;
  cursor: pointer;
}

/* dialogue box */
.vn-box {
  background: linear-gradient(to bottom, #0d1520ee, #080c10ee);
  border-top: 1px solid var(--border);
  padding: 1.2rem 1.6rem 1.4rem;
  min-height: 180px;
  position: relative;
  cursor: pointer;
  user-select: none;
}
.vn-speaker {
  font-family: "Rajdhani", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.vn-text {
  font-size: 1.3rem;
  line-height: 1.8;
  color: var(--white);
  min-height: 3.6rem;
}
.vn-next {
  position: absolute;
  bottom: 1rem;
  right: 1.4rem;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.7rem;
  color: var(--accent);
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* choice buttons */
.vn-choices {
  position: absolute;
  bottom: 220px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: min(560px, 90vw);
}
.vn-choice {
  background: #0d152099;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: "Noto Serif SC", serif;
  font-size: 0.95rem;
  padding: 0.7rem 1.2rem;
  cursor: pointer;
  text-align: left;
  transition:
    border-color 0.2s,
    background 0.2s,
    color 0.2s;
  backdrop-filter: blur(4px);
}
.vn-choice:hover {
  border-color: var(--accent);
  background: #1a3048aa;
  color: var(--white);
}

/* ─── MINIGAME SCREEN ─────────────────────────────────────── */
#mg-screen {
  flex-direction: column;
  background: var(--bg);
}

.mg-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1.4rem;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  flex-shrink: 0;
}
.mg-title {
  font-family: "Rajdhani", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--white);
}
.mg-step-badge {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.7rem;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius);
  letter-spacing: 0.1em;
}

/* step progress bar */
.mg-steps {
  display: flex;
  gap: 0;
  padding: 0 1.4rem;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.mg-step-dot {
  flex: 1;
  padding: 0.5rem 0;
  text-align: center;
  font-family: "Share Tech Mono", monospace;
  font-size: 1.24rem;
  color: var(--dim);
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mg-step-dot.done {
  color: var(--accent);
  border-color: var(--accent);
}
.mg-step-dot.active {
  color: var(--white);
  border-color: var(--accent2);
}

/* step content area */
.mg-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow: hidden;
  position: relative;
}

/* instruction panel */
.mg-instruction {
  position: absolute;
  top: 0.8rem;
  left: 1rem;
  font-family: "Share Tech Mono", monospace;
  font-size: 1.5rem;
  color: var(--dim);
  max-width: 280px;
  line-height: 1.6;
}
.mg-instruction strong {
  color: var(--accent2);
  display: block;
  margin-bottom: 0.2rem;
}

/* ── STEP 1: 温度设定 ── */
.step-temp {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}
.temp-display {
  font-family: "Share Tech Mono", monospace;
  font-size: 3.5rem;
  color: var(--accent);
  text-shadow: 0 0 20px var(--accent);
  letter-spacing: 0.05em;
}
.temp-unit {
  font-size: 1.5rem;
  color: var(--dim);
}
.temp-slider {
  -webkit-appearance: none;
  width: min(340px, 80vw);
  height: 4px;
  background: linear-gradient(to right, var(--accent2), var(--accent));
  border-radius: 2px;
  outline: none;
}
.temp-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  cursor: pointer;
}
.temp-label {
  font-family: "Share Tech Mono", monospace;
  font-size: 1.4rem;
  color: var(--dim);
  letter-spacing: 0.1em;
  text-align: center;
}
.temp-ok {
  background: #ef444422;
  border: 1px solid var(--red);
  color: var(--red);
}
.temp-ok.good {
  background: #2af5d022;
  border-color: var(--accent);
  color: var(--accent);
}

/* ── STEP 2: 镊子放置 ── */
.step-place {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 480px;
}
.place-arena {
  width: 100%;
  aspect-ratio: 16/9;
  background: #0a1828;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  cursor: grab;
}
.place-arena:active {
  cursor: grabbing;
}
.embed-tray {
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 56px;
  border: 2px dashed var(--accent2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}
.embed-tray-label {
  font-family: "Share Tech Mono", monospace;
  font-size: 1rem;
  color: var(--accent2);
  opacity: 0.5;
}
.tissue-piece {
  position: absolute;
  width: 48px;
  height: 36px;
  cursor: pointer;
  user-select: none;
  transition: box-shadow 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tissue-piece.placed svg ellipse:last-child {
  stroke: var(--accent);
}
.tissue-piece:hover {
  filter: drop-shadow(0 0 6px var(--accent2));
}

/* ── STEP 3: 添加OCT ── */
.step-oct {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.oct-scene {
  width: min(300px, 80vw);
  aspect-ratio: 1;
  background: #0a1828;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.oct-tray {
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 50px;
  background: #1a2a3a;
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.oct-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0%;
  background: linear-gradient(to top, #ffffffcc, #ffffff88);
  transition: height 0.3s;
}
.oct-bottle {
  position: absolute;
  top: 10%;
  right: 10%;
  width: 36px;
  height: 60px;
  background: linear-gradient(to bottom, #e8f0f8, #c8d8e8);
  border-radius: 4px 4px 6px 6px;
  cursor: pointer;
  border: 1px solid #8090a0;
  transition: transform 0.2s;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.oct-bottle:hover {
  transform: rotate(-20deg) translateY(-4px);
}
.oct-bottle.pouring {
  transform: rotate(-110deg) translateY(-10px);
}
.oct-bottle label {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.4rem;
  color: #40607080;
  pointer-events: none;
  margin-bottom: 4px;
}

/* ── STEP 4: 冷台固化 ── */
.step-ln2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.ln2-scene {
  width: min(320px, 80vw);
  aspect-ratio: 4/3;
  background: #060e18;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.ln2-vapor {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #8ae8ff20, transparent);
  animation: vapor 2s ease-in-out infinite alternate;
}
@keyframes vapor {
  to {
    opacity: 0.3;
    transform: scaleY(1.2);
  }
}
.ln2-block {
  position: absolute;
  bottom: 30%;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 55px;
  border-radius: 4px;
}
.ln2-block.freezing {
  box-shadow: 0 0 20px #8ae8ff80;
}
.ln2-block-label {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.45rem;
  color: #00000060;
}
.ln2-timer {
  font-family: "Share Tech Mono", monospace;
  font-size: 2rem;
  color: var(--accent2);
}
.ln2-btn {
  padding: 0.5rem 1.5rem;
  background: transparent;
  border: 1px solid var(--accent2);
  color: var(--accent2);
  font-family: "Share Tech Mono", monospace;
  font-size: 0.8rem;
  cursor: pointer;
  letter-spacing: 0.1em;
  transition: all 0.2s;
}
.ln2-btn:hover {
  background: var(--accent2);
  color: var(--bg);
}
.ln2-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── STEP 5: 安装包埋块 ── */
.step-install {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.install-scene {
  width: min(300px, 80vw);
  aspect-ratio: 1;
  background: #0a1828;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.sample-head {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 80px;
  background: linear-gradient(to bottom, #304050, #1a2530);
  border: 1px solid #506070;
  border-radius: 4px 4px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sample-head-slot {
  width: 40px;
  height: 28px;
  border: 2px dashed var(--accent2);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.8rem;
  color: var(--accent2);
  opacity: 0.5;
}
.sample-head-slot.filled {
  background: #1a3048;
  border-style: solid;
  border-color: var(--accent);
  opacity: 1;
}
.embed-block-drag {
  position: absolute;
  bottom: 10%;
  left: 20%;
  width: 48px;
  height: 32px;
  background: #c8dde8;
  border-radius: 3px;
  border: 1px solid #90aac0;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.4rem;
  color: #40607080;
  box-shadow: 0 2px 8px #0006;
}
.embed-block-drag:active {
  cursor: grabbing;
}
.embed-block-drag.installed {
  opacity: 0;
  pointer-events: none;
}

/* ── STEP 6: 粗切+精切 ── */
.step-rough {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}
.rough-scene {
  width: min(420px, 92vw);
  aspect-ratio: 16/9;
  background: #060e18;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
/* the cryo block — JS controls top; starts above blade */
.rough-block-body {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 62px;
  background: #f0f4f8;
  border: 1.5px solid #ccc;
  border-radius: 3px;
  overflow: visible;
  box-shadow: 0 2px 12px #0008;
}
/* kept for compat but not used */
.rough-tissue-window {
  display: none;
}
/* knife blade */
.rough-blade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to right, #e8f4ff, #90b0c8);
  box-shadow: 2px 0 6px #0af4;
  transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  left: -4px;
  z-index: 2;
}
/* curling chip particle */
@keyframes chip-fall {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg) scaleX(1);
  }
  40% {
    opacity: 1;
    transform: translateY(-12px) rotate(-20deg) scaleX(0.7);
  }
  100% {
    opacity: 0;
    transform: translateY(32px) rotate(40deg) scaleX(0.4);
  }
}
.rough-chip {
  position: absolute;
  border-radius: 2px 8px 2px 8px;
  background: #ddeef8cc;
  animation: chip-fall 0.7s ease-out forwards;
  pointer-events: none;
}
.rough-crank {
  padding: 0.5rem 1.5rem;
  background: transparent;
  border: 1px solid var(--warn);
  color: var(--warn);
  font-family: "Share Tech Mono", monospace;
  font-size: 0.8rem;
  cursor: pointer;
  letter-spacing: 0.1em;
  transition: all 0.2s;
}
.rough-crank:hover:not(:disabled) {
  background: var(--warn);
  color: var(--bg);
}
.rough-crank:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.roller-btn {
  padding: 0.4rem 1.2rem;
  background: transparent;
  border: 1px solid var(--accent2);
  color: var(--accent2);
  font-family: "Share Tech Mono", monospace;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  display: none;
}
.roller-btn.visible {
  display: inline-block;
}
.roller-btn:hover {
  background: var(--accent2);
  color: var(--bg);
}

/* ── STEP 7: 水浴漂片·捞片 ── */
.step-cut {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.thickness-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: "Share Tech Mono", monospace;
}
.thickness-val {
  font-size: 1.8rem;
  color: var(--accent);
  min-width: 3ch;
  text-align: right;
}
.thickness-unit {
  font-size: 0.8rem;
  color: var(--dim);
}
.cut-scene {
  width: min(360px, 90vw);
  aspect-ratio: 16/9;
  background: #0a1828;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.cut-ribbon {
  position: absolute;
  top: 30%;
  left: 50%;
  height: 8px;
  background: linear-gradient(to right, #c8dde8, #8090a0);
  border-radius: 2px;
  transform: translateX(-50%);
  opacity: 0;
  transition:
    opacity 0.3s,
    width 0.6s;
  width: 0;
}
.cut-ribbon.visible {
  opacity: 1;
  width: 60%;
}
.cut-btn {
  padding: 0.5rem 1.8rem;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: "Share Tech Mono", monospace;
  font-size: 0.85rem;
  cursor: pointer;
  letter-spacing: 0.15em;
  transition: all 0.2s;
}
.cut-btn:hover {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 15px var(--accent);
}
.cut-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── STEP 8: 毛笔+盖玻 ── */
.step-brush {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.brush-scene {
  width: min(380px, 90vw);
  aspect-ratio: 16/9;
  background: #0a1828;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  cursor: crosshair;
}
.glass-slide {
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 55%;
  height: 28%;
  background: #d8eef888;
  border: 1px solid #8090a0;
  border-radius: 1px;
}
.ribbon-on-slide {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  background: linear-gradient(to right, #c8dde8, #8090a0);
  border-radius: 1px;
  opacity: 0;
  transition:
    width 0.5s,
    opacity 0.3s;
  width: 0;
}
.ribbon-on-slide.placed {
  opacity: 1;
  width: 60%;
}
.cover-slip {
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: 55%;
  height: 90%;
  background: #ffffff15;
  border: 1px solid #8090a070;
  border-radius: 1px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
}
.cover-slip.placed {
  opacity: 1;
}
.brush-cursor {
  position: absolute;
  width: 16px;
  height: 30px;
  pointer-events: none;
  transform: translate(-4px, -28px);
  font-size: 1.4rem;
  filter: drop-shadow(0 0 4px var(--accent));
  opacity: 0;
}
.brush-sub-btns {
  display: flex;
  gap: 0.6rem;
}
.sub-btn {
  padding: 0.4rem 1.1rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: "Share Tech Mono", monospace;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}
.sub-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.sub-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* mg footer — confirm button lives HERE so content never shifts */
.mg-footer {
  padding: 0.5rem 1.4rem;
  background: var(--panel);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  min-height: 48px;
}
.mg-footer-hint {
  font-family: "Share Tech Mono", monospace;
  font-size: 1.3rem;
  color: var(--dim);
}
.mg-status {
  font-family: "Share Tech Mono", monospace;
  font-size: 1.3rem;
  color: var(--accent2);
}
.mg-confirm {
  visibility: hidden;
  padding: 0.32rem 1.3rem;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: "Share Tech Mono", monospace;
  font-size: 1.56rem;
  cursor: pointer;
  letter-spacing: 0.12em;
  transition:
    background 0.2s,
    color 0.2s,
    box-shadow 0.2s;
}
.mg-confirm.show {
  visibility: visible;
}
.mg-confirm:hover {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 12px var(--accent);
}

/* ─── SHARED BUTTON ──────────────────────────────────────── */
button {
  border: none;
  background: none;
  cursor: pointer;
}

/* ─── SCROLL HINT ─────────────────────────────────────── */
.hint {
  font-family: "Share Tech Mono", monospace;
  font-size: 1.4rem;
  color: var(--dim);
  letter-spacing: 0.05em;
}
/* ─── NAME INPUT SCREEN ───────────────────────────────── */
#name-screen {
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 50%, #091828 0%, #080c10 80%);
}
#name-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 39px,
      #0d1e2e33 39px,
      #0d1e2e33 40px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 39px,
      #0d1e2e33 39px,
      #0d1e2e33 40px
    );
}
.name-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  border: 1px solid var(--border);
  background: #0d152099;
  backdrop-filter: blur(8px);
  padding: 2.5rem 3rem;
  min-width: min(400px, 90vw);
}
.name-title {
  font-family: "Rajdhani", sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.2em;
}
.name-subtitle {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  color: var(--dim);
  margin-top: -0.8rem;
}
.name-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--accent);
  color: var(--white);
  font-family: "Noto Serif SC", serif;
  font-size: 1.3rem;
  text-align: center;
  padding: 0.4rem 0.6rem;
  width: 100%;
  outline: none;
  caret-color: var(--accent);
  transition: border-color 0.2s;
}
.name-input:focus {
  border-color: var(--accent2);
}
.name-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
}
.name-label {
  font-size: 15px !important;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.25em;
  color: var(--dim);
  text-transform: uppercase;
}
.name-divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 0.2rem 0;
}
.name-hint {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.6rem;
  color: var(--dim);
  letter-spacing: 0.15em;
}

/* ─── TITLE CONTINUE BUTTON ─────────────────────────── */
.title-btn-continue {
  margin-top: 0.8rem;
  border-color: var(--accent2);
  color: var(--accent2);
}
.title-btn-continue:hover {
  background: var(--accent2);
  box-shadow: 0 0 20px var(--accent2);
}

/* ─── VN TOOLBAR ─────────────────────────────────────── */
.vn-toolbar {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.toolbar-btn {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--accent2);
  border: 1px solid var(--accent2);
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
  cursor: pointer;
  background: transparent;
  transition:
    color 0.2s,
    border-color 0.2s,
    background 0.2s;
}
.toolbar-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.toolbar-btn.active {
  color: var(--accent2);
  border-color: var(--accent2);
  background: #0ea5e915;
}

/* ─── SAVE TOAST ─────────────────────────────────────── */
.save-toast {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  border: 1px solid var(--accent);
  background: #080c10ee;
  padding: 0.35rem 0.9rem;
  border-radius: 2px;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.3s,
    transform 0.3s;
  pointer-events: none;
}
.save-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ─── HUD LAYOUT FIX (with toolbar) ─────────────────── */
.vn-hud {
  justify-content: space-between;
}
