/* Shared by all frames: language visibility + reset. Each frame adds its own style. */
html:not([data-lang="zh"]) .zh,
html[data-lang="zh"] .en { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, video, canvas { display: block; max-width: 100%; }

.lang-switch button { opacity: .4; transition: opacity .3s; }
.lang-switch button[aria-pressed="true"] { opacity: 1; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* Frame switcher (prototype only) */
.frame-tag {
  position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 99;
  display: flex; gap: 4px; padding: 4px; border-radius: 99px;
  background: rgba(0,0,0,.75); color: #fff; font: 500 12px/1 system-ui, sans-serif;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.frame-tag a { padding: 7px 12px; border-radius: 99px; opacity: .6; }
.frame-tag a[aria-current] { background: #fff; color: #000; opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ?shot=1 → clean screenshots: hide prototype-only tools */
html.shot .frame-tag, html.shot .style-switch, html.shot .replay { display: none !important; }
