/**
 * Phone-first lock — never use desktop "large mode" on real phones.
 */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html, body {
  max-width: 100%;
  overflow-x: clip;
}

img, video, iframe, svg, canvas, table {
  max-width: 100%;
}

input, select, textarea, button {
  max-width: 100%;
  font-size: 16px;
}

html.is-compact .ta-classic-home,
html.is-compact .ta-home {
  max-width: 100% !important;
  width: 100% !important;
  display: block !important;
  grid-template-columns: none !important;
}

html.is-compact .ta-shell,
html.is-compact .settings-shell,
html.is-compact .ta-app-home,
html.is-compact .ta-app-bar {
  max-width: 100% !important;
  width: 100% !important;
}

html.is-compact .ta-dock.ta-tabbar {
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  transform: none !important;
  border-radius: 0 !important;
}

html.is-compact .sections {
  display: flex !important;
  flex-direction: column !important;
  grid-template-columns: none !important;
  width: 100% !important;
  max-width: 100% !important;
}

html.is-compact .section,
html.is-compact .ta-club-card,
html.is-compact .ta-panel {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

html.is-compact .ta-app-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 360px) {
  .ta-app-tile-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .ta-app-tile-icon svg {
    width: 22px;
    height: 22px;
  }

  .ta-app-tile-label,
  .ta-dock.ta-tabbar a,
  .ta-tabbar-more {
    font-size: 11px;
  }
}

html.is-compact .ta-classic-home {
  padding-top: 0 !important;
}

html.is-compact .ta-classic-home .ta-home-head {
  margin: 0 -16px 16px !important;
  padding: 8px 16px 12px !important;
  padding-top: max(8px, var(--app-safe-top, env(safe-area-inset-top, 0px))) !important;
  border-radius: 0 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  width: auto !important;
  max-width: none !important;
}

html.is-compact .ta-home-head-main,
html.is-compact .ta-home-head-copy,
html.is-compact .ta-home-name {
  min-width: 0 !important;
}

html.is-compact .ta-home-name {
  font-size: 18px !important;
  white-space: normal !important;
  -webkit-line-clamp: 2 !important;
}

html.is-compact .ta-home-crest-wrap {
  width: 48px !important;
  height: 48px !important;
}

html.is-compact .ta-home-crest {
  width: 40px !important;
  height: 40px !important;
  max-width: 40px !important;
}

html.is-compact .ta-home-icon-btn,
html.is-compact .ta-home-bell {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
}

@media (prefers-reduced-motion: reduce) {
  .ta-home-icon-btn,
  .ta-home-bell {
    transition: none;
  }
}

html.is-compact table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
