:root{--tour-accent:#70d4ff;--tour-ink:#102632}
.tour-launch.tour-launch{background:#00ed18;color:#08210b;border-color:#57ff68;transition:transform 120ms ease,background-color 120ms ease}
.tour-launch.tour-launch:hover{background:#30ff45}
.tour-launch.tour-launch:active{transform:scale(.95)}
.tour-shell .tour-menu>div>h2{margin-top:0}
.tour-shell .tour-robot{box-sizing:border-box;border:1px solid #ffffff20}
.tour-shell .tour-image-frame::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;border:1px solid #ffffff20;border-radius:inherit;box-sizing:border-box}
.tour-shell .tour-preview{align-items:start}
.tour-shell .tour-preview pre{align-self:start;margin-top:0}
.tour-highlight-frame{position:absolute;z-index:3;pointer-events:none;box-sizing:border-box;border:4px solid var(--tour-accent);border-radius:10px;box-shadow:inset 0 0 0 4px #101719}
.tour-shell .tour-copy{position:absolute;z-index:4;box-sizing:border-box;padding:12px 20px;line-height:1.4;border:0;border-radius:3px;box-shadow:none;font-weight:600}
.tour-shell .tour-copy:hover{background:#a1e3ff;color:#102632}
.tour-launch{position:fixed;right:22px;bottom:22px;z-index:1000;background:#242b2c;color:#fff;border:1px solid #92a8ac;border-radius:32px;padding:12px 20px;box-shadow:0 8px 28px #0008;font:600 16px system-ui;cursor:pointer}
.tour-shell{position:fixed;inset:0;z-index:10000;background:#111719;color:#f5f7f8;display:grid;grid-template-rows:auto 1fr auto;font:16px/1.5 system-ui}
.tour-shell[hidden],.tour-shell [hidden]{display:none!important}
.tour-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 24px;border-bottom:1px solid #ffffff25;background:#171d20}
.tour-shell button{font:inherit;cursor:pointer;border:1px solid #ffffff45;background:#283136;color:#fff;border-radius:8px;padding:9px 14px}
.tour-shell button:hover{background:#39474d}.tour-shell button:focus-visible{outline:3px solid white;outline-offset:3px}.tour-shell button:disabled{opacity:.4;cursor:default}
.tour-body{min-height:0;position:relative;overflow:auto}.tour-menu{max-width:1100px;margin:0 auto;display:grid;grid-template-columns:minmax(220px,1fr) 1fr;align-items:center;gap:24px;padding:24px}
.tour-robot{width:100%;max-height:65vh;object-fit:contain;border-radius:14px}.tour-topics{display:grid;gap:12px}.tour-topic{display:flex;align-items:center;text-align:left;gap:16px}.tour-topic img{width:65px;height:75px;object-fit:cover;border-radius:5px}.tour-topic span{flex:1}
.tour-preview{height:100%;box-sizing:border-box;max-width:1280px;margin:auto;padding:20px;display:grid;grid-template-columns:1fr 1fr;gap:24px}.tour-preview img{width:100%;height:100%;max-height:65vh;object-fit:contain}.tour-preview article{display:flex;flex-direction:column;min-height:0}.tour-preview pre{white-space:pre-wrap;overflow:auto;font:15px/1.65 system-ui;background:#20282b;padding:20px;border:1px solid #ffffff20;border-radius:10px;flex:1;margin:0}.tour-preview h2{font-size:20px;margin:0 0 12px}
.tour-stage{height:100%;position:relative}.tour-stage iframe{border:0;width:100%;height:100%;background:#171919}.tour-block{position:absolute;inset:0;background:transparent;z-index:2}.tour-cursor{position:absolute;z-index:3;background:var(--tour-accent);color:var(--tour-ink);border:2px solid white;border-radius:24px;padding:5px 12px;box-shadow:0 3px 18px #0009;pointer-events:none;font-weight:700;transform:translate(-12px,8px)}
.tour-footer{padding:14px 24px;background:#171d20;border-top:1px solid #ffffff25}.tour-caption{display:flex;align-items:center;gap:12px;max-width:1100px;margin:0 auto 12px}.tour-caption img{height:60px;width:48px;object-fit:cover;border-radius:8px}.tour-caption p{margin:0}.tour-controls{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:center}.tour-progress{margin-left:12px;color:#cbd3d6}.tour-shell .tour-primary{background:var(--tour-accent);color:var(--tour-ink);border-color:var(--tour-accent)}
@media(max-width:650px){.tour-head,.tour-footer{padding:10px}.tour-menu{grid-template-columns:1fr;padding:12px}.tour-robot{height:180px}.tour-preview{grid-template-columns:1fr;padding:12px;gap:12px;overflow:auto}.tour-preview img{height:230px}.tour-preview pre{min-height:180px}.tour-caption img{display:none}.tour-controls button{padding:7px 10px}.tour-progress{width:100%;text-align:center;margin:0}.tour-topic img{height:50px;width:45px}}

/* Keep the actual image edges rounded, without letterboxing inside its box. */
.tour-robot{display:block;width:auto;height:auto;max-width:100%;max-height:65vh;justify-self:center;border-radius:20px}
.tour-preview{--preview-ratio:.8;--preview-height:min(60vh,calc((100vw - 64px)/2/var(--preview-ratio)),calc(608px/var(--preview-ratio)));height:auto;min-height:100%;align-content:center;grid-template-rows:auto var(--preview-height);column-gap:24px;row-gap:12px}
.tour-preview article{display:contents}
.tour-preview h2{grid-column:1/-1;grid-row:1;margin:0}
.tour-preview img{grid-column:1;grid-row:2;justify-self:center;display:block;width:auto;max-width:100%;height:var(--preview-height);max-height:none;border-radius:20px;object-fit:contain}
.tour-preview pre{grid-column:2;grid-row:2;box-sizing:border-box;width:100%;min-width:0;min-height:0;height:var(--preview-height);max-height:var(--preview-height);border-radius:20px;overflow:auto;overscroll-behavior:contain}
@media(max-width:650px){.tour-robot{height:180px;width:auto}.tour-preview{--preview-height:min(50vh,calc((100vw - 24px)/var(--preview-ratio)));grid-template-rows:auto var(--preview-height) var(--preview-height);align-content:start}.tour-preview img{grid-column:1;grid-row:2}.tour-preview pre{grid-column:1;grid-row:3}}

/* Let long prompts grow naturally instead of creating a nested scroll area. */
.tour-preview{width:100%;max-width:1760px;min-height:0;margin:0 auto;padding:12px 20px 20px;grid-template-columns:minmax(0,1fr) minmax(0,1.65fr);grid-template-rows:auto auto;align-content:start;align-items:stretch}
.tour-image-frame{grid-column:1;grid-row:2;position:relative;min-height:360px;overflow:hidden;border-radius:20px;background:#192124}
.tour-preview .tour-image-frame img{position:absolute;inset:0;display:block;width:100%;height:100%;max-width:none;max-height:none;object-fit:contain;border-radius:20px}
.tour-preview pre{height:auto;max-height:none;min-height:360px;overflow:visible;white-space:pre-wrap;overflow-wrap:anywhere;font-size:15px;line-height:1.5;padding:18px}
@media(max-width:650px){.tour-preview{grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto;padding:12px}.tour-image-frame{height:55vh;min-height:240px}.tour-preview pre{grid-column:1;grid-row:3;min-height:0}}

/* The image determines the row height and its own exact aspect-ratio width. */
.tour-preview{max-width:none;width:max-content;max-width:100%;grid-template-columns:var(--preview-image-width,400px) var(--preview-text-width,600px);grid-template-rows:auto var(--preview-height,500px);justify-content:center}
.tour-image-frame{width:var(--preview-image-width,400px);height:var(--preview-height,500px);min-height:0;background:transparent}
.tour-preview pre{height:var(--preview-height,500px);max-height:var(--preview-height,500px);min-height:0;overflow:auto}
@media(max-width:650px){.tour-preview{width:100%;grid-template-columns:minmax(0,1fr);grid-template-rows:auto var(--preview-height,400px) var(--preview-height,400px);padding:12px 20px}.tour-image-frame{justify-self:center}.tour-preview pre{width:100%}}

/* ============================================================
   TUTORIAL ELŐNÉZET – VÉGLEGES MÉRETEZÉS
   ------------------------------------------------------------
   - A kép határozza meg a fix magasságot.
   - A prompt ugyanilyen magas.
   - A prompt szélessége dinamikusan változik.
   - Nincs belső függőleges scrollbar.
   - A kép + prompt együtt középre van igazítva.
   ============================================================ */

.tour-preview{
    width:max-content;
    max-width:100%;
    min-height:100%;

    margin:0 auto;
    padding:12px 20px 20px;

    display:grid;

    grid-template-columns:
        var(--preview-image-width,400px)
        var(--preview-text-width,600px);

    grid-template-rows:
        auto
        var(--preview-height,500px);

    column-gap:24px;
    row-gap:12px;

    justify-content:center;
    align-content:center;
    align-items:stretch;

    box-sizing:border-box;
}


/* Cím a kép + prompt teljes szélessége fölött */

.tour-preview h2{
    grid-column:1 / -1;
    grid-row:1;

    margin:0;
}


/* ============================================================
   KÉP
   ============================================================ */

.tour-image-frame{
    grid-column:1;
    grid-row:2;

    position:relative;

    width:var(--preview-image-width,400px);
    height:var(--preview-height,500px);

    min-width:0;
    min-height:0;

    overflow:hidden;

    background:transparent;

    border-radius:20px;
}


.tour-preview .tour-image-frame img{
    position:absolute;
    inset:0;

    display:block;

    width:100%;
    height:100%;

    max-width:none;
    max-height:none;

    object-fit:contain;

    border-radius:20px;
}


/* ============================================================
   PROMPT
   ------------------------------------------------------------
   FONTOS:
   A magassága mindig pontosan ugyanannyi, mint a képé.
   A JS a --preview-text-width változóval keresi meg azt a
   szélességet, amelynél a teljes szöveg belefér.
   ============================================================ */

.tour-preview pre{
    grid-column:2;
    grid-row:2;

    box-sizing:border-box;

    width:var(--preview-text-width,600px);

    height:var(--preview-height,500px);
    min-height:var(--preview-height,500px);
    max-height:var(--preview-height,500px);

    margin:0;
    padding:18px;

    overflow:hidden;

    white-space:pre-wrap;
    overflow-wrap:anywhere;

    font:15px/1.5 system-ui;

    background:#20282b;
    border:1px solid #ffffff20;
    border-radius:20px;
}


/* ============================================================
   MOBIL
   ============================================================ */

@media(max-width:650px){

    .tour-preview{
        width:100%;
        max-width:100%;

        grid-template-columns:minmax(0,1fr);

        grid-template-rows:
            auto
            var(--preview-height,400px)
            var(--preview-height,400px);

        justify-content:stretch;
        align-content:start;

        padding:12px;

        row-gap:12px;
    }


    .tour-preview h2{
        grid-column:1;
        grid-row:1;
    }


    .tour-image-frame{
        grid-column:1;
        grid-row:2;

        justify-self:center;

        max-width:100%;
    }


    .tour-preview pre{
        grid-column:1;
        grid-row:3;

        width:100%;

        height:var(--preview-height,400px);
        min-height:var(--preview-height,400px);
        max-height:var(--preview-height,400px);

        overflow:hidden;
    }
}

/* Size the portrait from the actual space between the header and controls.
   Auto dimensions preserve its aspect ratio even when the menu needs more width.
   A taller menu grows naturally so every topic remains reachable by scrolling. */
.tour-shell .tour-body{container-type:size}
.tour-shell .tour-menu{--tour-menu-padding:clamp(16px,2dvh,24px);min-height:100%;width:100%;max-width:1280px;box-sizing:border-box;display:flex;padding:var(--tour-menu-padding);align-items:center;justify-content:center;gap:clamp(24px,4vw,64px)}
.tour-shell .tour-menu>div{flex:0 1 580px;min-width:0}
.tour-shell .tour-robot{flex:0 1 auto;height:auto;width:auto;max-height:min(900px,calc(100cqh - 2 * var(--tour-menu-padding)));max-width:36%;object-fit:contain}
.tour-shell .tour-topics{grid-template-columns:minmax(0,1fr);grid-auto-rows:minmax(48px,auto);gap:10px;align-content:start}
.tour-shell .tour-topic{min-width:0;min-height:48px;box-sizing:border-box;padding:10px 14px;font-size:16px;line-height:1.4}
@media(min-width:851px){
  .tour-shell .tour-menu:has(.tour-topic:nth-child(13)){max-width:1440px}
  .tour-shell .tour-menu:has(.tour-topic:nth-child(13))>div{flex-basis:860px}
  .tour-shell .tour-topics:has(.tour-topic:nth-child(13)){grid-template-columns:none;grid-template-rows:repeat(12,minmax(48px,auto));grid-auto-flow:column;grid-auto-columns:minmax(0,1fr)}
}
@media(max-width:850px){
  .tour-shell .tour-menu{max-width:680px;flex-direction:column;gap:24px}
  .tour-shell .tour-menu>div{flex:none;width:100%}
  .tour-shell .tour-robot{flex:none;max-width:100%;max-height:clamp(180px,30dvh,280px)}
}

/* Separate the tutorial chrome from the dark content area. */
.tour-shell .tour-head,.tour-shell .tour-footer{background:#303e42;border-color:#71878d;color:#f5f7f8}
.tour-shell [data-action="close"]{background:#00ed18;color:#08210b;border-color:#57ff68;transition:transform 120ms ease,background-color 120ms ease}
.tour-shell [data-action="close"]:hover{background:#30ff45}
.tour-shell [data-action="close"]:active{transform:scale(.95)}
.tour-shell .tour-caption{width:fit-content;max-width:100%;margin:0 auto 12px;justify-content:center;text-align:center}
.tour-shell .tour-controls{max-width:1100px;margin-inline:auto;justify-content:center}
.tour-shell .tour-progress{flex-basis:100%;margin:2px 0 0;text-align:center}
