/* Khung chung cho các đồ chơi trong phòng Lab */
@font-face { font-family: "Unbounded"; src: url("/fonts/web/Unbounded-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("/fonts/web/Archivo-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "PatrickHand"; src: url("/fonts/web/PatrickHand-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "MilkyCream"; src: url("/fonts/MilkyCream.woff2") format("woff2"); font-display: swap; }

:root {
  --ink: #ece7df;
  --ink-dim: rgba(236, 231, 223, .6);
  --gutter: clamp(14px, 2.2vw, 36px);
  --ease: cubic-bezier(.22, .8, .2, 1);
  --accent: #ffcf96;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: #a39788 url("/textures/plaster/optimized/diff-1k.webp") center / 640px;
  background-blend-mode: multiply;
  color: var(--ink);
  font: 500 16px/1.5 "Archivo", system-ui, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}
.stage {
  position: fixed; inset: var(--gutter); border-radius: 22px; overflow: hidden;
  background: #3a3530 url("/textures/plaster/optimized/diff-1k.webp") center / 900px;
  background-blend-mode: multiply;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .18), 0 -2px 6px rgba(0, 0, 0, .35);
}
.stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; z-index: 40;
  box-shadow: inset 0 10px 22px rgba(0, 0, 0, .55), inset 0 2px 3px rgba(0, 0, 0, .5), inset 0 -1px 0 rgba(255, 255, 255, .1);
}
.top {
  position: fixed; z-index: 50; top: calc(var(--gutter) + 22px); left: calc(var(--gutter) + 28px); right: calc(var(--gutter) + 28px);
  display: flex; align-items: flex-start; justify-content: space-between; pointer-events: none;
  font: 700 15px/1.05 "Unbounded", sans-serif; text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
.top a { pointer-events: auto; color: var(--ink); text-decoration: none; transition: transform .3s var(--ease); }
.top a:hover { transform: translateX(-3px); }
.top .close:hover { transform: scale(1.08); }
.toy-title {
  position: fixed; z-index: 50; left: calc(var(--gutter) + 28px); bottom: calc(var(--gutter) + 22px); margin: 0; pointer-events: none;
  font: 700 clamp(34px, 5.4vw, 84px)/.9 "Unbounded", sans-serif; letter-spacing: -.02em; text-transform: uppercase; color: #e9e4dc;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .15), 0 -1px 0 rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
}
.toy-hint {
  position: fixed; z-index: 50; right: calc(var(--gutter) + 30px); bottom: calc(var(--gutter) + 26px); max-width: 300px; margin: 0;
  text-align: right; font-size: 14px; color: var(--ink-dim); pointer-events: none;
}
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 16px; border-radius: 99px; cursor: pointer; white-space: nowrap; flex: none;
  border: 1.5px solid var(--ink); background: transparent; color: var(--ink); font: 700 12px/1 "Unbounded", sans-serif;
  transition: background .25s, color .25s, transform .2s;
}
.btn:hover { background: var(--ink); color: #3a342e; }
.btn:active { transform: scale(.96); }
.btn:focus-visible, .top a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (max-width: 760px) {
  .toy-title { font-size: 30px; bottom: calc(var(--gutter) + 18px); left: calc(var(--gutter) + 18px); }
  .toy-hint { display: none; }
  .top { left: calc(var(--gutter) + 18px); right: calc(var(--gutter) + 18px); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
