.guide-slides { margin: 0 0 3rem; padding: clamp(1rem, 3vw, 2rem); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-panel); scroll-margin-top: calc(var(--header-h) + 1rem); }
.slide-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .75rem; }
.slide-heading h2 { margin: 0; font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.5rem); line-height: 1.1; }
.slide-heading a, .slide-original { font-size: .9rem; }
.slide-intro { max-width: 70ch; color: var(--text-secondary); margin: 1rem 0 1.5rem; }
.slide-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.5rem; }
.slide-toolbar label { display: grid; gap: .4rem; min-width: 0; font-size: .9rem; color: var(--text-secondary); }
.guide-slides select { width: min(32rem, 100%); min-height: 44px; padding: .6rem 2rem .6rem .75rem; font: inherit; background: var(--surface-inset); color: var(--text-primary); border: 1px solid var(--border-hover); border-radius: var(--radius); }
.guide-slides button { min-height: 44px; padding: .6rem 1rem; font: inherit; font-weight: 600; background: var(--surface-elevated); color: var(--text-primary); border: 1px solid var(--border-hover); border-radius: var(--radius); cursor: pointer; }
.guide-slides button:hover { background: var(--accent-subtle-hover); border-color: var(--accent); }
.guide-slides button:focus-visible, .guide-slides select:focus-visible, .slide-original:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.guide-slides [aria-disabled="true"] { color: var(--text-muted); cursor: default; border-color: var(--border); }
.guide-slides [data-slide-next] { background: var(--accent); color: var(--surface-canvas); border-color: var(--accent); }
.slide-list { list-style: none; padding: 0; margin: 0; }
.guide-slide { margin: 0 0 2rem; }
.slides-ready .guide-slide { margin-bottom: 0; }
.guide-slides [hidden] { display: none !important; }
.slide-caption { min-height: 8.5rem; max-width: 75ch; }
.slide-caption h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.3; margin: 0 0 .6rem; }
.slide-caption p { margin: 0 0 .5rem; }
.slide-result { color: var(--text-secondary); font-size: .95rem; }
.slide-stage { height: clamp(260px, 52vw, 600px); display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--surface-canvas); border-radius: var(--radius); }
.slide-canvas { position: relative; flex-shrink: 0; width: min(100%, calc(clamp(260px, 52vw, 600px) * var(--ratio))); aspect-ratio: var(--ratio); transform-origin: var(--target-x) var(--target-y); }
.slide-canvas img, .slide-canvas svg { width: 100%; height: 100%; max-width: none; }
.slide-outline { position: absolute; border: 3px solid #ffe17a; border-radius: 5px; background: rgb(201 162 39 / .16); pointer-events: none; }
.guide-slides .slide-target { position: absolute; transform: translate(-50%, -50%); padding: 0; width: 44px; height: 44px; border: 0; background: transparent; display: grid; place-items: center; }
.guide-slides .slide-target:hover { background: rgb(255 225 122 / .2); }
.slide-target span { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: #ffe17a; color: #17130a; font-size: 14px; font-weight: 700; box-shadow: 0 2px 8px rgb(0 0 0 / .65); }
.slide-zoomed .slide-canvas { transform: scale(2); }
.slide-original { display: inline-block; padding-block: .75rem; }
.slide-navigation { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding-top: .75rem; border-top: 1px solid var(--border); }
.slide-navigation p { margin: 0; font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.slide-keys { font-size: .85rem; color: var(--text-muted); margin: .75rem 0 0; }
@media (max-width: 600px) {
  .slide-toolbar { align-items: stretch; flex-direction: column; }
  .guide-slides select { width: 100%; }
  .slide-caption { min-height: 11rem; }
  .slide-navigation button { padding-inline: .7rem; }
  .slide-navigation p { font-size: .85rem; }
  .guide-slides .slide-target { min-width: 44px; min-height: 44px; }
  .slide-keys { display: none; }
}

.slide-section { color: var(--accent); font-size: .85rem; font-weight: 600; }
.slide-boundary { padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-secondary); background: var(--surface-inset); }
.guide-slides button:disabled { cursor: default; opacity: .5; }
