/* ═══════════════════════════════════════════════════════════════════════════
   LIGHTCONE · 90 — MOBIL  (a vonat írja, 2026-10-01 · a régi mobile.css + a styles.css ≤768 blokkjai)
   Csak ≤768 px-en töltődik (media a <link>-en), és csak `html.is-mobile` alatt hat
   (a mobileShell.js teszi fel). Ugyanaz a mérték, mint desktopon: 12 főcím / 10 törzs /
   9 gomb, EGY vezérlő-magasság (--ctl-h = 26 a 00-tokens mobil-kivételéből), vízszintes
   padding mindenütt, a tagolás vonal. Itt CSAK az elrendezés változik: teljes képernyő,
   alsó sáv, biztonsági sávok (safe-area). A receptek geometriáját a 20/30 adja.
   Z-létra: a shell 60 · a csillag-lap 61 · a funkció-lap 80 · a modálok a sajátjukon (500).
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── a mobil elrendezés-tokenjei (csak geometria; betű és vezérlő a 00-ból) */
html.is-mobile {
    --gutter-m: var(--pad-x);
    --head-h:   calc(var(--ctl-h) + 2 * var(--pad-y));     /* fej = egy vezérlő + függőleges padding */
    --bar-h:    var(--head-h);                              /* alsó sáv = a fej tükre */
    --safe-t:   env(safe-area-inset-top, 0px);
    --safe-b:   env(safe-area-inset-bottom, 0px);
    --above-bar: calc(var(--bar-h) + var(--safe-b));
}

/* ── #app: zsebben egy oszlop, a térkép a színpad; a desktop sín és panel nincs ── */
html.is-mobile .app { grid-template-columns: 1fr; grid-template-rows: 1fr; height: 100dvh; }
html.is-mobile .narrative-panel, html.is-mobile .panel-collapse { display: none; }

/* ── a térkép fedvény-diétája: a desktop-sáv, a fab-pillek, a bannerek, a cmd-panel, a sín,
      a dokk és a desktop szonda-terv NEM jelennek meg — a helyük a shell.
      !important: ezek elemeit a JS `style.display`-jel is kapcsolja; a diéta erősebb kell legyen. */
html.is-mobile :is(.top-bar, .fab-cluster, .event-banner, .verify-bar, .cmd-panel, .user-bar,
    .impactor-banner, .visitor-banner, .ark-banner, .audience-banner, .tab-rail, .dock-rail,
    .hud, .starfilter-badge, .pwa-install-card:not(.hidden)),
html.is-mobile .map-container > .route-builder { display: none !important; }

/* tartalék út (main.js `m-banner-fb`): ha a BRIDGE-kártya nem találja a sávot, a három
   döntés-sáv visszatér a Bridge lapon, teljes szélességben. !important: a diétát kell visszavernie. */
html.is-mobile.m-banner-fb:has(.m-scr[data-mscr="bridge"].on) :is(.impactor-banner, .visitor-banner, .ark-banner) {
    display: block !important;
    left: var(--gutter-m); right: var(--gutter-m); transform: none; max-width: none;
    padding: var(--pad-y) var(--pad-x); white-space: normal; text-align: left;
}
/* a sávok a .banner-stack verem statikus elemei: a teljes szélességet a verem adja (a left/right ott nem hat) */
html.is-mobile.m-banner-fb .banner-stack > * { align-self: stretch; margin-inline: var(--gutter-m); }

/* ── a funkció-lap (body.m-panel-open): a desktop panel teljes képernyőn, a térkép fölött */
html.is-mobile body.m-panel-open .narrative-panel {
    display: flex; flex-direction: column; position: fixed; inset: 0; z-index: var(--z-shell-panel);
    width: auto; max-width: none; padding-top: var(--safe-t); padding-bottom: var(--safe-b);
}
html.is-mobile body.m-panel-open .m-panel-close {
    display: inline-flex; align-items: center; justify-content: center;
    position: absolute; top: calc(var(--pad-y) + var(--safe-t)); right: var(--gutter-m); z-index: 5;
    width: var(--ctl-h); height: var(--ctl-h);
}

/* ═══ A SHELL ═══════════════════════════════════════════════════════════════ */
.m-shell[hidden] { display: none; }
html.is-mobile .m-shell { -webkit-tap-highlight-color: transparent; }

/* ── a képernyők: a SZERZŐDÉS — `.m-scr` rejtve, `.m-scr.on` flex (a JS `#m-scr-mind.on`-t olvas) */
html.is-mobile .m-scr {
    position: fixed; left: 0; right: 0; top: 0; bottom: var(--above-bar);
    z-index: var(--z-shell); display: none; flex-direction: column; min-width: 0;
    padding-top: var(--safe-t); background: var(--bg-base);
}
html.is-mobile .m-scr.on { display: flex; }

/* fej: EGY főcím (12), vízszintes padding, alatta a vonal; a vezérlők egy vonalon */
html.is-mobile .m-head {
    flex: 0 0 var(--head-h); display: flex; align-items: center; gap: var(--gap); min-width: 0;
    padding: 0 var(--gutter-m); border-bottom: var(--bw) solid var(--line-strong); background: var(--g-04);
}
html.is-mobile .m-head .m-ttl {
    flex: 1 1 auto; min-width: 0;
    font-size: var(--fs-title); font-weight: var(--fw-bold); letter-spacing: var(--ls-title); color: var(--text-bright);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html.is-mobile .m-head .m-yr { flex: 0 0 auto; color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
html.is-mobile .m-sub {
    flex: 0 0 auto; padding: var(--pad-y) var(--gutter-m); color: var(--text-muted);
    border-bottom: var(--bw) solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html.is-mobile .m-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
html.is-mobile .m-empty { padding: var(--sec-gap) var(--gutter-m); color: var(--text-muted); }
html.is-mobile .m-spacer { height: var(--sec-gap); }

/* ── vezérlők: a .btn recept (EGY magasság, 9 px felirat, egy sugár) ─────────── */
html.is-mobile :is(.m-btn, .m-ibtn, .m-install-btn), html.is-mobile .m-set .c > button,
html.is-mobile :is(.m-card, .m-txd, .m-doors) :is(.remedy-btn, .cmodal-foot-btn, .feed-decode-btn, .feed-reply-btn, button.feed-jump) {
    display: inline-block; vertical-align: middle; text-align: center;   /* (mega-vonat ui #9) ellipszis a flex helyett */
    height: var(--ctl-h); min-height: var(--ctl-h); padding: 0 var(--ctl-pad-x); margin: 0; min-width: 0;
    font-size: var(--fs-btn); font-weight: 500; letter-spacing: var(--ls-btn); line-height: calc(var(--ctl-h) - 2 * var(--bw)); text-transform: uppercase;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    color: var(--accent); background: var(--g-06);
    border: var(--bw) solid var(--g-30); border-radius: var(--r);
    cursor: pointer; touch-action: manipulation; user-select: none;
}
html.is-mobile :is(.m-btn, .m-ibtn, .m-chip):active { background: var(--g-18); }
html.is-mobile .m-btn--primary { background: var(--g-16); border-color: var(--accent); color: var(--text-bright); box-shadow: var(--glow-sm); }
html.is-mobile .m-btn--quiet { background: transparent; border-color: var(--g-14); color: var(--text-muted); }
html.is-mobile .m-btn--amber { color: var(--amber);  border-color: rgba(251,191,36,.45); background: rgba(251,191,36,.06); }
html.is-mobile .m-btn--danger { color: var(--danger); border-color: rgba(255,77,77,.45);  background: rgba(255,77,77,.06); }
html.is-mobile .m-btn--list { display: flex; width: 100%; border-style: dashed; color: var(--text-muted); background: transparent; }   /* CSAK lista-nyitó */
/* kész / tiltott: TELI marad, csak halkabb (a szaggatott nem tiltás) */
html.is-mobile :is(.m-btn--done, .m-btn:disabled, .m-btn.is-disabled) { opacity: .45; box-shadow: none; cursor: default; }
/* ikon-gomb: négyzet a vezérlő-magasságon (a szonda-terv ▲▼✕ gombjai is) */
html.is-mobile .m-ibtn, html.is-mobile .m-probe-plan .rb-leg-ops .rb-op {
    width: var(--ctl-h); height: var(--ctl-h); flex: 0 0 var(--ctl-h); padding: 0; font-size: var(--fs-body);
}
html.is-mobile .m-install-btn { display: flex; width: 100%; color: var(--amber); border-color: rgba(251,191,36,.45); background: rgba(251,191,36,.06); }
/* szűrő-chip: a .chip recept, de ujjnyi magasan (a chip itt kapcsoló) */
html.is-mobile .m-chip {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; gap: var(--gap-s);
    height: var(--ctl-h); padding: 0 var(--pad-x-s); margin: 0;
    font-size: var(--fs-btn); letter-spacing: var(--ls-btn); line-height: 1; white-space: nowrap;
    color: var(--text-muted); background: var(--g-06); border: var(--bw) solid var(--g-18); border-radius: var(--r);
    cursor: pointer; touch-action: manipulation;
}
html.is-mobile .m-chip.on { color: var(--text-bright); background: var(--g-16); border-color: var(--accent); }

/* ── alsó sáv: négy fül (MAP · BRIDGE · TX · MENU) — a sáv a fej tükre: egy vezérlő-sor,
      a fül a vezérlő-magasságon (glif + felirat egy sorban), az aktív a .btn.is-active nyelvén ── */
html.is-mobile .m-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-shell);
    height: var(--above-bar); padding: var(--pad-y) var(--gutter-m) calc(var(--pad-y) + var(--safe-b));
    display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); align-items: center;
    background: var(--surface-deck); backdrop-filter: blur(4px);
    border-top: var(--bw) solid var(--line-strong);
}
html.is-mobile .m-bar button {
    position: relative; display: flex; align-items: center; justify-content: center; gap: var(--gap-s);
    height: var(--ctl-h); padding: 0 var(--pad-x-s); min-width: 0;
    color: var(--text-muted); border: var(--bw) solid transparent; border-radius: var(--r); touch-action: manipulation;
}
html.is-mobile .m-bar button .g { font-size: var(--fs-body); line-height: 1; }
html.is-mobile .m-bar button .l { font-size: var(--fs-btn); font-weight: var(--fw-bold); letter-spacing: var(--ls-head); line-height: 1; white-space: nowrap; }
html.is-mobile .m-bar button.on { color: var(--text-bright); background: var(--g-16); border-color: var(--accent); }
html.is-mobile .m-bar .m-cnt {
    position: static; margin-left: var(--gap-s);   /* a fül sorában, nem lóg ki belőle */
    min-width: var(--fs-title); padding: calc(var(--gap-s) / 2) var(--gap-s); font-size: var(--fs-btn); line-height: 1; text-align: center;
    color: var(--bg-base); background: var(--accent); border-radius: var(--r);
}
html.is-mobile .m-bar .m-cnt[hidden] { display: none; }

/* ── térkép-fedvények: az év-chip (bal fent; zsebben ez az óra), a ☰ (jobb fent), a ◈ N DECISIONS pill (közép) ── */
html.is-mobile .year-chip {
    display: inline-flex; align-items: center; gap: var(--gap);
    position: fixed; z-index: var(--z-shell); top: calc(var(--pad-x) + var(--safe-t)); left: var(--gutter-m); right: auto;
    height: var(--ctl-h); padding: 0 var(--pad-x);
    background: var(--surface-deck); backdrop-filter: blur(3px);
    border: var(--bw) solid var(--g-22); border-radius: var(--r); color: var(--text-bright);
}
html.is-mobile .m-mapov { position: fixed; z-index: var(--z-shell); top: calc(var(--pad-x) + var(--safe-t)); }
html.is-mobile .m-mapov[hidden] { display: none; }
html.is-mobile .m-map-menu { right: var(--gutter-m); background: var(--surface-deck); backdrop-filter: blur(3px); }
html.is-mobile .m-mapov.m-pill {
    left: 50%; transform: translateX(-50%);
    color: var(--amber); border-color: var(--amber); background: var(--surface-deck); backdrop-filter: blur(3px);
    animation: m-pill-pulse 1.8s ease-in-out infinite;
}
@keyframes m-pill-pulse { 0%, 100% { box-shadow: none; } 50% { box-shadow: var(--glow-amber); } }
@media (prefers-reduced-motion: reduce) { html.is-mobile .m-mapov.m-pill { animation: none; box-shadow: var(--glow-amber); } }

/* ═══ BRIDGE: szakasz-cím (10 bold + vonal) · kártya (csík BELÜL paddingolva) ═══ */
html.is-mobile .m-sec {
    display: flex; align-items: center; gap: var(--gap); min-height: var(--row-h);
    padding: var(--pad-y) var(--gutter-m) 0;
    font-weight: var(--fw-bold); letter-spacing: var(--ls-head); color: var(--text-muted); white-space: nowrap;
}
html.is-mobile .m-sec::after { content: ""; flex: 1 1 auto; height: var(--bw); background: var(--line); }
html.is-mobile .m-sec--hand { color: var(--danger); }
html.is-mobile .m-sec--watch { color: var(--amber); }
html.is-mobile .m-card {
    display: flex; flex-direction: column; gap: var(--gap); min-width: 0;
    margin: var(--gap) var(--gutter-m); padding: var(--pad-y) var(--pad-x);
    background: var(--g-04); border: var(--bw) solid var(--g-14); border-left: 2px solid var(--text-muted); border-radius: var(--r);
}
html.is-mobile .m-card--hand { border-left-color: var(--danger); }
html.is-mobile .m-card--watch { border-left-color: var(--amber); }
html.is-mobile .m-card--mind { border-left-color: var(--accent); }
/* kártya-fej: glif · NÉV (10 bold) · címke — egy sor, nem törik */
html.is-mobile .m-ch { display: flex; align-items: center; gap: var(--gap); min-width: 0; min-height: var(--row-h); }
html.is-mobile .m-ch .g { flex: 0 0 auto; color: var(--accent); }
html.is-mobile .m-ch .n {
    flex: 1 1 auto; min-width: 0; font-weight: var(--fw-bold); letter-spacing: var(--ls-head); color: var(--text-bright);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html.is-mobile .m-ch .tag { flex: 0 0 auto; color: var(--text-muted); white-space: nowrap; }
html.is-mobile .m-card--hand  .m-ch .tag { color: var(--danger); }
html.is-mobile .m-card--watch .m-ch .tag { color: var(--amber); }
/* a Mind olvasata a kártyában: a bal él a kártyáé */
html.is-mobile .m-card .nyulureg-surface { display: flex; flex-direction: column; gap: var(--gap); margin: 0; padding: 0; border: 0; background: none; }
html.is-mobile .m-card .nyulureg-read { color: var(--text-bright); }
/* (Peter 2026-10-04) EGY ALAK MINDENÜTT: a ⟨ ⟩ keret helyett a kártya olvasata is a ◆ THE MIND fejet viseli (váró döntésnél
   ◈ DECISION PENDING) — ugyanaz, mint az asztali és a zsebes dossziék feje. CSS-ből, hogy minden kártya-fajta megkapja. */
/* [vonat 10-04 css#3] csak a VALÓDI Mind-kártyákon (data-mcard: a Bridge-kártya és a lap feje) — a fiók- és előrejelzés-kártya nem a Mind olvasata */
html.is-mobile .m-card[data-mcard] > .nyulureg-surface:not(.mind-top)::before { content: "◆ THE MIND"; color: var(--text-bright); font-weight: var(--fw-bold); letter-spacing: var(--ls-head); }
html.is-mobile .m-card--hand[data-mcard] > .nyulureg-surface:not(.mind-top)::before { content: "◈ DECISION PENDING"; color: var(--danger); }
/* [vonat 10-04 mv#5] ha a lap FEJE (lead) már kimondta a fejlécet, a beköltözött dosszié feje nem ismétli */
html.is-mobile #m-card-lead:not(:empty) + #m-card-mount .mv-top > .mind-top-h { display: none; }
html.is-mobile .m-card .nyulureg-glance { display: block; color: var(--text-muted); white-space: normal; }   /* (2026-10-04) a számsor törik, nem vágódik le */
/* tett-sor: egyforma gombok egy vonalon; a döntés-sor fölötte, oszlopban */
html.is-mobile .m-acts { display: flex; flex-wrap: nowrap; gap: var(--gap); min-width: 0; }
html.is-mobile .m-acts > * { flex: 1 1 0; min-width: 0; }
html.is-mobile .m-btn--steer.open { border-color: var(--accent); color: var(--text-bright); }
/* ⌖ a szonda STÁTUSZ-SORA: a launchProbe className-írása mellett a `data-keep="m-note"` őrzi a receptet */
html.is-mobile .m-card > .m-note { color: var(--text-muted); white-space: normal; }
html.is-mobile .m-card > .m-note:empty { display: none; }
html.is-mobile .m-card > .m-note.error { color: var(--danger); }
html.is-mobile .m-card > .m-note.success { color: var(--text-bright); }
html.is-mobile .m-account { display: none; color: var(--text-bright); }
html.is-mobile .m-account.on { display: block; }
html.is-mobile .m-account::before { content: "◆ "; color: var(--accent); }
/* ⚙︎ I'LL STEER: a nyitást a kártya gombja vezérli; a natív summary rejtve; vonal választ el */
html.is-mobile .m-card .nyulureg-steer { margin: 0; padding: var(--gap) 0 0; border: 0; border-top: var(--bw) solid var(--line); background: none; border-radius: 0; }
html.is-mobile .m-card .nyulureg-steer:not([open]) { display: none; }
html.is-mobile .m-card .nyulureg-steer > summary { display: none; }
html.is-mobile .m-card .nyulureg-steer-body { display: flex; flex-direction: column; gap: var(--gap); padding: 0; }
html.is-mobile .m-modeline { color: var(--amber); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.is-mobile .m-lbl { font-weight: var(--fw-bold); letter-spacing: var(--ls-head); color: var(--text-muted); white-space: nowrap; }
html.is-mobile .m-stack { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
html.is-mobile .m-stack > * { width: 100%; }
html.is-mobile .m-row2 { display: flex; gap: var(--gap); }
html.is-mobile .m-row2 > * { flex: 1 1 0; min-width: 0; }
/* petíció-sorok: hívás egy sorban, alatta a két ige; vonal a sorok közt */
html.is-mobile .m-pet { display: flex; align-items: center; gap: var(--gap); min-height: var(--row-h); color: var(--text-bright); white-space: nowrap; overflow: hidden; }
html.is-mobile .m-pet .g { flex: 0 0 auto; color: var(--accent); }
html.is-mobile .m-pet .t { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
html.is-mobile .m-pet .r { flex: 0 0 auto; margin-left: auto; color: var(--text-muted); }
html.is-mobile .m-petlist { display: flex; flex-direction: column; }
html.is-mobile .m-petrow { display: flex; flex-direction: column; gap: var(--gap-s); padding: var(--gap) 0; border-bottom: var(--bw) solid var(--line); }
html.is-mobile .m-petrow:first-child { padding-top: 0; }
html.is-mobile .m-petrow:last-child { border-bottom: 0; }
/* ◆ COUNSEL: a desktop .tx-row a kártyában — glif-oszlop, a mondat teljes, alatta az ige + × */
html.is-mobile .m-counsel { display: flex; flex-direction: column; }
html.is-mobile .m-counsel .tx-row {
    display: grid; grid-template-columns: var(--row-h) minmax(0, 1fr); gap: var(--gap-s) var(--gap);
    padding: var(--gap) 0; border-bottom: var(--bw) solid var(--line); box-shadow: none; cursor: default;
}
html.is-mobile .m-counsel .tx-row:last-child { border-bottom: 0; }
html.is-mobile .m-counsel .tx-row:hover { background: none; }
html.is-mobile .m-counsel .tx-age { text-align: left; color: var(--amber); }
html.is-mobile .m-counsel .tx-row--crisis .tx-age { color: var(--danger); }
html.is-mobile .m-counsel .tx-line { color: var(--text-bright); white-space: normal; }
html.is-mobile .m-counsel .tx-line.feed-msg--clamp { display: block; -webkit-line-clamp: unset; overflow: visible; }
html.is-mobile .m-counsel .tx-end { grid-column: 2; display: flex; gap: var(--gap); }
html.is-mobile .m-counsel .tx-end .mind-tip-cta { flex: 1 1 auto; min-width: 0; color: var(--amber); border-color: rgba(251,191,36,.45); background: transparent; }
html.is-mobile .m-counsel .tx-row--crisis .tx-end .mind-tip-cta { color: var(--danger); border-color: rgba(255,77,77,.45); }
html.is-mobile .m-counsel .tx-dismiss { flex: 0 0 var(--ctl-h); width: var(--ctl-h); height: var(--ctl-h); margin-left: auto; float: none; opacity: 1; }
/* a régi ≤560 (most: a zseb) TX-tett-sor: glif-oszlop + a tett alatta */
html.is-mobile :is(.feed-item.tx-row--act, .tx-row--act) { grid-template-columns: var(--row-h) minmax(0, 1fr); }
html.is-mobile .tx-row--act .tx-end { grid-column: 2; justify-content: flex-start; }
/* QUIET: egy sor, egy adat, vonal alatta (a sor .feed-jump is — a delegált ajtóért) */
html.is-mobile .m-quiet {
    display: flex; align-items: center; gap: var(--gap); min-height: var(--row-h);
    margin: 0 var(--gutter-m); padding: var(--gap-s) 0;
    border: 0; border-bottom: var(--bw) solid var(--line); border-radius: 0; background: none;
    color: var(--text-muted); white-space: nowrap; overflow: hidden; cursor: pointer;
    text-align: left;   /* [mega-vonat 10-03 UI-2] a flotta-sor .feed-jump is — annak (51) középre igazítása itt nem él */
}
html.is-mobile .m-quiet .g, html.is-mobile .m-quiet .door { flex: 0 0 auto; color: var(--accent); }
html.is-mobile .m-quiet .n { color: var(--text-bright); }
html.is-mobile .m-quiet .t { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* ═══ TX: szűrő-sáv · sorok · részlet ════════════════════════════════════════ */
html.is-mobile .m-filters {
    flex: 0 0 auto; display: flex; gap: var(--gap); padding: var(--pad-y) var(--gutter-m);
    border-bottom: var(--bw) solid var(--line); overflow-x: auto; scrollbar-width: none;
}
html.is-mobile .m-filters::-webkit-scrollbar { display: none; }
/* TX-sor és lista-sor: egy recept — glif · cím · jobb adat / alatta egy tény-sor */
html.is-mobile :is(.m-tx, .m-li) {
    display: grid; grid-template-rows: auto auto; column-gap: var(--gap); row-gap: 2px; align-items: baseline;
    padding: var(--pad-y) var(--gutter-m); border-bottom: var(--bw) solid var(--line); cursor: pointer; min-width: 0;
}
html.is-mobile .m-tx { grid-template-columns: var(--gap-l) var(--sec-gap) minmax(0, 1fr) auto; }
html.is-mobile .m-li { grid-template-columns: var(--sec-gap) minmax(0, 1fr) auto; }
html.is-mobile :is(.m-tx, .m-li):active { background: var(--g-06); }
html.is-mobile :is(.m-tx, .m-li) .g { grid-row: 1 / 3; align-self: center; text-align: center; color: var(--accent); }
html.is-mobile .m-tx .dot { grid-row: 1 / 3; align-self: center; text-align: center; color: var(--accent); }
html.is-mobile :is(.m-tx .hl, .m-li .n) { min-width: 0; color: var(--text-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.is-mobile :is(.m-tx .lt, .m-li .s) { color: var(--text-muted); white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
html.is-mobile :is(.m-tx .lt.a, .m-li .s.a) { color: var(--amber); }
html.is-mobile .m-li .s.d { color: var(--danger); }
html.is-mobile .m-tx .dt { grid-column: 3 / 5; }
html.is-mobile .m-li .d { grid-column: 2 / 4; }
html.is-mobile :is(.m-tx .dt, .m-li .d) { min-width: 0; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.is-mobile .m-tx--hushed { opacity: .5; }
html.is-mobile .m-tx--read .dot { visibility: hidden; }
html.is-mobile .m-tx--hand  .g { color: var(--danger); }
html.is-mobile .m-tx--watch .g { color: var(--amber); }
html.is-mobile .m-shell .violet { color: var(--alien-violet-text); }

/* TX részlet: alcím-sor (10 bold), meta, üzenet, tett, láb; az ajtók az alsó sávban */
html.is-mobile .m-txd { display: flex; flex-direction: column; gap: var(--gap); padding: var(--pad-y) var(--gutter-m) var(--sec-gap); }
html.is-mobile .m-txd .t { display: flex; align-items: center; gap: var(--gap); min-height: var(--row-h); min-width: 0; }
html.is-mobile .m-txd .t .g { flex: 0 0 auto; color: var(--accent); }
html.is-mobile .m-txd .t .n { min-width: 0; font-weight: var(--fw-bold); letter-spacing: var(--ls-head); color: var(--text-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.is-mobile .m-txd .meta { display: flex; flex-wrap: wrap; gap: 0 var(--gap); padding-bottom: var(--gap); border-bottom: var(--bw) solid var(--line); color: var(--text-muted); }
html.is-mobile .m-txd .meta > span { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }   /* [144] egy túl hosszú név se lógjon ki; [109] a hang-sor is nagybetű (a .voice none-szabály törölve) */
html.is-mobile .m-txd .meta span + span::before { content: "· "; color: var(--text-dim); }
html.is-mobile .m-txd .m-msg { color: var(--text-bright); }
html.is-mobile .m-txd .m-msg.violet { color: var(--alien-violet-text); }
html.is-mobile .m-txd .m-msg :is(.feed-jump, .feed-link) {
    display: inline; vertical-align: baseline; height: auto; min-height: 0; padding: 0; border: 0; background: none;
    font-size: inherit; line-height: inherit; color: var(--accent-bright);   /* [UI-2] a gomb sor-magassága (51) a prózában nem él */ text-decoration: underline; text-underline-offset: 2px;
}
html.is-mobile .m-txd .m-act > * { width: 100%; color: var(--amber); border-color: rgba(251,191,36,.45); background: rgba(251,191,36,.06); }
html.is-mobile .m-txd .m-foot { display: flex; flex-wrap: wrap; gap: var(--gap); padding-top: var(--gap); border-top: var(--bw) solid var(--line); }
html.is-mobile .m-txd .m-foot > * { flex: 1 1 40%; min-width: 0; }
html.is-mobile .m-txd .m-note { color: var(--text-muted); }
html.is-mobile .m-txd :is(.feed-jumpbar, .feed-jump-note) { display: none; }
html.is-mobile .m-doors {
    flex: 0 0 auto; display: flex; gap: var(--gap); padding: var(--pad-y) var(--gutter-m);
    border-top: var(--bw) solid var(--line-strong); background: var(--g-04);
}
html.is-mobile .m-doors:empty { display: none; }
html.is-mobile .m-doors > * { flex: 1 1 0; min-width: 0; }

/* ═══ ☰ MENÜ: sorok, nem gombok — glif · FELIRAT · halk jobb adat; vonal a sorok közt ═══ */
html.is-mobile .m-menu { display: flex; flex-direction: column; padding: var(--gap) 0; }
html.is-mobile .m-menu button {
    display: flex; align-items: center; gap: var(--gap); width: 100%; min-width: 0;
    height: var(--ctl-h); padding: 0 var(--gutter-m); margin: 0;
    font-weight: var(--fw-bold); letter-spacing: var(--ls-head); text-align: left; white-space: nowrap;
    color: var(--accent); border-bottom: var(--bw) solid var(--g-08); touch-action: manipulation;
}
html.is-mobile .m-menu button:active { background: var(--g-08); }
html.is-mobile .m-menu button .g { flex: 0 0 var(--sec-gap); text-align: center; color: var(--accent-bright); }
html.is-mobile .m-menu button .r {
    margin-left: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis;
    font-weight: 400; letter-spacing: var(--ls-body); color: var(--text-muted);
}
html.is-mobile .m-menu .gap { height: var(--sec-gap); border-bottom: var(--bw) solid var(--line); }
html.is-mobile .m-menu .foot { padding: var(--sec-gap) var(--gutter-m); color: var(--text-dim); }

/* ═══ ⚙︎ SETTINGS: minden sor egy desktop-folyam — glif · FELIRAT · érték · vezérlő ═══ */
html.is-mobile .m-set {
    display: flex; align-items: center; gap: var(--gap); min-width: 0;
    padding: var(--pad-y) var(--gutter-m); border-bottom: var(--bw) solid var(--line);
    font-weight: var(--fw-bold); letter-spacing: var(--ls-head); color: var(--accent);
    white-space: nowrap; cursor: pointer; touch-action: manipulation;
}
html.is-mobile .m-set:active { background: var(--g-08); }
html.is-mobile .m-set .g { flex: 0 0 var(--sec-gap); text-align: center; color: var(--accent-bright); }
html.is-mobile .m-set .t { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
html.is-mobile .m-set .r { flex: 0 0 auto; font-weight: 400; letter-spacing: var(--ls-body); color: var(--text-muted); }
html.is-mobile .m-set .c { flex: 0 0 auto; display: flex; align-items: center; }
html.is-mobile .m-set--danger, html.is-mobile .m-set--danger .g { color: var(--danger); }
html.is-mobile .m-settings-body .m-note { padding: var(--pad-y) var(--gutter-m); color: var(--text-muted); white-space: normal; }

/* ═══ ⌖ CSILLAG-LAP a térképen: név (főcím) · tény-sor · három ajtó egy vonalon ═══ */
html.is-mobile .m-sheet {
    position: fixed; left: 0; right: 0; bottom: var(--above-bar); z-index: var(--z-shell-up);
    display: flex; flex-direction: column; gap: var(--gap);
    padding: var(--pad-y) var(--gutter-m) var(--gutter-m);
    background: var(--surface-deck); backdrop-filter: blur(4px);
    border-top: var(--bw) solid var(--line-strong); box-shadow: 0 -8px 30px rgba(0, 0, 0, .6);
}
html.is-mobile .m-sheet[hidden] { display: none; }
html.is-mobile .m-sheet .h { display: flex; align-items: center; gap: var(--gap); min-width: 0; }
html.is-mobile .m-sheet .h .n {
    flex: 1 1 auto; min-width: 0;
    font-size: var(--fs-title); font-weight: var(--fw-bold); letter-spacing: var(--ls-title); color: var(--text-bright);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html.is-mobile .m-sheet .m { color: var(--text-muted); padding-bottom: var(--gap); border-bottom: var(--bw) solid var(--line); }
html.is-mobile .m-sheet-acts { display: flex; flex-wrap: nowrap; gap: var(--gap); }
html.is-mobile .m-sheet-acts > * { flex: 1 1 0; min-width: 0; }

/* ═══ KÁRTYA-LAP: a beköltözött desktop-felület (.m-mount) inline testté szelídül ═══ */
html.is-mobile .m-mount { padding-bottom: var(--sec-gap); }
html.is-mobile .m-mount:empty { display: none; }
html.is-mobile .m-mount[hidden] { display: none !important; }   /* a ⚙︎ STEER kapcsolja `.hidden=`-nel; a fenti display-t verni kell */
html.is-mobile .m-mount :is(.pn, .proper-name, .star-name, .exp-system-name, input, textarea, [contenteditable]) { text-transform: none; }
html.is-mobile .m-mount .detail-modal-card {
    position: static; display: block; width: auto; height: auto; max-width: none; max-height: none; min-height: 0;
    margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible;
}
html.is-mobile .m-mount :is(.detail-modal-head, .detail-modal-dock, .detail-modal-close) { display: none; }   /* a lap feje mondja a nevet */
html.is-mobile .m-mount .detail-modal-body { height: auto; max-height: none; overflow: visible; margin: 0; padding: var(--pad-y) var(--gutter-m); }
html.is-mobile .m-mount .detail-modal-foot {
    display: flex; flex-wrap: wrap; gap: var(--gap); margin: 0;
    padding: var(--pad-y) var(--gutter-m); border-top: var(--bw) solid var(--line); background: none;
}
html.is-mobile .m-mount .detail-modal-foot > * { flex: 1 1 40%; min-width: 0; }
html.is-mobile .m-mount .fleet-history-panel {
    position: static; width: auto; max-width: none; max-height: none;
    margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
}
html.is-mobile .m-mount .fleet-history-head { padding: 0 var(--gutter-m) var(--gap); }
html.is-mobile .m-mount .acct-block { display: flex; flex-direction: column; gap: var(--gap); padding: var(--pad-y) var(--gutter-m); }
html.is-mobile .m-mount .acct-block :is(.probe-name-input, .cmodal-foot-btn) { width: 100%; }

/* ═══ ◆ MIND-LAP: a desktop Mind-panel beköltözik; a saját feje és summaryja elmarad ═══ */
html.is-mobile .m-mind-body > .mind-pane-body > .nyulureg-surface { display: none; }
html.is-mobile .m-mind-body .nyulureg-steer { margin: 0; padding: 0; border: 0; background: none; border-radius: 0; }
html.is-mobile .m-mind-body .nyulureg-steer > summary { display: none; }
html.is-mobile .m-mind-body .nyulureg-steer-body { padding: 0; }
html.is-mobile .m-mind-body .mind-recap-cta { margin: 0; padding: 0; }
html.is-mobile .m-mind-cards { padding-bottom: var(--sec-gap); }
html.is-mobile .m-mind-hole { display: flex; flex-direction: column; gap: var(--gap); padding-top: var(--gap); border-top: var(--bw) solid var(--line); }
html.is-mobile .m-mind-hole[hidden] { display: none !important; }   /* `.hidden=` a JS-ből — a fenti flex-et verni kell */
html.is-mobile .m-mind-hole > .settings-group { margin: 0; padding: 0; border: 0; background: none; }
html.is-mobile .m-mind-hole > .settings-group > .settings-label { display: none; }
html.is-mobile .m-mind-forecast > * { width: 100%; }
/* tárcsa-sor: a felirat-pár egy sorban, a csúszka alatta teljes szélességben */
html.is-mobile .m-mind-hole .tech-weight-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap); }
html.is-mobile .m-mind-hole .tech-weight-row > input[type="range"] { flex: 1 1 100%; order: 3; }
html.is-mobile .m-mind-hole .tech-weight-label { white-space: nowrap; }
html.is-mobile .m-mind-hole .mind-order-row { display: flex; align-items: center; gap: var(--gap); min-height: var(--ctl-h); padding: var(--gap-s) 0; }
html.is-mobile .m-mind-hole .mind-order-param { display: inline-flex; align-items: center; gap: var(--gap); flex-wrap: wrap; }
html.is-mobile .m-mind-hole :is(.mind-posture-row, .mind-policy-controls) { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap); }
html.is-mobile .m-mind-hole .mind-posture-row > * { flex: 1 1 40%; min-width: 0; }
html.is-mobile .m-mind-hole .mind-ledger-row { display: flex; gap: var(--gap); padding: var(--gap) 0; border-bottom: var(--bw) solid var(--line); }

/* ═══ ⌖ SZONDA-KÁRTYA: a desktop terv-építő inline testté szelídül ═══ */
html.is-mobile .m-probe { display: flex; flex-direction: column; gap: var(--gap); padding: var(--pad-y) var(--gutter-m) var(--sec-gap); }
html.is-mobile .m-probe .m-note { color: var(--text-muted); }
html.is-mobile .m-probe .m-note.error { color: var(--danger); }
html.is-mobile .m-probe .m-note.success { color: var(--text-bright); }
html.is-mobile .m-probe-targets[hidden], html.is-mobile .m-probe-noplan[hidden] { display: none; }
html.is-mobile .m-probe-plan > .route-builder {
    position: static; inset: auto; z-index: auto; width: auto; height: auto; max-width: none; max-height: none;
    margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
}
html.is-mobile .m-probe-plan > .route-builder.hidden { display: none; }
html.is-mobile .m-probe-plan .route-builder-actions { display: flex; flex-wrap: wrap; gap: var(--gap); }
html.is-mobile .m-probe-plan .route-builder-actions > * { flex: 1 1 40%; min-width: 0; }
html.is-mobile .m-probe-plan .rb-leg { display: flex; align-items: center; gap: var(--gap); min-height: var(--row-h); }
html.is-mobile .m-probe-plan .rb-leg-name { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.is-mobile .m-probe-plan .rb-leg-ops { display: flex; gap: var(--gap-s); flex: 0 0 auto; }
html.is-mobile .m-probe-plan .probe-name-input { display: block; width: 100%; }
html.is-mobile .m-probe-plan .probe-instrumented-toggle { display: flex; align-items: center; gap: var(--gap); min-height: var(--ctl-h); }

/* ═══ TELJES KÉPERNYŐS MODÁLOK: zsebben nincs fátyol-sziget — a kártya 100vw × 100dvh,
       ugyanaz a nyelv: fej (főcím) → fül-sáv → görgető törzs → döntés-láb. A shell (60) fölött. ═══ */
html.is-mobile :is(.detail-modal, .system-modal, .fleet-modal, .seti-modal, .planet-modal, .atlas-modal, .missions-modal),
html.is-mobile body:is(.dock-open, .dock-narrow) .detail-modal {
    inset: 0; padding: 0; align-items: stretch; justify-content: stretch;
    background: var(--bg-base); backdrop-filter: none; -webkit-backdrop-filter: none;
}
html.is-mobile :is(.detail-modal-card, .system-content, .fleet-modal-content, .seti-modal-content, .planet-content, .atlas-content, .missions-content) {
    width: 100vw; height: 100dvh; max-width: none; max-height: none;
    padding-top: var(--safe-t); padding-bottom: var(--safe-b);
    border: 0; border-radius: 0; box-shadow: none; background: var(--bg-base);
}
html.is-mobile .m-mount .detail-modal-card { height: auto; padding: 0; }   /* a kártya-lapba költözött dosszié nem teljes képernyő */
html.is-mobile .detail-modal-dock { display: none; }   /* zsebben nincs dokk-sáv */
/* a láb: két egyforma gomb soronként (nem szorul ellipszisre) */
/* [mega-vonat 10-03 UI-19] a halott horgok kivéve (web/ + server/: 0 találat): .fleet-modal-foot, .seti-modal-foot, .cstats, .fleet-dossier-add, .fd-ship-actions */
html.is-mobile .detail-modal-foot { flex-wrap: wrap; }
html.is-mobile .detail-modal-foot > * { flex: 1 1 40%; min-width: 0; }
/* a széles rácsok egy oszlopba; táblák a saját dobozukban görgetnek; vászon és kép a 390-hez */
html.is-mobile :is(.m-mount, .detail-modal) :is(.cmodal-panes, .fleet-add-row, .remedy-acts) {
    display: flex; flex-wrap: wrap; gap: var(--gap); grid-template-columns: none;
}
html.is-mobile :is(.m-mount, .detail-modal) .fleet-add-row > * { flex: 1 1 40%; min-width: 0; }
html.is-mobile :is(.m-mount, .detail-modal, .fleet-modal) .doctrine-row { display: flex; flex-direction: column; align-items: stretch; gap: var(--gap-s); }
html.is-mobile :is(.m-mount, .detail-modal, .fleet-modal, .seti-modal, .system-modal) :is(canvas, img) { max-width: 100%; }
html.is-mobile :is(.m-mount, .detail-modal, .fleet-modal, .seti-modal, .system-modal) table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
html.is-mobile :is(.m-mount, .detail-modal, .fleet-modal, .seti-modal, .system-modal, .m-mind-hole) :is(select, input, textarea) { max-width: 100%; }

html.is-mobile .mv .mv-line { grid-template-columns: minmax(0, 1fr); gap: var(--gap-s); }
/* rendszer-nézet: a sematika vászna a fej alatt kitölt; a HUD a vászon szélességéhez igazodik */
html.is-mobile .system-tab-content.schematic-view { overflow-y: auto; }
html.is-mobile .system-hud { left: var(--gutter-m); right: var(--gutter-m); width: auto; max-height: calc(100% - 2 * var(--pad-x)); }
html.is-mobile .system-report .report-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* (Peter 2026-10-04) a TEST-TÁBLA zsebben nem görög oldalra: négy oszlop marad (# · típus · a · tömeg), a sugár / periódus / e
   a bolygó-kártyán áll; a teljes szélességű sorok (mű-blokk, hold-sor) így a képernyőn belül törnek, gomb nem vágódik le */
html.is-mobile .system-report .bodies-table { display: table; table-layout: fixed; width: 100%; overflow: visible; }
html.is-mobile .system-report .bodies-table > thead th:nth-child(n+5),
html.is-mobile .system-report .bodies-table > tbody > tr.body-row > td:nth-child(n+5) { display: none; }
html.is-mobile .system-report .bodies-table > thead th:nth-child(1) { width: 18%; }
html.is-mobile .system-report .bodies-table > thead th:nth-child(2) { width: 42%; }
html.is-mobile .system-report .bodies-table > thead th:nth-child(3), html.is-mobile .system-report .bodies-table > thead th:nth-child(4) { width: 20%; }
html.is-mobile .system-report .bodies-table :is(td, th) { min-width: 0; overflow-wrap: anywhere; }
html.is-mobile .system-report .bodies-table > tbody > tr:not(.body-row) > td { white-space: normal; }
html.is-mobile .system-report .bodies-table > tbody > tr:not(.body-row) > td * { max-width: 100%; }
html.is-mobile .system-report .bodies-table > tbody > tr:not(.body-row) > td :is(.remedy-acts, .mv-acts, .inst-acts, .install-acts, .body-install-acts) { flex-wrap: wrap; }
/* bolygó-nézet: a vászon fent, az adatlapok alatta egy oszlopban */
html.is-mobile .planet-content { overflow-y: auto; }
html.is-mobile .planet-canvas { flex: 0 0 42dvh; height: 42dvh; }
html.is-mobile .planet-header { position: sticky; top: 0; z-index: 2; }
html.is-mobile :is(.planet-left, .planet-info) { position: static; width: auto; max-height: none; margin: var(--gap) var(--gutter-m) 0; }
/* (Peter 2026-10-04, 12. fotó) a bolygó-kártya bal oszlopa zsebben nem zsugorodhat és nem görgethet magában: a ◇ THE MIND doboz
   a sáv után le volt vágva (az alja és az ítélet-mondat a saját, láthatatlan görgetőjében maradt) */
html.is-mobile .planet-left { flex: 0 0 auto; overflow: visible; }
html.is-mobile .planet-left > * { flex: 0 0 auto; }
html.is-mobile .planet-info { margin-bottom: calc(var(--sec-gap) + var(--safe-b)); }
html.is-mobile .planet-scan { left: var(--gutter-m); right: var(--gutter-m); width: auto; transform: none; }

/* ⧉ a szűrő-panel: teljes képernyő a shell (60) fölött, az alsó sáv kihagyva */
html.is-mobile .starfilter-panel:not(.hidden) {
    position: fixed; inset: 0; z-index: var(--z-sticky); margin: 0;
    width: auto; max-width: none; height: auto; max-height: none; overflow-y: auto; overscroll-behavior: contain;
    padding: calc(var(--pad-y) + var(--safe-t)) var(--gutter-m) calc(var(--above-bar) + var(--sec-gap));
    background: var(--bg-base); backdrop-filter: none; text-transform: uppercase;
}

/* ── szertartás-fedvények (kánon-kivétel: saját lépték), de 390-be férve ── */
html.is-mobile .first-contact-overlay:not(.hidden) { padding: 0; overflow-y: auto; }
html.is-mobile .first-contact-overlay .first-contact-panel {
    width: auto; max-width: none; max-height: none; margin: 0;
    padding: calc(var(--sec-gap) + var(--safe-t)) var(--gutter-m) calc(var(--sec-gap) + var(--safe-b));
}
html.is-mobile .first-contact-overlay :is(.first-contact-controls, .first-contact-shares) { display: flex; flex-wrap: wrap; gap: var(--gap); }
html.is-mobile .first-contact-overlay :is(.first-contact-controls, .first-contact-shares) > * { flex: 1 1 40%; min-width: 0; }
html.is-mobile .first-contact-overlay .first-contact-card-frame img { max-width: 100%; height: auto; }

/* ── a sáv fölött ülők: toast-oszlop, FIRST LIGHT jelzőkártya ── */
html.is-mobile .toast-stack {
    left: var(--gutter-m); right: var(--gutter-m); top: auto; bottom: calc(var(--above-bar) + var(--gutter-m));
    transform: none; width: auto; max-width: none; align-items: stretch;   /* [mega-vonat 10-03 UI-6] a width:auto az 56 megszűnt mobil-blokkjából jött át (a desktop max-content-jét veri) */
}
html.is-mobile .toast { transform: translateY(16px); }
html.is-mobile .toast--in { transform: translateY(0); }
html.is-mobile .toast--out { transform: translateY(16px); }
/* a jelzőkártya csak a térképen: egy lapot (BRIDGE, TX, ☰…) nem takarhat le */
html.is-mobile:has(.m-scr.on, .m-sheet:not([hidden])) .fl-signal { display: none; }
html.is-mobile .fl-signal { left: var(--gutter-m); right: var(--gutter-m); width: auto; max-width: none; bottom: calc(var(--above-bar) + var(--gutter-m)); }

/* ── a kezdőképernyő-kártya (ha a diéta egyszer elengedi): a sáv fölött, a .box nyelvén ── */
html.is-mobile .pwa-install-card { left: var(--gutter-m); right: var(--gutter-m); bottom: calc(var(--above-bar) + var(--gutter-m)); padding: var(--pad-y) var(--pad-x); background: var(--surface-deck); border: var(--bw) solid var(--g-22); border-radius: var(--r); }
html.is-mobile .pwa-install-text { margin: 0; color: var(--text-base); }
html.is-mobile .pwa-install-acts { display: flex; gap: var(--gap); margin-top: var(--gap); }
html.is-mobile .pwa-install-acts > button { flex: 1 1 0; }

/* ═══ A desktop-felületek zseb-elrendezése (a styles.css régi ≤768 / ≤720 / ≤700 blokkjaiból) ═══ */
html.is-mobile .sys-hist-row { grid-template-columns: auto minmax(0, 1fr); }
html.is-mobile .sys-hist-msg { grid-column: 1 / -1; }
html.is-mobile .fg-card { width: 100vw; height: 100dvh; max-width: none; max-height: none; border-radius: 0; }
html.is-mobile .fg-layout { flex-direction: column; }
html.is-mobile .fg-menu {
    flex: 0 0 auto; width: 100%; flex-direction: row; gap: var(--gap); overflow-x: auto; overflow-y: hidden;
    padding: var(--pad-y) var(--pad-x); border-right: 0; border-bottom: var(--bw) solid var(--line);
}
html.is-mobile :is(.fg-menu-title, .fg-menu-sub) { display: none; }
html.is-mobile .fg-menu-item { flex: 0 0 auto; white-space: nowrap; }
html.is-mobile .fg-page { padding: var(--pad-y) var(--pad-x) var(--sec-gap); }
html.is-mobile .planetarium-bar { left: var(--gutter-m); right: var(--gutter-m); transform: none; padding: var(--pad-y) var(--pad-x); }
html.is-mobile :is(.pl-mag-row, .pl-time-row) { flex-wrap: wrap; max-width: 100%; }
html.is-mobile :is(.pl-mag-row, .pl-time-row) input[type="range"] { width: auto; flex: 1 1 50%; min-width: 0; }
html.is-mobile .planetarium-hud { top: calc(var(--head-h) + var(--safe-t)); bottom: auto; left: var(--gutter-m); max-height: calc(100dvh - 2 * var(--above-bar) - var(--head-h)); overflow-y: auto; }
html.is-mobile :is(.tongue-row, .market-row--offer, .market-announce, .doctrine-row) { flex-wrap: wrap; }
html.is-mobile .tongue-val { flex: 1 1 100%; white-space: normal; text-align: left; overflow-wrap: break-word; }
html.is-mobile .market-row--offer > :first-child { flex: 1 1 100%; white-space: normal; }
html.is-mobile .market-announce .pc-input { flex: 1 1 40%; min-width: 0; }
html.is-mobile .market-announce .cmodal-foot-btn, html.is-mobile .doctrine-row .fleet-select { flex: 1 1 100%; }
html.is-mobile :is(.detail-fields, .info-section) dd { text-align: left; }
html.is-mobile .realm-viewswitch { order: 2; }
html.is-mobile .proxy-sel-acts { margin-left: 0; flex: 1 1 100%; }
html.is-mobile .proxy-sel-acts .cmodal-foot-btn { flex: 1 1 0; }
html.is-mobile select.regent-seat { max-width: 100%; min-width: 0; }
html.is-mobile .market-row > :first-child { white-space: normal; overflow: visible; }
html.is-mobile .realm-header { flex-wrap: wrap; gap: var(--gap) var(--gap-l); }
html.is-mobile .realm-hint { display: none; }
html.is-mobile .realm-close { margin-left: auto; }
html.is-mobile .bridge-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* egyforma osztású gombsorok: a felirat ELLIPSZISSEL vágódik (flex-gombon a text-overflow nem hat,
   ezért itt blokk-gomb, a sor-magasság a vezérlőé) */
html.is-mobile :is(.m-doors, .m-sheet-acts, .m-acts, .m-txd .m-foot, .m-row2) > :is(button, .m-btn) {
    display: block; line-height: calc(var(--ctl-h) - 2 * var(--bw)); text-align: center;
}

/* ═══ (mega-vonat ui #32) a képernyő-fájlokból ide költözött mobil szabályok — a mobil-réteg EGY fájl ═══ */
/* ── forrás: 00-tokens.css ── */
@media (max-width: 768px) { :root { --ctl-h: 26px; --pad-y: 14px; --gap: 12px; --gap-s: 8px; --row-h: 38px; } }   /* (Peter 2026-10-04) zsebben több függőleges levegő: a zsúfolt lap riaszt */
/* ── forrás: 50-chrome.css ── */
@media (max-width: 768px) {
    .year-chip { display: none; }
    .top-bar { top: calc(8px + env(safe-area-inset-top, 0px)); left: 0; transform: none; flex-direction: column; max-height: calc(100dvh - 200px); overflow-y: auto; }
    .top-bar .top-cell + .top-cell { border-left: 0; border-top: var(--bw) solid var(--line); }
    .fab-cluster { left: auto; right: 6px; top: calc(64px + env(safe-area-inset-top, 0px)); bottom: auto; transform: none; flex-direction: column; align-items: flex-end; }
    .event-banner { top: calc(8px + env(safe-area-inset-top, 0px)); left: 78px; right: 64px; transform: none; max-width: none; }
    .event-banner .event-banner-text { white-space: normal; }
    .verify-bar { left: 8px; right: 8px; transform: none; max-width: none; flex-wrap: wrap; }
    .cmd-panel { left: 78px; right: 64px; transform: none; width: auto; max-width: none; top: calc(60px + env(safe-area-inset-top, 0px)); }
    .build-hud { left: 78px; right: 76px; transform: none; width: auto; max-width: none; top: calc(60px + env(safe-area-inset-top, 0px)); }
    .route-builder { top: calc(8px + env(safe-area-inset-top, 0px)); left: 78px; max-width: min(300px, calc(100vw - 150px)); }
    body.dock-narrow .route-builder { left: 16px; }
    .pwa-install-card:not(.hidden) {
        display: block; position: fixed; z-index: var(--z-signal);
        left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        padding: var(--pad-y) var(--pad-x);
    }
}
/* ── forrás: 51-aside-tx.css ── */
@media (max-width: 768px) {
    .narrative-panel { display: none; }
    body.m-panel-open .narrative-panel {
        display: flex; position: fixed; inset: 0; z-index: var(--z-shell-panel); width: auto; max-width: none;
        padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    .panel-collapse { display: none; }
    body.m-panel-open .m-panel-close { display: inline-flex; position: absolute; top: calc(var(--pad-y) + env(safe-area-inset-top, 0px)); right: var(--pad-x); z-index: 5; }
}
/* ── forrás: 52-colony.css ── */
html.is-mobile .m-card .nyulureg-steer:not([open]), html.is-mobile .m-card .nyulureg-steer > summary,
html.is-mobile .m-mind-body .nyulureg-steer > summary, html.is-mobile .m-mind-body > .mind-pane-body > .nyulureg-surface { display: none; }
html.is-mobile .m-card .nyulureg-steer, html.is-mobile .m-mind-body .nyulureg-steer { margin: 0; border: 0; background: transparent; }
html.is-mobile .m-card .nyulureg-steer-body, html.is-mobile .m-mind-body .nyulureg-steer-body { padding: var(--pad-y) 0 0; }
html.is-mobile :is(.m-mount, .detail-modal) .doctrine-row { flex-direction: column; align-items: stretch; gap: var(--gap-s); }
@media (max-width: 768px) {
    .doctrine-row { flex-wrap: wrap; }
    .doctrine-row .fleet-select { flex: 1 1 100%; }
    select.regent-seat { max-width: 100%; min-width: 0; }
}
/* ── forrás: 53-system.css ── */
@media (max-width: 768px) {
    .system-tab-content.schematic-view { overflow-y: auto; }
    .system-canvas { flex: 0 0 40dvh; height: 40dvh; }
    .system-report .report-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .system-report { overflow-x: hidden; }
    .sys-hist-row { grid-template-columns: 52px minmax(0, 1fr); }
    .sys-hist-msg { grid-column: 1 / -1; }
    .planet-content { overflow-y: auto; }
    .planet-canvas { flex: 0 0 42dvh; height: 42dvh; }
    .planet-header { position: sticky; top: 0; }
    .planet-left, .planet-info { position: static; width: auto; max-height: none; margin: var(--gap-l) var(--gap-l) 0; }
    .planet-info { margin-bottom: calc(var(--sec-gap) + env(safe-area-inset-bottom, 0px)); }
    .planet-scan { left: var(--gap-l); right: var(--gap-l); transform: none; white-space: normal; }
    .planetarium-bar { left: var(--gap); right: var(--gap); transform: none; }
    .pl-mag-row, .pl-time-row { flex-wrap: wrap; justify-content: center; max-width: 100%; }
    .pl-mag-row input[type="range"], .pl-time-row input[type="range"] { width: auto; flex: 1 1 120px; min-width: 100px; }
    .planetarium-hud { bottom: auto; top: calc(56px + env(safe-area-inset-top, 0px)); left: var(--gap); max-height: calc(100dvh - 220px); overflow-y: auto; }
}
/* ── forrás: 54-fleet.css ── */
html.is-mobile :is(.m-mount, .detail-modal, .fleet-modal) .fleet-add-row { flex-wrap: wrap; }
html.is-mobile :is(.m-mount, .detail-modal, .fleet-modal) .fleet-add-row > * { flex: 1 1 45%; min-width: 0; }
html.is-mobile :is(.m-mount, .detail-modal, .fleet-modal) .doctrine-row > select { grid-column: 1; }
html.is-mobile .fleet-readout { grid-template-columns: minmax(0, 1fr); }   /* (2026-10-04) zsebben egy oszlop: két oszlopban a sorok egymásra futottak */
/* ── forrás: 56-mind-prg-cfg.css ([mega-vonat 10-03 UI-6]: a Terepkönyv ≤768-as elrendezése; a shell alatt a fenti
      html.is-mobile .fg-* szabályok nyernek) ── */
@media (max-width: 768px) {
    .fg-layout { flex-direction: column; }
    .fg-menu { flex: 0 0 auto; flex-direction: row; overflow-x: auto; overflow-y: hidden; padding: 0; border-right: 0; border-bottom: var(--bw) solid var(--line); }
    .fg-menu-title, .fg-menu-sub { display: none; }
    .fg-menu-item { flex: 0 0 auto; width: auto; border-top: 0; }
}

/* ── (mega-vonat ux B6, Peter 2026-10-03) a kölcsön-lapok: PROGRESS · SETI · TRADE · ATLAS a zsebben ── */
html.is-mobile .m-borrow-body > .aside-pane { display: flex; flex-direction: column; flex: 0 0 auto; overflow: visible; min-height: 0; }
/* [mega-vonat 10-03 UI-19] a sosem nyerő `.aside-pane.hidden { display: flex }` törölve (a 10-base .hidden !important-ja veri; a lapot a JS a .hidden levételével nyitja) */
html.is-mobile .m-borrow-body > .m-read { flex: 0 0 auto; }   /* ◆ a Mind olvasat-sora a zseb-lap tetején: a flex-oszlop ne nyomja össze */
html.is-mobile .m-borrow-body .aside-pane-header { display: none; }   /* a lap feje már mondja a nevet */
/* [mega-vonat 10-03 UI-13 ≡ MB-15] class-ra célzunk, nem id-ra (az elem osztálya .market-body; a specificitás így 0,3,1 — a 55 .market-body 0,1,0 szabálya fölött marad) */
html.is-mobile .m-borrow-body > .market-body { padding: var(--pad-y) var(--gutter-m); }
html.is-mobile .m-borrow-body .pane-tabs, html.is-mobile .m-borrow-body .cmodal-tabs { position: sticky; top: 0; z-index: 2; background: var(--surface-deck); }
/* (Peter 2026-10-04) a mű gombjai zsebben kettesével állnak: öt gomb egy sorban olvashatatlanra zsugorodott (REFUR…, MAI…) */
html.is-mobile .install-actions > button { flex: 1 1 calc(50% - var(--gap)); min-width: 0; }
html.is-mobile .system-report .install-actions { margin-bottom: var(--pad-y); }
