/* v3: guided-tour presentation, layered on style.css tokens (so light.css theming carries over) */
html, body.deck { height: 100%; overflow: hidden; }
body.deck { background: var(--bg); overscroll-behavior: none; }

/* ------------------------------------------------ chrome */
.deck__top { position: fixed; inset: 0 0 auto 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; padding: 18px var(--gutter); pointer-events: none; }
.deck__top > * { pointer-events: auto; }
.deck__logo img { height: 24px; width: auto; }
.deck__tools { display: flex; gap: 6px; align-items: center; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); background: rgba(127,127,127,0.08); box-shadow: 0 0 0 1px var(--line) inset; transition: color 150ms ease, background-color 150ms ease, transform 160ms var(--ease-out); flex: none; }
.icon-btn:hover { color: var(--text); background: rgba(127,127,127,0.16); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn[disabled] { opacity: 0.35; pointer-events: none; }

.deck__bar { position: fixed; inset: auto 0 0 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 14px var(--gutter) 18px; background: linear-gradient(0deg, var(--bg) 55%, transparent); }
.deck__count { font-family: var(--font-display); font-weight: 600; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; white-space: nowrap; }
.segs { flex: 1; display: flex; align-items: center; gap: 3px; min-width: 0; }
.seg { position: relative; flex: 1; height: 6px; border-radius: 3px; background: var(--line-strong); cursor: pointer; transition: height 200ms var(--ease-out); }
.seg.act-start { margin-left: 10px; }
.seg:first-child { margin-left: 0; }
.seg i { position: absolute; inset: 0; border-radius: 3px; background: var(--brand); transform-origin: left center; transform: scaleX(0); }
.seg.is-done i { transform: scaleX(1); opacity: 0.55; }
.seg.is-active { height: 10px; }
.seg.is-active i { opacity: 1; }
.seg::after { content: attr(data-label); position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translate(-50%, 4px); padding: 6px 10px; border-radius: 8px; background: var(--text); color: var(--bg); font-size: 12px; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 150ms ease, transform 150ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .seg:hover { height: 10px; } .seg:hover::after { opacity: 1; transform: translate(-50%, 0); } }
.auto { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.auto input { position: absolute; opacity: 0; width: 0; height: 0; }
.auto i { position: relative; width: 30px; height: 18px; border-radius: 999px; background: rgba(127,127,127,0.25); transition: background-color 200ms ease; flex: none; }
.auto i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform 220ms var(--ease-out); }
.auto input:checked + i { background: var(--brand); }
.auto input:checked + i::after { transform: translateX(12px); }

/* ------------------------------------------------ stage + slides */
.stage { position: fixed; inset: 0; overflow: hidden; }
.stage::before { content: ""; position: absolute; inset: -20% -10% auto -10%; height: 80vh; background: radial-gradient(55% 60% at 60% 30%, var(--glow), transparent 70%); filter: blur(40px); opacity: 0.7; pointer-events: none; }
.slide { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(280px, 0.6fr) 2fr; gap: clamp(24px, 3.5vw, 56px); align-items: center; padding: 84px var(--gutter) 96px; visibility: hidden; opacity: 0; }
.slide.is-active { visibility: visible; opacity: 1; }
.slide__copy { display: grid; gap: 14px; align-content: center; min-width: 0; }
.slide__meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.slide__num { font-family: var(--font-display); font-weight: 600; font-size: 13px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.slide__title { font-size: clamp(2.1rem, 4vw, 3.8rem); }
.mask { display: block; overflow: clip; padding: 0.14em 0.12em 0.24em 0.04em; margin: -0.14em -0.12em -0.24em -0.04em; }
.mask > span { display: block; }
.slide__lead { font-size: clamp(1.05rem, 1.35vw, 1.28rem); color: var(--muted); line-height: 1.5; max-width: 34ch; }
.slide__points { display: grid; gap: 10px; margin-top: 4px; }
.slide__points li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 15px; line-height: 1.45; }
.slide__points li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; background: rgba(52,211,153,0.15) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334d399' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 9px no-repeat; }
html[data-theme="light"] .slide__points li::before { background-color: rgba(21,128,61,0.12); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315803d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.slide__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.slide__actions .btn { height: 46px; font-size: 14px; }

.slide__media { display: grid; justify-items: center; align-content: center; gap: 12px; min-width: 0; }
.shot { width: min(100%, calc((100svh - 250px) * 1.9316)); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--line-strong), 0 40px 100px -30px rgba(0,0,0,0.6), 0 20px 60px -30px var(--glow); }
.shot__body { position: relative; aspect-ratio: 1920 / 994; cursor: pointer; background: #fff; }
.shot__body video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
.shot__cap { width: min(100%, calc((100svh - 250px) * 1.9316)); display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12.5px; color: var(--muted-2); }
.state { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--muted); }
.slide.is-walk .state { color: var(--text); }
.state i { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; flex: none; }
.slide.is-walk .state i { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.25); }
.bigplay { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; background: linear-gradient(180deg, rgba(6,9,15,0) 40%, rgba(6,9,15,0.35)); transition: opacity 250ms ease; }
.bigplay b { display: inline-flex; align-items: center; gap: 12px; height: 60px; padding: 0 24px 0 16px; border-radius: 999px; background: #fff; color: #0f172a; font-size: 15px; font-weight: 600; box-shadow: 0 20px 50px -18px rgba(0,0,0,0.7); transition: transform 160ms var(--ease-out); }
.bigplay b i { width: 32px; height: 32px; border-radius: 50%; background: #2563eb; display: grid; place-items: center; }
.bigplay b i svg { width: 13px; height: 13px; fill: #fff; margin-left: 2px; }
.shot__body:hover .bigplay b { transform: scale(1.04); }
.slide.is-walk .bigplay { opacity: 0; pointer-events: none; }
.paused { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity 200ms ease; }
.paused b { width: 72px; height: 72px; border-radius: 50%; background: rgba(6,9,15,0.7); display: grid; place-items: center; }
.paused b svg { width: 24px; height: 24px; fill: #fff; }
.slide.is-paused .paused { opacity: 1; }
.nextup { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: rgba(6,9,15,0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity 250ms ease; }
.slide.is-ended .nextup { opacity: 1; pointer-events: auto; }
.nextup .btn { --btn-bg: #fff; --btn-fg: #0f172a; }
.scrub { position: relative; height: 4px; background: rgba(127,127,127,0.18); }
.scrub i { position: absolute; inset: 0; background: var(--brand); transform-origin: left center; transform: scaleX(0); }

/* intro + end */
.slide--center { grid-template-columns: 1fr; justify-items: center; text-align: center; }
.slide--center .slide__copy { justify-items: center; max-width: 980px; }
.slide--center .slide__lead { max-width: 58ch; text-align: center; }
.intro__mark { width: 64px; height: 64px; border-radius: 18px; overflow: hidden; box-shadow: 0 20px 60px -20px var(--glow); }
.intro__mark img { width: 100%; height: 100%; object-fit: cover; }
.intro__title { font-size: clamp(2.8rem, 6.4vw, 6rem); }
.intro__meta { font-size: 13px; color: var(--muted-2); }
.acts { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-top: 18px; width: min(100%, 1100px); }
.act { display: grid; gap: 4px; padding: 14px 12px; border-radius: 14px; text-align: left; background: rgba(127,127,127,0.06); box-shadow: 0 0 0 1px var(--line) inset; transition: background-color 150ms ease, transform 160ms var(--ease-out); }
.act:hover { background: rgba(37,99,235,0.1); }
.act:active { transform: scale(0.97); }
.act small { font-family: var(--font-display); font-weight: 600; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand-2); }
.act b { font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; color: var(--text); line-height: 1.2; }
.act span { font-size: 12px; color: var(--muted-2); }
.keys { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; font-size: 12px; color: var(--muted-2); margin-top: 6px; }
.keys kbd { font-family: inherit; font-size: 11px; padding: 2px 7px; border-radius: 6px; background: rgba(127,127,127,0.12); color: var(--muted); box-shadow: 0 0 0 1px var(--line) inset; }

/* ------------------------------------------------ overview */
.overview { position: fixed; inset: 0; z-index: 40; background: var(--bg); overflow-y: auto; visibility: hidden; opacity: 0; transition: opacity 250ms ease, visibility 0s linear 250ms; }
.overview.is-open { visibility: visible; opacity: 1; transition: opacity 250ms ease; }
.overview__inner { width: min(100% - 2 * var(--gutter), 1320px); margin: 0 auto; padding: 32px 0 60px; }
.overview__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 26px; }
.ov-act { margin-top: 26px; }
.ov-act h3 { font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand-2); margin-bottom: 12px; }
.ov-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ov-card { display: grid; gap: 0; border-radius: 14px; overflow: hidden; text-align: left; background: rgba(127,127,127,0.06); box-shadow: 0 0 0 1px var(--line) inset; transition: transform 200ms var(--ease-out), box-shadow 200ms ease; }
.ov-card:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--line-strong) inset, 0 20px 40px -24px rgba(0,0,0,0.5); }
.ov-card img { width: 100%; aspect-ratio: 1920 / 994; object-fit: contain; display: block; background: var(--app-bg); }
.ov-card div { padding: 12px 14px 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.ov-card b { font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; color: var(--text); }
.ov-card span { font-size: 12px; color: var(--muted-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ov-card.is-current { box-shadow: 0 0 0 2px var(--brand) inset; }

.toast { position: fixed; left: 50%; bottom: 84px; z-index: 50; transform: translate(-50%, 10px); padding: 10px 16px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 13px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity 200ms ease, transform 200ms var(--ease-out); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------ responsive */
@media (max-width: 1100px) { .acts { grid-template-columns: repeat(4, minmax(0, 1fr)); } .ov-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .slide { grid-template-columns: 1fr; align-content: center; gap: 18px; padding: 76px var(--gutter) 92px; overflow-y: auto; }
  .slide__media { order: -1; }
  .shot, .shot__cap { width: 100%; }
  .slide__lead { max-width: none; }
  .slide__points { display: none; }
  .auto span { display: none; }
  .acts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .keys { display: none; }
}
@media (max-width: 560px) {
  .seg.act-start { margin-left: 4px; } .segs { gap: 2px; } .slide__actions .btn--ghost { display: none; }
  .deck__bar { flex-wrap: wrap; row-gap: 10px; padding-top: 10px; }
  .segs { order: -1; flex-basis: 100%; }
  .auto { margin-right: auto; }
  .deck__bar > [data-prev] { order: 1; } .auto { order: 2; } .deck__count { order: 3; } .deck__bar > [data-next] { order: 4; }
  .slide { padding-bottom: 120px; }
  .shot__cap > span:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) { .seg, .bigplay, .nextup, .overview { transition: none; } }
