/* BSP CRM on a phone (2026-10-20). Carlos: "I don't think the CRM supports a
   phone view. But I want one now." His picks from the prototypes
   (AIOS concepts/assets/bsp-crm-proto/phone-abc/): "Q1 A" (a bottom tab bar,
   the boards list on a screen of its own, More for the rest), "Q2 A" (the
   table kept: Name pinned, the other columns and the toolbar scroll
   sideways, subitems open under their item), and "Column and item details
   approved" (every menu and popover a bottom sheet, the item panel full
   screen).

   Everything here is inside one query (PHONE_MQ in src/views/shell.js, the
   same text in public/app.js and in every page stylesheet's phone block): up
   to 600px wide, or a phone turned sideways (a finger for a pointer, under
   500px tall; the fix pass, 2026-10-20), so a desktop renders exactly as
   before. Outside it this file only hides the parts that exist for the
   phone. Linked last on every page (src/views/layout.js), the sign-in pages
   included, so a rule here wins over app.css and the page stylesheets at
   equal specificity. A page of its own (My Work, Check-ins, Email Templates,
   Settings, Volume) gets its phone rules in its own stylesheet; what more
   than one page shows (the inbox sheet, the Undo toast, the sign-in card)
   is here, once.

   Craft (the taste set: apple-design, emil-design-eng): every press target is
   at least 44px and carries no callout and no text selection; the home bar and
   the notch keep their safe areas; display text keeps -0.02em tracking; sheets
   rise from the bottom on the drawer curve and fade instead when motion is
   reduced. */

.tabbar,.ph-more,.ph-h,.tb-back,.ip-rowmenu,.sheet-scrim{display:none}

@media (max-width:600px), (pointer:coarse) and (max-height:500px){
:root{--row-h:48px;--hx:16px;--ph-top:calc(44px + env(safe-area-inset-top));--ph-tab:calc(50px + env(safe-area-inset-bottom));--drawer:cubic-bezier(.32,.72,0,1)}
body{min-width:0;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}
/* iOS zooms into a field under 16px when it takes focus. */
input:not([type=checkbox]):not([type=radio]):not([type=color]),select,textarea{font-size:16px}
[contenteditable=true]{font-size:16px}

/* ------------------------------------------------------------ the shell
   The desktop pads .app by the safe areas (app.css); the phone keeps them
   part by part (the bars, the sheets, the page's sides when sideways). */
.app{display:flex;flex-direction:column;height:100vh;height:100dvh;padding:0}
.topbar{flex:none;min-height:var(--ph-top);padding:env(safe-area-inset-top) max(4px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left));gap:4px}
.tb-btn{width:44px;height:44px;border-radius:10px}
.tb-btn svg.i{width:22px;height:22px}
.badge{top:6px;right:6px}
.tb-back{display:flex;align-items:center;gap:2px;min-height:44px;margin-left:-6px;padding:0 10px 0 2px;border-radius:10px;color:var(--accent-text);font-size:17px;letter-spacing:-.01em;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;transition:background-color 120ms ease,transform 120ms var(--ease)}
.tb-back svg.i{width:24px;height:24px;stroke-width:2}
.tb-back:active{background:var(--rail-hover);transform:scale(.97)}
.tb-back+.tb-brand{display:none}
.app[data-ph-screen=ws] .tb-back,.app[data-ph-screen=fav] .tb-back,.app[data-ph-screen=more] .tb-back{display:none}
.app[data-ph-screen=ws] .tb-back+.tb-brand,.app[data-ph-screen=fav] .tb-back+.tb-brand,.app[data-ph-screen=more] .tb-back+.tb-brand{display:flex}
.tb-brand{min-height:44px;font-size:15px}
.irail,.app .rail{display:none}
/* Sideways, the notch and the rounded corners are on the left and right: the
   page keeps clear of them (both are 0 in portrait). */
.main{flex:1;margin:0 env(safe-area-inset-right) 0 env(safe-area-inset-left);border-radius:14px 14px 0 0;border-width:1px 0 0}

/* The tab bar, on the home bar's safe area (Q1 A). */
.tabbar{display:flex;flex:none;position:relative;z-index:35;padding:0 max(6px,env(safe-area-inset-right)) env(safe-area-inset-bottom) max(6px,env(safe-area-inset-left));background:var(--rail-bg);border-top:1px solid var(--line)}
.tbb{flex:1;min-width:0;min-height:50px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border-radius:10px;color:var(--rail-text-3);font-size:10px;font-weight:500;letter-spacing:.01em;line-height:1.1;text-decoration:none;white-space:nowrap;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;transition:transform 120ms var(--ease)}
.tbb svg.i{width:24px;height:24px}
.tbb:active{transform:scale(.94)}
.tbb[aria-current=page]{color:var(--accent-text);font-weight:600}
.tbb[aria-current=page] svg.i{stroke-width:2.1}

/* The boards screen (Workspace) and Favorites: the rail's two panels, over the
   page, between the top bar and the tab bar, so the board under them keeps its
   place and its scroll. */
.app[data-ph-screen=ws] .rail,.app[data-ph-screen=fav] .rail{display:flex;position:fixed;left:0;right:0;top:var(--ph-top);bottom:var(--ph-tab);z-index:30;overflow-y:auto;overscroll-behavior:contain;padding:0 max(8px,env(safe-area-inset-right)) 12px max(8px,env(safe-area-inset-left));font-size:16px}
.rail .rp{flex:1 0 auto}
.rail .blist{overflow:visible}
.ph-h{display:block;margin:6px 8px 12px;font-size:28px;line-height:1.15;letter-spacing:-.02em;font-weight:700;color:var(--rail-text)}
.ptitle{margin:6px 8px 4px;padding:0;font-size:28px;line-height:1.15;letter-spacing:-.02em}
.ws{min-height:48px;font-size:16px}
.ws-mark{width:28px;height:28px}
.navsec{padding:18px 8px 4px}
.secbtn{width:44px;height:44px;margin:-12px -10px -12px 0;border-radius:10px}
.secbtn svg.i{width:20px;height:20px}
.navitem{height:auto;min-height:48px;gap:14px;padding:0 10px;border-radius:10px;font-size:16px;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
.navitem svg.i{width:20px;height:20px}
.brow .navitem{padding-right:52px}
.bmore,.starbtn{width:44px;height:44px;margin-top:-22px;right:2px;border-radius:10px;opacity:1}
.bmore svg.i,.starbtn svg.i{width:20px;height:20px}
.fav-star svg.i{width:16px;height:16px}
.emptyline{padding:10px;font-size:15px}
.userchip{min-height:56px;padding:8px 10px;margin-top:12px;width:100%}

/* More: Email Templates, Settings, the inbox, the account. */
.app[data-ph-screen=more] .ph-more{display:flex;flex-direction:column;position:fixed;left:0;right:0;top:var(--ph-top);bottom:var(--ph-tab);z-index:30;overflow-y:auto;overscroll-behavior:contain;padding:0 max(8px,env(safe-area-inset-right)) 12px max(8px,env(safe-area-inset-left));background:var(--rail-bg);color:var(--rail-text)}
.ph-li{display:flex;align-items:center;gap:14px;width:100%;min-height:48px;padding:0 12px;border-radius:10px;color:var(--rail-text);font-size:16px;text-decoration:none;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;transition:background-color 120ms ease}
.ph-li svg.i{width:22px;height:22px;color:var(--rail-text-2)}
.ph-li svg.chev{width:18px;height:18px;color:var(--rail-text-3)}
.ph-li:active{background:var(--rail-hover)}
.ph-sec{padding:20px 12px 4px}
.ph-me{margin-top:auto;display:flex;align-items:center;gap:12px;min-height:60px;padding:8px 12px}
.ph-me .un{font-weight:600;line-height:1.2}
.ph-me .ur{font-size:13px;color:var(--rail-text-3);line-height:1.2}
/* A tap that loads another page (public/app.js): the page dims under the
   board switch's progress bar (app.css .main.switching); on More, the line
   tapped dims and the bar runs along the top of the screen. */
.ph-li.pending{opacity:.5}
/* A page that is being left may stop running animations (WebKit holds the
   timeline while the next page loads), so its pending state is drawn at
   once, not faded in: dimmed, the bar a third of the way. */
.main.leaving>*{transition:none}
.main.leaving::before,.ph-more.leaving::before{animation:none;transform:scaleX(.35)}
.ph-more.switching{pointer-events:none}
.ph-more.switching::before{content:"";position:fixed;left:0;right:0;top:var(--ph-top);height:2px;z-index:31;background:var(--accent);transform-origin:left center;animation:switchbar 1.6s var(--ease) both}

/* A popover's scrim (public/app.js): taps on it close the sheet. */
.sheet-scrim{display:block;position:fixed;inset:0;z-index:55;background:var(--backdrop);animation:ph-fade 200ms ease}

/* --------------------------------------------------------- the board (Q2 A) */
.boardhead{padding:10px 4px 0 16px;min-height:56px;gap:2px}
.boardhead h1{font-size:24px;line-height:1.15}
.boardhead .btn{min-width:44px;height:44px;padding:0 10px;justify-content:center;border-color:transparent;background:none;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
.boardhead .btn>span:not(.mcount){display:none}
.boardhead .btn svg.i{width:22px;height:22px}
.tabsrow{padding:0 8px;margin-top:2px;overflow-x:auto;scrollbar-width:none}
.tabsrow::-webkit-scrollbar{display:none}
.vtab{height:44px;flex:none;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
.vtmore,.vadd{width:44px;height:44px;flex:none}
/* The toolbar: one row that scrolls sideways (New item, Add group, Search,
   Person, Filter, Sort, Hide, Group by, then the view's chips). */
.toolbar{flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;padding:4px 8px;gap:2px;border-bottom:1px solid var(--line)}
.toolbar::-webkit-scrollbar{display:none}
.toolbar>*{flex:none}
.toolbar .btn.primary{height:40px;margin:2px 6px 2px 0;padding:0 14px;font-size:15px;font-weight:600;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
.tbtn{height:44px;padding:0 10px;font-size:15px;border-radius:8px}
.tbtn svg.i{width:18px;height:18px}
.tsearch{height:44px;font-size:15px}
.tsearch input{width:72px}
.tsearch:focus-within input,.tsearch.on input{width:150px}
.tsep{display:none}
.vnote{margin:6px 16px}
.foot{padding:0 16px}
/* The table's end clears the "N items in M groups" footer: the last group's
   status summary bar never sits on its edge. */
.tablewrap{padding-bottom:24px;scroll-padding-bottom:24px}

/* The table: the Name column pinned (its track and the row-menu strip are
   set for the phone by public/app.js: the strip is the group's color tab
   only, the row menu moved to the item panel), the rest scrolls sideways. */
.grid{width:max-content;min-width:100%!important}
.c1{padding:0}
.c1>*{display:none}
.c2{left:6px}
.hdr .c2,.r.m .c2,.addrow .c2,.sumrow .c2{padding-left:8px}
.subr .c2,.sh .c2,.sadd .c2{padding-left:24px}
.hdr{min-height:44px}
.r.m .c2 .mname,.subr .c2 .mname{font-size:15px;line-height:1.25;-webkit-line-clamp:2}
.c2 .rgrip,.c2 .rexp,.c2 .ubub,.colresize,.hsort,.dclear,.hc .tip{display:none}
.subtog{width:32px;height:44px;margin:0 -4px 0 -6px;border-radius:8px}
.subtog svg.i{width:16px;height:16px}
.subtog.empty{opacity:.35}
.subcount{min-width:24px;height:24px;line-height:24px;padding:0 7px;border-radius:12px;font-size:12px;text-align:center}
.hmore{opacity:1;width:32px;height:40px}
.addcolbtn{width:44px;height:44px}
.hc .hname{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
/* A finger leaves :hover on what it tapped: the desktop's hover looks stay
   off the table, or the last row tapped would stay lit. */
.r.m:not(.sel):hover{--rowbg:var(--surface)}
.cc:not(.reqe):not(.editing):hover{box-shadow:none}
.subtog:hover,.hname:hover,.mname:hover,.gname:hover{background:none;border-color:transparent}
/* The group header stays in view as the table scrolls sideways: the toggle,
   the name, the count, and the menu at the right edge. */
.gh{width:calc(100vw - 2px - env(safe-area-inset-left) - env(safe-area-inset-right));height:48px;margin-top:4px;padding-left:0;gap:0}
.gtoggle{width:44px;height:44px;border-radius:10px}
.gname{min-width:0;font-size:17px;letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
.gchip{display:none}
.gcount{opacity:1;flex:none;margin-left:6px}
.gmore{order:9;margin-left:auto;width:44px;height:44px;border-radius:10px;opacity:1}
.gmore svg.i{width:20px;height:20px}
.vgroup .gh{padding-left:12px}
.additem{height:44px;padding:0 8px;font-size:15px}
.addgroup{height:44px;font-size:15px}
.sumrow{min-height:48px}
.subdel{width:44px;height:44px;opacity:1}
.subs .sh{min-height:40px}
/* The subitem header's chip, Carlos's pick "B" (2026-10-20): "Subitem" on
   the first line, the chip on a line of its own the pinned column's full
   width. In the default mode public/board.js cuts the board name by
   measurement to fit ("Merchant Pipeli... Columns", the full name in its
   title and accessible name); the activated mode keeps decision 33 (the row
   in the group's color, the chip light gray, "Subitem Columns"). */
.sh .c2{flex-wrap:wrap;align-content:center;gap:6px 8px;padding:8px 8px 8px 12px}
.sh .c2 .shname{flex:1 0 100%;font-size:13px;line-height:18px}
.sh .c2 .scmode{flex:1 1 100%;display:block;height:32px;line-height:32px;padding:0 10px;border-radius:16px;font-size:12px;font-weight:500;text-align:center}
.subs.own>.sh .c2 .scmode.own{background:#e8eaf0;color:#323338}

/* ----------------------------------------- every menu as a bottom sheet
   public/app.js gives each menu, picker and popover the class "sheet" on a
   phone instead of placing it at its anchor. The !important beats the
   left, top and widths a script set inline for the desktop placement. */
.menu.sheet{left:0!important;right:0!important;top:auto!important;bottom:var(--kb,0px)!important;width:auto!important;min-width:0!important;max-width:none!important;max-height:min(85vh,85dvh,calc(var(--vv-h,100dvh) - 12px));overflow-y:auto;overscroll-behavior:contain;z-index:60;padding:6px max(8px,env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));border-width:1px 0 0;border-radius:16px 16px 0 0;box-shadow:0 -6px 24px rgba(0,0,0,.14);font-size:16px;transform-origin:bottom center;animation:ph-sheet 300ms var(--drawer)}
.menu.sheet::before{content:"";display:block;width:36px;height:5px;border-radius:3px;background:var(--line-strong);margin:2px auto 10px}
/* With the keyboard up the sheet sits on it (bottom:var(--kb), public/app.js
   fitViewport) and is no taller than what the keyboard leaves (--vv-h).
   A submenu takes its parent's place: the parent waits under it, unseen, and
   comes back with the submenu's back button or Back. */
.menu.sheet.under{visibility:hidden}
.sheet-h{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 0 4px 12px}
.sheet-h.sub{padding-left:0}
.sheet-h b{flex:1;min-width:0;font-size:17px;font-weight:600;letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sheet-x{display:grid;place-items:center;width:44px;height:44px;flex:none;border-radius:10px;color:var(--text-2);-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;transition:background-color 120ms ease,transform 120ms var(--ease)}
.sheet-x svg.i{width:20px;height:20px}
.sheet-x:active{background:var(--surface-2);transform:scale(.94)}
.menu.sheet .mi{min-height:48px;gap:14px;padding:0 12px;border-radius:10px;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
.menu.sheet .mi svg.i{width:20px;height:20px}
.menu.sheet .mi .chev,.menu.sheet .mi .ck{width:18px;height:18px}
.menu.sheet .msep{margin:4px 12px}
.menu.sheet .mh{padding:8px 12px 4px;font-size:12px}
.menu.sheet.inbox{padding-left:0;padding-right:0}
.menu.sheet .inbox-list{max-height:none}
.menu.sheet.typepick .tp-grid{grid-template-columns:1fr 1fr}
.menu.sheet.picker .opt .pill{height:44px;font-size:15px}
.menu.sheet .cpick{width:auto}
.menu.sheet .cpal{grid-template-columns:repeat(5,44px);gap:8px}
.menu.sheet .csw{width:44px;height:44px;border-radius:10px}
.menu.sheet .le-row{height:48px}
.menu.sheet .le-x,.menu.sheet .le-chip,.menu.sheet .le-grip{width:44px;height:44px}
.menu.sheet .btn{min-height:44px}
/* A popover's buttons (Apply, Clear) stay at the sheet's foot while it
   scrolls, so with the keyboard up they are still in view. */
.menu.sheet>.acts{position:sticky;bottom:0;z-index:1;background:var(--surface);box-shadow:0 -1px 0 var(--line)}
.menu.sheet{scroll-padding:8px 0 72px}
.menu.sheet .vx{width:44px;height:44px}

/* -------------------------------------------- the item panel, full screen
   Its top bar (close, Templates, the row menu) stays at the top while the
   panel scrolls; the fields read as label and value rows (the approved
   default). No slide: the panel redraws in place after every edit. */
.ipanel{position:fixed;inset:0;z-index:45;width:auto;border:0;box-shadow:none;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
.ip-head{display:contents}
.ip-head>*{flex:none;margin-left:16px;margin-right:16px}
.ip-head>.ip-top{position:sticky;top:0;z-index:6;margin:0;height:48px;padding:0 4px;gap:4px;background:var(--surface);border-bottom:1px solid var(--line)}
.ip-close,.ip-rowmenu{display:grid;place-items:center;width:44px;height:44px;margin:0;border-radius:10px;color:var(--text-2);-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;transition:background-color 120ms ease,transform 120ms var(--ease)}
.ip-close svg.i,.ip-rowmenu svg.i{width:22px;height:22px}
.ip-close:active,.ip-rowmenu:active{background:var(--surface-2);transform:scale(.94)}
.ip-btn{height:36px;padding:0 12px;font-size:14px}
.ip-name{margin-top:14px}
.ip-fields{grid-template-columns:minmax(0,1fr);gap:0;padding:8px 16px}
.ip-more{grid-template-columns:minmax(0,1fr);gap:0}
.ip-field{display:flex;align-items:center;gap:8px;min-height:52px;border-bottom:1px solid var(--line)}
.ip-label{width:112px;flex:none;margin:0;font-size:13px}
.cc.ip-val{flex:1;min-width:0;height:44px;margin:0;font-size:15px}
.cc.ip-val.c-pill{flex:0 1 200px;height:36px}
.cc.ip-val.c-pill .pill{height:36px;font-size:14px}
.ip-all{min-height:44px;margin-top:4px}
.ip-subs{padding:0 16px 16px}
.ip-tabs{top:48px;gap:24px;padding:0 16px}
.ip-tab{min-height:44px;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
.ip-body{padding:16px}
.fdel{opacity:1;width:44px;height:44px}
.ip-scr{width:36px;height:36px;top:calc(50% - 18px)}

/* ------------------------------------------- the kanban and the calendar
   Nothing is dragged on a phone (public/views.js): a finger on a card or a
   chip scrolls, a tap opens the item, its Status or date field in the panel
   moves it. The lanes are most of the screen wide and snap one at a time;
   the month scrolls sideways with days wide enough to read a name in, each
   chip a 44px target; "No date" goes under the month. */
.kbar{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding:4px 16px;white-space:nowrap}
.kbar::-webkit-scrollbar{display:none}
.kbar>*{flex:none}
.kbar .tbtn{height:44px}
.klanes{gap:12px;padding:4px 16px 16px;scroll-snap-type:x mandatory;scroll-padding:0 16px;overscroll-behavior-x:contain}
.klane{flex:0 0 min(calc(100vw - 56px),360px);max-width:none;scroll-snap-align:start}
.kcard{min-height:44px;touch-action:manipulation;cursor:default;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;transition:transform 120ms var(--ease),border-color 120ms ease}
.kcard:active{transform:scale(.98)}
.kcard:hover{border-color:var(--line);box-shadow:none}
.kname{min-height:24px;font-size:16px;text-align:left}
.kfield{font-size:14px}
.calbar{flex-wrap:wrap;gap:8px 12px;padding:8px 16px}
.calbar .btn{min-width:44px;height:44px}
.seg2 button{height:40px}
.calbody{display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden}
.calgrid{flex:none;overflow-x:auto;overflow-y:visible;overscroll-behavior-x:contain}
.calhead,.calweek{grid-template-columns:repeat(7,minmax(112px,1fr));min-width:784px}
.calweek{flex:none;min-height:104px}
.calgrid.wk .calweek{flex:none;min-height:240px}
.calday{padding:4px}
.calnum{font-size:13px}
.calchip{height:44px;padding:0 8px;border-radius:8px;font-size:14px;touch-action:manipulation;cursor:default;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;transition:transform 120ms var(--ease)}
.calchip:active{transform:scale(.97)}
.calchip:hover{border-color:var(--line);box-shadow:none}
.calaside{border-left:0;padding:12px 16px 16px}
.calaside h3{font-size:16px}
.calaside p{font-size:14px}

/* ----------------------------------------- the inbox (every page's top bar)
   A bottom sheet; its head (name, count, the close button) stays at the top
   while the lines scroll; each line is a 64px press target with 16px type. */
.menu.sheet.inbox .inbox-h{position:sticky;top:0;z-index:1;display:flex;align-items:center;gap:8px;min-height:48px;padding:0 4px 0 16px;background:var(--surface)}
.menu.sheet.inbox .inbox-h b{font-size:17px}
.menu.sheet.inbox .inbox-h span{flex:1;font-size:13px}
.menu.sheet.inbox a.irow{min-height:64px;padding:12px 16px;gap:12px;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
.menu.sheet.inbox a.irow:active{background:var(--surface-2)}
.menu.sheet.inbox .irow .udot{margin-top:7px}
.menu.sheet.inbox .irow .it1{font-size:16px;line-height:1.3}
.menu.sheet.inbox .irow .it2{font-size:14px}
.menu.sheet.inbox .irow .it3{font-size:13px;margin-top:3px}
.menu.sheet.inbox .inbox-empty{padding:40px 28px 44px}
.menu.sheet.inbox .inbox-empty b{font-size:17px}
.menu.sheet.inbox .inbox-empty span{font-size:15px;line-height:1.4;max-width:300px}

/* ------------------------------------- sign in and change password */
.authwrap{grid-template-columns:minmax(0,1fr);padding:max(24px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}
.authcard{justify-self:center;width:100%;max-width:440px;padding:24px 20px 20px}
.authform .fld input{height:48px;padding:0 12px;border-radius:10px;font-size:16px}
.authbtn{height:48px;font-size:16px;font-weight:600;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
.authfoot .lnk{display:grid;place-items:center;min-height:44px;padding:0 16px;font-size:16px;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}

/* The rest of what floats. The Undo toast's Undo is a 44px target; with the
   keyboard up the toast stays above it. */
.toast{display:flex;align-items:center;width:max-content;min-height:48px;padding:0 16px;font-size:15px;bottom:calc(max(var(--ph-tab),var(--kb,0px)) + 12px);max-width:calc(100vw - 24px)}
.toast-act{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;margin:0 -8px 0 4px;padding:0 12px;border-radius:8px;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
.dlg{max-width:calc(100vw - 24px)}
.dlg-body{padding:18px 16px 16px}
.dlg .btn{min-height:44px}
.overlay{width:100vw;height:100vh;height:100dvh;border-radius:0}

/* Sideways (under 500px tall) the chrome gives the table its height back:
   the board's head is one compact band, the tab bar puts each label beside
   its icon (as iOS does sideways), and the "N items in M groups" line goes
   (the group headers carry their counts). Every target stays 44px. */
@media (max-height:500px){
:root{--ph-tab:calc(44px + env(safe-area-inset-bottom))}
.boardhead{min-height:44px;padding-top:0}
.boardhead h1{font-size:20px}
.toolbar{padding-top:0;padding-bottom:0}
.tbb{flex-direction:row;gap:6px;min-height:44px;font-size:12px}
.tbb svg.i{width:22px;height:22px}
.main>.page>.foot,.main .foot{display:none}
}

@keyframes ph-sheet{from{transform:translateY(100%)}to{transform:none}}
@keyframes ph-fade{from{opacity:0}to{opacity:1}}
@media (prefers-reduced-motion:reduce){
.menu.sheet{animation:ph-fade 150ms ease}
.tbb,.tb-back,.ph-li,.kcard,.calchip{transition:none}
.ph-more.switching::before{animation:none;opacity:.6}
}
}
