/* Keep the real UI outside WebGL grading, bloom and fog. */
.screenshot-tour .caption:has([data-shot]) {
  inset: 100px 6vw 60px; transform: none; max-width: none; width: auto;
  display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  gap: clamp(40px, 7vw, 120px); padding: 0; text-align: left;
  background: none; border: 0; box-shadow: none; backdrop-filter: none;
}
.feature-copy { max-width: 500px; padding: 28px; border: 1px solid var(--caption-box-border); background: var(--caption-box-bg); border-radius: 8px; }
.screenshot-tour .caption-right .feature-copy { grid-column: 2; grid-row: 1; }
.screenshot-tour .caption-right > .app-capture { grid-column: 1; grid-row: 1; }
.screenshot-tour .caption-right .caption-actions { justify-content: flex-start; }
.app-capture, .recommendation-shot, .gallery-shot { margin: 0; position: relative; aspect-ratio: 1179 / 2556; justify-self: center; text-shadow: none; perspective: 1400px; isolation: isolate; }
.app-capture { height: min(690px, calc(100dvh - 170px)); }
[data-shot] > img { display: block; position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; border: 2px solid #433d39; border-radius: 24px; background: #000; box-shadow: 8px 18px 0 -6px #100d0c, 0 35px 70px #000b; }
.app-capture::before { content: ''; position: absolute; inset: 15% -35% -5%; z-index: -1; background: radial-gradient(ellipse, var(--screen-glow, #ad252f40), transparent 65%); filter: blur(30px); }
[data-shot="progress"] > img { transform: rotateY(10deg) rotateZ(-5deg); }
[data-shot="setup"] > img { transform: rotateY(-12deg) rotateZ(5deg); }
[data-shot="setup"] { --screen-glow: #3cb7a333; }
[data-shot="simple"] > img { transform: rotateZ(-3deg) rotateY(5deg); border-radius: 16px; box-shadow: 0 0 0 6px #191310, 16px 24px 0 -6px #b54c2933, 0 35px 80px #000c; }
[data-shot="detailed"] > img { transform: rotateX(7deg) rotateY(-15deg) rotateZ(6deg); }
.capture-status { position: absolute; inset: 0; display: grid; place-content: center; padding: 20px; color: #ddd; text-align: center; font: 13px/1.5 Inter,sans-serif; }
.capture-status:empty { display: none; }
[data-shot] figcaption { position: absolute; left: -12%; right: -12%; top: calc(100% + 16px); text-align: center; color: #eee3db; font: 600 12px/1.35 Inter,sans-serif; }
/* Beginner triptych: one simple log, plus two real recommendation screens. */
.screenshot-tour .caption.beginner-scene { grid-template-columns: minmax(290px,.8fr) minmax(0,1.6fr); gap: 36px; }
.screenshot-tour .beginner-scene .feature-copy { grid-column: 1; grid-row: 1; }
.beginner-screens { grid-column: 2; display: flex; align-items: center; justify-content: center; gap: 22px; min-width: 0; }
.beginner-screens .app-capture { height: min(590px, calc(100dvh - 240px)); }
.recommendation-shot { height: min(450px, calc(100dvh - 340px)); }
.recommendation-shot > img { border-color: #735733; border-radius: 17px; }
[data-shot="warmup"] > img { transform: rotateY(8deg) rotateZ(3deg); }
[data-shot="targets"] > img { transform: rotateY(-8deg) rotateZ(-3deg); border-color: #38614e; }
/* Complete analytics and wellness screenshots, with a full-size viewer. */
.screenshot-tour .caption.stats-scene { inset: 90px 4vw 60px; display: flex; flex-direction: column; justify-content: center; gap: 24px; }
.stats-scene .feature-copy { max-width: 950px; padding: 16px 26px; text-align: center; }
.screenshot-tour .stats-scene h2 { font-size: clamp(30px,3.4vw,46px); line-height: 1.05; }
.stats-scene .cap-day { margin-bottom: 6px; }
.stats-scene .sub { max-width: 770px; font-size: 14px; line-height: 1.5; margin: 10px auto 0; }
.stats-scene .caption-actions { justify-content: center; margin-top: 12px; }
.stats-gallery { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 16px; width: 100%; max-width: 1400px; padding-bottom: 28px; }
.gallery-shot { height: min(545px,calc(100dvh - 340px)); max-width: 100%; }
.gallery-shot > img { border-radius: 15px; border-color: #4b4540; }
.gallery-shot:nth-child(odd) > img { transform: rotateZ(-1.5deg); }
.gallery-shot:nth-child(even) > img { transform: rotateZ(1.5deg); }
.gallery-shot[data-shot="effort"] > img { border-color: #805934; }
@media (min-width:701px) and (max-width:1150px) {
 .screenshot-tour .caption.beginner-scene { grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 24px; }
 .screenshot-tour .beginner-scene .feature-copy { max-width: 750px; justify-self: center; padding: 14px 22px; }
 .beginner-scene h2 { font-size: 34px; }
 .beginner-scene .sub { font-size: 13px; margin-top: 8px; }
 .beginner-screens { grid-column: 1; grid-row: 2; }
 .beginner-screens .app-capture { height: min(460px,calc(100dvh - 370px)); }
 .recommendation-shot { height: min(360px,calc(100dvh - 430px)); }
 .stats-gallery { gap: 14px; }
 .gallery-shot { height: min(390px,calc((100vw - 150px) * .39)); }
}
@media (max-width:700px) {
 .screenshot-tour .caption:has([data-shot]) { inset: 85px 18px 30px; display: flex; flex-direction: column; gap: 16px; justify-content: center; }
 .feature-copy { padding: 14px 16px; max-width: 480px; width: 100%; }
 .screenshot-tour .caption:has([data-shot]) h2 { font-size: clamp(26px,7.5vw,36px); line-height: 1.05; }
 .screenshot-tour .caption:has([data-shot]) .cap-day { font-size: 9px; margin-bottom: 6px; }
 .screenshot-tour .caption:has([data-shot]) .sub { max-width: none; font-size: 12px; line-height: 1.45; margin-top: 8px; }
 .screenshot-tour .caption:has([data-shot]) .caption-actions { margin-top: 10px; }
 .screenshot-tour .caption:has([data-shot]) .caption-action { padding: 7px 16px; font-size: 11px; min-height: 32px; }
 .app-capture { flex: 0 1 auto; min-height: 0; height: min(480px,calc(100dvh - 335px)); perspective: 1000px; }
 [data-shot] > img { border-radius: 15px; }
 [data-shot="progress"] > img { transform: rotateY(7deg) rotateZ(-4deg); }
 [data-shot="setup"] > img { transform: rotateY(-7deg) rotateZ(4deg); }
 [data-shot="detailed"] > img { transform: rotateY(-8deg) rotateZ(4deg); }
 .screenshot-tour .hud-location { top: auto; bottom: 8px; }
 .beginner-screens { --screen-height: min(290px,calc((100vw - 62px) * .8)); gap: 9px; width: 100%; padding: 8px 0 32px; }
 .beginner-screens .app-capture { flex: none; height: var(--screen-height); }
 .recommendation-shot { flex: none; height: calc(var(--screen-height) * .76); }
 .beginner-screens figcaption { font-size: 9px; top: calc(100% + 12px); }
 .screenshot-tour .caption.stats-scene { gap: 18px; }
 .stats-scene .feature-copy { padding: 12px 14px; }
 .screenshot-tour .stats-scene h2 { font-size: 29px; }
 .screenshot-tour .stats-scene .sub { font-size: 11px; }
 .stats-gallery { grid-template-columns: repeat(6,minmax(0,1fr)); gap: 32px 10px; padding: 2px 0 24px; }
 .gallery-shot { grid-column: span 2; height: min(190px,22dvh); max-width: none; }
 .gallery-shot:nth-child(4) { grid-column: 2 / span 2; }
 .gallery-shot:nth-child(5) { grid-column: 4 / span 2; }
 .gallery-shot > img { border-radius: 8px; border-width: 1px; }
 .gallery-shot figcaption { font-size: 9px; top: calc(100% + 8px); left: -18%; right: -18%; }
}
@keyframes screen-arrival { from { translate: 0 18px; opacity: 0; } to { translate: 0 0; opacity: 1; } }
.caption.visible > .app-capture, .caption.visible .beginner-screens, .caption.visible .stats-gallery { animation: screen-arrival 600ms ease-out both; }
@media (prefers-reduced-motion:reduce) {
 [data-shot] > img { transform: none !important; }
 .caption.visible > .app-capture, .caption.visible .beginner-screens, .caption.visible .stats-gallery { animation: none; }
}
.flat-tour .caption:has([data-shot]) { position: relative; inset: auto; min-height: 100dvh; margin: 100px 6vw 30px; opacity: 1 !important; visibility: visible; pointer-events: auto; }
.flat-tour .scroll-space, .flat-tour .caption-hero, .flat-tour .logdemo, .flat-tour .hud-location { display: none; }
.flat-tour .finale { position: relative; inset: auto; opacity: 1 !important; visibility: visible; pointer-events: auto; padding: 80px 24px; }

/* A complete screenshot can be inspected at native proportions on every device. */
[data-shot] { cursor: zoom-in; outline-offset: 12px; }
[data-shot]:focus-visible { outline: 2px solid #ffb785; }
.screen-hint { margin: 0; color: #d3c1b3; font: 11px/1.4 Inter,sans-serif; text-align: center; }
.screen-viewer { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; border: 0; padding: 14px 20px; background: #100d0bf5; color: #f7eee9; overflow: hidden; }
.screen-viewer::backdrop { background: #000b; backdrop-filter: blur(18px); }
.screen-viewer[open] { display: grid; grid-template-rows: 42px minmax(0,1fr) 48px; gap: 10px; }
.screen-viewer header { display: flex; align-items: center; justify-content: space-between; width: min(700px,100%); margin: auto; gap: 20px; }
.screen-viewer h3 { font: 600 15px/1.3 Inter,sans-serif; margin: 0; }
.screen-viewer button { color: #f7eee9; background: #ffffff0d; border: 1px solid #ffffff30; border-radius: 40px; min-width: 42px; min-height: 42px; padding: 8px 16px; cursor: pointer; font: 13px/1.2 Inter,sans-serif; }
.screen-viewer button:hover { background: #ffffff20; }
.screen-viewer button:focus-visible { outline: 2px solid #ffb785; outline-offset: 3px; }
.screen-viewer > img { display: block; height: 100%; width: 100%; min-height: 0; object-fit: contain; filter: drop-shadow(0 18px 45px #000); }
.screen-viewer nav { display: flex; gap: 18px; align-items: center; justify-content: center; }
.screen-viewer output { min-width: 45px; text-align: center; color: #cbbbaf; font: 12px Inter,sans-serif; }
@media (max-width:700px) {
 .screen-viewer { padding: 10px 12px; }
 .screen-hint { font-size: 10px; }
}

@media (min-width:1151px) {
 .stats-scene .feature-copy { padding: 10px 24px; max-width: 1050px; }
 .screenshot-tour .stats-scene h2 { font-size: 40px; margin-bottom: 0; }
 .stats-scene .cap-day { font-size: 9px; line-height: 12px; margin-bottom: 4px; }
 .stats-scene .sub { max-width: 970px; font-size: 13px; line-height: 1.4; margin-top: 6px; }
 .stats-scene .caption-actions { margin-top: 8px; }
 .stats-scene .caption-action { padding: 8px 20px; min-height: 34px; }
}

/* Readable whole-screen presentation, with a clear full-size action. */
.screenshot-tour .caption:has(> [data-shot="progress"]),
.screenshot-tour .caption:has(> [data-shot="setup"]) { inset: 72px 4vw 45px; grid-template-rows: minmax(0,1fr); grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); gap: 5vw; }
.app-capture[data-shot="progress"], .app-capture[data-shot="setup"] { height: min(900px,calc(100dvh - 80px)); }
[data-shot="progress"] > img { transform: rotateY(8deg) rotateZ(-2deg); }
.screenshot-tour .caption.beginner-scene { inset: 80px 3vw 50px; grid-template-columns: minmax(260px,300px) minmax(0,1fr); gap: 28px; }
.beginner-screens { gap: 18px; }
.beginner-screens .app-capture { height: min(470px,calc(100dvh - 220px)); }
.recommendation-shot { height: min(780px,calc(100dvh - 165px),calc((94vw - 364px) / 1.25)); }
.screen-hint { display: inline-flex; align-items: center; justify-content: center; gap: 7px; margin: 0; min-height: 40px; padding: 9px 13px; border: 1px solid #ffb58a9c; border-radius: 24px; background: #652b1bd9; color: #fff5ed; cursor: pointer; font: 600 12px/1.2 Inter,sans-serif; box-shadow: 0 0 22px #e66e3526; }
.screen-hint:hover { background: #8b3e24; border-color: #ffd2ae; }
.screen-hint:focus-visible { outline: 2px solid #ffc6a0; outline-offset: 4px; }
.feature-copy .caption-actions { align-items: center; gap: 10px; flex-wrap: wrap; }
.screen-browser-nav { display: none; }
@media (min-width:701px) and (max-width:1150px) {
 .screenshot-tour .caption.beginner-scene { grid-template-columns: 1fr; gap: 14px; }
 .beginner-screens .app-capture { height: min(400px,calc(100dvh - 350px)); }
 .recommendation-shot { height: min(570px,calc(100dvh - 295px),calc((94vw - 60px) / 1.25)); }
 .beginner-scene .feature-copy .caption-actions { justify-content: center; }
}
@media (max-width:700px) {
 /* The hero card is centered independently of the desktop camera framing. */
 .screenshot-tour .caption-hero { justify-content: center; padding: 82px 18px; }
 .screenshot-tour .caption:has([data-shot]),
 .screenshot-tour .caption.beginner-scene,
 .screenshot-tour .caption.stats-scene,
 .screenshot-tour .caption:has(> [data-shot="progress"]),
 .screenshot-tour .caption:has(> [data-shot="setup"]) { inset: 76px 14px 28px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
 .screenshot-tour .caption:has([data-shot]) .feature-copy { padding: 11px 13px; width: 100%; max-width: 480px; }
 .screenshot-tour .caption:has([data-shot]) .cap-day { display: none; }
 .screenshot-tour .caption:has([data-shot]) h2 { font-size: 26px; line-height: 1.02; margin-bottom: 6px; }
 .screenshot-tour .caption:has([data-shot]) .sub { font-size: 11px; line-height: 1.35; margin-top: 5px; }
 .screenshot-tour .caption:has([data-shot]) .caption-actions { margin-top: 9px; gap: 8px; }
 .screen-hint { min-height: 36px; padding: 8px 11px; font-size: 11px; }
 .screenshot-tour .caption > .app-capture,
 .app-capture[data-shot="progress"], .app-capture[data-shot="setup"] { flex: 0 0 auto; height: min(650px,calc(100dvh - 305px)); }
 /* Large complete screens, with a peek of the next and explicit controls. */
 .beginner-screens, .stats-gallery { display: flex; justify-content: flex-start; align-items: flex-start; width: 100%; max-width: 100%; min-height: 0; gap: 22px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; overscroll-behavior-inline: contain; scrollbar-width: none; padding: 8px 20px 30px; }
 .beginner-screens::-webkit-scrollbar, .stats-gallery::-webkit-scrollbar { display: none; }
 .beginner-screens .app-capture, .beginner-screens .recommendation-shot, .stats-gallery .gallery-shot { flex: 0 0 auto; height: min(570px,calc(100dvh - 370px)); width: auto; max-width: none; min-width: 0; grid-column: auto; scroll-snap-align: center; }
 .beginner-screens [data-shot] > img, .stats-gallery [data-shot] > img { border-width: 2px; border-radius: 15px; }
 .beginner-screens figcaption, .stats-gallery figcaption { font-size: 11px; top: calc(100% + 9px); left: -10%; right: -10%; }
 .screen-browser-nav { display: flex; align-items: center; justify-content: center; gap: 18px; height: 32px; width: 100%; margin-top: -6px; }
 .screen-browser-nav button { min-width: 42px; min-height: 32px; color: #fff1e6; border: 1px solid #c79b7e70; border-radius: 24px; background: #24150fdf; font: 16px/1 Inter,sans-serif; cursor: pointer; }
 .screen-browser-nav output { color: #e8c7ae; font: 600 12px/1 Inter,sans-serif; min-width: 42px; text-align: center; }
 .screen-browser-nav button:disabled { opacity: .35; cursor: default; }
}
@media (max-width:700px) and (max-height:700px) {
 .screenshot-tour .caption:has([data-shot]) .sub { font-size: 10px; }
 .screenshot-tour .caption:has([data-shot]) h2 { font-size: 23px; }
 .screenshot-tour .caption > .app-capture { height: calc(100dvh - 290px); }
 .beginner-screens .app-capture, .beginner-screens .recommendation-shot, .stats-gallery .gallery-shot { height: calc(100dvh - 345px); }
}

[data-shot="setup"] { aspect-ratio: 1320 / 2868; }
/* On wide screens the viewer uses the full height, with controls in the side
   margins, so even the enlarged standalone captures get a larger view. */
@media (min-width:1151px) {
 .screen-viewer[open] { display: block; padding: 14px 205px; }
 .screen-viewer header { position: absolute; inset: 16px 24px auto; width: auto; max-width: none; }
 .screen-viewer nav { position: absolute; right: 24px; bottom: 24px; }
}

/* Keep training and wellness captures large, with explicit browsing controls. */
[data-shot="recovery"], [data-shot="supplements"] { aspect-ratio: 1320 / 2868; }
.gallery-shot[data-shot="recovery"] > img { border-color: #407a54; }
.gallery-shot[data-shot="supplements"] > img { border-color: #69538a; }
.screen-browser-nav button span { display: none; }
@media (min-width:701px) {
 .stats-gallery { display: flex; flex: 0 0 auto; justify-content: flex-start; gap: 18px; padding: 10px 12px 34px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-inline: contain; scrollbar-width: none; }
 .stats-gallery::-webkit-scrollbar { display: none; }
 .stats-gallery .gallery-shot { flex: 0 0 auto; max-width: none; height: min(545px,calc(100dvh - 400px),calc((92vw - 108px) * .43)); }
 .stats-scene > .screen-browser-nav { position: absolute; left: 0; right: 0; bottom: -42px; display: flex; align-items: center; justify-content: center; gap: 18px; height: 36px; }
 .stats-scene > .screen-browser-nav[data-overflow="false"] { display: none; }
 .stats-scene .screen-browser-nav button { display: inline-flex; gap: 8px; align-items: center; justify-content: center; min-height: 36px; padding: 8px 15px; border: 1px solid #c79b7e70; border-radius: 24px; background: #24150fef; color: #fff1e6; font: 600 12px/1 Inter,sans-serif; cursor: pointer; }
 .stats-scene .screen-browser-nav button span { display: inline; }
 .stats-scene .screen-browser-nav button:disabled { opacity: .35; cursor: default; }
 .stats-scene .screen-browser-nav button:focus-visible { outline: 2px solid #ffc6a0; outline-offset: 4px; }
 .stats-scene .screen-browser-nav output { color: #e8c7ae; font: 600 12px/1 Inter,sans-serif; min-width: 65px; text-align: center; }
}

/* Full reading windows with ordinary scrolling, including short gestures. */
.stage-scroll .scroll-space { height: auto; }
/* Longer reading windows. Overload Points gets extra scroll distance. */
.tour-scroll-stop { height: 250svh; pointer-events: none; }
.tour-scroll-stop[data-tour-stage="1"] { height: 650svh; }
/* Keep the last landmark at the document end, without trailing empty space. */
.tour-scroll-stop:last-child { height: 100svh; }
@keyframes stage-copy-arrival { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
.stage-scroll .caption.visible .feature-copy,
.stage-scroll .caption-hero.visible .caption-panel,
.stage-scroll .finale.visible .caption-panel,
.stage-scroll .logdemo.visible .logdemo-card { animation: stage-copy-arrival 220ms ease-out both; }
@media (prefers-reduced-motion:reduce) {
 .stage-scroll .caption.visible .feature-copy,
 .stage-scroll .caption-hero.visible .caption-panel,
 .stage-scroll .finale.visible .caption-panel,
 .stage-scroll .logdemo.visible .logdemo-card { animation: none; }
}

/* Keep the next step visible even while detailed demo fields scroll. */
.screenshot-tour:not(.flat-tour) .logdemo { top: 80px; bottom: 28px; transform: translateX(-50%); display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.screenshot-tour .logdemo-card { flex: 0 1 auto; min-height: 0; max-height: calc(100dvh - 210px); }
.logdemo-tour-actions { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 16px; border: 1px solid var(--caption-box-border); border-radius: 14px; background: #080605ed; text-align: center; }
.logdemo-tour-actions .caption-action { width: 100%; }
.logdemo-tour-actions p { color: #d3c1b3; font: 500 12px/1.4 var(--font-body); }
.logdemo-tour-actions p::after { content: ' ↓'; color: #f5d9c3; }
