:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  color: #14181f;
  background: #fff;
  --ink: #14181f;
  --accent: #7c3aed;
  --accent-soft: #ede4ff;
  --muted: #555062;
  --line: #e3dceb;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img { display: block; max-width: 100%; }
a { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.frame { width: min(72rem, calc(100% - 4rem)); margin-inline: auto; }

.site-header {
  min-height: 6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 0.75rem; font-size: clamp(1.25rem, 2.3vw, 1.75rem); font-weight: 750; line-height: 1.15; letter-spacing: -0.035em; }
.brand img { flex: none; }
.mode-nav { display: flex; gap: 0.25rem; padding: 0.25rem; background: var(--accent-soft); border-radius: 999px; }
.mode-nav a { padding: 0.55rem 0.9rem; border-radius: 999px; color: #51416b; font-size: 0.875rem; font-weight: 650; text-decoration: none; white-space: nowrap; }
.mode-nav a:hover { background: #faf7ff; }
.mode-nav a[aria-current="page"] { background: #fff; color: var(--accent); box-shadow: 0 1px 5px #38275418; }

.guide {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  gap: clamp(2rem, 6vw, 6.5rem);
  align-items: center;
  padding-block: clamp(2.75rem, 7vw, 6.1rem);
}
body[data-mode="pin"] .guide-usage,
body[data-mode="usage"] .guide-pin { display: none; }
h1 { margin: 0; max-width: 12ch; font-size: clamp(2.85rem, 5.2vw, 5.1rem); line-height: 1; font-weight: 750; letter-spacing: -0.06em; text-wrap: balance; }
h1 em { color: var(--accent); font-style: normal; }
.intro { margin: 1.25rem 0 1.8rem; max-width: 28rem; color: var(--muted); font-size: clamp(1.0625rem, 1.4vw, 1.1875rem); line-height: 1.55; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; display: flex; align-items: flex-start; gap: 0.85rem; padding-block: 0.83rem; border-top: 1px solid var(--line); }
.steps li::before { content: counter(step); display: grid; place-items: center; flex: 0 0 1.75rem; height: 1.75rem; margin-top: 0.04rem; background: var(--accent-soft); color: var(--accent); border-radius: 50%; font-size: 0.875rem; font-weight: 750; }
.steps h2 { margin: 0; font-size: 1rem; line-height: 1.45; font-weight: 720; }
.steps p, .next, .usage-tip { margin: 0.2rem 0 0; color: var(--muted); font-size: 1rem; line-height: 1.5; }
.next, .usage-tip { margin-top: 1rem; }
.next a { font-weight: 700; text-underline-offset: 0.18em; }
.usage-tip strong { color: var(--ink); }

.guide-visual { min-width: 0; margin: 0; }
.pin-diagram, .usage-art {
  min-height: clamp(21rem, 37vw, 32rem);
  display: grid;
  place-content: center;
  overflow: hidden;
  padding: clamp(1rem, 4vw, 3rem);
  border: 1px solid var(--line);
  border-radius: 1.75rem;
  background-image: radial-gradient(rgb(124 58 237 / 15%) 1px, transparent 1px);
  background-size: 16px 16px;
}
.pin-diagram { position: relative; grid-template-columns: minmax(0, 28rem); }
.pin-arrows {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  fill: var(--accent);
  opacity: 0.88;
}
.toolbar-diagram, .extensions-diagram, .toolbar-result, .usage-capture { background: #fff; border: 1px solid var(--line); box-shadow: 9px 10px 18px rgb(56 39 84 / 16%); }
.toolbar-diagram { display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem; border-radius: 1rem; }
.address-placeholder { min-width: 0; flex: 1; height: 1.85rem; border-radius: 999px; background: #f1edf6; }
.puzzle-button, .pin-button { position: relative; display: grid; flex: none; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 0.65rem; }
.puzzle-button, .pin-button { color: var(--accent); background: var(--accent-soft); }
.puzzle-icon { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linejoin: round; }
.marker { display: grid; flex: none; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: var(--accent); color: #fff; font-size: 0.75rem; font-weight: 750; }
.puzzle-button .marker, .pin-button .marker { position: absolute; right: -0.45rem; top: -0.48rem; }
.extensions-diagram { width: min(100%, 22rem); margin: 0.6rem 0 0 auto; padding: 0.9rem; border-radius: 1rem; }
.menu-title { padding: 0.15rem 0.25rem 0.63rem; font-size: 1rem; font-weight: 700; }
.extension-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.55rem; border: 1px solid var(--line); border-radius: 0.75rem; font-size: 0.9375rem; font-weight: 675; }
.extension-row > img { width: 1.75rem; flex: none; height: auto; }
.pin-button { margin-left: auto; color: #8243EE; }
.pin-icon {
  width: 18px;
  height: 20px;
  background: currentColor;
  clip-path: path(evenodd, "M4 2H14V3.75H12.5V10.25L15 12.75V14.5H9.875V19H8.125V14.5H3V12.75L5.5 10.25V3.75H4Z M7.25 3.75V11L5.5 12.75H12.5L10.75 11V3.75Z");
}
.toolbar-result { display: flex; align-items: center; gap: 0.65rem; justify-self: start; margin-top: 2rem; padding: 0.55rem 0.7rem; border-radius: 0.75rem; font-size: 0.9375rem; font-weight: 650; }
.result-icon { display: grid; place-items: center; }
figcaption { margin-top: 0.75rem; padding-inline: 0.25rem; color: var(--muted); font-size: 0.875rem; line-height: 1.5; }
.usage-art { grid-template-columns: minmax(0, 21rem); }
.usage-capture { overflow: hidden; border-radius: 1.4rem; }
.usage-capture img { width: 100%; height: auto; }

@media (max-width: 48rem) {
  .frame { width: min(34rem, calc(100% - 2rem)); }
  .site-header { min-height: auto; align-items: flex-start; flex-direction: column; gap: 0.75rem; padding-block: 1rem; }
  .guide { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  h1 { font-size: clamp(2.65rem, 10vw, 4rem); }
  .pin-diagram, .usage-art { border-radius: 1.25rem; }
}
