/* Version 61: app mode (home-screen app). Everything here applies only with html.app-mode, except the install offer. */
.app-tabbar,.app-topbar{display:none}
html.app-mode body{padding-top:0;padding-bottom:calc(66px + env(safe-area-inset-bottom,0px))}
html.app-mode header,html.app-mode main>nav:first-child{position:sticky;top:0;z-index:50;display:flex;align-items:center;gap:8px;flex-wrap:nowrap;padding:calc(8px + env(safe-area-inset-top,0px)) max(12px,env(safe-area-inset-right,0px)) 8px max(12px,env(safe-area-inset-left,0px));background:#fffdf9;border-bottom:1px solid #eee6dd;margin:0}
html.app-mode header .brand,html.app-mode main>nav:first-child .brand{margin-right:auto;white-space:nowrap}
html.app-mode header nav{display:flex;width:auto;margin:0}
/* The tabs replace the website menu; the account menu (welcome, sign out) stays. */
html.app-mode header nav>a,html.app-mode header nav>button,html.app-mode main>nav:first-child>a:not(.brand),html.app-mode header .region{display:none!important}
html.app-mode .app-topbar{display:flex;position:sticky;top:0;z-index:50;align-items:center;gap:8px;padding:calc(8px + env(safe-area-inset-top,0px)) 12px 8px;background:#fffdf9;border-bottom:1px solid #eee6dd;font-weight:700;color:#253b3d}
html.app-mode .app-topbar .brand{color:#253b3d;text-decoration:none}
html.app-mode.app-root .app-back{display:none}
.app-back{flex:none;width:40px;height:40px;display:grid;place-items:center;border:0;border-radius:10px;background:transparent;color:#204b50;padding:0;cursor:pointer}
.app-back svg,.app-tabbar svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
html.app-mode .app-tabbar{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;position:fixed;left:0;right:0;bottom:0;z-index:900;background:#fffdf9;border-top:1px solid #e5d9cb;padding:6px max(4px,env(safe-area-inset-right,0px)) calc(6px + env(safe-area-inset-bottom,0px)) max(4px,env(safe-area-inset-left,0px));box-shadow:0 -6px 20px #253b3d12}
.app-tabbar a{display:grid;justify-items:center;align-content:center;gap:2px;min-height:48px;font:600 11px/1.2 system-ui,-apple-system,"Segoe UI",sans-serif;color:#657078;text-decoration:none;border-radius:10px}
.app-tabbar a[aria-current="page"]{color:#204b50;background:none!important;box-shadow:none!important}
.app-tabbar a[aria-current="page"] svg{stroke-width:2.4}
.app-tabbar a:focus-visible,.app-back:focus-visible{outline:3px solid #846b58;outline-offset:2px}
/* Floating buttons and notices sit above the tabs. */
html.app-mode .wendy-launch,html.app-mode .request-alert,html.app-mode #compareBar{bottom:calc(76px + env(safe-area-inset-bottom,0px))}
html.app-mode #toast{top:calc(64px + env(safe-area-inset-top,0px))}
/* Phone-sized details, forms and taps inside the app. */
@media (max-width:820px){
  html.app-mode dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
  html.app-mode input,html.app-mode select,html.app-mode textarea{font-size:16px}
  html.app-mode button,html.app-mode .button,html.app-mode a.panel{min-height:44px}
  html.app-mode .account-menu summary{padding:10px 8px}
}
@media print{.app-tabbar,.app-topbar,.app-back,.app-install{display:none!important}html.app-mode body{padding:0}}
/* Install offer on the website (phone browsers only, shown once until dismissed). */
.app-install{position:fixed;left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom,0px));z-index:1000;display:grid;grid-template-columns:44px minmax(0,1fr);gap:8px 12px;align-items:center;padding:14px;border-radius:16px;background:#fffdf9;color:#253b3d;border:1px solid #e5d9cb;box-shadow:0 14px 34px -12px #0005;font:15px/1.4 system-ui,-apple-system,"Segoe UI",sans-serif}
.app-install img{width:44px;height:44px;border-radius:11px}
.app-install p{margin:2px 0 0;color:#657078;font-size:14px}
.app-install-actions{grid-column:1/-1;display:flex;gap:8px;justify-content:flex-end}
.app-install button{border:1px solid #d8c9bd;border-radius:10px;padding:10px 14px;min-height:44px;font:600 14px system-ui,sans-serif;background:#f2ece6;color:#143748;cursor:pointer}
.app-install button.add{background:#204b50;border-color:#204b50;color:#fffdf9}
