/* 郑游工作室 · 像素 RPG 办公室(DOMO 式隐藏彩蛋) */

.studio-body { min-height: 100vh; display: flex; flex-direction: column; }

.back-arcade {
  position: fixed; top: 14px; left: 14px; z-index: 40;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .04em;
  color: var(--ink-dim); padding: 7px 12px; border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(14,14,26,.7); backdrop-filter: blur(6px);
  transition: color .24s, border-color .24s, box-shadow .24s;
}
.back-arcade:hover { color: var(--cyan); border-color: var(--cyan); box-shadow: var(--glow-cyan); }

.room-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 12px 28px; gap: 14px; }
.room-hint { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); letter-spacing: .05em; margin: 0; }

.room-stage {
  width: min(94vw, 900px); aspect-ratio: 384 / 256; position: relative;
  border: 2px solid var(--line); border-radius: 8px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 30px 80px -30px var(--cyan), inset 0 0 60px rgba(0,0,0,.5);
}
#room {
  width: 100%; height: 100%; display: block; cursor: pointer;
  image-rendering: pixelated; image-rendering: crisp-edges;
}

/* ---------- RPG 对话框 ---------- */
.dialogue { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; padding: 0 14px 22px; pointer-events: none; }
.dialogue[hidden] { display: none; }
.dia-box {
  pointer-events: auto; width: min(640px, 96vw); padding: 16px 18px 12px;
  display: flex; gap: 14px; align-items: flex-start;
  background: #0b0b16; color: var(--ink);
  border: 3px solid var(--c, var(--cyan));
  border-radius: 4px;
  box-shadow: 0 0 0 3px #0b0b16, 0 0 0 5px rgba(255,255,255,.08), 0 16px 50px -12px var(--c, var(--cyan));
  image-rendering: pixelated; animation: dia-pop .16s steps(3);
  font-family: var(--font-ui);
}
@keyframes dia-pop { from { transform: translateY(14px); opacity: 0; } }
.dia-portrait { width: 66px; height: 66px; flex: none; image-rendering: pixelated; border: 2px solid var(--c, var(--cyan)); border-radius: 4px; background: #0a0a16; box-shadow: 0 0 12px -2px var(--c, var(--cyan)); }
.dia-main { flex: 1; min-width: 0; }
@media (max-width: 480px) { .dia-portrait { width: 52px; height: 52px; } }
.dia-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; border-bottom: 2px dotted color-mix(in srgb, var(--c, var(--cyan)) 50%, transparent); padding-bottom: 7px; }
.dia-name { font-size: 19px; font-weight: 700; color: var(--c, var(--cyan)); letter-spacing: .04em; text-shadow: 0 0 8px color-mix(in srgb, var(--c, var(--cyan)) 60%, transparent); }
.dia-role { font-family: var(--font-mono); font-size: 11px; color: var(--ink-dim); }
.dia-text { min-height: 44px; margin: 4px 0 8px; font-size: 14.5px; line-height: 1.7; }
.dia-foot { display: flex; justify-content: space-between; align-items: center; }
.dia-next { font-family: var(--font-mono); font-size: 12px; color: var(--c, var(--cyan)); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: .25; } }
.dia-close { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); background: none; border: 1px solid var(--line); border-radius: 3px; padding: 4px 9px; }
.dia-close:hover { color: var(--magenta); border-color: var(--magenta); }

/* 移动端虚拟方向键 */
.dpad { display: none; position: fixed; left: 16px; bottom: 18px; z-index: 50; grid-template-columns: repeat(3, 42px); grid-template-rows: repeat(3, 42px); gap: 4px; opacity: .72; touch-action: none; }
.dpad .dbtn { width: 42px; height: 42px; border: 2px solid var(--cyan); border-radius: 7px; background: rgba(14,14,26,.78); color: var(--cyan); font-size: 15px; display: grid; place-items: center; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.dpad .dbtn:active { background: var(--cyan); color: #04040b; box-shadow: var(--glow-cyan); }
.dpad .up { grid-area: 1 / 2; } .dpad .left { grid-area: 2 / 1; } .dpad .right { grid-area: 2 / 3; } .dpad .down { grid-area: 3 / 2; }
@media (pointer: coarse) { .dpad { display: grid; } }

@media (max-width: 540px) { .room-wrap { padding-top: 50px; } .dia-text { font-size: 13.5px; } }
@media (prefers-reduced-motion: reduce) { .dia-box { animation: none; } .dia-next { animation: none; } }
