/* Apaki on a phone (Track B part 2, 2026-10-09). Loaded after Apaki's own
   app.css, so the tokens, both themes, the pearl ground and every component
   are the desktop's; this file only re-lays them out for a phone:
   - one pane at a time (tabs stay to switch conversations; splits show the
     focused pane only),
   - the sidebar becomes a drawer from the left, over a scrim,
   - tap targets of 40 to 48 px, 16 px text in fields (no zoom on focus),
   - safe-area insets for notches and home indicators,
   - things the phone cannot do here are hidden: window buttons, panes'
     drag grips and gutters, the PC's dictation, folders editing, Ask Claude
     and Dig deeper (they run from the PC), the Phone button itself.
   Motion: the drawer slides on transform in 200 ms, nothing else is added. */

html, body.web { height: 100%; }
body.web {
  grid-template-columns: 1fr; height: var(--vvh, 100dvh); min-height: 0; overflow: hidden;
  -webkit-tap-highlight-color: transparent; overscroll-behavior: none;
}
body.web .main {
  grid-column: 1; min-width: 0;
  grid-template-rows: calc(var(--top) + env(safe-area-inset-top)) 1fr;
  padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right);
}
body.web .topbar { height: calc(var(--top) + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); align-items: center; }
body.web .tabs { height: var(--top); padding: 0 6px 0 0; gap: 4px; }
body.web .tab { height: 36px; min-width: 84px; max-width: 52vw; padding: 0 4px 0 12px; font-size: 14px; }
body.web .tab-x { opacity: 1; width: 30px; height: 30px; }
body.web .tab-plus { width: 40px; height: 40px; }

.drawer-btn {
  flex: none; display: none; place-items: center; width: 46px; height: 46px; margin: 0 2px 0 6px;
  border: 0; border-radius: 12px; background: none; cursor: pointer; color: var(--ink);
}
body.web .drawer-btn { display: grid; }
.drawer-btn:active { background: hsla(var(--w), .7); }
.drawer-btn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }

/* The sessions drawer. */
body.web .rail {
  position: fixed; z-index: 40; top: 0; bottom: 0; left: 0; width: min(88vw, 380px);
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom) env(safe-area-inset-left);
  transform: translate3d(-104%, 0, 0); transition: transform 200ms var(--ease-out); will-change: transform;
  box-shadow: none; border-right: 1px solid var(--sec-line);
}
body.web.drawer-open .rail { transform: none; box-shadow: 16px 0 44px -24px rgba(var(--shadow-rgb), .55); }
.drawer-scrim { position: fixed; inset: 0; z-index: 35; background: rgba(var(--shadow-rgb), .26); opacity: 0; pointer-events: none; transition: opacity 180ms var(--ease-hover); }
body.drawer-open .drawer-scrim { opacity: 1; pointer-events: auto; }
:root[data-theme="dark"] .drawer-scrim { background: rgba(0, 0, 0, .55); }
body.web .brand { height: 52px; }

body.web .winctl, body.web .tabs-tools, body.web .grip, body.web .gutter,
body.web .dig-row, body.web .folder-add, body.web .folder-x, body.web .folder-chip, body.web #phone { display: none !important; }
/* Ask Claude is a phone button since 2026-10-12, for a PC that takes the command (native.js sets body.can-ask); Dig deeper still runs from the PC. */
body.web:not(.can-ask) .ask { display: none !important; }
/* The mic, since 2026-10-12 ("no mic button on the mobile app"): the phone records, the PC's Whisper writes the words into
   the box (op transcribe). pane.js hides it when the PC has no Whisper or is too old to take the op. */
body.web .mic[hidden] { display: none !important; }

/* One pane: with a split, only the focused pane shows. */
body.web .stage { inset: 0; border-radius: 0; border-width: 1px 0 0; box-shadow: none; }
body.web .stage.multi .split > :not(.pane):not(.split) { display: none; }
body.web .stage.multi .pane:not(.focused) { display: none; }
body.web .pane-bar { min-height: 54px; padding: 6px 4px 6px 14px; }
body.web .pane-bar .title { font-size: 16.5px; }
body.web .pane-bar .close { width: 44px; height: 44px; }
/* 2026-10-11 (Arthur: "the full view of output doesnt show in the app"): the composer floats over the bottom of the
   conversation (app.css "frosted composer"), so the transcript ends above it, by --composer-h (pane.js), as on the
   desktop; a fixed 20px here had let the last message sit behind the prompt card. */
body.web .transcript { padding: 14px 14px calc(var(--composer-h, 150px) + 18px); font-size: 15px; }
body.web .turn-user { margin-top: 16px; }
body.web .composer-wrap { padding: 0 8px calc(8px + env(safe-area-inset-bottom)); }
body.web .composer { border-radius: 18px; padding: 8px 8px 6px 12px; }
body.web textarea { font-size: 16px; }
body.web .icon-btn { width: 42px; height: 42px; }
body.web .chip-btn { height: 38px; padding: 0 10px; font-size: 13px; }
body.web .send { min-height: 42px; min-width: 72px; padding: 9px 16px; font-size: 15px; border-radius: 12px; }
body.web .status-line.on { height: 28px; }
/* Settings stay on one line beside the attach and send buttons, and scroll sideways. */
body.web .composer-row { flex-wrap: nowrap; }
body.web .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
body.web .chips::-webkit-scrollbar { display: none; }
body.web .chip-btn { max-width: none; flex: none; }
/* Until the PC answers, only the pairing card shows on the pearl ground. */
body.web:not(.linked) .rail, body.web:not(.linked) .main, body.web:not(.linked) .link-bar { visibility: hidden; }
/* Folders are made on the PC: an empty folder list is not worth a section here. */
body.web .rail-folders:has(.folder-empty) { display: none; }

/* Bigger targets in the drawer, sheets and menus. */
body.web .search { height: 46px; }
body.web .search input { font-size: 16px; }
body.web .rail-find .new { padding: 12px 14px; font-size: 15px; }
body.web .sessions li { padding: 13px 12px; }
body.web .rail-sessions .views button { padding: 8px 11px; }
body.web .folder-row { height: 42px; }
body.web .theme-btn, body.web .sound { padding: 8px 12px; font-size: 13px; }
body.web .sheet { width: calc(100vw - 20px); max-height: calc(var(--vvh, 100dvh) - 40px); padding: 18px 16px; }
body.web .sheet .opt { padding: 13px 14px; }
body.web .sheet .row button { padding: 12px 18px; }
body.web .sheet input[type=text], body.web .ask-card input[type=text], body.web .ask-card input[type=password] { font-size: 16px; padding: 11px 12px; }
/* A question or approval in the pane (askcard.js, 2026-10-12): the same card as on the PC, with touch targets of 44 px. */
body.web .ask-choice, body.web .ask-btn { min-height: 44px; }
body.web .ask-choice { align-items: center; padding: 8px 10px; }
body.web .ask-btn { height: auto; padding: 0 18px; }
body.web .ask-other input { padding: 8px 2px; }
body.web .ask-dock { margin-bottom: 6px; }
body.web .menu-item { padding: 12px 12px; font-size: 15px; }
body.web .takeover { margin-top: 6vh; padding: 20px 18px; }
body.web .tk-row button { padding: 12px 16px; }
/* Session in use can offer three choices on a phone (Watch live, Take over here, Cancel): they wrap rather than squeeze. */
body.web .tk-row { flex-wrap: wrap; }
body.web .stage-empty .new { padding: 12px 16px; }

/* The PC this phone talks to, at the top of the drawer's footer. */
.pc-line { display: none; }
body.web .pc-line { display: flex; align-items: center; gap: 8px; padding: 12px 14px 0 18px; font-size: 13px; min-width: 0; }
.pc-line:empty { display: none !important; }
.pc-k { font: 900 10px/1 var(--font-display); font-stretch: 125%; letter-spacing: .13em; text-transform: uppercase; color: var(--brand-strong); }
.pc-n { font-weight: 800; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-s { font-size: 12px; color: var(--action-strong); font-weight: 650; white-space: nowrap; }
.pc-s.ok { color: var(--good); }
.pc-line button { margin-left: auto; flex: none; padding: 7px 12px; border: 1px solid var(--hairline-strong); border-radius: var(--radius-sm); background: var(--ground); font-weight: 700; font-size: 13px; color: var(--brand-deep); cursor: pointer; }

/* Lost the PC for a moment: one quiet line under the top bar, words only. */
.link-bar {
  position: fixed; z-index: 45; left: 50%; top: calc(env(safe-area-inset-top) + var(--top) + 8px); transform: translateX(-50%);
  display: flex; align-items: baseline; gap: 9px; max-width: calc(100vw - 24px); padding: 9px 14px; border-radius: 12px;
  background: hsla(var(--w), .92); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border: 1px solid var(--hairline-strong); box-shadow: 0 12px 30px -18px rgba(var(--shadow-rgb), .5);
  font-size: 13px; font-weight: 600; color: var(--soft); animation: rise var(--dur-fast) var(--ease-out); cursor: pointer;
}
.link-bar[hidden] { display: none; }
.lb-k { flex: none; font: 900 10px/1 var(--font-display); font-stretch: 125%; letter-spacing: .12em; text-transform: uppercase; color: var(--action-strong); }
.lb-t { min-width: 0; }

/* ---------- pairing and connecting ---------- */
.pair-screen {
  position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(20px + env(safe-area-inset-top)) 16px calc(20px + env(safe-area-inset-bottom)); overflow-y: auto;
  background: hsla(var(--w), .35);
}
.pair-screen[hidden] { display: none; }
body.linked .pair-screen { display: none; }
.pair-card {
  width: min(430px, 100%); padding: 24px 22px 22px; border-radius: 22px;
  background: hsla(var(--w), .8); -webkit-backdrop-filter: blur(26px) saturate(1.5); backdrop-filter: blur(26px) saturate(1.5);
  border: 1px solid var(--hairline-strong); box-shadow: 0 30px 80px -42px rgba(var(--shadow-rgb), .65);
  animation: rise 220ms var(--ease-out);
}
.pair-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.pair-brand .m-mark { width: 42px; height: 20px; flex: none; }
.pair-brand .wordmark { font-weight: 900; font-stretch: 125%; font-size: 17px; letter-spacing: -.015em; }
.pair-kicker { font: 900 10.5px/1 var(--font-display); font-stretch: 125%; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-strong); }
.pair-card h1 { margin: 9px 0 6px; font: 900 28px/1.1 var(--font-display); font-stretch: 125%; letter-spacing: -.022em; color: var(--ink); overflow-wrap: anywhere; }
.pair-card p { margin: 10px 0 0; font-size: 15px; line-height: 1.5; color: var(--soft); }
.pair-card b { color: var(--ink); font-weight: 800; }
.pair-note { font-size: 13px !important; color: var(--faint) !important; }
.pair-err { color: var(--action-strong) !important; font-weight: 650; }
.pair-steps { list-style: none; counter-reset: step; margin: 18px 0 6px; padding: 0; }
.pair-steps li { counter-increment: step; display: flex; gap: 12px; padding: 11px 0; border-top: 1px solid var(--hairline); font-size: 15px; line-height: 1.45; color: var(--soft); }
.pair-steps li::before { content: counter(step); flex: none; width: 18px; font: 900 14px/1.45 var(--font-display); font-stretch: 125%; color: var(--brand-strong); }
.pair-btn {
  display: block; width: 100%; min-height: 50px; margin-top: 14px; border: 1px solid var(--fill); border-radius: 14px; cursor: pointer;
  background: var(--fill); color: #fff; font: 820 16px/1 var(--font-body); font-stretch: 112%;
  transition: background var(--dur-fast) var(--ease-hover), transform var(--dur-fast) var(--ease-out);
}
.pair-btn:active { transform: scale(.985); }
.pair-btn.quiet { background: hsla(var(--w), .85); color: var(--ink); border-color: var(--hairline-strong); }
.pair-paste { margin-top: 14px; font-size: 14px; color: var(--soft); }
.pair-paste summary { cursor: pointer; padding: 8px 0; font-weight: 650; }
.pp-row { display: flex; gap: 8px; margin-top: 6px; }
.pp-row input { flex: 1; min-width: 0; height: 46px; padding: 0 12px; border: 1px solid var(--hairline-strong); border-radius: 12px; background: var(--ground); font-size: 16px; }
.pp-row button, .pair-pcs button { flex: none; min-height: 44px; padding: 0 14px; border: 1px solid var(--hairline-strong); border-radius: 12px; background: var(--ground); font-weight: 760; cursor: pointer; color: var(--ink); }
.pair-pcs button.quiet { color: var(--faint); background: none; }
.pair-sec { margin-top: 20px; padding-bottom: 8px; border-bottom: 1px solid var(--hairline); font: 900 10.5px/1 var(--font-display); font-stretch: 125%; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-deep); }
.pair-pcs { list-style: none; margin: 0; padding: 0; }
.pair-pcs li { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--hairline); }
.pp-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pp-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-t small { font-size: 12px; color: var(--faint); }
.pair-code { display: flex; gap: 16px; margin: 20px 0 4px; font: 900 54px/1 var(--font-display); font-stretch: 125%; letter-spacing: .05em; color: var(--ink); font-variant-numeric: tabular-nums; animation: rise 220ms var(--ease-out); }
.pair-code span:last-child { color: var(--brand-deep); }
.pair-wait { margin: 18px 0 4px; }
.pair-wait .egrid { grid-template-columns: repeat(5, 5px); grid-template-rows: repeat(3, 5px); gap: 4px; }
.pair-wait .egrid i { width: 5px; height: 5px; border-radius: 1.5px; }
.pair-video { display: block; width: 100%; aspect-ratio: 1; margin-top: 14px; border-radius: 16px; object-fit: cover; background: #0C0B16; }
.pair-fine { max-width: 430px; margin: 14px 8px 0; text-align: center; font-size: 12.5px; line-height: 1.5; color: var(--faint); }

@media (prefers-reduced-motion: reduce) {
  body.web .rail, .drawer-scrim { transition: none !important; }
}
/* 2026-10-10: the pairing button uses the app's button gradient (app.css --btn-a/--btn-b). */

/* =====================================================================
   The phone app (native.js, 2026-10-10). Arthur: "make the phone
   experience feel incredibly native like an app". A Messages-style stack
   on top of the layout above (every rule here needs body.native, which
   native.js sets once Apaki's window code runs):
   - home: the sessions list, with a compact bar (the PC, compose) and a
     large title that scrolls up under it,
   - a conversation slides in from the right over the list, which moves a
     little left and dims; Back or a swipe from the left edge returns,
   - menus, sheets and the Glass and Tasks panels rise from the bottom,
     with a grabber, and close with a swipe down,
   - the composer is a rounded field with a round send button, on a
     frosted bar above the home indicator.
   Motion: the iOS curve (.32, .72, 0, 1), transforms and opacity only;
   off under reduced motion.
   ===================================================================== */
:root { --ios-ease: cubic-bezier(.32, .72, 0, 1); --nav-h: 44px; --stack-ms: 380ms; }

body.web.native .drawer-btn, body.web.native .drawer-scrim, body.web.native .topbar,
body.web.native #pcLine, body.web.native .brand, body.web.native #new, body.web.native .sec-refresh,
body.web.native .pane-bar .grip { display: none !important; }
body.web.native button, body.web.native .sessions li, body.web.native .ios-nav { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }

/* The two screens. */
body.web.native .rail, body.web.native .main {
  position: fixed; top: 0; left: 0; width: 100%; height: var(--vvh, 100dvh); min-height: 0;
  transition: transform var(--stack-ms) var(--ios-ease), visibility 0s linear 0s; will-change: transform;
}
body.web.native .rail { z-index: 1; display: flex; flex-direction: column; padding: 0; transform: none; border: 0; box-shadow: none; }
body.web.native.at-chat .rail { transform: translate3d(-28%, 0, 0); }
body.web.native .main {
  z-index: 3; display: block; padding: 0; transform: translate3d(100%, 0, 0); visibility: hidden;
  transition: transform var(--stack-ms) var(--ios-ease), visibility 0s linear var(--stack-ms);
  box-shadow: -16px 0 36px -20px rgba(var(--shadow-rgb), .5);
}
body.web.native.at-chat .main { transform: none; visibility: visible; transition: transform var(--stack-ms) var(--ios-ease), visibility 0s linear 0s; }
/* The conversation is its own opaque sheet over the list, on the same pearl as the desktop's stage. */
body.web.native .main { background: hsl(var(--w)); isolation: isolate; overflow: hidden; }
body.web.native .main::before { content: ""; position: absolute; inset: 0 -60%; z-index: -2; pointer-events: none; background: var(--pearl-gradient); animation: pearl-drift 60s var(--ease-hover) infinite alternate; }
body.web.native .main::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: var(--halftone), var(--pearl-overlay); }
body.web.native.swiping .rail, body.web.native.swiping .main { transition: none; }
body.web.native .stages { position: absolute; inset: 0; }
.stack-dim { position: fixed; inset: 0; z-index: 2; pointer-events: none; background: rgba(16, 14, 38, .16); opacity: 0; transition: opacity var(--stack-ms) var(--ios-ease); }
body.at-chat .stack-dim { opacity: calc(1 - var(--back-p, 0)); }
body.swiping .stack-dim { transition: none; }
:root[data-theme="dark"] .stack-dim { background: rgba(0, 0, 0, .42); }

/* ---------- home: the sessions list ---------- */
.ios-nav {
  flex: none; position: relative; z-index: 3; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 6px;
  height: calc(var(--nav-h) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) max(6px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left));
  border-bottom: 1px solid transparent; transition: background-color 180ms var(--ease-hover), border-color 180ms var(--ease-hover);
}
body.list-scrolled .ios-nav { background: hsla(var(--w), .8); -webkit-backdrop-filter: blur(22px) saturate(1.7); backdrop-filter: blur(22px) saturate(1.7); border-bottom-color: var(--hairline); }
.ios-pc {
  justify-self: start; min-width: 0; max-width: 100%; display: flex; flex-wrap: wrap; column-gap: 4px; align-items: center;
  padding: 3px 8px; border: 0; border-radius: 10px; background: none; text-align: left; color: var(--ink); cursor: pointer;
  transition: background var(--dur-fast) var(--ease-hover);
}
.ios-pc:active, .ios-compose:active, .nav-back:active { background: hsla(232, 60%, 62%, .12); }
.ios-pc-n { min-width: 0; max-width: calc(100% - 16px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 760 15px/1.2 var(--font-body); font-stretch: 104%; }
.ios-pc svg { width: 11px; height: 11px; fill: none; stroke: var(--soft); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ios-pc-s { flex-basis: 100%; font: 650 11px/1.25 var(--font-body); color: var(--action-strong); }
.ios-pc-s.ok { color: var(--good); }
.ios-pc-s.bad { color: var(--action-strong); }
.ios-nav-t { max-width: 44vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 16px/1 var(--font-body); color: var(--ink-deep); opacity: 0; transform: translate3d(0, 5px, 0); transition: opacity 160ms var(--ease-hover), transform 200ms var(--ios-ease); }
body.list-scrolled .ios-nav-t { opacity: 1; transform: none; }
.ios-compose { justify-self: end; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: none; color: var(--brand-strong); cursor: pointer; }
.ios-compose svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.ios-scroll { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; padding: 0 env(safe-area-inset-right) 14px env(safe-area-inset-left); scrollbar-width: none; }
.ios-scroll::-webkit-scrollbar { display: none; }
.ios-large { margin: 0; padding: 0 18px 10px; font: 900 34px/1.08 var(--font-display); font-stretch: 125%; letter-spacing: -.026em; color: var(--ink-deep); overflow-wrap: anywhere; }
body.web.native .rail-find { padding: 0 0 6px; }
body.web.native .search { margin: 0 16px; height: 38px; padding: 0 11px; border: 0; border-radius: 11px; background: hsla(238, 26%, 52%, .11); }
body.web.native .search:focus-within { box-shadow: 0 0 0 2px hsla(var(--pearl-stop-blue), .35); }
body.web.native .search input { font-size: 16px; }
body.web.native .rail-sessions { display: block; min-height: 0; }
body.web.native .rail-sessions .sec-head { padding: 8px 16px 4px; }
body.web.native .rail-sessions .sec-t { display: none; }
body.web.native .rail-sessions .sec-n { margin-right: auto; font-size: 12px; }
body.web.native .rail-sessions .views { margin-left: 0; font-size: 13px; }
body.web.native .rail-sessions .views button { padding: 6px 11px; }
/* Rows: full width, inset hairlines, a chevron, a pressed state. */
body.web.native .sessions { overflow: visible; flex: none; padding: 4px 0 8px; }
body.web.native .sessions li {
  position: relative; margin: 0; padding: 12px 40px 12px 18px; border: 0; border-radius: 0; box-shadow: none; background: none;
  transition: background 120ms var(--ease-hover);
}
body.web.native .sessions li[data-id]::after {
  content: ''; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; margin-top: -4px;
  border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint); transform: rotate(-45deg); opacity: .55;
}
body.web.native .sessions li[data-id]::before { content: ''; position: absolute; left: 18px; right: 0; bottom: 0; height: 1px; background: var(--hairline); }
body.web.native .sessions li:active { background: hsla(232, 60%, 62%, .1); }
body.web.native .sessions li.on, body.web.native .sessions li.shown { background: none; }
body.web.native .sessions li.on .t::after, body.web.native .sessions li.shown .t::after {
  content: 'Open'; margin-left: 8px; font: 800 9.5px/1 var(--font-display); font-stretch: 125%; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-strong); vertical-align: 2px;
}
body.web.native .sessions .t { font-size: 16px; line-height: 1.3; font-weight: 680; }
body.web.native .sessions .m { font-size: 12.5px; margin-top: 4px; }
body.web.native .sessions .snip, body.web.native .sessions .why { font-size: 14px; }
body.web.native .sessions .subs-n { margin-top: 8px; }
/* Glass and Settings: a frosted bar over the home indicator. */
body.web.native .rail-foot { position: relative; z-index: 3; padding-bottom: env(safe-area-inset-bottom); background: hsla(var(--w), .82); -webkit-backdrop-filter: blur(22px) saturate(1.7); backdrop-filter: blur(22px) saturate(1.7); }

/* Pull to refresh. */
.ptr { display: flex; align-items: center; justify-content: center; gap: 8px; height: 0; overflow: visible; opacity: 0; transform: translate3d(0, calc(var(--pull, 0) * 28px - 8px), 0); font: 650 12px var(--font-body); color: var(--faint); pointer-events: none; }
.ptr.on { opacity: var(--pull, 0); }
.ptr.busy { opacity: 1; }
.ptr-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--hairline-strong); border-top-color: var(--brand-strong); transform: rotate(calc(var(--pull, 0) * 300deg)); }
.ptr.busy .ptr-dot { animation: ptr-spin .7s linear infinite; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }

/* Add to Home Screen, once. */
.install-hint { display: flex; align-items: center; gap: 10px; margin: 14px 16px 4px; padding: 12px 12px 12px 14px; border-radius: 14px; background: hsla(var(--w), .85); border: 1px solid var(--hairline-strong); }
.ih-t { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: 13px; line-height: 1.4; color: var(--soft); }
.ih-t b { color: var(--ink); font-size: 14px; }
.install-hint button { flex: none; min-height: 36px; padding: 0 12px; border-radius: 10px; font-weight: 750; font-size: 13px; cursor: pointer; }
.install-hint .ih-x { border: 0; background: none; color: var(--faint); }
.install-hint .ih-go { border: 0; color: #fff; background: linear-gradient(135deg, var(--btn-a), var(--btn-b)); }

/* ---------- a conversation ---------- */
.nav-back { display: none; }
body.web.native .nav-back {
  position: absolute; z-index: 6; top: env(safe-area-inset-top); left: max(2px, env(safe-area-inset-left)); display: flex; align-items: center; gap: 3px;
  height: var(--nav-h); padding: 0 10px 0 8px; border: 0; border-radius: 12px; background: none; color: var(--brand-strong); font: 650 16px/1 var(--font-body); cursor: pointer;
}
.nav-back svg { width: 11px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
body.web.native .stage { inset: 0; border: 0; border-radius: 0; }
body.web.native .pane-bar {
  min-height: calc(var(--nav-h) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) max(4px, env(safe-area-inset-right)) 0 98px; align-items: center; gap: 2px;
  background: hsla(var(--w), .82); -webkit-backdrop-filter: blur(22px) saturate(1.7); backdrop-filter: blur(22px) saturate(1.7);
}
body.web.native .pane-bar .title-block { min-width: 0; text-align: center; padding-right: 8px; }
body.web.native .pane-bar .title { font: 720 16px/1.2 var(--font-body); font-stretch: 104%; letter-spacing: -.005em; }
body.web.native .pane-bar .meta-line { justify-content: center; margin-top: 1px; }
body.web.native .pane-bar .meta-line .cwd { flex: 0 1 auto; font-size: 11px; }
body.web.native .pane-bar .close { width: 40px; height: 40px; }
body.web.native .transcript { font-size: 16px; line-height: 1.5; }
/* The composer: a rounded field and a round send button. 2026-10-11 (Arthur: "the prompt box/card looks good but it
   has a background behind that card as well instead of just the grid/pearlescent background"): no frosted bar under
   it any more; the card floats on the grid and pearl with the desktop card's own shadow and focus ring, and the
   conversation fades out just above it (the .ground mask in the "2026-10-11" block at the end). */
body.web.native .composer-wrap { padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-top: 0; }
body.web.native .composer { border-radius: 22px; padding: 6px 6px 4px 12px; }
body.web.native .composer textarea { font-size: 16px; line-height: 1.4; }
/* 2026-10-12 (a 390 px phone cut the settings at "Bypa..."): the attach button, the field and the round send button
   share the first line, the way Messages lays them out, and the settings get the whole second line under them, so
   every chip shows whole; a very narrow phone wraps them to a third line rather than cutting one. Same card, same
   height as before (the field's line and the settings' line). .composer-row is only a wrapper here (display:
   contents), so its buttons take their places in the card's grid. */
body.web.native .composer {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: end; column-gap: 4px;
  grid-template-areas: "att att att att" "attach text mic send" "chips chips chips chips";
  padding: 6px 6px 4px;
}
body.web.native .composer > .attachments { grid-area: att; }
body.web.native .composer > textarea { grid-area: text; align-self: center; padding: 8px 4px; }
body.web.native .composer-row { display: contents; }
body.web.native .composer-row > .icon-btn:not(.mic) { grid-area: attach; }
body.web.native .composer-row > .send { grid-area: send; margin-bottom: 3px; }
/* The mic beside send, the way Messages places it: round, a 44 px target. */
body.web.native .composer-row > .mic { grid-area: mic; width: 44px; min-width: 44px; height: 44px; margin-bottom: -1px; border-radius: 50%; }
body.web.native .composer-row > .mic.rec { color: var(--action-strong); background: var(--action-tint); }
body.web.native .composer-row > .chips { grid-area: chips; flex-wrap: wrap; overflow: visible; row-gap: 2px; margin-top: 2px; -webkit-mask-image: none; mask-image: none; }
body.web.native .send:not(.queue):not(.stop) { display: grid; place-items: center; width: 36px; min-width: 36px; height: 36px; min-height: 36px; padding: 0; border-radius: 50%; font-size: 0; }
body.web.native .send:not(.queue):not(.stop)::before {
  content: ''; width: 17px; height: 17px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 13.5V3M3.5 7.5 8 3l4.5 4.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 13.5V3M3.5 7.5 8 3l4.5 4.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
body.web.native .send.queue, body.web.native .send.stop { min-height: 36px; border-radius: 18px; padding: 0 14px; font-size: 14px; }
body.web.native .send:active { transform: scale(.94); }

/* ---------- menus and sheets rise from the bottom ---------- */
body.web.native .menu, body.web.native .glass-panel, body.web.native .task-panel {
  /* 2026-10-11: above the keyboard while it is up (--kb, iOS app only; 0 elsewhere). */
  left: 8px !important; right: 8px !important; top: auto !important; bottom: calc(8px + max(env(safe-area-inset-bottom), var(--kb, 0px))) !important;
  width: auto !important; min-width: 0 !important; max-width: none !important; max-height: min(74vh, calc(var(--vvh, 100dvh) - var(--kb, 0px) - 60px)) !important;
  padding-top: 18px; border-radius: 20px; transform-origin: bottom center; animation: sheet-up 300ms var(--ios-ease);
  box-shadow: 0 0 0 100vmax rgba(16, 14, 38, .22), 0 -8px 40px -16px rgba(var(--shadow-rgb), .45);
}
body.web.native .menu { overflow-y: auto; padding: 18px 6px 6px; }
body.web.native .menu-item { min-height: 48px; font-size: 16px; padding: 12px 14px; border-radius: 12px; }
body.web.native .menu-head { padding: 10px 14px 4px; }
body.web.native .menu::before, body.web.native .glass-panel::before, body.web.native .task-panel::before, body.web.native .sheet::before {
  content: ''; position: absolute; top: 7px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: hsla(238, 14%, 50%, .32);
}
body.web.native .menu.out, body.web.native .glass-panel.out, body.web.native .task-panel.out { animation: sheet-down 200ms var(--ease-hover) forwards; }
:root[data-theme="dark"] body.web.native .menu, :root[data-theme="dark"] body.web.native .glass-panel, :root[data-theme="dark"] body.web.native .task-panel { box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .5), 0 -8px 40px -16px rgba(0, 0, 0, .8); }
body.web.native .sheet-scrim { place-items: end stretch; background: rgba(16, 14, 38, .24); padding-bottom: var(--kb-lift, 0px); transition: padding-bottom var(--kb-ms, 250ms) var(--ios-ease); }
body.web.native .sheet {
  position: relative; width: 100%; max-width: none; max-height: calc(var(--vvh, 100dvh) - env(safe-area-inset-top) - var(--kb-lift, 0px) - 24px); margin: 0;
  padding: 26px 18px calc(18px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; border-width: 1px 0 0; animation: sheet-up 320ms var(--ios-ease);
}
@keyframes sheet-up { from { transform: translate3d(0, 104%, 0); } to { transform: none; } }
@keyframes sheet-down { to { transform: translate3d(0, 104%, 0); } }
/* The Glass panel's rows get the room a phone has. */
body.web.native .gp-row { padding: 11px 8px 11px 12px; }
body.web.native .gp-btn { min-height: 34px; padding: 0 14px; }
body.web.native .gp-icon { min-width: 36px; height: 36px; }
body.web.native .gp-menu { right: 8px; }
body.web.native .gp-menu button { padding: 11px 12px; font-size: 15px; }

/* ---------- the PC screen over a running app: a full sheet ---------- */
body.web.native .pair-screen.sheet-mode { justify-content: flex-end; padding: env(safe-area-inset-top) 0 var(--kb-lift, 0px); background: rgba(16, 14, 38, .24); transition: padding-bottom var(--kb-ms, 250ms) var(--ios-ease); }
body.web.native .pair-screen.sheet-mode .pair-card { width: 100%; max-height: calc(var(--vvh, 100dvh) - env(safe-area-inset-top) - var(--kb-lift, 0px) - 12px); overflow-y: auto; padding: 26px 20px calc(20px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; animation: sheet-up 320ms var(--ios-ease); }
body.web.native .pair-screen.sheet-mode .pair-fine { display: none; }
body.web.native .pair-screen.sheet-mode .pair-card { position: relative; }
body.web.native .pair-screen.sheet-mode .pair-card::before { content: ''; position: absolute; top: 8px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: hsla(238, 14%, 50%, .32); }
.pair-steps li > span { min-width: 0; }
.pp-on { color: var(--good); font-weight: 700; }
.pp-off { color: var(--faint); font-weight: 650; }
.acct-row { display: flex; align-items: center; gap: 10px; padding: 12px 0 4px; }
.acct-more summary { list-style: none; }
.acct-acts { display: grid; gap: 6px; margin-top: 8px; }
.acct-acts button { min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--btn2-line, var(--hairline-strong)); background: linear-gradient(180deg, var(--btn2-a, hsl(var(--w))), var(--btn2-b, hsl(232, 45%, 95%))); font-weight: 720; font-size: 15px; text-align: left; color: var(--ink); cursor: pointer; }
.acct-acts button.danger { color: var(--action-strong); }
.pair-card .pp-row input#acctName { font-size: 16px; }
.pair-card .pp-row button[data-k=create-go] { border: 0; color: #fff; background: linear-gradient(135deg, var(--btn-a), var(--btn-b)); }
.acct-more summary::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 160ms var(--ease-hover); }
.acct-more[open] summary::after { transform: translateY(1px) rotate(-135deg); }

/* A short note at the top that leaves by itself. */
.toast {
  position: fixed; z-index: 80; top: calc(env(safe-area-inset-top) + 8px); left: 50%; max-width: calc(100vw - 24px); transform: translateX(-50%);
  padding: 11px 16px; border-radius: 14px; background: hsla(var(--w), .94); -webkit-backdrop-filter: blur(22px) saturate(1.6); backdrop-filter: blur(22px) saturate(1.6);
  border: 1px solid var(--hairline-strong); box-shadow: 0 14px 36px -18px rgba(var(--shadow-rgb), .55);
  font: 650 14px/1.35 var(--font-body); color: var(--ink); animation: toast-in 260ms var(--ios-ease);
}
.toast.bad { color: var(--action-strong); }
.toast.out { opacity: 0; transform: translate(-50%, -8px); transition: opacity 180ms var(--ease-hover), transform 180ms var(--ease-hover); }
.toast[hidden] { display: none; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Before Apaki runs (first visit, connecting): the PC screen is the whole phone screen, not a card on it. */
@media (max-width: 560px) {
  .pair-screen:not(.sheet-mode) { justify-content: flex-start; padding: calc(10px + env(safe-area-inset-top)) 0 calc(16px + env(safe-area-inset-bottom) + var(--kb-lift, 0px)); background: hsla(var(--w), .55); }
  .pair-screen:not(.sheet-mode) .pair-card { width: 100%; padding: 8px 20px 18px; border: 0; border-radius: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; animation: none; }
  .pair-screen:not(.sheet-mode) .pair-card h1 { font-size: 34px; letter-spacing: -.026em; }
  .pair-screen:not(.sheet-mode) .pair-brand { margin-bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  body.web.native .rail, body.web.native .main, .stack-dim, .ios-nav-t { transition: none !important; }
  body.web.native .menu, body.web.native .glass-panel, body.web.native .task-panel, body.web.native .sheet, .pair-screen.sheet-mode .pair-card, .toast { animation: none !important; }
}

/* =====================================================================
   Phone buttons in the app's button system (2026-10-10; app.css "Button
   system"). The rules above gave the PC screen's buttons a flat ground
   fill and its Forget and Remove a faint grey that read as disabled; here
   they take the shared looks: secondary = quiet gradient with an even
   hairline, ghost = no fill until pressed, primary = the brand gradient
   (already set in app.css). Bigger targets for the queue's buttons.
   ===================================================================== */
.pair-btn.quiet, .pp-row button:not([data-k="create-go"]), .pair-pcs button:not(.quiet), .pc-line button {
  background: linear-gradient(180deg, var(--btn2-a), var(--btn2-b)); border: 1px solid var(--btn2-line); color: var(--ink-deep);
  box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .06);
  transition: border-color var(--dur-fast) var(--ease-hover), background var(--dur-fast) var(--ease-hover), transform var(--dur-fast) var(--ease-hover);
}
.pp-row button:not([data-k="create-go"]):hover, .pair-pcs button:not(.quiet):hover, .pc-line button:hover, .acct-acts button:hover {
  background: linear-gradient(180deg, var(--btn2-hover-a), var(--btn2-hover-b)); border-color: var(--brand);
}
.pp-row button:active, .pair-pcs button:active, .pc-line button:active, .acct-acts button:active, .pair-btn.quiet:active { transform: scale(.97); }
.acct-acts button.danger:hover { background: var(--action-tint); border-color: var(--action); }
.pair-pcs button.quiet, .install-hint .ih-x {
  border: 1px solid transparent; background: none; box-shadow: none; color: var(--soft);
  transition: background var(--dur-fast) var(--ease-hover), color var(--dur-fast) var(--ease-hover);
}
.pair-pcs button.quiet:hover, .install-hint .ih-x:hover { background: var(--ghost-hover); color: var(--ink-deep); }
.pair-pcs button.quiet:active, .install-hint .ih-x:active { background: var(--ghost-press); }
.pp-row button, .pair-pcs button { border-radius: 12px; }
.install-hint button { border-radius: 10px; }
body.web .q-act, body.web .q-edit { height: 34px; padding: 0 14px; border-radius: 10px; }
body.web .q-x { width: 34px; height: 34px; border-radius: 10px; }
@media (prefers-reduced-motion: reduce) {
  .pp-row button:active, .pair-pcs button:active, .pc-line button:active, .acct-acts button:active, .pair-btn.quiet:active { transform: none; }
}

/* =====================================================================
   2026-10-11, Arthur tested the iOS app.
   1. "when the keypad opens up around the rounded corners of the keypad
      theres some black triangles before the apps background starts": the
      app keeps its WebView full screen now (capacitor.config.json Keyboard
      resize "none") and moves its own layout up by the keyboard's height,
      --kb (apaki/mobile/src/native-shell.js keyboard(); 0 everywhere else,
      so the site in Safari, which shrinks --vvh instead, is unchanged). The
      conversation and the list stay full height with their pearl under the
      keyboard, so its rounded corners show the page, not the window.
      --kb-lift is --kb less the home-indicator inset: things that already
      pad themselves by that inset (the composer, the list's footer, sheets)
      move up by the rest, so they end up right on the keyboard. It follows
      the keyboard in --kb-ms, UIKit's keyboard duration, on the iOS curve
      (a different duration would open a gap or hide the card for a moment).
   2. The conversation fades out just above the prompt card (mask on its
      scroller, from --composer-h), so around the card only the grid and
      pearl show, and the last message ends above the card (see the
      transcript rule near the top).
   ===================================================================== */
:root { --kb: 0px; --kb-ms: 250ms; --kb-lift: max(0px, calc(var(--kb) - env(safe-area-inset-bottom))); }
body.web.native .stages { bottom: var(--kb-lift); transition: bottom var(--kb-ms) var(--ios-ease); }
body.web.native .rail {
  padding-bottom: var(--kb-lift);
  transition: transform var(--stack-ms) var(--ios-ease), visibility 0s linear 0s, padding-bottom var(--kb-ms) var(--ios-ease);
}
body.web.native .pane > .ground {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--composer-h, 120px) - 16px), transparent calc(100% - var(--composer-h, 120px) + 24px));
  mask-image: linear-gradient(to bottom, #000 calc(100% - var(--composer-h, 120px) - 16px), transparent calc(100% - var(--composer-h, 120px) + 24px));
}
/* 2026-10-12: while the "You asked" pin shows, the conversation also fades out under it at the top (app.css, the
   2026-10-12 polish pass), so no cut line of text shows above or beside the card. */
body.web.native .pane:has(> .prompt-pin:not([hidden])) > .ground {
  -webkit-mask-image: linear-gradient(to bottom, transparent var(--pin-h, 0px), #000 calc(var(--pin-h, 0px) + 20px), #000 calc(100% - var(--composer-h, 120px) - 16px), transparent calc(100% - var(--composer-h, 120px) + 24px));
  mask-image: linear-gradient(to bottom, transparent var(--pin-h, 0px), #000 calc(var(--pin-h, 0px) + 20px), #000 calc(100% - var(--composer-h, 120px) - 16px), transparent calc(100% - var(--composer-h, 120px) + 24px));
}
/* A viewer has no prompt card under it (2026-10-13): its content (a chart, a table's last rows, a sheet's tabs) runs to
   the bottom instead of fading out where a conversation's message box would be. */
body.web.native .pane.viewer > .ground { -webkit-mask-image: none; mask-image: none; padding-bottom: env(safe-area-inset-bottom); }
/* The todo checklist reads with the conversation on a phone, where replies are 16 px: the body step, not the desktop's small one. */
body.web.native .todos { font-size: var(--fs-body); }
@media (prefers-reduced-motion: reduce) {
  body.web.native .stages, body.web.native .sheet-scrim, body.web.native .pair-screen.sheet-mode { transition: none !important; }
}

/* =====================================================================
   Tabs and pages on the conversation screen (pager.js, 2026-10-11).
   Arthur: "scroll sideways through the different panes in a tab, as well
   as above it scroll through the different tabs". Every rule needs
   body.paged (pager.js sets it), so without the pager the screen is as it
   was. The panes' own bars are hidden; one bar for the screen (.chat-chrome)
   says what the visible pane is and mirrors its buttons, the strip under it
   holds the tabs, a thin segmented bar the position. The stage is the
   pager: its splits are flattened so every pane is one page, with 16px of
   pearl between pages while they move. Taps answer in 150 to 200 ms; the
   swipe itself is the platform's own scrolling (momentum, snap, bounce).
   ===================================================================== */
.chat-chrome, .edge-catch { display: none; }
body.web.native.paged .pane-bar { display: none; }
body.web.native.paged .stages { top: var(--chat-top, calc(var(--nav-h) + env(safe-area-inset-top))); }
body.web.native.paged .chat-chrome {
  display: block; position: absolute; z-index: 5; top: 0; left: 0; right: 0; padding-top: env(safe-area-inset-top);
  background: hsla(var(--w), .82); -webkit-backdrop-filter: blur(22px) saturate(1.7); backdrop-filter: blur(22px) saturate(1.7);
  border-bottom: 1px solid var(--hairline);
}
body.web.native.paged .chat-chrome.bar-on:not(.strip-on) { padding-bottom: 8px; }
.cn-row { display: flex; align-items: center; gap: 2px; height: var(--nav-h); padding: 0 max(4px, env(safe-area-inset-right)) 0 98px; }
.cn-t { flex: 1; min-width: 0; text-align: center; padding-right: 4px; }
.cn-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 720 16px/1.2 var(--font-body); font-stretch: 104%; letter-spacing: -.005em; color: var(--ink-deep); }
.cn-title.cn-swap { animation: cn-swap 160ms var(--ease-out); }
@keyframes cn-swap { from { opacity: .2; } }
.cn-sub { display: flex; justify-content: center; gap: 6px; min-width: 0; margin-top: 1px; font-size: 11px; line-height: 1.25; color: var(--faint); }
.cn-sub:not(:has(span:not(:empty), .cn-link:not([hidden]))) { display: none; }
.cn-sub span:empty { display: none; }
/* Whose a viewer is, or a conversation's viewers (2026-10-12): in that conversation's accent (app.css .acc-N); a tap goes there. */
.cn-link { flex: 0 0 auto; min-width: 0; max-width: 72%; padding: 0; border: 0; background: none; font: inherit; font-weight: 750; color: hsl(var(--acc-hsl, 232, 30%, 50%)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; touch-action: manipulation; }
.cn-link[hidden] { display: none; }
.cn-link.gone { color: var(--faint); font-weight: 600; }
.cn-pos { flex: none; font-weight: 750; font-variant-numeric: tabular-nums; color: var(--brand-strong); }
.cn-cwd { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cn-acts { flex: none; display: flex; align-items: center; }
.cn-btn { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: none; color: var(--soft); cursor: pointer; transition: background-color 150ms var(--ease-hover); }
.cn-btn[hidden] { display: none; }
.cn-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.cn-btn:active { background: hsla(232, 60%, 62%, .12); }
.cn-btn.lit { color: var(--brand-strong); }
.cn-n { position: absolute; top: 5px; right: 4px; font: 700 10px/1 var(--font-mono); color: var(--brand-strong); }
.cn-n:empty { display: none; }

/* The tabs: a sideways strip; the current tab is a raised card, the others sit in the tint. */
.tab-strip {
  display: flex; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding: 2px 14px 12px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 18px), transparent);
}
.tab-strip[hidden] { display: none; }
.tab-strip::-webkit-scrollbar { display: none; }
.ts-chip {
  flex: none; display: inline-flex; align-items: center; gap: 7px; max-width: min(64vw, 260px); height: 34px; padding: 0 12px;
  border: 1px solid transparent; border-radius: 11px; background: hsla(238, 26%, 52%, .09); color: var(--soft);
  font: 650 13.5px/1 var(--font-body); cursor: pointer; -webkit-user-select: none; user-select: none; touch-action: manipulation;
  transition: background-color 170ms var(--ease-hover), color 170ms var(--ease-hover), border-color 170ms var(--ease-hover), box-shadow 170ms var(--ease-hover), transform 150ms var(--ease-out);
}
.ts-chip.on { background: var(--card); border-color: var(--hairline-strong); color: var(--ink-deep); box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .07), 0 8px 18px -12px rgba(var(--shadow-rgb), .45); }
.ts-chip:active { transform: scale(.97); }
.ts-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-chip.busy .ts-t { color: var(--brand-strong); }
.ts-chip.unread .ts-t { color: var(--good); }
/* A tab with a question waiting for you, and the pane that asks among a tab's pages: the attention colour, as on the PC (askcard.js). */
.ts-chip.waiting .ts-t { color: var(--action-strong); }
.cn-wait { flex: none; font-weight: 700; color: var(--action-strong); }
.ts-n { flex: none; font: 650 11px/1 var(--font-mono); color: var(--faint); }

/* Where you are among the tab's panes: short segments, the lit one follows the finger (pager.js --on). */
.pager-bar { position: absolute; left: 0; right: 0; bottom: 4px; display: flex; justify-content: center; gap: 4px; height: 3px; pointer-events: none; }
.pager-bar[hidden] { display: none; }
.pager-bar i { position: relative; width: 20px; height: 3px; border-radius: 2px; background: var(--hairline-strong); overflow: hidden; }
.pager-bar i::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: var(--brand-strong); opacity: var(--on, 0); }
.pager-bar i.waiting { background: var(--action); }

/* The pager. */
body.web.native.paged .stage.on {
  display: flex; column-gap: 16px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
body.web.native.paged .stage::-webkit-scrollbar { display: none; }
body.web.native.paged .stage .split { display: contents !important; }
body.web.native.paged .stage .pane, body.web.native.paged .stage.multi .pane:not(.focused) {
  display: grid; flex: 0 0 100% !important; width: 100%; min-width: 100%; scroll-snap-align: start; scroll-snap-stop: always;
  border-radius: 0; box-shadow: none; /* one pane per screen: no focus ring (the desktop marks the focused pane of a split) */
}
/* The desktop's hint about dragging sessions onto pane edges has no meaning on a phone. */
body.web .empty .hint { display: none; }
body.web.native.paged .stage.pg-in { animation: pg-in 180ms var(--ease-out); }
@keyframes pg-in { from { opacity: 0; } }
/* The swipe back to the list starts here, on the screen's left edge between the bars and the composer (native.js). */
body.web.native.paged .edge-catch { display: block; position: absolute; z-index: 4; left: 0; width: 20px; top: var(--chat-top, 88px); bottom: calc(120px + var(--kb-lift, 0px)); touch-action: none; }

/* =====================================================================
   On your desktop (desktop.js, 2026-10-11): the desktop window's tabs and
   their panes, at the top of the list. Cards per tab on the pearl, rows as
   in the session list; a conversation opens here (chevron), the rest are
   quiet; working is the live grid and the word, never a dot.
   ===================================================================== */
.desk { margin: 12px 16px 6px; }
.desk[hidden] { display: none; }
.desk-head { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; padding: 4px 2px; border: 0; background: none; color: var(--ink-deep); text-align: left; cursor: pointer; }
.desk-k { font: 900 10.5px/1 var(--font-display); font-stretch: 125%; letter-spacing: .13em; text-transform: uppercase; color: var(--brand-strong); }
.desk-n { font-size: 12px; font-weight: 650; color: var(--faint); }
.desk-head svg { margin-left: auto; width: 12px; height: 12px; fill: none; stroke: var(--soft); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 180ms var(--ease-out); }
.desk.folded .desk-head svg { transform: rotate(-90deg); }
.desk-body { display: grid; gap: 8px; margin-top: 2px; }
.desk-body[hidden] { display: none; }
.desk-tab { overflow: hidden; border: 1px solid var(--hairline); border-radius: 14px; background: hsla(var(--w), .78); }
.desk-tab.front { border-color: var(--hairline-strong); box-shadow: 0 12px 28px -22px rgba(var(--shadow-rgb), .55); }
.desk-tab-h { display: flex; align-items: baseline; gap: 8px; padding: 10px 14px 2px; font: 760 12px/1.2 var(--font-body); color: var(--soft); }
.desk-front { font: 800 9.5px/1 var(--font-display); font-stretch: 125%; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-strong); }
.desk-tab-n { margin-left: auto; font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--faint); }
.desk-rows { list-style: none; margin: 0; padding: 0 0 2px; }
.desk-row { position: relative; display: flex; align-items: center; gap: 11px; width: 100%; min-height: 50px; padding: 8px 38px 8px 14px; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; }
.desk-rows li + li .desk-row::before { content: ''; position: absolute; top: 0; left: 41px; right: 0; height: 1px; background: var(--hairline); }
.desk-row.go { cursor: pointer; -webkit-user-select: none; user-select: none; touch-action: manipulation; transition: background-color 120ms var(--ease-hover); }
.desk-row.go:active { background: hsla(232, 60%, 62%, .1); }
.desk-row.go::after { content: ''; position: absolute; top: 50%; right: 18px; width: 8px; height: 8px; margin-top: -4px; border-right: 2px solid var(--faint); border-bottom: 2px solid var(--faint); transform: rotate(-45deg); opacity: .55; }
.desk-g { flex: none; display: grid; place-items: center; width: 16px; }
.desk-g svg { width: 16px; height: 16px; fill: none; stroke: var(--soft); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.desk-row.go .desk-g svg { stroke: var(--brand-strong); }
.desk-t { min-width: 0; display: grid; gap: 3px; }
.desk-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15.5px; font-weight: 650; line-height: 1.3; }
.desk-row.quiet { min-height: 42px; padding-right: 14px; color: var(--soft); }
.desk-row.quiet .desk-t { flex: 1; }
.desk-kind { flex: none; margin-left: 8px; font: 800 9.5px/1 var(--font-display); font-stretch: 125%; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); }
.desk-row.quiet .desk-name { font-size: 14.5px; font-weight: 560; }
.desk-m { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; line-height: 1.2; color: var(--faint); }
/* A viewer's conversation on the PC (2026-10-12): quiet, under the viewer's name, the same size as the row's meta line. */
.desk-for { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; line-height: 1.2; color: var(--soft); }
.desk-row.busy .desk-m { color: var(--brand-strong); }
.desk-row.front .desk-m { color: var(--soft); }
.desk-more { width: 100%; min-height: 42px; border: 0; border-radius: 12px; background: hsla(238, 26%, 52%, .08); color: var(--brand-deep); font-weight: 720; font-size: 14px; cursor: pointer; }
.desk-more:active { background: hsla(238, 26%, 52%, .14); }

@media (prefers-reduced-motion: reduce) {
  .ts-chip, .cn-btn, .desk-row.go, .desk-head svg { transition: none !important; }
  .ts-chip:active { transform: none; }
  .cn-title.cn-swap, body.web.native.paged .stage.pg-in { animation: none !important; }
}

/* =====================================================================
   The phone's enrollment and connection screens, polished (2026-10-11;
   boot.js, apaki/remote/ENROLL.md). Built that morning as plain markup;
   here they get one visual language with the rest of the phone:
   - a small state tile above the title (.state-mark: a passkey, a clock,
     a block), tinted by meaning, never a dot;
   - "Allow this phone on <PC>": the phone, Apaki's live grid and the PC in
     one line (.wait-line), and the name the PC shows for this phone;
   - the enrollment sheet: one primary (Create a passkey, with the Face ID
     frame), a secondary, and "Not now" as a plain text button;
   - the PC list: each PC a card with a PC glyph that lights while it is
     online or connected; Connect, Open and Disconnect in the button system,
     Remove and Forget as quiet text; the account as a monogram row;
   - a sheet over the running app shows the app behind its scrim.
   ===================================================================== */
body.web:not(.linked):has(#pairScreen.sheet-mode:not([hidden])) .rail,
body.web:not(.linked):has(#pairScreen.sheet-mode:not([hidden])) .main { visibility: visible; }

.state-mark {
  display: grid; place-items: center; width: 52px; height: 52px; margin: 2px 0 16px; border-radius: 15px;
  background: hsla(238, 26%, 52%, .1); color: var(--soft); animation: rise 220ms var(--ease-out);
}
.state-mark svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.state-mark.tone-brand { color: #fff; background: linear-gradient(135deg, var(--btn-a), var(--btn-b)); box-shadow: 0 10px 24px -14px rgba(var(--shadow-rgb), .7); }
.state-mark.tone-warn { color: var(--action-strong); background: var(--action-tint); }

/* This phone, waiting on that PC. */
.wait-line { display: flex; align-items: center; gap: 14px; margin: 20px 0 6px; }
.wl-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: hsla(var(--w), .85); border: 1px solid var(--hairline-strong); color: var(--brand-strong); }
.wl-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.wait-line .egrid { grid-template-columns: repeat(5, 5px); grid-template-rows: repeat(3, 5px); gap: 4px; }
.wait-line .egrid i { width: 5px; height: 5px; border-radius: 1.5px; }

/* The enrollment sheet. */
.pair-card:has(.enroll-sheet) .pair-brand { display: none; }
.enroll-sheet h1 { margin-top: 8px; }
.enroll-sheet .enroll-now { position: relative; padding: 11px 12px 11px 34px; margin-top: 14px; border-radius: 12px; background: hsla(238, 26%, 52%, .07); font-size: 14px !important; }
.enroll-sheet .enroll-now::before {
  content: ''; position: absolute; left: 12px; top: 14px; width: 14px; height: 14px; background: var(--good);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.2 8.4 6.4 11.4 12.8 4.8' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.2 8.4 6.4 11.4 12.8 4.8' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.enroll-sheet .pp-row { margin-top: 16px; }
.enroll-sheet .pair-btn.enroll-create { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; }
.enroll-sheet .pair-btn.enroll-create::before {
  content: ''; width: 20px; height: 20px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.5 3.8H6A2.2 2.2 0 0 0 3.8 6v1.5M16.5 3.8H18A2.2 2.2 0 0 1 20.2 6v1.5M7.5 20.2H6A2.2 2.2 0 0 1 3.8 18v-1.5M16.5 20.2H18a2.2 2.2 0 0 0 2.2-2.2v-1.5M9 9.2v1.3M15 9.2v1.3M12 9.2v3.6h-1M9.4 15.6a4 4 0 0 0 5.2 0'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.5 3.8H6A2.2 2.2 0 0 0 3.8 6v1.5M16.5 3.8H18A2.2 2.2 0 0 1 20.2 6v1.5M7.5 20.2H6A2.2 2.2 0 0 1 3.8 18v-1.5M16.5 20.2H18a2.2 2.2 0 0 0 2.2-2.2v-1.5M9 9.2v1.3M15 9.2v1.3M12 9.2v3.6h-1M9.4 15.6a4 4 0 0 0 5.2 0'/%3E%3C/svg%3E") center / contain no-repeat;
}
.enroll-sheet .pair-btn.enroll-signin { margin-top: 10px; }
.enroll-sheet .pair-btn.quiet.enroll-later { min-height: 44px; margin-top: 6px; border-color: transparent; background: none; box-shadow: none; color: var(--soft); font-weight: 700; }
.enroll-sheet .pair-btn.quiet.enroll-later:active { background: var(--ghost-press); }
.enroll-sheet .pair-btn[disabled] { opacity: .6; }

/* The PC list: a card per PC. */
.pair-pcs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 10px; }
.pair-pcs li { flex-wrap: wrap; gap: 8px 10px; padding: 11px 10px 10px 12px; border: 1px solid var(--hairline); border-radius: 14px; background: hsla(var(--w), .74); }
/* The name and its state take the card's width; the buttons sit on a row of their own, under the name. */
.pair-pcs .pp-t { flex: 1 1 calc(100% - 52px); }
.pair-pcs li > button:first-of-type { margin-left: 48px; }
.pair-pcs li.here { border-color: var(--hairline-strong); box-shadow: 0 10px 26px -20px rgba(var(--shadow-rgb), .55); }
.pp-ic { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: hsla(238, 26%, 52%, .09); color: var(--faint); }
.pp-ic svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pp-ic.lit { color: var(--brand-strong); background: hsla(232, 60%, 62%, .13); }
.pp-ic.lit svg rect { fill: hsla(var(--pearl-stop-blue), .16); }
.pair-pcs li.blocked .pp-ic { color: var(--action-strong); background: var(--action-tint); }
.pp-t b { font-size: 15.5px; }
/* Long PC names wrap to two lines rather than lose their end beside the buttons. */
.pair-pcs .pp-t b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; line-height: 1.25; overflow-wrap: anywhere; }
.pp-t small { margin-top: 3px; line-height: 1.35; }
.pp-blocked { color: var(--action-strong) !important; font-weight: 700; }
.pair-pcs button { min-height: 38px; padding: 0 12px; font-size: 14px; }
.pair-pcs button.quiet { padding: 0 8px; font-weight: 650; }
.acct-row { gap: 12px; padding: 14px 0 6px; }
.acct-ic {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--btn-a), var(--btn-b)); color: #fff; font: 900 17px/1 var(--font-display); font-stretch: 125%;
}
@media (prefers-reduced-motion: reduce) { .state-mark { animation: none; } }

/* A pane that follows a desktop pane where this phone may watch, not send (app.js followDesktop, the PC's planned op
   follow, No shell or Chat only access; 2026-10-11): the prompt card gives way to one quiet line. Phone only. */
.view-only-note { display: none; }
body.web .pane.view-only .composer, body.web .pane.view-only .slash, body.web .pane.view-only .queue { display: none !important; }
body.web .pane.view-only .view-only-note {
  display: grid; gap: 3px; max-width: 560px; margin: 0 auto; padding: 11px 16px; border-radius: 16px; text-align: center; pointer-events: auto;
  background: hsla(var(--w), .6); -webkit-backdrop-filter: blur(14px) saturate(1.6); backdrop-filter: blur(14px) saturate(1.6); border: 1px solid hsla(var(--w), .78);
  font-size: 12.5px; line-height: 1.4; color: var(--soft);
}
.view-only-note b { font: 900 10px/1.2 var(--font-display); font-stretch: 125%; letter-spacing: .13em; text-transform: uppercase; color: var(--brand-strong); }

/* The follow bar (2026-10-12, the shared view; pane.js renderFollowBar): a pane that shows a conversation open in a pane on the PC
   says so at the top of the conversation and offers Take over. One quiet row with a hairline under it: no dot, no stripe, no pill.
   The model, effort and mode chips of such a pane are the PC pane's, so they stay on screen but cannot be changed here. */
.follow-bar { display: none; }
body.web .pane.following .follow-bar {
  position: sticky; top: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 44px; margin: 0 0 6px; padding: 0 4px 0 16px;
  background: hsla(var(--w), .74); -webkit-backdrop-filter: blur(14px) saturate(1.6); backdrop-filter: blur(14px) saturate(1.6);
  border-bottom: 1px solid var(--hairline);
}
.follow-bar .fb-t { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: var(--fs-small); color: var(--soft); }
.follow-bar .fb-t svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.follow-bar .fb-w { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.follow-bar .fb-w b { font-weight: 680; color: var(--ink); }
.follow-bar .fb-go { flex: none; min-width: 44px; min-height: 44px; padding: 0 14px; border: 0; background: none; font: inherit; font-size: var(--fs-small); font-weight: 760; color: var(--brand-strong); cursor: pointer; }
.follow-bar .fb-go:active { opacity: .6; }
body.web .pane.following .chip-btn.model, body.web .pane.following .chip-btn.effort, body.web .pane.following .chip-btn.mode { opacity: .6; pointer-events: none; }
/* ---------- git worktrees on the phone (2026-10-12; apaki/ui/worktree.js, diff.js) ----------
   Arthur: "make sure we're updating the app alongside the desktop app so all functionality is equal across the board".
   The window's own code draws the Worktrees view, the branch label, the sheets and the diff viewer; this file gives
   them touch sizes. There is no hover on a phone: a worktree row shows its two actions all the time, in place of
   nothing (the count stays), and every target is 44 px. The branch label also sits in the nav row (pager.js). */
body.web .wt-acts { position: static; padding-left: 0; transform: none; opacity: 1; pointer-events: auto; }
body.web .wt-row:hover .wt-nn, body.web .wt-row:hover .wt-tr { opacity: 1; }
body.web .wt-act { width: 36px; height: 36px; background: none; }
body.web.native .sessions li.wt-repo { padding: 14px 18px 6px; margin: 6px 0 0; }
body.web.native .sessions li.wt-row { padding: 6px 8px 6px 18px; min-height: 48px; gap: 10px; }
body.web.native .sessions li.wt-row .wt-bn { font-size: 16px; font-weight: 680; }
body.web.native .sessions li.wt-row .wt-nn, body.web.native .sessions li.wt-row .wt-tr, body.web.native .wt-repo .wt-rc { font-size: 12px; }
body.web.native .wt-repo .wt-rn { font-size: 12px; }
body.web.native .sessions li.wt-kid { margin-left: 0; padding-left: 36px; }
body.web.native .sessions li.wt-showmore { margin: 0; padding: 4px 18px 8px 36px; }
body.web.native .sessions li.wt-clean { margin: 6px 16px 10px; padding: 12px 14px; border-radius: 12px; font-size: 14px; }
body.web.native .sessions li.wt-newrow { margin: 4px 0; padding: 6px 12px; }
body.web.native .sessions li.wt-newrow .link-btn, body.web.native .sessions li.wt-showmore .link-btn, body.web.native .sessions li.wt-clean .link-btn { min-height: 44px; padding: 0 12px; font-size: 15px; }
body.web.native .sessions li.wt-showmore, body.web.native .sessions li.wt-newrow, body.web.native .sessions li.wt-clean { -webkit-user-select: none; user-select: none; }
body.web .sessions .wt-tag { font-size: inherit; }
/* The label in the nav row, under the conversation's name: tappable, with a larger hit area than it looks. */
.cn-wt { flex: 0 1 auto; min-width: 0; display: inline-flex; overflow: hidden; }
.cn-wtb { max-width: 100%; margin: -8px 0; padding: 8px 6px; font-size: 11px; }
/* The branch label says where the conversation is; the folder and session id beside it would only crowd it. */
.cn-wt:not(:empty) ~ .cn-cwd { display: none; }
.cn-wtb:active { background: hsla(232, 60%, 62%, .12); }
/* Sheets and the diff viewer. */
body.web .sheet .wt-f input[type=text], body.web .sheet .wt-f select, body.web .sheet .wt-f textarea { font-size: 16px; padding: 11px 12px; }
body.web .sheet .wt-file { min-height: 44px; }
body.web .sheet .wt-c { min-height: 44px; align-items: center; }
body.web .sheet .wt-c input, body.web .sheet .wt-file input { width: 20px; height: 20px; }
body.web .sheet .wt-cmds { font-size: 12.5px; }
body.web .sheet .wt-link { min-height: 44px; font-size: 15px; }
body.web .sheet .wt-mode { display: flex; width: 100%; }
body.web .sheet .wt-mode button { flex: 1; justify-content: center; min-height: 40px; font-size: 15px; }
body.web .sheet select { font-size: 16px; }
body.web .df-bar { padding: 8px 12px; }
body.web .df-bar .seg button { min-height: 36px; font-size: 14px; }
body.web .df-btn { min-height: 36px; font-size: 14px; }
body.web .df-file > summary { min-height: 48px; padding: 10px 12px; }
body.web .df-pre { font-size: 12px; }
@media (prefers-reduced-motion: reduce) { .cn-wtb { transition: none; } }
/* =====================================================================
   2026-10-12, phone parity (Arthur: every desktop feature also works on
   the phone). Ask Claude, find in a conversation, the session menu and
   the PC browser's page. Sizes come from app.css's type tokens; the only
   px sizes are the 16 px fields iOS needs so it does not zoom on focus.
   Every touch target is at least 44 px.
   ===================================================================== */

/* Ask Claude: the button under the search box (shown when the PC takes it, body.can-ask). */
body.web.native .lens { margin: 10px 16px 0; min-height: 44px; gap: 10px; }
body.web.native .lens-info { font-size: var(--fs-small); -webkit-line-clamp: 3; }
body.web.native .ask { height: 44px; padding: 0 16px 0 13px; border-radius: 12px; gap: 8px; font-size: var(--fs-body); }
body.web.native .ask svg { width: 17px; height: 17px; }
body.web.native .ask:active { background-color: hsla(232, 60%, 62%, .12); }

/* Find in a conversation (find.js): a bar the width of the screen under the conversation bar, big targets, no case toggle. */
body.web.native .pane > .find-bar {
  justify-self: stretch; margin: 8px 10px 0; min-height: 52px; padding: 4px 4px 4px 14px; gap: 2px; border-radius: 16px;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto auto;
}
body.web.native .find-bar input { height: 44px; font-size: 16px; padding: 0 6px; }
body.web.native .find-bar .fb-n { min-width: 0; padding: 0 6px 0 2px; font-size: var(--fs-small); }
body.web.native .find-bar button { height: 44px; min-width: 44px; border-radius: 12px; }
body.web.native .find-bar button svg, body.web.native .find-bar .fb-i svg { width: 18px; height: 18px; }
body.web.native .find-bar button:active { background: hsla(232, 60%, 62%, .14); }
body.web.native .find-bar .fb-case { display: none; }
body.web.native .find-bar .fb-note { padding: 0 8px 6px; font-size: var(--fs-small); }
body.web.native .find-bar .fb-note .fb-all { min-height: 36px; padding: 0 12px; font-size: var(--fs-small); border-radius: 10px; }
body.web.native .pane.finding > .prompt-pin { padding-top: 70px; }
body.web.native .pane.finding.find-cut > .prompt-pin { padding-top: 120px; }

/* The page Claude opened in the PC's browser (browserview.js): a sheet from the bottom, a picture in it. */
.bv-scrim { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; background: rgba(16, 14, 38, .26); animation: bv-fade 200ms var(--ease-out); }
.bv-scrim[hidden] { display: none; }
@keyframes bv-fade { from { opacity: 0; } }
.bv {
  position: relative; width: 100%; max-height: calc(var(--vvh, 100dvh) - env(safe-area-inset-top) - 18px); display: flex; flex-direction: column; gap: 10px; outline: none;
  padding: 26px 16px calc(14px + env(safe-area-inset-bottom)); border: 1px solid var(--hairline-strong); border-width: 1px 0 0; border-radius: 22px 22px 0 0;
  background: var(--card); box-shadow: 0 -8px 40px -16px rgba(var(--shadow-rgb), .45); animation: sheet-up 320ms var(--ios-ease);
}
.bv::before { content: ''; position: absolute; top: 7px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: hsla(238, 14%, 50%, .32); }
.bv-head { display: grid; gap: 3px; min-width: 0; }
.bv-k { font: 900 var(--fs-micro)/1 var(--font-display); font-stretch: 125%; letter-spacing: .13em; text-transform: uppercase; color: var(--brand-strong); }
.bv-title { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 800 var(--fs-title)/1.25 var(--font-display); font-stretch: 112%; letter-spacing: -.012em; color: var(--ink-deep); }
.bv-addr { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--faint); }
/* The pages of the conversation's browser on the PC (2026-10-12), from two: one sideways row, the one shown filled. */
.bv-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; margin: 0 -2px; padding: 0 2px; }
.bv-tabs[hidden] { display: none; }
.bv-tabs::-webkit-scrollbar { display: none; }
.bv-tab {
  flex: none; max-width: min(56vw, 220px); height: 32px; padding: 0 12px; border: 1px solid transparent; border-radius: 10px;
  background: hsla(238, 26%, 52%, .09); color: var(--soft); font: 650 var(--fs-small)/1 var(--font-body);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; touch-action: manipulation;
  transition: background-color 160ms var(--ease-hover), color 160ms var(--ease-hover);
}
.bv-tab.on { background: var(--card); border-color: var(--hairline-strong); color: var(--ink-deep); }
@media (prefers-reduced-motion: reduce) { .bv-tab { transition: none; } }
.bv-body { position: relative; min-height: 0; flex: 0 1 auto; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; border: 1px solid var(--hairline-strong); border-radius: 14px; background: var(--tint); }
.bv-shot { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; touch-action: manipulation; }
.bv-shot[hidden] { display: none; }
.bv-shot img { display: block; width: 100%; height: auto; }
.bv.zoom .bv-shot { width: 240%; cursor: zoom-out; }
.bv-state { padding: 14px; font-size: var(--fs-small); line-height: 1.45; color: var(--soft); }
.bv-state[hidden] { display: none; }
.bv-state.bad { color: var(--action-strong); }
.bv-state.skeleton {
  min-height: 52vw; padding: 0;
  background: linear-gradient(100deg, transparent 30%, hsla(var(--pearl-stop-blue), .13) 50%, transparent 70%) 0 0 / 200% 100% no-repeat, var(--tint);
  animation: sweep 1.7s linear infinite;
}
.bv-body:has(.bv-shot:not([hidden])) .bv-state:not([hidden]) { border-top: 1px solid var(--hairline); background: hsla(var(--w), .7); }
.bv-act { min-height: 0; font: 600 var(--fs-small)/1.35 var(--font-body); color: var(--soft); }
.bv-act:empty { display: none; }
.bv-foot { display: flex; justify-content: space-between; gap: 10px; font: 500 var(--fs-micro)/1.35 var(--font-mono); color: var(--faint); }
.bv-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.bv-row button {
  min-height: 44px; padding: 0 16px; border: 1px solid var(--btn2-line); border-radius: 12px; cursor: pointer; font: 720 var(--fs-body)/1 var(--font-body); color: var(--ink-deep);
  background: linear-gradient(180deg, var(--btn2-a), var(--btn2-b)); box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .06);
  transition: transform var(--dur-fast) var(--ease-hover), opacity var(--dur-fast) var(--ease-hover);
}
.bv-row button[hidden] { display: none; }
.bv-row button.primary { border-color: transparent; color: #fff; background: linear-gradient(135deg, var(--btn-a), var(--btn-b)); }
.bv-row button:active { transform: scale(.97); }
.bv-row button:disabled { opacity: .6; }
.bv-row [data-k=x] { margin-right: auto; border-color: transparent; background: none; box-shadow: none; color: var(--soft); }
body.bv-open .toast { z-index: 90; }
@media (prefers-reduced-motion: reduce) {
  .bv-scrim, .bv { animation: none; }
  .bv-state.skeleton { animation: none; }
  .bv-row button, .bv-row button:active { transition: none; transform: none; }
}

/* ---------- the compact session list and folders that open in place, on the phone (2026-10-12, sessionlist.js) ----------
   One line per row (the name and the time), 48 px tall for the finger; the row open on the PC side shows its second
   line; a long press opens the menu (native.js), so there is no ... button. Folders open in place in the same scroll as
   the list, their rows the list's rows, indented. */
body.web.native :is(.sessions, .folder-sess) li.srow { padding: 0 34px 0 18px; }
body.web.native .srow .sr-line { min-height: 48px; gap: 8px; }
body.web.native .srow .sr-more { display: none; }
body.web.native .srow .sr-time { padding-right: 0; font-size: var(--fs-small); }
body.web.native .srow .sr-s { width: 16px; height: 16px; }
body.web.native .srow .sr-s svg { width: 14px; height: 14px; }
body.web.native .srow .sr-lead { width: 26px; height: 26px; }
body.web.native .srow .sr-lead svg { width: 17px; height: 17px; }
body.web.native .srow .sr-detail-in { padding-left: 34px; }
body.web.native :is(.sessions, .folder-sess) .srow .snip, body.web.native :is(.sessions, .folder-sess) .srow .why { margin-left: 34px; }
body.web.native .srow:focus-visible .sr-detail, body.web.native .srow.menu-open .sr-detail { grid-template-rows: 0fr; }
body.web.native .srow.on .sr-detail, body.web.native .srow.subs-open .sr-detail { grid-template-rows: 1fr; }
body.web.native :is(.sessions, .folder-sess) .srow .m { padding-bottom: 10px; }
/* "Open" moves from after the name (which is cut now) to before the time. */
body.web.native .sessions li.srow.on .t::after, body.web.native .sessions li.srow.shown .t::after { content: none; }
body.web.native .srow .sr-end { display: flex; align-items: center; gap: 8px; }
body.web.native .srow.on .sr-end::before, body.web.native .srow.shown .sr-end::before {
  content: 'Open'; font: 800 var(--fs-micro)/1 var(--font-display); font-stretch: 125%; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-strong);
}
body.web.native .sessions li.sr-group { padding: 16px 18px 6px; font-size: var(--fs-small); }
body.web.native .sessions li.sr-group::before, body.web.native .sessions li.sr-group::after { content: none; }
/* Folders: no inner scroll on the phone (the page scrolls), rows a finger tall. */
body.web.native .rail-folders .folder-list { max-height: none; overflow: visible; padding: 4px 0 0; }
body.web.native .folder-row { height: 48px; padding: 0 16px 0 18px; border-radius: 0; gap: 10px; }
body.web.native .folder-row .fn { font-size: var(--fs-body); }
body.web.native .folder-sess { padding-left: 16px; }
body.web.native .folder-sess li.srow { position: relative; margin: 0; border: 0; border-radius: 0; box-shadow: none; background: none; }
body.web.native .folder-sess li.srow::before { content: ''; position: absolute; left: 18px; right: 0; bottom: 0; height: 1px; background: var(--hairline); }
body.web.native .folder-sess li.srow:active, body.web.native .folder-row:active { background: hsla(232, 60%, 62%, .1); }
body.web.native .folder-note { padding: 8px 18px 12px; }
/* Details on the phone: a narrower label column, and copy buttons a finger can hit. */
body.web .sheet .sd-rows { grid-template-columns: 104px minmax(0, 1fr); gap: 6px 12px; }
body.web .sheet .sd-btn { min-height: 44px; min-width: 56px; padding: 0 12px; border-radius: 10px; }
body.web .sheet .sd-rows dd { align-items: center; }
/* Keep-warm's moving ring sits inside the full-width row, rounded, so it never reads as a mark down one edge. */
body.web.native :is(.sessions, .folder-sess) li.srow .warm-ring { inset: 4px 10px 4px 10px; border-radius: 10px; }
body.web.native .folder-note .link-btn { min-height: 44px; }
