/* Headers stand at the top — whole app (Claude Code 2026-11-17).
   Owner: "first all header whole app need to stand on the top up, not have any gap space too much."
   Measured on the owner's phone size (343 × 781): the page added 8 px, then the LexiGlobal bar 6 px inside + 12.6 px under it, then
   each screen 4 px more, and some screens their own 8–14 px — so a screen's header began anywhere from 20 to 30 px down (Live Meeting
   30, Voice 30, Recorder 28, My Space 23, Translator 22, Settings 20) and content under the logo bar at 76 px.
   One rule now: every screen's header starts 6 px from the top of the screen (+ the phone's notch area when there is one), and the
   content under the LexiGlobal bar starts 8 px below it. Loaded last. */
/* 2026-11-17 (owner: "Yes, fix the logo" — tablet Telegram full screen): the top space counted only the phone's notch, so inside
   Telegram the left menu's logo sat under the clock and Telegram's Close button, and the Khmer button under Telegram's ⌄ ⋮. In
   Telegram the top space is now Telegram's own (--tg-top, styles/base.css: status bar + Telegram's control row in full screen). */
:root { --top-safe: env(safe-area-inset-top, 0px); }
html.tg { --top-safe: max(env(safe-area-inset-top, 0px), var(--tg-top, 0px)); }
/* Home and the Recorder also put Telegram's top space on .app (settings-lux.css, recorder.css, older rules): with the page carrying
   it above, it was counted twice (iPhone Home: logo 216 px down instead of 111, word of the day pushed off the screen). The page
   alone carries it now, on every screen, phone and tablet alike. */
html.tg body:is([data-route="home"], [data-route="recorder"]) .app.app.app { padding-top: 0 !important; }
html body, html body[data-route][data-route] { padding-top: calc(var(--top-safe) + 6px) !important; }
html body #brandHeader#brandHeader#brandHeader.brand-header { padding-top: 0 !important; margin-top: 0 !important; margin-bottom: 8px !important; }
html body #main > .view, html body #main > [id^="v-"], html body .app > .view { padding-top: 0 !important; margin-top: 0 !important; }

/* screens with their own header (no LexiGlobal bar above them) */
html body #v-meet #mtWrap:has(> .mt-lobby.mlx), html body #v-meet #mtWrap:has(.mt-lobby.mlx) { padding-top: 0 !important; }
html body #v-meet .mt-lobby.mlx .mt-head, html body #v-meet .mt-lobby.mlx > header:first-child { padding-top: 0 !important; margin-top: 0 !important; }
html body #v-settings#v-settings#v-settings > .settings-head, html body #v-voice#v-voice#v-voice > .settings-head { margin-top: 0 !important; }
html body #v-myspace .ms-screen { padding-top: 0 !important; }
html body #v-recorder .rc-wrap { padding-top: 0 !important; }
html body #v-translator .vt-container { padding-top: 0 !important; }
html body .app.app { padding-top: 0 !important; }
/* computers / wide tablets: the left menu's LexiGlobal logo sat 26 px down (22 + 4); it now starts on the same 6 px line as the
   screen headers next to it */
html body #deskRail#deskRail#deskRail.desk-rail { padding-top: calc(var(--top-safe) + 6px) !important; }
html body #deskRail#deskRail#deskRail .dr-brand { padding-top: 0 !important; margin-top: 0 !important; }

/* 2026-11-17 phone (draws under the status bar, 33 px): inside a meeting the page drops its top space and the meeting bar was pinned
   at 0 — its title and ID sat under the clock and battery icons. The bar now starts 6 px below the status bar and stays there when
   the page scrolls. */
html body #v-meet #mtWrap:has(.mt-head-live) { padding-top: calc(var(--top-safe) + 6px) !important; }
/* meeting chat: the "Host" label broke into "Hos" / "t" next to a long name on a 343 px phone */
html body .mt-mhost { white-space: nowrap !important; flex: none !important; }

/* 2026-11-17: the keyboard-only "Skip to content" link hid itself 80 px above its box; with Telegram's top space added (above) the box
   starts lower, so the link showed at the top of the screen. It now stays far out of view until it gets keyboard focus. */
html body .skip:not(:focus) { top: -9999px !important; }

/* 2026-11-17 (owner: "homepage ui member subscribe and 65 language not alignment"): on tablets / computers Home's Upgrade and
   language pills are pinned at top 30 px (desktop.css, made for the 30 px top padding this file removed) — they sat 33 px below
   the search bar. They share the search bar's line again. */
html body[data-route="home"] #brandHeader#brandHeader { top: 0 !important; }

/* 2026-11-17 (tablet, Telegram full screen, meeting Board view): the meeting's "lx" layouts reset the top padding to max(8px, notch)
   (meet-layout.css, 4 × #v-meet) — in Telegram the meeting bar then sat under Telegram's Close and ⌄ ⋮. Telegram's top space wins. */
html.tg body #v-meet#v-meet#v-meet#v-meet#v-meet .mt-wrap.lx:has(.mt-head-live) { padding-top: calc(var(--top-safe) + 6px) !important; }
