/* XChange Remote. Tokens follow the mascot's palette (packages/mod/hooks/ui/theme.ts values);
   surfaces are warm neutrals so the accent is the only colour that speaks. */
.tasks-chip { width: fit-content; margin: 0 6px 8px; padding: 6px 10px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--muted); font-size: 13px; }
button.tasks-chip { display: flex; align-items: center; gap: 4px; border: 0; font: inherit; font-size: 13px; cursor: pointer; }
.tasks-list { margin: 0 6px 6px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.tasks-list .task { display: flex; align-items: center; gap: 8px; padding: 8px 10px; color: var(--muted); }
.tasks-list .task + .task { border-top: 1px solid var(--line); }
.tasks-list .task span { flex: 1; min-width: 0; color: var(--ink-2); font-size: 13.5px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tasks-list .task time { color: var(--faint); font-size: 12.5px; font-variant-numeric: tabular-nums; }
:root {
  --bg: #f5f4f1;
  --surface: #ffffff;
  --surface-2: #eceae5;
  --sunk: #e7e5df;
  --ink: #1d1b26;
  --ink-2: #3b3946;
  --muted: #64616f;
  --faint: #c9c6d2;
  --line: rgba(29, 27, 38, 0.1);
  --line-2: rgba(29, 27, 38, 0.16);
  --accent: #1877F2;
  --accent-strong: #1466d8;
  --accent-soft: rgba(24, 119, 242, 0.1);
  --accent-ink: #ffffff;
  --user-bg: #e6eefb;
  --warn: #b5820a;
  --warn-soft: rgba(181, 130, 10, 0.12);
  --bad: #c73434;
  --bad-soft: rgba(199, 52, 52, 0.1);
  --ok: #1a8a4a;
  --ok-soft: rgba(26, 138, 74, 0.1);
  --shadow: 0 1px 2px rgba(29, 27, 38, 0.06), 0 8px 24px rgba(29, 27, 38, 0.08);
  --sheet-shadow: 0 -10px 40px rgba(29, 27, 38, 0.18);
  --scrim: rgba(20, 18, 28, 0.32);
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --tap: 48px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141413; --surface: #1e1e1d; --surface-2: #2a2a28; --sunk: #232322; --ink: #ecebf2; --ink-2: #cfcdd8;
    --muted: #a19fae; --faint: #55535f; --line: rgba(236, 235, 242, 0.09); --line-2: rgba(236, 235, 242, 0.15);
    --accent: #4d8df7; --accent-strong: #1466d8; --accent-soft: rgba(77, 141, 247, 0.13); --accent-ink: #ffffff; --user-bg: #1c2a44;
    --warn: #e0b436; --warn-soft: rgba(224, 180, 54, 0.13); --bad: #ef5a5a; --bad-soft: rgba(239, 90, 90, 0.13);
    --ok: #3ecb7d; --ok-soft: rgba(62, 203, 125, 0.12);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35); --sheet-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    --scrim: rgba(0, 0, 0, 0.5); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141413; --surface: #1e1e1d; --surface-2: #2a2a28; --sunk: #232322; --ink: #ecebf2; --ink-2: #cfcdd8;
  --muted: #a19fae; --faint: #55535f; --line: rgba(236, 235, 242, 0.09); --line-2: rgba(236, 235, 242, 0.15);
  --accent: #4d8df7; --accent-strong: #1466d8; --accent-soft: rgba(77, 141, 247, 0.13); --accent-ink: #ffffff; --user-bg: #1c2a44;
  --warn: #e0b436; --warn-soft: rgba(224, 180, 54, 0.13); --bad: #ef5a5a; --bad-soft: rgba(239, 90, 90, 0.13);
  --ok: #3ecb7d; --ok-soft: rgba(62, 203, 125, 0.12);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35); --sheet-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
  --scrim: rgba(0, 0, 0, 0.5); color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); }
body { font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
.ic { flex: none; display: block; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---- frame: header / band / banner / scrolling main / thumb dock ---------------------------- */
.app { height: 100dvh; display: flex; flex-direction: column; max-width: 640px; margin: 0 auto; position: relative; overflow: hidden; }
.top { flex: none; padding: calc(var(--safe-t) + 6px) 8px 6px; display: flex; align-items: center; gap: 4px; min-height: 52px; background: var(--bg); position: relative; z-index: 2; }
.top .icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--ink-2); }
.top .icon-btn:active { background: var(--surface-2); }
.top .title { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; line-height: 1.2; padding: 0 4px; }
.top .title b { font-size: 16px; font-weight: 650; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .title button { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 2px; max-width: 100%; }
.top .title button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .spacer { flex: 1; }
.top .icon-btn.stale .ring { opacity: 0.45; filter: grayscale(0.7); }

.link { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 10px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; font-weight: 550; color: var(--ink-2); white-space: nowrap; }
.link .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.link.waiting .dot, .link.connecting .dot { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.link.offline .dot, .link.denied .dot, .link.lost .dot { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.link .host { color: var(--muted); font-weight: 500; }

main.scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.dock { flex: none; padding: 8px 12px calc(var(--safe-b) + 10px); background: linear-gradient(to bottom, transparent, var(--bg) 14px); position: relative; z-index: 2; }

/* ---- connection banner: says what is true, and how old what you see is ----------------------- */
.banner { margin: 2px 12px 8px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; box-shadow: var(--shadow); }
.banner .mrx { flex: none; margin-top: 2px; }
.banner.push { margin-top: 18px; box-shadow: none; }
.banner.push > .ic { flex: none; margin-top: 2px; color: var(--accent); }
.banner .txt { flex: 1; min-width: 0; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.banner .txt b { display: block; font-size: 15.5px; color: var(--ink); margin-bottom: 2px; }
.banner .txt small { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
.banner .act { margin-top: 10px; display: flex; gap: 8px; }
.banner.warn { border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.banner.bad { border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.banner.slim { padding: 8px 12px; align-items: center; box-shadow: none; background: var(--warn-soft); border-color: transparent; font-size: 13.5px; color: var(--ink-2); gap: 8px; }

.btn { height: 40px; padding: 0 16px; border-radius: 12px; font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--surface-2); color: var(--ink); }
.btn.primary { background: var(--accent-strong); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--accent); padding: 0 6px; }
.btn:active { filter: brightness(0.94); transform: scale(0.98); }

/* ---- home ------------------------------------------------------------------------------------ */
.lt { padding: 4px 20px 6px; font-size: 30px; font-weight: 750; letter-spacing: -0.6px; }
.sec { padding: 14px 20px 6px; font-size: 13px; font-weight: 650; color: var(--muted); letter-spacing: 0.1px; display: flex; align-items: center; gap: 6px; }
.sec .count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--warn); color: #fff; font-size: 12px; display: inline-grid; place-items: center; font-weight: 700; }
.list { margin: 0 12px; background: var(--surface); border-radius: var(--r-lg); border: 1px solid var(--line); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 16px; min-height: 68px; width: 100%; text-align: left; position: relative; }
.row + .row::before { content: ""; position: absolute; left: 52px; right: 0; top: 0; border-top: 1px solid var(--line); }
.row:active { background: var(--surface-2); }
.row .ring { flex: none; }
.row .body { flex: 1; min-width: 0; }
.row .t1 { font-size: 16px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .t2 { margin-top: 3px; font-size: 13.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; min-width: 0; white-space: nowrap; }
.row .t2 .sep { opacity: 0.5; }
.row .t2 .m { overflow: hidden; text-overflow: ellipsis; }
.row .tag { flex: none; font-size: 12.5px; font-weight: 650; padding: 3px 9px; border-radius: 99px; background: var(--warn-soft); color: var(--warn); }
.row .tag.run { background: var(--accent-soft); color: var(--accent); }
.list.waiting { border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.list.stale .ring, .list.stale .tag { opacity: 0.5; filter: grayscale(0.6); }
.empty { padding: 40px 32px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty b { font-size: 19px; margin-top: 10px; }
.empty p { margin: 0; color: var(--muted); font-size: 15px; max-width: 30ch; }
.empty .hint { margin-top: 18px; color: var(--accent); }

/* ---- chips above the composer: where and on what the next session runs ---------------------- */
.chips { display: flex; gap: 8px; margin: 0 2px 8px; }
.chip { height: 40px; display: inline-flex; align-items: center; gap: 7px; padding: 0 10px 0 11px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); font-size: 14.5px; font-weight: 560; min-width: 0; color: var(--ink); }
.chip .ic { color: var(--muted); }
.chip .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip .eff { color: var(--accent); font-weight: 650; }
.chip.folder { flex: 0 1 auto; max-width: 46%; }
.chip.model { flex: 1 1 auto; }
.chip .down { margin-left: auto; color: var(--muted); }
.chip:active { background: var(--surface-2); }

.composer { display: flex; align-items: flex-end; gap: 8px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 24px; padding: 6px 6px 6px 16px; box-shadow: var(--shadow); }
.composer textarea { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; resize: none; font-size: 16px; line-height: 1.45; padding: 8px 0; max-height: 38vh; min-height: 24px; }
.composer textarea::placeholder { color: var(--muted); }
.send { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-strong); color: var(--accent-ink); }
.send:disabled { background: var(--surface-2); color: var(--faint); }
.send.stop { background: var(--ink); color: var(--bg); }
.working { display: flex; align-items: center; gap: 8px; margin: 0 6px 8px; font-size: 13.5px; color: var(--muted); }
.working .ring { animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .working .ring, .caret { animation: none !important; } }

/* ---- the mod band: four figures, one line, tap for workers ---------------------------------- */
.band { flex: none; margin: 0 12px 6px; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); text-align: left; width: calc(100% - 24px); }
.band .cell { padding: 7px 10px 8px; min-width: 0; position: relative; }
.band .cell + .cell::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; border-left: 1px solid var(--line); }
.band .k { font-size: 11.5px; color: var(--muted); font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.band .v { font-size: 15.5px; font-weight: 680; line-height: 1.25; white-space: nowrap; font-variant-numeric: tabular-nums; }
.band .v.na { color: var(--faint); }
.band.stale { opacity: 0.55; }
.working.stale { color: var(--warn); }
.band .bar { height: 3px; border-radius: 3px; background: var(--sunk); margin-top: 4px; overflow: hidden; }
.band .bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.band .bar.warn i { background: var(--warn); }
.band .bar.bad i { background: var(--bad); }
.workers { margin: -2px 12px 8px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); font-size: 14px; }
.workers .w { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; }
.workers .w span:first-child { font-family: var(--mono); font-size: 13px; }
.workers .w span:last-child { color: var(--muted); }
.workers .none { color: var(--muted); }
.workers .foot { margin-top: 6px; font-size: 12px; color: var(--muted); }

/* ---- timeline -------------------------------------------------------------------------------- */
.conversation-image { display: block; width: 240px; max-width: 100%; margin: 6px 0; border-radius: 12px; overflow: hidden; background: var(--sunk); }
.conversation-image img { width: 100%; height: 180px; object-fit: contain; }
.conversation-image span, .image-unavailable { padding: 8px; font-size: 12.5px; color: var(--muted); }
.image-viewer { position: fixed; inset: 0; z-index: 30; background: #000; color: #fff; display: flex; flex-direction: column; padding: calc(var(--safe-t) + 12px) 12px calc(var(--safe-b) + 12px); }
.image-viewer button { align-self: flex-end; padding: 12px; }
.image-viewer img { min-height: 0; flex: 1; width: 100%; object-fit: contain; }

.tl { padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 14px; }
/* Real item heights keep initial and streaming bottom anchors accurate. */
.tl > * { min-width: 0; }
.msg-user { align-self: flex-end; max-width: 86%; background: var(--user-bg); color: var(--ink); padding: 10px 14px; border-radius: 20px 20px 6px 20px; font-size: 16px; white-space: pre-wrap; word-break: break-word; }
.msg-user.queued { opacity: 0.72; }
.msg-user .q { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); margin-top: 4px; justify-content: flex-end; }
.msg-asst { font-size: 16px; line-height: 1.6; word-break: break-word; color: var(--ink); }
.msg-asst p { margin: 0 0 10px; }
.msg-asst p:last-child { margin-bottom: 0; }
.msg-asst h2, .msg-asst h3, .msg-asst h4 { font-size: 16.5px; margin: 14px 0 6px; line-height: 1.35; }
.msg-asst ul, .msg-asst ol { margin: 0 0 10px; padding-left: 22px; }
.msg-asst li { margin: 2px 0; }
.msg-asst code { font-family: var(--mono); font-size: 0.86em; background: var(--surface-2); padding: 1px 5px; border-radius: 6px; }
.msg-asst a { color: var(--accent); }
.msg-asst blockquote { margin: 0 0 10px; padding-left: 12px; border-left: 3px solid var(--line-2); color: var(--ink-2); }
.md-code { margin: 0 0 10px; background: var(--sunk); border-radius: var(--r-sm); padding: 10px 12px; overflow-x: auto; font-size: 13px; line-height: 1.5; }
.md-code code { background: none; padding: 0; font-size: inherit; }
.md-table { overflow-x: auto; margin: 0 0 10px; }
.md-table table { border-collapse: collapse; font-size: 14px; }
.md-table th, .md-table td { border-bottom: 1px solid var(--line); padding: 5px 10px 5px 0; text-align: left; white-space: nowrap; }
.caret { display: inline-block; width: 8px; height: 1.05em; vertical-align: -0.15em; background: var(--accent); border-radius: 2px; margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.ring-background { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .ring-background { animation: none; } }

.tools { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.tool { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 10px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; width: 100%; text-align: left; color: var(--ink-2); }
.tool .nm { font-weight: 650; color: var(--ink); flex: none; }
.tool .sm { font-family: var(--mono); font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.tool .st { flex: none; color: var(--ok); }
.tool .st.bad { color: var(--bad); }
.tool .st.run { color: var(--faint); }
.tool-out { margin: 2px 0 4px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--sunk); font-family: var(--mono); font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; max-height: 50vh; overflow: auto; color: var(--ink-2); }

.tool-details { font-size: 13px; color: var(--accent); }
.tool-details summary { padding: 4px 0; cursor: pointer; }
.tool-details[open] + .tool-preview { display: none; }
.tool-details .tool-out { max-height: none; }
.msg-asst blockquote > :last-child { margin-bottom: 0; }

.sub { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); width: 100%; text-align: left; }
.sub .body { flex: 1; min-width: 0; }
.sub .k { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.sub .k .model { font-family: var(--mono); color: var(--accent); font-weight: 600; }
.sub .d { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub .ic { color: var(--muted); }

.foot { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-top: -6px; }
.foot.bad { color: var(--bad); }
.notice { align-self: center; font-size: 13px; color: var(--muted); background: var(--surface-2); padding: 5px 12px; border-radius: 99px; text-align: center; max-width: 92%; }
.start { align-self: center; font-size: 12.5px; color: var(--faint); padding: 4px 0; }
.loading-older { text-align: center; font-size: 13px; color: var(--muted); padding: 8px; }

.perm-done { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); padding: 2px 2px; }
.perm-done .nm { font-weight: 650; color: var(--ink-2); }
.perm-done .sm { font-family: var(--mono); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.perm-done.deny .ic, .perm-done.expired .ic { color: var(--bad); }
.perm-done.allow .ic { color: var(--ok); }
.perm-done.open, .perm-done.open .nm { color: var(--warn); }
.perm-done .why { display: block; font-size: 12.5px; }

/* ---- permission: one thumb, Allow on the right, never smaller than 52 px --------------------- */
.perm { background: var(--surface); border: 1.5px solid color-mix(in srgb, var(--warn) 55%, transparent); border-radius: var(--r-lg); padding: 14px 14px 12px; margin-bottom: 10px; box-shadow: var(--shadow); }
.perm .hd { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--warn); font-weight: 650; }
.perm .hd .of { margin-left: auto; color: var(--muted); font-weight: 600; }
.perm .q { font-size: 17px; font-weight: 680; margin: 6px 0 8px; line-height: 1.35; }
.perm .what { font-family: var(--mono); font-size: 13px; line-height: 1.5; background: var(--sunk); border-radius: var(--r-sm); padding: 9px 11px; max-height: 7.6em; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); position: relative; }
.perm .what.open { max-height: 40vh; overflow: auto; }
.perm .more { font-size: 13px; color: var(--accent); font-weight: 600; padding: 6px 0 0; }
.perm .act { display: grid; grid-template-columns: 1fr 1.35fr; gap: 10px; margin-top: 12px; }
.perm .act button { height: 54px; border-radius: 16px; font-size: 17px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.perm .deny { background: var(--surface-2); color: var(--ink); }
.perm .allow { background: var(--accent-strong); color: var(--accent-ink); }
.perm .always { display: block; width: 100%; text-align: center; margin-top: 8px; height: 36px; font-size: 14px; font-weight: 600; color: var(--muted); }

/* ---- sheets ---------------------------------------------------------------------------------- */
.scrim { position: absolute; inset: 0; background: var(--scrim); z-index: 10; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 11; background: var(--bg); border-radius: 22px 22px 0 0; box-shadow: var(--sheet-shadow); max-height: 90%; display: flex; flex-direction: column; }
.sheet .grab { width: 38px; height: 5px; border-radius: 3px; background: var(--faint); margin: 8px auto 2px; flex: none; }
.sheet .sh { display: flex; align-items: center; padding: 4px 8px 6px 20px; flex: none; }
.sheet .sh b { flex: 1; font-size: 18px; font-weight: 700; }
.sheet .sh .icon-btn { width: 44px; height: 44px; display: grid; place-items: center; color: var(--muted); }
.sheet .sbody { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 8px; }
.sheet .sfoot { flex: none; padding: 10px 12px calc(var(--safe-b) + 12px); border-top: 1px solid var(--line); background: var(--bg); }
.sheet .sfoot .btn { width: 100%; height: 52px; border-radius: 16px; font-size: 16.5px; }
.sheet .sfoot .path { font-size: 12.5px; color: var(--muted); margin: 0 4px 8px; font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.opt { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 56px; width: 100%; text-align: left; position: relative; }
.opt + .opt::before { content: ""; position: absolute; left: 48px; right: 0; top: 0; border-top: 1px solid var(--line); }
.opt .ic { color: var(--muted); }
.opt .body { flex: 1; min-width: 0; }
.opt .t1 { font-size: 16px; font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt .t2 { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt .t2.mono { font-family: var(--mono); font-size: 12px; }
.opt.on .t1 { color: var(--accent); font-weight: 650; }
.opt .tick { color: var(--accent); }
.opt:disabled { opacity: 0.45; }
.opt:active:not(:disabled) { background: var(--surface-2); }
.opt .badge { font-size: 12px; color: var(--muted); background: var(--surface-2); border-radius: 99px; padding: 2px 8px; flex: none; }

.crumbs { display: flex; gap: 4px; align-items: center; padding: 0 16px 8px; overflow-x: auto; white-space: nowrap; font-size: 14px; scrollbar-width: none; }
.crumbs button { padding: 6px 8px; border-radius: 8px; color: var(--muted); font-weight: 550; }
.crumbs button:last-child { color: var(--ink); font-weight: 650; background: var(--surface-2); }
.crumbs .sl { color: var(--faint); }
.filter { margin: 2px 12px 10px; display: flex; align-items: center; gap: 8px; background: var(--surface-2); border-radius: 12px; padding: 0 12px; height: 42px; color: var(--muted); }
.filter input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 16px; color: var(--ink); min-width: 0; }

.seg { display: flex; background: var(--surface-2); border-radius: 13px; padding: 3px; gap: 2px; }
.seg button { flex: 1; height: 40px; border-radius: 10px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--accent); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.seg-label { font-size: 13px; color: var(--muted); margin: 0 4px 6px; font-weight: 600; display: flex; justify-content: space-between; }

/* ---- pairing --------------------------------------------------------------------------------- */
.pair { padding: 40px 28px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.pair h1 { font-size: 26px; letter-spacing: -0.5px; margin: 18px 0 22px; }
.pair ol { list-style: none; padding: 0; margin: 0; width: 100%; text-align: left; display: flex; flex-direction: column; gap: 14px; counter-reset: s; }
.pair li { display: flex; gap: 12px; align-items: flex-start; font-size: 15.5px; counter-increment: s; }
.pair li::before { content: counter(s); flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 14px; display: grid; place-items: center; }
.pair code { display: block; margin-top: 6px; font-family: var(--mono); font-size: 13px; white-space: nowrap; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); padding: 8px 12px; border-radius: 10px; }
.pair .paste { margin-top: 24px; width: 100%; text-align: left; font-size: 14px; color: var(--muted); }
.pair .paste .row { display: flex; gap: 8px; margin-top: 8px; }
.pair .paste input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-family: var(--mono); font-size: 16px; }
.pair .note { margin-top: 26px; font-size: 13.5px; color: var(--muted); }

.toast { position: absolute; left: 16px; right: 16px; bottom: calc(var(--safe-b) + 140px); z-index: 20; background: var(--ink); color: var(--bg); border-radius: 14px; padding: 12px 14px; font-size: 14.5px; box-shadow: var(--shadow); }
