/**
 * ToolsLuv Mobile V2 — global page chrome (T1 pilots)
 * Restores footer, command palette, loading overlay, and back-to-top rules
 * from style.min.css removed on mobile in T1.2.
 */
@media (max-width: 760px) {
  html[data-tl-mobile-v2="tool-v1"] .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  html[data-tl-mobile-v2="tool-v1"] .command-palette {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 340;
  }

  html[data-tl-mobile-v2="tool-v1"] .command-palette.open {
    display: block;
  }

  html[data-tl-mobile-v2="tool-v1"] .command-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  html[data-tl-mobile-v2="tool-v1"] .command-panel {
    position: relative;
    width: min(92vw, 680px);
    max-height: min(78vh, 720px);
    margin: 8vh auto 0;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(2, 6, 23, 0.35);
    padding: 1rem;
    overflow: hidden;
  }

  html[data-tl-mobile-v2="tool-v1"] .command-search-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.65rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.72);
    padding: 0.55rem 0.7rem;
  }

  html[data-tl-mobile-v2="tool-v1"] .command-search-row input {
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    color: #fff;
    outline: 0;
    min-height: 40px;
    font-size: 1rem;
  }

  html[data-tl-mobile-v2="tool-v1"] .command-search-row button {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: #cbd5e1;
    cursor: pointer;
  }

  html[data-tl-mobile-v2="tool-v1"] .command-panel h2 {
    font-size: 0.85rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 1rem 0.25rem 0.55rem;
  }

  html[data-tl-mobile-v2="tool-v1"] .command-results {
    display: grid;
    gap: 0.35rem;
    max-height: 48vh;
    overflow: auto;
    padding-right: 0.25rem;
  }

  html[data-tl-mobile-v2="tool-v1"] .command-results a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.78rem 0.85rem;
    border-radius: 10px;
    color: #f8fafc;
    text-decoration: none;
  }

  html[data-tl-mobile-v2="tool-v1"] .command-results a:hover,
  html[data-tl-mobile-v2="tool-v1"] .command-results a.active {
    background: rgba(37, 99, 235, 0.22);
  }

  html[data-tl-mobile-v2="tool-v1"] .command-results span {
    color: #94a3b8;
    font-size: 0.84rem;
    flex-shrink: 0;
  }

  html[data-tl-mobile-v2="tool-v1"] .command-empty,
  html[data-tl-mobile-v2="tool-v1"] .command-hint {
    color: #94a3b8;
    font-size: 0.88rem;
    margin: 0.85rem 0.25rem 0.15rem;
  }

  html[data-tl-mobile-v2="tool-v1"] .command-empty[hidden],
  html[data-tl-mobile-v2="tool-v1"] [hidden] {
    display: none;
  }

  html[data-tl-mobile-v2="tool-v1"] .loading-overlay {
    position: fixed;
    inset: 0;
    display: none;
    place-items: center;
    z-index: 80;
    background: rgba(5, 10, 30, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  html[data-tl-mobile-v2="tool-v1"] .loading-overlay.active {
    display: grid;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  html[data-tl-mobile-v2="tool-v1"] .back-to-top-button {
    position: fixed;
    right: 16px;
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 110;
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: #fff;
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(14px) scale(0.92);
    cursor: pointer;
  }

  html[data-tl-mobile-v2="tool-v1"] .back-to-top-button.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  html[data-tl-mobile-v2="tool-v1"] .back-to-top-button svg {
    width: 22px;
    height: 22px;
    stroke-width: 3;
  }

  html[data-tl-mobile-v2="tool-v1"] .site-footer {
    position: relative;
    overflow: hidden;
    margin-top: 60px;
    border-top: 1px solid rgba(96, 165, 250, 0.2);
    background:
      radial-gradient(circle at 12% 0%, rgba(37, 99, 235, 0.24), transparent 34%),
      radial-gradient(circle at 78% 8%, rgba(124, 58, 237, 0.18), transparent 34%),
      radial-gradient(circle at 50% 100%, rgba(6, 182, 212, 0.09), transparent 40%),
      #020617;
    color: #dbe8e3;
    content-visibility: visible;
  }

  html[data-tl-mobile-v2="tool-v1"] body.calculator-body .site-footer {
    margin-top: 36px;
  }

  html[data-tl-mobile-v2="tool-v1"] .site-footer::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(96, 165, 250, 0.7), rgba(167, 139, 250, 0.5), transparent);
    box-shadow: 0 0 42px rgba(96, 165, 250, 0.36);
  }

  html[data-tl-mobile-v2="tool-v1"] .site-footer::after {
    display: none;
    content: none;
  }

  html[data-tl-mobile-v2="tool-v1"] .footer-grid,
  html[data-tl-mobile-v2="tool-v1"] .footer-bottom {
    position: relative;
    z-index: 1;
  }

  html[data-tl-mobile-v2="tool-v1"] .footer-grid {
    max-width: 1180px;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.4rem 0.95rem;
  }

  html[data-tl-mobile-v2="tool-v1"] .footer-brand-block,
  html[data-tl-mobile-v2="tool-v1"] .footer-grid > div:last-child {
    grid-column: 1 / -1;
  }

  html[data-tl-mobile-v2="tool-v1"] .footer-grid h2 {
    margin: 0 0 0.85rem;
    color: #fff;
    font-size: 0.98rem;
    letter-spacing: -0.01em;
  }

  html[data-tl-mobile-v2="tool-v1"] .footer-grid a {
    display: block;
    margin: 0.16rem 0;
    color: #dbe8e3;
    font-size: 0.94rem;
    line-height: 1.72;
    text-decoration: none;
  }

  html[data-tl-mobile-v2="tool-v1"] .footer-grid p {
    color: #b8c9c2;
    max-width: 420px;
    margin: 0;
  }

  html[data-tl-mobile-v2="tool-v1"] .footer-brand {
    display: inline-block;
    margin-bottom: 1rem;
  }

  html[data-tl-mobile-v2="tool-v1"] .footer-brand-block {
    display: grid;
    gap: 0.9rem;
    align-content: start;
  }

  html[data-tl-mobile-v2="tool-v1"] .footer-tagline {
    font-size: 0.92rem;
    line-height: 1.6;
    max-width: 390px;
  }

  html[data-tl-mobile-v2="tool-v1"] .footer-trust-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.46rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.08rem;
  }

  html[data-tl-mobile-v2="tool-v1"] .footer-trust-chips::-webkit-scrollbar {
    display: none;
  }

  html[data-tl-mobile-v2="tool-v1"] .footer-trust-chips span {
    display: inline-flex;
    align-items: center;
    gap: 0.36rem;
    flex: 0 0 auto;
    white-space: nowrap;
    border: 1px solid rgba(96, 165, 250, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    padding: 0.3rem 0.46rem;
    color: #dbeafe;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: -0.01em;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.07);
  }

  html[data-tl-mobile-v2="tool-v1"] .footer-trust-chips svg {
    width: 15px;
    height: 15px;
    color: #93c5fd;
  }

  html[data-tl-mobile-v2="tool-v1"] .footer-premium-trust {
    display: grid;
    gap: 0.5rem;
    margin: 0.55rem 0 0.2rem;
  }

  html[data-tl-mobile-v2="tool-v1"] .footer-premium-trust span {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 40px;
    border: 1px solid rgba(147, 197, 253, 0.2);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(15, 23, 42, 0.24));
    padding: 0.52rem 0.64rem;
    color: #e2e8f0;
    font-size: 0.82rem;
    font-weight: 900;
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  html[data-tl-mobile-v2="tool-v1"] .footer-premium-trust svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    color: #93c5fd;
  }

  html[data-tl-mobile-v2="tool-v1"] .footer-social-title {
    margin-top: 0.8rem;
    margin-bottom: 0.42rem;
    font-size: 0.96rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #f8fafc;
  }

  html[data-tl-mobile-v2="tool-v1"] .social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
    margin-top: 0.1rem;
  }

  html[data-tl-mobile-v2="tool-v1"] .social-links a {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid rgba(226, 232, 240, 0.36);
    background: rgba(255, 255, 255, 0.02);
    color: #e5e7eb;
    opacity: 0.82;
    text-decoration: none;
  }

  html[data-tl-mobile-v2="tool-v1"] .social-glyph {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    position: relative;
    color: currentColor;
  }

  html[data-tl-mobile-v2="tool-v1"] .social-glyph-text {
    font-family: Inter, Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 900;
    line-height: 1;
    text-transform: lowercase;
  }

  html[data-tl-mobile-v2="tool-v1"] .social-glyph-play::before {
    content: "";
    width: 17px;
    height: 12px;
    border-radius: 4px;
    background: currentColor;
    opacity: 0.95;
  }

  html[data-tl-mobile-v2="tool-v1"] .social-glyph-play::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 5px;
    border-left: 5px solid #020617;
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
  }

  html[data-tl-mobile-v2="tool-v1"] .social-glyph-insta {
    border: 2px solid currentColor;
    border-radius: 5px;
  }

  html[data-tl-mobile-v2="tool-v1"] .footer-bottom {
    max-width: 1180px;
    margin: 0 auto;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.9rem 1rem 1.1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.3rem;
    justify-items: center;
    text-align: center;
    color: #b8c9c2;
    font-size: 0.84rem;
  }

  html[data-tl-mobile-v2="tool-v1"] .footer-credit {
    color: #f8fafc;
    font-weight: 850;
    letter-spacing: -0.01em;
  }

  html[data-tl-mobile-v2="tool-v1"] .footer-made-line {
    max-width: 280px;
    line-height: 1.45;
    color: #cbd5e1;
  }

  html[data-tl-mobile-v2="tool-v1"] .footer-privacy-line {
    color: #b8c9c2;
  }

  /* T10 — canonical mobile tool header (beats bundled calculator chrome on ≤760px) */
  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-body .site-header .nav-wrap,
  html[data-tl-mobile-v2="tool-v1"] body.calculator-body .site-header .nav-wrap {
    min-height: 68px;
    padding: 0.55rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    max-width: none;
    margin: 0;
    box-sizing: border-box;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-body .site-header .brand,
  html[data-tl-mobile-v2="tool-v1"] body.calculator-body .site-header .brand {
    display: flex;
    align-items: center;
    flex: 0 1 auto;
    min-width: 0;
    min-height: 46px;
    padding: 0;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-body .site-header .brand-full-logo,
  html[data-tl-mobile-v2="tool-v1"] body.calculator-body .site-header .brand-full-logo {
    display: block;
    width: auto;
    height: 46px;
    max-width: 184px;
    min-height: 46px;
    object-fit: contain;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-body .site-header .nav-toggle,
  html[data-tl-mobile-v2="tool-v1"] body.calculator-body .site-header .nav-toggle {
    display: flex;
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border: 1px solid #cbd5e1;
    border-radius: 18px;
    background: #fff;
    color: #172033;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    position: relative;
    z-index: 2;
    pointer-events: auto;
    cursor: pointer;
  }

  html[data-tl-mobile-v2="tool-v1"] body.flux-tool-body .site-header .nav-toggle span,
  html[data-tl-mobile-v2="tool-v1"] body.calculator-body .site-header .nav-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
  }

  /* Nav drawer: canonical owner is tools-mobile-v2-nav-drawer-lock.css (loads last) */
}
