@font-face {
  font-family: "Geist";
  src: url("geist.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --row: #f4f4f5;
  --row-2: #eaeaec;
  --hover: #ededf0;
  --divider: #e4e4e7;
  --text: #111111;
  --text-2: #6b6b70;
  --text-3: #9a9aa0;
  --green: #30c65b;
  --green-text: #18803c;
  --green-soft: rgba(48, 198, 91, 0.07);
  --red: #d93025;
  --amber: #a15c00;
  --track: #eaeaec;
  --grabber: #d4d4d8;
  --switch-off: #dcdce0;
  --knob: #ffffff;
  --primary: #111111;
  --on-primary: #ffffff;
  --primary-hover: #2a2a2a;
  --scrim: rgba(0, 0, 0, 0.32);
  --tabbar: rgba(255, 255, 255, 0.92);
  --sheet-edge: transparent;
  --base: #c9c9ce;
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --nt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='20'%3E%3Cpath fill-rule='evenodd' d='M0 0H52V20H0Z M6 0H24A4 4 0 0 0 20 4V11A5 5 0 0 1 10 11V4A4 4 0 0 0 6 0Z'/%3E%3C/svg%3E");
  --nb: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='20'%3E%3Cpath fill-rule='evenodd' d='M0 0H52V20H0Z M6 20H24A4 4 0 0 1 20 16V9A5 5 0 0 0 10 9V16A4 4 0 0 1 6 20Z'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --row: #1c1c1e;
    --row-2: #2c2c2e;
    --hover: #232326;
    --divider: #2e2e31;
    --text: #f5f5f7;
    --text-2: #98989f;
    --text-3: #6c6c72;
    --green: #30d158;
    --green-text: #30d158;
    --green-soft: rgba(48, 209, 88, 0.12);
    --red: #ff453a;
    --amber: #ff9f0a;
    --track: #2c2c2e;
    --grabber: #48484a;
    --switch-off: #39393d;
    --knob: #ffffff;
    --primary: #f5f5f7;
    --on-primary: #000000;
    --primary-hover: #ffffff;
    --scrim: rgba(0, 0, 0, 0.6);
    --tabbar: rgba(28, 28, 30, 0.92);
    --sheet-edge: #2e2e31;
    --base: #3a3a3c;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  font-size: 15px;
  line-height: 20px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
body.sheet-open { overflow: hidden; }
h1, h2, h3, h4, p { margin: 0; font-weight: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-user-select: none; user-select: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }

.i { display: inline-flex; width: 20px; height: 20px; flex: none; }
.i svg, .mark { width: 100%; height: 100%; display: block; }
.muted { color: var(--text-2); }
.small { font-size: 13px; line-height: 18px; }
.center { text-align: center; }
.mono { font-family: var(--mono); letter-spacing: 0.02em; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; }

/* ---------- Ticket notch ---------- */
.notch {
  -webkit-mask: var(--nt) right top / 52px 20px no-repeat, var(--nb) right bottom / 52px 20px no-repeat, linear-gradient(#000 0 0) left top / calc(100% - 51px) 100% no-repeat, linear-gradient(#000 0 0) right center / 100% calc(100% - 38px) no-repeat;
  mask: var(--nt) right top / 52px 20px no-repeat, var(--nb) right bottom / 52px 20px no-repeat, linear-gradient(#000 0 0) left top / calc(100% - 51px) 100% no-repeat, linear-gradient(#000 0 0) right center / 100% calc(100% - 38px) no-repeat;
}

/* ---------- App shell (phone) ---------- */
#app { min-height: 100dvh; display: flex; flex-direction: column; }

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  min-height: calc(var(--safe-t) + 52px);
  padding: calc(var(--safe-t) + 8px) calc(var(--safe-r) + 16px) 8px calc(var(--safe-l) + 16px);
  background: var(--bg);
}
.top > .grow { display: none; }
body[data-view="activity"] .only-devices, body[data-view="devices"] .only-activity { display: none !important; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: var(--row);
  color: var(--text);
  transition: background 0.15s ease, transform 0.12s ease;
}
.icon-btn .i { width: 18px; height: 18px; }
.icon-btn:active { transform: scale(0.94); }
.icon-btn.small { width: 30px; height: 30px; }
.icon-btn.small .i { width: 14px; height: 14px; }
.icon-btn.small .i svg { stroke-width: 2.4; }
.text-btn { border: 0; background: none; padding: 6px 2px; font-size: 17px; line-height: 22px; font-weight: 500; color: var(--text); }

.main {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 calc(var(--safe-r) + 16px) calc(var(--safe-b) + 112px) calc(var(--safe-l) + 16px);
  flex: 1;
}
body[data-view="devices"] .v-activity, body[data-view="activity"] .v-devices { display: none; }

.big-title { font-size: 32px; line-height: 38px; font-weight: 600; letter-spacing: -0.025em; }
.status-line, .status { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text-2); }
.status-line { margin-top: 4px; padding: 0; border: 0; background: none; font-size: 15px; line-height: 20px; text-align: left; }
.st-ic { display: inline-flex; width: 12px; height: 12px; flex: none; color: var(--green); }
.st-ic.off { color: var(--text-3); }
.st-ic.off::before { content: ""; width: 8px; height: 8px; margin: 2px; border-radius: 50%; background: currentColor; }
.st-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sec-label { margin: 24px 16px 8px; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--text-2); display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.sec-label:first-child { margin-top: 20px; }

/* ---------- Grouped rows ---------- */
.group { position: relative; background: var(--row); border-radius: 12px; overflow: hidden; }
.row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 52px;
  padding: 8px 46px 8px 16px;
  border: 0;
  background: none;
  color: var(--text);
  text-align: left;
  font-size: 17px;
  line-height: 22px;
  --div-l: 16px;
}
.row.has-ic { --div-l: 52px; }
.row + .row::before, .row + .rows::before, .rows + .row::before { content: ""; position: absolute; top: 0; left: var(--div-l); right: 0; height: 1px; background: var(--divider); }
button.row { cursor: pointer; transition: background 0.15s; }
button.row:active { background: var(--row-2); }
.row > .i { width: 22px; height: 22px; color: var(--text); }
.row > .i svg { stroke-width: 1.75; }
.row > .chev { width: 16px; height: 16px; color: var(--text-3); margin-left: auto; }
.row > .chev svg { stroke-width: 2.2; }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row-text strong { font-weight: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-text small { font-size: 13px; line-height: 18px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .val { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 6px; color: var(--text-2); white-space: nowrap; overflow: hidden; }
.row .val > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.row .label { white-space: nowrap; }
.row .label.wrap { flex: 1; white-space: normal; }
.row.danger { color: var(--red); }
.row.danger > .i { color: var(--red); }
.row.sub-row { --div-l: 16px; }
.row input.inline { flex: 1; min-width: 0; border: 0; background: none; padding: 0; text-align: right; color: var(--text-2); font-size: 17px; line-height: 22px; outline: none; }
.row input.inline:focus { color: var(--text); }
.row select.inline { border: 0; background: none; color: var(--text-2); font-size: 17px; text-align: right; outline: none; }
.badge-ext {
  width: 34px; height: 34px; flex: none; border-radius: 8px; background: var(--bg); color: var(--text-2);
  display: grid; place-items: center; overflow: hidden; font-size: 10px; line-height: 12px; font-weight: 600; letter-spacing: 0.03em;
}
.badge-ext .i { width: 16px; height: 16px; }
.badge-ext .i svg { stroke-width: 1.75; }
.badge-ext img { width: 100%; height: 100%; object-fit: cover; }
.file-row { min-height: 52px; gap: 12px; --div-l: 62px; font-size: 15px; line-height: 20px; }
.file-row .size { color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.file-row .name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.more-row { min-height: 44px; font-size: 15px; font-weight: 500; justify-content: space-between; --div-l: 62px; }

/* ---------- Devices ---------- */
.dev-list { display: flex; flex-direction: column; }
.dev-row { min-height: 64px; gap: 12px; padding-top: 0; padding-bottom: 0; --div-l: 60px; }
.dev-ic { display: inline-flex; width: 32px; height: 32px; flex: none; color: var(--text-2); }
.dev-ic svg { width: 100%; height: 100%; }
.dev-row .row-text strong { font-weight: 500; letter-spacing: -0.01em; }
.dev-row small.active { color: var(--green-text); font-weight: 500; }
.dev-row.off .dev-ic, .dev-row.off .row-text { opacity: 0.5; }
.dev-acts, .drop-label { display: none; }
.dev-item { position: relative; }
.dev-item + .dev-item .row::before { content: ""; position: absolute; top: 0; left: var(--div-l); right: 0; height: 1px; background: var(--divider); }
.dev-item.dragging .row { background: var(--green-soft); box-shadow: inset 0 0 0 1.5px var(--green); }

.empty-state { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 36px; padding: 0 4px; }
.empty-state h2 { margin-top: 16px; font-size: 17px; line-height: 24px; font-weight: 600; }
.empty-hint { font-size: 15px; line-height: 20px; color: var(--text-2); }
.empty-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.empty-state:not([hidden]) + .dev-list .sec-label:first-child { margin-top: 32px; }
.seek { position: relative; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--row); color: var(--text-3); }
.seek .i { width: 24px; height: 24px; }
.seek .i svg { stroke-width: 1.75; }
.seeking .seek { color: var(--green-text); }
.seeking .seek::before, .seeking .seek::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--green); opacity: 0; animation: seek 2.4s ease-out infinite; }
.seeking .seek::after { animation-delay: 1.2s; }
@keyframes seek { 0% { transform: scale(1); opacity: 0.55; } 100% { transform: scale(1.6); opacity: 0; } }

/* send first: pick files, then tap a device */
.send-bar { margin-top: 20px; }
.send-bar > .btn { width: 100%; }
.sel-card { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 24px 10px 12px; }
.sel-card .row-text strong { font-weight: 500; }
.sel-card .row-text small { white-space: normal; }
.sel-card .link { flex: none; padding: 6px 0; }

.install { display: flex; align-items: flex-start; gap: 12px; margin-top: 16px; padding: 14px 46px 14px 16px; }
.install .lead-ic { width: 22px; height: 22px; margin-top: 1px; }
.install .lead-ic svg { stroke-width: 1.75; }
.ib-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.ib-text strong { font-weight: 500; }
.ib-note { font-size: 13px; line-height: 18px; color: var(--text-2); }
.install .icon-btn { background: var(--bg); }

.link { border: 0; background: none; padding: 0; font-size: 15px; line-height: 20px; font-weight: 600; color: var(--text); text-decoration: none; cursor: pointer; }
.link.danger { color: var(--red); }
.links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 4px; }

/* live transfer card on Devices (phone) */
.live { display: flex; flex-direction: column; gap: 10px; }
.live:not(:empty) { margin-top: 16px; }
.live-card { display: block; width: 100%; padding: 14px 46px 14px 16px; border: 0; border-radius: 12px; background: var(--row); color: var(--text); text-align: left; transition: transform 0.14s ease; }
.live-card:active { transform: scale(0.98); }
.lc-top { display: flex; align-items: baseline; gap: 10px; }
.lc-top strong { flex: 1; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-top span { color: var(--text-2); font-variant-numeric: tabular-nums; }
.live-card .bar { margin-top: 10px; }
.lc-sub { display: block; margin-top: 8px; font-size: 13px; line-height: 18px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-sub.err { color: var(--red); }

.bar { height: 4px; border-radius: 2px; background: var(--track); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: var(--green); transition: width 0.3s linear; }
.bar.grey > span { background: var(--text-3); }
.bar.thick { height: 6px; border-radius: 3px; background: var(--row); }

/* ---------- Activity ---------- */
.act-head { display: flex; align-items: center; gap: 12px; }
.act-head h2 { flex: 1; }
.act-empty { margin-top: 20px; font-size: 15px; color: var(--text-2); }
.transfers:not(:empty) + .act-empty { display: none; }
.tr { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 12px 46px 12px 16px; }
.tr + .tr::before { content: ""; position: absolute; top: 0; left: 52px; right: 0; height: 1px; background: var(--divider); }
.tr-ic { width: 24px; height: 22px; display: grid; place-items: center; flex: none; color: var(--text-2); }
.tr-ic .i { width: 18px; height: 18px; }
.tr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tr-top { display: flex; align-items: baseline; gap: 10px; }
.tr-top h3 { flex: 1; min-width: 0; font-size: 17px; line-height: 22px; font-weight: 500; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-aside { flex: none; font-size: 13px; line-height: 18px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.tr-sub { font-size: 13px; line-height: 18px; color: var(--text-2); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tr-sub.err { color: var(--red); }
.st-transferring .tr-sub, .st-done .tr-sub, .st-connecting .tr-sub, .st-waiting .tr-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-sub.warn { color: var(--amber); }
.tr .bar { margin-top: 8px; height: 3px; }
.tr-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; line-height: 18px; color: var(--text-2); font-variant-numeric: tabular-nums; margin-top: 4px; }
.tr-sas { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 13px; line-height: 18px; color: var(--text-2); }
.tr-sas b { font-family: var(--mono); font-weight: 600; letter-spacing: 0.06em; color: var(--text); font-size: 15px; }
.bubble { margin-top: 6px; padding: 10px 12px; border-radius: 8px; background: var(--bg); font-size: 15px; line-height: 20px; white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow: auto; }
.tr.tappable { cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 25px;
  border: 0;
  font-size: 17px;
  line-height: 22px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  background: var(--row);
  color: var(--text);
  transition: transform 0.12s, opacity 0.2s, background 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.4; pointer-events: none; }
.btn .i { width: 18px; height: 18px; }
.btn.primary { color: var(--on-primary); background: var(--primary); }
.btn.secondary, .btn.soft { color: var(--text); background: var(--row); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); }
.btn.small { min-height: 36px; padding: 0 14px; border-radius: 18px; font-size: 15px; gap: 6px; }
.btn.small .i { width: 15px; height: 15px; }
.btn.ready { box-shadow: 0 0 0 3px rgba(48, 198, 91, 0.45); }
.btn.wide { width: 100%; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.row-actions > .btn { flex: 1 1 auto; min-width: 0; }
.sheet-actions { display: flex; gap: 12px; margin-top: 8px; }
.sheet-actions > .btn { flex: 1; min-width: 0; }

/* ---------- Tab bar (phone) ---------- */
.tabbar {
  position: fixed;
  left: calc(var(--safe-l) + 16px);
  right: calc(var(--safe-r) + 16px);
  bottom: calc(var(--safe-b) + 20px);
  z-index: 30;
  max-width: 568px;
  margin: 0 auto;
  display: flex;
  gap: 2px;
  height: 60px;
  padding: 5px;
  border-radius: 30px;
  background: var(--tabbar);
  border: 1px solid var(--divider);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.tab {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  border-radius: 26px;
  background: transparent;
  color: var(--text-2);
  font-size: 10.5px;
  line-height: 12px;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}
.tab .i { width: 22px; height: 22px; }
.tab .i svg { stroke-width: 1.75; }
.tab.on { background: var(--row-2); color: var(--text); }
.tab > span:not(.i) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge {
  position: absolute;
  top: 4px;
  left: calc(50% + 5px);
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 8.5px;
  background: var(--red);
  color: #ffffff;
  font-size: 11px;
  line-height: 17px;
  font-weight: 600;
  text-align: center;
}

/* ---------- Sheets (phone) ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.backdrop { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity 0.25s; }
.sheet {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: calc(100dvh - var(--safe-t) - 44px);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: 28px 28px 0 0;
  box-shadow: inset 0 1px 0 var(--sheet-edge);
  transform: translateY(104%);
  transition: transform 0.32s cubic-bezier(0.2, 0.9, 0.25, 1);
}
.sheet.tall { min-height: min(86dvh, 760px); }
.sheet-wrap.show .backdrop { opacity: 1; }
.sheet-wrap.show .sheet { transform: none; }
.grabber { align-self: center; width: 32px; height: 4px; border-radius: 2px; background: var(--grabber); margin-top: 10px; flex: none; }
.sheet-head { display: grid; grid-template-columns: 1fr auto; grid-template-areas: ". close" "titles titles"; grid-template-rows: 40px auto; padding: 0 16px; flex: none; }
.sheet-close { grid-area: close; align-self: center; }
.sheet-close.icon-btn { width: 30px; height: 30px; color: var(--text-2); }
.sheet-close.icon-btn .i { width: 14px; height: 14px; }
.sheet-close.icon-btn .i svg { stroke-width: 2.4; }
.sheet-close.text { border: 0; background: none; padding: 0 2px; font-size: 17px; line-height: 22px; font-weight: 500; color: var(--text); }
.sheet-titles { grid-area: titles; display: flex; align-items: center; gap: 14px; min-width: 0; }
.sheet-lead { display: inline-flex; width: 44px; height: 44px; flex: none; color: var(--text-2); }
.sheet-lead svg { width: 100%; height: 100%; }
.sheet-tt { min-width: 0; }
.sheet-tt h2 { font-size: 22px; line-height: 28px; font-weight: 600; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.sheet-tt p { font-size: 15px; line-height: 20px; color: var(--text-2); }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 20px 16px calc(var(--safe-b) + 24px); display: flex; flex-direction: column; gap: 16px; overscroll-behavior: contain; }
.sheet-body > div { display: flex; flex-direction: column; gap: 16px; }
.sheet-body .sec-label { margin: 4px 16px -8px; }
.notitle .sheet-titles { display: none; }
.request-sheet .sheet-close { visibility: hidden; }

/* page sheets (Recibidos / Ajustes on phones) */
.page-wrap { z-index: 25; align-items: stretch; }
.sheet.page {
  max-width: none;
  max-height: none;
  height: 100dvh;
  border-radius: 0;
  box-shadow: none;
  transform: none;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.page-wrap.show .sheet.page { opacity: 1; }
.sheet.page .sheet-head { display: block; width: 100%; max-width: 600px; margin: 0 auto; padding: calc(var(--safe-t) + 60px) calc(var(--safe-r) + 16px) 0 calc(var(--safe-l) + 16px); }
.sheet.page .sheet-tt h1 { font-size: 32px; line-height: 38px; font-weight: 600; letter-spacing: -0.025em; }
.sheet.page .sheet-body { width: 100%; max-width: 600px; margin: 0 auto; padding: 0 calc(var(--safe-r) + 16px) calc(var(--safe-b) + 112px) calc(var(--safe-l) + 16px); gap: 0; flex: 1; }
.sheet.page .sheet-body > div { gap: 0; }
.sheet.page .sheet-body .sec-label { margin: 24px 16px 8px; }
.sheet.page { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.sheet.page::-webkit-scrollbar { display: none; }
.sheet.page .sheet-body { overflow: visible; flex: none; }
.sheet.page .settings > .set-col:first-child > div.group:first-of-type { margin-top: 20px; }
.pair-side { width: 128px; }

.loading { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 36px 0; color: var(--text-2); text-align: center; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--row-2); border-top-color: var(--green); animation: spin 0.8s linear infinite; }
.spinner.small { width: 16px; height: 16px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.wait-row { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--text-2); font-size: 15px; }
.lead { font-size: 15px; line-height: 21px; color: var(--text); }
.warn-text { color: var(--red); font-size: 15px; line-height: 21px; }
.headline { font-size: 17px; line-height: 22px; font-weight: 600; text-align: center; }

/* transfer sheet */
.pair { display: flex; justify-content: center; align-items: flex-start; gap: 12px; margin-top: -8px; }
.pair-side { width: 112px; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.pair-side .art-box { height: 74px; display: flex; align-items: flex-end; }
.pair-side span.cap { max-width: 100%; font-size: 13px; line-height: 18px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pair-side.dim { opacity: 0.45; }
.pair-mid { height: 74px; display: flex; align-items: center; gap: 8px; color: var(--text-3); }
.pair-mid .dots { display: flex; gap: 6px; }
.pair-mid .dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--text-3); }
.pair-mid .dots.faint i { background: var(--divider); }
.pair-mid .i { width: 18px; height: 18px; }
.pair-mid .i svg { stroke-width: 1.75; }
.pair.ok .dots i { background: var(--green); }
.pair.ok .okdot { width: 20px; height: 20px; border-radius: 50%; background: var(--green); color: #ffffff; display: grid; place-items: center; }
.pair.ok .okdot .i { width: 12px; height: 12px; }
.pair.ok .okdot svg { stroke-width: 3; }
.pair.bad .pair-mid > .i { color: var(--red); }
.pair.p-live .dots i { animation: blink 1.2s ease-in-out infinite; }
.pair.p-live .dots i:nth-child(2) { animation-delay: 0.15s; }
.pair.p-live .dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 50% { opacity: 0.25; } }
.art { position: relative; display: block; border: 1.5px solid var(--text-2); background: var(--row); }
.art.phone { width: 36px; height: 74px; border-radius: 9px; }
.art.tablet { width: 56px; height: 74px; border-radius: 8px; }
.art.phone::after, .art.tablet::after { content: ""; position: absolute; top: 4px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; border-radius: 50%; background: var(--text-3); }
.art.iphone::after { width: 10px; height: 3px; border-radius: 2px; }
.lap { width: 120px; display: flex; flex-direction: column; align-items: center; }
.lap .art { width: 104px; height: 66px; border-bottom-width: 2px; border-radius: 5px 5px 0 0; }
.lap .base { position: relative; align-self: stretch; height: 5px; border-radius: 0 0 3px 3px; background: var(--base); }
.lap .base::after { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 18px; height: 2px; border-radius: 0 0 2px 2px; background: var(--text-3); }
.mon { width: 104px; display: flex; flex-direction: column; align-items: center; }
.mon .art { width: 104px; height: 62px; border-radius: 5px; }
.mon .neck { width: 12px; height: 7px; background: var(--base); }
.mon .foot { width: 40px; height: 4px; border-radius: 2px; background: var(--base); }
.tx-title { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 0 8px; }
.tx-title h3 { font-size: 22px; line-height: 28px; font-weight: 600; letter-spacing: -0.015em; text-wrap: balance; overflow-wrap: anywhere; }
.tx-title p { font-size: 15px; line-height: 20px; color: var(--text-2); text-wrap: balance; font-variant-numeric: tabular-nums; }
.sas-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 8px 46px 8px 16px; }
.sas-box > span { font-size: 15px; line-height: 20px; color: var(--text-2); }
.sas-box output { font-family: var(--mono); font-size: 24px; line-height: 28px; font-weight: 500; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sas-hint { margin: -8px 16px 0; font-size: 13px; line-height: 18px; color: var(--text-2); }
.big-pct { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.big-pct strong { font-size: 44px; line-height: 48px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.big-pct span { color: var(--text-2); font-variant-numeric: tabular-nums; }
.big-pct + .bar { margin-top: -4px; }
.kv-row { min-height: 44px; justify-content: space-between; font-size: 15px; line-height: 20px; font-variant-numeric: tabular-nums; --div-l: 16px; }
.kv-row > span:first-child { color: var(--text-2); }

/* ---------- Notice ---------- */
.notice { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--text-2); font-size: 13px; line-height: 18px; }
.notice p { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.notice .i { width: 12.3px; height: 13px; }
.notice .by { gap: 5px; }
.vareoz { width: 55.3px; height: 11.7px; display: block; }

/* ---------- Scanner / QR ---------- */
.viewfinder { position: relative; width: 100%; max-width: 320px; aspect-ratio: 1; margin: 0 auto; border-radius: 24px; overflow: hidden; background: #161618; }
.viewfinder.off { opacity: 0.4; }
.viewfinder .cam { width: 100%; height: 100%; object-fit: cover; display: block; }
.frame { position: absolute; inset: 14%; pointer-events: none; }
.frame i { position: absolute; width: 40px; height: 40px; border: 3px solid #ffffff; }
.frame i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 24px; }
.frame i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 24px; }
.frame i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 24px; }
.frame i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 24px; }
.scan { display: flex; flex-direction: column; gap: 10px; }
.scan-title { font-size: 20px; line-height: 26px; font-weight: 600; letter-spacing: -0.01em; text-align: center; }
.qr { align-self: center; width: min(100%, 240px); padding: 12px; background: #ffffff; border-radius: 12px; box-shadow: inset 0 0 0 1px #e4e4e7; }
.qr svg { width: 100%; height: auto; display: block; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 10px; color: var(--text); font-size: 15px; line-height: 21px; }
.steps li { counter-increment: step; position: relative; padding: 1px 0 0 34px; min-height: 24px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--row); color: var(--text); font-size: 12px; font-weight: 600; display: grid; place-items: center; }
.kbd { display: inline-flex; align-items: center; justify-content: center; vertical-align: -5px; width: 28px; height: 26px; border-radius: 8px; background: var(--row); color: var(--text); }
.kbd .i { width: 16px; height: 16px; }
.notes { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--text-2); font-size: 13px; line-height: 18px; }
.note { font-size: 13px; line-height: 18px; color: var(--text-2); }

.compose, .field, .code-text {
  width: 100%;
  border-radius: 12px;
  border: 0;
  background: var(--row);
  padding: 12px 14px;
  font-size: 17px;
  line-height: 22px;
  outline: none;
  resize: vertical;
  color: var(--text);
}
.compose { min-height: 150px; }
.compose:focus, .field:focus, .code-text:focus { box-shadow: inset 0 0 0 1.5px var(--text); }
.code-input, .code-text { font-family: var(--mono); font-size: 15px; word-break: break-all; }

.btn.back { align-self: flex-start; min-height: 36px; padding: 0 12px 0 6px; margin: -8px 0 -4px -6px; font-size: 15px; background: transparent; }
.more > summary { list-style: none; cursor: pointer; }
.more > summary::-webkit-details-marker { display: none; }
.more > summary.sec-label::after { content: ""; width: 7px; height: 7px; margin: 3px 4px 0 auto; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg); transition: transform 0.2s; }
.more[open] > summary.sec-label::after { transform: rotate(225deg); margin-top: 7px; }
.more[open] > summary { margin-bottom: 8px; }
.more .more-list { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Switch ---------- */
.switch { position: relative; flex: none; width: 51px; height: 31px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch .track { position: absolute; inset: 0; border-radius: 15.5px; background: var(--switch-off); transition: background 0.18s; }
.switch .thumb { position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: var(--knob); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); transition: transform 0.18s ease; }
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track .thumb { transform: translateX(20px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px rgba(48, 198, 91, 0.45); }

/* ---------- Received ---------- */
.rx-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rx-title.clamp { white-space: normal; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.rx { align-items: flex-start; gap: 12px; padding-top: 13px; padding-bottom: 13px; font-size: 15px; line-height: 20px; --div-l: 62px; }
.rx .row-text { gap: 2px; }
.rx .warn { color: var(--amber); font-size: 13px; line-height: 18px; }
.rx details { margin-top: 4px; }
.rx details summary { cursor: pointer; font-size: 13px; color: var(--text-2); font-weight: 500; }
.rx details ul { list-style: none; margin: 6px 0 0; padding: 0; max-height: 240px; overflow: auto; }
.rx details li { display: flex; gap: 10px; font-size: 13px; line-height: 20px; }
.rx details li .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx details li .meta { color: var(--text-2); white-space: nowrap; }
.empty { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 24px 16px; color: var(--text-2); }
.foot-note { margin: 16px 16px 0; font-size: 13px; line-height: 18px; color: var(--text-2); }
.text-preview { margin: 0; padding: 12px 46px 12px 16px; white-space: pre-wrap; word-break: break-word; max-height: 180px; overflow: auto; }

/* ---------- Settings ---------- */
.settings .group + .sec-label { margin-top: 24px; }
.tech > summary { list-style: none; }
.tech > summary::-webkit-details-marker { display: none; }
.tech .kv { display: flex; flex-direction: column; gap: 2px; padding: 10px 46px 10px 16px; font-size: 15px; line-height: 20px; position: relative; }
.tech .kv + .kv::before, .tech .row + .kv::before, .tech .kv + .row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--divider); }
.tech .kv > span:first-child { font-size: 13px; line-height: 18px; color: var(--text-2); }
.kv .mono { overflow-wrap: anywhere; font-size: 14px; }
.status-val { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }

/* ---------- Toasts ---------- */
.toasts { position: fixed; left: 16px; right: 16px; bottom: calc(var(--safe-b) + 96px); z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 480px;
  padding: 11px 16px;
  border-radius: 12px;
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.22s ease, transform 0.36s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.toast.show { opacity: 1; transform: none; }
.toast .i { width: 16px; height: 16px; color: var(--red); }

.fatal { margin: auto; max-width: 420px; padding: 40px 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.fatal .i { width: 32px; height: 32px; color: var(--text-3); }
.fatal h2 { font-size: 20px; line-height: 26px; font-weight: 600; }
.fatal p { color: var(--text-2); }

:where(button, a, summary, [tabindex], input, select, textarea):focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.sheet:focus, .sheet:focus-visible { outline: none; }
.switch input:focus-visible { outline: none; }
button.row:focus-visible, .dev-item .row:focus-visible { outline-offset: -2px; }

@media (prefers-reduced-motion: reduce) {
  .sheet, .toast, .live-card, .tab, .backdrop { transition: none; }
  .pair.p-live .dots i, .spinner, .seeking .seek::before, .seeking .seek::after { animation: none; }
}

@media (max-width: 999.98px) {
  .desk { display: none !important; }
  .tr-meta { display: none; }
  .st-transferring .tr-aside { display: none; }
  .v-activity .transfers:not(:empty) { margin-top: 0; }
}

/* ---------- Desktop (mirrors the PC app) ---------- */
@media (min-width: 1000px) {
  .mob { display: none !important; }
  body { font-size: 14px; }
  #app { height: 100dvh; min-height: 0; }

  .top {
    position: static;
    max-width: none;
    min-height: 56px;
    height: 56px;
    justify-content: flex-start;
    gap: 16px;
    padding: 0 16px 0 24px;
    border-bottom: 1px solid var(--divider);
  }
  .top > .grow { display: block; }
  .brand { display: flex; align-items: center; gap: 10px; font-size: 15px; line-height: 20px; font-weight: 600; letter-spacing: -0.01em; }
  .brand img { width: 20px; height: 20px; border-radius: 2px; }
  .vsep { width: 1px; height: 20px; background: var(--divider); }
  .me-top { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 4px 6px; margin: 0 -6px; border: 0; border-radius: 8px; background: none; font-size: 13px; line-height: 18px; color: var(--text-2); white-space: nowrap; }
  .me-top:hover { background: var(--hover); }
  .me-top strong { font-weight: 500; color: var(--text); }
  .me-top .st-ic { width: 11px; height: 11px; }

  .btn, .btn.small, .btn.tb {
    min-height: 32px;
    height: 32px;
    padding: 0 12px 0 10px;
    border-radius: 8px;
    gap: 6px;
    font-size: 13px;
    line-height: 18px;
    font-weight: 600;
  }
  .btn:not(:has(.i)) { padding: 0 14px; }
  .btn .i, .btn.small .i { width: 15px; height: 15px; }
  .btn:active { transform: none; }
  .btn.soft:hover, .btn.secondary:hover, .btn:not(.primary):not(.ghost):not(.outline):hover { background: var(--hover); }
  .btn.ghost:hover { background: var(--row); }
  .btn.primary:hover { background: var(--primary-hover); }
  .btn.outline { background: var(--bg); box-shadow: inset 0 0 0 1px var(--divider); }
  .btn.outline:hover { background: var(--row); }
  .btn .badge { position: static; margin-left: 2px; }
  .row-actions { justify-content: center; }
  .row-actions > .btn { flex: none; }
  .icon-btn.tb { width: 32px; height: 32px; border-radius: 8px; background: transparent; color: var(--text-2); }
  .icon-btn.tb .i { width: 16px; height: 16px; }
  .icon-btn:hover { background: var(--hover); }
  .icon-btn:active { transform: none; }

  .main {
    max-width: none;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    min-height: 0;
  }
  body[data-view] .v-activity, body[data-view] .v-devices { display: flex; }
  .v-devices { position: relative; min-width: 0; min-height: 0; overflow-y: auto; padding: 28px 32px 24px; flex-direction: column; }
  .v-activity { min-width: 0; min-height: 0; overflow-y: auto; border-left: 1px solid var(--divider); padding: 28px 28px 24px; flex-direction: column; }

  .col-head { display: flex; align-items: center; gap: 12px; }
  .col-head h2, .act-head .big-title { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -0.015em; }
  .count { font-size: 13px; line-height: 18px; color: var(--text-2); font-variant-numeric: tabular-nums; }

  .notch { -webkit-mask: none; mask: none; }
  .install { margin-top: 16px; padding: 12px 12px 12px 14px; border-radius: 10px; align-items: center; }
  .install .lead-ic { width: 20px; height: 20px; color: var(--text-2); margin: 0; }
  .ib-text { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 4px 12px; }
  .ib-text strong { font-size: 14px; font-weight: 600; }
  .link { font-size: 13px; line-height: 18px; text-decoration: underline; text-decoration-color: var(--divider); text-underline-offset: 3px; }
  .link:hover { text-decoration-color: currentColor; }

  .dev-list { margin: 16px -12px 0; gap: 2px; }
  .dev-list .sec-label { margin: 16px 12px 6px; }
  .dev-list .sec-label:first-child { margin-top: 0; }
  .dev-list .group { background: none; border-radius: 0; overflow: visible; display: flex; flex-direction: column; gap: 2px; }
  .dev-item + .dev-item .row::before { display: none; }
  .dev-item { display: flex; align-items: center; border-radius: 10px; transition: background 0.12s; }
  .dev-item:hover, .dev-item:focus-within { background: var(--row); }
  .dev-row { flex: 1; min-width: 0; height: 64px; min-height: 64px; padding: 0 12px; gap: 14px; border-radius: 10px; font-size: 15px; line-height: 20px; cursor: pointer; }
  .dev-row:active { background: transparent; }
  .dev-ic { width: 36px; height: 36px; }
  .dev-row .row-text strong { font-weight: 600; }
  .dev-acts { display: flex; gap: 6px; padding-right: 14px; opacity: 0; pointer-events: none; transition: opacity 0.12s; }
  .dev-item:hover .dev-acts, .dev-item:focus-within .dev-acts { opacity: 1; pointer-events: auto; }
  @media (hover: none) { .dev-acts { opacity: 1; pointer-events: auto; } }
  .dev-item.off .dev-acts { display: none; }
  .dev-item.dragging { background: var(--green-soft); outline: 1.5px dashed var(--green); outline-offset: -1.5px; }
  .dev-item.dragging .row { background: none; box-shadow: none; }
  .dev-item.dragging .dev-acts { display: none; }
  .dev-item.dragging .drop-label { display: flex; align-items: center; gap: 6px; padding-right: 14px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--green-text); white-space: nowrap; }
  .drop-label .i { width: 15px; height: 15px; }

  .empty-state { margin-top: 40px; padding: 0 0 0 2px; max-width: 440px; }
  .empty-state h2 { font-size: 15px; line-height: 20px; }
  .empty-hint { font-size: 13px; line-height: 18px; }
  .empty-acts { margin-top: 14px; gap: 8px; }
  .empty-state:not([hidden]) + .dev-list { margin-top: 28px; }

  .send-bar { margin-top: 18px; }
  .send-bar > .btn { width: auto; height: 40px; min-height: 40px; padding: 0 18px 0 14px; border-radius: 10px; font-size: 14px; }
  .send-bar > .btn .i { width: 16px; height: 16px; }
  .sel-card { max-width: 560px; min-height: 56px; padding: 8px 14px 8px 10px; border-radius: 10px; }
  .sel-card .row-text strong { font-size: 14px; line-height: 20px; font-weight: 600; }
  .has-sel .dev-item .dev-acts { display: none; }

  .notice-slot { margin-top: auto; padding-top: 28px; align-self: flex-start; }

  .act-head .btn { flex: none; }
  .act-empty { margin-top: 16px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--text); }
  .transfers { margin-top: 12px; border-top: 1px solid var(--divider); }
  .transfers:empty { display: none; }
  .transfers .sec-label { display: none; }
  .transfers .group { background: none; border-radius: 0; overflow: visible; }
  .tr { padding: 16px 0; gap: 10px; border-bottom: 1px solid var(--divider); }
  .tr + .tr::before { display: none; }
  .tr-ic { width: 18px; height: auto; padding-top: 2px; display: block; }
  .tr-ic .i { width: 16px; height: 16px; }
  .tr-main { gap: 6px; }
  .tr-top h3 { font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: 0; }
  .tr .bar { margin-top: 2px; height: 4px; background: var(--row); }
  .tr-meta { margin-top: 0; }
  .tr-sas { margin-top: 0; }
  .tr-sas b { font-size: 13px; }
  .bubble { margin-top: 0; background: var(--row); font-size: 13px; line-height: 18px; }
  .links { margin-top: 0; gap: 4px 16px; }
  .tr.tappable { cursor: default; }

  /* dialogs */
  .sheet-wrap { align-items: center; padding: 24px; }
  .sheet {
    width: 480px;
    max-width: 100%;
    max-height: calc(100dvh - 48px);
    border-radius: 14px;
    box-shadow: 0 0 0 1px var(--divider), 0 24px 64px rgba(0, 0, 0, 0.16);
    transform: translateY(12px) scale(0.98);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.18s ease;
    overflow: hidden;
  }
  .sheet.wide { width: 760px; }
  .sheet.tall { min-height: 0; }
  .sheet-wrap.show .sheet { opacity: 1; }
  .grabber { display: none; }
  .sheet-head { grid-template-areas: "titles close"; grid-template-rows: auto; min-height: 56px; padding: 8px 12px 8px 24px; border-bottom: 1px solid var(--divider); align-items: center; }
  .sheet-close.icon-btn, .sheet-close.text { width: 32px; height: 32px; border-radius: 8px; background: transparent; }
  .sheet-close.icon-btn .i { width: 16px; height: 16px; }
  .sheet-close.icon-btn .i svg { stroke-width: 2; }
  .sheet-close.text { width: auto; padding: 0 12px; font-size: 13px; font-weight: 600; }
  .sheet-close.text:hover { background: var(--hover); }
  .sheet-lead { width: 32px; height: 32px; }
  .sheet-titles { gap: 12px; }
  .sheet-tt h2 { font-size: 17px; line-height: 24px; letter-spacing: -0.01em; }
  .sheet-tt p { font-size: 13px; line-height: 18px; }
  .sheet-body { padding: 20px 24px 24px; gap: 16px; font-size: 14px; }
  .sheet-body > div { gap: 16px; }
  .sheet-body .sec-label { margin: 0 0 -8px; }
  .sheet-actions { margin: 8px -24px -24px; padding: 14px 24px; border-top: 1px solid var(--divider); justify-content: flex-end; gap: 8px; }
  .sheet-actions > .btn { flex: none; }
  .notitle .sheet-titles { display: flex; }
  .request-sheet .sheet-close { visibility: visible; }
  .sheet .notice { display: none; }

  .sheet .group { background: none; border: 1px solid var(--divider); border-radius: 10px; }
  .sheet .row { min-height: 52px; padding: 8px 12px; gap: 12px; font-size: 14px; line-height: 20px; --div-l: 0px; }
  .sheet button.row:hover { background: var(--row); }
  .sheet .row > .i { width: 20px; height: 20px; color: var(--text-2); }
  .sheet .row > .i svg { stroke-width: 2; }
  .sheet .row .label, .sheet .row-text strong { font-weight: 600; }
  .sheet .row.plain .label, .sheet .kv-row span, .sheet .row.toggle .label { font-weight: 400; }
  .sheet .row > .chev { width: 16px; height: 16px; }
  .sheet .row.danger > .i { color: var(--red); }
  .sheet .file-row { min-height: 44px; gap: 10px; }
  .sheet .badge-ext { width: 28px; height: 28px; border-radius: 6px; background: var(--row); font-size: 9px; }
  .sheet .file-row .size { font-size: 13px; }
  .sheet .more-row { min-height: 40px; font-size: 13px; font-weight: 600; }
  .sheet .rx { font-size: 14px; }
  .sheet .row input.inline, .sheet .row select.inline { font-size: 14px; }

  .sas-box { min-height: 0; padding: 14px 16px; border: 0; background: var(--row); border-radius: 10px; }
  .sheet .sas-box { border: 0; background: var(--row); }
  .sheet .group.chk { border: 0; border-radius: 0; }
  .sheet .group.chk .row { padding: 0; min-height: 0; }
  .sas-box > span { font-size: 13px; line-height: 18px; }
  .sas-box output { font-size: 22px; }
  .sas-hint { margin: -8px 0 0; }
  .pair { display: none; }
  .tx-title { align-items: flex-start; text-align: left; padding: 0; }
  .tx-title h3 { font-size: 15px; line-height: 20px; }
  .tx-title p { font-size: 13px; line-height: 18px; }
  .req-head { display: flex; gap: 14px; align-items: center; }
  .req-head .dev-ic { width: 40px; height: 40px; }
  .big-pct strong { font-size: 32px; line-height: 36px; }
  .kv-row { min-height: 40px; font-size: 13px; }

  .switch { width: 16px; height: 16px; order: -1; align-self: flex-start; margin-top: 2px; }
  .switch .track { border-radius: 4px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--text-3); }
  .switch .thumb { display: none; }
  .switch input:checked + .track { background: var(--primary); box-shadow: none; }
  .switch input:checked + .track::after {
    content: ""; position: absolute; inset: 0; background: var(--on-primary);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px 11px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px 11px no-repeat;
  }
  .row.toggle { gap: 10px; align-items: flex-start; min-height: 0; padding: 8px 12px; }
  .row.toggle .label { white-space: normal; }

  .settings-sheet .settings { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 32px; align-items: start; }
  .settings-sheet .set-col { display: flex; flex-direction: column; gap: 0; }
  .settings-sheet .sec-label { margin: 24px 0 8px; font-weight: 600; }
  .settings-sheet .set-col > .sec-label:first-child { margin-top: 0; }
  .settings-sheet .group { border: 0; border-radius: 0; overflow: visible; }
  .settings-sheet .row { padding: 6px 0; min-height: 32px; }
  .settings-sheet .row.toggle { padding: 6px 0; }
  .settings-sheet .row + .row::before { display: none; }
  .settings-sheet .row input.inline { flex: none; height: 36px; padding: 0 12px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--divider); text-align: left; color: var(--text); }
  .settings-sheet .row.name-row { flex-direction: column; align-items: stretch; gap: 6px; }
  .settings-sheet .row.name-row .label { font-size: 13px; color: var(--text-2); }
  .settings-sheet .tech .kv { padding: 6px 0; }
  .settings-sheet .tech .kv::before { display: none; }

  .qr { width: 216px; }
  .viewfinder { max-width: 280px; }
  .lead, .warn-text, .steps, .wait-row { font-size: 14px; line-height: 20px; }
  .headline { font-size: 15px; line-height: 20px; }
  .compose { min-height: 160px; font-size: 14px; line-height: 20px; border-radius: 10px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--divider); }
  .compose:focus { box-shadow: inset 0 0 0 1.5px var(--text), 0 0 0 4px rgba(17, 17, 17, 0.08); }
  .btn.back { margin: -6px 0 -6px -10px; font-size: 13px; min-height: 32px; }
  .rx { padding: 10px 12px; }
  .sheet .text-preview { padding: 12px 14px; }

  .toasts { bottom: 24px; }
}
