/* The phone layer. Loaded last. Wide screens are untouched except for hiding the dock.
   On a phone the top links move to a dock at the bottom, where a thumb reaches,
   and everything keeps clear of the iPhone notch and home bar. */
.dock{display:none}
.sheet-links{display:grid;gap:0}
.sheet-links a,.sheet-links button{display:flex;flex-direction:column;gap:3px;text-align:left;padding:16px 4px;border:0;border-bottom:1px solid var(--line);background:none;color:var(--ink);cursor:pointer;font:inherit}
.sheet-links b{font:500 19px var(--serif)}
.sheet-links span{font:400 13px var(--sans);color:var(--muted)}
html{-webkit-text-size-adjust:100%}
body{-webkit-tap-highlight-color:transparent}

@media (max-width:760px){
 html{scroll-padding-top:12px}
 body{padding-bottom:calc(74px + env(safe-area-inset-bottom));padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
 body.gate{padding-bottom:env(safe-area-inset-bottom)}
 /* top bar: the name and the round window only */
 body:not(#w) .topbar{padding:calc(14px + env(safe-area-inset-top)) 20px 0;flex-wrap:nowrap;align-items:center}
 body:not(#w) .topnav{display:none}
 body:not(#w) .topright{margin-left:auto}
 body:not(#w) .ocu{width:44px;height:44px}
 .dock{position:fixed;left:0;right:0;bottom:0;z-index:60;display:grid;grid-template-columns:repeat(5,1fr);padding:6px 6px calc(6px + env(safe-area-inset-bottom));background:color-mix(in srgb,var(--paper) 90%,transparent);-webkit-backdrop-filter:blur(18px) saturate(1.3);backdrop-filter:blur(18px) saturate(1.3);border-top:1px solid var(--line)}
 .dock a,.dock button{min-height:54px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border:0;background:none;padding:0;color:var(--muted);font:600 10px var(--sans);letter-spacing:.08em;text-transform:uppercase;cursor:pointer;position:relative}
 .dock .icon{width:23px;height:23px;stroke-width:1.5}
 .dock .active{color:var(--ink)}
 .dock .active:before{content:'';position:absolute;top:-7px;left:50%;width:22px;height:2px;margin-left:-11px;background:var(--gold)}
 body.lectern-open .dock,body.focus .dock{display:none}
 .pills{bottom:calc(78px + env(safe-area-inset-bottom))}
 #toast{bottom:calc(140px + env(safe-area-inset-bottom))!important}
 /* typing never zooms the page: iOS zooms when a field's text is under 16px */
 input,select,textarea{font-size:16px!important}
 /* comfortable touch targets */
 .btn{min-height:44px}
 .tabs a{min-height:44px;display:inline-flex;align-items:center}
 .tabs{overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;flex-wrap:nowrap}
 .tabs::-webkit-scrollbar{display:none}
 .tabs a{white-space:nowrap;flex:none}
 /* dialogs rise from the bottom like a sheet */
 dialog#dialog{margin:auto 0 0;width:100%;max-width:100%;max-height:88dvh;border-left:0;border-right:0;border-bottom:0;border-radius:18px 18px 0 0;padding-bottom:calc(20px + env(safe-area-inset-bottom));overflow-y:auto}
 dialog#dialog .form-grid{grid-template-columns:minmax(0,1fr)}
 dialog#dialog .form-foot{position:sticky;bottom:0;background:var(--paper);padding-top:12px}
 .page{padding-left:20px!important;padding-right:20px!important}
 .footer{padding-bottom:10px}
 .guestbar{top:env(safe-area-inset-top)}
}
