/* Client Studio. Apple-grade restraint: one column, system type with a serif for titles, warm neutrals, one accent
   (House of Mosaic's gold), hairlines instead of borders, 44 px targets, the main action sticky at the bottom. */
:root {
  --bg: #f5f3ee; --surface: #fff; --surface-2: #faf8f4; --ink: #1b1915; --ink-2: #5d584f; --ink-3: #8b857a;
  --line: rgb(27 25 21 / .09); --line-2: rgb(27 25 21 / .14);
  --accent: #8f6a27; --accent-ink: #fff; --accent-soft: rgb(166 127 47 / .10);
  --ok: #2e7a4d; --warn: #9a5b12; --warn-soft: rgb(154 91 18 / .09); --bad: #b3372e;
  --r-lg: 20px; --r-md: 14px; --r-sm: 10px;
  --shadow-1: 0 1px 2px rgb(27 25 21 / .05), 0 1px 1px rgb(27 25 21 / .03);
  --shadow-2: 0 2px 6px rgb(27 25 21 / .06), 0 14px 32px rgb(27 25 21 / .10);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121110; --surface: #1c1a18; --surface-2: #232120; --ink: #f2eee6; --ink-2: #b8b1a5; --ink-3: #8a8378;
    --line: rgb(242 238 230 / .09); --line-2: rgb(242 238 230 / .16);
    --accent: #d4ab5a; --accent-ink: #17140f; --accent-soft: rgb(212 171 90 / .13); --warn: #e0a659; --warn-soft: rgb(224 166 89 / .12);
    --shadow-1: 0 0 0 1px rgb(242 238 230 / .04); --shadow-2: 0 0 0 1px rgb(242 238 230 / .06), 0 16px 40px rgb(0 0 0 / .45);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.47 var(--sans); -webkit-font-smoothing: antialiased; }
::selection { background: var(--accent-soft); }
a { color: var(--accent); text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

.app { max-width: 560px; margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-size: 17px; margin-left: -4px; padding-right: 8px; }
.back span { font-size: 30px; line-height: 1; margin-top: -3px; }

.hero { margin: 10px 0 18px; }
.eyebrow { margin: 0 0 4px; color: var(--ink-3); font-size: 13px; font-weight: 600; letter-spacing: .01em; }
.title { margin: 0; font: 600 32px/1.12 var(--serif); letter-spacing: -.012em; text-wrap: balance; }
.lede { color: var(--ink-2); margin: 10px 0 20px; text-wrap: pretty; }
.h2 { font-size: 20px; line-height: 1.25; font-weight: 650; margin: 0 0 12px; letter-spacing: -.01em; }
.h2.out { margin: 30px 2px 10px; }
.sub { color: var(--ink-3); font-size: 15px; margin: 0 2px 8px; }
.sub.out { margin-top: -2px; }
.fine { color: var(--ink-2); font-size: 14px; line-height: 1.45; margin: 10px 2px 0; text-wrap: pretty; }
.fine.out { margin: 8px 2px 10px; }
.warn-text { color: var(--warn); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); padding: 18px; }
.notice { background: var(--accent-soft); color: var(--ink); border-radius: var(--r-md); padding: 13px 15px; font-size: 15px; line-height: 1.45; margin: 0 0 16px; }
.empty { color: var(--ink-2); font-size: 15px; }

/* Lists: inset grouped, like Settings */
.list { list-style: none; margin: 0; padding: 4px 0; }
.list li + li .row { box-shadow: inset 0 1px 0 var(--line); }
.list li + li.recent .row, .list li + li.task .row { box-shadow: inset 0 1px 0 var(--line); }
.row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 16px; color: var(--ink); transition: background-color .15s var(--ease); }
.row:active { background: var(--surface-2); }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-title { font-size: 16px; font-weight: 500; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.row-sub { font-size: 13px; color: var(--ink-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { color: var(--ink-3); font-size: 22px; line-height: 1; }
.thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.thumb.none { background: linear-gradient(135deg, var(--accent-soft), transparent); }
.recent { position: relative; }
.recent .row { padding-right: 96px; }
.recent .undo { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); margin: 0; }
.recent:has(.undo) .chip { display: none; }

.chip { flex: none; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.chip.ready { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.chip.ok { background: rgb(46 122 77 / .11); color: var(--ok); box-shadow: none; }
.chip.warn { background: var(--warn-soft); color: var(--warn); box-shadow: none; }
.chip.wait { color: var(--ink-3); }

/* Buttons */
.btn { appearance: none; display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; padding: 0 20px; border: 0; border-radius: var(--r-md);
  background: var(--accent); color: var(--accent-ink); font: 600 17px/1 var(--sans); letter-spacing: -.01em; cursor: pointer;
  transition: transform .1s var(--ease), opacity .15s var(--ease), background-color .15s var(--ease); -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(.97); }
.btn.secondary { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.quiet { background: var(--surface-2); color: var(--accent); box-shadow: inset 0 0 0 1px var(--line); }
.btn.small { width: auto; min-height: 36px; padding: 0 14px; font-size: 15px; border-radius: 999px; }
.btn[aria-busy="true"] { opacity: .7; pointer-events: none; }
.link { appearance: none; background: none; border: 0; color: var(--accent); font: inherit; padding: 10px 0; min-height: 44px; cursor: pointer; }
@media (hover: hover) { .btn:hover { filter: brightness(1.05); } .row:hover { background: var(--surface-2); } }

/* Forms */
label { display: block; font-size: 14px; font-weight: 600; color: var(--ink-2); margin: 16px 2px 6px; }
input, textarea { width: 100%; font: 17px/1.45 var(--sans); color: var(--ink); background: var(--surface); border: 0; border-radius: var(--r-md);
  box-shadow: inset 0 0 0 1px var(--line-2); padding: 13px 14px; transition: box-shadow .15s var(--ease); }
input:focus, textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
textarea { resize: vertical; min-height: 96px; }
.ask textarea { min-height: 84px; margin-bottom: 12px; background: var(--surface-2); }
.form.card label:first-of-type, .form.card .error + label { margin-top: 0; }
.form .btn { margin-top: 18px; }
.error { color: var(--bad); background: rgb(179 55 46 / .08); border-radius: var(--r-sm); padding: 10px 12px; font-size: 15px; margin: 0 0 14px; }
.count { text-align: right; margin-top: 6px; font-variant-numeric: tabular-nums; }
.was { margin: 14px 2px 0; color: var(--ink-2); font-size: 15px; }
.was summary { cursor: pointer; min-height: 32px; color: var(--ink-2); }
.was p { margin: 6px 0 0; color: var(--ink-3); }
.edit textarea { min-height: 150px; font-size: 18px; line-height: 1.5; }
.login { padding-top: 8vh; }
.login .card { margin-top: 26px; }

.sticky { position: sticky; bottom: 0; margin: 22px -18px 0; padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(18px); backdrop-filter: saturate(1.4) blur(18px);
  box-shadow: 0 -1px 0 var(--line); z-index: 5; }
.sticky .btn { margin: 0; }
.sticky.two { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; }
.sticky.two form, .sticky .two form { margin: 0; }
.sticky .two { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; }
.sticky-note { margin: 0 2px 10px; color: var(--warn); font-size: 13px; }
.done { margin-bottom: 16px; }

/* Section items */
.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.item { display: block; background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); padding: 13px 15px; color: var(--ink); transition: transform .1s var(--ease); }
.item:active { transform: scale(.985); }
.item-label { display: block; font-size: 12px; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.item-text { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; font-size: 16px; line-height: 1.45; }
.item.photo { position: relative; padding: 0; overflow: hidden; }
.item.photo img { display: block; width: 100%; height: auto; max-height: 340px; object-fit: cover; }
.item-cta { position: absolute; left: 12px; bottom: 12px; background: rgb(18 17 16 / .62); color: #fff; font-size: 14px; font-weight: 600; padding: 7px 12px; border-radius: 999px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }

/* Photo form */
.current { margin: 0; }
.current img { display: block; width: 100%; height: auto; max-height: 52vh; object-fit: cover; border-radius: var(--r-lg); box-shadow: var(--shadow-2); background: var(--surface-2); }
.current figcaption { font-size: 13px; color: var(--ink-3); margin: 8px 2px 0; }
.file { position: relative; margin-top: 16px; overflow: hidden; }
.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-form .file { margin-bottom: 0; }

/* The preview */
.waiting { text-align: center; padding: 34px 22px; }
.waiting .h2 { margin-top: 18px; }
.bar { height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.bar span { display: block; height: 100%; width: 40%; border-radius: 4px; background: var(--accent); animation: slide 1.6s var(--ease) infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.shot-wrap { margin: 0 0 16px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 2px; border-radius: 10px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); width: 220px; margin: 0 auto 14px; }
.seg button { appearance: none; border: 0; background: transparent; color: var(--ink-2); font: 600 14px/1 var(--sans); min-height: 34px; border-radius: 8px; cursor: pointer; transition: background-color .18s var(--ease), color .18s var(--ease); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.phone { border-radius: 30px; padding: 7px; background: #0f0e0d; box-shadow: var(--shadow-2); max-width: 400px; margin: 0 auto; }
.shot { display: block; width: 100%; height: auto; aspect-ratio: 390 / 844; border-radius: 24px; background: #1d1a16; }
.shot-wrap figcaption { text-align: center; margin-top: 12px; }
.changes ul { list-style: none; margin: 0; padding: 0; }
.changes li + li { margin-top: 16px; padding-top: 16px; box-shadow: inset 0 1px 0 var(--line); }
.changes del { display: block; color: var(--ink-3); text-decoration-color: rgb(179 55 46 / .55); font-size: 15px; margin-bottom: 8px; }
.changes ins { display: block; text-decoration: none; font-size: 17px; }
.tr { margin-top: 12px; font-size: 15px; }
.tr summary { cursor: pointer; color: var(--accent); min-height: 32px; }
.tr dl { margin: 8px 0 0; }
.tr dt { font-size: 12px; font-weight: 650; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; margin-top: 10px; }
.tr dd { margin: 2px 0 0; }
.done { text-align: left; }
.done .btn { margin-top: 16px; }
.tick { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 15px; margin-right: 6px; vertical-align: -3px; }
.said p { margin: 0; }
.said.warn { box-shadow: var(--shadow-1), inset 0 0 0 1px var(--warn-soft); }

/* Victor's corner */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 16px 12px; }
.stats div { display: flex; flex-direction: column; align-items: flex-start; padding: 0 6px; }
.stats span { font-size: 12px; color: var(--ink-3); line-height: 1.3; margin-top: 4px; }
.num { font-size: 24px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 40px; padding-top: 14px; box-shadow: inset 0 1px 0 var(--line); color: var(--ink-3); font-size: 14px; }
.foot form { margin: 0; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; } .bar span { width: 100%; } }
