/* --------------------------------------------------------- guide system */
.guide-page { padding-top: 1.25rem; }
.guide-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; align-items: start; }
.guide-side,
.guide-main {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.guide-side { padding: 1rem; }
.guide-main { padding: 1.1rem; min-width: 0; }
.guide-side-head { display: flex; align-items: flex-start; gap: .7rem; margin-bottom: .9rem; }
.guide-side-icon {
    display: inline-flex;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--c-primary-soft);
    color: var(--c-primary);
    font-size: 1.1rem;
}
.guide-side-head h1 { font-size: 1.1rem; margin: 0 0 .15rem; }
.guide-side-head p { font-size: .76rem; color: var(--c-muted); margin: 0; line-height: 1.45; }

.guide-search {
    display: flex;
    align-items: center;
    gap: .45rem;
    border: 1px solid var(--c-line-strong);
    border-radius: var(--radius-pill);
    padding: .4rem .7rem;
    background: var(--c-bg);
    margin-bottom: .9rem;
}
.guide-search i { color: var(--c-muted); font-size: .85rem; }
.guide-search input {
    border: 0;
    outline: 0;
    background: transparent;
    width: 100%;
    font: inherit;
    font-size: .82rem;
    color: var(--c-text);
}
.guide-nav-groups { display: grid; gap: .9rem; }
.guide-nav-group h2 {
    font-size: .67rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--c-muted);
    margin: 0 0 .35rem .2rem;
}
.guide-nav-link {
    display: block;
    padding: .55rem .6rem;
    border-radius: var(--radius-sm);
    color: var(--c-text);
    border: 1px solid transparent;
}
.guide-nav-link strong { display: block; font-size: .84rem; line-height: 1.35; }
.guide-nav-link small { display: block; color: var(--c-muted); font-size: .72rem; line-height: 1.4; margin-top: .1rem; }
.guide-nav-link:hover { background: var(--c-bg); }
.guide-nav-link.is-active { background: var(--c-primary-soft); border-color: var(--c-primary); }
.guide-nav-link.is-active strong { color: var(--c-primary-dark); }
.guide-search-empty { font-size: .78rem; color: var(--c-muted); margin: .75rem 0 0; }

.guide-main-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; }
.guide-category {
    display: inline-flex;
    padding: .12rem .5rem;
    border-radius: var(--radius-pill);
    background: var(--c-primary-soft);
    color: var(--c-primary-dark);
    font-size: .67rem;
    font-weight: 600;
    margin-bottom: .35rem;
}
.guide-main-head h2 { font-size: clamp(1.15rem, 2.4vw, 1.55rem); margin: 0 0 .2rem; }
.guide-main-head p { color: var(--c-muted); font-size: .84rem; margin: 0; }

.guide-progress-wrap { display: flex; align-items: center; gap: .6rem; margin: 1rem 0 .4rem; }
.guide-progress { flex: 1; height: 6px; border-radius: var(--radius-pill); background: var(--c-bg); overflow: hidden; }
.guide-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--c-accent); transition: width .2s ease; }
.guide-progress-text { font-size: .72rem; color: var(--c-muted); margin: 0; white-space: nowrap; }

.guide-step { padding: .5rem 0 0; }
.guide-step-head { display: flex; align-items: center; gap: .55rem; margin-bottom: .55rem; }
.guide-step-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    padding: .18rem .45rem;
    border-radius: var(--radius-pill);
    background: var(--c-accent);
    color: #2B1802;
    font-size: .68rem;
    font-weight: 700;
}
.guide-step-head h3 { font-size: 1rem; margin: 0; }
.guide-step-body { font-size: .9rem; line-height: 1.85; color: var(--c-text); }
.guide-step-body p { margin-bottom: .6rem; }

html.guide-js .guide-step { display: none; }
html.guide-js .guide-step.is-active { display: block; }

.guide-shot { margin: 1rem 0 .75rem; }
.guide-shot-frame {
    position: relative;
    display: block;
    border: 1px solid var(--c-line-strong);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
    cursor: zoom-in;
}
.guide-shot-frame:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 3px; }
.guide-shot-frame img { display: block; width: 100%; height: auto; }
.guide-shot-markers { position: absolute; inset: 0; pointer-events: none; }
.guide-marker {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 0;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--c-accent);
    color: #2B1802;
    font: inherit;
    font-size: .72rem;
    font-weight: 800;
    box-shadow: 0 3px 10px rgba(8, 58, 80, .28);
    transform: translate(-50%, -50%);
    pointer-events: auto;
    transition: transform .15s ease, box-shadow .15s ease;
}
.guide-marker:hover,
.guide-marker:focus-visible,
.guide-marker.is-highlight {
    transform: translate(-50%, -50%) scale(1.16);
    box-shadow: 0 0 0 5px rgba(242, 169, 59, .28), 0 4px 12px rgba(8, 58, 80, .35);
    outline: 0;
}
.guide-marker.shape-box {
    transform: none;
    width: 20%;
    height: 10%;
    border-radius: 7px;
    border: 2px dashed var(--c-accent);
    background: rgba(242, 169, 59, .18);
    color: var(--c-primary-dark);
    box-shadow: none;
}
.guide-marker.shape-box:hover,
.guide-marker.shape-box.is-highlight { transform: none; box-shadow: 0 0 0 3px rgba(242, 169, 59, .25); }
.guide-shot-zoom {
    position: absolute;
    right: .5rem;
    bottom: .5rem;
    padding: .2rem .5rem;
    border-radius: var(--radius-pill);
    background: rgba(8, 34, 46, .72);
    color: #fff;
    font-size: .66rem;
    pointer-events: none;
}
.guide-legend-wrap { margin-top: .55rem; }
.guide-legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: .28rem; }
.guide-legend li {
    display: flex;
    align-items: flex-start;
    gap: .45rem;
    padding: .35rem .5rem;
    border-radius: var(--radius-sm);
    font-size: .8rem;
    line-height: 1.45;
    cursor: default;
}
.guide-legend li.is-highlight { background: var(--c-accent-soft, #FDF2DF); }
.guide-legend-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--c-accent);
    color: #2B1802;
    font-size: .66rem;
    font-weight: 800;
    flex: 0 0 20px;
}

.guide-step-nav { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: 1rem; padding-top: .85rem; border-top: 1px dashed var(--c-line); }
.guide-step-dots { display: flex; gap: .3rem; }
.guide-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c-line-strong); }
.guide-dot.is-active { background: var(--c-accent); }
.guide-print-hint { font-size: .72rem; color: var(--c-muted); margin: .6rem 0 0; }
.guide-empty { padding: 2rem 1rem; }

.guide-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(4, 18, 26, .94);
    padding: 1rem;
}
.guide-lightbox.is-open { display: flex; }
.guide-lightbox-bar { position: fixed; top: 1rem; right: 1rem; display: flex; gap: .4rem; z-index: 2; }
.guide-lightbox-btn {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 10px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 1rem;
}
.guide-lightbox-scroll { width: 100%; height: 100%; overflow: auto; display: flex; align-items: center; justify-content: center; }
.guide-lightbox-stage {
    position: relative;
    width: min(1200px, 94vw);
    max-height: 88vh;
    flex: 0 0 auto;
    transform-origin: center center;
    transition: transform .18s ease;
}
.guide-lightbox-stage img { display: block; width: 100%; height: auto; border-radius: 8px; }
.guide-lightbox .guide-marker { width: 34px; height: 34px; font-size: .82rem; pointer-events: none; }

@media (min-width: 768px) {
    .guide-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 992px) {
    .guide-grid { grid-template-columns: 300px minmax(0, 1fr); gap: 1.25rem; }
    .guide-side { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow: auto; }
    .guide-main { padding: 1.4rem 1.5rem; }
}
@media print {
    .guide-side, .guide-progress-wrap, .guide-step-nav, .guide-print-btn,
    .guide-print-hint, .guide-lightbox, .guide-shot-zoom, .site-header,
    .site-footer, .breadcrumb, .bottom-nav, .fab { display: none !important; }
    .guide-main, .guide-side { border: 0; box-shadow: none; padding: 0; }
    .guide-grid { display: block; }
    html.guide-js .guide-step,
    .guide-step[hidden] { display: block !important; }
    .guide-step { break-inside: avoid; margin-bottom: 1.2rem; }
    .guide-shot-frame { cursor: default; }
}

.guide-grid.is-single { grid-template-columns: minmax(0, 1fr) !important; }

/* ------------------------------------------------------ interactive tour */
.tour-layer {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    pointer-events: none;
}
.tour-layer.is-open { display: block; }
.tour-highlight {
    position: fixed;
    z-index: 1;
    border: 3px solid var(--c-accent);
    border-radius: 10px;
    box-shadow: 0 0 0 9999px rgba(4, 18, 26, .64);
    pointer-events: none;
    transition: left .2s ease, top .2s ease, width .2s ease, height .2s ease;
}
.tour-tooltip {
    position: fixed;
    z-index: 2;
    background: var(--c-surface);
    color: var(--c-text);
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 45px rgba(4, 18, 26, .35);
    padding: 1rem;
    pointer-events: auto;
    border: 1px solid var(--c-line);
}
.tour-tooltip-head h3 { font-size: 1rem; margin: .15rem 0 .35rem; }
.tour-kicker { color: var(--c-muted); font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.tour-body { font-size: .84rem; line-height: 1.65; color: var(--c-text); margin: 0 0 .75rem; }
.tour-actions { display: flex; align-items: center; gap: .4rem; }
.tour-actions .tour-skip {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--c-muted);
    font: inherit;
    font-size: .78rem;
    text-decoration: underline;
    padding: .2rem;
}
body.is-tour-open { cursor: default; }

@media (max-width: 575px) {
    .tour-tooltip { padding: .8rem; }
}
