/* Corner Cuts app. Same brand as the website (DESIGN.md: charcoal "chair",
   logo red as the only accent, Archivo in two widths, paper #f2f2f0), styled as
   an app: fixed shell, large-title app bar, bottom tab bar, bottom sheets.
   Client side is paper with charcoal bars; Jeff's side is all charcoal. */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Archivo Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Liberation Sans");
  size-adjust: 99%;
  ascent-override: 88%;
  descent-override: 20%;
  line-gap-override: 0%;
}

:root {
  --paper: #f2f2f0;
  --paper-2: #e7e8e6;
  --paper-3: #dcdedb;
  --ink: #141518;
  --ink-2: #4a4c52;
  --ink-3: #62656c;
  --chair: #1a1c21;
  --chair-2: #22252b;
  --chair-3: #2b2f36;
  --chair-4: #363a42;
  --on-chair: #f4f4f2;
  --on-chair-2: #b8bbc1;
  --red: #e11d26;
  --red-ink: #c8102e;
  --red-deep: #a30d25;
  --red-soft: #fbe9eb;
  --red-light: #ff6b72;
  --ok-ink: #1d5a35;
  --ok-soft: #e3f3e8;
  --ok-light: #7fd1a4;
  --open: #2fb463;

  --font: "Archivo", "Archivo Fallback", Arial, Helvetica, sans-serif;
  --ease-out: cubic-bezier(.2, 0, 0, 1);
  --fast: 160ms;
  --base: 240ms;
  --gutter: 16px;
  --appbar-h: 48px;
  --tabbar-h: 58px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
}

/* Theme tokens: client (paper) by default, Jeff's view is charcoal. */
.app {
  --bg: var(--paper);
  --surface: #fff;
  --surface-2: var(--paper-2);
  --line: var(--paper-3);
  --text: var(--ink);
  --text-2: var(--ink-2);
  --text-3: var(--ink-3);
  --accent: var(--red-ink);
  --accent-press: var(--red-deep);
  --focus: var(--red-ink);
  --press: rgba(20, 21, 24, .06);
  --tab-bg: #fff;
  --tab-line: var(--paper-3);
  --tab-ink: var(--ink-2);
  --tab-on: var(--red-ink);
  --tab-pill: rgba(200, 16, 46, .1);
  --sheet-bg: var(--paper);
  --ok: var(--ok-ink);
  --ok-bg: var(--ok-soft);
  --warn: var(--red-deep);
  --warn-bg: var(--red-soft);
  --shadow: 0 1px 0 rgba(20, 21, 24, .05), 0 10px 24px -18px rgba(20, 21, 24, .35);
}
.app[data-mode="jeff"] {
  --bg: var(--chair);
  --surface: var(--chair-2);
  --surface-2: var(--chair-3);
  --line: rgba(255, 255, 255, .1);
  --text: var(--on-chair);
  --text-2: var(--on-chair-2);
  --text-3: #a3a7ae;
  --accent: var(--red);
  --accent-press: var(--red-ink);
  --focus: var(--red-light);
  --press: rgba(255, 255, 255, .07);
  --tab-bg: #131418;
  --tab-line: rgba(255, 255, 255, .08);
  --tab-ink: var(--on-chair-2);
  --tab-on: #fff;
  --tab-pill: rgba(225, 29, 38, .24);
  --sheet-bg: var(--chair-2);
  --ok: var(--ok-light);
  --ok-bg: rgba(127, 209, 164, .14);
  --warn: var(--red-light);
  --warn-bg: rgba(225, 29, 38, .16);
  --shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  height: 100%;
  background: var(--chair);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ink);
  background: var(--chair);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
address { font-style: normal; }
[hidden] { display: none !important; }

/* Controls behave like app controls: no selection, no tap flash, no callout, no double-tap zoom. */
button, a, label, input, .tab, .chip, .btn, .row, .appbar, .tabbar, .seg, .day, .pv-chip, .tip-btn, .pay-btn {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button, .tab, .chip, .btn, .appbar, .tabbar, .seg, .day, .pv-chip, .tip-btn, .pay-btn, a.row, button.row, label.row, .check, .j-btn, .recap-link {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.appbar :focus-visible, .band :focus-visible, .recap :focus-visible, .btn-primary:focus-visible { outline-color: var(--red); }
.app[data-mode="jeff"] :focus-visible { outline-color: var(--red-light); }
.large-title:focus, .sheet:focus, .view:focus { outline: none; }

.ic { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic-inline { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -0.2em; }

/* =================================================================
   Shell
   ================================================================= */
.app {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg);
  color: var(--text);
}

.appbar {
  flex: none;
  position: relative;
  z-index: 3;
  background: var(--chair);
  color: var(--on-chair);
  padding: var(--sat) var(--sar) 0 var(--sal);
  box-shadow: 0 1px 0 transparent;
  transition: box-shadow var(--fast);
  view-transition-name: appbar;
}
.appbar.is-compact { box-shadow: 0 1px 0 rgba(255, 255, 255, .09); }
.appbar-row {
  height: var(--appbar-h);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  padding: 0 6px;
}
.appbar-lead { justify-self: start; display: flex; align-items: center; min-width: 0; }
.appbar-trail { justify-self: end; display: flex; align-items: center; gap: 2px; }
.appbar-title {
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 48vw;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--fast), transform var(--fast) var(--ease-out);
}
.appbar.is-compact .appbar-title { opacity: 1; transform: none; }

.ab-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 2px;
  min-height: 44px; min-width: 44px; padding: 0 8px;
  border: 0; border-radius: 12px; background: transparent; color: var(--on-chair);
  font-weight: 600; font-size: 1rem; text-decoration: none; white-space: nowrap;
  transition: background-color var(--fast);
}
.ab-btn:active { background: rgba(255, 255, 255, .1); }
.ab-back { padding-left: 2px; }
.ab-back span { max-width: 30vw; overflow: hidden; text-overflow: ellipsis; }
.ab-brand { padding: 0 6px; }
.ab-brand img { width: auto; height: 32px; }
/* "Client view" pill: 36px visual, 44px tap area through the margin box. */
.ab-pill { position: relative; font-size: .9375rem; padding: 0 14px; min-height: 36px; margin: 0 4px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .28); }
.ab-pill::before { content: ""; position: absolute; inset: -4px -2px; }

.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--red-ink); color: #fff;
  font-weight: 800; font-size: .875rem; letter-spacing: .02em;
}
.avatar-lg { width: 64px; height: 64px; font-size: 1.375rem; margin: 2px 0 10px; }
.app[data-mode="jeff"] .avatar { background: var(--chair-4); }
.app[data-mode="jeff"] .band .avatar-lg { background: var(--red-ink); }

.view {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
  padding-left: var(--sal);
  padding-right: var(--sar);
  scroll-padding-bottom: 96px;
  view-transition-name: view;
}
.view.is-entering { animation: view-in 200ms var(--ease-out); }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.tabbar {
  flex: none;
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0 var(--sar) var(--sab) var(--sal);
  background: var(--tab-bg);
  border-top: 1px solid var(--tab-line);
  view-transition-name: tabbar;
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: var(--tabbar-h); padding: 6px 2px 5px;
  color: var(--tab-ink); text-decoration: none;
  font-size: .75rem; font-weight: 700; letter-spacing: .01em;
}
.tab-ic {
  display: grid; place-items: center; width: 58px; height: 30px; border-radius: 999px;
  transition: background-color var(--fast), transform var(--fast) var(--ease-out);
}
.tab[aria-current="page"] { color: var(--tab-on); }
.tab[aria-current="page"] .tab-ic { background: var(--tab-pill); }
.app[data-mode="jeff"] .tab[aria-current="page"] .tab-ic { color: var(--red-light); }
.tab:active .tab-ic { transform: scale(.9); }

.boot { min-height: 100%; display: grid; place-items: center; align-content: center; gap: 16px; padding: 32px; background: var(--chair); }
.boot img { width: 220px; height: auto; }
.boot-note { color: var(--on-chair); text-align: center; max-width: 30ch; }
.boot-note a { color: #fff; font-weight: 700; }

.desk-note { display: none; }

/* =================================================================
   Band (large title) + content
   ================================================================= */
.band { background: var(--chair); color: var(--on-chair); padding: 0 var(--gutter) 22px; }
.band-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; margin-top: -4px; }
.band-top > .pv-chip:only-child { margin-left: -2px; margin-right: 0; }
.band-kicker { font-size: .8125rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--red-light); }
.pv-chip {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0; margin-right: -4px;
  border: 0; background: transparent; color: var(--on-chair-2);
}
.pv-chip span {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  font-size: .75rem; font-weight: 700; letter-spacing: .02em;
  background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
}
.pv-chip:active span { background: rgba(255, 255, 255, .16); }
.large-title {
  font-size: 2.125rem;
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.015em;
  line-height: 1.02;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.band-sub { margin-top: 10px; color: var(--on-chair-2); font-size: .9375rem; line-height: 1.45; }
.band-overlap { padding-bottom: 46px; }
.band-overlap + .content > :first-child { margin-top: -40px; position: relative; }
.band-logo { width: 200px; height: auto; margin: 4px 0 14px -6px; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .45)); }
.band-done { padding-bottom: 26px; }
.done-mark {
  display: grid; place-items: center; width: 56px; height: 56px; margin: 6px 0 14px;
  border-radius: 50%; background: var(--open); color: #fff;
}
.done-mark .ic { width: 30px; height: 30px; stroke-width: 2.6; }

.content { padding: 16px var(--gutter) 32px; display: flex; flex-direction: column; gap: 16px; }
.content > section { display: flex; flex-direction: column; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.block { display: flex; flex-direction: column; gap: 10px; }

.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--on-chair); }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--on-chair-2); flex: none; }
.status.is-open .dot { background: var(--open); box-shadow: 0 0 0 4px rgba(47, 180, 99, .2); }
.card .status { color: var(--text); font-size: .9375rem; }
.card .status .dot { background: var(--text-3); }
.card .status.is-open .dot { background: var(--open); }

/* Type helpers */
.eyebrow { font-size: .75rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }
.app[data-mode="jeff"] .eyebrow { color: var(--red-light); }
.sec-h { font-size: .8125rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); margin: 6px 4px 0; }
.sec-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sec-row .tz { font-size: .8125rem; color: var(--text-2); font-weight: 600; margin-right: 4px; }
.sec-note { color: var(--text-2); font-size: .9375rem; margin: -2px 4px 0; }
.card-title { font-size: 1.25rem; font-weight: 800; font-stretch: 112%; letter-spacing: -0.01em; line-height: 1.15; }
.muted { color: var(--text-2); }
.small { font-size: .875rem; }
.fine { font-size: .8125rem; color: var(--text-2); line-height: 1.45; margin: 0 4px; }
.fine.center, .center { text-align: center; }
.optional { font-weight: 500; color: var(--text-2); text-transform: none; letter-spacing: 0; font-size: .8125rem; }
.plus { color: var(--accent); font-weight: 800; }
.legal-links { font-size: .875rem; margin: 0 4px; }
.legal-links a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 2px; color: var(--accent); font-weight: 700; text-underline-offset: 3px; }
.app[data-mode="jeff"] .legal-links a { color: var(--red-light); }
.empty-line { color: var(--text-2); padding: 12px 4px; }

/* =================================================================
   Cards, lists, rows
   ================================================================= */
.card {
  display: block;
  background: var(--surface);
  color: var(--text);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.card > * + * { margin-top: 6px; }
.card-link {
  display: flex; align-items: center; gap: 14px; text-decoration: none; width: 100%; text-align: left; border: 0;
  transition: transform var(--fast) var(--ease-out), background-color var(--fast);
}
.card-link > * + * { margin-top: 0; }
.card-link:active { transform: scale(.985); background: var(--surface-2); }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 6px; }
.card-actions > .btn { flex: 1 1 auto; }
.card-actions.three > .btn { flex: 1 1 0; padding: 0 6px; min-width: 0; font-size: .9375rem; gap: 6px; }
.card-actions.three .ic { width: 18px; height: 18px; }

.list {
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.list > li + li, .list > .row + .row, .list > div + .row, .list > .row + button, .info > .row + .row { border-top: 1px solid var(--line); }
.row {
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 56px; padding: 11px 14px 11px 16px;
  background: transparent; border: 0; text-align: left; text-decoration: none; color: var(--text);
}
a.row, button.row, label.row { transition: background-color var(--fast); }
a.row:active, button.row:active, label.row:active { background: var(--press); }
.row-ic { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); color: var(--text); }
.row-ic .ic { width: 20px; height: 20px; }
.row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.row-title { font-weight: 700; line-height: 1.25; }
.row-sub { color: var(--text-2); font-size: .875rem; line-height: 1.4; }
.row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 4px; font-size: .8125rem; color: var(--text-2); font-weight: 600; }
.row-req { font-size: .8125rem; color: var(--text-2); font-style: italic; margin-top: 2px; }
.row-end { display: flex; align-items: center; gap: 6px; flex: none; margin-left: auto; }
.row-kid { font-weight: 500; color: var(--text-2); }
.chev { width: 20px; height: 20px; color: var(--text-3); flex: none; }
.quote { font-weight: 600; font-style: italic; line-height: 1.35; color: var(--text); }
.quote-sub { font-style: italic; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.tag {
  display: inline-block; padding: 2px 7px; border-radius: 5px;
  font-size: .6875rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; vertical-align: 1px;
  background: var(--surface-2); color: var(--text);
}
.tag-red { background: var(--warn-bg); color: var(--warn); text-transform: none; letter-spacing: 0; font-size: .75rem; }

.thumb { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex: none; background: var(--chair-2); }
/* No photo from the visit: the visit's date in the same charcoal tile as an upcoming visit. */
.date-tile.thumb { min-height: 0; width: 56px; height: 56px; border-radius: 12px; background: var(--chair); }
.date-tile.thumb b { font-size: 1.25rem; }
.cut-card .thumb { width: 64px; height: 64px; }

/* =================================================================
   Buttons, chips, segmented control
   ================================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px;
  border: 0; border-radius: 14px;
  font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; text-align: center;
  transition: transform var(--fast) var(--ease-out), background-color var(--fast), opacity var(--fast);
}
.btn .ic { width: 20px; height: 20px; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:active { background: var(--accent-press); }
.btn-quiet { background: var(--surface-2); color: var(--text); }
.card .btn-quiet { background: var(--paper); }
.app[data-mode="jeff"] .card .btn-quiet, .app[data-mode="jeff"] .btn-quiet { background: var(--chair-3); color: var(--on-chair); }
.btn-quiet:active { background: var(--line); }
.btn-danger { background: var(--red-ink); color: #fff; }
.btn-danger-text { color: var(--red-ink); }
.app[data-mode="jeff"] .btn-danger-text { color: var(--red-light); }
.btn-sm { min-height: 44px; padding: 0 14px; font-size: .9375rem; border-radius: 12px; }
.btn-lg { min-height: 54px; font-size: 1.0625rem; }
.btn-block { width: 100%; }
.btn-xl { flex-direction: column; gap: 2px; min-height: 68px; width: 100%; border-radius: 18px; padding: 10px 18px; box-shadow: 0 12px 24px -16px rgba(200, 16, 46, .9); }
.btn-xl-main { font-size: 1.25rem; font-weight: 800; font-stretch: 112%; letter-spacing: -0.01em; }
.btn-xl-sub { font-size: .875rem; font-weight: 600; opacity: .92; }
.btn-split { justify-content: space-between; }
.btn-split span { color: var(--text-2); font-weight: 600; }
.icon-btn {
  display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: transparent; color: var(--text-2);
}
.icon-btn:active { background: var(--press); }

.chip-row {
  display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain;
  margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter) 4px;
  scroll-padding-inline: var(--gutter); scroll-snap-type: x proximity; scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip-row.wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.chip {
  flex: none; scroll-snap-align: start;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 16px;
  border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--text);
  font-weight: 700; font-size: .9375rem; text-decoration: none; white-space: nowrap;
  transition: transform var(--fast) var(--ease-out), background-color var(--fast), border-color var(--fast);
}
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip-ghost { background: transparent; border-style: dashed; color: var(--text-2); }
.chip-slot { flex-direction: column; align-items: flex-start; gap: 0; min-height: 60px; padding: 8px 16px; border-radius: 16px; line-height: 1.2; }
.chip-slot small { font-size: .6875rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.chip-slot b { font-size: .9375rem; }
.chip-slot span { font-size: .875rem; font-weight: 600; color: var(--text-2); }

.seg { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--paper-3); }
.seg-btn {
  flex: 1 1 0; min-height: 44px; padding: 4px 10px; border: 0; border-radius: 11px;
  background: transparent; color: var(--ink-2); font-weight: 700; font-size: .9375rem; line-height: 1.15;
  transition: background-color var(--fast), color var(--fast);
}
.seg-btn small { display: block; font-size: .75rem; font-weight: 600; color: inherit; opacity: .85; }
.seg-btn[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(20, 21, 24, .16); }
.seg-dark { background: rgba(255, 255, 255, .08); margin-top: 16px; }
.seg-dark .seg-btn { color: var(--on-chair-2); }
.seg-dark .seg-btn[aria-pressed="true"] { background: var(--chair-4); color: #fff; box-shadow: none; }

/* =================================================================
   Home
   ================================================================= */
.next-card { padding: 18px; }
.next-day { font-size: 1.625rem; font-weight: 800; font-stretch: 118%; letter-spacing: -0.015em; line-height: 1.08; }
.next-time { font-size: 1.125rem; font-weight: 700; }
.next-time span { font-weight: 500; color: var(--text-2); font-size: 1rem; }
.next-svc { color: var(--text-2); }
.next-card.is-empty .next-day { color: var(--text-2); }
.deadline { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--ok-bg); color: var(--ok); font-size: .9375rem; line-height: 1.35; }
.deadline .ic { width: 18px; height: 18px; margin-top: 1px; }
.deadline b, .nowrap { font-weight: 800; white-space: nowrap; }
.deadline.is-late { background: var(--warn-bg); color: var(--warn); }
.card > .deadline { margin-top: 12px; }
.first-card .card-title { margin-top: 4px; }
.first-card .btn { margin-top: 14px; }
.signin-card .btn { margin-top: 12px; }
.shop-card .row-main { gap: 3px; }

.install-card { display: flex; align-items: flex-start; gap: 12px; padding: 14px 6px 14px 14px; background: var(--chair); color: var(--on-chair); box-shadow: none; }
.install-card > * + * { margin-top: 0; }
.install-icon { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.install-main { flex: 1 1 auto; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.install-title { font-size: 1rem; font-weight: 800; line-height: 1.25; }
.install-text { font-size: .9375rem; color: var(--on-chair-2); }
.install-text b { color: var(--on-chair); }
.install-x { color: var(--on-chair-2); margin-top: -8px; }
.install-x:active { background: rgba(255, 255, 255, .1); }
.is-standalone .install-card { display: none; }

/* =================================================================
   Booking
   ================================================================= */
.progress { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 16px; }
.progress li { padding-top: 8px; border-top: 4px solid rgba(255, 255, 255, .16); font-size: .75rem; font-weight: 700; color: var(--on-chair-2); letter-spacing: .02em; }
.progress li.is-done { border-top-color: rgba(255, 255, 255, .55); }
.progress li.is-now { border-top-color: var(--red); color: #fff; }

.usual-pick { padding: 14px 14px 14px 16px; }
.svc-row { align-items: flex-start; padding-top: 14px; padding-bottom: 14px; }
.svc-row .row-end { align-self: center; }
.svc-row.is-picked { box-shadow: inset 4px 0 0 var(--accent); }
.svc-row.is-off { opacity: .72; }
.price { font-size: 1.375rem; font-weight: 800; font-stretch: 112%; letter-spacing: -0.02em; line-height: 1; white-space: nowrap; }
.price sup { font-size: .6em; color: var(--accent); vertical-align: .45em; margin-left: 1px; }
.price.is-text { font-size: .9375rem; font-weight: 700; color: var(--text-2); font-stretch: 100%; letter-spacing: 0; }

.days {
  display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
  margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter) 6px; scroll-padding-inline: var(--gutter); scrollbar-width: none;
}
.days::-webkit-scrollbar { display: none; }
.day {
  flex: none; scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  width: 64px; min-height: 84px; padding: 4px 2px 8px;
  border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text);
  transition: transform var(--fast) var(--ease-out), background-color var(--fast);
}
.day:active { transform: scale(.95); }
.day-mon { font-size: .6875rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); min-height: 1em; line-height: 1; }
.day-dow { font-size: .75rem; font-weight: 700; color: var(--text-2); }
.day-num { font-size: 1.375rem; font-weight: 800; font-stretch: 112%; line-height: 1.05; }
.day-sub { font-size: .6875rem; font-weight: 700; color: var(--text-2); white-space: nowrap; }
.day.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.day.is-on .day-dow, .day.is-on .day-sub { color: var(--on-chair-2); }
.day.is-on .day-mon { color: var(--red-light); }
.day:disabled { background: transparent; border-style: dashed; color: var(--text-3); cursor: default; transform: none; }
.day:disabled .day-num { color: var(--text-3); font-weight: 600; }

.slots { display: flex; flex-direction: column; gap: 14px; }
.slots-day { font-weight: 800; font-size: 1.0625rem; margin: 2px 4px 0; }
.slot-group { display: flex; flex-direction: column; gap: 8px; }
.slot-h { font-size: .8125rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); margin-left: 4px; }
.slot-h span { font-weight: 600; text-transform: none; letter-spacing: 0; }
.slot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.chip.slot { width: 100%; padding: 0 6px; border-radius: 12px; min-height: 48px; }

.recap { background: var(--chair); color: var(--on-chair); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.recap-when { font-size: 1.5rem; font-weight: 800; font-stretch: 118%; letter-spacing: -0.015em; line-height: 1.1; }
.recap-when span { font-size: .875rem; font-weight: 600; color: var(--on-chair-2); font-stretch: 100%; letter-spacing: 0; }
.recap-what { color: var(--on-chair-2); }
.recap-lines { display: flex; flex-direction: column; margin-top: 4px; border-top: 1px solid rgba(255, 255, 255, .12); }
.recap-lines div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, .12); font-size: .9375rem; }
.recap-lines dt { color: var(--on-chair-2); }
.recap-lines dd { font-weight: 800; text-align: right; }
.recap-actions { display: flex; gap: 4px; margin: 2px -8px -8px; }
.recap-link { min-height: 44px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, .4); }
.recap-link:active { background: rgba(255, 255, 255, .1); }

.form-sec { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 700; font-size: .9375rem; margin-left: 2px; }
.field input, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  font-size: 1rem; /* 16px: iOS doesn't zoom */
  border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text);
  -webkit-appearance: none; appearance: none;
}
.field textarea { min-height: 76px; resize: vertical; line-height: 1.4; }
.field input:focus, .field textarea:focus { border-color: var(--text); outline: none; box-shadow: 0 0 0 3px rgba(200, 16, 46, .25); }
.field input:disabled { background: var(--surface-2); color: var(--text-2); }
.field-help { font-size: .8125rem; color: var(--text-2); margin-left: 2px; }
.field-error { font-size: .875rem; font-weight: 700; color: var(--red-deep); margin-left: 2px; }
.app[data-mode="jeff"] .field-error { color: var(--red-light); }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--red-ink); background: #fff8f8; }

.check { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); font-size: .9375rem; line-height: 1.4; cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 0; accent-color: var(--red-ink); cursor: pointer; }
.check-strong { box-shadow: inset 0 0 0 1.5px var(--line); }
.check.is-invalid { box-shadow: inset 0 0 0 2px var(--red-ink); }

.pay-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pay-opts.is-invalid .pay-btn { border-color: var(--red-ink); }
.pay-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 52px; padding: 0 8px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font-weight: 800; font-size: .9375rem;
  transition: transform var(--fast) var(--ease-out);
}
.pay-btn:active { transform: scale(.97); }
.pay-btn .ic { width: 20px; height: 20px; }
.pay-apple, .pay-google { background: #000; color: #fff; border-color: #000; }
.pay-btn[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--red-ink); }
.card-mock { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.card-mock label { display: flex; flex-direction: column; gap: 4px; font-size: .8125rem; font-weight: 700; color: var(--text-2); }
.card-mock input { min-height: 46px; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--text-2); font-size: 1rem; width: 100%; }
.card-mock-split { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 8px; }
.secure { display: flex; gap: 8px; align-items: flex-start; font-size: .8125rem; color: var(--text-2); margin: 0 4px; }
.secure .ic { width: 16px; height: 16px; margin-top: 1px; }

.policy-card { background: var(--surface); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); }
.policy-h { font-size: 1.125rem; font-weight: 800; font-stretch: 112%; }
.policy-card .check { box-shadow: inset 0 0 0 1.5px var(--line); background: var(--paper); }
.policy-card .check.is-invalid { box-shadow: inset 0 0 0 2px var(--red-ink); }
.warn-box { padding: 10px 12px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); font-size: .9375rem; font-weight: 600; }
.ok-box { padding: 10px 12px; border-radius: 12px; background: var(--ok-bg); color: var(--ok); font-weight: 700; }

.action-bar {
  position: sticky; bottom: 0; z-index: 2;
  margin: 4px calc(var(--gutter) * -1) -32px; padding: 12px var(--gutter) 14px;
  background: linear-gradient(to bottom, rgba(242, 242, 240, 0), var(--paper) 18px);
  display: flex; flex-direction: column; gap: 6px;
}
.action-fine { font-size: .8125rem; color: var(--text-2); text-align: center; }
.done-card .next-day { margin-top: 0; }
.done-note { color: var(--text-2); margin: 0 4px; }
.done-note b { color: var(--text); font-weight: 700; }

/* =================================================================
   Visits
   ================================================================= */
.appt-card { padding: 16px; }
.appt-top { display: flex; gap: 14px; align-items: center; }
.date-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 60px; min-height: 66px; flex: none; border-radius: 14px; background: var(--chair); color: var(--on-chair); line-height: 1.05; }
.date-tile span { font-size: .6875rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--on-chair-2); }
.date-tile b { font-size: 1.5rem; font-weight: 800; font-stretch: 112%; }
.appt-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.appt-svc { font-size: 1.0625rem; font-weight: 600; }
.appt-card > .deadline { margin-top: 14px; }
.fee-line { font-size: .875rem; color: var(--text-2); margin: 8px 2px 0; }
.past-row { align-items: center; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 28px 8px 8px; }
.empty-ic { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--surface); color: var(--text-2); box-shadow: var(--shadow); margin-bottom: 6px; }
.empty-ic .ic { width: 34px; height: 34px; }
.empty-title { font-size: 1.375rem; font-weight: 800; font-stretch: 112%; }
.empty .muted { max-width: 32ch; margin-bottom: 8px; }
.photo { border-radius: 20px; overflow: hidden; background: var(--chair); }
.photo img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.photo figcaption { padding: 10px 14px; font-size: .8125rem; color: var(--on-chair-2); }
.notes { font-size: 1.25rem; font-weight: 700; font-stretch: 108%; letter-spacing: -0.01em; line-height: 1.3; }
.notes-card .notes { margin-top: 8px; }
.lines { display: flex; flex-direction: column; }
.line { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.line dd { font-weight: 700; text-align: right; }
.line.total { border-bottom: 0; font-weight: 800; font-size: 1.0625rem; }
.line.total dd { font-weight: 800; }
.line.muted { color: var(--text-2); }
.receipt .row-sub { margin-top: 8px; }

/* =================================================================
   Shop + account
   ================================================================= */
.hours-row { min-height: 50px; justify-content: space-between; }
.hours-row .row-title { font-weight: 600; }
.hours-val { font-weight: 700; white-space: nowrap; }
.hours-row.is-closed .row-title, .hours-row.is-closed .hours-val { color: var(--text-2); font-weight: 500; }
.hours-row.is-today { background: rgba(200, 16, 46, .06); }
.hours-row.is-today .row-title { font-weight: 800; }
.hours-row .tag { background: var(--red-ink); color: #fff; margin-left: 6px; }
.addr-card address { font-size: 1.0625rem; line-height: 1.45; margin-top: 8px; }
.addr-card .card-actions { margin-top: 12px; }
.know { display: flex; flex-direction: column; gap: 14px; }
.know div { display: flex; flex-direction: column; gap: 3px; }
.know dt { font-weight: 800; }
.know dd { color: var(--text-2); font-size: .9375rem; }
.owner-row .row-ic { background: var(--chair); color: #fff; }

.switch-row { cursor: pointer; }
.switch {
  -webkit-appearance: none; appearance: none; flex: none; position: relative;
  width: 52px; height: 32px; margin: 0; border-radius: 999px; cursor: pointer;
  background: var(--paper-3); transition: background-color var(--fast);
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .25); transition: transform var(--base) var(--ease-out);
}
.switch:checked { background: var(--open); }
.switch:checked::after { transform: translateX(20px); }
.switch:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.app[data-mode="jeff"] .switch { background: var(--chair-4); }
.app[data-mode="jeff"] .switch:checked { background: var(--open); }

.steps-list { margin: 0; padding-left: 1.4rem; list-style: decimal; display: flex; flex-direction: column; gap: 8px; color: var(--text); }
.steps-list li::marker { font-weight: 800; color: var(--accent); }
.text-list { display: flex; flex-direction: column; gap: 14px; }
.text-list li { display: flex; flex-direction: column; gap: 6px; }
.sms {
  padding: 10px 12px; border-radius: 16px 16px 16px 4px; background: var(--surface-2); color: var(--text);
  font-size: .9375rem; line-height: 1.4; overflow-wrap: anywhere; max-width: 92%;
}
.sms-time { text-align: center; font-size: .75rem; color: var(--text-2); }

/* =================================================================
   Jeff's view
   ================================================================= */
.j-stats { display: grid; grid-template-columns: 1.25fr .8fr 1.1fr; gap: 8px; margin-top: 16px; }
.j-stats div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--chair-2); }
.j-stats span { font-size: .6875rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--on-chair-2); }
.j-stats b { font-size: 1.125rem; font-weight: 800; font-stretch: 112%; white-space: nowrap; }
.health { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: .875rem; color: var(--ok-light); font-weight: 600; }
.health .ic { width: 18px; height: 18px; }
.j-list { display: flex; flex-direction: column; gap: 10px; }
.j-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 18px; background: var(--chair-2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); }
.j-card.is-now { background: var(--chair-3); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .2); }
.j-card.is-done { opacity: .66; }
.j-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.j-time { font-weight: 800; font-stretch: 112%; font-size: 1.125rem; }
.j-status { font-size: .6875rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--red-light); text-align: right; }
.j-status.ok { color: var(--ok-light); }
.j-name { display: inline-flex; align-items: center; min-height: 44px; margin: -6px 0; font-weight: 700; font-size: 1.0625rem; text-decoration: none; text-decoration-line: underline; text-decoration-color: rgba(255, 255, 255, .25); text-underline-offset: 4px; }
.j-name:active { opacity: .7; }
span.j-name { text-decoration: none; }
.j-meta, .j-svc { font-size: .875rem; color: var(--on-chair-2); }
.j-note { font-size: .9375rem; color: var(--on-chair); font-style: italic; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .05); }
.badges { display: flex; flex-wrap: wrap; gap: 4px; }
.badge { font-size: .6875rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 3px 7px; border-radius: 5px; background: rgba(255, 255, 255, .1); color: var(--on-chair); white-space: nowrap; }
.badge.red { background: var(--red); color: #fff; }
.badge.warn { background: rgba(255, 107, 114, .18); color: #ffb3b7; }
.badge.ok { background: rgba(127, 209, 164, .16); color: var(--ok-light); }
.app:not([data-mode="jeff"]) .badge { background: var(--surface-2); color: var(--text); }
.j-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.j-btn {
  flex: 1 1 auto; min-height: 48px; padding: 0 16px; border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, .24); background: transparent; color: var(--on-chair);
  font-weight: 800; font-size: 1rem; transition: transform var(--fast) var(--ease-out), background-color var(--fast);
}
.j-btn:active { transform: scale(.97); background: rgba(255, 255, 255, .08); }
.j-btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.j-btn.primary:active { background: var(--red-ink); }
.j-mini { padding: 14px 16px; }
.client-row .badges { justify-content: flex-end; max-width: 120px; }
[data-client-list] { display: flex; flex-direction: column; gap: 16px; }
[data-client-list] > section { display: flex; flex-direction: column; gap: 10px; }

.search { position: relative; }
.search .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--text-2); pointer-events: none; }
.search input {
  width: 100%; min-height: 50px; padding: 0 14px 0 44px; font-size: 1rem;
  border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: var(--text-3); }
.search input:focus { outline: none; border-color: var(--on-chair-2); box-shadow: 0 0 0 3px rgba(255, 107, 114, .3); }

.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat-grid div { padding: 12px 14px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.stat-grid dt { font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.stat-grid dd { font-size: 1.375rem; font-weight: 800; font-stretch: 112%; margin-top: 2px; }
.money-total { padding: 18px; }
.money-big { font-size: 2.5rem; font-weight: 800; font-stretch: 118%; letter-spacing: -0.02em; line-height: 1.05; }
.chart-card .card-title { font-size: 1.0625rem; }
.chart { width: 100%; height: auto; margin-top: 8px; overflow: visible; }
.chart .grid { stroke: rgba(255, 255, 255, .1); stroke-width: 1; }
.chart .axis { fill: var(--on-chair-2); font-size: 10px; font-family: var(--font); font-weight: 600; }
.chart .val { fill: var(--on-chair); font-size: 10px; font-family: var(--font); font-weight: 800; }
.chart .bar-svc { fill: #d9dbdf; }
.chart .bar-tips { fill: var(--red); }
.chart .bar-other { fill: #7d828b; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: .8125rem; color: var(--on-chair-2); font-weight: 600; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.sw-svc { background: #d9dbdf; }
.sw-tips { background: var(--red); }
.sw-other { background: #7d828b; }
.info .row { flex-direction: column; align-items: flex-start; gap: 2px; min-height: 0; padding: 12px 16px; }
.info dt { font-weight: 700; }
.info dd { color: var(--text-2); }

/* The client's phone, inside Jeff's sheets. Always light, like a real other phone. */
.phone-preview {
  --text: var(--ink); --text-2: var(--ink-2); --surface-2: var(--paper-2); --line: var(--paper-3);
  display: flex; flex-direction: column; gap: 8px; padding: 14px;
  background: #fff; color: var(--ink); border-radius: 22px; border: 6px solid #0d0e10;
}
.pp-label { display: flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.pp-label .ic { width: 16px; height: 16px; }
.pp-big { font-size: 1.375rem; font-weight: 800; font-stretch: 112%; letter-spacing: -0.015em; }
.phone-preview .fine { color: var(--ink-2); margin: 0; }
.tip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tip-btn {
  min-height: 56px; border-radius: 12px; border: 1.5px solid var(--paper-3); background: #fff; color: var(--ink);
  font-weight: 800; font-size: 1.0625rem; line-height: 1.2; transition: transform var(--fast) var(--ease-out);
}
.tip-btn small { display: block; font-size: .8125rem; font-weight: 600; color: var(--ink-2); }
.tip-btn:active { transform: scale(.96); background: var(--red-soft); border-color: var(--red-ink); }
.phone-preview :focus-visible { outline-color: var(--red-ink); }

/* =================================================================
   Sheets + toasts
   ================================================================= */
.sheet-layer { position: absolute; inset: 0; z-index: 20; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(8, 9, 11, .55); opacity: 0; transition: opacity 240ms var(--ease-out); }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: calc(100% - 44px - var(--sat));
  display: flex; flex-direction: column;
  background: var(--sheet-bg); color: var(--text);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .35);
  padding-left: var(--sal); padding-right: var(--sar);
  transform: translateY(105%);
  transition: transform 300ms var(--ease-out);
  outline: none;
}
.sheet-layer.is-open .sheet { transform: none; }
.sheet-layer.is-open .sheet-scrim { opacity: 1; }
.sheet.is-dragging { transition: none; }
.sheet-grab { flex: none; width: 40px; height: 5px; margin: 8px auto 0; border-radius: 3px; background: var(--line); }
.app[data-mode="jeff"] .sheet-grab { background: rgba(255, 255, 255, .22); }
.sheet-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 6px 2px var(--gutter); touch-action: none; cursor: grab; }
.sheet-title { font-size: 1.3125rem; font-weight: 800; font-stretch: 112%; letter-spacing: -0.01em; line-height: 1.2; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 6px var(--gutter) calc(20px + var(--sab)); display: flex; flex-direction: column; gap: 12px; }
.sheet-sub { color: var(--text-2); font-size: .9375rem; }
.sheet-lead { font-size: 1.125rem; font-weight: 800; line-height: 1.3; }
.sheet-lead span { font-weight: 500; color: var(--text-2); font-size: 1rem; }
.sheet-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.sheet .fine { margin: 0; }
.sheet .list { box-shadow: none; }
.sheet .card-mock { box-shadow: none; }

.toasts {
  position: absolute; left: var(--gutter); right: var(--gutter);
  bottom: calc(var(--tabbar-h) + var(--sab) + 12px);
  z-index: 30; display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 8px 12px 16px; min-height: 48px; border-radius: 16px;
  background: var(--ink); color: #fff; font-weight: 600; font-size: .9375rem; line-height: 1.35;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .55);
  animation: toast-in 240ms var(--ease-out);
}
.app[data-mode="jeff"] .toast { background: var(--on-chair); color: var(--ink); }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: opacity 180ms, transform 180ms; }
.toast-btn { flex: none; min-height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .14); color: inherit; font-weight: 800; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* =================================================================
   View transitions (when supported; a CSS fade otherwise, see .is-entering)
   ================================================================= */
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
::view-transition-old(view) { animation: vt-out 140ms var(--ease-out) both; }
::view-transition-new(view) { animation: vt-in 220ms var(--ease-out) both; }
html[data-nav="forward"]::view-transition-old(view) { animation: vt-out-left 220ms var(--ease-out) both; }
html[data-nav="forward"]::view-transition-new(view) { animation: vt-in-right 260ms var(--ease-out) both; }
html[data-nav="back"]::view-transition-old(view) { animation: vt-out-right 220ms var(--ease-out) both; }
html[data-nav="back"]::view-transition-new(view) { animation: vt-in-left 260ms var(--ease-out) both; }
::view-transition-group(appbar), ::view-transition-group(tabbar) { animation-duration: 200ms; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes vt-out-left { to { opacity: 0; transform: translateX(-12%); } }
@keyframes vt-in-right { from { opacity: 0; transform: translateX(18%); } }
@keyframes vt-out-right { to { opacity: 0; transform: translateX(12%); } }
@keyframes vt-in-left { from { opacity: 0; transform: translateX(-18%); } }

/* =================================================================
   Desktop and tablets: the app sits centered at phone width
   ================================================================= */
@media (min-width: 600px) and (min-height: 560px) {
  body {
    display: grid; place-items: center;
    background: radial-gradient(1100px 620px at 50% -12%, #2e323a 0%, #16181c 55%, #0e0f12 100%);
  }
  .app {
    position: relative; inset: auto;
    width: 400px; height: min(860px, calc(100vh - 48px));
    height: min(860px, calc(100dvh - 48px));
    border-radius: 36px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .07), 0 0 0 9px #08090b, 0 40px 90px -24px rgba(0, 0, 0, .8);
  }
  .appbar-title { max-width: 190px; }
  .ab-back span { max-width: 110px; }
}
@media (min-width: 1000px) and (min-height: 560px) {
  .desk-note {
    display: block; position: fixed; top: 50%; transform: translateY(-50%);
    left: calc(50% - 200px - 330px); width: 270px; color: var(--on-chair-2);
  }
  .desk-kicker { font-size: .8125rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--red-light); }
  .desk-title { margin-top: 10px; font-size: 2.25rem; font-weight: 800; font-stretch: 125%; letter-spacing: -0.015em; line-height: 1.02; color: var(--on-chair); }
  .desk-text { margin-top: 12px; font-size: 1rem; line-height: 1.5; }
  .is-standalone .desk-note { display: none; }
}

/* =================================================================
   Preferences
   ================================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
  .view.is-entering { animation: fade-in 140ms linear !important; }
  ::view-transition-old(view), ::view-transition-new(view),
  html[data-nav]::view-transition-old(view), html[data-nav]::view-transition-new(view) { animation: fade-in 140ms linear both !important; }
  ::view-transition-old(view), html[data-nav]::view-transition-old(view) { animation-name: fade-out !important; }
  .sheet { transform: none; opacity: 0; transition: opacity 140ms linear !important; }
  .sheet-layer.is-open .sheet { opacity: 1; }
  .btn:active, .chip:active, .card-link:active, .day:active, .tip-btn:active, .j-btn:active, .pay-btn:active, .tab:active .tab-ic { transform: none; }
  @keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
  @keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }
}
@media (prefers-contrast: more) {
  .card, .list, .check, .stat-grid div { box-shadow: none; border: 1.5px solid var(--text-2); }
  .chip, .day, .pay-btn { border-color: var(--text-2); }
}
@media (forced-colors: active) {
  .btn, .chip, .day, .pay-btn, .j-btn, .tip-btn, .seg-btn, .tab { border: 2px solid ButtonText; }
  .tab[aria-current="page"], .chip[aria-pressed="true"], .seg-btn[aria-pressed="true"], .day.is-on { forced-color-adjust: none; background: Highlight; color: HighlightText; }
}
