/* The client dashboard on phones (phone.js; docs/PHONE-LAYOUT.md). Up to 800px wide the dashboard
   swaps its sidebar for an app layout built for each kind of business (service, booking, store,
   portfolio). html[data-os="ios"]: Liquid Glass (floating glass tab bar, + menu, glass sheets).
   html[data-os="android"]: Material 3 in the High Desert colors (search bar, nav bar, FAB, bottom sheets).
   Class names start with p- so they never collide with app.css's shared classes. */

body.is-phone { background: var(--sand-100); }
body.is-phone .tenant { display: block; min-height: 100dvh; }
body.is-phone .support { position: relative; z-index: 12; }
.p-app { --p-top: env(safe-area-inset-top, 0px); --p-bot: env(safe-area-inset-bottom, 0px); --p-ease: cubic-bezier(.2, .7, .3, 1); --p-accent: var(--rust-600); max-width: var(--p-w); margin: 0 auto; position: relative; }
:root { --p-w: 560px; --p-bar: 560px; }
.p-main { padding: calc(var(--p-top) + 108px) 16px calc(var(--p-bot) + 130px); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.p-main.main { max-width: none; }
.p-main > * { min-width: 0; }

/* headings */
.p-head { display: flex; flex-direction: column; gap: 6px; padding: 0 4px; }
.p-eyebrow { font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-600); }
.p-title { margin: 0; font: 400 64px/.88 var(--display); text-transform: uppercase; text-wrap: balance; overflow-wrap: anywhere; }
.p-title--52 { font-size: 52px; }
.p-label { font: 600 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-600); padding: 6px 4px 0; }
.p-intro { margin: 0; padding: 0 4px; font-size: 14px; color: var(--ink-600); }
.p-h3 { margin: 0; font: 400 28px/.9 var(--display); text-transform: uppercase; }
.p-muted { color: var(--ink-600); }
.p-small { font-size: 13px; color: var(--ink-600); }
.p-meta { font: 500 11px var(--mono); color: var(--ink-500); white-space: nowrap; }
.p-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.p-row--wrap { flex-wrap: wrap; }
.p-row--between { justify-content: space-between; }
.p-grow { flex: 1; min-width: 0; }
.p-stack { display: flex; flex-direction: column; gap: 10px; }
.p-stack-xs { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.p-clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-hostpill { align-self: flex-start; margin-left: 4px; display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--sand-50); font: 500 12px var(--mono); max-width: 100%; }
.p-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sage-600); flex: none; }
.p-dot.is-off { background: var(--rust-600); }
.p-dot.is-new { background: var(--rust-600); margin-top: 6px; }
.p-dot.is-read { background: transparent; margin-top: 6px; }

/* cards and lists */
.p-card { background: var(--sand-50); border-radius: 22px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.p-card--ink { background: var(--ink-900); color: var(--sand-100); }
.p-card--ink .p-small, .p-card--ink .p-muted { color: var(--ink-300); }
.p-card--sage { background: var(--sage-600); color: var(--sand-50); }
.p-card--warn { background: var(--warn-bg); color: var(--warn-ink); }
.p-card--warn strong, .p-card--warn .p-small { color: var(--warn-ink); }
.p-card--tap { cursor: pointer; border: 0; text-align: left; font: inherit; color: inherit; text-decoration: none; width: 100%; }
.p-cardlabel { font: 600 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-600); }
.p-card--ink .p-cardlabel { color: var(--rust-400); }
.p-card--sage .p-cardlabel { color: var(--sage-100); }
.p-list { background: var(--sand-50); border-radius: 22px; padding: 2px 16px; display: flex; flex-direction: column; }
.p-li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border: 0; border-top: 1px solid var(--line); background: none; width: 100%; text-align: left; font: inherit; color: inherit; text-decoration: none; cursor: pointer; min-width: 0; }
.p-list > .p-li:first-child { border-top: 0; }
.p-li--static { cursor: default; }
.p-li--top { align-items: flex-start; }
.p-li__title { font-size: 16px; font-weight: 600; }
.p-li__sub { font-size: 13px; color: var(--ink-600); }
.p-chev { flex: none; width: 16px; height: 16px; color: var(--ink-400); }
.p-empty { margin: 0; padding: 18px; background: var(--sand-50); border-radius: 22px; color: var(--ink-600); font-size: 14px; }
.p-kv { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 15px; }
.p-list > .p-kv:first-child { border-top: 0; }
.p-kv span:last-child { color: var(--ink-600); text-align: right; }

/* numbers */
.p-big84 { font: 400 84px/.85 var(--display); text-transform: uppercase; }
.p-big52 { font: 400 52px/.85 var(--display); }
.p-big44 { font: 400 44px/.85 var(--display); }
.p-up { font-size: 13.5px; font-weight: 600; color: var(--sage-600); }
.p-minis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.p-mini { background: var(--sand-50); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 6px; border: 0; text-align: left; font: inherit; color: inherit; min-width: 0; }
button.p-mini { cursor: pointer; }
.p-mini b { font: 400 34px/.9 var(--display); }
.p-mini span { font-size: 12.5px; line-height: 1.25; color: var(--ink-600); }
.p-mini.is-rust b { color: var(--rust-600); }
.p-mini.is-sage b { color: var(--sage-600); }
.p-bars { display: flex; align-items: flex-end; gap: 4px; height: 56px; }
.p-bars span { flex: 1; min-height: 4px; border-radius: 4px 4px 2px 2px; background: var(--sand-500); }
.p-bars span.is-now { background: var(--rust-600); }
.p-card--ink .p-bars span { background: rgba(243, 236, 224, .22); }
.p-card--ink .p-bars span.is-now { background: var(--rust-400); }
.p-progress { height: 6px; border-radius: 999px; background: rgba(243, 236, 224, .2); overflow: hidden; }
.p-progress i { display: block; height: 100%; background: var(--rust-600); border-radius: inherit; }

/* buttons */
.p-btn { border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; font: 600 13.5px var(--body); text-decoration: none; white-space: nowrap; color: var(--ink-900); background: none; }
.p-btn:disabled { opacity: .5; cursor: default; }
.p-btn--xs { height: 30px; padding: 0 12px; font-size: 13px; }
.p-btn--rust { background: var(--rust-600); color: var(--sand-50); }
.p-btn--ink { background: var(--ink-900); color: var(--sand-100); }
.p-btn--outline { box-shadow: inset 0 0 0 1.5px var(--ink-900); }
.p-btn--outline-rust { color: var(--rust-600); box-shadow: inset 0 0 0 1.5px var(--rust-600); }
.p-btn--outline-light { color: var(--sand-100); box-shadow: inset 0 0 0 1.5px rgba(243, 236, 224, .5); }
.p-btn--ghost { padding: 0 8px; }
.p-btn--text { color: var(--rust-600); padding: 0 6px; }
.p-btn--sand { background: var(--sand-200); }
.p-btn--lg { height: 50px; font-size: 16px; padding: 0 20px; }
.p-btn--block { width: 100%; }
.p-signout { height: 52px; border-radius: 22px; background: var(--sand-50); color: var(--rust-600); font-size: 16px; width: 100%; }
.p-foot { text-align: center; font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-500); padding: 4px 0 8px; }

/* chips, segments, switches */
.p-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font: 600 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.p-chip--rust { background: var(--rust-600); color: var(--sand-50); }
.p-chip--ink { background: var(--ink-900); color: var(--sand-100); }
.p-chip--sage { background: var(--sage-100); color: var(--sage-ink); }
.p-chip--ochre { background: var(--ochre-100, #f6ead2); color: var(--ochre-ink, #7a520c); }
.p-chip--off { background: var(--sand-300); color: var(--ink-600); }
.p-chip--warn { background: var(--warn-bg); color: var(--warn-ink); }
.p-seg { display: flex; padding: 3px; border-radius: 999px; background: var(--sand-300); }
.p-seg button { flex: 1; border: 0; cursor: pointer; height: 32px; border-radius: 999px; font: 600 13.5px var(--body); background: none; color: var(--ink-900); white-space: nowrap; padding: 0 6px; }
.p-seg button[aria-pressed="true"] { background: var(--sand-50); box-shadow: 0 1px 3px rgba(31, 26, 22, .12); }
.p-switch { width: 51px; height: 31px; border: 0; border-radius: 999px; padding: 2px; cursor: pointer; display: flex; flex: none; background: rgba(31, 26, 22, .16); transition: background .2s; }
.p-switch::after { content: ""; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); transition: transform .18s var(--p-ease); }
.p-switch[aria-checked="true"] { background: var(--sage-600); }
.p-switch[aria-checked="true"]::after { transform: translateX(20px); }
.p-switch:disabled { opacity: .5; }
.p-card--sage .p-switch[aria-checked="true"] { background: rgba(251, 247, 240, .35); }

/* inputs */
.p-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.p-field > span { font: 600 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-600); padding: 0 4px; }
.p-input, .p-textarea { width: 100%; border: 0; border-radius: 16px; background: var(--sand-50); padding: 0 16px; font: 500 16px var(--body); color: var(--ink-900); }
.p-input { height: 48px; }
.p-textarea { padding: 14px 16px; line-height: 1.45; resize: none; font-weight: 400; font-size: 15.5px; }
.p-card .p-input, .p-card .p-textarea { background: var(--sand-200); }
.p-card--ink .p-textarea { background: var(--ink-800); color: var(--sand-100); }
.p-input:focus, .p-textarea:focus { outline: 2px solid var(--rust-600); outline-offset: 0; }
.p-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.p-pick { border: 0; cursor: pointer; height: 36px; padding: 0 14px; border-radius: 999px; font: 600 13.5px var(--body); background: var(--sand-50); color: var(--ink-900); }
.p-pick[aria-pressed="true"] { background: var(--ink-900); color: var(--sand-100); }

/* tiles (initials) and images */
.p-tile { display: grid; place-items: center; flex: none; background: var(--sand-300); color: var(--ink-900); font: 400 18px var(--display); text-transform: uppercase; overflow: hidden; }
.p-tile img { width: 100%; height: 100%; object-fit: cover; }
.p-tile--40 { width: 40px; height: 40px; border-radius: 50%; font-size: 20px; }
.p-tile--36 { width: 36px; height: 36px; border-radius: 10px; }
.p-tile--52 { width: 52px; height: 52px; border-radius: 50%; background: var(--rust-600); color: var(--sand-50); font-size: 26px; }
.p-stripes { background: repeating-linear-gradient(135deg, var(--sand-400) 0 8px, var(--sand-450) 8px 16px); }
.p-img { position: relative; overflow: hidden; border-radius: 16px; }
.p-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.p-tag { position: absolute; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font: 600 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; background: rgba(251, 247, 240, .6); color: var(--ink-900); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), inset 0 0 0 .5px rgba(255, 255, 255, .6); }
.p-tag--rust { background: rgba(194, 70, 31, .82); color: var(--sand-50); }

/* site preview */
.p-preview { background: var(--sand-300); border-radius: 22px; padding: 20px 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.p-phone { width: 206px; border-radius: 32px; background: var(--ink-900); padding: 6px; box-shadow: 0 20px 40px -24px rgba(31, 26, 22, .6); }
.p-phone__screen { border-radius: 26px; background: var(--sand-50); overflow: hidden; display: flex; flex-direction: column; }
.p-phone__url { font: 500 9px var(--mono); color: var(--ink-500); text-align: center; padding: 10px 6px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-phone__banner { background: var(--brand, var(--rust-600)); color: var(--brand-on, var(--sand-50)); font-size: 10.5px; font-weight: 600; line-height: 1.3; padding: 6px 10px; text-align: center; }
.p-phone__hero { height: 104px; }
.p-phone__hero img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.p-phone__body { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.p-phone__name { font: 400 19px/1 var(--display); text-transform: uppercase; overflow-wrap: anywhere; }
.p-phone__status { display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 600; }
.p-phone__status .p-dot { width: 6px; height: 6px; }
.p-phone__cta { margin-top: 4px; height: 28px; border-radius: 999px; background: var(--brand, var(--rust-600)); color: var(--brand-on, var(--sand-50)); display: grid; place-items: center; font-size: 11px; font-weight: 600; }
.p-preview__cap { font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-600); }

/* ---------- chrome ---------- */
.p-fade { position: fixed; z-index: 5; left: 0; right: 0; top: 0; height: calc(var(--p-top) + 120px); background: linear-gradient(var(--sand-100) 40%, rgba(243, 236, 224, 0)); pointer-events: none; }
.p-top { position: fixed; z-index: 10; top: calc(var(--p-top) + 12px); left: 0; right: 0; max-width: var(--p-w); margin: 0 auto; padding: 0 16px; height: 44px; display: flex; align-items: center; justify-content: space-between; }
.p-avatar { width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer; display: grid; place-items: center; background: var(--rust-600); color: var(--sand-50); font: 400 20px var(--display); flex: none; text-transform: uppercase; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 6px 18px -8px rgba(31, 26, 22, .35); }
/* Account (☰): a round glass button where a profile picture would be; Android has it at the end of the search bar. */
.p-menubtn { position: relative; width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer; display: grid; place-items: center; flex: none; color: var(--ink-900); text-decoration: none; background: none; }
.p-glass { background: rgba(251, 247, 240, .45); -webkit-backdrop-filter: blur(18px) saturate(1.9); backdrop-filter: blur(18px) saturate(1.9); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 0 0 .5px rgba(255, 255, 255, .7), 0 6px 18px -8px rgba(31, 26, 22, .3); }
.p-back { height: 44px; border: 0; border-radius: 999px; cursor: pointer; display: flex; align-items: center; gap: 2px; padding: 0 16px 0 10px; font: 600 15px var(--body); color: var(--ink-900); max-width: 60%; }
.p-back span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-search { position: absolute; right: 16px; top: 0; height: 44px; width: 44px; border-radius: 999px; display: flex; align-items: center; overflow: hidden; transition: width .4s var(--p-ease); z-index: 2; }
.p-search.is-open { width: calc(100% - 32px); }
.p-search button { width: 44px; height: 44px; flex: none; border: 0; background: none; cursor: pointer; display: grid; place-items: center; color: var(--ink-900); }
.p-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font: 500 16px var(--body); color: var(--ink-900); }
.p-search .p-x { color: var(--ink-600); }
.p-appbar { display: none; }
.p-tabbar { position: fixed; z-index: 10; left: 0; right: 0; bottom: calc(var(--p-bot) + 16px); max-width: var(--p-bar); margin: 0 auto; padding: 0 16px; display: flex; gap: 10px; }
.p-tabbar__pill { flex: 1; height: 64px; border-radius: 999px; display: flex; align-items: center; padding: 4px; min-width: 0; background: rgba(251, 247, 240, .42); -webkit-backdrop-filter: blur(20px) saturate(1.9); backdrop-filter: blur(20px) saturate(1.9); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 -1px 0 rgba(255, 255, 255, .3), inset 0 0 0 .5px rgba(255, 255, 255, .7), 0 10px 30px -10px rgba(31, 26, 22, .35); }
.p-tab { position: relative; flex: 1; min-width: 0; height: 56px; border-radius: 999px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--ink-900); text-decoration: none; transition: background .2s; }
.p-tab span { font-size: 11px; font-weight: 600; white-space: nowrap; }
.p-tab[aria-current="page"] { background: rgba(31, 26, 22, .08); color: var(--rust-600); }
.p-tab__ind { display: contents; }
.p-badge { position: absolute; top: 5px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--rust-600); color: var(--sand-50); font-size: 10px; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.p-plus { width: 48px; height: 48px; margin: 0 4px; border: 0; border-radius: 50%; cursor: pointer; display: grid; place-items: center; color: var(--sand-50); flex: none; background: rgba(194, 70, 31, .82); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 0 0 .5px rgba(255, 255, 255, .35), 0 10px 30px -10px rgba(194, 70, 31, .6); }
.p-plus svg { transition: transform .3s var(--p-ease); }
.p-plus[aria-expanded="true"] svg { transform: rotate(45deg); }
.p-scrim { position: fixed; inset: 0; z-index: 20; background: rgba(31, 26, 22, .12); opacity: 0; pointer-events: none; transition: opacity .25s; }
.p-scrim.is-on { opacity: 1; pointer-events: auto; }
.p-menu { position: fixed; z-index: 21; left: 50%; bottom: calc(var(--p-bot) + 92px); width: 270px; border-radius: 30px; padding: 6px; display: flex; flex-direction: column; transform-origin: bottom center; transform: translateX(-50%) scale(.6); opacity: 0; pointer-events: none; transition: transform .32s var(--p-ease), opacity .2s; background: rgba(251, 247, 240, .8); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 0 0 .5px rgba(255, 255, 255, .8), 0 20px 50px -16px rgba(31, 26, 22, .45); }
.p-menu.is-on { transform: translateX(-50%); opacity: 1; pointer-events: auto; }
.p-menu button { border: 0; background: none; cursor: pointer; text-align: left; padding: 12px 16px; border-radius: 24px; display: flex; flex-direction: column; gap: 2px; font: inherit; color: var(--ink-900); }
.p-menu button:hover, .p-menu button:focus-visible { background: rgba(31, 26, 22, .06); }
.p-menu b { font-size: 16px; font-weight: 600; }
.p-menu b.is-rust { color: var(--rust-600); }
.p-menu b.is-sage { color: var(--sage-600); }
.p-menu small { font-size: 12.5px; color: var(--ink-600); }

/* sheets */
.p-sheetscrim { position: fixed; inset: 0; z-index: 30; background: rgba(31, 26, 22, .28); opacity: 0; transition: opacity .3s; }
.p-sheetscrim.is-on { opacity: 1; }
.p-sheet { position: fixed; z-index: 31; left: 8px; right: 8px; bottom: calc(8px + var(--p-bot)); max-width: 560px; margin: 0 auto; max-height: calc(100dvh - var(--p-top) - 24px); overflow-y: auto; border-radius: 46px; padding: 14px 18px 24px; display: flex; flex-direction: column; gap: 16px; transform: translateY(110%); transition: transform .45s var(--p-ease); background: rgba(251, 247, 240, .82); -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 0 0 .5px rgba(255, 255, 255, .8), 0 -10px 40px -10px rgba(31, 26, 22, .3); }
.p-sheet.is-on { transform: none; }
.p-sheet__top { display: flex; align-items: center; justify-content: space-between; }
.p-sheet__top strong { font-size: 16px; }
.p-round { width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer; display: grid; place-items: center; background: rgba(31, 26, 22, .06); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9); color: var(--ink-900); flex: none; }
.p-sheet__spacer { width: 44px; }

/* toast */
.p-toast { position: fixed; z-index: 60; left: 50%; top: calc(var(--p-top, 0px) + 58px); max-width: min(340px, calc(100vw - 32px)); display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; transform: translate(-50%, -16px); opacity: 0; pointer-events: none; transition: transform .35s cubic-bezier(.2, .7, .3, 1), opacity .25s; font-size: 14px; font-weight: 500; background: rgba(31, 26, 22, .72); color: var(--sand-100); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 10px 30px -10px rgba(31, 26, 22, .5); }
.p-toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.p-toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sage-400); flex: none; }
body.is-phone .toast { display: none; }

/* search results */
.p-results { position: fixed; inset: 0; z-index: 9; background: var(--sand-100); overflow-y: auto; padding: calc(var(--p-top) + 112px) 16px calc(var(--p-bot) + 130px); display: flex; flex-direction: column; gap: 10px; animation: p-fade .25s ease both; }
.p-results > * { width: 100%; max-width: calc(var(--p-w) - 32px); margin: 0 auto; }
@keyframes p-fade { from { opacity: 0; } }

/* ================= Android: Material 3 ================= */
html[data-os="android"] .p-fade { display: none; }
html[data-os="android"] .p-main { padding: calc(var(--p-top) + 76px) 16px calc(var(--p-bot) + 100px); gap: 12px; }
html[data-os="android"] .p-title { font-size: 52px; }
html[data-os="android"] .p-title--44 { font-size: 44px; }
html[data-os="android"] .p-head { padding: 4px 4px 6px; }
html[data-os="android"] .p-label { font: 600 14px var(--body); letter-spacing: 0; text-transform: none; color: var(--rust-ink, #a83a17); padding: 10px 4px 0; }
html[data-os="android"] .p-top { top: 0; height: auto; padding: calc(var(--p-top) + 6px) 8px 6px; background: var(--sand-100); }
html[data-os="android"] .p-search { position: relative; right: auto; top: auto; width: auto; flex: 1; height: 52px; border-radius: 28px; background: var(--sand-300); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 0 6px; color: var(--ink-600); }
html[data-os="android"] .p-search.is-open { width: auto; }
html[data-os="android"] .p-search input { font-size: 15px; font-weight: 400; }
html[data-os="android"] .p-top .p-avatar { width: 40px; height: 40px; font-size: 18px; margin: 0 6px; box-shadow: none; }
html[data-os="android"] .p-search .p-menubtn { width: 40px; height: 40px; margin: 0 4px; color: var(--ink-600); }
html[data-os="android"] .p-appbar { display: flex; align-items: center; gap: 4px; height: 52px; flex: 1; min-width: 0; }
html[data-os="android"] .p-appbar button { width: 48px; height: 48px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; color: var(--ink-900); flex: none; }
html[data-os="android"] .p-appbar span { font-size: 22px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-os="android"] .p-tabbar { bottom: 0; padding: 0; gap: 0; max-width: none; }
html[data-os="android"] .p-tabbar__pill { height: calc(80px + var(--p-bot)); border-radius: 0; background: var(--sand-300); padding: 12px 4px calc(16px + var(--p-bot)); align-items: flex-start; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; max-width: var(--p-w); margin: 0 auto; }
html[data-os="android"] .p-tab { height: 52px; border-radius: 0; gap: 4px; color: var(--ink-600); background: none; }
html[data-os="android"] .p-tab svg { width: 56px; height: 32px; padding: 4px 16px; border-radius: 16px; transition: background .2s; }
html[data-os="android"] .p-tab span { font-size: 12px; font-weight: 500; }
html[data-os="android"] .p-tab[aria-current="page"] { background: none; color: var(--warn-ink); }
html[data-os="android"] .p-tab[aria-current="page"] svg { background: var(--warn-bg); }
html[data-os="android"] .p-tab[aria-current="page"] span { font-weight: 700; }
html[data-os="android"] .p-badge { top: 0; left: calc(50% + 4px); }
html[data-os="android"] .p-plus { width: 56px; height: 40px; margin: 6px 4px 0; border-radius: 16px; background: var(--rust-600); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 4px 10px -4px rgba(31, 26, 22, .45); }
html[data-os="android"] .p-menu { bottom: calc(var(--p-bot) + 96px); border-radius: 20px; background: var(--sand-50); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 8px 24px -8px rgba(31, 26, 22, .4); }
html[data-os="android"] .p-scrim { background: rgba(31, 26, 22, .32); }
html[data-os="android"] .p-card { border-radius: 24px; }
html[data-os="android"] .p-empty { border-radius: 20px; padding: 16px; }
html[data-os="android"] .p-list { background: none; padding: 0; gap: 3px; border-radius: 0; }
html[data-os="android"] .p-list > * { background: var(--sand-50); border-radius: 4px; border-top: 0; padding-left: 16px; padding-right: 16px; }
html[data-os="android"] .p-list > :first-child { border-radius: 20px 20px 4px 4px; }
html[data-os="android"] .p-list > :last-child { border-radius: 4px 4px 20px 20px; }
html[data-os="android"] .p-list > :only-child { border-radius: 20px; }
html[data-os="android"] .p-li { padding-top: 14px; padding-bottom: 14px; }
html[data-os="android"] .p-chev { width: 20px; height: 20px; color: var(--ink-500); }
html[data-os="android"] .p-seg { background: none; padding: 0; gap: 8px; flex-wrap: wrap; }
html[data-os="android"] .p-seg button { flex: none; height: 32px; padding: 0 14px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--ink-500); }
html[data-os="android"] .p-seg button[aria-pressed="true"] { background: var(--warn-bg); color: var(--warn-ink); box-shadow: none; }
html[data-os="android"] .p-seg button[aria-pressed="true"]::before { content: "✓ "; }
html[data-os="android"] .p-switch { width: 52px; height: 32px; padding: 0; align-items: center; background: var(--sand-300); box-shadow: inset 0 0 0 2px var(--ink-500); }
html[data-os="android"] .p-switch::after { width: 16px; height: 16px; background: var(--ink-500); box-shadow: none; transform: translateX(8px); transition: transform .2s, width .2s, height .2s; }
html[data-os="android"] .p-switch[aria-checked="true"] { background: var(--rust-600); box-shadow: none; }
html[data-os="android"] .p-switch[aria-checked="true"]::after { width: 24px; height: 24px; background: var(--sand-50); transform: translateX(24px); }
html[data-os="android"] .p-btn { height: 40px; padding: 0 18px; font-size: 14px; }
html[data-os="android"] .p-btn--xs { height: 32px; padding: 0 12px; font-size: 13px; }
html[data-os="android"] .p-btn--outline, html[data-os="android"] .p-btn--sand { background: var(--warn-bg); color: var(--warn-ink); box-shadow: none; }
html[data-os="android"] .p-btn--ghost, html[data-os="android"] .p-btn--text { color: var(--rust-ink, #a83a17); padding: 0 10px; }
html[data-os="android"] .p-btn--lg { height: 52px; font-size: 15px; }
html[data-os="android"] .p-signout { height: 48px; background: none; box-shadow: inset 0 0 0 1px var(--ink-500); color: var(--rust-ink, #a83a17); font-size: 15px; border-radius: 999px; }
html[data-os="android"] .p-foot { font: 400 12px var(--body); letter-spacing: 0; text-transform: none; }
html[data-os="android"] .p-hostpill { display: none; }
html[data-os="android"] .p-card--ink { background: var(--ink-800); border-radius: 28px; }
html[data-os="android"] .p-card--hero { border-radius: 28px; padding: 20px; }
html[data-os="android"] .p-card--sage.p-card--hero, html[data-os="android"] .p-card--tonal { background: var(--sage-100); color: var(--sage-ink); }
html[data-os="android"] .p-card--sage .p-cardlabel, html[data-os="android"] .p-card--tonal .p-cardlabel { color: var(--sage-ink); }
html[data-os="android"] .p-minis { display: flex; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
html[data-os="android"] .p-minis::-webkit-scrollbar { display: none; }
html[data-os="android"] .p-mini { flex: none; min-width: 108px; border-radius: 20px; padding: 14px 16px; background: var(--sand-200); }
html[data-os="android"] .p-mini b { font-size: 32px; }
html[data-os="android"] .p-mini.is-rust { background: var(--warn-bg); }
html[data-os="android"] .p-mini.is-rust b, html[data-os="android"] .p-mini.is-rust span { color: var(--warn-ink); }
html[data-os="android"] .p-mini.is-sage b { color: var(--ink-900); }
html[data-os="android"] .p-preview { border-radius: 28px; }
html[data-os="android"] .p-input { background: var(--sand-200); border-radius: 4px 4px 0 0; box-shadow: inset 0 -1px 0 var(--ink-500); }
html[data-os="android"] .p-input:focus, html[data-os="android"] .p-textarea:focus { outline: 0; box-shadow: inset 0 -2px 0 var(--rust-600); }
html[data-os="android"] .p-textarea { border-radius: 4px 4px 0 0; box-shadow: inset 0 -2px 0 var(--rust-600); }
html[data-os="android"] .p-field > span { font: 600 12px var(--body); letter-spacing: 0; text-transform: none; color: var(--rust-ink, #a83a17); }
html[data-os="android"] .p-pick { height: 32px; border-radius: 8px; background: none; box-shadow: inset 0 0 0 1px var(--ink-500); }
html[data-os="android"] .p-pick[aria-pressed="true"] { background: var(--warn-bg); color: var(--warn-ink); box-shadow: none; }
html[data-os="android"] .p-pick[aria-pressed="true"]::before { content: "✓ "; }
html[data-os="android"] .p-sheetscrim { background: rgba(31, 26, 22, .32); }
html[data-os="android"] .p-sheet { left: 0; right: 0; bottom: 0; border-radius: 28px 28px 0 0; background: var(--sand-50); padding: 10px 20px calc(28px + var(--p-bot)); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 -8px 30px -12px rgba(31, 26, 22, .35); transition: transform .4s cubic-bezier(.2, 0, 0, 1); }
html[data-os="android"] .p-sheet::before { content: ""; width: 32px; height: 4px; border-radius: 2px; background: var(--ink-400); margin: 0 auto -6px; flex: none; }
html[data-os="android"] .p-sheet__top { flex-direction: row-reverse; justify-content: flex-end; }
html[data-os="android"] .p-sheet__top .p-round, html[data-os="android"] .p-sheet__spacer { display: none; }
html[data-os="android"] .p-sheet__top strong { font-size: 22px; font-weight: 500; }
html[data-os="android"] .p-toast { top: auto; bottom: calc(var(--p-bot) + 92px); left: 12px; right: 12px; max-width: min(536px, calc(var(--p-w) - 24px)); margin: 0 auto; transform: translateY(16px); border-radius: 6px; background: var(--ink-800); -webkit-backdrop-filter: none; backdrop-filter: none; min-height: 48px; padding: 12px 16px; }
html[data-os="android"] .p-toast.is-on { transform: none; }
html[data-os="android"] .p-toast::before { display: none; }
html[data-os="android"] .p-results { background: var(--sand-200); padding-top: calc(var(--p-top) + 76px); }
html[data-os="android"] .p-tile--52 { width: 56px; height: 56px; font-size: 28px; }

@media (prefers-reduced-motion: reduce) {
  .p-app *, .p-app *::before, .p-app *::after, .p-sheet, .p-menu, .p-toast, .pd-menu, .pd-menu * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- Account: the page slides aside (page-drawer.js) ----------
   The page (bars and all) slides right by the menu's width, 4/5 of the screen, rounding its corners and
   dimming, to show Account under it. page-drawer.js sets --drawer-p (0 shut … 1 open) on <html> as a finger
   moves it (.pd-drag: no easing) and lets go with this easing. While aside the page is held still: fixed,
   scrolled inside itself (so its pinned bars move with it). */
.p-app.pd-aside { position: fixed; inset: 0; z-index: 2; overflow: hidden; background: var(--sand-100);
  transform: translateX(calc(var(--drawer-p, 0) * min(80vw, 440px)));
  border-radius: calc(var(--drawer-p, 0) * 40px) 0 0 calc(var(--drawer-p, 0) * 40px);
  box-shadow: -16px 0 44px -18px rgba(31, 26, 22, calc(var(--drawer-p, 0) * .5)), inset 1px 0 0 rgba(255, 255, 255, calc(var(--drawer-p, 0) * .7));
  transition: transform .38s var(--p-ease), border-radius .38s var(--p-ease), box-shadow .38s var(--p-ease); }
.p-app.pd-aside::after { content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; background: rgba(31, 26, 22, calc(var(--drawer-p, 0) * .14)); transition: background-color .38s var(--p-ease); }
/* The menu: under the page, drifting in a little as the page uncovers it. */
.pd-menu { --p-top: env(safe-area-inset-top, 0px); --p-bot: env(safe-area-inset-bottom, 0px); --p-ease: cubic-bezier(.2, .7, .3, 1); --p-accent: var(--rust-600);
  position: fixed; z-index: 1; top: 0; bottom: 0; left: 0; width: min(80vw, 440px); box-sizing: border-box; padding: calc(var(--p-top) + 12px) 16px calc(var(--p-bot) + 24px);
  display: flex; flex-direction: column; gap: 10px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  background: var(--sand-300); transform: translateX(calc((var(--drawer-p, 0) - 1) * 22%)); transition: transform .38s var(--p-ease); }
.pd-top { display: flex; align-items: center; height: 44px; flex: none; }
.pd-top svg { transform: rotate(calc((1 - var(--drawer-p, 0)) * 180deg)); transition: transform .38s var(--p-ease); }
.p-menuview { display: flex; flex-direction: column; gap: 14px; }
/* Over the slid-aside page: a tap or a drag there brings it back. */
.pd-catch { position: fixed; z-index: 3; top: 0; bottom: 0; right: 0; left: min(80vw, 440px); pointer-events: none; }
.p-app.pd-aside.pd-drag, .p-app.pd-aside.pd-drag::after, .pd-menu.pd-drag, .pd-menu.pd-drag .pd-top svg { transition: none; }
html[data-os="android"] .p-app.pd-aside { border-radius: calc(var(--drawer-p, 0) * 20px) 0 0 calc(var(--drawer-p, 0) * 20px); }
html[data-os="android"] .pd-menu { background: var(--sand-200); }

/* ---------- the same design, scaled: foldables, iPad and tablets ----------
   Cards that repeat (requests, orders, customers, projects, products) sit in .p-grid, which is one
   column on a phone and fills two or three on wider screens. Everything else keeps the phone design,
   centered at a comfortable width, with the chrome lined up to the content. */
.p-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.p-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
@media (min-width: 600px) {
  :root { --p-w: 760px; --p-bar: 600px; }
  .p-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-minis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .p-main { padding-left: 24px; padding-right: 24px; }
  .p-top { padding: 0 24px; }
  .p-search { right: 24px; }
  .p-search.is-open { width: calc(100% - 48px); }
  .p-sheet { left: 16px; right: 16px; bottom: calc(16px + var(--p-bot)); }
  html[data-os="android"] .p-minis { display: grid; overflow: visible; margin: 0; padding: 0; }
  html[data-os="android"] .p-mini { min-width: 0; }
  html[data-os="android"] .p-sheet { left: 0; right: 0; bottom: 0; border-radius: 28px 28px 0 0; }
  .p-title { font-size: 72px; }
  html[data-os="android"] .p-title { font-size: 60px; }
}
@media (min-width: 900px) {
  :root { --p-w: 980px; --p-bar: 640px; }
  .p-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .p-split { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .p-main { padding-left: 32px; padding-right: 32px; }
  .p-top { padding: 0 32px; }
  .p-search { right: 32px; }
  .p-search.is-open { width: min(560px, calc(100% - 64px)); }
}
/* A folded phone (Galaxy Z Fold cover screen, about 280–344px): tighter, nothing cut off. */
@media (max-width: 359px) {
  .p-main { padding-left: 12px; padding-right: 12px; }
  .p-title { font-size: 52px; }
  .p-tab span { font-size: 10px; }
  .p-tabbar { padding: 0 10px; gap: 8px; }
  .p-plus { width: 44px; height: 44px; }
  .p-tabbar__pill { height: 58px; }
  .p-tab { height: 50px; }
  .p-minis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-menu { width: calc(100vw - 32px); }
}

.p-search .p-avatar, .p-top .p-avatar { background: var(--rust-600); color: var(--sand-50); }

