/* Install guides, source pages, the download page, screenshots and the lightbox. */
.guide-top { display: grid; gap: 28px; align-items: start; }
@media (min-width: 960px) { .guide-top { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 52px; } .guide-top.phone { grid-template-columns: minmax(0, 1fr) 340px; } }
.guide-top h1 { font-size: clamp(2rem, 3vw + 1rem, 3rem); }
.chips { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; margin: 4px 0 20px; color: var(--ink-2); font-size: .95rem; }
.chips li { margin: 0; display: inline-flex; align-items: center; gap: 7px; }
.chips .icon { color: var(--indigo); }
@media (prefers-color-scheme: dark) { .chips .icon { color: var(--yellow); } }
.player { margin: 0; }
.player video { display: block; width: 100%; height: auto; border-radius: 12px; background: #0c0a14; box-shadow: var(--shadow-lg); }
.player.portrait { max-width: 340px; margin: 0 auto; }
.player figcaption { margin-top: 10px; color: var(--ink-3); font-size: .88rem; text-align: center; }

/* Watch pages (/install/<slug>/video): the video first, then its key moments */
.watch-page { max-width: 960px; }
.watch-page h1 { font-size: clamp(1.9rem, 2.4vw + 1rem, 2.7rem); }
.watch-page .player.portrait { max-width: 360px; }
.watch-about { max-width: 760px; margin-top: 30px; }
.moments { list-style: none; margin: 0 0 26px; padding: 0; }
.moment { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 2px 14px; margin: 0; padding: 12px 0; border-top: 1px solid var(--line); }
.moment .step-link { grid-column: 2; font-size: .9rem; }
@media (min-width: 700px) { .moment { grid-template-columns: auto minmax(0, 1fr) auto; } .moment .step-link { grid-column: auto; } }
.moment:first-child { border-top: 0; }
.moment .at { display: inline-flex; align-items: center; gap: 6px; min-width: 5.4em; padding: 3px 12px 3px 8px; border-radius: 999px;
  background: var(--info-bg); font: 600 .95rem/1.5 var(--mono); text-decoration: none; }
.moment .at .icon { width: 18px; height: 18px; }
.moment .what { font-weight: 600; }
.moment.is-playing .at { background: var(--yellow); color: var(--on-yellow); }

.gsteps { list-style: none; margin: 0; padding: 0; counter-reset: g; }
.gstep { counter-increment: g; margin: 0; display: grid; gap: 18px 40px; align-items: center; padding: 30px 0; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.gstep:first-child { border-top: 0; padding-top: 10px; }
@media (min-width: 860px) { .gstep { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } .gsteps.phone .gstep { grid-template-columns: minmax(0, 1fr) 240px; } }
.gstep h3 { display: flex; align-items: flex-start; gap: 14px; margin: 0 0 10px; font-size: clamp(1.25rem, 1vw + 1rem, 1.5rem); line-height: 1.25; }
.gstep h3::before { content: counter(g); flex: none; width: 38px; height: 38px; margin-top: -3px; border-radius: 50%; background: var(--indigo); color: #fff;
  font: 600 1.05rem/38px var(--display); text-align: center; }
@media (prefers-color-scheme: dark) { .gstep h3::before { background: var(--yellow); color: var(--on-yellow); } }
.gstep.optional h3::before { background: var(--paper-2); color: var(--ink-2); border: 1px solid var(--line-2); }
.gstep.is-playing h3::before { box-shadow: 0 0 0 5px var(--mark); }
.gstep .body { font-size: 1.05rem; }
.gstep .body p { margin: 0 0 .7em; }
.gstep .body > :last-child { margin-bottom: 0; }
.gstep figure { margin: 0; }
.gstep figure > img { display: block; width: 100%; border-radius: 10px; border: 1px solid var(--line); background: var(--paper-2); box-shadow: var(--shadow); }
.gsteps.phone .gstep figure > img { border-radius: 18px; max-width: 240px; margin: 0 auto; }
.watch { margin-top: 12px; }
.done { display: flex; gap: 16px; align-items: flex-start; margin-top: 10px; padding: 24px; border-radius: var(--r); background: var(--ok-bg); }
.done .tick { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; }
.done h2 { font-size: 1.35rem; margin: 4px 0 6px; }
.done p { margin: 0 0 .6em; }
.done p:last-child { margin: 0; }
.check-first { margin-bottom: 22px; }
.which { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.which li { margin: 0; display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-top: 1px solid var(--line); }
.which li:first-child { border-top: 0; }
.which .icon { color: var(--ink-3); margin-top: 3px; }
.which a { font-weight: 650; }
.device { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.device:hover { border-color: var(--indigo); color: var(--ink); }
.device strong { display: block; font: 600 1.08rem/1.3 var(--display); }
.device span { color: var(--ink-2); font-size: .93rem; }
.device > .icon { width: 28px; height: 28px; color: var(--ink-3); }

/* Download */
.paths { display: grid; gap: 18px; }
@media (min-width: 860px) { .paths { grid-template-columns: 1.1fr 1fr; } }
.path-card h2 { display: flex; align-items: center; gap: 10px; margin-top: 0; }
.qr-row { display: flex; gap: 18px; align-items: center; margin-top: 20px; }
.qr-row p { margin: 0; }
@media (max-width: 859px) { .qr-row { display: none; } }
.release-line { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; color: var(--ink-2); }
.download-card { display: grid; gap: 28px; align-items: center; }
@media (min-width: 760px) { .download-card { grid-template-columns: minmax(0, 1fr) 200px; } }
@media (max-width: 759px) { .download-card > .center { display: none; } }

/* Screenshots that open large */
.shot { display: block; color: inherit; text-decoration: none; cursor: zoom-in; }
.shot img { display: block; width: 100%; }
.shot-cap { display: block; margin-top: 8px; font-size: .9rem; color: var(--ink-2); }
.gstep .shot img, .figure-shot .shot img { border-radius: 10px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.shot-pair { display: grid; gap: 18px; grid-template-columns: 2.4fr 1fr; align-items: end; }
.figure-shot { margin: 18px 0; }

.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 12px 16px; border: 0; background: rgba(8, 5, 20, .96); color: #fff; }
.lightbox[open] { display: flex; flex-direction: column; }
.lightbox::backdrop { background: rgba(8, 5, 20, .7); }
.lb-top { display: flex; justify-content: space-between; align-items: center; min-height: 48px; }
.lb-count { color: #c9c1ec; font-size: .92rem; }
.lb-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 12px; }
.lb-stage picture { min-width: 0; display: flex; justify-content: center; }
.lb-stage img { max-width: 100%; max-height: calc(100dvh - 170px); width: auto; height: auto; border-radius: 10px; user-select: none; }
.lb-cap { text-align: center; margin: 12px auto 4px; max-width: 46em; color: #c9c1ec; }
.lb-cap strong { color: #fff; margin-right: 8px; }
.round { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .08); color: #fff;
  font-size: 1.6rem; line-height: 1; cursor: pointer; flex: none; }
.round:hover { background: rgba(255, 255, 255, .18); }
@media (max-width: 699px) { .lb-prev, .lb-next { display: none; } }
