:root {
  color-scheme: light;
  --accent: #5265de;
  --ink: #182235;
  --muted: #5b6c83;
  --line: #dbe2ec;
  --surface: #f4f7fc;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
body { color: var(--ink); background: white; font: 14px/1.5 Arial, sans-serif; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, .terminal-scene:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
button:disabled { cursor: default; opacity: .45; }
[hidden] { display: none !important; }

.walkthrough { display: flex; flex-direction: column; height: 100%; min-height: 560px; }
.demo-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.demo-header > span { font-size: 14px; font-weight: 700; }
.demo-header a { color: var(--accent); font-size: 12px; white-space: nowrap; text-underline-offset: 3px; }

.stage { position: relative; flex: 1; display: grid; place-items: center; min-height: 210px; padding: 16px; overflow: hidden; background: var(--surface); }
.scene { position: relative; flex-shrink: 0; }
.scene img { display: block; width: 100%; height: 100%; border: 1px solid var(--line); border-radius: 3px; }
.terminal-scene { width: 100%; min-width: 0; overflow: auto; border: 1px solid #32445d; border-radius: 4px; background: #182235; color: #edf2fa; }
.terminal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-bottom: 1px solid #32445d; }
.terminal-header > span:first-child { font-weight: 700; }
.terminal-header > span:last-child { color: #bcc8db; font-size: 12px; }
.terminal-block { padding: 14px 16px; }
.terminal-block + .terminal-block { border-top: 1px solid #32445d; }
.terminal-block h2 { margin: 0 0 8px; color: #bcc8db; font-size: 12px; font-weight: 400; }
.terminal-block pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 14px/1.65 Menlo, Consolas, monospace; }
.terminal-block code { font: inherit; }
.hotspot { position: absolute; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; transform: translate(-50%, -50%); border: 3px solid white; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgb(82 101 222 / .2); color: white; }
.hotspot:hover { box-shadow: 0 0 0 8px rgb(82 101 222 / .22); }
.hotspot svg { width: 16px; height: 16px; }
.hotspot:focus-visible { outline-offset: 7px; }
.focus-box { position: absolute; pointer-events: none; border: 2px solid var(--accent); border-radius: 3px; }
.cover-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: blur(3px); opacity: .15; }
.cover { position: relative; max-width: 390px; padding: 24px; text-align: center; }
.cover h2 { margin: 0 0 12px; font-size: 26px; line-height: 1.25; }
.cover p { margin: 0 0 22px; color: var(--muted); }

.instruction { padding: 14px 18px; border-top: 1px solid var(--line); min-height: 128px; }
.step-count { margin: 0 0 4px; color: var(--accent); font-size: 12px; font-weight: 700; }
.instruction h1 { margin: 0 0 5px; font-size: 18px; line-height: 1.3; }
.instruction > p:last-child { margin: 0; max-width: 75ch; color: var(--muted); }
.demo-footer { padding: 0 18px 14px; }
.step-navigation { display: flex; gap: 6px; margin-bottom: 7px; }
.step-navigation button { flex: 1; min-height: 25px; padding: 8px 0; border: 0; background: transparent; }
.step-navigation button::after { content: ""; display: block; height: 4px; border-radius: 2px; background: var(--line); }
.step-navigation button[data-complete]::after { background: #b8c1f5; }
.step-navigation button[aria-current="step"]::after { background: var(--accent); }
.playback { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.primary-button, .secondary-button { min-height: 38px; min-width: 78px; padding: 7px 14px; border: 1px solid var(--accent); border-radius: 4px; font-weight: 700; }
.primary-button { color: white; background: var(--accent); }
.primary-button:hover { background: #4153c9; }
.secondary-button { color: var(--ink); background: white; border-color: var(--line); }
.secondary-button:not(:disabled):hover { border-color: var(--accent); }
.demo-notice { color: var(--muted); font-size: 11px; text-align: center; }
.no-script { padding: 16px; }

@media (max-width: 480px) {
  .demo-header { padding: 12px; }
  .demo-header > span { max-width: 180px; font-size: 13px; }
  .demo-header a { font-size: 11px; }
  .instruction { padding: 14px 12px; min-height: 172px; }
  .instruction h1 { font-size: 17px; }
  .terminal-header { padding: 10px 12px; }
  .terminal-block { padding: 12px; }
  .terminal-block pre { font-size: 12px; }
  .demo-footer { padding: 0 12px 12px; }
  .hotspot { width: 30px; height: 30px; }
  .cover { padding: 18px; }
  .cover h2 { font-size: 23px; }
}

@media (prefers-reduced-motion: no-preference) {
  .hotspot { animation: draw-attention 1.6s ease-out 2; }
  @keyframes draw-attention {
    0%, 100% { box-shadow: 0 0 0 5px rgb(82 101 222 / .2); }
    55% { box-shadow: 0 0 0 10px rgb(82 101 222 / .04); }
  }
}
