/* ---------- Průvodce tour: cropped screenshots with numbered markers, icon steps ---------- */
.tour { display: flex; flex-direction: column; min-height: 0; color: var(--text); }

.tour--dialog {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 0 0 var(--safe-bottom);
    border: 0;
    background: radial-gradient(90% 50% at 50% 30%, var(--accent-soft), transparent 70%), var(--bg);
    overflow: hidden;
    opacity: 0;
    transition: opacity var(--dur-2), overlay var(--dur-2) allow-discrete, display var(--dur-2) allow-discrete;
}
.tour--dialog[open] { display: flex; opacity: 1; }
@starting-style { .tour--dialog[open] { opacity: 0; } }
.tour--dialog::backdrop { background: rgb(0 0 0 / 0.7); backdrop-filter: blur(4px); }

.tour--page { border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--bg-raised); overflow: hidden; }

.tour__bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 52px; padding: var(--space-2) var(--space-2) 0 var(--gutter); }
.tour__count { margin: 0; font-size: var(--step--1); color: var(--text-3); }
.tour__count b { color: var(--accent-2); font-size: var(--step-0); }
.tour__skip { color: var(--text-2); }

/* The track is a size container: the screenshot is sized by the height left over, never by its own pixels. */
.tour__track {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    container-type: size;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}
.tour__track::-webkit-scrollbar { display: none; }
.tour__track:focus { outline: none; }
.tour--page .tour__track { flex: none; height: min(84dvh, 720px); }

.tour-slide {
    /* Holds its visually-hidden labels; otherwise they escape the track and widen the page. */
    position: relative;
    flex: 0 0 100%;
    min-width: 0;
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-2) var(--gutter) var(--space-3);
    --text-room: 252px;
}

/* Phones: the crop is the main thing, as wide as the screen allows; the text below scrolls when it must. */
.tour-shot {
    flex: none;
    width: min(100%, calc((100cqh - var(--text-room)) * var(--ar)));
    margin: 0;
}
.tour-shot__screen {
    position: relative;
    display: block;
    aspect-ratio: var(--ar);
    border-radius: 16px;
    background: var(--bg-sunken);
    box-shadow: 0 -3px 0 0 var(--line-strong), var(--shadow-2), 0 0 50px var(--accent-soft);
}
.tour-shot__screen img { display: block; width: 100%; height: 100%; border-radius: inherit; }

.tour-spot {
    position: absolute;
    left: calc(var(--x) - 3px);
    top: calc(var(--y) - 3px);
    width: calc(var(--w) + 6px);
    height: calc(var(--h) + 6px);
    border: 2px solid var(--accent);
    border-radius: 10px;
    box-shadow: 0 0 0 2px rgb(0 0 0 / 0.45), 0 0 16px var(--glow);
    pointer-events: none;
    animation: tour-glow 2.4s ease-in-out infinite;
}
.tour-spot b {
    position: absolute;
    top: -12px;
    left: 50%;
    translate: -50% 0;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-ink);
    font: 800 12px/1 var(--font-body);
    box-shadow: 0 0 0 2px rgb(0 0 0 / 0.55);
}
@keyframes tour-glow { 50% { box-shadow: 0 0 0 2px rgb(0 0 0 / 0.45), 0 0 4px var(--glow); } }

.tour-slide__text { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; align-content: start; gap: var(--space-3); width: 100%; max-width: 420px; padding: 2px; }
.tour-slide__title { margin: 0; font-size: var(--step-2); line-height: 1.1; }

.tour-where { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.tour-where__step { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface); color: var(--text-2); font-size: var(--step--1); font-weight: 700; white-space: nowrap; }
.tour-where__step .icon { width: 16px; height: 16px; color: var(--accent-2); }
.tour-where__sep { width: 14px; height: 14px; color: var(--text-3); }

.tour-steps { display: grid; gap: var(--space-2); margin: 0; padding: 6px 0 0; list-style: none; }
.tour-step { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: var(--space-3); font-weight: 650; }
.tour-step__icon { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--radius-m); background: var(--accent-soft); color: var(--accent-2); }
.tour-step__icon .icon { width: 22px; height: 22px; }
.tour-step__icon .coal { --size: 22px; }
.tour-step__num { position: absolute; top: -6px; right: -6px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800; box-shadow: 0 0 0 2px var(--bg); }

.tour-slide__cta { justify-self: start; }

.tour__nav { flex: none; display: grid; grid-template-columns: var(--tap, 44px) minmax(0, 1fr); align-items: center; gap: var(--space-2) var(--space-3); padding: var(--space-2) var(--gutter) var(--space-4); border-top: 1px solid var(--line); }
.tour__prev:disabled { opacity: 0.35; }
.tour__dots { grid-column: 1 / -1; order: -1; display: flex; justify-content: center; }
.tour__dot { display: grid; place-items: center; width: 24px; height: 26px; padding: 0; border: 0; background: none; cursor: pointer; }
.tour__dot::before { content: ""; width: 7px; height: 7px; border-radius: 4px; background: var(--line-strong); transition: width var(--dur-2) var(--ease-out), background var(--dur-2); }
.tour__dot[aria-current="step"]::before { width: 18px; background: var(--accent); }
.tour__dot:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: 6px; }
.tour__next { width: 100%; }

@media (max-height: 700px) {
    .tour__bar { min-height: 44px; }
    .tour-slide { gap: var(--space-3); --text-room: 220px; }
    .tour-steps { gap: 6px; }
    .tour-step { grid-template-columns: 32px minmax(0, 1fr); }
    .tour-step__icon { width: 32px; height: 32px; }
    .tour__nav { padding-bottom: var(--space-3); }
}

/* Desktop: the crop and the text side by side, both centred in the height the dialog has. */
@media (min-width: 720px) {
    .tour--dialog {
        width: min(980px, calc(100vw - 2 * var(--gutter)));
        height: min(760px, calc(100dvh - 2 * var(--gutter)));
        margin: auto;
        padding: 0;
        border: 1px solid var(--line-strong);
        border-radius: var(--radius-l);
        box-shadow: var(--shadow-2);
    }
    .tour-slide { flex-direction: row; justify-content: center; gap: var(--space-7); padding: var(--space-4) var(--space-7); }
    .tour-shot { align-self: center; width: min(440px, 48cqw, calc((100cqh - 2 * var(--space-4)) * var(--ar))); }
    .tour-slide__text { flex: 0 1 380px; max-height: 100%; align-self: center; }
    .tour-slide__title { font-size: var(--step-3); }
    .tour--page .tour__track { height: 620px; }
    .tour__nav { grid-template-columns: var(--tap, 44px) minmax(0, 1fr) 180px; padding-inline: var(--space-7); }
    .tour__dots { grid-column: auto; order: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .tour--dialog, .tour__dot::before { transition: none; }
    .tour-spot { animation: none; }
}

/* ---------- "Jak to tu funguje" card ---------- */
.tour-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4) var(--space-3) var(--space-3);
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    background: var(--bg-raised);
    color: inherit;
    text-decoration: none;
}
.tour-card[hidden] { display: none; }
.tour-card:hover { color: inherit; border-color: var(--line-strong); }
.tour-card__icons { display: grid; grid-template-columns: repeat(2, 22px); gap: 4px; padding: 8px; border-radius: var(--radius-m); background: var(--accent-soft); color: var(--accent-2); }
.tour-card__icons .icon { width: 22px; height: 22px; }
.tour-card__text { display: grid; gap: 4px; min-width: 0; }
.tour-card__text > b { font-weight: 800; }
.tour-card__meta { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); font-size: var(--step--1); font-weight: 700; }
.tour-card__meta .icon { width: 14px; height: 14px; }
.tour-card__go { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); color: var(--text-2); }
.tour-card__go .icon { width: 20px; height: 20px; }
