:root {
    --bg: #f5f7f3;
    --bg-soft: #edf3ee;
    --card: #ffffff;
    --ink: #11281d;
    --ink-soft: #2c4438;
    --muted: #60736a;
    --line: #dde7e0;
    --accent: #1f8a5b;
    --accent-ink: #136b45;
    --accent-soft: #e3f3ea;
    --gold: #e2b04a;
    --gold-soft: #fbf1da;
    --night: #071d14;
    --night-2: #0d3324;
    --radius: 18px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(17, 40, 29, .06), 0 12px 32px -12px rgba(17, 40, 29, .18);
    --shadow-lg: 0 30px 80px -30px rgba(7, 29, 20, .45);
    --font: 'Hind Siliguri', system-ui, sans-serif;
    --font-display: 'Noto Serif Bengali', 'Hind Siliguri', serif;
    --topbar: 64px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar) + 16px); }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16.5px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
kbd {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; height: 22px; padding: 0 6px;
    border: 1px solid currentColor; border-bottom-width: 2px; border-radius: 6px;
    font: 600 11px/1 ui-monospace, monospace; opacity: .7;
}
input[type=search]::-webkit-search-cancel-button { display: none; }
mark { background: var(--gold-soft); color: inherit; border-radius: 3px; padding: 0 1px; }

.icon { width: 20px; height: 20px; flex: none; }
.icon-xs { width: 15px; height: 15px; }

.progress-bar {
    position: fixed; inset: 0 auto auto 0; height: 3px; width: 100%;
    transform-origin: left; transform: scaleX(0);
    background: linear-gradient(90deg, var(--gold), var(--accent));
    z-index: 60;
}

.topbar {
    position: fixed; inset: 0 0 auto 0; height: var(--topbar); z-index: 50;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 clamp(16px, 4vw, 40px);
    color: #fff;
    transition: background .3s, box-shadow .3s, color .3s;
}
.topbar.is-solid {
    background: rgba(255, 255, 255, .86);
    backdrop-filter: saturate(1.4) blur(14px);
    box-shadow: 0 1px 0 var(--line);
    color: var(--ink);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-mark {
    display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px;
    background: linear-gradient(135deg, var(--gold), #f6d48b); color: var(--night);
}
.brand-text { line-height: 1.1; font-size: 17px; }
.brand-text small { display: block; font-weight: 500; font-size: 12px; opacity: .75; }
.topbar-nav { display: flex; align-items: center; gap: 18px; font-weight: 500; }
.search-trigger {
    display: flex; align-items: center; gap: 8px; cursor: pointer;
    padding: 7px 10px 7px 12px; border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .08);
}
.topbar.is-solid .search-trigger { border-color: var(--line); background: var(--bg); }

.hero {
    position: relative; overflow: hidden; isolation: isolate;
    min-height: 94vh; display: flex; align-items: center;
    padding: calc(var(--topbar) + 40px) clamp(16px, 6vw, 80px) 90px;
    color: #fff;
    background:
        radial-gradient(1200px 600px at 85% 10%, rgba(226, 176, 74, .22), transparent 60%),
        radial-gradient(900px 600px at 10% 90%, rgba(31, 138, 91, .45), transparent 60%),
        linear-gradient(160deg, var(--night) 0%, var(--night-2) 55%, #0b2a1d 100%);
}
.hero-scenario { min-height: 78vh; align-items: flex-end; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, rgba(7, 29, 20, .82) 0%, rgba(7, 29, 20, .55) 38%, transparent 62%); }
.hero-canvas + .hero-glow { z-index: -1; }
.hero-glow {
    position: absolute; inset: auto -10% -40% -10%; height: 60%; z-index: -1;
    background: radial-gradient(closest-side, rgba(7, 29, 20, .9), transparent);
    pointer-events: none;
}
.hero-inner { max-width: 760px; }
.hero-inner-wide { max-width: 1180px; width: 100%; }
.eyebrow {
    display: inline-block; margin: 0 0 14px; padding: 4px 12px; border-radius: 999px;
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
    font-size: 13.5px; letter-spacing: .2px;
}
.hero-title {
    margin: 0 0 16px; font-family: var(--font-display); font-weight: 800;
    font-size: clamp(38px, 6.4vw, 76px); line-height: 1.12;
    text-shadow: 0 10px 40px rgba(0, 0, 0, .35);
}
.hero-title span {
    background: linear-gradient(90deg, var(--gold), #f8dc9b 60%, #fff);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-scenario .hero-title { font-size: clamp(34px, 5.2vw, 62px); }
.hero-lead { margin: 0 0 30px; font-size: clamp(17px, 1.6vw, 21px); color: rgba(255, 255, 255, .82); max-width: 640px; }
.hero-search {
    width: 100%; max-width: 620px; display: flex; align-items: center; gap: 12px; cursor: pointer;
    padding: 16px 18px; border-radius: 16px; text-align: left;
    background: rgba(255, 255, 255, .96); color: var(--muted); border: 0;
    box-shadow: var(--shadow-lg); transition: transform .25s, box-shadow .25s;
}
.hero-search:hover { transform: translateY(-2px); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6); }
.hero-search .icon { color: var(--accent); width: 22px; height: 22px; }
.hero-search span { flex: 1; }
.hero-stats { display: flex; gap: 34px; margin: 36px 0 0; }
.hero-stats dt { font-family: var(--font-display); font-size: 34px; font-weight: 800; color: var(--gold); line-height: 1; }
.hero-stats dd { margin: 6px 0 0; color: rgba(255, 255, 255, .7); font-size: 14px; }
.hero-scroll {
    position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
    width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .3); animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translate(-50%, 8px); } }
.back-link { display: flex; width: max-content; align-items: center; gap: 6px; margin-bottom: 18px; color: rgba(255, 255, 255, .8); font-weight: 500; }
.back-link:hover { color: #fff; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: start; }
.hero-summary { margin: 0; color: rgba(255, 255, 255, .78); font-size: 16.5px; }
.example-card {
    margin: 0; padding: 18px 20px; border-radius: var(--radius);
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16);
    backdrop-filter: blur(10px);
}
.example-title { margin: 0 0 8px; font-weight: 700; color: var(--gold); }
.example-card div { display: grid; grid-template-columns: 70px 1fr; gap: 10px; padding: 5px 0; border-top: 1px dashed rgba(255, 255, 255, .14); font-size: 14.5px; }
.example-card dt { color: rgba(255, 255, 255, .6); }
.example-card dd { margin: 0; }

.home, .overview { max-width: 1220px; margin: 0 auto; padding: 70px clamp(16px, 4vw, 40px); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2, .how h2 { margin: 0; font-family: var(--font-display); font-size: clamp(26px, 3vw, 36px); }
.filter-field {
    display: flex; align-items: center; gap: 8px; padding: 10px 14px; min-width: min(380px, 100%);
    border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--muted);
}
.filter-field input { border: 0; outline: 0; background: none; font: inherit; color: var(--ink); width: 100%; }
.filter-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.filter-field-sm { min-width: 0; padding: 8px 12px; margin-bottom: 14px; font-size: 15px; }

.scenario-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
.scenario-card {
    position: relative; display: flex; flex-direction: column; overflow: hidden;
    border-radius: 22px; background: var(--card); box-shadow: var(--shadow);
    border: 1px solid var(--line); transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s;
    transform-style: preserve-3d;
}
.scenario-card:hover { box-shadow: var(--shadow-lg); }
.scenario-card-media { position: relative; height: 210px; overflow: hidden; background: var(--night-2); }
.scenario-card-media img { width: 100%; height: 100%; object-fit: cover; object-position: top left; opacity: .85; transform: scale(1.04); transition: transform .8s, opacity .4s; }
.scenario-card:hover .scenario-card-media img { transform: scale(1.1); opacity: 1; }
.scenario-card-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(7, 29, 20, .75)); }
.scenario-card-icon {
    position: absolute; left: 20px; bottom: -22px; z-index: 2; width: 54px; height: 54px; border-radius: 16px;
    display: grid; place-items: center; background: linear-gradient(135deg, var(--gold), #f6d48b); color: var(--night);
    box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .5);
}
.scenario-card-icon .icon { width: 26px; height: 26px; }
.scenario-card-body { padding: 34px 22px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.scenario-card-kicker { margin: 0; font-size: 12.5px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.scenario-card h3 { margin: 0; font-family: var(--font-display); font-size: 25px; }
.scenario-card p { margin: 0; color: var(--ink-soft); }
.scenario-card-foot { margin-top: auto; padding-top: 14px; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 14.5px; border-top: 1px solid var(--line); }
.scenario-card .go { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; }
.scenario-card:hover .go .icon { transform: translateX(4px); }
.go .icon { transition: transform .25s; }
.scenario-card-soon { border-style: dashed; background: transparent; box-shadow: none; justify-content: center; }
.scenario-card-soon .scenario-card-body { padding: 30px 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.chip {
    display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px;
    background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 500;
}
.chip-soft { background: var(--gold-soft); color: #8a5a00; }
.empty-filter { color: var(--muted); text-align: center; padding: 20px; }

.how { margin-top: 80px; }
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin-top: 22px; }
.how-item { padding: 22px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.how-item > span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.how-item h3 { margin: 14px 0 4px; font-size: 18px; }
.how-item p { margin: 0; color: var(--muted); font-size: 15px; }

.overview { padding-top: 0; margin-top: -54px; position: relative; z-index: 2; }
.flow {
    display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; position: relative;
    padding: 26px 18px; border-radius: 22px; background: var(--card); box-shadow: var(--shadow-lg); border: 1px solid var(--line);
}
.flow::before {
    content: ''; position: absolute; left: 8%; right: 8%; top: 46px; height: 3px; border-radius: 3px;
    background: linear-gradient(90deg, var(--accent), var(--gold), var(--accent)); background-size: 200% 100%;
    animation: flowline 6s linear infinite; opacity: .55;
}
@keyframes flowline { to { background-position: -200% 0; } }
.flow-node { position: relative; text-align: center; padding: 0 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.flow-dot {
    width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 8px;
    background: var(--card); border: 3px solid var(--accent); color: var(--accent); font-weight: 700; position: relative; z-index: 1;
    transition: transform .3s, background .3s, color .3s;
}
.flow-node:hover .flow-dot { transform: scale(1.12); background: var(--accent); color: #fff; }
.flow-node strong { font-size: 15.5px; line-height: 1.35; }
.flow-node small { color: var(--muted); font-size: 13px; line-height: 1.3; }
.overview-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 22px; margin-top: 26px; }
.actors, .rules { padding: 22px 24px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.actors h2, .rules h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 19px; }
.actors h2 .icon, .rules h2 .icon { color: var(--accent); }
.actor { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.actor-icon { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--bg-soft); color: var(--accent); }
.actor .chips { margin: 4px 0 0; }
.rules ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rules li { display: flex; gap: 10px; color: var(--ink-soft); }
.rules li .icon { margin-top: 6px; color: var(--accent); }

.guide { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 40px; max-width: 1320px; margin: 0 auto; padding: 10px clamp(16px, 3vw, 40px) 80px; }
.toc { position: relative; }
.toc-inner {
    position: sticky; top: calc(var(--topbar) + 18px); max-height: calc(100vh - var(--topbar) - 36px); overflow: auto;
    padding: 18px 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line);
    scrollbar-width: thin;
}
.toc-toggle { display: none; }
.toc-phase { margin-bottom: 10px; }
.toc-phase-title { display: flex; align-items: center; gap: 8px; margin: 6px 4px; font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .3px; }
.toc-phase-title span { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; background: var(--bg-soft); font-size: 12px; }
.toc-link {
    display: flex; gap: 10px; align-items: flex-start; padding: 6px 8px; border-radius: 9px;
    font-size: 14.5px; line-height: 1.45; color: var(--ink-soft); transition: background .2s, color .2s;
}
.toc-link:hover { background: var(--bg-soft); }
.toc-link.is-active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.toc-number { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; border: 1px solid var(--line); background: var(--card); }
.toc-link.is-active .toc-number { background: var(--accent); color: #fff; border-color: var(--accent); }

.steps { min-width: 0; }
.phase { margin-bottom: 30px; }
.phase-head {
    display: flex; gap: 18px; align-items: center; margin: 30px 0 22px; padding: 22px 24px; border-radius: 22px;
    color: #fff; background: linear-gradient(120deg, var(--night-2), var(--accent));
    box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.phase-head::after { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(226, 176, 74, .35), transparent 70%); }
.phase-number { flex: none; width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; font-family: var(--font-display); font-size: 28px; font-weight: 800; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); }
.phase-kicker { margin: 0; font-size: 13.5px; opacity: .8; }
.phase-head h2 { margin: 0; font-family: var(--font-display); font-size: clamp(22px, 2.4vw, 30px); line-height: 1.3; }
.phase-role { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: 14px; opacity: .85; }

.step { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 18px; margin-bottom: 26px; }
.step[hidden] { display: none; }
.step-rail { position: relative; display: flex; justify-content: center; }
.step-rail::before { content: ''; position: absolute; top: 52px; bottom: -26px; width: 2px; background: linear-gradient(var(--line), transparent); }
.step-number {
    position: sticky; top: calc(var(--topbar) + 20px); width: 48px; height: 48px; border-radius: 50%;
    display: grid; place-items: center; font-weight: 700; font-size: 18px;
    background: var(--card); color: var(--accent); border: 2px solid var(--accent); box-shadow: 0 8px 20px -10px rgba(31, 138, 91, .6);
    transition: background .3s, color .3s, transform .3s;
}
.step.is-current .step-number { background: var(--accent); color: #fff; transform: scale(1.06); }
.step-body { padding: 24px 26px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; }
.step.is-target .step-body { animation: pulse 1.6s ease-out 1; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(226, 176, 74, .7), var(--shadow); } 100% { box-shadow: 0 0 0 18px rgba(226, 176, 74, 0), var(--shadow); } }
.step-head { position: relative; padding-right: 44px; }
.step-head .chips { margin: 0 0 8px; }
.step-head h3 { margin: 0; font-family: var(--font-display); font-size: clamp(21px, 2.1vw, 27px); line-height: 1.35; }
.menu-path { display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 0; padding: 4px 12px; border-radius: 9px; background: var(--bg-soft); color: var(--ink-soft); font-size: 14px; }
.copy-link { position: absolute; top: 0; right: 0; }
.icon-button {
    display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; cursor: pointer;
    border: 1px solid var(--line); background: var(--card); color: var(--muted); transition: color .2s, border-color .2s, transform .2s;
}
.icon-button:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.step-summary { margin: 16px 0 6px; font-size: 17.5px; color: var(--ink); font-weight: 500; }
.step-content { display: grid; gap: 10px; }
.do-list { margin: 4px 0; padding: 0; list-style: none; counter-reset: do; display: grid; gap: 8px; }
.do-list li { counter-increment: do; position: relative; padding: 8px 12px 8px 46px; border-radius: 12px; background: var(--bg); color: var(--ink-soft); }
.do-list li::before {
    content: counter(do, bengali); position: absolute; left: 10px; top: 9px; width: 26px; height: 26px; border-radius: 8px;
    display: grid; place-items: center; font-size: 13.5px; font-weight: 700; background: var(--accent-soft); color: var(--accent-ink);
}
.tip { display: flex; gap: 10px; margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--gold-soft); color: #6b4a00; font-size: 15px; border: 1px solid #f1dfb2; }
.tip .icon { color: #c08a16; margin-top: 3px; }

.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.shot { margin: 0; will-change: transform; }
.shot-main { grid-column: 1 / -1; }
.shot-button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; position: relative; }
.shot-frame {
    display: block; border-radius: 14px; overflow: hidden; background: #e9eee9; border: 1px solid var(--line);
    box-shadow: 0 18px 40px -24px rgba(7, 29, 20, .55); transition: transform .45s cubic-bezier(.2, .8, .2, 1), box-shadow .45s;
}
.shot-frame img { width: 100%; }
.shot-dots { display: flex; gap: 6px; padding: 8px 12px; background: #f3f6f3; border-bottom: 1px solid var(--line); }
.shot-dots i { width: 9px; height: 9px; border-radius: 50%; background: #d3dbd5; }
.shot-dots i:first-child { background: #f2a49c; }
.shot-dots i:nth-child(2) { background: #f5d48b; }
.shot-dots i:nth-child(3) { background: #9ed8b4; }
.shot-button:hover .shot-frame { transform: translateY(-4px) scale(1.008); box-shadow: 0 30px 60px -28px rgba(7, 29, 20, .6); }
.shot-zoom {
    position: absolute; right: 12px; bottom: 12px; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
    background: rgba(7, 29, 20, .75); color: #fff; opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s;
}
.shot-button:hover .shot-zoom { opacity: 1; transform: none; }
.shot figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); text-align: center; }

.step-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.step-nav a { display: flex; align-items: center; gap: 10px; max-width: 48%; padding: 8px 12px; border-radius: 12px; color: var(--ink-soft); font-size: 14.5px; line-height: 1.35; transition: background .2s; }
.step-nav a:hover { background: var(--bg-soft); color: var(--accent-ink); }
.step-nav a.next { text-align: right; margin-left: auto; }
.step-nav small { display: block; color: var(--muted); font-size: 12px; }

.finish { text-align: center; padding: 50px 20px; border-radius: 26px; background: linear-gradient(140deg, var(--accent-soft), var(--gold-soft)); }
.finish-icon { display: inline-grid; place-items: center; width: 70px; height: 70px; border-radius: 50%; background: var(--accent); color: #fff; }
.finish-icon .icon { width: 34px; height: 34px; }
.finish h2 { font-family: var(--font-display); margin: 14px 0 4px; font-size: 30px; }
.finish p { margin: 0 0 20px; color: var(--ink-soft); }
.button { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 600; box-shadow: 0 14px 30px -14px rgba(31, 138, 91, .8); }
.button:hover { background: var(--accent-ink); }

.lightbox { position: fixed; inset: 0; z-index: 80; display: grid; grid-template-columns: 70px minmax(0, 1fr) 70px; align-items: center; background: rgba(4, 16, 11, .92); backdrop-filter: blur(6px); animation: fade .2s; }
.lightbox[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.lightbox .icon-button { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .2); color: #fff; width: 48px; height: 48px; justify-self: center; }
.lightbox-close { position: absolute; top: 16px; right: 16px; }
.lightbox-figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; height: 100vh; justify-content: center; padding: 30px 0; }
.lightbox-stage { overflow: hidden; max-width: 100%; max-height: calc(100vh - 110px); border-radius: 12px; cursor: zoom-in; box-shadow: 0 40px 100px -30px #000; }
.lightbox-stage img { max-height: calc(100vh - 110px); width: auto; transition: transform .3s; transform-origin: center; }
.lightbox-stage.is-zoomed { cursor: grab; }
.lightbox-stage.is-zoomed img { transform: scale(2); transition: none; }
.lightbox figcaption { color: rgba(255, 255, 255, .85); font-size: 15px; text-align: center; }

.search-panel { position: fixed; inset: 0; z-index: 90; display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; }
.search-panel[hidden] { display: none; }
.search-panel-backdrop { position: absolute; inset: 0; background: rgba(4, 16, 11, .55); backdrop-filter: blur(4px); animation: fade .2s; }
.search-panel-box { position: relative; width: min(720px, 100%); max-height: 76vh; display: flex; flex-direction: column; border-radius: 20px; background: var(--card); box-shadow: var(--shadow-lg); overflow: hidden; animation: rise .25s cubic-bezier(.2, .8, .2, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.search-panel-field { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--accent); }
.search-panel-field input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 18px; color: var(--ink); background: none; }
.search-results { overflow: auto; padding: 8px; }
.search-group { margin: 6px 8px 4px; font-size: 12.5px; color: var(--muted); font-weight: 700; letter-spacing: .3px; }
.search-item { display: flex; gap: 12px; padding: 10px 12px; border-radius: 12px; align-items: flex-start; }
.search-item.is-active, .search-item:hover { background: var(--accent-soft); }
.search-item-number { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--bg-soft); color: var(--accent-ink); }
.search-item strong { display: block; font-size: 15.5px; line-height: 1.4; }
.search-item p { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.search-item small { display: block; font-size: 12.5px; color: var(--accent-ink); margin-top: 2px; }
.search-empty { padding: 30px; text-align: center; color: var(--muted); }
.search-panel-foot { display: flex; gap: 8px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); padding: 10px 18px; border-radius: 12px; background: var(--night); color: #fff; font-size: 15px; opacity: 0; transition: opacity .25s, transform .25s; z-index: 95; pointer-events: none; }
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

.footer { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 26px clamp(16px, 4vw, 40px); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2, .8, .2, 1), transform .8s cubic-bezier(.2, .8, .2, 1); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 1080px) {
    .guide { grid-template-columns: 1fr; }
    .toc-inner { position: static; max-height: none; display: none; margin-top: 10px; }
    .toc.is-open .toc-inner { display: block; }
    .toc { position: sticky; top: calc(var(--topbar) + 8px); z-index: 20; }
    .toc-toggle { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); cursor: pointer; font-weight: 600; }
    .toc.is-open .toc-inner { position: absolute; left: 0; right: 0; max-height: 70vh; overflow: auto; box-shadow: var(--shadow-lg); }
    .hero-grid, .overview-grid { grid-template-columns: 1fr; }
    .flow { grid-template-columns: repeat(3, 1fr); row-gap: 22px; }
    .flow::before { display: none; }
}

@media (max-width: 640px) {
    body { font-size: 15.5px; }
    .topbar-nav > a { display: none; }
    .search-trigger kbd, .hero-search kbd { display: none; }
    .step { grid-template-columns: 1fr; }
    .step-rail { display: none; }
    .step-body { padding: 18px 16px; }
    .gallery { grid-template-columns: 1fr; }
    .flow { grid-template-columns: repeat(2, 1fr); }
    .hero-stats { gap: 22px; }
    .lightbox { grid-template-columns: 44px minmax(0, 1fr) 44px; }
    .scenario-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .hero-scroll, .flow::before { animation: none; }
}

@media print {
    .topbar, .toc, .hero-canvas, .search-panel, .lightbox, .step-nav, .copy-link, .progress-bar, .hero-scroll, .footer { display: none !important; }
    .hero { min-height: 0; color: var(--ink); background: none; padding: 20px 0; }
    .hero-lead, .hero-summary, .example-card dt { color: var(--ink-soft); }
    .guide { display: block; padding: 0; }
    .reveal { opacity: 1; transform: none; }
    .step, .shot { break-inside: avoid; }
    .phase-head { color: var(--ink); background: none; border: 1px solid var(--line); }
}
