/* Sky Guard V7.1 — mobile enhancement layer. Loaded last to preserve V7 visual identity. */
:root { -webkit-text-size-adjust:100%; text-size-adjust:100%; }
*, *::before, *::after { box-sizing:border-box; }
html { scroll-padding-top:95px; }
body { min-width:0; }
img, video, canvas, svg { max-width:100%; }
input, textarea, select, button { max-width:100%; }
.workspace, .v7-main, .v7-panel, .v7-section, .support-card,
.service-capsule, .os-panel, .market-grid > *, .metric-grid > * { min-width:0; }
.workspace h1, .workspace h2, .support-app h1, .v7-section h2,
.v7-smallcard, .v7-project-copy, .service-capsule, .v7-notice,
.v7-message, .v7-history-row, .ticket-row { overflow-wrap:anywhere; }
.service-grid, .metric-grid--os, .os-two-col, .support-layout,
.v7-history-cols, .v7-double, .v7-cards { min-width:0; }
.v7-scroll, .service-modal__card, .v7-dialog { -webkit-overflow-scrolling:touch; }
/* The desktop nav is hidden at 1100px by V5/V7. Its links must remain accessible. */
.sgm-menu-trigger, .sgm-menu { display:none; }
.sgm-menu[hidden] { display:none !important; }
@media (max-width:1100px) {
 .topbar--final { gap:8px; }
 .sgm-menu-trigger { flex:0 0 auto; display:flex; align-items:center; justify-content:center;
   width:44px; height:44px; padding:0; border:1px solid var(--line);
   border-radius:14px; background:var(--surface); color:var(--text); cursor:pointer;
   -webkit-tap-highlight-color:transparent; }
 .sgm-menu-trigger svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; }
 .sgm-menu-trigger[aria-expanded="true"] { background:var(--surface-strong); border-color:var(--line-strong); }
 .sgm-menu:not([hidden]) { display:grid; position:absolute; top:calc(100% + 8px); inset-inline:0;
   max-height:min(75dvh,520px); overflow-y:auto; overscroll-behavior:contain;
   padding:10px; gap:5px; border:1px solid var(--line); border-radius:20px;
   background:var(--bg-2); color:var(--text); box-shadow:0 24px 70px rgba(0,0,0,.35);
   backdrop-filter:blur(22px); -webkit-backdrop-filter:blur(22px); z-index:200; }
 .sgm-menu a { display:flex; align-items:center; justify-content:space-between; gap:10px;
   min-height:46px; border-radius:12px; padding:11px 14px; text-decoration:none;
   color:var(--text); font-size:13px; font-weight:600; }
 .sgm-menu a:hover, .sgm-menu a:focus-visible { background:var(--surface-strong); }
 .sgm-menu a.sgm-primary { background:var(--text); color:var(--bg); }
}
@media (max-width:820px) {
 /* Public pages: keep cinematic visuals but give the copy enough width. */
 .hero-final__content, .hero-final__actions, .hero-final__rail, .statement__layout,
 .plans-final__head, .lyra-final__layout, .support-final__layout,
 .portal-final__grid, .footer--final { min-width:0; }
 .hero-final__title, .display--final, .finale__content h2 { overflow-wrap:normal; }
 .hero-final__content { position:relative; z-index:8; }
 .hero-final__lead { max-width:100%; }
 .network-story__stage-inner, .network-visual, .lyra-device-stage,
 .portal-final__frame { max-width:100%; }
 .topbar--final { padding-inline:10px; }
 .topbar--final .brand { min-width:0; }
 .topbar--final .topbar__actions { margin-inline-start:auto; flex-shrink:0; }
 .portal-btn--final { min-width:44px; min-height:44px; }
 .topbar--final .theme-toggle { min-width:44px; min-height:44px; }
 /* Operations: accessible horizontal rail; no clipped controls or tables. */
 .v7-shell { min-width:0; }
 .v7-rail { min-width:0; }
 .v7-rail-links { display:flex; flex-wrap:nowrap; gap:6px; overflow-x:auto;
   overscroll-behavior-inline:contain; padding-bottom:8px; margin:14px 0;
   scrollbar-width:thin; }
 .v7-rail-links a { white-space:nowrap; flex:0 0 auto; min-height:44px; display:flex; align-items:center; }
 .v7-rail > a { display:inline-flex; align-items:center; min-height:44px; }
 .v7-table { min-width:610px; }
 .v7-scroll { overflow-x:auto; }
 .v7-search { width:100%; }
 .v7-search input { min-width:0; flex:1; }
 .v7-section-head > select { width:100%; max-width:320px; }
 /* Dashboard: display all sections on narrow screens, with a swipeable menu. */
 .dashboard-shell--os { min-width:0; }
 .side-panel--os { height:auto; gap:10px; padding:14px; min-width:0; }
 .side-panel--os .side-nav { display:flex; flex-wrap:nowrap; overflow-x:auto;
   overscroll-behavior-inline:contain; scrollbar-width:thin; padding-bottom:8px;
   margin:4px 0 0; gap:6px; }
 .side-panel--os .side-nav a { flex:0 0 auto; min-height:44px; white-space:nowrap; align-items:center; gap:12px; }
 .workspace--os { min-width:0; }
 .workspace-head--os h1 { overflow-wrap:anywhere; }
 .os-command { min-width:0; }
 .os-command input { min-width:0; width:100%; }
 .service-capsule header, .service-capsule footer { min-width:0; }
 .support-app { min-width:0; }
 .support-card, .v7-thread { max-width:100%; }
 .v7-message { min-width:0; }
 .v7-message header { flex-wrap:wrap; gap:6px 14px; }
}
@media (max-width:600px) {
 :root { --shell:min(100% - 28px,1220px); --final-shell:min(100% - 28px,1320px); }
 html { scroll-padding-top:82px; }
 .topbar { width:calc(100% - 16px); top:8px; min-height:60px; height:60px; padding-inline:9px; gap:5px; }
 .topbar .brand__sigil { width:36px; height:36px; flex-shrink:0; }
 .topbar .brand__text b { font-size:11px; letter-spacing:.08em; }
 .topbar .theme-toggle { min-width:40px; padding:0 8px; }
 .topbar .topbar__actions { gap:5px; }
 .topbar:not(.topbar--final) .portal-btn { min-height:42px; height:auto; padding:5px 9px; font-size:10px; }
 .topbar--final .portal-btn--final { width:auto; padding:0 11px; gap:5px; font-size:10px; }
 .topbar--final .portal-btn--final span { display:inline; }
 .topbar--final .portal-btn--final i { display:none; }
 .topbar--final .brand__text small { display:none; }
 .sgm-menu-trigger { width:42px; height:42px; }
 .hero-final { padding-top:92px; min-height:920px; }
 .hero-final__content { padding-top:35px; }
 .hero-final__title { font-size:clamp(39px,10.4vw,58px); }
 .hero-final__lead { font-size:13px; line-height:2; }
 .hero-final__actions { max-width:100%; }
 .hero-final__actions .cta, .finale__content .cta { min-height:46px; }
 .hero-final__scene { height:290px; bottom:36px; opacity:.52; }
 .sg-sphere { width:min(68vw,250px); }
 .hero-final__rail { margin-top:22px; }
 .statement { padding-block:72px; }
 .statement__line { font-size:clamp(30px,8.5vw,39px); }
 .network-visual { height:350px; border-radius:24px; }
 .network-core { width:128px; }
 .plans-showcase { min-width:0; }
 .panel-piece, .panel-piece--pro { min-height:470px; }
 .lyra-device-stage { height:535px; overflow:hidden; }
 .lyra-orbit { width:min(94vw,350px); }
 .phone--final { width:min(72vw,240px); height:495px; }
 .portal-final__grid { padding:16px; }
 .footer--final > div { flex-wrap:wrap; justify-content:center; }
 /* Login / account linking: no iOS input zoom, reachable buttons. */
 .auth-panel { width:100%; padding:94px 16px 30px; }
 .auth-card--os { width:100%; padding:20px 16px; border-radius:22px; }
 .auth-card h2 { font-size:clamp(27px,8vw,34px); line-height:1.4; }
 .auth-card>p { font-size:12px; line-height:2; }
 .auth-telegram-bot { min-height:46px; }
 .auth-card input, .auth-card select, .auth-card textarea, .v7-composer textarea,
 .v7-composer select, .v7-composer input, .v7-form-grid select,
 .v7-dialog input, .v7-dialog select, .v7-dialog textarea,
 .v7-project-field input, .v7-project-field select, .v7-project-field textarea,
 .v7-search input { font-size:16px; }
 .auth-card button, .auth-card .cta { min-height:46px; }
 .connect-shell { padding:92px 12px 22px; }
 .connect-card { padding:22px 16px; border-radius:22px; }
 /* Personal dashboard: 1-column cards at phone widths. */
 .dashboard-shell, .dashboard-shell--os { padding:84px 8px 20px; gap:10px; }
 .workspace--os { padding:15px 12px; border-radius:21px; }
 .workspace-head--os h1 { font-size:clamp(24px,6.5vw,32px); line-height:1.5; }
 .workspace-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
 .workspace-actions > * { min-width:0; text-align:center; justify-content:center; }
 .metric-grid--os { display:grid; grid-template-columns:1fr; gap:9px; margin-top:18px; }
 .metric-grid--os .metric { min-height:95px; padding:13px 15px; }
 .metric-grid--os .metric b { font-size:clamp(20px,6vw,26px); }
 .service-grid { grid-template-columns:1fr; }
 .service-capsule { min-height:0; padding:14px; border-radius:20px; }
 .service-orbit { display:grid; grid-template-columns:90px minmax(0,1fr); gap:12px; margin:18px 0; }
 .service-orbit__ring { width:88px; }
 .service-orbit__ring:before { inset:7px; }
 .service-facts { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .service-facts > div { padding:10px; min-width:0; }
 .os-section__head h2 { font-size:22px; }
 .os-panel { padding:15px; min-height:0; border-radius:18px; }
 .os-panel__head { align-items:flex-start; flex-wrap:wrap; }
 .identity-facts, .detail-grid, .ticket-service-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .service-modal { padding:8px; align-items:end; }
 .service-modal__card { width:100%; max-height:91dvh; padding:17px 14px calc(16px + env(safe-area-inset-bottom)); border-radius:22px 22px 0 0; }
 .service-detail-head { padding-left:34px; }
 .service-detail-head h2 { font-size:22px; }
 .detail-actions { display:grid; grid-template-columns:1fr; }
 .market-grid { grid-template-columns:1fr; }
 /* Support: replies/files/rating and ticket detail remain reachable. */
 .support-app { padding:95px 10px 35px; }
 .support-app__head h1 { font-size:clamp(28px,8vw,36px); }
 .support-card { padding:15px; border-radius:19px; }
 .support-layout { grid-template-columns:1fr; gap:10px; }
 .v7-thread { padding-inline:14px; }
 .v7-message { max-width:100%; padding:13px; }
 .v7-thread-head { gap:12px; }
 .v7-thread-head button, .v7-composer button { width:100%; justify-content:center; min-height:46px; }
 .ticket-row { display:flex; flex-wrap:wrap; }
 .ticket-row > * { min-width:0; }
 /* Operations: tables keep horizontal scrolling rather than crushing cells. */
 .v7-shell { margin-top:75px; padding:0 8px 40px; gap:10px; }
 .v7-rail, .v7-section, .v7-panel { padding:14px; border-radius:18px; }
 .v7-rail h2 { font-size:19px; }
 .v7-pagehead { margin:18px 4px 22px; }
 .v7-pagehead h1 { font-size:clamp(24px,7vw,32px); }
 .v7-section-head { gap:12px; }
 .v7-section-head h2 { font-size:19px; }
 .v7-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
 .v7-metrics article { padding:12px; min-height:116px; }
 .v7-metrics b { font-size:clamp(21px,6vw,27px); }
 .v7-search { display:grid; grid-template-columns:minmax(0,1fr) auto; }
 .v7-search input { width:100%; }
 .v7-history-row, .v7-notice, .v7-ticket-link { gap:9px; }
 .v7-history-row strong { white-space:normal; text-align:left; font-size:11px; }
 .v7-dialog { width:calc(100vw - 16px); padding:18px 12px; max-height:92dvh; border-radius:18px; }
 .v7-dialog-actions { flex-wrap:wrap; }
 .v7-form-grid, .v7-project-field, .v7-cards { grid-template-columns:1fr; }
 .v7-project-grid { grid-template-columns:1fr; padding-inline:12px; }
 .v7-project { padding:15px; min-height:0; border-radius:20px; }
 .v7-project-copy h2 { font-size:clamp(22px,7vw,28px); }
 .v7-project-art { height:130px; padding:14px; }
 .v7-projects-head { margin:101px auto 33px; }
}
@media (max-width:360px) {
 .topbar .brand__text b { font-size:10px; letter-spacing:0; }
 .topbar .brand__sigil { width:32px; height:32px; }
 .topbar--final .portal-btn--final { padding-inline:8px; }
 .topbar--final .theme-toggle { padding-inline:6px; min-width:39px; }
 .hero-final__title { font-size:38px; }
 .hero-final__rail { grid-template-columns:1fr; }
 .service-orbit { grid-template-columns:1fr; justify-items:start; }
 .v7-metrics { grid-template-columns:1fr; }
}
@media (hover:none) and (pointer:coarse) {
 .magnetic, .spotlight-card { transform:none; }
 .cta, .portal-btn, .v7-mini, .theme-toggle, .service-capsule button { touch-action:manipulation; }
}
@media (prefers-reduced-motion:reduce) {
 .sgm-menu, .service-modal__card { animation:none!important; transition:none!important; }
}
