:root {
  color-scheme: light;
  --ink: #17292d;
  --ink-soft: #32484a;
  --paper: #f2f4ef;
  --surface: #fbfcf8;
  --line: #d5ddd6;
  --muted: #73817b;
  --accent: #e36c43;
  --accent-dark: #bb4d2b;
  --mint: #d9e9df;
  --blue: #7693a4;
  --danger: #a9473b;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif;
  --sans: Inter, "Microsoft YaHei UI", "PingFang SC", sans-serif;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: var(--paper); }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #f2a17f; outline-offset: 3px; }
.is-hidden { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-size: 16px; font-weight: 700; letter-spacing: .04em; }
.brand-light { color: #f4f5ed; }
.brand-mark { position: relative; display: inline-flex; width: 27px; height: 27px; align-items: center; justify-content: center; gap: 2px; border: 1px solid currentColor; border-radius: 8px 8px 8px 3px; transform: rotate(-4deg); }
.brand-mark i { display: block; width: 3px; border-radius: 3px; background: var(--accent); }
.brand-mark i:nth-child(1) { height: 9px; }
.brand-mark i:nth-child(2) { height: 15px; }
.brand-mark i:nth-child(3) { height: 11px; }
.eyebrow { margin: 0; color: #6c7d76; font: 700 10px/1.3 var(--mono); letter-spacing: .15em; text-transform: uppercase; }
.eyebrow span { color: var(--accent); padding: 0 2px; }
.eyebrow-light { color: #a9c0b8; }

/* Login: a quiet archive desk with one vermilion indexing mark. */
.auth-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, .96fr) minmax(420px, 1.04fr); background: var(--surface); }
.auth-story { position: relative; min-height: 100vh; overflow: hidden; display: flex; flex-direction: column; padding: 36px clamp(30px, 5vw, 76px); background: var(--ink); color: #f4f5ed; }
.auth-story::before { content: ""; position: absolute; inset: auto -105px -160px auto; width: 420px; height: 420px; border: 1px solid rgba(215, 231, 220, .16); border-radius: 50%; box-shadow: 0 0 0 28px rgba(215, 231, 220, .035), 0 0 0 57px rgba(215, 231, 220, .028); }
.auth-story-copy { position: relative; z-index: 1; max-width: 520px; margin: auto 0; padding: 60px 0 82px; }
.auth-story-copy .eyebrow { margin-bottom: 28px; }
.auth-story-copy h1 { margin: 0 0 25px; font: 500 clamp(48px, 6vw, 82px)/1.18 var(--serif); letter-spacing: -.055em; }
.auth-story-copy h1 em { color: #ef9978; font-style: normal; }
.auth-story-copy > p:last-child { max-width: 390px; margin: 0; color: #b8c7c0; font-size: 14px; line-height: 1.9; }
.auth-imprint { position: absolute; right: 9%; bottom: 12%; display: flex; align-items: center; gap: 13px; color: #96aea5; transform: rotate(-9deg); }
.imprint-ring { display: grid; width: 45px; height: 45px; place-items: center; border: 1px solid currentColor; border-radius: 50%; font: 11px var(--mono); letter-spacing: .1em; }
.imprint-line { width: 48px; height: 1px; background: currentColor; }
.imprint-caption { font: 8px/1.45 var(--mono); letter-spacing: .14em; }
.auth-footnote { position: relative; margin: 0; color: #91a69e; font: 10px var(--mono); letter-spacing: .07em; }
.auth-panel-wrap { display: grid; place-items: center; padding: 48px 28px; }
.auth-panel { width: min(100%, 420px); }
.auth-mobile-brand { display: none; margin-bottom: 34px; }
.auth-tabs { display: inline-flex; gap: 25px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.auth-tab { position: relative; padding: 0 0 10px; border: 0; background: transparent; color: #84918c; cursor: pointer; font-size: 13px; }
.auth-tab.is-active { color: var(--ink); font-weight: 700; }
.auth-tab.is-active::after { position: absolute; right: 0; bottom: -10px; left: 0; height: 3px; background: var(--accent); content: ""; }
.auth-form { display: grid; gap: 17px; padding-top: 33px; }
.form-heading { margin-bottom: 6px; }
.form-heading .eyebrow { margin-bottom: 12px; }
.form-heading h2 { margin: 0 0 8px; font: 600 26px/1.35 var(--serif); letter-spacing: -.03em; }
.form-heading > p:last-child { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.auth-form label, .invite-create label { display: grid; gap: 7px; color: #52645e; font-size: 12px; font-weight: 600; }
.auth-form input, .invite-create select { width: 100%; min-height: 46px; padding: 0 13px; border: 1px solid #cdd7d0; border-radius: 3px; background: #fff; color: var(--ink); font-size: 13px; }
.auth-form input::placeholder { color: #a3aea8; }
.auth-form label small { color: var(--muted); font-size: 10px; font-weight: 400; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; padding: 0 18px; border: 1px solid transparent; border-radius: 3px; cursor: pointer; font-size: 12px; font-weight: 700; transition: background .15s ease, transform .15s ease; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button-dark { background: var(--ink); color: #f7f8f2; }
.button-dark:hover { background: #263d41; }
.button-accent { background: var(--accent); color: #fff; }
.button-accent:hover { background: var(--accent-dark); }
.button-wide { width: 100%; min-height: 49px; margin-top: 4px; }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button-small { min-height: 34px; padding: 0 11px; font-size: 10px; }
.auth-message { min-height: 20px; margin: 13px 0 0; color: var(--danger); font-size: 12px; line-height: 1.6; }
.auth-message.is-success { color: #44745d; }
.auth-privacy { margin: 13px 0 0; color: #85918c; font-size: 10px; line-height: 1.8; }

/* Workbench: a dense index rail, open surface, and paper-like capture slips. */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 242px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 28px 17px 18px; background: var(--ink); color: #edf2eb; }
.sidebar-brand { margin: 0 12px 45px; }
.sidebar-label { margin: 0 12px 12px; color: #86a198; font: 9px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.main-nav { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 0 12px; border: 0; border-radius: 3px; background: transparent; color: #bdcac3; cursor: pointer; text-align: left; font-size: 12px; }
.nav-item:hover { background: rgba(238, 245, 238, .07); color: #fff; }
.nav-item.is-active { background: rgba(220, 237, 225, .11); color: #fff; box-shadow: inset 3px 0 var(--accent); }
.nav-glyph { display: inline-grid; width: 20px; place-items: center; color: #f19a79; font-size: 15px; }
.nav-arrow { margin-left: auto; color: #ee9a79; }
.sidebar-bottom { margin-top: auto; }
.server-status { display: flex; align-items: center; gap: 8px; margin: 0 11px 16px; color: #a8bab2; font-size: 10px; }
.status-light { width: 7px; height: 7px; border-radius: 50%; background: #78c19c; box-shadow: 0 0 0 4px rgba(120, 193, 156, .12); }
.status-light.is-offline { background: #d97862; box-shadow: 0 0 0 4px rgba(217, 120, 98, .12); }
.account-card { display: flex; align-items: center; gap: 10px; padding: 13px 10px 3px; border-top: 1px solid rgba(224, 238, 227, .14); }
.account-avatar { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: #d7e7dd; color: var(--ink); font: 700 12px var(--serif); }
.account-meta { display: grid; gap: 2px; min-width: 0; }
.account-meta strong { max-width: 128px; overflow: hidden; color: #f4f6ef; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.account-meta small { color: #89a098; font-size: 9px; }
.logout-button { width: 27px; height: 27px; margin-left: auto; border: 0; border-radius: 3px; background: transparent; color: #9fb2aa; cursor: pointer; font-size: 15px; }
.logout-button:hover { background: rgba(255,255,255,.08); color: white; }
.main-content { min-width: 0; max-width: 1500px; padding: 0 clamp(24px, 5.3vw, 84px) 40px; }
.topbar { height: 66px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.breadcrumbs { display: flex; align-items: center; gap: 10px; color: #798680; font-size: 10px; }
.breadcrumbs b { color: #bdc6c0; font-weight: 400; }
.breadcrumbs strong { color: var(--ink); font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 22px; }
.build-tag { padding: 6px 9px; border: 1px solid #cfdbd3; border-radius: 2px; color: #60756c; font: 9px var(--mono); letter-spacing: .04em; }
.help-link, .text-button { border: 0; background: transparent; color: #62756d; cursor: pointer; font-size: 10px; }
.help-link span, .text-button span { margin-left: 5px; color: var(--accent); }
.help-link:hover, .text-button:hover { color: var(--accent-dark); }
.view { display: none; padding: 45px 0 0; animation: appear .28s ease both; }
.view.is-active { display: block; }
@keyframes appear { from { opacity: .6; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.page-heading .eyebrow { margin-bottom: 13px; }
.page-heading h1 { margin: 0; font: 500 clamp(36px, 4.3vw, 58px)/1.2 var(--serif); letter-spacing: -.055em; }
.heading-copy { max-width: 580px; margin: 13px 0 0; color: #74827c; font-size: 12px; line-height: 1.8; }
.heading-stamp { display: flex; align-items: center; gap: 10px; padding: 0 0 5px 13px; border-left: 1px solid #bdccc3; }
.stamp-number { color: var(--accent); font: 500 38px/.9 var(--serif); letter-spacing: -.05em; }
.stamp-caption { color: #7b8c84; font-size: 9px; line-height: 1.5; }
.mobile-break { display: none; }
.capture-box { position: relative; overflow: hidden; padding: 24px 27px 18px; border: 1px solid #d1dcd3; background: var(--surface); box-shadow: 0 8px 26px rgba(35, 59, 55, .035); }
.capture-box::before { position: absolute; top: 0; bottom: 0; left: 0; width: 4px; background: var(--accent); content: ""; }
.capture-box-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; }
.capture-box-top .eyebrow { margin-bottom: 7px; }
.capture-box-top h2, .section-heading h2 { margin: 0; font: 600 21px/1.35 var(--serif); letter-spacing: -.03em; }
.capture-mark { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid #e8b19d; border-radius: 50%; color: var(--accent); font: 19px var(--sans); }
.capture-form { display: flex; gap: 10px; }
.capture-form input { flex: 1; min-width: 0; height: 47px; padding: 0 14px; border: 1px solid #cbd6cf; border-radius: 2px; background: #fff; color: var(--ink); font-size: 12px; }
.capture-form input::placeholder { color: #9aa69f; }
.capture-form .button { min-width: 144px; }
.capture-foot { display: flex; justify-content: space-between; gap: 15px; margin-top: 13px; color: #85928c; font-size: 9px; }
.private-note { display: flex; align-items: center; gap: 6px; white-space: nowrap; color: #658675; }
.private-note i { width: 6px; height: 6px; border-radius: 50%; background: #7aaa8c; }
.collection-section, .device-list-section { margin-top: 43px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.section-tools { display: flex; align-items: center; gap: 14px; }
.section-heading .eyebrow { margin-bottom: 6px; }
.section-heading h2 { font-size: 22px; }
.status-strip { display: flex; flex-wrap: wrap; gap: 19px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #76857e; font-size: 9px; }
.status-strip span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: #9da9a3; }
.dot-pending { background: #93a39a; }
.dot-running { background: #668aa2; }
.dot-done { background: #5a9a77; }
.dot-failed { background: #df845f; }
.dot-permanent { background: #8a5e5b; }
.dot-unsupported { background: #9aa39e; }
.collection-list { display: grid; }
.collection-item { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 15px; min-height: 83px; padding: 12px 9px; border-bottom: 1px solid #dce3dd; }
.collection-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; min-height: 82px; padding: 13px 8px; border-bottom: 1px solid #dce3dd; }
.collection-info { min-width: 0; }
.collection-date { color: #99a49e; font: 9px var(--mono); }
.collection-info .collection-title { display: block; overflow: hidden; margin-top: 7px; color: var(--ink); font: 600 14px/1.5 var(--serif); text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.collection-info a.collection-title:hover { color: var(--accent-dark); }
.collection-details { margin: 4px 0 0; color: #7a8a82; font-size: 10px; }
.capture-note { width: fit-content; margin: 7px 0 0; padding: 4px 8px; border-radius: 999px; background: #e8f2ec; color: #356b53; font-size: 10px; }
.collection-error { margin: 5px 0 0; color: #a45443; font-size: 10px; line-height: 1.55; }
.collection-actions { display: flex; align-items: center; gap: 9px; }
.parse-button { padding: 5px 7px; border: 1px solid #d5ddd6; border-radius: 2px; background: transparent; color: #64776d; cursor: pointer; font-size: 9px; white-space: nowrap; }
.parse-button:hover { border-color: #d59b82; background: #fff7f2; color: #a64d31; }
.parse-button:disabled { cursor: wait; opacity: .55; }
.parse-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid #dce4de; color: #667770; font-size: 9px; white-space: nowrap; }
.parse-badge::before { width: 6px; height: 6px; border-radius: 50%; background: #93a39a; content: ""; }
.parse-running { color: #54758a; border-color: #c9d8df; background: #f2f7f8; }
.parse-running::before { background: #668aa2; }
.parse-done { color: #47755b; border-color: #d0e0d4; background: #f2f7f2; }
.parse-done::before { background: #5a9a77; }
.parse-failed { color: #ae5838; border-color: #efd2c5; background: #fff6f1; }
.parse-failed::before { background: #df845f; }
.parse-permanent { color: #8a5e5b; border-color: #e3d1cf; background: #f8f3f2; }
.parse-permanent::before { background: #8a5e5b; }
.parse-unsupported { color: #79847e; border-color: #d8dfda; background: #f1f3f0; }
.parse-unsupported::before { background: #9aa39e; }
.collection-index { display: grid; width: 34px; height: 40px; place-items: center; border: 1px solid #d4ded6; border-radius: 2px; background: #eff3ee; color: #678078; font: 10px var(--mono); }
.collection-item:first-child .collection-index { border-color: #efb9a3; background: #fcf0ea; color: var(--accent-dark); }
.collection-main { min-width: 0; }
.collection-title { display: block; overflow: hidden; color: var(--ink); font: 600 14px/1.5 var(--serif); text-overflow: ellipsis; white-space: nowrap; }
.collection-url { display: block; overflow: hidden; margin-top: 4px; color: #89958f; font: 9px/1.5 var(--mono); text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.collection-url:hover { color: var(--accent-dark); }
.collection-meta { display: flex; align-items: center; gap: 8px; }
.platform-tag { padding: 4px 6px; background: #e8eee9; color: #62776c; font-size: 8px; }
.parse-state { display: inline-flex; align-items: center; gap: 6px; min-width: 65px; color: #667770; font-size: 9px; white-space: nowrap; }
.parse-state::before { width: 6px; height: 6px; border-radius: 50%; background: #93a39a; content: ""; }
.parse-state[data-state="parsed"] { color: #47755b; }
.parse-state[data-state="parsed"]::before { background: #5a9a77; }
.parse-state[data-state="processing"]::before { background: #668aa2; }
.parse-state[data-state="failed"] { color: #ae5838; }
.parse-state[data-state="failed"]::before { background: #df845f; }
.parse-state[data-state="permanent_failure"] { color: #8a5e5b; }
.parse-state[data-state="permanent_failure"]::before { background: #8a5e5b; }
.loading-line, .empty-state { padding: 34px 16px; color: #86938d; font-size: 11px; text-align: center; }
.empty-state { border-bottom: 1px solid #dce3dd; }
.empty-symbol { display: block; margin-bottom: 9px; color: var(--accent); font: 30px var(--serif); }
.empty-state strong { display: block; margin-bottom: 5px; color: #4f635c; font: 600 16px var(--serif); }
.empty-state p { margin: 0; }
.bridge-note { display: flex; align-items: center; gap: 13px; margin-top: 32px; padding: 16px 18px; border: 1px dashed #bfcec4; background: rgba(251, 252, 248, .62); }
.bridge-icon { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: var(--mint); color: #527466; font-size: 19px; }
.bridge-note > div { flex: 1; min-width: 0; }
.bridge-note strong { color: #415a50; font: 600 12px var(--serif); }
.bridge-note p { margin: 4px 0 0; color: #7d8b84; font-size: 9px; line-height: 1.65; }
.page-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 34px; padding-top: 12px; border-top: 1px solid #d7dfd8; color: #98a39d; font: 8px var(--mono); letter-spacing: .03em; }
.compact-heading { align-items: flex-start; margin-bottom: 31px; }
.compact-heading h1 { font-size: clamp(34px, 4vw, 48px); }
.heading-icon { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid #ddad98; border-radius: 50%; color: var(--accent); font-size: 20px; }
.device-intro { padding: 25px 26px; border: 1px solid #d3ddd5; background: var(--surface); }
.device-intro .eyebrow, .invite-create .eyebrow { margin-bottom: 9px; }
.device-intro h2, .invite-create h2 { margin: 0; font: 600 22px/1.35 var(--serif); }
.device-intro > p:not(.eyebrow), .invite-create p:not(.eyebrow) { max-width: 590px; margin: 8px 0 18px; color: #7a8881; font-size: 11px; line-height: 1.8; }
.bridge-downloads { margin-top: 18px; padding: 24px; border: 1px solid #d3ddd5; background: #e7eee7; }
.download-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; }
.download-heading .eyebrow { margin-bottom: 9px; }
.download-heading h2 { margin: 0; font: 600 22px/1.35 var(--serif); }
.download-heading p:not(.eyebrow) { max-width: 570px; margin: 7px 0 0; color: #64766d; font-size: 11px; line-height: 1.75; }
.download-mark { display: grid; width: 45px; height: 45px; flex: 0 0 auto; place-content: center; border: 1px solid #81988c; border-radius: 50%; color: #526a5e; font: 700 11px/1.2 var(--serif); text-align: center; transform: rotate(-7deg); }
.download-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.download-card { min-width: 0; padding: 18px; border: 1px solid #d3ddd5; background: var(--surface); }
.tool-line { display: flex; align-items: center; gap: 9px; }
.tool-line .eyebrow { font-size: 9px; }
.tool-symbol { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; background: var(--mint); color: #48695b; font: 17px var(--mono); }
.helper-card .tool-symbol { border-radius: 3px; background: #f9e3d8; color: var(--accent-dark); }
.download-card h3 { margin: 15px 0 5px; color: #30453f; font: 600 17px/1.4 var(--serif); }
.tool-copy { min-height: 38px; margin: 0; color: #74827b; font-size: 10px; line-height: 1.75; }
.download-button { display: inline-flex; min-height: 38px; align-items: center; justify-content: space-between; gap: 18px; margin-top: 15px; text-decoration: none; font-size: 10px; }
.button-light { border: 1px solid #bdcec3; background: #edf4ed; color: #34574a; }
.button-light:hover { background: #dcebe0; }
.install-note { margin: 14px 0 0; padding-top: 11px; border-top: 1px solid #e0e7e0; color: #7b8881; font-size: 9px; line-height: 1.8; }
.install-note strong { margin-right: 5px; color: #526a5e; font-weight: 700; }
.download-boundary { display: flex; align-items: flex-start; gap: 8px; margin: 13px 1px 0; color: #86634f; font-size: 9px; line-height: 1.7; }
.download-boundary span { display: grid; width: 14px; height: 14px; flex: 0 0 auto; place-items: center; border: 1px solid #cfa88f; border-radius: 50%; font: 9px var(--mono); }
.pair-code-result { display: inline-flex; align-items: center; gap: 13px; margin-left: 13px; padding: 9px 12px; border: 1px dashed #d5a58e; background: #fff7f1; color: #6c4739; }
.pair-code-result code { color: #9d452b; font: 700 13px var(--mono); letter-spacing: .06em; }
.pair-code-result small { color: #9b8175; font-size: 9px; }
.device-list, .invitation-list { display: grid; border-top: 1px solid var(--line); }
.device-row, .invitation-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; min-height: 62px; padding: 10px 5px; border-bottom: 1px solid #dce3dd; }
.device-row strong, .invitation-row strong { display: block; color: #43574f; font: 600 12px var(--serif); }
.device-row small, .invitation-row small { display: block; margin-top: 4px; color: #8b9791; font: 9px var(--mono); }
.device-state { color: #5a8b6e; font-size: 9px; }
.device-state.is-revoked { color: #9a6258; }
.danger-button { padding: 6px 9px; border: 1px solid #e2c5bd; border-radius: 2px; background: transparent; color: #a45443; cursor: pointer; font-size: 9px; }
.danger-button:hover { background: #fff1ed; }
.danger-button:disabled { cursor: wait; opacity: .58; }
.invite-create { display: grid; grid-template-columns: 1fr; gap: 14px; padding: 23px 26px; border: 1px solid #d3ddd5; background: var(--surface); }
.invite-create > div:first-child { max-width: 600px; }
.invite-create form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.invite-create label { width: 145px; }
.invite-create select { min-height: 40px; }
.invite-code-result { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; border: 1px dashed #d5a58e; background: #fff7f1; color: #84513f; font-size: 10px; }
.invite-code-result code { overflow-wrap: anywhere; color: #9d452b; font: 700 12px var(--mono); }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; max-width: min(420px, calc(100vw - 48px)); padding: 12px 16px; border: 1px solid rgba(235, 244, 235, .16); border-radius: 3px; background: var(--ink); color: #f6f6ef; box-shadow: 0 8px 26px rgba(20, 40, 40, .2); font-size: 11px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .18s, transform .18s; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast.is-error { background: #873f36; }

@media (max-width: 940px) {
  .app-shell { grid-template-columns: 205px minmax(0, 1fr); }
  .sidebar { padding-right: 12px; padding-left: 12px; }
  .main-content { padding-right: 28px; padding-left: 28px; }
  .auth-screen { grid-template-columns: minmax(300px, .85fr) minmax(390px, 1.15fr); }
}
@media (max-width: 700px) {
  .auth-screen { grid-template-columns: 1fr; }
  .auth-story { display: none; }
  .auth-panel-wrap { min-height: 100vh; align-items: start; padding: 22px 22px 36px; }
  .auth-panel { width: min(100%, 460px); margin: 0 auto; }
  .auth-mobile-brand { display: inline-flex; }
  .auth-form { padding-top: 27px; }
  .app-shell { display: block; padding-bottom: 65px; }
  .sidebar { position: fixed; z-index: 10; inset: auto 0 0; width: 100%; height: 62px; padding: 0 8px; }
  .sidebar-brand, .sidebar-label, .sidebar-bottom { display: none; }
  .main-nav { display: flex; justify-content: space-around; height: 100%; gap: 2px; }
  .nav-item { min-width: 82px; min-height: 50px; flex-direction: column; justify-content: center; gap: 2px; padding: 5px 8px; font-size: 9px; }
  .nav-item.is-active { box-shadow: inset 0 3px var(--accent); }
  .nav-glyph { font-size: 14px; }
  .nav-arrow { display: none; }
  .main-content { padding: 0 18px 25px; }
  .topbar { height: 54px; }
  .topbar-right { gap: 9px; }
  .build-tag { padding: 5px 6px; font-size: 8px; }
  .help-link { font-size: 9px; }
  .view { padding-top: 30px; }
  .page-heading { align-items: flex-start; margin-bottom: 23px; }
  .page-heading h1 { font-size: clamp(34px, 10vw, 47px); }
  .heading-stamp { gap: 6px; padding-left: 8px; }
  .stamp-number { font-size: 30px; }
  .mobile-break { display: initial; }
  .capture-box { padding: 19px 15px 14px; }
  .capture-form { flex-direction: column; }
  .capture-form .button { width: 100%; }
  .capture-foot { align-items: flex-start; flex-direction: column; gap: 7px; }
  .status-strip { gap: 10px 14px; }
  .section-heading { align-items: flex-start; flex-wrap: wrap; }
  .section-tools { width: 100%; justify-content: flex-end; }
  .collection-item { grid-template-columns: 34px minmax(0, 1fr); gap: 10px; }
  .collection-row { align-items: flex-start; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .collection-actions { flex-wrap: wrap; }
  .collection-index { width: 30px; height: 36px; }
  .collection-meta { grid-column: 2; justify-content: space-between; }
  .collection-title { font-size: 12px; }
  .bridge-note { align-items: flex-start; flex-wrap: wrap; padding: 13px; }
  .bridge-note > div { width: calc(100% - 48px); }
  .bridge-note .text-button { margin-left: 44px; }
  .page-footer { flex-direction: column; }
  .compact-heading { gap: 12px; }
  .compact-heading h1 { font-size: 34px; }
  .device-intro { padding: 19px 16px; }
  .bridge-downloads { padding: 17px 15px; }
  .download-heading h2 { font-size: 19px; }
  .download-grid { grid-template-columns: 1fr; gap: 9px; margin-top: 15px; }
  .download-card { padding: 15px; }
  .tool-copy { min-height: 0; }
  .pair-code-result { display: flex; flex-wrap: wrap; margin: 13px 0 0; }
  .invite-create { padding: 18px 16px; }
  .invite-create form { align-items: stretch; }
  .invite-create label { flex: 1 1 120px; }
  .invite-create form button { width: 100%; }
  .device-row, .invitation-row { grid-template-columns: minmax(0, 1fr) auto; }
  .device-row .device-state, .invitation-row .device-state { grid-column: 1; }
  .device-row .danger-button, .invitation-row .danger-button { grid-column: 2; grid-row: 1 / span 2; }
}
