:root {
  --ls-app-vh: 100dvh;
  --ls-app-vw: 100vw;
}

html.rotation-ready,
html.rotation-ready body,
html.rotation-ready #root {
  min-height: 100%;
}

html.mobile-landscape,
html.mobile-landscape body,
html.mobile-landscape #root {
  min-height: var(--ls-app-vh);
}

html.mobile-landscape body {
  overflow-x: hidden;
}

html.mobile-landscape .safe-app,
html.mobile-landscape .ls-shell {
  min-height: var(--ls-app-vh) !important;
}

html.mobile-landscape .safe-app > aside,
html.mobile-landscape .ls-shell > aside,
html.mobile-landscape .app-sidebar {
  width: min(320px, 38vw) !important;
  max-width: 320px !important;
}

html.mobile-landscape .safe-app > .app-main,
html.mobile-landscape .ls-main,
html.mobile-landscape .app-main {
  min-height: var(--ls-app-vh) !important;
}

html.mobile-landscape .safe-app > .app-main > header,
html.mobile-landscape .app-mobile-header {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

html.mobile-landscape .safe-app > .app-main main,
html.mobile-landscape .app-page-content {
  padding: 0.875rem !important;
}

html.mobile-landscape .safe-app .rounded-3xl,
html.mobile-landscape .safe-app .rounded-2xl,
html.mobile-landscape .safe-app .rounded-xl {
  border-radius: 1rem;
}

html.mobile-landscape .safe-app .p-6,
html.mobile-landscape .safe-app .p-5 {
  padding: 1rem !important;
}

html.mobile-landscape .safe-app .py-6,
html.mobile-landscape .safe-app .py-5 {
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}

html.mobile-landscape .safe-app .px-6,
html.mobile-landscape .safe-app .px-5 {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

html.mobile-landscape .safe-app .gap-8,
html.mobile-landscape .safe-app .gap-6 {
  gap: 1rem !important;
}

html.mobile-landscape .safe-app .space-y-8 > :not([hidden]) ~ :not([hidden]),
html.mobile-landscape .safe-app .space-y-6 > :not([hidden]) ~ :not([hidden]) {
  margin-top: 1rem !important;
}

html.mobile-landscape .safe-app table {
  display: block;
  width: 100%;
  overflow-x: auto;
  white-space: nowrap;
}

html.mobile-landscape .safe-app .overflow-x-auto {
  -webkit-overflow-scrolling: touch;
}

html.mobile-landscape .safe-app textarea {
  min-height: 88px;
}

html.mobile-landscape .safe-app [role="dialog"] {
  max-height: calc(var(--ls-app-vh) - 1rem);
  overflow-y: auto;
}

html.mobile-landscape .home-nav-inner {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

html.mobile-landscape .home-hero {
  min-height: var(--ls-app-vh) !important;
}

html.mobile-landscape .home-hero-shell {
  padding-top: max(1rem, env(safe-area-inset-top)) !important;
  padding-bottom: max(1rem, env(safe-area-inset-bottom)) !important;
}

html.mobile-landscape .home-hero-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr) !important;
  gap: 1.25rem !important;
  align-items: center !important;
}

html.mobile-landscape .home-hero-text {
  gap: 0.875rem !important;
}

html.mobile-landscape .home-hero-title {
  font-size: clamp(2.05rem, 5vw, 3.35rem) !important;
  line-height: 1.05 !important;
}

html.mobile-landscape .home-hero-subtitle {
  font-size: clamp(1.1rem, 2.7vw, 1.45rem) !important;
}

html.mobile-landscape .home-hero-description {
  font-size: 0.95rem !important;
  line-height: 1.55 !important;
  max-width: 36rem !important;
}

html.mobile-landscape .home-hero-actions {
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 0.75rem !important;
}

html.mobile-landscape .home-proof {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.75rem 1rem !important;
  padding-top: 0 !important;
}

html.mobile-landscape .home-floating-card,
html.mobile-landscape .home-floating-badge {
  transform: none !important;
  animation: none !important;
}

html.mobile-landscape .lawshield-ai-panel {
  right: 0.75rem !important;
  bottom: 0.75rem !important;
  width: min(430px, calc(100vw - 1.5rem)) !important;
  height: min(360px, calc(var(--ls-app-vh) - 1.5rem)) !important;
  max-height: calc(var(--ls-app-vh) - 1.5rem) !important;
}

html.mobile-landscape .lawshield-ai-fab {
  right: 0.75rem !important;
  bottom: 0.75rem !important;
  width: 48px !important;
  height: 48px !important;
}

html.mobile-landscape .lawshield-accessibility-panel {
  left: 0.75rem !important;
  bottom: 4rem !important;
  width: min(350px, calc(100vw - 1.5rem)) !important;
  max-height: calc(var(--ls-app-vh) - 4.75rem) !important;
}

html.mobile-landscape .lawshield-accessibility-fab {
  left: 0.75rem !important;
  bottom: 0.75rem !important;
  width: 48px !important;
  height: 48px !important;
}

html.mobile-landscape .cs-banner-shell {
  inset-inline: 0.75rem !important;
  bottom: 0.75rem !important;
  max-height: calc(var(--ls-app-vh) - 1.5rem) !important;
  overflow-y: auto;
}

html.mobile-landscape .cs-banner-container {
  padding: 12px 14px 10px !important;
}

html.mobile-landscape .cs-buttons-row {
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

html.mobile-landscape .cs-btn {
  flex: 1 1 30%;
  min-width: 120px !important;
  width: auto !important;
  padding: 10px 14px !important;
}

html.mobile-landscape .cs-header-title {
  font-size: 15px !important;
}

html.mobile-landscape .cs-desc-text {
  font-size: 12px !important;
  line-height: 1.55 !important;
}

html.mobile-landscape .cs-footer-bar {
  font-size: 9px !important;
}

@media (orientation: landscape) and (max-height: 540px) {
  html.mobile-landscape .home-hero-grid {
    gap: 1rem !important;
  }

  html.mobile-landscape .home-hero-shell {
    padding-top: 0.875rem !important;
    padding-bottom: 0.875rem !important;
  }

  html.mobile-landscape .home-hero-title {
    font-size: clamp(1.85rem, 4.4vw, 2.8rem) !important;
  }

  html.mobile-landscape .lawshield-ai-panel {
    height: min(320px, calc(var(--ls-app-vh) - 1rem)) !important;
  }
}
