/* Version switcher around the demo stage. Fixed-height rows: the embedding page sizes the frame as
   stage (16:9 of the width) + 132px, see --tabs-h + --ctl-h + --note-h. */
:root {
  --bg: #12141c;
  --panel: #1b1e2a;
  --line: #2e3345;
  --text: #e6e8f0;
  --muted: #9aa1b5;
  --accent: #f0a48f;
  --tabs-h: 52px;
  --ctl-h: 52px;
  --note-h: 28px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body {
  margin: 0 auto;
  max-width: 1280px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 13px/1.35 system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.tabs { flex: none; height: var(--tabs-h); display: flex; gap: 6px; padding: 6px 8px; }
.tab {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font: inherit;
  line-height: 1.2;
  cursor: pointer;
}
.tab b { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; }
.tab small { font-size: 11px; white-space: nowrap; }
.tab-main { flex-grow: 1.5; }
.tab[aria-selected="true"] { background: #fff; border-color: #fff; color: #555; }
.tab[aria-selected="true"] b { color: #111; }
.tab:focus-visible, .btn:focus-visible, .hot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.stage-wrap { flex: none; background: #000; }
.stage {
  position: relative;
  width: min(100%, calc((100vh - var(--tabs-h) - var(--ctl-h) - var(--note-h)) * 16 / 9));
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  overflow: hidden;
  background: #000;
}
.stage iframe { position: absolute; left: 0; top: 0; width: 1280px; height: 720px; border: 0; transform-origin: 0 0; }
#shots img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.hot { position: absolute; padding: 0; border: 0; background: transparent; cursor: pointer; }
#hotAll { inset: 0; }
.hot-ring {
  border-radius: 999px;
  box-shadow: 0 0 0 2px var(--accent), 0 0 0 6px rgba(240, 164, 143, 0.35);
  animation: ring 1.6s ease-in-out infinite;
}
@keyframes ring { 50% { box-shadow: 0 0 0 2px var(--accent), 0 0 0 11px rgba(240, 164, 143, 0); } }
@media (prefers-reduced-motion: reduce) { .hot-ring { animation: none; } }

.ctl { flex: none; height: var(--ctl-h); display: flex; align-items: center; gap: 8px; padding: 0 12px; }
.hint { flex: 1 1 auto; min-width: 0; margin: 0; color: var(--muted); }
.btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary { background: #fff; border-color: #fff; color: #111; font-weight: 600; }
.btn[disabled] { opacity: 0.5; cursor: default; }

.note {
  flex: none;
  height: var(--note-h);
  margin: 0;
  padding: 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
@media (max-width: 420px) {
  .ctl { gap: 6px; padding: 0 8px; }
  .btn { padding: 0 11px; }
  .note { padding: 0 8px; font-size: 11px; }
}
