/* Programi for Android — phone layout.
   Jakob: familiar Android patterns (top app bar, bottom navigation, FAB, bottom sheets, back button).
   Fitts: main actions sit at the bottom in thumb reach and every target is at least 48px.
   Hick: few choices per screen; advanced options stay folded until asked for. */
:root {
  --brand: #F5B400;
  --on-brand: #111;
  --bg: #0d0e10;
  --surface: #17181c;
  --surface2: #202227;
  --surface3: #2a2c32;
  --line: #2e3037;
  --text: #f1f1f3;
  --muted: #9a9ca4;
  --danger: #ff5c63;
  --good: #3ccf7a;
  --wa: #25D366;
  --radius: 16px;
  --tap: 48px;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 15px/1.4 Roboto, "Noto Sans Arabic", "Segoe UI", system-ui, sans-serif; overscroll-behavior: none; }
body { overflow: hidden; -webkit-user-select: none; user-select: none; }
input, textarea, select, button { font: inherit; color: inherit; }
input, textarea, [contenteditable] { -webkit-user-select: text; user-select: text; }
button { cursor: pointer; }
img { display: block; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.muted { color: var(--muted); }
.ic { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[dir=rtl] .flip { transform: scaleX(-1); }

/* ------------------------------------------------------------------ screens */
#app { position: fixed; inset: 0; display: flex; flex-direction: column; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); }
.screen.enter { animation: slideIn .24s cubic-bezier(.2, .8, .2, 1); }
[dir=rtl] .screen.enter { animation-name: slideInRtl; }
@keyframes slideIn { from { transform: translateX(30%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slideInRtl { from { transform: translateX(-30%); opacity: 0; } to { transform: none; opacity: 1; } }
.scroll { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding-bottom: calc(var(--nav-h) + 96px + var(--safe-b)); }
.scroll.with-bar { padding-bottom: calc(110px + var(--safe-b)); }

/* top app bar (Jakob: standard Android layout) */
.appbar { position: relative; z-index: 3; display: flex; align-items: center; gap: 4px; min-height: 60px; padding: calc(6px + var(--safe-t)) 6px 6px; background: #0f1013; border-bottom: 1px solid var(--line); }
.appbar h1 { flex: 1; margin: 0; font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 6px; }
.appbar h1 small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.iconbtn { width: var(--tap); height: var(--tap); border-radius: 50%; border: 0; background: none; display: grid; place-items: center; flex: none; }
.iconbtn:active { background: var(--surface3); }

/* photo hero headers */
.hero { position: relative; min-height: 210px; padding: calc(18px + var(--safe-t)) 20px 22px; display: flex; flex-direction: column; justify-content: flex-end; background-size: cover; background-position: center 30%; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13, 14, 16, .15) 0%, rgba(13, 14, 16, .55) 55%, var(--bg) 100%); }
.hero > * { position: relative; }
.hero h1 { margin: 0; font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; }
.hero p { margin: 6px 0 0; color: #d6d3cc; }
.hero .stats { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.hero .stat { background: rgba(0, 0, 0, .6); border: 1px solid rgba(255, 255, 255, .12); border-radius: 99px; padding: 6px 12px; font-size: 13px; }
.hero .stat b { color: var(--brand); }
.hero .brandmark { position: absolute; top: calc(14px + var(--safe-t)); inset-inline-end: 16px; width: 44px; height: 44px; border-radius: 12px; overflow: hidden; background: #fff; display: grid; place-items: center; }
.hero .brandmark img { width: 100%; height: 100%; object-fit: contain; }
.hero .brandmark svg { width: 44px; height: 44px; }

/* bottom navigation (Jakob + Fitts: thumb zone, 4 destinations only — Hick) */
.bottomnav { position: fixed; z-index: 5; inset-inline: 0; bottom: 0; height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b); display: grid; grid-template-columns: repeat(4, 1fr); background: #141519; border-top: 1px solid var(--line); }
.bottomnav button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 12px; font-weight: 600; }
.bottomnav button .pill { width: 56px; height: 30px; border-radius: 99px; display: grid; place-items: center; transition: background .2s; }
.bottomnav button.on { color: var(--text); }
.bottomnav button.on .pill { background: color-mix(in srgb, var(--brand) 28%, transparent); color: var(--brand); }

/* floating action button (Jakob: Android FAB; Fitts: big, near the thumb) */
.fab { position: fixed; z-index: 6; inset-inline-end: 16px; bottom: calc(var(--nav-h) + 16px + var(--safe-b)); height: 58px; padding: 0 22px 0 18px; border-radius: 18px; border: 0; background: var(--brand); color: var(--on-brand); font-weight: 800; font-size: 16px; display: flex; align-items: center; gap: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); transition: transform .15s; }
.fab:active { transform: scale(.95); }
.fab .ic { stroke-width: 2.6; }

/* sticky bottom action bar for editors (Fitts) */
.actionbar { position: fixed; z-index: 5; inset-inline: 0; bottom: 0; display: flex; gap: 10px; padding: 12px 14px calc(12px + var(--safe-b)); background: linear-gradient(180deg, rgba(13, 14, 16, 0), var(--bg) 30%); }
.actionbar .btn { flex: 1; }
.actionbar .btn.primary { flex: 2; }

/* buttons */
.btn { min-height: var(--tap); border-radius: 14px; border: 1px solid var(--line); background: var(--surface2); padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; transition: transform .1s, filter .1s; }
.btn:active { transform: scale(.97); filter: brightness(1.15); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn.primary:disabled { opacity: .4; }
.btn.wa { background: var(--wa); border-color: var(--wa); color: #06210f; }
.btn.danger { color: var(--danger); }
.btn.ghost { background: none; border-color: transparent; }
.btn.big { min-height: 56px; font-size: 16px; width: 100%; }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 12px; }

/* sections & cards */
.section { padding: 8px 16px; }
.section h2 { margin: 18px 4px 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.list { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-align: start; width: 100%; transition: transform .1s, background .1s; }
.row:active { transform: scale(.985); background: var(--surface2); }
.row .grow { flex: 1; min-width: 0; }
.row b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .sub { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .accent { width: 6px; align-self: stretch; border-radius: 6px; background: var(--brand); flex: none; }
.avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 17px; color: #111; flex: none; }
.badge { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--surface3); white-space: nowrap; }
.badge.good { background: rgba(60, 207, 122, .16); color: var(--good); }
.badge.bad { background: rgba(255, 92, 99, .16); color: var(--danger); }

/* empty state with photo */
.empty { margin: 18px 16px; border-radius: 22px; overflow: hidden; position: relative; min-height: 260px; display: flex; flex-direction: column; justify-content: flex-end; padding: 22px; background-size: cover; background-position: center; }
.empty::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .1), rgba(0, 0, 0, .85)); }
.empty > * { position: relative; }
.empty h3 { margin: 0 0 6px; font-size: 21px; }
.empty p { margin: 0 0 16px; color: #d6d3cc; }
.empty.plain { min-height: 0; background: var(--surface); border: 1px dashed var(--line); text-align: center; align-items: center; color: var(--muted); }
.empty.plain::before { display: none; }

/* chips (horizontal scrollers) */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 40px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.chip.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.chip.add { border-style: dashed; color: var(--muted); }
.chip.more { padding: 0 10px; }

/* program editor: exercise cards */
.daybar { display: flex; align-items: center; gap: 8px; padding: 14px 16px 6px; }
.daybar h2 { flex: 1; margin: 0; font-size: 20px; }
.ex { display: flex; gap: 12px; align-items: center; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); width: 100%; text-align: start; min-height: 88px; transition: transform .1s; }
.ex:active { transform: scale(.985); }
.thumb { width: 68px; height: 68px; border-radius: 12px; background: #fff; overflow: hidden; flex: none; display: grid; place-items: center; color: #999; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.ex .grow { flex: 1; min-width: 0; }
.ex b { display: block; font-size: 15px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ex .meta { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.ex .pillv { font-size: 13px; font-weight: 800; padding: 3px 9px; border-radius: 8px; background: var(--surface3); }
.ex .pillv.brand { background: color-mix(in srgb, var(--brand) 22%, transparent); color: var(--brand); }
.ex .num { width: 26px; height: 26px; border-radius: 50%; background: var(--surface3); display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; }
.ssgroup { border-inline-start: 4px solid #a855f7; padding-inline-start: 8px; display: flex; flex-direction: column; gap: 8px; }
.sslabel { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: #c79bff; margin: 0 0 -2px 4px; }
.phase-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* bottom sheets (Jakob: Android modal bottom sheet) */
.backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, .55); animation: fade .2s; }
.sheet { position: fixed; z-index: 21; inset-inline: 0; bottom: 0; max-height: 88vh; max-height: calc(100dvh - var(--safe-t) - 28px); display: flex; flex-direction: column; background: var(--surface); border-radius: 24px 24px 0 0; padding-bottom: var(--safe-b); animation: up .26s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 -10px 40px rgba(0, 0, 0, .5); }
.sheet.closing { animation: down .2s forwards; }
.backdrop.closing { animation: fadeout .2s forwards; }
.sheet .handle { width: 40px; height: 5px; border-radius: 9px; background: var(--surface3); margin: 10px auto 4px; flex: none; }
.sheet .shead { display: flex; align-items: center; gap: 12px; padding: 8px 18px 12px; }
.sheet .shead h3 { flex: 1; margin: 0; font-size: 19px; }
.sheet .sbody { overflow-y: auto; padding: 0 18px 18px; -webkit-overflow-scrolling: touch; }
.sheet .sfoot { display: flex; gap: 10px; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.sheet .sfoot .btn { flex: 1; }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes down { to { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
@keyframes fadeout { to { opacity: 0; } }

/* menu rows inside sheets (Hick: one short list of choices) */
.menu { display: flex; flex-direction: column; }
.menu button { min-height: 60px; display: flex; align-items: center; gap: 16px; padding: 8px 6px; border: 0; background: none; text-align: start; border-radius: 12px; font-size: 16px; }
.menu button:active { background: var(--surface2); }
.menu button .mi { width: 44px; height: 44px; border-radius: 12px; background: var(--surface2); display: grid; place-items: center; flex: none; }
.menu button small { display: block; color: var(--muted); font-size: 13px; }
.menu button.danger { color: var(--danger); }
.menu button.wa .mi { background: rgba(37, 211, 102, .16); color: var(--wa); }
.menu button.brand .mi { background: color-mix(in srgb, var(--brand) 20%, transparent); color: var(--brand); }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; font-weight: 700; color: var(--muted); }
.input, .field input, .field textarea, .field select { width: 100%; min-height: 52px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface2); padding: 12px 14px; outline: none; font-size: 16px; }
.field textarea { min-height: 90px; resize: none; }
.field input:focus, .field textarea:focus, .field select:focus, .input:focus { border-color: var(--brand); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* steppers (Fitts: big − / + targets) */
.stepper { display: flex; align-items: center; background: var(--surface2); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.stepper button { width: 56px; height: 56px; border: 0; background: none; font-size: 26px; font-weight: 700; color: var(--brand); flex: none; }
.stepper button:active { background: var(--surface3); }
.stepper input { flex: 1; min-width: 0; height: 56px; border: 0; background: none; text-align: center; font-size: 22px; font-weight: 800; outline: none; }
.stepper.small button { width: 48px; height: 48px; font-size: 22px; }
.stepper.small input { height: 48px; font-size: 18px; }

/* segmented & toggle */
.seg { display: flex; background: var(--surface2); border: 1px solid var(--line); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { flex: 1; min-height: 44px; border: 0; border-radius: 10px; background: none; font-weight: 700; color: var(--muted); }
.seg button.on { background: var(--brand); color: var(--on-brand); }
.toggle { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 4px; }
.toggle .grow { flex: 1; }
.switch { width: 52px; height: 32px; border-radius: 99px; background: var(--surface3); position: relative; flex: none; transition: background .2s; border: 0; }
.switch::after { content: ""; position: absolute; top: 4px; inset-inline-start: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: inset-inline-start .2s; }
.switch.on { background: var(--brand); }
.switch.on::after { inset-inline-start: 24px; }
.disclose { width: 100%; min-height: 52px; border: 1px dashed var(--line); background: none; border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-weight: 700; margin: 4px 0 14px; }

/* exercise picker / library */
.searchbar { display: flex; align-items: center; gap: 10px; margin: 10px 16px 6px; padding: 0 14px; min-height: 52px; border-radius: 99px; background: var(--surface2); border: 1px solid var(--line); }
.searchbar input { flex: 1; border: 0; background: none; outline: none; font-size: 16px; min-width: 0; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 6px 16px 10px; }
.tile { position: relative; height: 112px; border-radius: 18px; overflow: hidden; border: 0; background: #fff center/cover no-repeat; text-align: start; padding: 0; transition: transform .12s; }
.tile:active { transform: scale(.96); }
.tile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, .82)); }
.tile span { position: absolute; inset-inline-start: 14px; bottom: 10px; color: #fff; font-weight: 800; font-size: 17px; }
.tile small { display: block; font-weight: 600; font-size: 12px; color: #e0ddd6; }
.tile.all { background: linear-gradient(135deg, var(--brand), #ff7a1a); }
.tile.all::before { background: none; }
.tile.all span { color: #111; }
.tile.all small { color: #3a2a00; }
.pick { display: flex; align-items: center; gap: 12px; padding: 8px 16px; min-height: 84px; width: 100%; border: 0; background: none; text-align: start; border-bottom: 1px solid var(--line); }
.pick:active { background: var(--surface); }
.pick .grow { flex: 1; min-width: 0; }
.pick b { display: block; font-size: 15px; line-height: 1.25; }
.pick small { color: var(--muted); font-size: 13px; }
.check { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--surface3); display: grid; place-items: center; flex: none; transition: all .15s; }
.pick.sel .check { background: var(--brand); border-color: var(--brand); color: #111; transform: scale(1.08); }
.pick.sel { background: color-mix(in srgb, var(--brand) 8%, transparent); }
.count { padding: 6px 20px; font-size: 13px; color: var(--muted); }

/* exercise detail */
.anim { position: relative; aspect-ratio: 4 / 3; background: #fff; border-radius: 18px; overflow: hidden; margin-bottom: 14px; }
.anim img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .35s; }
.anim .tag { position: absolute; bottom: 10px; inset-inline-start: 10px; background: rgba(0, 0, 0, .65); color: #fff; font-size: 12px; padding: 4px 10px; border-radius: 99px; }
.mchips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 14px; }
.steps { margin: 0; padding-inline-start: 22px; color: #d9d9de; }
.steps li { margin-bottom: 8px; }

/* clients & progress */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.kpi small { display: block; color: var(--muted); font-size: 12px; }
.kpi b { font-size: 20px; }
.chartcard { margin: 12px 16px 0; padding: 10px 6px 4px; }
.chartcard svg { width: 100%; height: auto; display: block; }
.photos3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pslot { position: relative; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: var(--surface2); border: 1px dashed var(--line); display: grid; place-items: center; color: var(--muted); font-size: 12px; text-align: center; }
.pslot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pslot .lbl { position: absolute; bottom: 0; inset-inline: 0; background: rgba(0, 0, 0, .6); color: #fff; padding: 4px; font-weight: 700; }
.pslot .rm { position: absolute; top: 4px; inset-inline-end: 4px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; display: grid; place-items: center; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.compare figure { margin: 0; }
.compare img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; background: var(--surface2); }
.compare figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; text-align: center; }
.ci-thumbs { display: flex; gap: 4px; }
.ci-thumbs img { width: 34px; height: 44px; border-radius: 6px; object-fit: cover; }

/* profile */
.swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.swatch { width: 48px; height: 48px; border-radius: 50%; border: 3px solid transparent; }
.swatch.on { border-color: #fff; box-shadow: 0 0 0 3px var(--brand); }
.logo-edit { display: flex; align-items: center; gap: 14px; }
.logo-box { width: 84px; height: 84px; border-radius: 18px; background: #fff; overflow: hidden; display: grid; place-items: center; flex: none; }
.logo-box img { width: 100%; height: 100%; object-fit: contain; }

/* activation (full photo background) */
.activation { position: absolute; inset: 0; overflow-y: auto; background: #000 center 20% / cover no-repeat; }
.activation::before { content: ""; position: fixed; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .2) 0%, rgba(0, 0, 0, .65) 38%, rgba(8, 8, 9, .97) 70%); pointer-events: none; }
.activation .inner { position: relative; min-height: 100%; display: flex; flex-direction: column; padding: calc(16px + var(--safe-t)) 18px calc(20px + var(--safe-b)); }
.activation .langs { display: flex; gap: 8px; justify-content: flex-end; }
.activation .brand { margin-top: 26vh; display: flex; align-items: center; gap: 14px; }
.activation .brand h1 { margin: 0; font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.activation .brand p { margin: 2px 0 0; color: var(--brand); font-weight: 700; }
.glass { background: rgba(23, 24, 28, .82); backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, .1); border-radius: 22px; padding: 18px; margin-top: 18px; }
.step { display: flex; gap: 10px; align-items: center; font-weight: 700; margin-bottom: 10px; }
.step i { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #111; display: grid; place-items: center; font-style: normal; font-size: 14px; flex: none; }
.mid { font: 800 24px/1 ui-monospace, "Roboto Mono", monospace; letter-spacing: .06em; color: var(--brand); text-align: center; padding: 16px 8px; background: rgba(0, 0, 0, .35); border-radius: 14px; margin-bottom: 10px; direction: ltr; }
.err { background: rgba(255, 92, 99, .14); color: #ffb3b6; border-radius: 12px; padding: 10px 12px; margin: 10px 0 0; font-size: 14px; }

/* preview overlay (client app as the client will see it) */
.preview { position: fixed; inset: 0; z-index: 30; background: #000; display: flex; flex-direction: column; animation: fade .2s; }
.preview iframe { flex: 1; border: 0; background: #fff; width: 100%; }

/* toast with optional undo (Jakob: Gmail-style undo) */
.toast { position: fixed; z-index: 40; inset-inline: 16px; bottom: calc(var(--nav-h) + 90px + var(--safe-b)); background: #2b2d33; border-radius: 14px; padding: 12px 14px 12px 16px; display: flex; align-items: center; gap: 12px; box-shadow: 0 8px 30px rgba(0, 0, 0, .5); transform: translateY(30px); opacity: 0; transition: .22s; pointer-events: none; }
.toast.on { transform: none; opacity: 1; pointer-events: auto; }
.toast span { flex: 1; }
.toast button { border: 0; background: none; color: var(--brand); font-weight: 800; min-height: 40px; padding: 0 8px; }
.loader { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(0, 0, 0, .5); }
.loader div { width: 46px; height: 46px; border-radius: 50%; border: 4px solid var(--surface3); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- fixes after the first phone test ---- */
.scroll > .chips:first-child { padding-top: 14px; }
.actionbar .btn { white-space: nowrap; padding: 0 12px; font-size: 15px; }
.pillv .ic, .meta .ic { width: 14px; height: 14px; vertical-align: -2px; }
.pillv { display: inline-flex; align-items: center; gap: 4px; }
.two .stepper button { width: 44px; }
.two .stepper input { font-size: 20px; }
.tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tools button { min-height: 60px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; font-weight: 700; }
.tools button:disabled { opacity: .35; }
.tools button:active { background: var(--surface3); }
.tile.all { grid-column: span 2; height: 76px; }
.chartcard text { font-family: Roboto, system-ui, sans-serif; }
.activation .brand { margin-top: 30vh; }
.glass.install { border-color: rgba(10, 132, 255, .45); }
.glass.install .step i { background: #0a84ff; color: #fff; }
.section .glass.install { margin-top: 8px; }

/* Smoother scrolling on iPhone: each scrolling area gets its own layer, and photos decode off the main thread. */
.scroll, .sheet .sbody { will-change: scroll-position; overscroll-behavior: contain; }
.sheet .sfoot .btn.close { flex: 3; }

/* Activity rings card on the client screen (component in shared/activity-rings.js) */
.ringcard { margin: 14px 16px 0; padding: 18px 14px; }
.ringcard .ar-title { font-size: 17px; }
.ringcard .ar-body { flex-direction: column; gap: 18px; }
.ringcard .ar-legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; text-align: center; transform: translateY(10px); }
[dir=rtl] .ringcard .ar-legend { transform: translateY(10px); }
.ringcard .ar-card.in .ar-legend { transform: none; }
.ringcard .ar-label { font-size: 12px; line-height: 1.3; min-height: 2.6em; display: flex; align-items: flex-end; justify-content: center; }
.ringcard .ar-value { font-size: 18px; }
[dir=rtl] .ringcard .ar-value { text-align: center; }
