/* The regular mobile browser layout is intentionally unchanged. */
.webapp-tab-rail { display: contents; }
.webapp-tab-heading, .webapp-tab-arrow { display: none; }
@media (max-width: 900px) {
  html.webapp-standalone { min-height: 100%; -webkit-text-size-adjust: 100%; }
  .webapp-standalone body { min-height: 100vh; min-height: 100dvh; overflow-x: clip; }
  .webapp-standalone body > header {
    height: auto; min-height: 74px; display: grid; grid-template-columns: minmax(0,1fr) auto;
    gap: 10px; padding: calc(env(safe-area-inset-top,0px) + 12px) max(14px,env(safe-area-inset-right)) 12px max(14px,env(safe-area-inset-left));
    position: static; background: #0e171f; backdrop-filter: none;
  }
  .webapp-standalone .brand { min-width: 0; gap: 9px; }
  .webapp-standalone .brand > div { min-width: 0; }
  .webapp-standalone .brand h1 { font-size: 16px; line-height: 1.2; letter-spacing: 0; }
  .webapp-standalone .brand p { font-size: 9px; line-height: 1.4; letter-spacing: .8px; margin-top: 5px; }
  .webapp-standalone .brand-mark { flex: 0 0 26px; width: 26px; height: 32px; }
  .webapp-standalone .brand-mark img { max-width: 100%; height: auto; }
  .webapp-standalone .account-controls { gap: 6px; }
  .webapp-standalone .account-controls > span { display: none !important; }
  .webapp-standalone .account-controls button { min-height: 44px; padding: 8px; font-size: 11px; }
  .webapp-standalone #accountSettings { max-width: 70px; }
  .webapp-standalone #lockApp { min-width: 44px; }
  .webapp-standalone body > main {
    width: 100%; min-width: 0; max-width: 100%; margin: 0;
    padding: 16px max(12px,env(safe-area-inset-right)) 12px max(12px,env(safe-area-inset-left));
    overflow: visible;
  }
  .webapp-standalone .webapp-tab-heading { display: flex; justify-content: space-between; gap: 10px; padding: 0 3px 9px; }
  .webapp-standalone .webapp-tab-heading span { font: 10px Consolas,monospace; letter-spacing: 1.4px; color: var(--amber); }
  .webapp-standalone .webapp-tab-heading small { font-size: 11px; color: #91a3b3; }
  .webapp-standalone .webapp-tab-rail { display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; align-items: center; gap: 5px; margin-bottom: 18px; }
  .webapp-standalone .webapp-tab-arrow { display: block; width: 44px; height: 48px; padding: 0; font-size: 28px; background: #13202b; border-color: #293c4e; }
  .webapp-standalone .webapp-tab-arrow:disabled { opacity: .3; cursor: default; }
  .webapp-standalone .department-nav {
    display: flex; flex-wrap: nowrap; width: 100%; min-width: 0; max-width: 100%; gap: 6px;
    margin: 0; padding: 4px; overflow-x: auto; overflow-y: hidden; border-radius: 12px;
    -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; scroll-padding-inline: 4px;
    scrollbar-width: none; touch-action: pan-x pan-y pinch-zoom;
  }
  .webapp-standalone .department-nav > span { display: none; }
  .webapp-standalone .department-nav button { flex: 0 0 auto; width: auto; min-width: 0; min-height: 44px; padding: 10px 16px; font-size: 13px; white-space: nowrap; overflow-wrap: normal; }
  .webapp-standalone .department-nav button.active { border-color: #4d697b; background: #223643; color: #fff; box-shadow: inset 0 -2px #82c3c2; }
  .webapp-standalone .department-view { min-width: 0; max-width: 100%; }
  .webapp-standalone #privateCaloriesFrame, .webapp-standalone #privateFilesFrame { width: 100% !important; min-width: 0; max-width: 100%; }
  .webapp-standalone body > footer { padding: 20px 22px calc(20px + env(safe-area-inset-bottom,0px)); font-size: 10px; line-height: 1.5; }
  .webapp-standalone dialog { max-height: calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 24px); }
}
.private-tracker-fullscreen { display: block; width: fit-content; max-width: 100%; margin: 0 0 8px auto; padding: 10px 4px; min-height: 44px; color: #a8c9c8; font-size: 12px; text-decoration: underline; }
