/* Ascend phone mode (UI 1.51.185). Active only when <html class="ascend-phone"> is set by the
   head script in index.html (?phone=1 or a phone-mode session). The desktop layout is untouched. */
html.ascend-phone body { -webkit-text-size-adjust: 100%; padding-bottom: env(safe-area-inset-bottom); }
html.ascend-phone #tab-sidebar { display: none !important; }
html.ascend-phone #dashboard { display: block; padding: 0.5rem 0.5rem 4rem; min-height: 0; }
html.ascend-phone #dashboard > * { min-width: 0; max-width: 100%; }
html.ascend-phone #app-nav { height: 3rem; }
html.ascend-phone #app-nav > div { padding-left: 0.5rem; padding-right: 0.5rem; }
html.ascend-phone #app-nav > div > div:last-child { display: none !important; }
html.ascend-phone #app-nav .nav-brand-gradient { flex: 1; min-width: 0; gap: 0.5rem; }
html.ascend-phone #app-nav .nav-brand-gradient img,
html.ascend-phone #header-ui-version { display: none; }
html.ascend-phone #phone-back-link {
  display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2.5rem; padding: 0 0.6rem 0 0.2rem;
  color: #fff; font-size: 0.85rem; font-weight: 600; text-decoration: none; flex-shrink: 0;
}
html.ascend-phone #phone-module-title {
  display: inline-block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: rgba(255, 255, 255, 0.92); font-size: 0.85rem; font-weight: 500;
}
html.ascend-phone footer { display: none; }
/* Wide content scrolls inside its own box instead of pushing the page sideways */
html.ascend-phone #dashboard table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
html.ascend-phone #dashboard pre { max-width: 100%; overflow-x: auto; }
/* Building 3D (#trends-3d) sizes its own controls, photos and pins; these generic phone rules squashed its rows. */
html.ascend-phone #dashboard img:not(#trends-3d img),
html.ascend-phone #dashboard video:not(#trends-3d video) { max-width: 100%; height: auto; }
/* 16px inputs stop iOS zooming in on focus; larger touch targets */
html.ascend-phone #dashboard input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(#trends-3d input),
html.ascend-phone #dashboard select:not(#trends-3d select),
html.ascend-phone #dashboard textarea:not(#trends-3d textarea) { font-size: 16px; min-height: 2.5rem; }
html.ascend-phone #dashboard button:not(#trends-3d button) { min-height: 2.25rem; }
html.ascend-phone [role="dialog"] { max-width: 100vw; }
html.ascend-phone .ascend-card { min-width: 0; }
html.ascend-phone #dashboard [class*="overflow-x-auto"] { -webkit-overflow-scrolling: touch; }
