Index: src/views/shell.ejs
===================================================================
--- src/views/shell.ejs	(revision 1c85964d3c3b85d21167fe588367cdd890d0820f)
+++ src/views/shell.ejs	(revision f6b2c684c90dcd944223b0b83aeb85ee4c2d42da)
@@ -223,18 +223,15 @@
     document.documentElement.style.setProperty('--ios-safe-top', i + 'px');
     var mh = document.querySelector('.masthead');
-    if (mh) mh.style.paddingTop = 'calc(.55rem + ' + i + 'px)';
-    /* TEMP DEBUG — remove after diagnosing the iOS PWA safe-area. Tap to dismiss. */
-    var d = document.getElementById('ios-dbg');
-    if (!d) { d = document.createElement('div'); d.id = 'ios-dbg'; d.onclick = function(){ d.remove(); };
-      d.style.cssText = 'position:fixed;left:6px;bottom:96px;z-index:2147483647;background:rgba(0,0,0,.86);color:#0f0;font:11px/1.4 monospace;padding:7px 9px;border-radius:6px;white-space:pre;max-width:92vw';
-      document.body.appendChild(d); }
-    var ph = document.querySelector('.profile-header') || document.querySelector('#pcms-chrome');
-    var mr = mh ? mh.getBoundingClientRect() : null;
-    var pr = ph ? ph.getBoundingClientRect() : null;
-    var mhCS = mh ? getComputedStyle(mh) : null;
-    d.textContent = 'env=' + rawEnv + '  final=' + i + '  standalone=' + standalone
-      + '\nscreen=' + screen.width + 'x' + screen.height + ' dpr=' + window.devicePixelRatio + ' scrollY=' + Math.round(window.scrollY)
-      + '\nmh: pos=' + (mhCS ? mhCS.position : '-') + ' pad=' + (mhCS ? Math.round(parseFloat(mhCS.paddingTop)) : '-') + ' top=' + (mr ? Math.round(mr.top) : '-') + ' h=' + (mr ? Math.round(mr.height) : '-')
-      + '\nchrome/profile top=' + (pr ? Math.round(pr.top) : '-') + ' body.pt=' + Math.round(parseFloat(getComputedStyle(document.body).paddingTop));
+    var mhHidden = !mh || getComputedStyle(mh).display === 'none' || mh.offsetHeight === 0;
+    if (mhHidden) {
+      /* Mobile: the masthead is hidden (bottom-tab replaces it ≤767px) so it can't carry
+         the inset. Pad the body instead → the profile-header clears the island/notch. */
+      document.body.style.paddingTop = i + 'px';
+      if (mh) mh.style.paddingTop = '';
+    } else {
+      /* Desktop/landscape: the sticky masthead carries the inset in its own padding. */
+      document.body.style.paddingTop = '';
+      mh.style.paddingTop = 'calc(.55rem + ' + i + 'px)';
+    }
   }
   if (document.body) apply(); else document.addEventListener('DOMContentLoaded', apply);
