:root {
  --bg: #f3f5f8;
  --stage: #2b2f36;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #5b6472;
  --line: #dde2ea;
  --accent: #3d64af;
  --hint: rgba(61, 100, 175, 0.35);
  --hint-line: #3d64af;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
[hidden] { display: none !important; }

.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  padding: 10px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 600; color: var(--text); text-decoration: none; }
.brand span { font-weight: 400; color: var(--muted); }
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.tools .flow-name { color: var(--muted); margin-right: 4px; }
.tools button, .tools a {
  font: inherit; font-size: 14px;
  padding: 6px 12px; min-height: 36px;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--panel); color: var(--text);
  text-decoration: none; cursor: pointer;
  display: inline-flex; align-items: center;
}
.tools button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.tools button:focus-visible, .tools a:focus-visible, .flows a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.home { max-width: 720px; margin: 0 auto; padding: 32px 16px 48px; }
.home h1 { font-size: 24px; margin: 0 0 8px; }
.lead { color: var(--muted); margin: 0 0 24px; }
.flows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.flows li { border-bottom: 1px solid var(--line); }
.flows a { display: block; padding: 14px 4px; color: var(--text); text-decoration: none; }
.flows a:hover strong { color: var(--accent); }
.flows strong { display: block; font-size: 17px; }
.flows span { color: var(--muted); font-size: 14px; }
.note { color: var(--muted); font-size: 13px; margin: 20px 0 0; }
.stamp { margin-top: 4px; }

.player { display: flex; flex-direction: column; min-height: calc(100vh - 57px); background: var(--stage); }
.stage { flex: 1; display: flex; justify-content: center; align-items: flex-start; padding: 16px; overflow: auto; }
.screen { position: relative; width: 100%; line-height: 0; box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35); }
.screen img { display: block; width: 100%; height: auto; }
.hotspots { position: absolute; inset: 0; }
.hotspots button {
  position: absolute; padding: 0; margin: 0;
  background: transparent; border: 0; border-radius: 4px; cursor: pointer;
}
.hotspots button:focus-visible { outline: 2px solid var(--hint-line); }
.screen.hints .hotspots button, .screen.flash .hotspots button { background: var(--hint); box-shadow: inset 0 0 0 2px var(--hint-line); }

.step {
  position: sticky; bottom: 0;
  padding: 10px 16px; min-height: 44px;
  background: var(--panel); border-top: 1px solid var(--line);
  font-size: 14px;
}
.step b { color: var(--accent); }

.error { max-width: 720px; margin: 48px auto; padding: 0 16px; color: #b91c1c; }

@media (max-width: 600px) {
  .brand span { display: none; }
  .tools .flow-name { width: 100%; }
  .stage { padding: 8px; }
}
