/* NEXLUNE AI v4 — responsive / mobile stylesheet.
   All width-based @media rules (mobile layouts, stacked
   grids, the mobile header/menu, footer accordions).
   Loaded after style.css; order preserved from v2. */
@media(min-width:900px){body{padding-bottom:0}}
@media(max-width:560px){.wrap{width:calc(100% - 32px)}}
@media(min-width:700px){.header-phone{display:inline-flex}}
@media(min-width:1080px){.nav-desktop{display:flex}}
@media(min-width:1080px){.nav-mobile{display:none}}
@media(min-width:1080px){.hero{padding-top:calc(var(--header) + 42px)}}
@media(min-width:900px){.stats-grid{grid-template-columns:repeat(5,1fr)}.stat{border-bottom:0}.stat:nth-child(2n){border-right:1px solid rgba(255,255,255,.09)}.stat:last-child{grid-column:auto;border-right:0}.stat strong{font-size:33px}}
@media(min-width:1080px){.page-hero{padding-top:calc(var(--header) + 48px)}}
@media(min-width:900px){section{padding:88px 0}}
@media(min-width:700px){.services{grid-template-columns:1fr 1fr}}
@media(min-width:1020px){.services{grid-template-columns:1fr 1fr 1fr 1fr}}
@media(min-width:800px){.services-full{grid-template-columns:1fr 1fr}}
@media(min-width:900px){.steps{grid-template-columns:repeat(4,1fr)}}
@media(min-width:900px){.work-grid{grid-template-columns:repeat(3,1fr)}}
@media(min-width:900px){.featured{grid-template-columns:1.1fr 1fr}}
@media(min-width:900px){.featured-body{padding:40px}}
@media(min-width:700px){.adv-grid{grid-template-columns:1fr 1fr}}
@media(min-width:1000px){.adv-grid{grid-template-columns:repeat(3,1fr)}}
@media(min-width:900px){.commit{padding:46px}}
@media(min-width:800px){.commit-grid{grid-template-columns:1fr 1fr}}
@media(min-width:900px){.final{padding:60px;text-align:center}}
@media(min-width:900px){.final .hero-ctas{justify-content:center}}
@media(min-width:900px){.contact-hero-card{padding:52px}}
@media(min-width:640px){.contact-actions{grid-template-columns:1fr 1fr}}
@media(min-width:700px){.info-grid{grid-template-columns:repeat(3,1fr)}}
@media(min-width:900px){footer{padding-bottom:28px}}
@media(min-width:800px){.foot-grid{grid-template-columns:1.4fr 1fr 1fr}}
@media(min-width:900px){.bottom-bar{display:none}}
@media(min-width:900px){.story-grid{grid-template-columns:1.1fr .9fr}}
@media(min-width:800px){.eco{grid-template-columns:repeat(3,1fr)}}
@media(min-width:900px){.testi{grid-template-columns:repeat(3,1fr)}}
@media(min-width:1080px){.login-wrap{padding-top:calc(var(--header) + 50px)}}
@media(min-width:700px){.tools-grid{grid-template-columns:1fr 1fr}}
@media(min-width:1020px){.tools-grid{grid-template-columns:repeat(4,1fr)}}
/* v35.3: overflow-x:clip on the sticky panel — it must never scroll
   sideways (see the .controls grid fix in style.css); clip keeps the
   vertical scroll + sticky behaviour intact. */
@media(min-width:920px){.tool-layout{grid-template-columns:340px 1fr}.tool-layout .stage{position:sticky;top:calc(var(--header) + 16px)}.tool-layout .controls{position:sticky;top:calc(var(--header) + 16px);max-height:calc(100vh - var(--header) - 32px);overflow-x:clip;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--lime) transparent}}
@media(min-width:900px){.toast{bottom:30px}}
@media(min-width:900px){#page-team section{padding-bottom:80px}}
@media(min-width:800px){.prem-hero{padding:38px}}
@media(min-width:800px){.tool-shell{padding:28px}}
@media(max-width:560px){.tool-layout{grid-template-columns:1fr}.stage{min-height:200px}.controls{padding:14px}}
@media(min-width:1020px){.ds-layout{grid-template-columns:300px 1fr 280px}}
@media(min-width:760px){.time-cards{grid-template-columns:1fr 1fr}}
@media(min-width:760px){.cmp-grid{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.featured-tool .ft-go{margin-left:0;width:100%;text-align:center}.ds-stage{padding:12px 6px}}
@media(max-width:1299px){.header-phone{display:none!important}}
@media(min-width:1080px){.mmenu{display:none}}
@media(max-width:1079px){
.hdr-actions .hdr-btn{display:none}
.hdr-wa{display:inline-flex}
.burger{display:flex}
header.scrolled .header-top{height:56px}
}
@media(max-width:400px){.header-top{gap:8px}.logo{font-size:14px;gap:8px}.logo-mark{width:34px;height:34px;font-size:18px}.hdr-wa{padding:0 12px;font-size:13px}}
@media(max-width:359px){.hdr-wa .wa-txt{display:none}.hdr-wa{width:44px;padding:0;justify-content:center}}
@media(min-width:900px){.kpi-grid{grid-template-columns:repeat(4,1fr)}}
@media(min-width:920px){.cc-grid{grid-template-columns:1.4fr 1fr}}
@media(min-width:800px){.qa-grid{grid-template-columns:repeat(4,1fr)}}
@media(min-width:1000px){.kb-board{grid-template-columns:repeat(4,1fr)}}
@media(max-width:560px){.calpro-day{min-height:58px;padding:4px}.post-chip{font-size:9px}}
@media(min-width:900px){.floats{bottom:22px}}
@media(min-width:900px){.chat-panel{bottom:92px}}
@media(max-width:700px){.hero-in::before{width:52px;height:52px;top:-34px;right:6%;opacity:.6}}
/* ===== v2 LONG-PAGES PREMIUM UPGRADE ===== */
/* --- adaptive utilities: genuinely different PC vs mobile --- */
@media(max-width:1079px){.only-desktop{display:none!important}}
@media(min-width:1080px){.only-mobile{display:none!important}}
@media(min-width:1080px){header.scrolled .header-top{height:60px}}
/* --- hero v2: side-by-side desktop, orb-above mobile --- */
@media(min-width:1080px){.hero-in{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,.88fr);gap:36px;align-items:center}}
@media(min-width:700px){.cap-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:1020px){.cap-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(min-width:900px){.tools-band{padding:48px}}
@media(min-width:900px){.case-detail{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(min-width:800px){.belief-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(min-width:800px){.next-steps{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(min-width:800px){.quick-svc{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(min-width:900px){.site-footer{padding-bottom:0}}
@media(min-width:1080px){.foot-main{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,2.4fr);gap:48px}.foot-cols{grid-template-columns:repeat(4,minmax(0,1fr));margin-top:0}}

/* ===== v4 additions ===== */
@media(min-width:900px){.hs-slides{min-height:620px}}
@media(max-width:700px){.dash-sticky{top:calc(var(--header) + var(--sat,0px));padding:10px 2px}.filter-chips{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px;scrollbar-width:none}.filter-chips::-webkit-scrollbar{display:none}.fchip{flex:none}}
@media(min-width:1020px){.recent-row .tools-grid{grid-template-columns:repeat(3,1fr)}}

/* ===== v8 additions: new tools on small screens ===== */
@media(max-width:560px){.swatch-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.bg-compare{min-height:180px}.dropzone{padding:20px 12px}.nx-empty{padding:26px 14px}.pdf-row{flex-direction:column;align-items:flex-start}.pdf-btns{width:100%}}
@media(min-width:1020px){.swatch-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* ===== v9 additions: public Studio ===== */
@media(min-width:700px){.show-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:1020px){.show-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.fav-row .tools-grid,.popular-row .tools-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:560px){.ss-kbd{display:none}.acc-panel{padding:18px 16px}.acc-row{flex-direction:column;align-items:flex-start;gap:6px}.acc-select{width:100%}}

/* ===== v10 additions: BG Remover end level ===== */
@media(max-width:560px){.bg-stage-tools{flex-direction:column;align-items:stretch}.bg-seg{justify-content:center}.bg-zoom{justify-content:center}.bg-side{flex-direction:column}.bg-queue{max-height:200px}.bg-zoom-wrap{max-height:60vh}#tool-bgremove #bgCanvas{max-height:min(520px,56vh)}#tool-bgremove .bg-compare>img{max-height:min(520px,56vh)}}

/* ===== v12 additions: BG Remover remove.bg-style UI ===== */
@media(max-width:920px){.bg12-body{grid-template-columns:1fr}.bg12-panel{position:static;max-height:none}.bg12-toolbar{border-radius:1rem;justify-content:center}.bg12-tabs{overflow-x:auto;flex-wrap:nowrap;max-width:100%;scrollbar-width:none}.bg12-tabs::-webkit-scrollbar{display:none}.bg12-tab{flex:none}}
@media(max-width:560px){.bg12-hero{padding:36px 16px 30px}.bg12-editor{padding:10px}.bg12-dlmenu{width:260px}.bg12-modelbar{flex-direction:column;align-items:stretch}.bg12-modelbar select{width:100%}.bg12-urlrow{flex-direction:column}.bg12-urlrow .mini-btn{width:100%}}

/* ===== v13 additions: BG Remover pixel-match + premium footer ===== */
@media(max-width:560px){.foot-cta-in{padding:24px 18px}}

/* ===== v24.1 additions: Video Editor premium + drag-and-drop ===== */
@media(max-width:900px){
#page-team .ve-rail{flex-wrap:nowrap;overflow-x:auto;justify-content:flex-start;padding-bottom:6px;scrollbar-width:none}
#page-team .ve-rail::-webkit-scrollbar{display:none}
#page-team .ve-rail-btn{flex:none;min-width:64px}
#page-team .ve-tray-item{flex-basis:112px}
#page-team .ve-layout .tl-track{height:48px}
#page-team .ve-empty{padding:32px 16px}
}
@media(max-width:420px){
#page-team .ve-layout .stage{padding:10px}
#page-team .ve-meta{font-size:11.5px}
#page-team .ve-tray-item{flex-basis:104px}
#page-team .tl-film{height:36px}
#page-team .ve-empty h3{font-size:17px}
}
/* v24.1: Image Editor overlays + enhance on small screens — overlay
   buttons wrap into ≥44px touch targets, enhance button full-width. */
@media(max-width:560px){
#page-team #tool-image .img-ov-btns .mini-btn{flex:1 1 30%;min-height:44px;justify-content:center}
#page-team #tool-image .img-auto-box .btn-lime{width:100%;justify-content:center}
#page-team #tool-image .img-ov-bar{padding:10px}
}

/* ===== v25 additions: Canva-like Studio on small screens ===== */
/* The sidebar becomes a sticky tab bar under the header (brand +
   foot hidden, nav scrolls horizontally); the hero, search,
   spotlight and rows tighten for phones. Tool-view sticky panels
   clear the tab bar (their v4 top offset assumed no tab bar). */
@media(max-width:1079px){
#page-team .canva-side{position:sticky;top:calc(var(--header) + var(--sat,0px));z-index:70;margin-top:calc(var(--header) + var(--sat,0px) + 8px);border-right:0;border-bottom:1px solid var(--line);padding:8px 10px}
#page-team .canva-side-brand,#page-team .canva-side-foot{display:none}
#page-team .canva-nav{display:flex;overflow-x:auto;gap:6px;padding-bottom:2px;scrollbar-width:none}
#page-team .canva-nav::-webkit-scrollbar{display:none}
#page-team .canva-nav-btn{flex:none;width:auto;white-space:nowrap;padding:9px 13px}
#page-team:not(.admin-shell) .page-hero{padding-top:14px}
#page-team:not(.admin-shell) .tool-layout .stage,#page-team:not(.admin-shell) .tool-layout .controls{top:calc(var(--header) + var(--sat,0px) + 68px)}
}
@media(max-width:640px){
#page-team .canva-hero h2{font-size:24px}
#page-team .studio-search input{min-height:48px;font-size:15px}
#page-team #canvaSpot .featured-tool{padding:18px}
#page-team #recentGrid .tool-card,#page-team #favGrid .tool-card,#page-team #popularGrid .tool-card,#page-team #adminMktTrend .tool-card{flex-basis:200px}
#page-team .tool-card{padding:18px}
}

/* ===== v26 additions: Video Editor premium layout goes mobile =====
   ≤900px: the icon rail becomes a sticky bottom tab bar, the left
   panels and the right properties panel become bottom sheets, the
   timeline stays full-width and usable at 360px. Touch targets
   stay ≥44px. */
@media(max-width:900px){
#page-team #tool-video .tool-shell{padding:8px;gap:10px}
#page-team #tool-video .ve-topbar{gap:8px}
#page-team #tool-video .ve-projname{font-size:14px}
#page-team #tool-video .ve-export-pill{padding:10px 16px;font-size:13.5px}
#page-team #tool-video .ve-body{flex-direction:column}
#page-team #tool-video .ve-canvas{order:1;min-height:0}
#page-team #tool-video .ve-navrail{order:2;flex-direction:row;width:auto;position:sticky;bottom:0;z-index:20;overflow-x:auto;padding:6px;scrollbar-width:none}
#page-team #tool-video .ve-navrail .ve-rail-btn{flex:1 0 56px;min-height:48px;font-size:10px;padding:7px 2px}
#page-team #tool-video .ve-navrail .ve-rail-btn .ic{width:20px;height:20px}
#page-team #tool-video .ve-panels{order:3;width:auto;max-height:none;background:transparent;border:0;padding:0;overflow:visible;backdrop-filter:none;-webkit-backdrop-filter:none}
/* v28-final: the v28 glass rule (style.css) puts backdrop-filter on
   .ve-panels — but a filter on an ancestor makes it the containing
   block for fixed descendants, so the panel SHEET anchored to the
   in-flow wrapper and floated mid-page over the canvas instead of
   docking at the viewport bottom. The wrapper is invisible on
   mobile anyway, so its blur costs nothing to drop — the sheet
   keeps its own glass (v28 rule below) and docks correctly. */
#page-team #tool-video .ve-panel.active{position:fixed;left:0;right:0;bottom:0;max-height:72vh;overflow-y:auto;z-index:30;background:var(--surface2);border:1px solid var(--line);border-bottom:0;border-radius:20px 20px 0 0;padding:16px;box-shadow:0 -12px 40px rgba(0,0,0,.4)}
#page-team #tool-video .ve-props{position:fixed;left:0;right:0;bottom:0;top:auto;width:auto;max-height:72vh;z-index:30;border-radius:20px 20px 0 0;border-bottom:0;box-shadow:0 -12px 40px rgba(0,0,0,.4)}
#page-team #tool-video .ve-timeline{padding:10px}
#page-team #tool-video .ve-tl-toolbar{gap:8px}
#page-team #tool-video .ve-tl-zoom{flex:1 1 140px}
#page-team #tool-video .ve-tl-zoom input{flex:1;min-width:0;width:auto}
#page-team #tool-video .ve-tl-label{width:44px;font-size:10px}
#page-team #tool-video .ve-tl-textpill{min-height:44px}
#page-team #tool-video .ve-tl-audiobar{min-height:44px}
#page-team #tool-video .ve-empty-plus{width:64px;height:64px}
}
@media(max-width:560px){
#page-team #tool-video .ve-aspect-ind{display:none}
#page-team #tool-video .ve-props-toggle{display:none}
#page-team #tool-video .ve-topbar{flex-wrap:nowrap}
#page-team #tool-video .ve-topbar .ve-back-text{display:none}
#page-team #tool-video .ve-tl-time{font-size:12px}
#page-team #tool-video .ve-aratio-card{min-width:56px;padding:8px 8px 6px}
}

/* ===== v27 additions: full-screen tool workspace, all widths =====
   Desktop: the two-column tool layout widens (380px controls) on
   the full-screen workspace. v27.1: the top bar is no longer
   sticky, so the sticky controls/stage clear only the fixed site
   header (+16px breathing room, not the old +72px bar allowance).
   v27.2: the site header is HIDDEN while a tool is open (style.css
   rule), so the --header term drops from the sticky offsets and
   the panels clear only the safe-area inset + 16px. Mobile: the
   full-bleed shell tightens its padding and the top bar compacts
   (icon-only back). The Studio tab bar hides while a tool is open
   (style.css rule), so nothing overlaps the workspace. */
@media(min-width:920px){
body.tool-open #page-team .tool-layout{grid-template-columns:minmax(0,380px) minmax(0,1fr)}
}
@media(min-width:1080px){
body.tool-open #page-team .tool-layout .stage,body.tool-open #page-team .tool-layout .controls{top:calc(var(--sat,0px) + 16px)}
body.tool-open #page-team .tool-layout .controls{max-height:calc(100vh - var(--sat,0px) - 32px)}
}
/* v27.1: 920–1079px the v25 rule offsets the sticky panels by +68px
   to clear the Studio tab bar — but the tab bar is hidden while a
   tool is open, so the panels over-offset; +16px matches ≥1080px.
   v27.2: the site header is hidden too, so the --header term drops
   here as well. */
@media(min-width:920px) and (max-width:1079px){
body.tool-open #page-team .tool-layout .stage,body.tool-open #page-team .tool-layout .controls{top:calc(var(--sat,0px) + 16px)}
}
@media(max-width:640px){
body.tool-open #page-team .tool-view.active .tool-shell{padding:0 16px 36px}
#page-team .tool-topbar .ttb-back span{display:none}
#page-team .tool-topbar .ttb-back{padding:8px 10px}
#page-team .tool-topbar .ttb-name{font-size:15px}
/* v27.1 visual QA: the absolutely-positioned "LIVE PREVIEW" badge
   (.stage::before) overlaps the centred meta pill on narrow video
   canvases — hide it ≤640px (decorative; the meta pill carries the
   state). Scoped to #tool-video only. */
#page-team #tool-video .stage::before{display:none}
}

/* ===== v28 additions: Video Editor advanced look goes mobile =====
   The bottom tab bar becomes a floating glass dock (lifted 8px off
   the viewport edge, blurred, deep shadow); the panel + properties
   bottom sheets become dark glass with a drag-handle pill
   (::before, absolute — out of the grid flow — sitting in the
   16px top padding, clear of the first content row). The top bar
   tightens (6px gaps, slimmer Export padding) to fit the new
   theme toggle at 390px; the favourite star hides ≤560px (the
   Studio card star stays — the project title needs the room:
   without this the title truncates to "U."); Export shrinks a
   touch ≤390px; the toggle hides only ≤360px (very small
   phones — the title needs the room there). */
@media(max-width:900px){
#page-team #tool-video .ve-navrail{bottom:8px;margin:0 4px;border-radius:20px;background:linear-gradient(180deg,rgba(22,27,41,.94),rgba(13,17,28,.94));box-shadow:0 16px 40px rgba(0,0,0,.5),inset 0 1px 0 rgba(255,255,255,.09)}
#page-team #tool-video .ve-panel.active{background:linear-gradient(180deg,rgba(24,29,45,.97),rgba(13,17,28,.97));backdrop-filter:blur(20px) saturate(1.4);-webkit-backdrop-filter:blur(20px) saturate(1.4);border-color:rgba(255,255,255,.12);box-shadow:0 -16px 48px rgba(0,0,0,.55)}
#page-team #tool-video .ve-panel.active::before{content:"";position:absolute;top:8px;left:50%;transform:translateX(-50%);width:36px;height:4px;border-radius:99px;background:rgba(255,255,255,.28)}
#page-team #tool-video .ve-props{background:linear-gradient(180deg,rgba(24,29,45,.97),rgba(13,17,28,.97));backdrop-filter:blur(20px) saturate(1.4);-webkit-backdrop-filter:blur(20px) saturate(1.4);border-color:rgba(255,255,255,.12);box-shadow:0 -16px 48px rgba(0,0,0,.55)}
#page-team #tool-video .ve-props::before{content:"";position:absolute;top:8px;left:50%;transform:translateX(-50%);width:36px;height:4px;border-radius:99px;background:rgba(255,255,255,.28)}
}
@media(max-width:560px){
#page-team #tool-video .ve-topbar{gap:6px;padding:6px 8px}
#page-team #tool-video .ve-export-pill{padding:10px 12px}
#page-team #tool-video .nx-theme-btn{width:34px;height:34px}
#page-team #tool-video .ve-topbar .fav-btn{display:none}
}
@media(max-width:390px){
#page-team #tool-video .ve-export-pill{font-size:12px;padding:9px 10px}
}
@media(max-width:360px){
#page-team #tool-video .nx-theme-btn{display:none}
}

/* ===== v28-final: mobile sheets start closed + close button =====
   The Media panel is active in the markup (desktop needs it), so on
   a phone the fixed sheet opened by default and covered the canvas's
   aspect cards. tools.js now starts with no panel open on mobile;
   the sheet below only appears when the user taps a tab — and it
   carries an explicit close button (44px glass circle, top-right,
   mirroring .ve-props-close). The panel heading gets right padding
   so its text never runs under the button. */
@media(max-width:900px){
#page-team #tool-video .ve-panel.active .ve-sheet-close{display:grid;place-items:center;position:absolute;top:8px;right:8px;width:44px;height:44px;border-radius:50%;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.06);color:#F2F4FA;font-size:22px;line-height:1;cursor:pointer;z-index:2;transition:border-color .2s ease,background .2s ease,transform .2s ease}
#page-team #tool-video .ve-panel.active .ve-sheet-close:hover{border-color:rgba(139,124,255,.55);background:rgba(139,124,255,.14);transform:rotate(90deg)}
#page-team #tool-video .ve-panel.active>h3{padding-right:48px}
}

/* ===== v29 additions: premium look for all tools goes mobile =====
   The v29 desktop rule gives the tool-open shell 12px top padding
   so the floating glass top bar has dark ground above it — but the
   v27 <=640px rule sets the full padding shorthand (0 16px 36px),
   which would reset padding-top to 0 on phones. Re-assert 12px
   here (same specificity, later wins). The shared bar also
   tightens at <=560px (8px gaps, slimmer padding — the video bar's
   treatment) so long tool names keep more room before truncating. */
@media(max-width:640px){
body.tool-open #page-team .tool-view.active .tool-shell{padding:12px 16px 36px}
}
@media(max-width:560px){
#page-team .tool-topbar{gap:8px;padding:6px 8px}
}

/* v29 — preloader pill: on phones it sits just above the fixed
   bottom bar (~76px), covering lower-priority content — NOT at
   168px, which put it over mid-screen primary actions (e.g. the BG
   Upload button). A brief overlap with the transient toast is OK:
   the toast (z-99) sits above the pill (z-98). */
@media(max-width:899px){.nx-preload{bottom:88px}}

/* ================= v30 — TWO STUDIOS (responsive) ================= */
@media(max-width:1100px){
  .ms-cats{grid-template-columns:repeat(2,1fr)}
  .ts-groups{grid-template-columns:repeat(2,1fr)}
  .ts-home-grid{grid-template-columns:1fr}
  .ts-rail{position:static}
  .ms-workspace{grid-template-columns:240px minmax(0,1fr)}
  .ms-ws-right{grid-column:1/-1;position:static}
  .ms-workspace.tool-open{grid-template-columns:minmax(0,1fr)}
  .ms-grid{grid-template-columns:repeat(2,1fr)}
  .ts-strip{grid-template-columns:repeat(2,1fr)}
  .studio-pick{grid-template-columns:1fr}
}
@media(max-width:899px){
  /* sidebars become drawers; burger + bottom nav appear */
  .ms-side,.ts-side{position:fixed;left:0;top:0;bottom:0;height:100dvh;transform:translateX(-105%);transition:transform .25s ease;box-shadow:0 0 0 rgba(0,0,0,0);z-index:80}
  .ms-side.open,.ts-side.open{transform:translateX(0);box-shadow:24px 0 60px rgba(0,0,0,.4)}
  .ms-burger,.ts-burger{display:grid}
  .ms-main,.ts-main{padding:12px 16px 110px}
  #page-team .canva-main{padding-bottom:110px}
  .ms-bottomnav,.ts-bottomnav,.st-bottomnav,.site-bottomnav{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:70;background:color-mix(in srgb,var(--surface) 84%,transparent);backdrop-filter:blur(18px) saturate(1.4);-webkit-backdrop-filter:blur(18px) saturate(1.4);border-top:1px solid rgba(255,255,255,.08);box-shadow:0 -10px 28px rgba(0,0,0,.18);padding:6px 4px calc(6px + env(safe-area-inset-bottom,0px))}
  .ms-bn-btn,.ts-bn-btn,.st-bn-btn,.site-bn-btn{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;border:none;background:none;color:var(--muted);font-size:10.5px;font-weight:700;padding:6px 2px;cursor:pointer}
  .ms-bn-btn .ic,.ts-bn-btn .ic,.st-bn-btn .ic,.site-bn-btn .ic{width:21px;height:21px}
  .ms-bn-btn.active,.ts-bn-btn.active,.st-bn-btn.active,.site-bn-btn.active{color:var(--lime-d)}
  .ms-bn-btn.active .ic,.ts-bn-btn.active .ic,.st-bn-btn.active .ic,.site-bn-btn.active .ic{background:var(--lime-soft);border-radius:10px;padding:5px}
  /* v31: the site bottom menu replaces the Call/WhatsApp bar on
     phones (they cannot both sit fixed at the bottom) — Call /
     WhatsApp stay in the footer and on the Contact page. Body
     padding covers the menu + the iPhone home-indicator safe area
     so the footer never slides under it. */
  .bottom-bar{display:none}
  body{padding-bottom:calc(100px + env(safe-area-inset-bottom,0px))}
  /* top bars: premium button hides (sidebar card keeps it); Create New becomes "+" */
  .ms-premium-btn{display:none}
  .ts-create{font-size:0;padding:11px 14px}
  .ts-create::after{content:"+";font-size:20px;line-height:1}
  .ts-search kbd{display:none}
  .ts-create-pop{right:0}
  /* heroes: fewer floating icons, tighter padding */
  .ms-hero,.ts-hero{padding:24px 20px;min-height:170px;border-radius:22px;box-shadow:0 18px 40px rgba(91,75,219,.28)}
  .ms-float.f4,.ms-float.f5,.ts-float.f4,.ts-float.f5{display:none}
  .ms-float.f1{width:48px;height:48px;right:8%;top:12%}
  .ms-float.f2{width:44px;height:44px;right:24%;bottom:8%}
  .ms-float.f3{width:40px;height:40px;right:4%;bottom:16%}
  .ts-float.f1{width:48px;height:48px;right:8%;top:12%}
  .ts-float.f2{width:44px;height:44px;right:24%;bottom:8%}
  .ts-float.f3{width:40px;height:40px;right:4%;bottom:16%}
  /* categories + groups stack; tiles stay 4-across (they are small) */
  .ms-cats{grid-template-columns:1fr}
  .ts-groups{grid-template-columns:1fr}
  .ts-tiles{grid-template-columns:repeat(4,1fr)}
  .ts-groups.focused .ts-group.focus .ts-tiles{grid-template-columns:repeat(4,1fr)}
  .ts-builders .ts-tiles{grid-template-columns:repeat(4,1fr)}
  /* workspace: panels stack ABOVE/BELOW the canvas — never covering it
     on first open (the v28 sheet lesson). Left panel static, right below. */
  .ms-workspace{grid-template-columns:minmax(0,1fr)}
  .ms-ws-left{position:static}
  .ms-workspace.tool-open{grid-template-columns:minmax(0,1fr)}
  .ms-canvas-host,.ts-canvas-host{min-height:480px}
  .ms-sw-label{display:none}
  .ms-sw-btn{padding:8px 10px}
  .ms-canvas-home span{display:none}
  .ms-transport{flex-wrap:wrap}
  .ms-tp-name{max-width:110px}
  /* grids collapse */
  .ms-grid{grid-template-columns:1fr}
  .ms-tpl-grid.big{grid-template-columns:repeat(2,1fr)}
  .ms-lib-grid{grid-template-columns:1fr}
  .ms-set-grid,.ts-set-grid{grid-template-columns:1fr}
  .ts-stat-grid{grid-template-columns:1fr}
  .ts-strip{grid-template-columns:repeat(2,1fr)}
  .ts-tool-select{max-width:none}
  /* library rows: tighter on phones */
  .ms-lib-item{gap:6px;grid-template-columns:24px 40px minmax(0,1fr) auto auto auto}
  .ms-lib-item img,.ms-lib-ic{width:40px;height:40px}
  .ms-lib-tool{max-width:96px;font-size:11px;padding:6px 4px}
  .ms-lib-del{width:24px;height:24px}
  /* studio entry cards stack their CTA under the text */
  .studio-card{flex-wrap:wrap}
  .studio-card .sc-go{align-self:flex-start}
  .studio-banner{flex-direction:column;align-items:flex-start}
  /* v30.4: premium mobile — soft card depth (Canva-like) */
  .ms-cat,.ts-group{box-shadow:0 10px 26px rgba(20,24,60,.07)}
}
@media(max-width:560px){
  /* v30.4: search gets its own full-width row so the placeholder is never cut */
  .ms-topbar,.ts-topbar{flex-wrap:wrap}
  .ms-search,.ts-search{order:5;flex-basis:100%}
  /* v30.4: studio entry cards stack — the CTA never squeezes the label */
  .studio-card{flex-direction:column;gap:12px}
  .studio-card .sc-go{align-self:stretch;text-align:center}
}

/* ===== v31 additions: NEW premium mobile look (normal pages) =====
   Mobile-first polish for home, services, work, about, faq, contact
   and login at phone sizes — tighter bolder display type, full-width
   thumb CTAs, deeper card depth with a top highlight, consistent
   20px gutters. Selectors the Studio page shares are guarded with
   body:not(:has(#page-team)) — the Studio keeps its own v30.4 mobile
   design; site-only classes need no guard. The svc-cta colour
   switches to var(--lime): on the --surface2 button it reads 5.29:1
   dark / 4.39:1 light, vs 2.86:1 for --lime-d in dark. */
@media(max-width:899px){
  /* hero type: bigger, tighter, bolder (gradient em words unchanged) */
  body:not(:has(#page-team)) .page-hero{padding-bottom:30px}
  body:not(:has(#page-team)) .page-hero h1{font-size:42px;line-height:1.03;letter-spacing:-.025em}
  body:not(:has(#page-team)) .page-hero p{font-size:16.5px;line-height:1.65}
  #page-home .hero-slider .hs-card{padding:28px 22px 26px;border-radius:24px}
  #page-home .hero-slider .hs-card h1,#page-home .hero-slider .hs-card h2{font-size:38px;line-height:1.04;letter-spacing:-.025em}
  /* CTAs: full-width stacked, 56px thumbs — right inset 64px so the
     buttons never run under the floating chat/WhatsApp buttons
     (v31.1: the v31 full-width CTAs overlapped the floats' lane) */
  body:not(:has(#page-team)) .hero-ctas{flex-direction:column;gap:12px;margin:24px 0 18px;padding-right:64px}
  body:not(:has(#page-team)) .hero-ctas .btn{width:100%;min-height:56px;font-size:16px;border-radius:18px}
  /* section rhythm + heads */
  body:not(:has(#page-team)) section{padding:54px 0}
  body:not(:has(#page-team)) .sec-head{margin-bottom:24px}
  body:not(:has(#page-team)) .sec-head h2{font-size:33px;line-height:1.1;letter-spacing:-.025em}
  /* card depth: theme-aware shadow + top highlight */
  .svc,.svc-full,.work,.cap,.adv,.belief,.case-card,.info-card,.next-step,.step{box-shadow:var(--shadow),inset 0 1px 0 rgba(255,255,255,.06)}
  /* services: the detail CTA becomes a real button, not a text link */
  .svc-cta{display:flex;align-items:center;justify-content:center;width:100%;min-height:50px;margin-top:18px;border:1px solid var(--line);border-radius:14px;font-size:15px;background:var(--surface2);color:var(--lime)}
  /* work stats: bigger numbers */
  body:not(:has(#page-team)) .stat strong{font-size:34px}
  /* FAQ: rounder cards, violet open state */
  .faq-list details{border-radius:18px;box-shadow:var(--shadow)}
  .faq-list details[open]{border-color:color-mix(in srgb,var(--lime) 45%,transparent)}
  /* contact: roomier card, bigger focal number */
  .contact-hero-card{padding:32px 22px;border-radius:24px}
  .big-num{font-size:38px}
  /* login: 16px inputs (no iOS focus zoom), 54px fields, full-width submit */
  .login-card{padding:30px 22px}
  .login-card .field input{min-height:54px;font-size:16px;border-radius:14px}
  .login-card .btn{width:100%;min-height:56px;font-size:16px;border-radius:18px}
  /* final CTA: tighter padding, buttons stack full-width via .hero-ctas */
  body:not(:has(#page-team)) .final{padding:34px 22px}
}

/* ===== v34.1 additions: AURORA STUDIO goes mobile (D1) =====
   - Bottom menus (site + Media/Tools/Studio) become floating glass
     docks: lifted 10px off the bottom edge, rounded, aurora ring.
     Body padding (100px + safe-area) still covers them; the floats
     (104px) and toast (110px) sit above the dock's top edge (~74px).
     Active tab: #A78BFA dark / #4A3BC2 light (the old var(--lime-d)
     was 3.9:1 in dark theme; both new values clear AA on the dock).
   - The Studio tab bar becomes glass (blur over the page).
   - The logo mark shrinks to 48x31px at <=400px so the lockup +
     WhatsApp + burger still fit a 360px header. */
@media(max-width:899px){
  .ms-bottomnav,.ts-bottomnav,.st-bottomnav,.site-bottomnav{left:12px;right:12px;bottom:calc(10px + env(safe-area-inset-bottom,0px));border-radius:22px;border:1px solid var(--line);background:color-mix(in srgb,var(--surface) 88%,transparent);box-shadow:0 18px 44px rgba(0,0,0,.28),0 0 0 1px rgba(139,124,255,.10);padding:6px 4px}
  .ms-bn-btn.active,.ts-bn-btn.active,.st-bn-btn.active,.site-bn-btn.active{color:#A78BFA}
  .ms-bn-btn.active .ic,.ts-bn-btn.active .ic,.st-bn-btn.active .ic,.site-bn-btn.active .ic{background:rgba(139,124,255,.16)}
}
html[data-theme="light"] .ms-bn-btn.active,html[data-theme="light"] .ts-bn-btn.active,html[data-theme="light"] .st-bn-btn.active,html[data-theme="light"] .site-bn-btn.active{color:#4A3BC2}
@media(prefers-color-scheme:light){html:not([data-theme="dark"]) .ms-bn-btn.active,html:not([data-theme="dark"]) .ts-bn-btn.active,html:not([data-theme="dark"]) .st-bn-btn.active,html:not([data-theme="dark"]) .site-bn-btn.active{color:#4A3BC2}}
@media(max-width:1079px){
  #page-team .canva-side{background:color-mix(in srgb,var(--surface) 88%,transparent);backdrop-filter:blur(16px) saturate(1.4);-webkit-backdrop-filter:blur(16px) saturate(1.4)}
}
@media(max-width:400px){
  .logo-mark{width:48px;height:31px;border-radius:9px}
  .logo-word{font-size:16px}
}
