/* iClock Directors — design system */
:root {
  --bg: #F2F5F5; --surface: #FFFFFF; --surface-2: #F7F9F9; --ink: #0F2226; --muted: #5E7074; --faint: #8D9C9F; --line: #E2E9EA;
  --brand: #0B3A42; --brand-2: #11606B; --brand-ink: #FFFFFF; --accent: #F5B83D;
  --in: #22885F; --late: #CF8A12; --absent: #C2454D; --leave: #4C67B0; --part: #8058B0; --wa: #1F9D55;
  --shadow: 0 1px 2px rgba(11,58,66,.05), 0 6px 20px rgba(11,58,66,.07);
  --shadow-up: 0 -8px 30px rgba(11,58,66,.12);
  --r-s: 10px; --r-m: 16px; --r-l: 22px;
  --ease: cubic-bezier(.2,.8,.2,1);
  font-family: "Onest", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink); background: var(--bg);
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
  -webkit-tap-highlight-color: transparent;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0A1315; --surface: #121E21; --surface-2: #17262A; --ink: #E7EFF0; --muted: #9CAEB2; --faint: #6F8286; --line: #223338;
          --brand: #0A2F36; --brand-2: #2A8591; --in: #43B784; --late: #E5A53C; --absent: #E4777D; --leave: #8AA1E2; --part: #B195E0; --wa: #2FBF6C;
          --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25); --shadow-up: 0 -8px 30px rgba(0,0,0,.4); }
}
*, *::before, *::after { box-sizing: inherit; }
html { height: 100%; }
body { margin: 0; min-height: 100%; background: var(--bg); font-size: 16px; line-height: 1.45; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-appearance: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
.wrap { max-width: 760px; margin: 0 auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- header ---------- */
.top { background: var(--brand); color: var(--brand-ink); position: relative; overflow: hidden; }
.top::before { content: ""; position: absolute; width: 520px; height: 520px; right: -220px; top: -300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.10), rgba(255,255,255,0) 65%); pointer-events: none; }
.top .wrap { position: relative; padding: 12px 16px 18px; }
.bar { display: flex; align-items: center; gap: 10px; }
.co-btn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 6px 0; cursor: pointer; text-align: left; color: inherit; }
.co-tile { width: 38px; height: 38px; border-radius: 11px; background: var(--accent); color: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: .95rem; flex: none; }
.co-txt { min-width: 0; }
.co-name { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 1.08rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-name svg { flex: none; opacity: .8; }
.co-sub { display: block; font-size: .8rem; opacity: .72; }
.round { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: inherit; display: grid; place-items: center; cursor: pointer; flex: none; transition: background .2s; }
.round:active { background: rgba(255,255,255,.22); }
.me { background: rgba(255,255,255,.95); color: var(--brand); font-weight: 800; font-size: .88rem; }
.round.spin svg { animation: rot .8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

.hero { margin-top: 14px; }
.hello { font-size: .92rem; opacity: .8; }
.big { display: flex; align-items: baseline; gap: 10px; margin: 2px 0 12px; }
.big b { font-size: 3.2rem; line-height: 1; font-weight: 800; letter-spacing: -.03em; }
.big span { font-size: 1rem; opacity: .85; }
.meter { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: rgba(255,255,255,.14); gap: 2px; }
.meter i { display: block; height: 100%; transition: flex-grow .7s var(--ease); min-width: 0; }
.pills { display: flex; gap: 8px; margin: 12px -16px 0; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px 7px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.06); color: inherit; font-size: .86rem; cursor: pointer; transition: background .2s, color .2s; }
.pill b { font-weight: 800; }
.pill[aria-pressed="true"] { background: #fff; color: var(--brand); border-color: #fff; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.page-title { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; margin: 14px 0 2px; }
.page-sub { opacity: .78; font-size: .9rem; }

/* ---------- main ---------- */
main { padding: 14px 14px 110px; }
.enter { animation: enter .35s var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }
.ptr { height: 0; display: grid; place-items: center; overflow: hidden; color: var(--muted); transition: height .2s; }
.ptr svg { transition: transform .2s; }

.search { position: relative; margin-bottom: 12px; }
.search input { width: 100%; padding: 13px 14px 13px 44px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); box-shadow: var(--shadow); min-height: 48px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.note-bar { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border-radius: var(--r-m); padding: 12px 14px; margin-bottom: 12px; box-shadow: var(--shadow); color: var(--muted); font-size: .92rem; }
.note-bar svg { flex: none; color: var(--late); margin-top: 1px; }

.sec { display: flex; justify-content: space-between; align-items: baseline; margin: 20px 4px 8px; }
.sec h3 { margin: 0; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sec span { font-size: .82rem; color: var(--faint); }
.card { background: var(--surface); border-radius: var(--r-m); box-shadow: var(--shadow); overflow: hidden; }

/* person row */
.person { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: none; border: 0; border-top: 1px solid var(--line); text-align: left; cursor: pointer; transition: background .15s; }
.person:first-child { border-top: 0; }
.person:active { background: var(--surface-2); }
.av { position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .9rem; flex: none; }
.av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.av .dot { position: absolute; right: -1px; bottom: -1px; width: 13px; height: 13px; border: 2.5px solid var(--surface); }
.pbody { flex: 1; min-width: 0; }
.pname { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.psub { display: block; font-size: .83rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptime { text-align: right; flex: none; font-weight: 700; }
.ptime small { display: block; font-weight: 500; font-size: .78rem; color: var(--faint); }
.ptime.late { color: var(--late); }

/* live timeline */
.live-state { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); margin: 2px 4px 12px; }
.beat { width: 8px; height: 8px; border-radius: 50%; background: var(--in); position: relative; }
.beat::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--in); opacity: 0; animation: beat 2s infinite; }
@keyframes beat { 0% { transform: scale(.4); opacity: .8; } 100% { transform: scale(1.4); opacity: 0; } }
.tl { position: relative; padding-left: 64px; }
.tl::before { content: ""; position: absolute; left: 52px; top: 8px; bottom: 8px; width: 2px; background: var(--line); border-radius: 2px; }
.ev { position: relative; margin-bottom: 10px; }
.ev-time { position: absolute; left: -64px; top: 14px; width: 44px; text-align: right; font-weight: 800; font-size: .95rem; }
.ev-time.late { color: var(--late); }
.ev-dot { position: absolute; left: -17px; top: 19px; width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--bg); box-sizing: content-box; }
.ev .person { border: 0; border-radius: var(--r-m); background: var(--surface); box-shadow: var(--shadow); }
.ev.new .person { animation: glow 2.6s var(--ease); }
@keyframes glow { 0% { box-shadow: 0 0 0 3px var(--accent), var(--shadow); transform: translateX(6px); } 30% { transform: none; } 100% { box-shadow: var(--shadow); } }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.tag.t-late { background: color-mix(in srgb, var(--late) 14%, transparent); color: var(--late); }
.tag.t-out { background: color-mix(in srgb, var(--leave) 14%, transparent); color: var(--leave); }
.tag.t-part { background: color-mix(in srgb, var(--part) 14%, transparent); color: var(--part); }
.ev-x { display: flex; gap: 6px; }
.chip-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--brand-2); border: 0; cursor: pointer; }

/* leave */
.req { background: var(--surface); border-radius: var(--r-m); box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px; transition: opacity .35s, transform .35s var(--ease), max-height .35s; }
.req.gone { opacity: 0; transform: translateX(60px) scale(.97); }
.req-h { display: flex; gap: 12px; align-items: center; }
.req-h .pbody { cursor: pointer; }
.req-when { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; padding: 12px; background: var(--surface-2); border-radius: var(--r-s); }
.cal { width: 46px; flex: none; text-align: center; border-radius: 9px; overflow: hidden; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.cal i { display: block; font-style: normal; background: var(--absent); color: #fff; font-size: .62rem; font-weight: 700; letter-spacing: .05em; padding: 2px 0; text-transform: uppercase; }
.cal b { display: block; font-size: 1.2rem; font-weight: 800; padding: 1px 0 3px; }
.req-when .w1 { font-weight: 700; }
.req-when .w2 { font-size: .85rem; color: var(--muted); }
.req-note { margin: 10px 0 0; font-size: .93rem; color: var(--muted); font-style: italic; }
.acts { display: flex; gap: 10px; margin-top: 14px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: var(--r-s); padding: 12px 18px; font-weight: 700; cursor: pointer; min-height: 48px; transition: transform .12s, filter .2s, opacity .2s; text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .55; cursor: default; transform: none; }
.btn-primary { background: var(--brand-2); color: #fff; }
.btn-dark { background: var(--brand); color: #fff; }
.btn-ok { background: var(--in); color: #fff; flex: 1; }
.btn-no { background: color-mix(in srgb, var(--absent) 10%, transparent); color: var(--absent); flex: 1; }
.btn-ghost { background: var(--surface-2); color: var(--ink); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; color: var(--brand-2); font-weight: 700; cursor: pointer; padding: 10px; }
@media (prefers-color-scheme: dark) { .btn-link { color: #7FCAD3; } }

/* attendance */
.form { background: var(--surface); border-radius: var(--r-m); box-shadow: var(--shadow); padding: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fld { display: block; font-size: .82rem; color: var(--muted); font-weight: 600; }
.fld input, .fld select, .fld textarea { display: block; width: 100%; margin-top: 6px; padding: 12px; border: 1.5px solid var(--line); border-radius: var(--r-s); background: var(--surface-2); min-height: 48px; font-weight: 500; color: var(--ink); transition: border-color .2s, background .2s; }
.fld input:focus, .fld select:focus, .fld textarea:focus { border-color: var(--brand-2); background: var(--surface); outline: none; }
.fld textarea { resize: vertical; line-height: 1.45; }
.full { grid-column: 1 / -1; }
.chips { display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; grid-column: 1 / -1; margin: 0 -2px; padding: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 14px; font-size: .88rem; font-weight: 600; cursor: pointer; transition: all .2s; }
.chips button[aria-pressed="true"] { background: var(--brand-2); color: #fff; border-color: var(--brand-2); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.kpi { background: var(--surface); border-radius: var(--r-m); box-shadow: var(--shadow); padding: 12px 14px; }
.kpi b { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.kpi span { font-size: .8rem; color: var(--muted); }
.kpi.warn b { color: var(--late); }
.res-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 6px 0 10px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: var(--r-s); padding: 3px; }
.seg button { border: 0; background: transparent; padding: 8px 14px; border-radius: 8px; cursor: pointer; font-size: .88rem; font-weight: 600; color: var(--muted); transition: all .2s; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.tbl { overflow-x: auto; background: var(--surface); border-radius: var(--r-m); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 700; background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }
td.late { color: var(--late); font-weight: 700; }
tr.tap { cursor: pointer; }
tr.tap:active td { background: var(--surface-2); }
tr.tot th { background: var(--surface-2); color: var(--ink); font-size: .88rem; text-transform: none; letter-spacing: 0; }
tr.dim td { color: var(--faint); }
td.flag { color: var(--absent); font-size: .8rem; font-weight: 700; }
tr.dim td.flag { color: var(--faint); font-weight: 500; }
.hint { color: var(--muted); font-size: .85rem; margin: 10px 4px; }

/* empty & skeleton */
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty .em-ic { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow); color: var(--brand-2); }
.empty strong { display: block; color: var(--ink); font-size: 1.1rem; margin-bottom: 4px; }
.sk { background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: 8px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.sk-row { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); }
.sk-row:first-child { border-top: 0; }

/* bottom nav */
nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
nav.tabs .wrap { display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 6px 4px; }
nav.tabs button { background: none; border: 0; padding: 4px 2px 6px; cursor: pointer; font-size: .76rem; font-weight: 700; color: var(--faint); display: flex; flex-direction: column; align-items: center; gap: 3px; position: relative; }
nav.tabs .ic { width: 58px; height: 32px; border-radius: 999px; display: grid; place-items: center; transition: background .25s var(--ease), color .25s; }
nav.tabs button[aria-current="page"] { color: var(--ink); }
nav.tabs button[aria-current="page"] .ic { background: color-mix(in srgb, var(--brand-2) 16%, transparent); color: var(--brand-2); }
@media (prefers-color-scheme: dark) { nav.tabs button[aria-current="page"] .ic { color: #7FCAD3; } }
nav.tabs svg { width: 22px; height: 22px; }
.badge { position: absolute; top: 0; left: calc(50% + 8px); background: var(--absent); color: #fff; font-size: .68rem; font-weight: 800; border-radius: 999px; padding: 0 6px; min-width: 19px; line-height: 19px; border: 2px solid var(--surface); }

/* sheets & pages */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(6,20,23,.45); display: flex; align-items: flex-end; justify-content: center; animation: fade .25s; }
.scrim.out { animation: fadeout .22s forwards; }
@keyframes fade { from { opacity: 0; } }
@keyframes fadeout { to { opacity: 0; } }
.sheet { background: var(--surface); width: 100%; max-width: 760px; border-radius: var(--r-l) var(--r-l) 0 0; padding: 8px 0 calc(18px + env(safe-area-inset-bottom, 0px));
  max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow-up); animation: up .32s var(--ease); overscroll-behavior: contain; }
.scrim.out .sheet { animation: down .22s forwards; }
@keyframes up { from { transform: translateY(100%); } }
@keyframes down { to { transform: translateY(100%); } }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 8px; }
.sh-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 20px 10px; }
.sh-h h2 { margin: 0; font-size: 1.25rem; letter-spacing: -.01em; }
.sh-h .round { background: var(--surface-2); color: var(--ink); }
.pad { padding: 8px 20px; }
.opt { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 20px; border: 0; background: none; text-align: left; cursor: pointer; font-size: 1rem; transition: background .15s; }
.opt:active { background: var(--surface-2); }
.opt .o-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--brand-2); flex: none; }
.opt .o-t { flex: 1; min-width: 0; }
.opt .o-t b { display: block; font-weight: 600; }
.opt .o-t small { display: block; color: var(--muted); font-size: .84rem; }
.opt[aria-current="true"] .o-t b { color: var(--brand-2); font-weight: 800; }
.opt .chev { color: var(--faint); }
.opt.danger { color: var(--absent); }
.opt.danger .o-ic { color: var(--absent); background: color-mix(in srgb, var(--absent) 10%, transparent); }
.meta { color: var(--muted); font-size: .86rem; }
.photo-full { display: block; width: 100%; max-height: 70vh; object-fit: contain; background: #000; }

.page { position: fixed; inset: 0; z-index: 30; background: var(--bg); overflow-y: auto; animation: slidein .35s var(--ease); padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.page.out { animation: slideout .25s forwards; }
@keyframes slidein { from { transform: translateX(100%); } }
@keyframes slideout { to { transform: translateX(100%); } }
.page-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.page-bar h1 { margin: 0; font-size: 1.15rem; flex: 1; }
.page-bar .round { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.page main { padding-bottom: 40px; }

/* team */
.st { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.st-active { background: color-mix(in srgb, var(--in) 13%, transparent); color: var(--in); }
.st-invited { background: color-mix(in srgb, var(--late) 15%, transparent); color: var(--late); }
.st-off { background: var(--surface-2); color: var(--faint); }
.co-list { display: grid; gap: 8px; }
.co-row { background: var(--surface-2); border-radius: var(--r-s); padding: 10px 12px; border: 1.5px solid transparent; transition: border-color .2s, background .2s; }
.co-row.on { border-color: color-mix(in srgb, var(--brand-2) 45%, transparent); background: color-mix(in srgb, var(--brand-2) 6%, var(--surface)); }
.co-row > label { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.co-perms { display: flex; gap: 16px; margin: 8px 0 0 32px; flex-wrap: wrap; }
.co-row:not(.on) .co-perms { display: none; }
.sw { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--muted); cursor: pointer; }
.sw input { appearance: none; -webkit-appearance: none; width: 38px; height: 22px; border-radius: 11px; background: var(--line); position: relative; transition: background .2s; cursor: pointer; margin: 0; }
.sw input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s var(--ease); }
.sw input:checked { background: var(--in); }
.sw input:checked::after { transform: translateX(16px); }
.box { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--faint); display: grid; place-items: center; margin: 0; cursor: pointer; flex: none; transition: all .15s; }
.box:checked { background: var(--brand-2); border-color: var(--brand-2); }
.box:checked::after { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }
.share-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.share-grid .btn { flex-direction: column; gap: 6px; padding: 14px 6px; font-size: .86rem; min-height: 84px; }
.msg-pv { white-space: pre-wrap; background: #E7F6EC; color: #173B26; border-radius: 4px 14px 14px 14px; padding: 12px 14px; font-size: .9rem; line-height: 1.45; word-break: break-word; }
@media (prefers-color-scheme: dark) { .msg-pv { background: #1B3A2A; color: #D7F0DF; } }

/* compose */
.snap { border-radius: var(--r-s); overflow: hidden; max-height: 280px; overflow-y: auto; border: 1px solid var(--line); }
.snap img { display: block; width: 100%; }
.check { display: flex; align-items: center; gap: 10px; margin: 16px 0 10px; font-weight: 600; cursor: pointer; }
.err { color: var(--absent); font-size: .92rem; min-height: 1.3em; margin: 8px 0; font-weight: 500; }

/* onboarding */
.ob { min-height: 100vh; display: flex; flex-direction: column; background: var(--brand); }
.ob-top { color: #fff; padding: 36px 26px 30px; position: relative; overflow: hidden; }
.ob-top::before { content: ""; position: absolute; width: 480px; height: 480px; left: 50%; top: -260px; margin-left: -240px; border-radius: 50%; background: radial-gradient(circle, rgba(245,184,61,.22), rgba(245,184,61,0) 62%); }
.ob-top > * { position: relative; }
.logo { width: 64px; height: 64px; border-radius: 20px; background: #fff; display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.25); margin-bottom: 22px; }
.ob-top h1 { margin: 0; font-size: 2rem; line-height: 1.12; letter-spacing: -.03em; font-weight: 800; }
.ob-top p { margin: 10px 0 0; opacity: .82; font-size: 1.02rem; max-width: 30em; }
.steps { display: flex; gap: 6px; margin-bottom: 22px; }
.steps i { height: 5px; flex: 1; max-width: 42px; border-radius: 3px; background: rgba(255,255,255,.25); }
.steps i.on { background: var(--accent); }
.ob-card { flex: 1; background: var(--bg); border-radius: 26px 26px 0 0; padding: 26px 22px calc(26px + env(safe-area-inset-bottom, 0px)); animation: up .45s var(--ease); }
.ob-card .inner { max-width: 440px; margin: 0 auto; }
.ob-card .fld { margin-bottom: 16px; font-size: .88rem; color: var(--ink); }
.pw { position: relative; }
.pw input { padding-right: 52px; }
.pw button { position: absolute; right: 4px; bottom: 4px; width: 44px; height: 40px; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.strength { display: flex; gap: 4px; margin-top: 8px; }
.strength i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); transition: background .3s; }
.co-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.co-chips span { background: rgba(255,255,255,.14); padding: 5px 11px; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.small-links { text-align: center; margin-top: 14px; }

/* install guide */
.inst { display: grid; gap: 12px; }
.inst-step { display: flex; gap: 14px; align-items: center; background: var(--surface); border-radius: var(--r-m); padding: 14px; box-shadow: var(--shadow); }
.inst-n { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-2); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.inst-step p { margin: 0; flex: 1; }
.inst-step .glyph { width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; color: #0A84FF; flex: none; }
.phone { width: 150px; margin: 4px auto 20px; border-radius: 26px; background: var(--brand); padding: 12px 10px 18px; box-shadow: 0 16px 40px rgba(11,58,66,.3); }
.phone-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.phone-grid i { aspect-ratio: 1; border-radius: 8px; background: rgba(255,255,255,.12); }
.phone-grid i.me { background: #fff; display: grid; place-items: center; animation: pop 1.6s var(--ease) infinite alternate; }
@keyframes pop { from { transform: scale(.9); } to { transform: scale(1.06); box-shadow: 0 0 0 4px var(--accent); } }

#toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); opacity: 0; z-index: 60; background: var(--ink); color: var(--bg);
  padding: 12px 18px; border-radius: 999px; font-size: .93rem; font-weight: 600; max-width: 92vw; display: flex; gap: 8px; align-items: center; transition: all .3s var(--ease); pointer-events: none; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast svg { color: var(--in); flex: none; }
body:not(.is-offline) .offline { display: none; }
.offline { background: var(--late); color: #fff; font-size: .82rem; font-weight: 600; text-align: center; padding: 5px; }
