/* A phone presentation of the same app, controls and approval boundaries. */
.mobile-filter-trigger,.mobile-bank-segments,.mobile-bank-list,
.bank-mobile-readiness,.mobile-calendar-empty,.mobile-calendar-info {display:none;}
.mobile-filter-dialog:not([open]) {display:none;}
.mobile-filter-dialog > .mobile-sheet-heading {display:none;}
.week-build-compact {display:none;}
.mobile-sheet:not(.mobile-filter-dialog) {border:1px solid var(--rule);border-radius:20px;padding:0;width:min(480px,calc(100% - 24px));max-height:85dvh;color:var(--text);background:var(--bg-card);}
.mobile-sheet::backdrop {background:rgba(15,23,42,.35);}
.mobile-sheet-heading {display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 18px;border-bottom:1px solid var(--rule);}
.mobile-sheet-heading h2 {font:600 18px var(--sans);margin:0;}
.mobile-sheet-done {border:0;background:transparent;color:var(--accent-week);font:600 16px var(--sans);min-height:44px;padding:8px;cursor:pointer;}
.mobile-menu {padding:8px 16px 16px;}
.mobile-menu-row {display:grid;gap:4px;width:100%;padding:16px 4px;min-height:64px;text-align:left;border:0;border-bottom:1px solid var(--rule);background:transparent;font:inherit;color:var(--text);cursor:pointer;}
.mobile-menu-row span {font-size:13px;color:var(--text-3);}
.mobile-sheet button:focus-visible,.mobile-filter-trigger:focus-visible {outline:2px solid var(--accent-week);outline-offset:2px;}
dialog.item-sheet {margin:0;border:0;padding:0;width:100%;max-width:none;height:100dvh;max-height:none;color:inherit;}

@media (max-width:640px) {
  :root {--mobile-nav-height:58px;--mobile-footer-height:env(safe-area-inset-bottom,0px);--mobile-chrome-height:calc(58px + env(safe-area-inset-bottom,0px));}
  body {font-family:-apple-system,BlinkMacSystemFont,'Inter',system-ui,sans-serif;line-height:1.5;}
  .app-bar {min-height:52px;padding:calc(4px + env(safe-area-inset-top,0px)) 16px 4px;}
  .app-logo {width:92px;}
  .app-logout {display:none;}
  .app-bar-right {display:none;}
  body[data-view="calendar"] .app-week-switcher,body[data-view="desk"] .app-week-switcher {display:none;}
  .app-body,.app-body.is-rail-collapsed {width:100%;max-width:none;padding:16px 14px calc(var(--mobile-chrome-height) + 24px);margin:0;}
  .main {width:100%;}
  .app-footer {display:none;}
  .mobile-nav {bottom:0;height:var(--mobile-chrome-height);padding:4px 12px calc(4px + env(safe-area-inset-bottom,0px));background:var(--bg-card);border-top:1px solid var(--rule);box-shadow:0 -1px 12px rgba(0,0,0,.04);}
  .mnav-btn {color:var(--text-3);font-size:11px;font-weight:500;gap:2px;min-height:48px;}
  .mnav-btn.is-active {color:var(--accent-week);font-weight:650;}
  .mnav-btn svg {width:22px;height:22px;}
  .week-head {padding:0 0 12px;gap:8px;}
  .week-head h1,.bank-section-head h2 {font:650 23px/1.25 var(--sans);letter-spacing:-.025em;margin:0;}
  .frame.is-week-review .frame-header {padding:14px 14px 12px;}
  .frame.is-week-review .frame-eyebrow {margin-bottom:8px;}
  .frame.is-week-review .frame-lede,.frame.is-week-review .admin-details,
  .frame.is-week-review .frame-sub > .cutoff,.frame.is-week-review .week-rollup > .rollup {display:none;}
  .frame.is-week-review .week-build-full {display:none;}
  .frame.is-week-review .week-build-compact {display:block;padding:0;}
  .frame.is-week-review .week-build-compact > summary {display:flex;align-items:center;min-height:44px;padding:8px 12px;cursor:pointer;}
  .frame.is-week-review .week-build-compact > p {margin:0;padding:0 12px 12px;}
  .media-page-heading,.bank-intro {display:none;}
  .bank-section-head {margin:0;}
  .mobile-filter-wrap {min-width:0;margin:0 0 10px;}
  .mobile-filter-inline {display:none;}
  .mobile-filter-trigger {display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:44px;padding:8px 12px;border:1px solid var(--rule);border-radius:12px;background:var(--bg-card);font:inherit;text-align:left;cursor:pointer;}
  .mobile-filter-summary {min-width:0;font-size:13px;color:var(--text-3);overflow-wrap:anywhere;}
  .mobile-filter-label {font-size:14px;font-weight:600;color:var(--accent-week);white-space:nowrap;}
  .mobile-filter-trigger.is-filtered {border-color:var(--accent-week);background:var(--accent-week-tint);}
  dialog.mobile-sheet {position:fixed;inset:auto 0 0;margin:0;width:100%;max-width:none;max-height:85dvh;border:0;border-radius:22px 22px 0 0;padding:0 0 env(safe-area-inset-bottom,0px);background:var(--bg-card);color:var(--text);overscroll-behavior:contain;}
  dialog.mobile-sheet:not([open]) {display:none;}
  dialog.mobile-sheet[open] {display:block;}
  .mobile-filter-dialog > .mobile-sheet-heading {display:flex;position:sticky;top:0;background:var(--bg-card);z-index:1;}
  .mobile-filter-content {padding:16px;}
  .mobile-filter-content.filter-bar {margin:0;border:0;border-radius:0;box-shadow:none;}
  .mobile-sheet .fbar-group {gap:8px;margin-bottom:12px;}
  .mobile-sheet .fbar-group-label {flex-basis:100%;}
  .mobile-sheet .filter-chip {min-height:44px;font-size:14px;padding:8px 13px;}
  .mobile-sheet .bank-compact-focus {display:none;}
  .mobile-bank-segments {display:flex;gap:3px;padding:3px;background:var(--bg-soft);border-radius:11px;margin:0 0 10px;}
  .mobile-bank-segments .fbar-group-label {display:none;}
  .mobile-bank-segments .filter-chip {flex:1;border:0;border-radius:8px;background:transparent;min-height:44px;font-size:13px;padding:8px 4px;justify-content:center;}
  .mobile-bank-segments .filter-chip.is-on {background:var(--bg-card);color:var(--text);box-shadow:0 1px 4px rgba(0,0,0,.09);}
  .bank-review-controls {display:flex;align-items:center;gap:6px;margin:0 0 12px;}
  .bank-review-controls strong {flex:1;font-size:13px;color:var(--text-3);}
  .bank-review-controls .btn {font-size:13px;min-height:44px;padding:8px 12px;}
  .bank-card {padding:16px;border-radius:16px;}
  .bank-card .idea-head {gap:8px;flex-direction:column;margin:0 0 12px;}
  .bank-card .idea-meta {width:100%;}
  .bank-card .idea-title,.bank-article-title {font:650 20px/1.3 var(--sans);margin:0 0 8px;letter-spacing:-.015em;}
  .bank-card .idea-head > .chip {font-size:11px;padding:3px 9px;}
  .bank-card .mobile-filter-trigger {border:0;border-radius:0;padding:0;min-height:44px;background:transparent;}
  .bank-card .mobile-filter-wrap {margin:0;}
  .bank-card .mobile-filter-summary {color:var(--text-2);}
  .bank-mobile-readiness {display:block;color:var(--amber);font-size:13px;margin:6px 0 0;}
  .bank-preview {margin:0;}
  .bank-preview .post-body {font-size:16px;line-height:1.65;}
  .bank-review-focused {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;padding-bottom:72px;}
  .bank-review-focused > * {grid-column:1 / -1;}
  .bank-review-focused > .bank-section-head {grid-column:1;grid-row:1;padding-bottom:10px;align-self:center;}
  .bank-review-focused > .mobile-filter-wrap {grid-column:2;grid-row:1;margin:0 0 10px;}
  .bank-review-focused > .mobile-filter-wrap .mobile-filter-trigger {border:0;background:transparent;padding:0 8px;}
  .bank-review-focused > .mobile-filter-wrap .mobile-filter-summary {display:none;}
  .bank-card {gap:0;}
  .bank-card .idea-head {margin-bottom:8px;}
  .bank-review-focused .bank-actions {position:fixed;top:auto;left:0;right:0;bottom:var(--mobile-chrome-height);z-index:59;padding:8px 12px;margin:0;background:var(--bg-card);border-top:1px solid var(--rule);border-bottom:0;box-shadow:0 -2px 10px rgba(0,0,0,.04);}
  .bank-action-buttons {flex-wrap:nowrap;gap:6px;}
  .bank-action-buttons .btn {flex:0 1 auto;min-height:48px;min-width:44px;padding:6px 9px;font-size:12px;line-height:1.25;}
  .bank-action-buttons .primary {flex:1 1 125px;}
  .bank-action-buttons .bank-phone-primary {flex:1 1 125px;}
  .bank-action-buttons .bank-phone-secondary {display:none;}
  .bank-action-buttons .bank-edit-button,.bank-action-buttons .bank-discuss-button,.bank-action-buttons .bank-more-button {font-size:0;flex:0 0 auto;margin:0;}
  .bank-edit-button::after {content:'Edit';font-size:12px;}
  .bank-discuss-button::after {content:'Discuss';font-size:12px;}
  .bank-more-button::after {content:'More';font-size:12px;}
  .bank-more-menu {max-height:40dvh;overflow-y:auto;}
  .bank-review-focused .bank-actions.is-working {position:static;box-shadow:none;margin:12px 0;padding:8px 0;}
  .bank-workspace {scroll-margin-top:calc(var(--review-header-height,52px) + 12px);padding:12px;}
  .bank-workspace textarea,.bank-workspace input,.bank-workspace select,.bank-workspace [contenteditable] {font-size:16px;}
  .bank-inventory-cards {display:none;}
  .mobile-bank-list {display:grid;border:1px solid var(--rule);border-radius:14px;background:var(--bg-card);overflow:hidden;}
  .mobile-bank-row {display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:80px;padding:14px;color:var(--text);border-bottom:1px solid var(--rule);}
  .mobile-bank-row:last-child {border-bottom:0;}
  .mobile-bank-row-copy {display:grid;gap:6px;min-width:0;}
  .mobile-bank-row-copy strong {font-size:16px;line-height:1.3;}
  .mobile-bank-row-copy > span {font-size:12px;color:var(--text-3);}
  .mobile-bank-row-chevron {font-size:24px;color:var(--accent-week);}
  .bank-section > .week-head {padding-bottom:8px;}
  .bank-section > section > h3 {font-size:16px;margin:16px 0 10px;}
  body[data-view="calendar"] .week-head > .theme,body[data-view="calendar"] .week-head > .cutoff,body[data-view="calendar"] .week-head > .viewlinks,
  body[data-view="calendar"] .view-content > .content-legend,body[data-view="calendar"] .cal-note {display:none;}
  .cal-weeknav {display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:8px;margin:0;}
  .week-head.calendar-head {display:grid;grid-template-columns:minmax(0,1fr);}
  .cal-weeknav .rev-nav {min-height:44px;padding:6px;font-size:0;}
  .cal-prev::after {content:'‹';font-size:25px;}
  .cal-next::after {content:'›';font-size:25px;}
  .cal-weeknav .cal-pick > button {width:100%;min-height:44px;justify-content:center;}
  .founder-review-compact > summary {padding:10px 12px;}
  .founder-review-counts {display:block;margin:2px 0 0 16px;font-size:12px;}
  .cal-grid {display:grid;grid-template-columns:minmax(0,1fr);gap:18px;}
  .cal-day {width:100%;gap:8px;}
  .cal-day.is-empty {display:none;}
  .cal-day-head {font:600 14px var(--sans);text-transform:none;letter-spacing:0;color:var(--text-2);padding:2px 0 8px;}
  .cal-entry {block-size:12.25rem;grid-template-rows:2.75rem minmax(0,1fr) 2.75rem;padding:12px 14px;gap:8px;box-shadow:none;}
  .cal-entry .cal-title {font-size:16px;}
  .cal-entry .cal-top {display:flex;align-items:center;gap:8px;}
  .cal-entry .cal-top > .content-pills {width:auto;flex:1;gap:4px;}
  .cal-entry .content-pills .surface-pill:nth-child(n+3) {display:none;}
  .cal-entry .cal-slot {font:500 11px/1.3 var(--sans);text-align:right;max-width:110px;}
  .mobile-calendar-empty {display:block;border:1px solid var(--rule);border-radius:14px;background:var(--bg-card);padding:20px;}
  .mobile-calendar-empty p {font-size:14px;color:var(--text-3);}
  .mobile-calendar-info {display:block;margin-top:20px;font-size:13px;}
  .mobile-calendar-info > summary {min-height:44px;padding:12px 0;color:var(--accent-week);}
  .item-sheet-panel {width:100%;max-height:calc(100dvh - env(safe-area-inset-top,0px));border-radius:18px 18px 0 0;}
  body.is-keyboard-open .mobile-nav {display:none;}
  body.is-keyboard-open {--mobile-chrome-height:0px;}
  body.is-keyboard-open .bank-review-focused .bank-actions {position:static;}
  .toast-stack {bottom:calc(var(--mobile-chrome-height) + 80px);}
}

/* The installed iPhone app may add a native scroll-edge blur over the page.
   Keep brand pixels 32px below that edge; browser tabs keep their compact bar.
   This is a layout mitigation, not a claim that CSS disables the iOS effect. */
@media (max-width:640px) {
  .is-iphone-app .app-bar {min-height:calc(84px + env(safe-area-inset-top,0px));padding-top:calc(36px + env(safe-area-inset-top,0px));}
}
.install-nudge {display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 16px;padding:14px 16px;border:1px solid var(--border);border-radius:14px;background:var(--bg-card);}
.install-nudge strong {font-size:14px;}
.install-nudge p {margin:4px 0 0;font-size:12px;line-height:1.5;color:var(--text-2);}
.install-help-button {min-height:44px;padding:8px 12px;border:1px solid var(--accent-week);border-radius:10px;background:var(--bg-card);color:var(--accent-week);font:600 13px var(--sans);cursor:pointer;}
.install-help-button:focus-visible {outline:3px solid var(--accent-week);outline-offset:3px;}
.login-card .install-help-button {margin-top:14px;width:100%;}
.install-guide {padding:0 20px 24px;line-height:1.5;}
.install-guide-lede {font-size:15px;color:var(--text-2);}
.install-guide ol {padding-left:24px;}
.install-guide li {padding:5px 0 12px 4px;}
.install-guide li::marker {color:var(--accent-week);font-weight:700;}
.install-guide li strong {font-size:16px;}
.install-guide li p {font-size:14px;margin:6px 0 0;}
.install-step-symbol {display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;margin-top:8px;border:2px solid var(--accent-week);border-radius:8px;font-size:25px;color:var(--accent-week);}
.install-finish {display:flex;align-items:center;gap:12px;margin:4px 0 18px;padding:12px;border-radius:12px;background:var(--bg-soft);}
.install-finish img {flex:none;border-radius:11px;}
.install-finish p {margin:0;font-size:14px;}
.install-guide > a {display:inline-flex;align-items:center;min-height:44px;color:var(--accent-week);text-decoration:underline;font-size:13px;}
.install-sheet > .mobile-sheet-heading {position:sticky;top:0;z-index:1;background:var(--bg-card);}
.install-troubleshoot {font-size:13px;margin-bottom:8px;}
.install-troubleshoot summary {min-height:44px;display:flex;align-items:center;color:var(--accent-week);cursor:pointer;}
