:root {
  --bg: #f6f6f4;
  --surface: #ffffff;
  --surface-2: #efefed;
  --text: #141414;
  --muted: #76766f;
  --line: #e4e4e0;
  --accent: #141414;
  --accent-ink: #ffffff;
  --accent-soft: #ebebe8;
  --ok: #141414;
  --ok-soft: #ebebe8;
  --offer: #f1f1ee;
  --danger: #b3261e;
  --radius: 14px;
  --shadow: none;
  --shadow-lg: 0 12px 40px rgb(0 0 0 / .14);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f0f;
    --surface: #181818;
    --surface-2: #232323;
    --text: #f2f2ef;
    --muted: #9a9a94;
    --line: #2b2b2a;
    --accent: #f2f2ef;
    --accent-ink: #0f0f0f;
    --accent-soft: #262625;
    --ok: #f2f2ef;
    --ok-soft: #262625;
    --offer: #232323;
    --danger: #ff8a80;
    --shadow: none;
    --shadow-lg: 0 12px 40px rgb(0 0 0 / .6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Thai", "Sukhumvit Set", Tahoma, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
}
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
p { margin: 0; }
button { cursor: pointer; }

.ic { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.inline { width: 18px; height: 18px; vertical-align: -3px; }
.ic.chev { transform: rotate(180deg); width: 18px; height: 18px; color: var(--muted); }
.ic.big-ic { width: 40px; height: 40px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.02em; }
.big { font-size: 20px; font-weight: 650; }
.grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.center-text { text-align: center; }
.selectable { user-select: all; -webkit-user-select: all; word-break: break-all; }
.pad-sm { padding: 6px 4px; }
.hidden-input { position: fixed; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.logo-img { display: block; object-fit: contain; user-select: none; -webkit-user-select: none; }
.join-logo { margin: 0 auto; filter: drop-shadow(0 8px 18px rgb(10 99 230 / .28)); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- shell: header + tabs + page ---------- */
.shell { min-height: 100dvh; }
.bar {
  position: sticky; top: 0; z-index: 6;
  display: flex; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  max-width: 680px; margin: 0 auto;
}
.bar-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.bar-title b { font-size: 19px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--accent); font-weight: 600; font-size: 15px; }
.pill .ic { width: 20px; height: 20px; }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 8;
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 6px 8px calc(env(safe-area-inset-bottom) + 6px);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tab { border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 4px; color: var(--muted); font-size: 13.5px; font-weight: 600; border-radius: 14px; }
.tab.on { color: var(--accent); }
.tab-ic { position: relative; width: 56px; height: 30px; display: grid; place-items: center; border-radius: 999px; transition: background .15s; }
.tab.on .tab-ic { background: var(--accent-soft); }
.badge { position: absolute; top: -4px; right: 6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }

.wrap { max-width: 680px; margin: 0 auto; padding: 8px 16px calc(env(safe-area-inset-bottom) + 110px); }
.stack { display: flex; flex-direction: column; gap: 22px; }
.items { display: flex; flex-direction: column; gap: 10px; }

@media (min-width: 760px) {
  /* wide screens: tabs sit under the header as a segmented control */
  .tabs { position: sticky; top: 64px; bottom: auto; max-width: 400px; margin: 0 auto 6px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
  .tab { flex-direction: row; justify-content: center; gap: 8px; padding: 8px 0; border-radius: 999px; }
  .tab-ic { width: 26px; height: 26px; background: transparent !important; }
  .tab.on { background: var(--accent-soft); }
  .badge { top: -6px; right: -8px; }
  .wrap { padding-bottom: 60px; }
}

/* ---------- numbered steps ---------- */
.stephead { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.stephead h2 { font-size: 20px; font-weight: 700; }
.num { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 16px; display: grid; place-items: center; }
.num .ic { width: 18px; height: 18px; stroke-width: 2.6; }
.stephead.done .num { background: var(--ok); color: #fff; }
.stephead.todo .num { background: var(--surface-2); color: var(--muted); }
.stephead.todo h2 { color: var(--muted); }
.step.locked .acts, .step.locked .drop { opacity: .5; }

/* step 1: choose a person */
.people { display: flex; flex-wrap: wrap; gap: 8px 6px; }
.person { width: 96px; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px 6px; border-radius: 18px; }
.person:active { transform: scale(.96); }
.person-av { position: relative; padding: 4px; border-radius: 50%; border: 3px solid transparent; transition: border-color .15s; }
.person.on .person-av { border-color: var(--accent); }
.person-name { font-size: 15px; font-weight: 600; text-align: center; line-height: 1.25; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.person.on .person-name { color: var(--accent); }
.tick { position: absolute; right: -2px; bottom: -2px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); border: 3px solid var(--bg); display: grid; place-items: center; }
.tick .ic { width: 14px; height: 14px; stroke-width: 3; }

/* step 2: what to send */
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 124px; padding: 14px 10px; border-radius: var(--radius); border: 0; background: var(--surface); box-shadow: var(--shadow); color: var(--accent); text-align: center; }
.act:not(:disabled):active { transform: scale(.97); }
.act:disabled { cursor: not-allowed; }
.act .ic { width: 36px; height: 36px; }
.act b { color: var(--text); font-size: 17px; }
.act .small { color: var(--muted); }
.drop { margin-top: 12px; padding: 18px 12px; border: 2px dashed var(--line); border-radius: var(--radius); text-align: center; color: var(--muted); font-size: 15px; transition: border-color .12s, background .12s; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* ---------- avatars ---------- */
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; background: linear-gradient(145deg, hsl(var(--h, 215) 80% 94%), hsl(var(--h, 215) 70% 86%)); color: hsl(var(--h, 215) 70% 32%); }
.avatar.big { width: 64px; height: 64px; background: linear-gradient(150deg, hsl(var(--h, 215) 95% 62%), hsl(var(--h, 215) 90% 40%)); color: #fff; box-shadow: 0 6px 14px hsl(var(--h, 215) 90% 40% / .32); }
.avatar.big .ic { width: 30px; height: 30px; }
.avatar.all { background: linear-gradient(150deg, #6ee7ff, #0a63e6); color: #fff; }
@media (prefers-color-scheme: dark) { .avatar:not(.big):not(.all) { background: hsl(var(--h, 215) 40% 24%); color: hsl(var(--h, 215) 90% 80%); } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 14px; border: 0; font-weight: 650; background: var(--surface-2); transition: transform .08s ease, opacity .15s; text-decoration: none; color: var(--text); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary.ok { background: var(--ok); color: #fff; }
.btn.light { background: var(--surface); color: var(--accent); box-shadow: var(--shadow); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.block { width: 100%; }
.btn.big-btn { min-height: 54px; font-size: 18px; border-radius: 16px; }
.btn.small { min-height: 38px; padding: 0 14px; font-size: 15px; border-radius: 12px; }
.btn.small .ic { width: 17px; height: 17px; }
.btn.danger { color: var(--danger); }
.btn.danger-bg { background: var(--danger); color: #fff; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: var(--accent); }
.icon-btn.danger { color: var(--danger); }
.icon-btn:active { background: var(--surface-2); }
.btnrow { display: flex; gap: 10px; }
.btnrow .btn { flex: 1; }
.chips { display: flex; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--surface); height: 38px; padding: 0 16px; border-radius: 999px; font-weight: 600; font-size: 15px; color: var(--muted); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- join / welcome ---------- */
.center { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.center.top { place-items: start center; padding-top: calc(env(safe-area-inset-top) + 32px); }
.join { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 14px; text-align: center; }
.join h1 { font-size: 26px; font-weight: 750; letter-spacing: -0.01em; }
.join .btn.primary { box-shadow: 0 6px 16px rgb(10 99 230 / .28); }
form { display: flex; flex-direction: column; gap: 6px; text-align: left; margin-top: 4px; }
label { font-size: 16px; font-weight: 650; margin-top: 8px; }
input:not([type]), input[type=text] { width: 100%; min-height: 54px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); font-size: 18px; }
input:focus { outline: 3px solid var(--accent-soft); outline-offset: 0; border-color: var(--accent); }
form .btn { margin-top: 14px; }
.err { color: var(--danger); font-size: 15px; min-height: 1.2em; }
.with-btn { display: flex; gap: 8px; }
.with-btn input { flex: 1; min-width: 0; }
.ok-line { display: flex; align-items: center; gap: 8px; color: var(--ok); font-weight: 650; margin: 6px 0 0; }
.cards { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.stepcard { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stepcard h2 { font-size: 18px; margin-bottom: 4px; }
.stepcard .small-body { color: var(--muted); font-size: 15.5px; line-height: 1.55; }
.stepcard .btn { margin-top: 12px; }
.stepcard.done .num { background: var(--ok); }
.cards > .steps { background: var(--surface); border-radius: var(--radius); padding: 18px 16px; box-shadow: var(--shadow); }

.stepper { list-style: none; display: flex; margin: 4px 0 8px; padding: 0; }
.stepper li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; font-size: 13px; color: var(--muted); font-weight: 600; }
.stepper li::before { content: ''; position: absolute; top: 14px; right: 50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.stepper li:first-child::before { display: none; }
.stepper .dot { position: relative; z-index: 1; width: 29px; height: 29px; border-radius: 50%; background: var(--surface-2); color: var(--muted); display: grid; place-items: center; font-size: 14px; }
.stepper .dot .ic { width: 16px; height: 16px; stroke-width: 3; }
.stepper li.cur { color: var(--accent); }
.stepper li.cur .dot { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 5px var(--accent-soft); }
.stepper li.done { color: var(--ok); }
.stepper li.done .dot { background: var(--ok); color: #fff; }
.stepper li.done::before, .stepper li.cur::before { background: var(--ok); }

.steps { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.steps li { display: flex; gap: 12px; align-items: flex-start; }
.steps .num { width: 28px; height: 28px; font-size: 15px; margin-top: 0; }

/* ---------- cards, lists ---------- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.empty { padding: 30px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.empty h2 { font-size: 21px; }
.section { font-size: 15px; color: var(--muted); font-weight: 650; margin: 4px 4px 10px; }
.list { display: flex; flex-direction: column; }
.list.card { padding: 4px 0; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 64px; border: 0; background: transparent; text-align: left; width: 100%; }
button.row { border-radius: 12px; }
button.row:active { background: var(--surface-2); }
.list.card .row + .row { border-top: 1px solid var(--line); }
.row.setting b { font-weight: 650; }
.row .grow b + span { margin-top: 1px; }
.fp { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
details.safety { padding: 14px 16px; }
details summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; align-items: center; justify-content: space-between; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: '+'; font-size: 22px; color: var(--muted); }
details[open] summary::after { content: '–'; }
details.safety p { margin: 8px 0; }
details.more { margin-top: 4px; }
details.more summary { font-size: 15px; color: var(--accent); }

/* switch */
.switch { margin: 0; cursor: pointer; display: inline-flex; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.track-sw { width: 50px; height: 30px; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; }
.track-sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .3); transition: transform .15s; }
.switch input:checked + .track-sw { background: var(--ok); }
.switch input:checked + .track-sw::after { transform: translateX(20px); }
.switch input:focus-visible + .track-sw { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- transfers ---------- */
.item { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.item-top { display: flex; gap: 12px; align-items: center; }
.item .dir { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.item .dir .ic { width: 20px; height: 20px; }
.item.done .dir { background: var(--ok-soft); color: var(--ok); }
.item.failed .dir { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--danger); }
.item .name { font-weight: 650; }
.status { color: var(--ok); font-weight: 600; }
.status.bad { color: var(--danger); }
.item-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.item-actions:empty { display: none; }
.textbox { padding: 10px 12px; background: var(--surface-2); border-radius: 12px; white-space: pre-wrap; word-break: break-word; font-size: 16px; max-height: 10em; overflow: auto; }
progress { width: 100%; height: 8px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--surface-2); }
progress::-webkit-progress-value { background: var(--accent); border-radius: 4px; transition: width .2s; }
progress::-moz-progress-bar { background: var(--accent); }

.track { list-style: none; display: flex; margin: 0; padding: 0; }
.track li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; font-size: 13px; color: var(--muted); text-align: center; }
.track li::before { content: ''; position: absolute; top: 10px; right: 50%; width: 100%; height: 3px; background: var(--line); }
.track li:first-child::before { display: none; }
.track .dot { position: relative; z-index: 1; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--line); display: grid; place-items: center; color: #fff; }
.track .dot .ic { width: 13px; height: 13px; stroke-width: 3.2; }
.track li.cur { color: var(--accent); font-weight: 650; }
.track li.cur .dot { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); }
.track li.done { color: var(--ok); font-weight: 600; }
.track li.done .dot { background: var(--ok); border-color: var(--ok); }
.track li.done::before, .track li.cur::before { background: var(--ok); }
.track.failed li { color: var(--muted); }

/* ---------- sheets, dialogs, offer ---------- */
.sheet-bg { position: fixed; inset: 0; z-index: 20; background: rgb(5 15 40 / .45); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.sheet-bg.center { align-items: center; padding: 16px; }
.sheet { width: 100%; max-width: 520px; max-height: 85dvh; overflow: auto; background: var(--surface); border-radius: 26px 26px 0 0; padding: 8px 16px calc(env(safe-area-inset-bottom) + 16px); display: flex; flex-direction: column; gap: 12px; animation: up .25s ease; }
.sheet h2 { font-size: 19px; padding: 4px 6px 6px; }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 6px; }
.offer-bg { z-index: 30; }
.offer-who { display: flex; align-items: center; gap: 14px; }
.offer-file { display: flex; gap: 10px; align-items: center; background: var(--surface-2); padding: 12px 14px; border-radius: 14px; }
.offer-sheet .check { margin: 0; }
.dialog { width: 100%; max-width: 400px; max-height: 92dvh; overflow: auto; background: var(--surface); border-radius: 24px; padding: 22px 20px 18px; display: flex; flex-direction: column; gap: 14px; animation: pop .2s ease; }
.dialog.wide { max-width: 440px; }
.dialog h2 { font-size: 21px; }
.dialog .dh { font-size: 16px; margin-top: 4px; color: var(--accent); }
.dialog p { line-height: 1.55; }
.actions { display: flex; justify-content: flex-end; gap: 8px; }
.box { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.check { display: flex; gap: 12px; align-items: center; font-weight: 500; margin: 0; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
textarea { width: 100%; border: 1.5px solid var(--line); background: var(--surface-2); border-radius: 14px; padding: 12px 14px; resize: vertical; min-height: 120px; font-size: 17px; }
textarea:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
.qr-wrap { display: grid; place-items: center; }
.qr { width: 220px; height: 220px; border-radius: 16px; box-shadow: 0 0 0 1px var(--line); }
.wait { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); color: var(--muted); font-size: 15px; }
.wait.ok { background: var(--ok-soft); color: var(--ok); font-weight: 650; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: rot 1s linear infinite; flex: none; }
@keyframes rot { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
@keyframes pop { from { transform: translateY(-6px); opacity: 0; } }

.banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); margin-bottom: 12px; }
.banner.err { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); }
.banner .ic { color: var(--danger); margin-top: 2px; }

.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 96px); transform: translate(-50%, 20px); background: var(--text); color: var(--bg); padding: 12px 20px; border-radius: 999px; font-size: 15px; opacity: 0; pointer-events: none; transition: .25s; z-index: 40; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* =====================================================================
   Minimal: flat surfaces, hairline borders, monochrome
   ===================================================================== */
body { font-size: 16px; }
.join-logo { filter: none; }
.card, .item, .act, .stepcard, .cards > .steps, details.safety { border: 1px solid var(--line); box-shadow: none; }
.item, .act, .stepcard, .cards > .steps, .card, details.safety { border-radius: 14px; }
.list.card { padding: 0; overflow: hidden; }

/* header + tabs */
.bar { background: color-mix(in srgb, var(--bg) 92%, transparent); border-bottom: 1px solid transparent; }
.bar-title b { font-size: 18px; letter-spacing: -0.01em; }
.pill { border-radius: 10px; height: 34px; padding: 0 12px 0 9px; font-weight: 600; font-size: 14px; color: var(--text); background: transparent; border: 1px solid var(--line); }
.tabs { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; border-top: 1px solid var(--line); padding: 4px 8px calc(env(safe-area-inset-bottom) + 4px); }
.tab { border-radius: 10px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.tab-ic { width: 40px; height: 28px; }
.tab.on { color: var(--text); }
.tab.on .tab-ic { background: transparent; }
.tab.on::after { content: ''; width: 18px; height: 2px; border-radius: 2px; background: var(--text); margin-top: 1px; }
.tab:not(.on)::after { content: ''; height: 2px; margin-top: 1px; }
.badge { background: var(--text); color: var(--bg); }
@media (min-width: 760px) {
  .tabs { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); max-width: 360px; padding: 3px; }
  .tab { flex-direction: row; justify-content: center; }
  .tab.on { background: var(--surface-2); }
  .tab.on::after, .tab:not(.on)::after { display: none; }
}

/* steps: numbers in outlined circles */
.num { background: var(--text); color: var(--bg); font-weight: 650; }
.stephead.done .num { background: transparent; color: var(--text); border: 1.5px solid var(--text); }
.stephead.todo .num { background: transparent; color: var(--muted); border: 1.5px solid var(--line); }
.stephead h2 { font-size: 18px; font-weight: 650; letter-spacing: -0.01em; }
.stepcard.done .num { background: transparent; color: var(--text); border: 1.5px solid var(--text); }
.step.locked .acts, .step.locked .drop { opacity: .45; }

/* people: monochrome avatars */
.avatar, .avatar.big, .avatar.all { background: var(--surface-2); color: var(--text); box-shadow: none; border: 1px solid var(--line); }
.avatar.big { width: 60px; height: 60px; }
.avatar.big .ic { width: 28px; height: 28px; }
.avatar.all { background: var(--text); color: var(--bg); border-color: var(--text); }
.person-av { padding: 3px; border-width: 2px; }
.person.on .person-av { border-color: var(--text); box-shadow: none; }
.person.on .person-name { color: var(--text); font-weight: 700; }
.tick { background: var(--text); color: var(--bg); border: 2px solid var(--bg); box-shadow: none; }

/* what to send */
.act { color: var(--text); background: var(--surface); box-shadow: none; }
.act:not(:disabled):hover { border-color: var(--text); }
.act .ic { stroke-width: 1.6; }
.drop { border: 1.5px dashed var(--line); border-radius: 14px; background: transparent; }
.drop.over { border-color: var(--text); background: var(--surface-2); color: var(--text); }

/* buttons */
.btn { border-radius: 12px; font-weight: 600; background: var(--surface-2); color: var(--text); }
.btn.primary { background: var(--text); color: var(--bg); border: 0; box-shadow: none; }
.btn.primary.ok { background: var(--text); color: var(--bg); }
.btn.light { background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost { color: var(--text); background: transparent; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.btn.danger { color: var(--danger); }
.btn.danger-bg { background: var(--danger); color: #fff; box-shadow: none; }
.btn.big-btn, .btn.small { border-radius: 12px; }
.join .btn.primary { box-shadow: none; }
.icon-btn { color: var(--text); }
.icon-btn.danger { color: var(--danger); }
.chip { border-radius: 999px; background: transparent; color: var(--muted); box-shadow: none; }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); box-shadow: none; }

/* stepper + transfer tracker */
.stepper li.cur .dot { background: var(--text); color: var(--bg); box-shadow: none; }
.stepper li.cur { color: var(--text); }
.stepper li.done { color: var(--text); }
.stepper li.done .dot { background: var(--bg); color: var(--text); border: 1.5px solid var(--text); }
.stepper li.done::before, .stepper li.cur::before { background: var(--text); }
.track li.cur { color: var(--text); }
.track li.cur .dot { border-color: var(--text); background: var(--bg); box-shadow: none; }
.track li.done { color: var(--text); }
.track li.done .dot { background: var(--text); border-color: var(--text); }
.track li.done::before, .track li.cur::before { background: var(--text); }
.ok-line { color: var(--text); }
.status { color: var(--text); }
.item .dir, .item.done .dir { background: var(--surface-2); color: var(--text); box-shadow: none; }
.item.failed .dir { background: var(--surface-2); color: var(--danger); }
.item-top .name { font-weight: 600; }
progress::-webkit-progress-value { background: var(--text); }
progress::-moz-progress-bar { background: var(--text); }
progress { height: 4px; box-shadow: none; }

/* inputs, switch */
input:not([type]), input[type=text], textarea { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: none; }
input:focus, textarea:focus { outline: 2px solid var(--text); outline-offset: 0; border-color: var(--text); }
.check input { accent-color: var(--text); }
.switch input:checked + .track-sw { background: var(--text); }
.switch .track-sw { background: var(--line); box-shadow: none; }
.switch input:checked + .track-sw::after { background: var(--bg); }
.switch input:focus-visible + .track-sw, :focus-visible { outline-color: var(--text); }

/* sheets, dialogs, toast */
.sheet-bg { background: rgb(0 0 0 / .38); backdrop-filter: none; -webkit-backdrop-filter: none; }
.sheet { width: 100%; margin: 0; border-radius: 20px 20px 0 0; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: var(--shadow-lg); padding: 8px 16px calc(env(safe-area-inset-bottom) + 16px); }
.dialog { border-radius: 18px; background: var(--surface); border: 1px solid var(--line); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: var(--shadow-lg); }
.dialog .dh { color: var(--text); font-weight: 650; }
.offer-file, .wait, .wait.ok { background: var(--surface-2); border: 0; backdrop-filter: none; }
.wait.ok { color: var(--text); font-weight: 600; }
.spin { border-top-color: var(--text); }
.qr { box-shadow: 0 0 0 1px var(--line); border-radius: 10px; }
.banner.err { background: var(--surface-2); border: 1px solid var(--line); }
.toast { background: var(--text); color: var(--bg); border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; bottom: calc(env(safe-area-inset-bottom) + 84px); }
details summary, details.more summary { color: var(--text); }
.row.setting b { font-weight: 600; }
