/* K1156 »Mobil-dok« (Kim 13/11, godkendt mockup A – boards »Dok« og »Musik«). KUN MOBIL (≤ 600 px, samme brudpunkt som K1086/K1135)
   og kun i den forenklede Lav speak (.k1073-on). Computer er pixel-uændret: uden for brudpunktet gælder kun »skjul det nye«-reglerne.
   Kun eksisterende farver. :not(#k1156) × n vinder over v247-k1073.css, v247-k1086.css og de fælles lag.
   Rollback: fjern linjen i _Host.cshtml. */

/* ---------- uden for mobil: de nye elementer findes, men ses ikke (computer uændret) ---------- */
.k1156-listen, .k1156-bud, .k1156-own, .k1156-mid { display: none; }
.k1156-fw { display: contents; }

@media (max-width: 600px) {
    /* dokkens højde: 10 + knap 52 + 10 (+ mini-afspiller 48 + 6, mens noget spiller) + iPhone-kanten. --k1156-kb = tastaturet (k1073-dock.js) */
    html:has(.k1073-on) { --k1156-dock-h: calc(72px + env(safe-area-inset-bottom, 0px)); }
    html.k1156-mini:has(.k1073-on) { --k1156-dock-h: calc(126px + env(safe-area-inset-bottom, 0px)); }

    /* ---------- 1. K1167 (Kim 13/11 17.46): »Lav speak« står i generatoren som på computeren – ingen fast bund-dok ----------
       Knappen ligger nederst i feltets kort i fuld bredde under »Gemmes i … · tid«. Bundlinjen klæber ikke længere til bunden,
       så tastatur, iOS-værktøjslinje og footer aldrig kan komme i karambolage med den. */
    html:has(.k1073-on) { --k1156-dock-h: 0px; }
    html.k1156-mini:has(.k1073-on) { --k1156-dock-h: calc(58px + env(safe-area-inset-bottom, 0px)); }
    html body .k1073-on .v247-speak-stage:not(.k1075-music-view):not(#k1156):not(#k1156):not(#k1156) > .k756-bar { position: static; bottom: auto; }
    html body .k1073-on .v247-speak-editor:not(.k1075-music-view) .k756-bar .k756-go:not(#k1156):not(#k1156):not(#k1156):not(#k1156) {
        flex: 1 1 100%; flex-wrap: wrap; justify-content: space-between; row-gap: 10px; margin-left: 0;
    }
    html body .k1073-on .v247-speak-editor:not(.k1075-music-view) .k756-go .k756-cta:not(#k1156):not(#k1156):not(#k1156):not(#k1156):not(#k1156) {
        position: static; order: 9; flex: 1 1 100%; width: 100%; min-height: 52px; margin: 0; padding: 0 20px; border-radius: 14px; font-size: 17px;
    }
    body:has(.k1073-on) { padding-bottom: var(--k1156-dock-h); }

    /* mini-afspilleren (K1073-bjælken) står som én 48 px linje i dokken lige over knappen, så længe noget spiller */
    html.k1156-mini:has(.k1073-on) .k1073-dock {
        left: 12px; right: 12px; width: auto; height: 48px; bottom: calc(6px + env(safe-area-inset-bottom, 0px)); padding: 0 4px 0 0;
        border: 0; border-radius: 0; background: transparent; box-shadow: none; transform: none; z-index: 7000;
    }
    html.k1156-mini:has(.k1073-on) .k1073-dock:not(.is-open) { opacity: 0; pointer-events: none; transform: translateY(12px); }
    html.k1156-mini:has(.k1073-on) .k1073-dock .k1073-dock-title { max-width: 45%; }
    html.k1156-mini:has(.k1073-on) .k1073-dock .k1073-dock-time { display: inline; }

    /* beskeder og admin-pillen står altid over dokken – aldrig over »Lav speak« */
    html:has(.k1073-on) .lf28-note { bottom: calc(var(--k1156-dock-h) + var(--k1156-kb, 0px) + 10px); }
    html:has(.k1073-on) :is(.mud-snackbar-location-bottom-right, .mud-snackbar-location-bottom-center, .mud-snackbar-location-bottom-left) { bottom: calc(var(--k1156-dock-h) + 8px) !important; }
    html:has(.k1073-on) .v247-viewas-pill-wrap:not(.is-dragging) { top: auto !important; bottom: calc(var(--k1156-dock-h) + 12px) !important; }

    /* ---------- 2. Tekstfeltet vokser med teksten (mindst ca. 4 linjer – k756-stage.js sætter højden) ---------- */
    html body .k1073-on .v247-speak-editor.v247-speak-stage:not(.k1075-music-view) .v247-stage-text:not(#k1156):not(#k1156):not(#k1156):not(#k1156) { min-height: 0; }
    /* (K549's faste 350 px til gæster/nye brugere gælder ikke her – højden sættes af k756-stage.js, også med velkomsten) */
    html body .k1073-on .v247-speak-editor.v247-speak-stage:not(.k1075-music-view) textarea:not(#k1156):not(#k1156):not(#k1156):not(#k1156) { min-height: 0 !important; }

    /* ---------- 3. Musikvisningen: én topline »Lyt med din tekst« + × ---------- */
    html body .k1073-on .k1075-music-view .k1075-head:not(#k1156):not(#k1156):not(#k1156) {
        display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 12px; min-height: 0; padding: 10px 12px 2px;
    }
    html body .k1073-on .k1075-music-view .k1075-head .k1075-back:not(#k1156) { display: none; }
    html body .k1073-on .k1075-music-view .k1075-head .k1156-listen:not(#k1156) {
        display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px;
        background: #1F3A33; color: #FFFFFF; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
    }
    html body .k1073-on .k1075-music-view .k1075-head .k1156-listen:disabled { opacity: .5; cursor: default; }
    html body .k1073-on .k1075-music-view .k1075-head .k1135-x:not(#k1156):not(#k1156):not(#k1156) {
        position: static; margin-left: auto; width: 44px; height: 44px; font-size: 20px;
    }
    html body .k1073-on .k1075-music-view .k1143-demo:not(#k1156):not(#k1156) { display: none; }
    html body .k1073-on .k1075-music-view .k756-mlayer .k756-mscroll:not(#k1156):not(#k1156):not(#k1156) { padding: 8px 12px calc(var(--k1156-dock-h) + 8px); }
    html body .k1073-on .v247-speak-editor.k1075-music-view .k756-mlayer.k1075-inline:not(#k1156):not(#k1156):not(#k1156):not(#k1156) { min-height: 0 !important; }

    /* afspilleren er ÉN linje: ▶ · »Dit speak/Generel demo · stemme · musik« · tynd tidslinje · varighed */
    html body .k1073-on .k1075-music-view .k756-mlayer .k756-mcard.k829-player:not(#k1156):not(#k1156):not(#k1156) {
        display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; margin: 0; padding: 8px 12px 8px 8px; border-radius: 14px; row-gap: 0;
    }
    html body .k1073-on .k1075-music-view .k829-player > .k756-rec:not(#k1156):not(#k1156) { display: none; }
    html body .k1073-on .k1075-music-view .k829-player .k756-mplay:not(#k1156):not(#k1156):not(#k1156) { width: 36px; height: 36px; flex: none; }
    html body .k1073-on .k1075-music-view .k829-player .k756-mplay svg:not(#k1156) { width: 15px; height: 15px; }
    html body .k1073-on .k1075-music-view .k829-player .k756-mcard-body:not(#k1156):not(#k1156) {
        flex: 1 1 auto; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 10px; row-gap: 6px; align-items: center;
    }
    html body .k1073-on .k1075-music-view .k829-player .k1156-bud:not(#k1156) {
        display: block; grid-column: 1; grid-row: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; color: var(--k756-ink);
    }
    html body .k1073-on .k1075-music-view .k829-player .k756-mchips:not(#k1156):not(#k1156) { display: none; }
    html body .k1073-on .k1075-music-view .k829-player .k756-mline:not(#k1156):not(#k1156) { grid-column: 1; grid-row: 2; height: 3px; }
    html body .k1073-on .k1075-music-view .k829-player .k756-mtime:not(#k1156):not(#k1156) { grid-column: 2; grid-row: 1 / span 2; margin: 0; font-size: 12px; }
    html body .k1073-on .k1075-music-view .k829-player .k756-mtime [data-mb-at] { display: none; }
    /* ingen ventefigur/ventetekst i afspilleren (Kim 13/11 09.02) */
    html body .k1073-on .k1075-music-view .k829-player .k756-loading { display: none; }

    /* ---------- 4. Musik- og stemmekortene: overskrift + kontakt, Lav · Mellem · Høj til højre, ens cirkler, links under ---------- */
    html body .k1073-on .k1075-music-view .k829-cols:not(#k1156):not(#k1156) { margin-top: 10px; row-gap: 10px; }
    html body .k1073-on .k1075-music-view .k829-head:not(#k1156):not(#k1156) { flex-wrap: nowrap; margin-bottom: 4px; min-height: 0; }
    html body .k1073-on .k1075-music-view .k829-head::after { content: none; }
    html body .k1073-on .k1075-music-view .k829-head .k982-lvl:not(#k1156):not(#k1156) { margin-left: auto; }
    html body .k1073-on .k1075-music-view .k829-name:not(#k1156):not(#k1156),
    html body .k1073-on .k1075-music-view .k1076-note:not(#k1156):not(#k1156) { display: none; }

    /* karrusellen: ‹ › (44 px) står fast, cirklerne swipes (scroll-snap, js/k1156-snap.js) */
    html body .k1073-on .k1075-music-view .k1156-fw:not(#k1156) { display: block; position: relative; }
    html body .k1073-on .k1075-music-view .k1156-fw > .k756-flow:not(#k1156):not(#k1156):not(#k1156) {
        position: static; justify-content: flex-start; gap: 60px; min-height: 0; margin: 0; padding: 14px calc(50% - 39px);
        overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch;
        /* K1168 (Kim 13/11 17.48 »Mobil swiper ikke«): K883's »touch-action: pan-y« (v247-k829.css) forbød fingeren at rulle rækken
           vandret – her må den rulle begge veje (vandret = karrusellen, lodret = siden). */
        touch-action: pan-x pan-y;
    }
    html body .k1073-on .k1075-music-view .k1156-fw > .k756-flow::-webkit-scrollbar { display: none; }
    html body .k1073-on .k1075-music-view .k1156-fw > .k756-flow::after { content: none; }
    html body .k1073-on .k1075-music-view .k1156-fw > .k756-flow > :is(.k756-cw, .k756-c):not(#k1156) { flex: none; scroll-snap-align: center; scroll-snap-stop: always; }
    html body .k1073-on .k1075-music-view .k1156-fw .k756-c.is-cur:not(#k1156):not(#k1156):not(#k1156) { width: 78px; height: 78px; }
    html body .k1073-on .k1075-music-view .k1156-fw .k756-c:is(.k756-n1, .k756-n2, .k756-n3):not(#k1156):not(#k1156):not(#k1156) {
        display: grid; width: 40px; height: 40px; margin-block: 19px; opacity: .7;
    }
    html body .k1073-on .k1075-music-view .k1156-fw .k756-c:not(.is-cur) :is(em, .k756-tl):not(#k1156) { display: none; }
    html body .k1073-on .k1075-music-view .k1156-fw .k756-c.is-cur .k756-tl:not(#k1156):not(#k1156) { padding: 0 6px; }
    html body .k1073-on .k1075-music-view .k1156-fw .k756-c.is-cur .k756-tn:not(#k1156):not(#k1156) { font-size: 12px; font-weight: 600; }
    html body .k1073-on .k1075-music-view .k1156-fw .k756-c.is-cur .k756-tt:not(#k1156):not(#k1156) { display: none; }
    html body .k1073-on .k1075-music-view .k1156-fw .k756-hb:not(#k1156):not(#k1156) { top: -6px; right: -10px; width: 28px; height: 28px; }
    html body .k1073-on .k1075-music-view .k1156-fw .k756-ar:not(#k1156):not(#k1156):not(#k1156) {
        position: absolute; top: 50%; z-index: 3; width: 44px; height: 44px; margin-top: -22px; font-size: 18px;
    }
    html body .k1073-on .k1075-music-view .k1156-fw .k756-ar[aria-label^="Forrige"]:not(#k1156):not(#k1156):not(#k1156) { left: calc(50% - 39px - 8px - 44px); }
    html body .k1073-on .k1075-music-view .k1156-fw .k756-ar[aria-label^="Næste"]:not(#k1156):not(#k1156):not(#k1156) { left: calc(50% + 39px + 8px); }

    /* rækken under cirklen: [ ] [Alle numre / stemmens navn] [Egen musik / Alle stemmer] */
    html body .k1073-on .k1075-music-view .k993-all-row:not(#k1156):not(#k1156):not(#k1156) {
        display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 0 8px; margin: 2px 0 6px; min-height: 32px;
    }
    html body .k1073-on .k1075-music-view .k993-all-row > :is(.k993-all, .k1156-own):not(#k1156):not(#k1156):not(#k1156) {
        display: inline-flex; align-items: center; min-height: 32px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
        font-size: 13px; font-weight: 600; color: var(--k756-green); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
    }
    html body .k1073-on .k1075-music-view .k993-all-row .k993-all .k756-ico { display: none; }
    html body .k1073-on .k1075-music-view .k993-all-row > [data-testid="k756-all-tracks-open"]:not(#k1156) { grid-column: 2; grid-row: 1; }
    html body .k1073-on .k1075-music-view .k993-all-row > .k1062-own:not(#k1156):not(#k1156) { display: none; }
    html body .k1073-on .k1075-music-view .k993-all-row > .k1156-own:not(#k1156) { grid-column: 3; grid-row: 1; justify-self: end; }
    html body .k1073-on .k1075-music-view .k993-all-row > .k1156-mid:not(#k1156) { display: block; grid-column: 2; grid-row: 1; font-size: 13px; font-weight: 600; color: var(--k756-ink); white-space: nowrap; }
    html body .k1073-on .k1075-music-view .k993-all-row > [data-testid="k756-all-voices"]:not(#k1156) { grid-column: 3; grid-row: 1; justify-self: end; }

    /* »Lav speak og musik« står i den samme dok nederst */
    html body .k1073-on .v247-speak-editor.k1075-music-view .k756-mfoot:not(#k1156):not(#k1156):not(#k1156):not(#k1156) {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; margin: 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, .96); border-top: 1px solid #E4DBCC; border-radius: 0; box-shadow: 0 -8px 24px -10px rgba(60, 40, 20, .25);
    }
    html body .k1073-on .v247-speak-editor.k1075-music-view .k756-mfoot::before { content: none; }
    html body .k1073-on .v247-speak-editor.k1075-music-view .k756-mfoot .k756-cta:not(#k1156):not(#k1156):not(#k1156):not(#k1156) {
        width: 100%; min-height: 52px; padding: 0 20px; border-radius: 14px; font-size: 17px;
    }
}
