/* Cutloom on the phone. The look of the approved mockups (projects/review-2026-11-24/phone-companion): main actions in the bottom third, a bottom bar,
   bottom sheets, full-width or equal-width buttons at least 44 px tall (Apple HIG 44 pt, Material 3 48 dp; Hoober 2013 on one-handed use). */
@font-face { font-family: Inter; src: url("Inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: Tajawal; src: url("Tajawal-Regular.ttf"); font-weight: 400; font-display: swap; }
@font-face { font-family: Tajawal; src: url("Tajawal-Bold.ttf"); font-weight: 600 800; font-display: swap; }
:root { color-scheme: light dark; --bg: #ffffff; --surface: #fafafa; --surface-2: #eeeeee; --surface-3: #e4e4e4; --border: #d6d6d6; --text: #222222; --muted: #606060; --accent: #2d654c; --ink: #ffffff; --dot: oklch(0.6 0.17 27); --dot-ink: #ffffff; --scrim: #0006; --soft: color-mix(in srgb, var(--accent) 14%, var(--surface)); --bar: 80px; }
@media (prefers-color-scheme: dark) { :root { --bg: #111111; --surface: #171717; --surface-2: #242424; --surface-3: #2b2b2b; --border: #383838; --text: #eeeeee; --muted: #aaaaaa; --accent: #b8e2cc; --ink: #13251e; --dot: oklch(0.74 0.13 27); --dot-ink: #1a0d0b; --scrim: #000a; } }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100dvh; background: var(--bg); }
body { font: 15px/1.45 Inter, system-ui, sans-serif; color: var(--text); -webkit-font-smoothing: antialiased; padding-top: env(safe-area-inset-top); }
html[lang=ar] body { font-family: Tajawal, Inter, system-ui, sans-serif; font-size: 16px; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ltr { direction: ltr; unicode-bidi: isolate; }
main { padding-bottom: calc(var(--bar) + 16px + env(safe-area-inset-bottom)); }
main.plain { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.top { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.top h1 { font-size: 20px; margin: 0; flex: 1; min-width: 0; }
.top small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; }
.iconbtn { width: 48px; height: 48px; border-radius: 24px; display: grid; place-items: center; background: transparent; border: 0; color: var(--text); flex: none; cursor: pointer; }
.logo { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: #16251e; color: #b8e2cc; font: 800 16px Inter, sans-serif; flex: none; }
.card { margin: 0 16px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.preview { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 12px; align-items: center; }
.thumb { width: 44px; height: 44px; border-radius: 8px; background: var(--surface-3); display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.preview b { display: block; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.preview small, .muted { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 16px 20px 8px; }
.field { display: block; width: calc(100% - 32px); margin: 0 16px; min-height: 52px; padding: 12px 14px; border-radius: 16px; border: 0; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); font-size: 16px; }
textarea.field { min-height: 76px; resize: vertical; }
.field:focus-visible, .btn:focus-visible, .chip:focus-visible, .tile:focus-visible, .nav button:focus-visible, .iconbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 16px; }
.chip { min-height: 44px; padding: 0 14px; border-radius: 22px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; border: 0; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); cursor: pointer; }
.chip[aria-pressed=true] { background: color-mix(in srgb, var(--accent) 22%, transparent); box-shadow: inset 0 0 0 1.5px var(--accent); font-weight: 600; }
.chip svg { width: 16px; height: 16px; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 20px; }
.row .grow { flex: 1; min-width: 0; }
.row small { display: block; color: var(--muted); font-size: 13px; }
.switch { appearance: none; width: 52px; height: 32px; border-radius: 16px; background: var(--surface-3); box-shadow: inset 0 0 0 1.5px var(--border); position: relative; flex: none; margin: 0; cursor: pointer; }
.switch::after { content: ""; position: absolute; top: 8px; inset-inline-start: 8px; width: 16px; height: 16px; border-radius: 8px; background: var(--muted); transition: inset-inline-start .15s; }
.switch:checked { background: var(--accent); box-shadow: none; }
.switch:checked::after { inset-inline-start: 26px; top: 4px; width: 24px; height: 24px; border-radius: 12px; background: var(--ink); }
.info { margin: 12px 16px 0; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); font-size: 13.5px; color: var(--muted); display: flex; gap: 10px; }
.info svg { width: 18px; height: 18px; margin-top: 1px; }
.bottom { position: fixed; left: 16px; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom)); display: grid; gap: 8px; z-index: 5; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn { min-height: 52px; border-radius: 26px; border: 0; font-weight: 600; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; cursor: pointer; }
.btn:disabled { opacity: .5; }
.primary { background: var(--accent); color: var(--ink); }
.tonal { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.quiet { min-height: 44px; background: transparent; color: var(--text); font-weight: 500; font-size: 15px; }
.small { min-height: 44px; border-radius: 22px; font-size: 15px; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--bar) + env(safe-area-inset-bottom)); padding: 8px 8px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); box-shadow: 0 -1px 0 var(--border); display: grid; grid-template-columns: repeat(3, 1fr); z-index: 4; }
.nav button { display: grid; justify-items: center; align-content: start; gap: 3px; font-size: 12.5px; color: var(--muted); background: none; border: 0; cursor: pointer; padding: 0; }
.nav i { width: 64px; height: 32px; border-radius: 16px; display: grid; place-items: center; position: relative; }
.nav [aria-current=page] { color: var(--text); font-weight: 650; }
.nav [aria-current=page] i { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.badge { position: absolute; top: -2px; inset-inline-end: 10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--dot); color: var(--dot-ink); font: 700 11px/18px Inter, sans-serif; text-align: center; }
.mac, .note { margin: 0 16px; padding: 10px 14px; border-radius: 14px; display: flex; gap: 10px; align-items: center; background: var(--soft); font-size: 13.5px; }
.note { background: var(--surface-2); }
.note .btn { margin-inline-start: auto; }
.mac svg { width: 18px; height: 18px; color: var(--accent); }
.mac.none { background: var(--surface-2); } .mac.none svg { color: var(--muted); }  /* not heard from the Mac yet: no tick, no green */
.list { margin: 0 16px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); overflow: hidden; }
.list .row { padding: 12px 14px; border-top: 1px solid var(--border); }
.list .row:first-child { border-top: 0; }
.empty { margin: 0 16px; color: var(--muted); font-size: 14px; }
.list .row b { display: block; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.state { display: inline-flex !important; gap: 5px; align-items: center; }
.state svg { width: 14px; height: 14px; }
.tiles { position: fixed; left: 16px; right: 16px; bottom: calc(var(--bar) + 16px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.home-space { height: 260px; }
.tile { height: 112px; border-radius: 24px; border: 0; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 2px; padding: 14px 16px; text-align: start; cursor: pointer; }
.tile svg { width: 26px; height: 26px; margin-bottom: auto; color: var(--accent); }
.tile b { font-size: 16px; }
.tile small { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.tile.hero { background: var(--accent); color: var(--ink); box-shadow: none; }
.tile.hero svg, .tile.hero small { color: var(--ink); }
dialog.sheet { position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: 100%; max-height: 92dvh; overflow: auto; border: 0; border-radius: 28px 28px 0 0; background: var(--bg); color: var(--text); padding: 10px 0 calc(20px + env(safe-area-inset-bottom)); }
dialog.sheet::backdrop { background: var(--scrim); }
.handle { width: 36px; height: 4px; border-radius: 2px; background: var(--border); margin: 0 auto 12px; }
.sheet h2 { font-size: 18px; margin: 0 20px 4px; }
.sheet .sub, p.sub { margin: 8px 20px 10px; color: var(--muted); font-size: 13.5px; }
.sheet .pair { margin: 16px 16px 0; }
.timer { text-align: center; font: 300 44px Inter, sans-serif; letter-spacing: -1px; margin: 6px 0 0; direction: ltr; }
.rec { display: flex; justify-content: center; align-items: center; gap: 8px; color: var(--dot); font-size: 13.5px; font-weight: 600; }
.rec::before { content: ""; width: 10px; height: 10px; border-radius: 5px; background: var(--dot); }
.rec.paused { color: var(--muted); } .rec.paused::before { background: var(--muted); }
.wave { display: flex; align-items: center; justify-content: center; gap: 3px; height: 56px; margin: 6px 24px; direction: ltr; }
.wave span { width: 4px; border-radius: 2px; background: var(--accent); min-height: 4px; }
.pause { width: 72px; height: 72px; border-radius: 36px; border: 0; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); display: grid; place-items: center; margin: 4px auto 0; cursor: pointer; }
.pause svg { width: 28px; height: 28px; }
.camera { position: fixed; inset: 0; background: #111; z-index: 6; }
.camera video { width: 100%; height: 100%; object-fit: cover; }
.camera .reticle { position: absolute; left: 50%; top: 38%; width: 220px; height: 220px; margin: -110px 0 0 -110px; border-radius: 20px; box-shadow: 0 0 0 999px #0005; outline: 3px solid #b8e2cc; }
.camera .camtop { position: absolute; top: env(safe-area-inset-top); left: 0; right: 0; display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: #fff; }
.camera .camtop h1 { font-size: 18px; margin: 0; }
.camera .camtop .iconbtn { color: #fff; background: #0006; }
.camera .hint { position: absolute; top: calc(38% + 126px); left: 16px; right: 16px; text-align: center; color: #fff; font-size: 14px; }
.group { font-size: 13px; font-weight: 700; color: var(--muted); margin: 14px 20px 8px; }
.ask { margin: 0 16px 10px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); padding: 14px 14px 12px; }
.ask > button.open { all: unset; display: block; cursor: pointer; width: 100%; }
.ask b { display: block; font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.ask p { margin: 4px 0 12px; color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; }
.kind { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 600; color: var(--accent); margin-bottom: 4px; overflow-wrap: anywhere; }
.kind svg { width: 14px; height: 14px; }
.path { font: 12.5px/1.4 ui-monospace, monospace; background: var(--surface-2); border-radius: 8px; padding: 6px 8px; direction: ltr; unicode-bidi: isolate; display: block; margin: 0 16px; overflow-wrap: anywhere; }
.para { margin: 0 20px; font-size: 14px; overflow-wrap: anywhere; }
.steps { margin: 4px 16px 0; display: grid; gap: 10px; }
.step { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.step .n { width: 32px; height: 32px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); font-weight: 700; font-size: 14px; }
.step.done .n { background: var(--accent); color: var(--ink); }
.step.done .n svg { width: 16px; height: 16px; }
.step b { display: block; font-size: 14.5px; }
.step small { color: var(--muted); font-size: 12.5px; line-height: 1.3; display: block; }
.step .btn { min-height: 44px; min-width: 84px; font-size: 14px; border-radius: 22px; }
.step .ok { font-size: 13px; color: var(--accent); font-weight: 600; }
.amount { margin: 0 16px; display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 8px; }
.amount .field { width: 100%; margin: 0; }
.toast { position: fixed; left: 16px; right: 16px; top: calc(12px + env(safe-area-inset-top)); padding: 12px 14px; border-radius: 14px; background: var(--text); color: var(--bg); font-size: 14px; z-index: 9; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { .switch::after { transition: none; } }
