@font-face {
  font-family: 'DM Sans'; font-style: normal; font-weight: 100 1000; font-display: swap;
  src: url('/fonts/dm-sans-latin-wght-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope'; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url('/fonts/manrope-latin-wght-normal.woff2') format('woff2');
}

* { box-sizing: border-box; }
body { margin: 0; font-size: 17px; line-height: 1.5; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; border: 0; background: none; color: inherit; }
button:disabled { opacity: .5; cursor:not-allowed; }
button, a, input, textarea, select { outline-offset: 4px; }
:focus-visible { outline: 3px solid var(--accent); }
.sidebar :focus-visible { outline-color: var(--accent); }
a { color: var(--accent); }
svg { width: 21px; height: 21px; flex-shrink: 0; stroke-width: 1.7; }
h1, h2, h3 { font-family: var(--font-display); }
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px; position: fixed; inset: 0 auto 0 0; z-index: 4;
  background: var(--sidebar); color: var(--muted);
  display: flex; flex-direction: column; padding: 27px 16px 18px; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 11px; margin: 0 14px; color: var(--ink); font-family: var(--font-display); font-size: 40px; font-weight: 750; letter-spacing: -1.8px; }
.brand svg { width: 34px; height: 34px; color: var(--accent); stroke-width: 2.3; }
.brand-period { color: var(--accent); margin-left: -10px; }
.brand-tagline { margin: 4px 14px 31px; color: var(--muted); font-size: 14px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 11px 14px; border-radius: 9px; margin: 4px 0; font-size: 16px; font-weight: 500; text-align: left; transition: background .15s, color .15s; }
.nav-item:hover { background: var(--surface-raised); color: var(--ink); }
.nav-item.active { background: var(--surface-raised); color: var(--ink); }
.nav-item.active svg { color: var(--accent); }
.nav-item .count { margin-left: auto; background: var(--surface-raised); color: var(--muted); font-size: 14px; font-weight: 700; min-width: 23px; padding: 1px 6px; text-align: center; border-radius: 5px; }
.sidebar-label { display: flex; align-items: center; justify-content: space-between; font-size: 14px; font-weight: 650; letter-spacing: 1.8px; margin: 22px 14px 8px; color: var(--muted); }
.sidebar-label button { min-width: 32px; min-height: 32px; padding: 6px; display: grid; place-items: center; color: var(--muted); border-radius: 6px; }
.sidebar-label button:hover { background: var(--surface-raised); }
.sidebar-label svg { width: 17px; height: 17px; }
.channel-nav { padding-top: 10px; padding-bottom: 10px; font-size: 16px; }
.channel-mark { width: 9px; height: 9px; border-radius: 3px; background: var(--surface-raised); flex-shrink: 0; }
.channel-mark.blue { background: var(--surface-raised); }
.channel-mark.amber { background: var(--surface-raised); }
.channel-mark.rose { background: var(--surface-raised); }
.sidebar-bottom { margin-top: auto; padding-top: 24px; }
.network-pill { margin: 17px 13px 9px; padding-top: 17px; border-top: 1px solid var(--line); font-size: 14px; display: flex; align-items: center; gap: 8px; color: var(--muted); }
button.network-pill { width: calc(100% - 26px); background: transparent; border: none; border-top: 1px solid var(--line); padding: 17px 0 9px 0; margin: 0 13px; cursor: pointer; text-align: left; font: inherit; transition: color 0.15s ease; }
button.network-pill:hover { color: var(--ink); }
.dot { width: 7px; height: 7px; background: var(--surface-raised); border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot.online { background: #10b981; box-shadow: 0 0 6px rgba(16, 185, 129, 0.45); }
.dot.remote { background: #38bdf8; box-shadow: 0 0 6px rgba(56, 189, 248, 0.45); }
.device-self { display: flex; align-items: center; gap: 10px; padding: 13px 12px 3px; }
.self-icon { width: 35px; height: 35px; background: var(--surface-raised); display: grid; place-items: center; border-radius: 9px; color: var(--muted); flex-shrink: 0; }
.device-self strong { display: block; color: var(--ink); font-weight: 550; font-size: 14px; max-width: 155px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-self small { display: block; color: var(--muted); font-size: 14px; margin-top: 3px; }
.main { margin-left: 248px; flex: 1; min-width: 0; }
.topbar { height: 76px; border-bottom: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; justify-content: space-between; padding: 0 36px; }
.breadcrumbs { display: flex; align-items: center; gap: 13px; color: var(--muted); font-size: 16px; }
.breadcrumbs svg { width: 18px; height: 18px; }
.breadcrumbs strong { font-weight: 550; color: var(--ink); }
.top-actions { display: flex; align-items: center; gap: 21px; }
.connection { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.connection .dot { background: var(--surface-raised); }
.top-help, .top-device { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; color: var(--muted); }
.top-help svg { width: 17px; height: 17px; }
.top-help:hover { color: var(--accent); }
.top-device { background: var(--surface-raised); padding: 0 12px; border-radius: 8px; color: var(--muted); }
.content { max-width: 1600px; margin: auto; padding: 36px 36px 24px; }
.eyebrow { font-size: 14px; letter-spacing: 1.8px; color: var(--accent); font-weight: 700; margin: 0 0 9px; }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.page-title h1 { font-size: 40px; letter-spacing: -1.3px; line-height: 1.25; margin: 0 0 11px; font-weight: 750; color: var(--ink); }
.page-title p { color: var(--muted); font-size: 17px; margin: 0; line-height: 1.7; max-width: 650px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 11px 17px; border-radius: 8px; font-size: 16px; font-weight: 600; white-space: nowrap; min-height: 44px; line-height: 1.3; transition: background .15s, transform .15s; }
.button:active { transform: translateY(1px); }
.button.primary { background: var(--accent); color: var(--muted); box-shadow: 0 3px 8px #00000044; }
.button.primary:hover { background: var(--accent-hover); }
.button.secondary { background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.button.secondary:hover { background: var(--surface-raised); }
.button.ghost { color: var(--muted); font-weight: 500; }
.button.ghost:hover { background: var(--surface-raised); }
.button.danger { background: var(--surface-raised); color: var(--muted); }
.button.send { background: var(--surface-raised); color: var(--muted); padding: 9px 12px; min-height: 40px; font-size: 14px; }
.button.send:hover { background: var(--surface-raised); }
.button.small { padding: 9px 12px; font-size: 14px; min-height: 40px; }
.button svg { width: 18px; height: 18px; }
.actions-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hero { background: var(--surface-raised); border: 1px solid var(--line); position: relative; overflow: hidden; border-radius: 14px; min-height: 219px; display: flex; align-items: center; padding: 31px 32px; margin-bottom: 29px; }
.hero-copy { max-width: 450px; z-index: 1; }
.hero h2 { font-weight: 700; font-size: 34px; letter-spacing: -.9px; line-height: 1.25; margin: 0 0 12px; color: var(--ink); }
.hero p { font-size: 16px; line-height: 1.8; color: var(--muted); margin: 0 0 18px; max-width: 375px; }
.hero .button { background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
.hero-art { margin-left: auto; width: 310px; height: 160px; display: flex; align-items: center; justify-content: center; position: relative; flex-shrink: 0; }
.art-device { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 18px 22px; box-shadow: 0 15px 35px #00000044; z-index: 1; text-align: center; transform: rotate(-7deg); }
.art-device:last-child { transform: rotate(7deg); margin-left: 67px; }
.art-device svg { width: 46px; height: 46px; color: var(--muted); stroke-width: 1.2; }
.art-device small { font-size: 14px; color: var(--muted); display: block; margin-top: 6px; }
.art-bridge { position: absolute; top: 70px; left: 111px; display: flex; gap: 8px; align-items: center; color: var(--muted); }
.art-bridge:before, .art-bridge:after { content: ''; border-top: 2px dotted var(--line); width: 15px; }
.art-bridge span { width: 36px; height: 36px; background: var(--surface-raised); border: 5px solid var(--line); border-radius: 50%; display: grid; place-items: center; }
.art-bridge svg { width: 17px; height: 17px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; margin: 28px 0 16px; gap: 15px; }
.section-heading h2 { font-size: 19px; font-weight: 700; letter-spacing: -.35px; margin: 0; display: flex; gap: 11px; align-items: center; }
.section-heading h2 small { font-family: 'DM Sans', sans-serif; font-size: 14px; color: var(--muted); font-weight: 450; }
.text-link { font-size: 14px; color: var(--accent); display: inline-flex; align-items: center; gap: 7px; min-height: 36px; font-weight: 500; }
.text-link:hover { color: var(--accent); text-decoration: underline; }
.text-link svg { width: 16px; height: 16px; }
.channel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.channel-card { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 22px; text-align: left; transition: transform .15s, box-shadow .15s; min-height: 174px; display: flex; flex-direction: column; }
.channel-card:hover { transform: translateY(-2px); box-shadow: 0 5px 18px #00000044; border-color: var(--line); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 19px; gap: 10px; }
.channel-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--surface-raised); display: grid; place-items: center; color: var(--muted); flex-shrink: 0; }
.channel-icon.blue { background: var(--surface-raised); color: var(--muted); }
.channel-icon.amber { background: var(--surface-raised); color: var(--muted); }
.channel-icon.rose { background: var(--surface-raised); color: var(--muted); }
.card-top .pill { font-size: 14px; font-weight: 500; padding: 4px 7px; color: var(--muted); background: var(--surface-raised); border-radius: 4px; }
.channel-card h3 { font-weight: 700; font-size: 18px; letter-spacing: -.3px; margin: 0 0 10px; }
.card-meta { color: var(--muted); font-size: 14px; display: flex; gap: 8px; align-items: center; }
.add-channel { border: 1px dashed var(--line); background: transparent; justify-content: center; align-items: center; gap: 9px; color: var(--muted); font-size: 14px; }
.add-channel svg { color: var(--muted); width: 26px; height: 26px; margin-bottom: 4px; }
.bottom-grid { display: grid; grid-template-columns: minmax(0, 1fr) 275px; gap: 23px; margin-top: 5px; }
.panel { border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.files-panel { overflow: hidden; }
.file-table-head { display: grid; grid-template-columns: minmax(0, 1fr) 73px 178px; gap: 12px; padding: 12px 20px; background: var(--surface-raised); border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 650; letter-spacing: .5px; color: var(--muted); }
.file-table-head span:last-child { text-align: right; padding-right: 13px; }
.file-row { display: grid; grid-template-columns: 37px minmax(100px, 1fr) 73px auto; align-items: center; gap: 11px; padding: 18px 20px; border-bottom: 1px solid var(--line); min-height: 88px; transition: background .15s; }
.file-row.selectable { grid-template-columns: 21px 37px minmax(100px, 1fr) 73px auto; }
.file-row:last-child { border-bottom: 0; }
.file-row.selected { background: var(--surface-raised); }
.file-row:hover { background: var(--surface-raised); }
.file-symbol { height: 44px; width: 36px; background: var(--surface-raised); color: var(--muted); border-radius: 7px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.file-symbol.pdf, .file-symbol.slides { background: var(--surface-raised); color: var(--muted); }
.file-symbol.img { background: var(--surface-raised); color: var(--muted); }
.file-symbol.zip { background: var(--surface-raised); color: var(--muted); }
.file-symbol svg { width: 18px; height: 18px; }
.file-symbol small { font-size: 14px; font-weight: 750; letter-spacing: .3px; }
.file-description { min-width: 0; }
.file-name { font-size: 16px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.file-sub { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--muted); margin-top: 5px; }
.file-size { font-size: 14px; color: var(--muted); white-space: nowrap; }
.file-actions { display: flex; align-items: center; gap: 4px; }
.file-row input[type=checkbox] { accent-color: var(--accent); width: 17px; height: 17px; margin: 0; cursor: pointer; }
.badge { font-size: 14px; font-weight: 550; display: inline-flex; align-items: center; gap: 5px; background: var(--surface-raised); color: var(--muted); border-radius: 5px; padding: 5px 8px; width: fit-content; white-space: nowrap; }
.badge svg { width: 12px; height: 12px; }
.badge.warn { background: var(--surface-raised); color: var(--muted); }
.badge.muted { background: var(--surface-raised); color: var(--muted); }
.badge.danger { background: var(--surface-raised); color: var(--muted); }
.icon-button { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 7px; color: var(--muted); flex-shrink: 0; }
.icon-button:hover { background: var(--surface-raised); color: var(--accent); }
.icon-button svg { width: 20px; height: 20px; }
.network-panel { padding: 22px; min-height: 230px; display: flex; flex-direction: column; }
.network-title { display: flex; align-items: center; justify-content: space-between; font-size: 16px; font-weight: 650; margin-bottom: 16px; }
.network-title svg { color: var(--muted); }
.network-item { display: flex; gap: 12px; align-items: center; padding: 13px 0; }
.network-item .channel-icon { width: 35px; height: 35px; background: var(--surface-raised); color: var(--muted); }
.network-item strong { font-size: 14px; font-weight: 600; display: block; overflow-wrap: anywhere; }
.network-item small { font-size: 14px; color: var(--muted); display: block; margin-top: 4px; }
.network-item > .dot { margin-left: auto; }
.network-empty { font-size: 14px; color: var(--muted); line-height: 1.85; margin: 3px 0 17px; }
.network-panel > .text-link { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; }
.footer { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 14px; margin-top: 34px; padding-top: 19px; border-top: 1px solid var(--line); }
.footer svg { width: 14px; height: 14px; }
.footer span:last-child { margin-left: auto; font-size: 14px; letter-spacing: 1px; }
.empty { padding: 43px 24px; text-align: center; color: var(--muted); }
.empty .empty-icon { width: 51px; height: 51px; display: grid; place-items: center; background: var(--surface-raised); border-radius: 13px; margin: 0 auto 17px; color: var(--muted); }
.empty p { font-size: 16px; line-height: 1.8; margin: 9px auto 20px; max-width: 390px; }
.empty strong { font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: 19px; }
.empty.compact { padding: 30px 22px; }
.toolbar { display: flex; justify-content: space-between; gap: 15px; align-items: center; margin-bottom: 17px; min-height: 44px; }
.tabs { display: flex; gap: 29px; border-bottom: 1px solid var(--line); margin-bottom: 25px; }
.tabs button { display: flex; align-items: center; gap: 8px; padding: 15px 0 14px; min-height: 54px; color: var(--muted); border-bottom: 3px solid transparent; font-size: 17px; font-weight: 550; }
.tabs button.active { color: var(--accent); border-color: var(--accent); font-weight: 700; }
.tabs button span { border-radius: 5px; background: var(--surface-raised); color: var(--muted); padding: 1px 6px; font-size: 14px; }
.tabs button.active span { background: var(--surface-raised); color: var(--accent); }
.search { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--surface); padding: 10px 12px; border-radius: 8px; max-width: 270px; min-height: 44px; }
.search svg { width: 18px; height: 18px; color: var(--muted); }
.search input { width: 100%; border: 0; outline: 0; font-size: 16px; color: var(--ink); background: transparent; }
.search:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.search input: :placeholder { color: var(--muted); }
.channel-summary { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-top: -2px; margin-bottom: 18px; color: var(--muted); font-size: 14px; }
.channel-summary > span { display: inline-flex; align-items: center; gap: 7px; }
.channel-summary svg { width: 15px; height: 15px; }
.channel-summary .channel-privacy { color: var(--muted); }
.channel-layout { display: grid; grid-template-columns: minmax(0, 1fr) 252px; gap: 25px; align-items: start; }
.channel-files { min-width: 0; }
.channel-drop-hint { margin-top: 18px; border: 1px dashed var(--line); border-radius: 8px; min-height: 61px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 14px; padding: 14px; }
.channel-drop-hint svg { width: 18px; height: 18px; }
.section-note { font-size: 14px; line-height: 1.85; color: var(--muted); margin: 17px 0; }
.section-note svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.connection-guide { padding: 23px 21px; border: 1px solid var(--line); background: var(--surface-raised); border-radius: 11px; }
.guide-label { font-size: 14px; font-weight: 750; letter-spacing: 1.5px; color: var(--muted); }
.guide-symbol { display: none; width: 45px; height: 45px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-raised); color: var(--muted); margin: 20px 0 16px; }
.guide-symbol svg { width: 26px; height: 26px; }
.connection-guide h2 { font-size: 24px; font-weight: 750; line-height: 1.4; letter-spacing: -.6px; margin: 15px 0 10px; color: var(--ink); }
.connection-guide > p { font-size: 14px; line-height: 1.85; color: var(--muted); margin: 0; }
.guide-steps { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 15px; }
.guide-steps li { display: flex; align-items: flex-start; gap: 10px; }
.guide-steps li > span { width: 23px; height: 23px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--accent); font-size: 14px; font-weight: 650; flex-shrink: 0; }
.guide-steps li.done > span { background: var(--surface-raised); border-color: var(--line); color: var(--muted); }
.guide-steps svg { width: 13px; height: 13px; }
.guide-steps strong { display: block; color: var(--ink); font-size: 14px; font-weight: 700; }
.guide-steps small { display: block; font-size: 14px; line-height: 1.7; color: var(--muted); margin-top: 4px; }
.connection-guide > .button { width: 100%; font-size: 14px; }
.guide-help { display: flex; align-items: center; justify-content: center; gap: 5px; width: 100%; font-size: 14px; min-height: 43px; color: var(--muted); margin-top: 4px; }
.guide-help svg { width: 13px; height: 13px; }
.guide-foot { display: flex; align-items: flex-start; gap: 6px; font-size: 14px; color: var(--muted); margin-top: 14px; padding-top: 17px; border-top: 1px solid var(--line); }
.guide-foot svg { width: 12px; height: 12px; margin-top: 1px; }
.notice { border: 1px solid var(--line); background: var(--surface-raised); color: var(--muted); border-radius: 9px; padding: 15px 18px; line-height: 1.85; font-size: 14px; margin-bottom: 23px; display: flex; align-items: flex-start; gap: 11px; }
.notice svg { width: 19px; height: 19px; margin-top: 3px; }
.notice.info { background: var(--surface-raised); border-color: var(--line); color: var(--muted); }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 21px; }
.settings-panel { padding: 26px; }
.settings-panel > .channel-icon { margin-bottom: 20px; }
.settings-panel h3 { font-size: 20px; margin: 0 0 13px; font-weight: 700; letter-spacing: -.4px; }
.settings-panel p { font-size: 16px; color: var(--muted); line-height: 1.85; margin: 0 0 20px; }
.settings-panel .badge { margin-bottom: 18px; }
.detail-line { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.detail-line strong { color: var(--ink); font-weight: 550; text-align: right; overflow-wrap: anywhere; }
.connection-address-bar { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 25px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: 11px; margin-bottom: 24px; }
.address-label { display: flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 650; color: var(--muted); letter-spacing: 1px; }
.address-label svg { width: 16px; height: 16px; }
.connection-address-bar strong { display: block; margin-top: 9px; font-family: ui-monospace, 'SFMono-Regular', monospace; font-weight: 500; font-size: 22px; color: var(--muted); letter-spacing: -.5px; }
.device-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 19px; }
.device-card { padding: 25px; }
.device-card h3 { font-size: 20px; font-weight: 700; margin: 16px 0 10px; }
.device-card p { font-size: 14px; color: var(--muted); line-height: 1.85; margin: 0 0 18px; overflow-wrap: anywhere; }
.pair-code { font-family: ui-monospace, 'SFMono-Regular', monospace; font-size: 32px; letter-spacing: 2px; padding: 23px; background: var(--surface-raised); border-radius: 10px; text-align: center; color: var(--accent); margin: 22px 0; }
.message-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 22px; }
.message { padding: 22px 25px; }
.message-header { font-size: 14px; color: var(--muted); display: flex; justify-content: space-between; gap: 20px; }
.message-header strong { color: var(--accent); font-weight: 650; }
.message p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 17px; line-height: 1.85; margin: 11px 0 0; color: var(--ink); }
.message-composer { display: flex; align-items: flex-end; gap: 15px; padding: 18px; }
.message-composer textarea { border: 0; resize: vertical; min-height: 80px; width: 100%; outline: 0; font-size: 17px; padding: 7px; line-height: 1.7; background: transparent; }
.activity-row { display: flex; gap: 15px; align-items: center; padding: 21px 24px; border-bottom: 1px solid var(--line); }
.activity-row:last-child { border: 0; }
.activity-row strong { display: block; font-size: 16px; font-weight: 650; margin-bottom: 5px; }
.activity-row p { font-size: 14px; color: var(--muted); margin: 0; overflow-wrap: anywhere; }
.activity-row > small { margin-left: auto; white-space: nowrap; font-size: 14px; color: var(--muted); }
.share-row { display: flex; align-items: center; padding: 23px; gap: 15px; border-bottom: 1px solid var(--line); }
.share-row:last-child { border: 0; }
.share-row .share-info { flex: 1; min-width: 0; }
.share-row strong { display: block; font-size: 16px; font-weight: 650; overflow-wrap: anywhere; }
.share-row small { display: block; font-size: 14px; color: var(--muted); margin-top: 7px; }
.share-row .badge { margin-right: 12px; }
.transfer-row { padding: 24px; border-bottom: 1px solid var(--line); }
.transfer-row:last-child { border-bottom: 0; }
.transfer-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; font-size: 18px; }
.transfer-head small { display: block; color: var(--muted); font-size: 14px; margin-top: 7px; }
.transfer-progress { width: 100%; height: 7px; margin: 19px 0 11px; border: 0; border-radius: 5px; appearance: none; background: var(--surface-raised); }
.transfer-progress: :-webkit-progress-bar { background: var(--surface-raised); border-radius: 5px; }
.transfer-progress: :-webkit-progress-value { background: var(--surface-raised); border-radius: 5px; }
.transfer-meta { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--muted); }
.modal-backdrop { position: fixed; inset: 0; background: #080c08b8; backdrop-filter: blur(5px); z-index: 20; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 30px 120px #00000044; width: 520px; max-height: 90vh; overflow: auto; padding: 30px; animation: enter .15s ease-out; }
.modal.wide { width: 660px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.modal-header h2 { font-size: 26px; letter-spacing: -.7px; margin: 0; font-weight: 750; overflow-wrap: anywhere; }
.modal > p { font-size: 16px; color: var(--muted); line-height: 1.8; margin: 0 0 24px; }
.modal label { display: block; font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 9px; margin-top: 18px; }
.modal input:not([type=checkbox]), .modal textarea, .modal select { display: block; width: 100%; min-height: 47px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 8px; font-size: 17px; color: var(--ink); background: var(--surface); }
.modal textarea { resize: vertical; min-height: 95px; line-height: 1.7; }
.modal input:focus, .modal textarea:focus { border-color: var(--line); outline: 2px solid var(--accent); }
.modal .modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 11px; margin-top: 26px; }
.modal .check { display: flex; align-items: flex-start; gap: 11px; font-weight: 450; line-height: 1.7; color: var(--muted); }
.modal .check input { accent-color: var(--accent); margin-top: 4px; width: 17px; height: 17px; flex-shrink: 0; }
.qr { display: block; width: 220px; height: 220px; margin: 20px auto; border: 1px solid var(--line); border-radius: 10px; }
.secret { font-size: 14px; background: var(--surface-raised); padding: 14px; border-radius: 7px; word-break: break-all; font-family: ui-monospace, monospace; letter-spacing: .7px; }
.modal .hint { font-size: 14px; line-height: 1.85; color: var(--muted); margin-top: 13px; }
.modal .error { color: var(--muted); font-size: 14px; margin-top: 16px; line-height: 1.7; }
.modal pre { background: #0b0f0c; color: var(--muted); padding: 20px; border-radius: 9px; font-size: 14px; line-height: 1.75; overflow: auto; max-height: 300px; }
.modal .file-choice { display: flex; align-items: center; gap: 11px; padding: 13px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 9px; font-size: 14px; overflow-wrap: anywhere; }
.file-choice input { accent-color: var(--accent); width: 17px; height: 17px; flex-shrink: 0; }
.help-steps { list-style: none; margin: 25px 0; padding: 0; display: grid; gap: 21px; }
.help-steps li { display: flex; align-items: flex-start; gap: 13px; }
.help-steps li > span { border-radius: 50%; background: var(--surface-raised); color: var(--muted); font-size: 14px; font-weight: 700; width: 28px; height: 28px; flex-shrink: 0; display: grid; place-items: center; }
.help-steps strong { font-size: 17px; color: var(--ink); }
.help-steps p { font-size: 14px; line-height: 1.85; margin: 6px 0 0; color: var(--muted); }
.help-address { padding: 16px 18px; border: 1px solid var(--line); background: var(--surface-raised); border-radius: 9px; }
.help-address span { display: block; font-size: 14px; color: var(--muted); }
.help-address code { font-size: 19px; color: var(--muted); display: block; margin-top: 7px; }
.drop-area { border: 1px dashed var(--line); border-radius: 12px; padding: 34px 20px; text-align: center; background: var(--surface-raised); color: var(--muted); margin-top: 22px; width: 100%; }
.drop-area svg { width: 32px; height: 32px; margin-bottom: 12px; }
.drop-area strong { font-size: 18px; display: block; font-weight: 650; }
.drop-area span { font-size: 14px; display: block; margin-top: 10px; color: var(--muted); }
.drop-overlay { position: fixed; inset: 14px; border: 2px dashed var(--line); background: #080c08b8; z-index: 15; display: flex; align-items: center; justify-content: center; pointer-events: none; border-radius: 20px; font-size: 34px; color: var(--muted); }
.security-alert { background: var(--surface-raised); border: 1px solid var(--line); border-radius: 9px; padding: 16px 20px; display: flex; align-items: center; gap: 13px; margin-bottom: 23px; font-size: 14px; color: var(--muted); }
.security-alert button { margin-left: auto; color: var(--muted); font-size: 14px; font-weight: 700; min-height: 40px; }
.security-alert svg { width: 19px; height: 19px; }
.no-session { max-width: 460px; margin: 20vh auto; padding: 30px; color: var(--muted); line-height: 1.8; }
.no-session h1 { color: var(--ink); }
#toast { position: fixed; bottom: 28px; left: calc(50% + 124px); transform: translateX(-50%) translateY(15px); background: #0b0f0c; color: var(--muted); border: 1px solid var(--line); padding: 15px 22px; border-radius: 10px; font-size: 16px; box-shadow: 0 10px 35px #00000044; z-index: 50; opacity: 0; pointer-events: none; transition: .2s; max-width: 600px; }
#toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 1600px) {
  .content { padding: 42px 50px 28px; }
  .topbar { padding: 0 50px; }
  .channel-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 30px; }
  .connection-guide { padding: 26px; }
  .hero-art { margin-right: 35px; }
}
@media (max-width: 1230px) {
  .channel-layout { grid-template-columns: minmax(0, 1fr); }
  .connection-guide { display: grid; grid-template-columns: 1fr 1fr; gap: 0 30px; margin-top: 10px; }
  .guide-label, .guide-symbol { display: none; }
  .connection-guide h2 { grid-column: 1; font-size: 22px; }
  .connection-guide > p { grid-column: 1; }
  .guide-steps { grid-column: 2; grid-row: 1 / span 4; margin: 0; }
  .connection-guide > .button { grid-column: 1; margin-top: 18px; width: fit-content; }
  .guide-help { grid-column: 1; justify-content: flex-start; }
  .guide-foot { grid-column: 1 / -1; }
  .bottom-grid { grid-template-columns: minmax(0, 1fr); }
  .network-panel { min-height: 180px; }
  .top-actions { gap: 12px; }
  .top-device { display: none; }
}
@media (max-width: 1060px) {
  .sidebar { width: 220px; padding-left: 13px; padding-right: 13px; }
  .main { margin-left: 220px; }
  .topbar { padding: 0 27px; }
  .content { padding: 29px 27px 24px; }
  .hero-art { width: 235px; }
  .art-device { padding: 15px; }
  .art-device:last-child { margin-left: 40px; }
  .art-bridge { left: 79px; }
  .hero { padding: 27px; }
  .hero h2 { font-size: 30px; }
  .hero-copy { max-width: 310px; }
  .channel-grid { grid-template-columns: 1fr 1fr; }
  .file-row, .file-table-head { padding-left: 16px; padding-right: 16px; }
  .page-title h1 { font-size: 34px; }
  .page-title p { font-size: 16px; }
  .connection-address-bar { align-items: flex-start; }
  .connection-address-bar .button.ghost { display: none; }
  .connection { display: none; }
}
@media (max-width: 850px) {
  .sidebar { width: 190px; padding-left: 10px; padding-right: 10px; }
  .brand { font-size: 32px; gap: 8px; margin-left: 9px; }
  .brand svg { width: 29px; height: 29px; }
  .brand-tagline { font-size: 14px; margin-left: 10px; }
  .nav-item { padding-left: 10px; font-size: 14px; gap: 10px; }
  .main { margin-left: 190px; }
  .content { padding: 26px 20px; }
  .topbar { padding: 0 20px; }
  .hero-art { display: none; }
  .hero-copy { max-width: none; }
  .settings-grid, .device-grid { grid-template-columns: 1fr; }
  .page-title { flex-wrap: wrap; gap: 15px; }
  .page-title h1 { font-size: 34px; }
  .footer span:last-child { display: none; }
  .file-link { display: none; }
  .file-table-head { grid-template-columns: minmax(0, 1fr) 73px 130px; }
  .sidebar-label { margin-left: 10px; font-size: 14px; }
  .device-self { padding-left: 8px; }
  .device-self strong { max-width: 115px; }
  .connection-guide { display: block; }
  .guide-steps { margin: 20px 0; }
  .top-help { font-size: 0; }
  .top-help svg { width: 20px; height: 20px; }
  .connection-address-bar { flex-direction: column; }
  .search { max-width: 210px; }
  .file-row { grid-template-columns: 34px minmax(80px, 1fr) 65px auto; gap: 8px; }
  .file-row.selectable { grid-template-columns: 19px 34px minmax(80px, 1fr) 65px auto; }
  #toast { left: calc(50% + 95px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none !important; transition: none !important; }
}

/* Dark default: typography and interaction scale are intentionally generous. */
:root { background: #101410; color: var(--ink); }
body { font-size: 18px; }
.sidebar { background: #0b0f0c; width: 252px; border-right: 1px solid #293426; }
.main { margin-left: 252px; }
.brand { color: var(--ink); font-size: 36px; }
.brand svg, .brand-period { color: var(--accent); }
.brand-tagline { font-size: 11px; letter-spacing: 1.2px; line-height: 1.8; color: #a8b69f; }
.app-version { display: block; width: fit-content; background: #27351a; color: var(--accent); padding: 3px 9px; margin-top: 9px; border: 1px solid #42572a; border-radius: 20px; font-size: 12px; letter-spacing: .8px; }
.nav-item { min-height: 49px; font-size: 16px; border: 1px solid transparent; }
.nav-item.active { background: #25331c; border-color: #41552e; color: #e3ffb1; }
.nav-item.active svg { color: var(--accent); }
.nav-item:hover { background: #1e281a; }
.nav-item .count { background: var(--accent); color: #17200c; }
.sidebar-label { font-size: 12px; color: #aebfa4; }
.topbar { background: #111711; height: 80px; }
.top-device { background: #252f22; }
.content { padding-top: 32px; }
.page-title h1 { font-size: 40px; letter-spacing: -1.7px; }
.page-title p { font-size: 18px; line-height: 1.65; }
.button { min-height: 48px; font-size: 16px; border-radius: 11px; transition: background .16s, box-shadow .16s, transform .16s; }
.button.primary, .button.send { background: var(--accent); color: #18210c; box-shadow: 0 3px 15px #b5ff3814; font-weight: 750; }
.button.primary:hover, .button.send:hover { background: #e7ffab; box-shadow: 0 5px 24px #c3ff4b26; transform: translateY(-2px); }
.button:active, .icon-button:active, .channel-card:active { transform: scale(.97); }
.button.secondary { background: #25301f; color: #d8e8ca; border-color: #45533a; }
.button.secondary:hover { background: #34412c; }
.button.ghost { color: #c0ceb6; }
.button.danger { background: #39241c; color: #ffa987; }
.button.send { padding: 11px 14px; min-height: 46px; font-size: 15px; }
.button.copied { background: #bdf389; }
.icon-button { width: 46px; height: 46px; color: #c3d0b9; }
.icon-button:hover { background: #2b3921; color: var(--accent); transform: translateY(-1px); }
.button svg, .icon-button svg { width: 21px; height: 21px; }
.hero { background: radial-gradient(ellipse at 85% 50%, #344720 0, #1b2916 40%, #172115 100%); border-color: #3b502a; }
.hero h2 { font-size: 34px; color: #e4ffc0; }
.hero p { font-size: 17px; }
.hero .button { background: var(--accent); color: #19200c; border-color: var(--accent); }
.art-device { background: #212f1b; border-color: #5d753c; }
.art-device svg { color: var(--accent); }
.art-device small { color: #c4dfab; }
.art-bridge { color: var(--accent); }
.art-bridge span { background: #4d652d; border-color: #2e421e; }
.art-bridge:before, .art-bridge:after { border-color: #73934a; }
.channel-layout { grid-template-columns: minmax(0, 1fr); }
.channel-guide-inline { margin-top: 24px; }
.file-table-head { font-size: 14px; background: #20291c; }
.file-row { min-height: 98px; grid-template-columns: 42px minmax(120px, 1fr) 88px auto; gap: 14px; }
.file-row.selectable { grid-template-columns: 22px 42px minmax(120px, 1fr) 88px auto; }
.file-row:hover { background: #202a1b; }
.file-row.selected { background: #29381f; }
.file-name { font-size: 18px; color: #f1f6ea; font-weight: 650; }
.file-sub, .file-size { font-size: 15px; color: #bac7b1; }
.file-symbol { background: #282e3b; color: #bdc9ff; width: 42px; height: 50px; }
.file-symbol small { font-size: 10px; }
.file-symbol.slides, .file-symbol.pdf { background: #3c2a1e; color: #ffac6b; }
.file-symbol.img { background: #293d1f; color: var(--accent); }
.file-symbol.zip { background: #35293c; color: #ddb3ff; }
.file-actions { gap: 7px; }
.file-actions .file-link { background: #222e1d; }
.channel-drop-hint { font-size: 16px; min-height: 70px; border-color: #4d5e3b; color: #c1d6ab; }
.channel-summary { font-size: 15px; gap: 14px 24px; }
.channel-privacy { color: #d5ff91!important; }
.section-note { font-size: 15px; color: #b2c2a8; }
.tabs button { font-size: 18px; min-height: 60px; }
.tabs button.active { color: var(--accent); }
.tabs button.active span { background: #3b5124; color: #e0ffad; }
.search { background: #1b2419; min-height: 49px; max-width: 320px; }
.search input { font-size: 17px; color: var(--ink); }
.search input::placeholder { color: #afbea4; }
.footer { font-size: 13px; color: #a8b99b; }
.footer span:last-child { font-size: 12px; }
.network-pill, .device-self small { font-size: 13px; }
.device-self strong { font-size: 14px; }
.badge { font-size: 14px; background: #2a3b20; color: #c4f399; }
.badge.warn { background: #3d301a; color: #ffd283; }
.badge.danger { background: #3c241c; color: #ffad91; }
.badge.muted { background: #293125; color: #c1cbb8; }
.modal { background: var(--surface); border-color: #415336; box-shadow: 0 32px 110px #0009; width: 570px; padding: 30px; }
.modal.wide { width: 690px; }
.modal-header h2 { font-size: 30px; color: var(--ink); }
.modal > p { font-size: 17px; color: var(--muted); }
.modal label, .modal .check { font-size: 16px; }
.modal input:not([type=checkbox]), .modal select, .modal textarea { font-size: 17px; background: var(--surface-raised); color: var(--ink); border-color: #4a5b3b; min-height: 49px; }
.modal .hint { font-size: 15px; color: #b6c9a9; }
.modal .error { font-size: 16px; color: #ffb18a; }
.modal pre { font-size: 14px; background: #0d150b; }
.modal input[type=checkbox] { accent-color: var(--accent); }
.qr { background: #fff; border: 10px solid white; width: 260px; height: 260px; border-radius: 16px; }
.share-qr { width: 290px; height: 290px; margin: 24px auto; }
.share-policy { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.share-policy span { display: inline-flex; align-items: center; gap: 7px; color: #d5ff91; background: #2a3b1d; border: 1px solid #425a2c; border-radius: 25px; padding: 9px 12px; font-size: 15px; }
.share-policy svg { width: 17px; height: 17px; }
.share-file-summary { display: flex; justify-content: center; align-items: center; gap: 9px; color: #d3dfc7; overflow-wrap: anywhere; font-size: 16px; margin-bottom: 22px; }
.share-copy { display: flex; gap: 10px; }
.share-copy input { min-width: 0; width: 100%; font-size: 14px!important; }
.share-copy .button { flex-shrink: 0; }
.share-secondary { display: flex; align-items: center; gap: 12px; margin-top: 14px; justify-content: space-between; }
.share-options { margin-top: 22px; padding-top: 19px; border-top: 1px solid #3b4a31; }
.share-options summary { cursor: pointer; color: #d8e6ca; padding: 7px 0; font-size: 16px; }
.certificate-note { display: flex; align-items: flex-start; gap: 11px; background: #302b1b; border: 1px solid #51452a; padding: 15px; border-radius: 10px; color: #f1d795; margin-top: 20px; }
.certificate-note > svg { width: 20px; height: 20px; margin-top: 2px; }
.certificate-note strong { font-size: 14px; }
.certificate-note p { font-size: 14px; color: #d9ccaa; line-height: 1.7; margin: 5px 0 0; }
.share-loading { display: grid; place-items: center; min-height: 220px; gap: 18px; color: #d5ff91; font-size: 18px; }
.spinner { border: 3px solid #3b4b2f; border-top-color: var(--accent); width: 40px; height: 40px; border-radius: 50%; animation: spin .7s linear infinite; }
.quick-alternatives { display: grid; gap: 12px; margin-top: 18px; }
.quick-alternatives .button { width: 100%; }
.appearance-panel { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; background: var(--surface-raised); }
.appearance-panel p { margin-bottom: 0; }
.appearance-panel label { display: block; font-size: 15px; color: #c3d7b3; margin-bottom: 9px; }
.appearance-panel select { background: #121b0f; color: #e6f6da; font-size: 16px; padding: 13px; border-radius: 9px; border: 1px solid #53693c; min-width: 200px; }
.view-enter { animation: view-in .24s cubic-bezier(.2,.7,.3,1) both; }
.view-enter .file-row { animation: row-in .28s ease both; }
.view-enter .file-row:nth-child(2) { animation-delay: .04s; }
.view-enter .file-row:nth-child(3) { animation-delay: .08s; }
.connection .dot { background: var(--accent); box-shadow: 0 0 9px #bfff4555; animation: breathe 3s ease-in-out infinite; }
.transfer-progress::-webkit-progress-value { background: var(--accent); transition: width .3s; }
.status-transferring .transfer-progress { animation: breathe 1.3s ease-in-out infinite; }
#toast { background: #26361c; color: #e3ffc5; border-color: #5f7e3d; font-size: 16px; }
@keyframes view-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes row-in { from { opacity: .5; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes breathe { 50% { opacity: .65; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media(max-width: 1120px) {
  .sidebar { width: 220px; }
  .main { margin-left: 220px; }
  .file-row.selectable { grid-template-columns: 22px 38px minmax(80px,1fr) 76px auto; gap: 10px; }
  .file-row { grid-template-columns: 38px minmax(80px,1fr) 76px auto; gap: 10px; }
  .page-title h1 { font-size: 36px; }
  .file-name { font-size: 17px; }
  .file-actions .file-link { display: none; }
}
@media(max-width: 850px) {
  .sidebar { width: 190px; }
  .main { margin-left: 190px; }
  .nav-item { font-size: 15px; }
  .file-size { display: none; }
  .file-row.selectable { grid-template-columns: 20px 36px minmax(70px,1fr) auto; }
  .file-row { grid-template-columns: 36px minmax(70px,1fr) auto; }
  .file-table-head { grid-template-columns: 1fr auto; }
  .file-table-head span:nth-child(2) { display: none; }
  .appearance-panel { align-items: stretch; flex-direction: column; }
}
@media(prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none!important; transition: none!important; scroll-behavior: auto!important; }
}
.share-dialog { width: 820px!important; max-width: calc(100vw - 48px); }
.share-layout { display: grid; grid-template-columns: 268px minmax(0,1fr); gap: 27px; align-items: start; }
.share-scan { text-align: center; }
.share-scan .qr { width: 268px; height: 268px; margin: 0 auto 15px; }
.share-scan > span { color: #c0d3b0; font-size: 15px; line-height: 1.7; }
.share-details { min-width: 0; }
.share-details .share-policy { justify-content: flex-start; gap: 7px; }
.share-details .share-policy span { padding: 8px 10px; font-size: 14px; }
.share-details .share-file-summary { justify-content: flex-start; font-size: 17px; margin: 18px 0 15px; }
.share-details #share-url { font-size: 14px; color: #b5c8a6; min-height: 44px; }
.share-details > .button { width: 100%; margin-top: 11px; }
.share-details .share-secondary { display: grid; gap: 2px; margin-top: 10px; }
.share-details .share-secondary .button { font-size: 15px; }
.share-details .share-options { margin-top: 11px; padding-top: 9px; }
.share-dialog .certificate-note { margin-top: 22px; }
@media(max-width:650px) {
  .share-layout { grid-template-columns: 1fr; }
  .share-scan .qr { width: 230px; height: 230px; }
  .share-details .share-policy { justify-content: center; }
}

/* The file column must shrink independently of the network card. */
.bottom-grid > section { min-width: 0; container-type: inline-size; }
.bottom-grid .file-row { grid-template-columns: 37px minmax(0, 1fr) auto; }
.bottom-grid .file-row > .file-size { display: none; }
.bottom-grid .file-table-head { grid-template-columns: minmax(0, 1fr) auto; }
.bottom-grid .file-table-head > span:nth-child(2) { display: none; }
.bottom-grid .file-actions .file-link { display: none; }
.bottom-grid .file-actions { min-width: 0; }
.network-panel, .network-item > div { min-width: 0; }
.network-item strong { overflow-wrap: anywhere; }
@container (max-width: 570px) {
  .file-row { grid-template-columns: 37px minmax(0, 1fr)!important; gap: 12px; }
  .file-row .file-actions { grid-column: 2; justify-self: start; }
  .file-table-head { display: none; }
}
.hero.hero-compact { min-height: 124px; padding: 24px 28px; gap: 22px; }
.hero-compact .hero-copy { flex: 1; min-width: 0; max-width: none; }
.hero.hero-compact h2 { font-size: 27px; line-height: 1.3; margin: 0 0 6px; }
.hero.hero-compact p { margin: 0; max-width: none; font-size: 17px; line-height: 1.5; }
.hero-compact > .button { flex-shrink: 0; }
.hero-emblem { width: 52px; height: 52px; display: grid; place-items: center; color: var(--accent); background: #d5ff5f12; border: 1px solid #d5ff5f33; border-radius: 15px; }
.hero-emblem svg { width: 30px; height: 30px; }
.friendly-link { display: flex; align-items: center; gap: 14px; padding: 16px; background: #d5ff5f0a; border: 1px solid var(--line); border-radius: 12px; margin: 16px 0; }
.friendly-link > svg { color: var(--accent); flex-shrink: 0; }
.friendly-link strong, .friendly-link small { display: block; }
.friendly-link small { font-size: 15px; color: var(--muted); margin-top: 5px; }
.share-origin { margin-top: 18px; font-size: 16px; }
.share-origin summary { cursor: pointer; color: var(--muted); padding: 9px 0; }
.origin-card { display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-top: 8px; overflow-wrap: anywhere; }
.origin-card > span { color: var(--muted); font-size: 14px; margin-top: 8px; }
.origin-card p { font-size: 15px; line-height: 1.6; margin: 0; }
.origin-card input { width: 100%; font-size: 14px; }
@media (max-width: 1000px) {
  .hero.hero-compact { flex-wrap: wrap; }
  .hero-compact .hero-emblem { display: none; }
  .hero.hero-compact h2 { font-size: 25px; }
  .hero-compact > .button { margin-left: auto; }
}

/* A single compact header replaces the separate title and promotional hero. */
.hero.home-header { min-height: 140px; padding: 24px 28px; gap: 24px; margin-bottom: 22px; }
.home-header .hero-copy { max-width: none; flex: 1; min-width: 0; }
.home-header .eyebrow { color: var(--accent); font-size: 13px; letter-spacing: 1.8px; font-weight: 750; }
.home-header h1 { font-size: 34px; line-height: 1.2; letter-spacing: -1.2px; margin: 8px 0; }
.hero.home-header p { max-width: none; margin: 0; font-size: 17px; line-height: 1.5; }
.home-header > .button { flex-shrink: 0; }
.qr-skeleton, .qr-unavailable { width: 268px; height: 268px; max-width: 100%; border-radius: 16px; margin: 0 auto 15px; display: grid; place-content: center; gap: 16px; color: var(--muted); border: 1px solid var(--line); }
.qr-skeleton { background: linear-gradient(110deg, #222d20 25%, #3a482e 45%, #222d20 65%); background-size: 250% 100%; animation: skeleton-sweep 1.8s ease-in-out infinite; }
.qr-skeleton span { padding: 20px; border-radius: 16px; background: #10141077; }
.qr-skeleton svg, .qr-unavailable > svg { width: 44px; height: 44px; margin: auto; }
.qr-unavailable { padding: 22px; background: var(--surface); }
.qr-unavailable strong { font-size: 17px; }
.link-skeleton { height: 44px; border-radius: 8px; background: var(--line); }
.share-status { margin-top: 16px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.share-status .actions-row { flex-wrap: wrap; margin: 14px 0; }
.share-status small { display: block; font-size: 14px; }
.share-dialog button:disabled, .share-dialog select:disabled { opacity: .5; cursor: wait; transform: none; }
@keyframes skeleton-sweep { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media(max-width:1000px) { .hero.home-header { flex-wrap: wrap; } .home-header h1 { font-size: 30px; } }
@media(max-width:650px) { .qr-skeleton, .qr-unavailable { width: 230px; height: 230px; } }
@media(prefers-reduced-motion:reduce) { .qr-skeleton { animation: none!important; } }

.qr-placeholder > span { display: block; color: #c0d3b0; font-size: 15px; line-height: 1.7; }
.share-progress { list-style: none; padding: 0; margin: 20px 0 0; text-align: left; }
.share-progress li { position: relative; display: flex; gap: 11px; align-items: center; min-height: 52px; padding: 7px 10px; border-radius: 10px; transition: background .22s, color .22s, opacity .22s; }
.share-progress .step-symbol { flex: 0 0 27px; width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 13px; font-weight: 700; }
.step-symbol svg { width: 16px; height: 16px; }
.step-label { font-size: 15px; line-height: 1.35; font-weight: 650; }
.step-label small { display: block; margin-top: 3px; font-size: 12px; font-weight: 450; color: var(--muted); }
.share-progress .upcoming { opacity: .5; }
.share-progress .current { background: #d5ff5f12; color: var(--accent); box-shadow: inset 2px 0 var(--accent); }
.share-progress .current .step-symbol { border-color: #d5ff5f55; }
.share-progress .done .step-symbol { color: var(--accent); background: #d5ff5f19; border-color: #d5ff5f33; animation: step-confirm .25s ease-out; }
.share-progress .done .step-label { color: #d6e5cc; }
.share-progress .failed { background: #ff926712; color: #ffb394; box-shadow: inset 2px 0 #ffb394; }
.step-spinner { width: 14px; height: 14px; border: 2px solid #d5ff5f33; border-top-color: var(--accent); border-radius: 50%; animation: spin .85s linear infinite; }
.share-action-ready { animation: action-ready .5s ease-out; }
@keyframes step-confirm { from { transform: scale(.75); } to { transform: scale(1); } }
@keyframes action-ready { from { box-shadow: 0 0 0 0 #d5ff5f66; } to { box-shadow: 0 0 0 9px #d5ff5f00; } }
@media(prefers-reduced-motion:reduce) { .step-spinner, .share-progress .done .step-symbol, .share-action-ready { animation: none!important; } }

/* Decorative scene only uses space that remains after the copy and CTA. */
.home-header-shell { container-type: inline-size; margin-bottom: 22px; }
.home-header-shell .hero.home-header { margin-bottom: 0; }
.bridge-scene { display: none; flex: 0 0 340px; width: 340px; height: 154px; pointer-events: none; }
.bridge-scene > svg { display: block; width: 100%; height: 100%; overflow: visible; stroke-width: 1; }
@container (min-width: 960px) {
  .home-header-shell .hero.home-header { min-height: 190px; padding: 22px 28px; flex-wrap: nowrap; gap: 26px; }
  .home-header .hero-copy { flex: 1; min-width: 310px; }
  .home-header h1 { font-size: 36px; }
  .bridge-scene { display: block; }
}
@container (min-width: 1320px) {
  .bridge-scene { flex-basis: 420px; width: 420px; height: 174px; }
  .home-header-shell .hero.home-header { min-height: 210px; }
}
.scene-parcel { animation: parcel-hover 5s ease-in-out infinite; }
.parcel-photo { animation-delay: -1.7s; animation-duration: 6s; }
.parcel-note { animation-delay: -3s; animation-duration: 5.5s; }
.scene-stream { animation: stream-drift 12s linear infinite; }
.scene-spark { animation: scene-glimmer 4s ease-in-out infinite; }
@keyframes parcel-hover { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes stream-drift { to { stroke-dashoffset: -80; } }
@keyframes scene-glimmer { 0%,100% { opacity: .4; } 50% { opacity: 1; } }
@media(prefers-reduced-motion:reduce) { .scene-parcel, .scene-stream, .scene-spark { animation: none!important; } }

/* Sharing is one product surface: preparation becomes the finished access card. */
.product-share { width: 860px!important; padding: 28px; }
.product-share [hidden] { display: none!important; }
.product-share > p { margin-bottom: 24px; font-size: 16px; }
.product-share .share-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 28px; align-items: start; }
.product-share .share-stage { display: grid; min-height: 362px; border: 1px solid #3e5031; border-radius: 18px; background: radial-gradient(ellipse at 50% 0, #2c3b20, var(--surface) 75%); overflow: hidden; }
.stage-process, .stage-ready { grid-area: 1 / 1; padding: 22px; transition: opacity .24s ease, transform .32s cubic-bezier(.2,.8,.2,1), visibility .32s; }
.stage-caption { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; }
.stage-caption strong { display: block; font-size: 17px; line-height: 1.4; }
.stage-caption small { display: block; color: var(--muted); font-size: 14px; margin-top: 3px; }
.stage-brand { width: 36px; height: 36px; display: grid; place-items: center; color: var(--accent); background: #d5ff5f10; border: 1px solid #d5ff5f25; border-radius: 11px; flex-shrink: 0; }
.stage-brand svg { width: 22px; height: 22px; }
.product-share .share-progress { margin: 5px 0 0; }
.product-share .share-progress li { min-height: 48px; padding: 10px 8px; gap: 12px; border-radius: 10px; box-shadow: none; transition: min-height .25s ease, background .25s ease, opacity .25s ease, transform .25s ease; }
.product-share .share-progress li::after { content: ''; position: absolute; left: 21px; top: 40px; bottom: -8px; width: 1px; background: #3a4c31; z-index: 0; }
.product-share .share-progress li:last-child::after { display: none; }
.product-share .share-progress li.done::after { background: #91ba4b70; }
.product-share .share-progress .step-symbol { position: relative; z-index: 1; background: #1c2818; transition: background .2s, border-color .2s, color .2s; }
.product-share .share-progress .step-label { flex: 1; font-size: 15px; font-weight: 550; }
.product-share .step-label small { max-height: 0; opacity: 0; overflow: hidden; margin: 0; font-size: 13px; line-height: 1.5; transition: max-height .25s ease, opacity .2s ease, margin .25s ease; }
.product-share .share-progress .current, .product-share .share-progress .failed { min-height: 76px; transform: translateX(3px); background: #d5ff5f0b; }
.product-share .share-progress .current .step-label small, .product-share .share-progress .failed .step-label small { max-height: 44px; opacity: 1; margin-top: 5px; }
.product-share .share-progress .current .step-label { font-weight: 700; }
.product-share .share-progress .upcoming { opacity: .55; }
.product-share .share-progress .done { opacity: .8; }
.product-share .share-progress .done .step-symbol { background: #d5ff5f15; }
.step-state { display: none; }
.product-share .share-progress .done .step-symbol svg path { stroke-dasharray: 24; stroke-dashoffset: 0; animation: share-check-draw .24s ease-out; }
.stage-process .share-progress li { animation: share-row-enter .28s backwards; }
.stage-process .share-progress li:nth-child(2) { animation-delay: .045s; }
.stage-process .share-progress li:nth-child(3) { animation-delay: .09s; }
.stage-process .share-progress li:nth-child(4) { animation-delay: .135s; }
.stage-footnote { display: flex; align-items: start; gap: 7px; margin-top: 20px; padding-top: 15px; border-top: 1px solid #3a4c3155; color: #b2c5a2; font-size: 12px; line-height: 1.6; }
.stage-footnote svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; }
.stage-ready { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; opacity: 0; transform: translateY(12px) scale(.98); visibility: hidden; pointer-events: none; }
.ready-label { color: var(--accent); display: inline-flex; align-items: center; gap: 6px; font-size: 11px; letter-spacing: 1.7px; font-weight: 750; margin-bottom: 14px; }
.ready-label svg { width: 15px; height: 15px; }
.product-share .stage-ready .qr { width: 218px; height: 218px; max-width: 100%; margin: 0 auto 16px; background: white; border: 0; border-radius: 12px; box-shadow: 0 10px 25px #0002; }
.stage-ready > strong { font-size: 19px; letter-spacing: -.3px; }
.stage-ready > span { font-size: 13px; line-height: 1.6; color: var(--muted); margin-top: 7px; }
.product-share[data-phase=ready] .stage-process { opacity: 0; transform: translateY(-10px) scale(.98); visibility: hidden; pointer-events: none; }
.product-share[data-phase=ready] .stage-ready { opacity: 1; transform: none; visibility: visible; pointer-events: auto; }
.product-share[data-phase=error] .share-stage { border-color: #ffac6e50; }
.product-share[data-phase=error] .stage-brand { color: #ffb394; border-color: #ffb39433; }
.product-share .share-progress .failed { background: #ff92670b; color: #ffb394; }
.product-share .share-file-summary { display: flex; align-items: start; gap: 13px; margin: 0 0 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.share-file-icon { display: grid; place-items: center; flex: 0 0 42px; height: 48px; border-radius: 10px; background: #2b3822; color: #d5ff91; }
.share-file-icon svg { width: 22px; height: 22px; }
.product-share .share-file-summary > div { min-width: 0; }
.product-share .share-file-summary small { display: block; font-size: 11px; letter-spacing: 1.3px; color: var(--muted); margin: 0 0 7px; }
.product-share .share-file-summary strong { display: block; font-size: 18px; line-height: 1.4; font-weight: 650; overflow-wrap: anywhere; }
.product-share .share-file-summary div > span { display: block; color: var(--muted); font-size: 13px; margin-top: 6px; }
.product-share .share-policy { gap: 7px; }
.product-share .share-policy span { font-size: 12px; padding: 7px 9px; }
.product-share .friendly-link { background: none; border: 0; padding: 0; margin: 22px 0 18px; min-height: 82px; }
.product-share .friendly-link strong { font-size: 20px; line-height: 1.4; letter-spacing: -.4px; }
.product-share .friendly-link small { font-size: 14px; line-height: 1.7; margin-top: 8px; }
.product-share .share-details > .button { min-height: 52px; margin: 0; border-radius: 11px; }
.product-share .share-status { font-size: 12px; min-height: 38px; line-height: 1.65; margin-top: 10px; color: #aebfa0; }
.product-share .share-secondary { margin: 12px 0 0; gap: 0; }
.product-share .share-secondary .button { min-height: 38px; font-size: 13px; justify-content: flex-start; padding: 8px 0; }
.product-share .share-options { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; }
.product-share .share-origin, .share-history { font-size: 14px; margin-top: 14px; }
.share-history > summary { cursor: pointer; color: var(--muted); padding: 8px 0; }
.product-share .share-history .share-progress li { min-height: 38px; }
.product-share .share-history .share-progress li::after { display: none; }
.product-share .share-history .step-label { font-size: 13px; }
.product-share .share-history .step-symbol { width: 22px; height: 22px; flex-basis: 22px; }
.product-share .share-status .actions-row .button { min-height: 44px; font-size: 14px; }
@keyframes share-row-enter { from { opacity: 0; translate: 0 8px; } to { translate: 0 0; } }
@keyframes share-check-draw { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }
@media(max-width:720px) {
  .product-share { padding: 22px; }
  .product-share .share-layout { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .product-share .share-stage { min-height: 340px; }
  .product-share .stage-ready .qr { width: 200px; height: 200px; }
}
@media(prefers-reduced-motion:reduce) {
  .stage-process, .stage-ready, .product-share .share-progress li, .product-share .step-label small { transition: none!important; }
  .stage-process .share-progress li, .product-share .share-progress .done svg path { animation: none!important; }
}

/* Full-width file header and footer keep the QR and primary action balanced. */
.product-share { width: 820px!important; padding: 24px; }
.product-share .modal-header { margin-bottom: 7px; }
.product-share > p { margin-bottom: 17px; line-height: 1.6; }
.product-share .share-file-summary { margin: 0 0 20px; padding: 0 0 17px; gap: 12px; }
.product-share .share-file-summary strong { font-size: 18px; line-height: 1.4; word-break: normal; }
.product-share .share-file-summary small { display: none; }
.product-share .share-file-summary div > span { margin-top: 5px; font-size: 14px; }
.product-share .share-file-icon { flex-basis: 36px; height: 42px; }
.product-share .share-layout { grid-template-columns: 270px minmax(0, 1fr); gap: 26px; align-items: center; }
.product-share .share-stage { min-height: 330px; border-radius: 15px; }
.product-share .stage-process, .product-share .stage-ready { padding: 18px; }
.product-share .stage-caption { gap: 9px; padding-bottom: 10px; }
.product-share .stage-caption strong { font-size: 16px; }
.product-share .stage-footnote { margin-top: 14px; padding-top: 12px; }
.product-share .stage-ready .qr { width: 210px; height: 210px; margin-bottom: 13px; }
.product-share .stage-ready > strong { font-size: 18px; }
.product-share .stage-ready > span { font-size: 13px; margin-top: 5px; }
.product-share .ready-label { margin-bottom: 11px; }
.product-share .friendly-link { margin: 20px 0 17px; min-height: 0; }
.product-share .friendly-link strong { font-size: 21px; }
.product-share .friendly-link small { margin-top: 7px; font-size: 15px; line-height: 1.65; }
.product-share .share-policy span { font-size: 13px; }
.product-share .share-status { min-height: 0; margin-top: 10px; font-size: 13px; line-height: 1.65; }
.product-share .share-footer { margin-top: 20px; padding-top: 13px; border-top: 1px solid var(--line); }
.product-share .share-secondary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; margin: 0; }
.product-share .share-secondary .button { font-size: 14px; min-height: 38px; padding: 7px 0; }
.product-share .share-options { margin-top: 7px; padding-top: 3px; border-top: 0; }
.product-share .share-options > summary { font-size: 14px; padding: 9px 0 3px; }
.product-share .share-options select { max-width: 350px; }
.product-share #modal-error:empty { display: none; }
@media(max-width:720px) {
  .product-share { padding: 20px; }
  .product-share .share-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .product-share .share-scan { max-width: 330px; width: 100%; justify-self: center; }
  .product-share .share-secondary { align-items: flex-start; }
}

@font-face { font-family:'Via Display'; font-style:normal; font-weight:700; font-display:swap; src:url('/fonts/fyu-display-bold.woff2') format('woff2'); }
:root { --font-display:'Via Display','DM Sans',sans-serif; }
h1,h2,h3,.modal-header h2 { font-family:var(--font-display); font-weight:700; }
.brand { margin-top:-8px; margin-bottom:-6px; min-height:78px; }
.brand-wordmark { display:block; width:106px; height:74px; object-fit:contain; object-position:left center; }
.brand-tagline { letter-spacing:1.4px; }
svg { stroke-width:1.8; }
.trust-summary { margin:16px 0 12px; border:1px solid var(--line); border-radius:12px; background:#d5ff5f05; font-size:14px; }
.trust-summary > summary { list-style:none; display:flex; align-items:center; gap:9px; padding:12px 15px; color:#d7e9c7; cursor:pointer; font-weight:550; }
.trust-summary > summary::-webkit-details-marker { display:none; }
.trust-summary > summary > svg { width:18px; height:18px; color:var(--accent); flex-shrink:0; }
.trust-summary > summary > svg:last-child { margin-left:auto; transition:transform .18s ease; }
.trust-summary[open] > summary > svg:last-child { transform:rotate(90deg); }
.trust-summary > div { padding:0 16px 12px; }
.trust-summary p { font-size:14px; line-height:1.7; color:var(--muted); margin:9px 0; }
.product-share .trust-summary { margin:12px 0; }
.product-share .trust-summary > summary { font-size:13px; padding:10px; }
.product-share .share-policy { gap:6px; }
.file-actions-dialog { width:650px!important; max-width:calc(100vw - 40px); }
.dialog-resource { display:flex; gap:13px; align-items:start; padding:16px; border:1px solid var(--line); border-radius:12px; background:#10141066; margin:0 0 18px; }
.dialog-resource > svg { width:25px; height:25px; color:var(--accent); flex-shrink:0; margin-top:2px; }
.dialog-resource > div { min-width:0; }
.dialog-resource strong { display:block; font-size:18px; line-height:1.5; overflow-wrap:anywhere; font-weight:650; }
.dialog-resource span { display:block; font-size:14px; line-height:1.65; margin-top:5px; color:var(--muted); overflow-wrap:anywhere; }
.menu-group { border-top:1px solid var(--line); padding-top:15px; margin-top:17px; }
.menu-group h3 { font-family:'DM Sans',sans-serif; font-size:13px; letter-spacing:1px; text-transform:uppercase; color:var(--muted); margin:0 0 8px; }
.menu-row { width:100%; display:flex; text-align:left; align-items:center; gap:13px; padding:13px 10px; border-radius:11px; transition:background .15s,transform .15s; }
.menu-row:hover { background:#d5ff5f09; }
.menu-row:active { transform:scale(.99); }
.menu-row > svg { width:22px; height:22px; flex-shrink:0; color:#d4e7bd; }
.menu-row > svg:last-child { width:16px; height:16px; margin-left:auto; opacity:.6; }
.menu-row span { min-width:0; }
.menu-row strong { display:block; font-size:17px; font-weight:650; line-height:1.4; }
.menu-row small { display:block; font-size:14px; color:var(--muted); margin-top:5px; line-height:1.55; }
.menu-row-danger > svg,.menu-row-danger strong { color:#ffb394; }
.menu-row-danger:hover { background:#ff9d6610; }
.menu-note { font-size:14px; color:var(--muted); line-height:1.6; margin:8px 0 12px; }
.file-link-row { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding:13px 0; }
.file-link-row > div { flex:1; min-width:190px; }
.file-link-row strong { display:block; font-size:15px; font-weight:600; }
.file-link-row small { display:block; font-size:13px; line-height:1.6; color:var(--muted); margin-top:5px; }
.impact-list { padding-left:21px; font-size:16px; line-height:1.75; margin:18px 0; }
.impact-list li { margin:9px 0; }
.operation-note { font-size:14px; line-height:1.7; padding:13px; border:1px solid #ff9d6640; border-radius:10px; color:#efc4a5; }
.technical-details { border-top:1px solid var(--line); padding-top:14px; margin-top:16px; font-size:14px; }
.technical-details summary { cursor:pointer; color:var(--muted); padding:7px 0; }
.technical-details span { display:block; color:var(--muted); font-size:13px; margin:12px 0 6px; }
.technical-details code { display:block; white-space:normal; overflow-wrap:anywhere; word-break:break-all; font-size:12px; line-height:1.7; }
.modal .button.danger { background:#512b20; border:1px solid #a45536; color:#ffd6c1; }
.modal .button.danger:hover { background:#653527; }
.modal .modal-actions { gap:12px; }
@media(max-width:720px) { .modal .modal-actions { flex-direction:row; align-items:center; } .modal .modal-actions .button { width:auto; } }

/* Channel scope is visible before publication or download. */
.channel-membership { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; padding:24px; margin-bottom:24px; min-width:0; }
.channel-membership > div { flex:1; min-width:0; }
.channel-membership h3 { margin:10px 0; font-size:23px; }
.channel-membership p { margin:8px 0; line-height:1.65; color:var(--text-secondary,#bac6b6); overflow-wrap:anywhere; }
.channel-membership .button { flex-shrink:0; }
.channel-audience { color:var(--text-secondary,#bac6b6); font-size:16px; line-height:1.5; overflow-wrap:anywhere; }
@media(max-width:1100px){ .channel-membership { flex-direction:column; gap:12px; } }

/* One editor, six visible digits: paste, keyboard and one-time-code autofill remain native. */
.otp-input { position:relative; display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:8px; width:min(100%, 366px); margin:12px 0 18px; }
.otp-input input { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; z-index:1; cursor:text; }
.otp-input span { box-sizing:border-box; width:100%; align-self:start; display:flex; align-items:center; justify-content:center; flex:1; min-width:0; aspect-ratio:1; border:1px solid #65725a; border-radius:10px; background:#101810; font:600 28px/1 ui-monospace, monospace; color:#f1f5ed; transition:border-color .12s, box-shadow .12s; }
.otp-input span:nth-of-type(4) { margin-left:0; }
.otp-input span.current { border:2px solid var(--accent); box-shadow:0 0 0 3px #d5ff5f18; }
@media (prefers-reduced-motion:reduce) { .otp-input span { transition:none; } }

.dot.offline { background:#84917a; box-shadow:none; }

/* Home: destination first, files second, shared spaces last. */
.home-section { min-width:0; margin-top:30px; }
.home-section > .section-heading { margin-top:0; }
.home-device-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); gap:16px; }
.home-device { min-width:0; border:1px solid var(--line); border-radius:16px; background:var(--surface); transition:background .18s,border-color .18s,transform .18s,box-shadow .18s; overflow:hidden; }
.home-device:hover { border-color:#6d834d; background:#1d281a; }
.home-device:focus-within { outline:2px solid var(--accent); outline-offset:3px; }
.device-destination { display:flex; flex-direction:column; gap:10px; text-align:left; padding:22px; width:100%; min-height:200px; }
.destination-top { display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; margin-bottom:6px; }
.device-destination > strong { font-size:22px; line-height:1.3; overflow-wrap:anywhere; }
.destination-platform { color:var(--muted); font-size:15px; }
.destination-hint { display:flex; align-items:center; gap:8px; color:var(--accent); font-size:15px; margin-top:auto; padding-top:6px; }
.destination-hint svg { width:18px; height:18px; }
.add-device { min-height:200px; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:12px; padding:22px; border-style:dashed; color:var(--accent); }
.add-device > svg { width:28px; height:28px; }
.add-device strong { font-size:19px; }
.add-device span { color:var(--muted); font-size:15px; text-align:center; }
.home-device.drop-target { border:2px solid var(--accent); background:#2a391d; box-shadow:0 0 0 5px #d5ff5f20; transform:translateY(-3px); }
.home-device.drop-target .destination-hint { color:#f0ffc8; }
.destination-transfer { display:flex; flex-direction:column; gap:8px; padding:14px 22px; width:100%; text-align:left; background:#222e1c; border-top:1px solid var(--line); }
.destination-transfer > span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:100%; font-size:15px; }
.destination-transfer small { color:var(--accent); font-size:14px; }
.destination-transfer progress { width:100%; height:5px; accent-color:var(--accent); }
.file-delivery { display:flex; align-items:center; flex-wrap:wrap; gap:6px 10px; margin-top:8px; font-size:14px; color:var(--muted); }
.file-delivery .badge { padding:4px 7px; font-size:13px; }
.badge.received { background:#203745; color:#b9e3fa; }
.badge.delivered { background:#2a3b1b; color:#dbffa0; }
.incoming-requests { margin-bottom:16px; border-color:#718744; }
.incoming-request { display:flex; align-items:center; gap:14px; padding:20px; border-bottom:1px solid var(--line); }
.incoming-request:last-child { border-bottom:0; }
.incoming-request > div:first-of-type { flex:1; min-width:0; }
.incoming-request strong { display:block; overflow-wrap:anywhere; font-size:17px; }
.incoming-request small { display:block; color:var(--muted); margin-top:7px; font-size:14px; }
.home-groups { border-top:1px solid var(--line); padding-top:24px; margin-top:32px; }
.home-groups .section-note { margin-bottom:20px; }
.home-groups .channel-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); }
.recent-toggle { margin-top:14px; }
.send-selection { border:1px solid var(--line); border-radius:12px; padding:18px; background:#101810; margin-top:18px; }
.send-selection > strong { font-size:18px; }
.send-selection ul { list-style:none; padding:0; margin:14px 0 0; max-height:220px; overflow:auto; }
.send-selection li { display:flex; justify-content:space-between; gap:16px; padding:9px 0; font-size:16px; overflow-wrap:anywhere; }
.send-selection li span { flex-shrink:0; color:var(--muted); font-size:14px; }
.drop-overlay { font-size:22px; padding:24px; text-align:center; color:#edffc5; border-color:var(--accent); }
.drop-overlay.targeted { inset:auto 24px 24px; background:#26351aee; border-style:solid; font-size:18px; border-radius:14px; }
@media(max-width:800px) { .incoming-request { flex-wrap:wrap; } .incoming-request .actions-row { width:100%; justify-content:flex-end; } .home-section .section-heading { align-items:flex-start; flex-wrap:wrap; } }
@media(prefers-reduced-motion:reduce) { .home-device { transition:none; } .home-device.drop-target { transform:none; } }
.home-device .badge .dot { background:var(--accent); box-shadow:0 0 8px #d5ff5f35; }
.home-device .badge .dot.offline { background:#84917a; box-shadow:none; }

/* Incoming attention is a separate layer: preserve any form already open. */
.attention-backdrop { position:fixed; inset:0; z-index:80; background:#050905e0; backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px); display:flex; align-items:center; justify-content:center; padding:20px; }
.attention-dialog { box-sizing:border-box; width:min(580px,100%); max-height:calc(100dvh - 40px); overflow:auto; background:#151e12; border:1px solid #385028; border-radius:24px; padding:26px 28px 24px; box-shadow:0 30px 100px #000c,0 0 70px #d5ff5f18; animation:incoming-arrive .22s cubic-bezier(0.16, 1, 0.3, 1) both; }

/* Integrated compact header */
.attention-header { display:flex; align-items:center; gap:16px; margin-bottom:18px; }
.attention-avatar { display:grid; place-items:center; width:48px; height:48px; min-width:48px; background:var(--accent); color:#16200f; border-radius:14px; box-shadow:0 4px 14px #d5ff5f25; }
.attention-avatar svg { width:24px; height:24px; }
.attention-header-info { flex:1; min-width:0; }
.attention-eyebrow-row { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:4px; }
.attention-dialog .eyebrow { color:var(--accent); font-size:11.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; margin:0; }
.attention-pending-count { font-size:11px; color:#c6d4ba; background:#22331b; border:1px solid #364f2a; padding:1px 8px; border-radius:10px; font-weight:600; }
.attention-dialog h2 { font-size:20px; line-height:1.3; font-weight:700; letter-spacing:-.3px; margin:0; display:flex; align-items:center; flex-wrap:wrap; gap:6px; color:#f1f8eb; outline:none; }
.attention-author-name { color:#ffffff; font-weight:700; }
.attention-author-action { color:#c6d4ba; font-weight:500; font-size:18px; }
.attention-device-pill { font-size:12px; font-weight:500; color:#9db28f; background:#1c2918; border:1px solid #2e4424; padding:2px 8px; border-radius:10px; font-family:var(--font-sans, system-ui); }

/* File presentation */
.attention-file { display:flex; align-items:center; gap:16px; padding:16px 18px; border:1px solid #2e4424; background:#0d140b; border-radius:16px; }
.attention-file-icon { display:grid; place-items:center; width:42px; height:42px; min-width:42px; background:#1b2816; color:var(--accent); border-radius:10px; border:1px solid #364f2a; }
.attention-file-icon svg { width:22px; height:22px; }
.attention-file-meta { flex:1; min-width:0; display:flex; flex-direction:column; gap:4px; }
.attention-file-meta strong { font-size:17px; color:#ffffff; overflow-wrap:anywhere; }
.attention-file-meta span { color:var(--muted); font-size:14px; }
.attention-file-tip { color:#9db28f; font-size:13.5px; line-height:1.5; margin:10px 0 0; }

/* Text message bubble */
.attention-message { padding:14px 18px; border:1px solid #2e4424; border-radius:14px; background:#0d140b; font-size:16px; line-height:1.55; color:#e3edd9; white-space:pre-wrap; overflow-wrap:anywhere; max-height:25dvh; overflow:auto; margin-bottom:12px; }

/* Hero Link Preview Card */
.attention-hero-card { background:#0d140b; border:1px solid #2e4424; border-radius:18px; overflow:hidden; transition:border-color .18s ease; display:flex; flex-direction:column; }
.attention-hero-card:hover { border-color:#486b35; }
.attention-hero-top { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:11px 16px; background:#131c10; border-bottom:1px solid #1c2817; }
.attention-hero-badge { display:flex; align-items:center; gap:8px; font-size:13px; font-weight:600; color:#e1edd8; }
.attention-hero-favicon { width:18px; height:18px; border-radius:4px; object-fit:contain; }
.attention-hero-monogram { width:20px; height:20px; border-radius:6px; background:var(--accent); color:#16200f; font-size:11px; font-weight:800; display:grid; place-items:center; }
.attention-hero-clean-url { display:flex; align-items:center; gap:6px; font-size:12px; font-family:ui-monospace, SFMono-Regular, Menlo, monospace; color:#9db28f; max-width:65%; }
.clean-url-icon { display:inline-flex; align-items:center; color:#8daf51; }
.clean-url-icon svg { width:13px; height:13px; }
.clean-url-text { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.clean-tag { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; background:#1f3316; color:var(--accent); padding:1px 6px; border-radius:6px; flex-shrink:0; border:1px solid #2d4c20; }
.attention-hero-media { width:100%; max-height:200px; overflow:hidden; background:#070b06; display:flex; align-items:center; justify-content:center; border-bottom:1px solid #1c2817; }
.attention-hero-media img { width:100%; height:100%; max-height:200px; object-fit:cover; display:block; }
.attention-hero-body { padding:14px 16px; flex:1; }
.attention-hero-title { font-size:17px; font-weight:700; line-height:1.35; color:#ffffff; margin:0 0 6px; letter-spacing:-.2px; }
.attention-hero-desc { font-size:13.5px; line-height:1.5; color:#aabd99; margin:0; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.attention-hero-actions { display:flex; align-items:center; justify-content:flex-start; gap:8px; padding:10px 16px 12px; background:#11190e; border-top:1px solid #1a2515; }

/* Dialog footer actions */
.attention-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:20px; flex-wrap:wrap; }
.attention-later { margin-top:14px; font-size:13.5px; }
.attention-settings-note { display:block; color:#7d916f; font-size:12px; line-height:1.5; margin-top:14px; text-align:center; }
.incoming-messages { margin-bottom:16px; }
.incoming-messages article { padding:20px; border-bottom:1px solid var(--line); }
.incoming-messages article:last-child { border-bottom:0; }
.incoming-messages p { font-size:18px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.6; }
@keyframes incoming-arrive { from { opacity:0; transform:translateY(12px) scale(.98); } to { opacity:1; transform:none; } }
@media(max-width:600px) { .attention-dialog { padding:20px 18px; border-radius:18px; } .attention-dialog h2 { font-size:18px; } .attention-actions .button { flex:1; } .attention-hero-clean-url { max-width:50%; } }
@media(prefers-reduced-motion:reduce) { .attention-dialog { animation:none; } }
.receipt-progress { display:flex; flex-direction:column; gap:10px; margin:24px 0; }
.receipt-progress progress { width:100%; height:10px; accent-color:var(--accent); }
.receipt-bytes { color:#c6d4ba; font-size:16px; }
.receipt-spinner { display:block; width:28px; height:28px; border:3px solid #26351a44; border-top-color:#16200f; border-radius:50%; animation:receipt-spin .8s linear infinite; }
.receipt-complete .attention-actions .primary { min-width:190px; }
.receipt-complete .attention-avatar { animation:receipt-settle .25s ease-out both; }
@keyframes receipt-spin { to { transform:rotate(360deg); } }
@keyframes receipt-settle { from { transform:scale(.8); } to { transform:scale(1); } }
@media(prefers-reduced-motion:reduce) { .receipt-spinner,.receipt-complete .attention-avatar { animation:none; } }

/* Integration consent: bounded content, persistent navigation and explicit review. */
.modal.agent-dialog { --font-body:'DM Sans',sans-serif; width:min(920px,calc(100vw - 48px)); max-height:90dvh; display:flex; flex-direction:column; overflow:hidden; padding:26px 28px 0; }
.agent-dialog .modal-header { flex-shrink:0; }
.agent-dialog .modal-header h2 { font-size:28px; }
.agent-dialog > p { font-size:16px; line-height:1.5; margin-bottom:18px; flex-shrink:0; }
.agent-dialog #modal-form { display:flex; flex-direction:column; min-height:0; }
.grant-steps { display:flex; gap:8px; border-bottom:1px solid var(--line); padding-bottom:16px; flex-shrink:0; }
.grant-steps button { flex:1; display:flex; align-items:center; justify-content:center; gap:10px; border:1px solid transparent; border-radius:10px; background:transparent; color:var(--muted); padding:10px; font:600 16px/1.3 var(--font-body); cursor:pointer; }
.grant-steps button > span { width:28px; height:28px; border:1px solid #516046; border-radius:50%; display:grid; place-items:center; font-size:14px; }
.grant-steps button.active { color:#eaffce; background:#d5ff5f0d; border-color:#566c37; }
.grant-steps button.active > span { background:var(--accent); color:#18210e; border-color:var(--accent); }
.grant-scroll { overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable; padding:20px 6px 22px 0; min-height:0; }
.agent-dialog [hidden] { display:none!important; }
.grant-identity { display:grid; grid-template-columns:minmax(0,1fr) 180px; gap:20px; margin-bottom:20px; }
.agent-dialog .grant-identity label,.agent-dialog .grant-roots label { margin-top:0; font-size:15px; }
.grant-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; align-items:start; }
.grant-group { min-width:0; margin:0; padding:18px; border:1px solid #3b4932; border-radius:12px; background:#11190f; }
.grant-group-heading { display:flex; align-items:start; gap:12px; justify-content:space-between; margin-bottom:12px; }
.grant-group-heading h3 { margin:0 0 5px; font:700 18px/1.3 var(--font-body); color:var(--ink); }
.grant-group-heading p { font-size:14px; line-height:1.5; color:#b8c5ae; margin:0; }
.modal .grant-all { display:flex; align-items:center; gap:7px; margin:0; white-space:nowrap; font-size:14px; font-weight:550; color:var(--accent); cursor:pointer; }
.agent-dialog input[type=checkbox] { width:18px; height:18px; flex:0 0 18px; margin:2px 0 0; cursor:pointer; }
.modal .grant-option { display:flex; align-items:start; gap:11px; border-radius:8px; padding:10px 8px; margin:2px -8px; color:#e7efdf; font-size:16px; line-height:1.4; cursor:pointer; font-weight:450; transition:background .15s; }
.grant-option:hover { background:#d5ff5f0a; }
.grant-option:has(input:checked) { background:#d5ff5f0b; }
.grant-option strong { display:block; font-weight:550; }
.grant-option small { display:block; font-size:14px; color:#b8c5ae; line-height:1.5; margin-top:3px; }
.grant-roots { margin-top:20px; }
.agent-dialog .grant-roots textarea { min-height:76px; font-size:15px; line-height:1.5; }
.grant-roots p { font-size:14px; color:#b8c5ae; margin:8px 0 0; }
.grant-toolbar { display:flex; align-items:start; justify-content:space-between; gap:14px; margin-bottom:18px; font-size:15px; color:var(--muted); flex-wrap:wrap; }
.agent-dialog .modal-actions { flex-shrink:0; border-top:1px solid #3b4932; padding:18px 0; margin:0; align-items:center; }
.agent-dialog .modal-actions .button { min-height:46px; padding:11px 16px; font-size:15px; }
.grant-counter { margin-right:auto; font-size:13px; color:var(--muted); }
.agent-dialog #modal-error:empty { display:none; }
.agent-dialog #modal-error { margin:0; padding:8px 0; }
.grant-review-heading { display:flex; align-items:center; gap:14px; margin-bottom:16px; }
.grant-review-heading > svg { width:32px; height:32px; color:var(--accent); }
.grant-review-heading h3 { font-size:22px; margin:0 0 5px; }
.grant-review-heading p { font-size:15px; color:var(--muted); margin:0; }
.grant-review-row { display:grid; grid-template-columns:180px minmax(0,1fr); gap:16px; padding:13px 0; border-bottom:1px solid var(--line); }
.grant-review-row h4 { font-size:15px; font-weight:550; color:var(--muted); margin:0; }
.grant-review-row p { font-size:16px; line-height:1.5; color:var(--ink); margin:0; overflow-wrap:anywhere; }
.grant-security-note { display:flex; align-items:start; gap:8px; color:var(--muted); font-size:14px; margin:18px 0 0; }
.grant-security-note svg { flex-shrink:0; width:18px; height:18px; }
/* Short authentication dialog, balanced around a single six-digit field. */
.modal.auth-dialog { width:min(440px,calc(100vw - 40px)); padding:28px; text-align:center; position:relative; }
.auth-dialog .modal-header { justify-content:center; margin:56px 0 10px; }
.auth-dialog .modal-header h2 { font-size:27px; line-height:1.2; }
.auth-dialog .modal-header > button { position:absolute; right:16px; top:16px; }
.auth-dialog > p { margin:0 auto 24px; font-size:16px; line-height:1.5; max-width:320px; }
.auth-emblem { position:absolute; top:24px; left:calc(50% - 23px); display:grid; place-items:center; width:46px; height:46px; border-radius:14px; background:#d5ff5f14; border:1px solid #d5ff5f32; color:var(--accent); }
.auth-emblem svg { width:25px; height:25px; }
.auth-dialog label { margin:0 0 12px; font-size:14px; font-weight:550; }
.auth-dialog .otp-input { width:100%; max-width:348px; margin:0 auto 16px; gap:8px; }
.auth-dialog .otp-input span { border-radius:10px; font-size:28px; }
.auth-dialog .auth-session { display:flex; align-items:center; justify-content:center; gap:7px; font-size:13px; line-height:1.5; color:#b7c5ad; margin:0 0 22px; }
.auth-session svg { width:16px; height:16px; flex-shrink:0; }
.auth-dialog .modal-actions { display:grid; grid-template-columns:1fr 1.5fr; margin:0; gap:10px; }
.auth-dialog .modal-actions .button { width:100%; min-width:0; min-height:46px; padding:10px 12px; font-size:15px; }
.auth-dialog #modal-error:empty { display:none; }
.auth-dialog #modal-error { margin:0 0 16px; text-align:left; }
@media(max-width:680px) {
  .modal.agent-dialog { padding:20px 18px 0; width:calc(100vw - 24px); max-height:94dvh; }
  .grant-grid { grid-template-columns:1fr; }
  .grant-identity { grid-template-columns:minmax(0,1fr) 130px; gap:12px; }
  .grant-steps button { font-size:14px; gap:6px; padding:8px 4px; }
  .grant-review-row { grid-template-columns:1fr; gap:5px; }
  .agent-dialog .modal-actions { flex-direction:row; flex-wrap:wrap; }
  .agent-dialog .modal-actions .button { width:auto; }
  .grant-counter { flex-basis:100%; }
}
@media(prefers-reduced-motion:reduce) { .grant-option { transition:none; } }

/* Dismissible setup suggestion, separate from urgent incoming notifications. */
.system-auth-suggestion { display:flex; align-items:center; gap:16px; padding:18px 20px; margin:0 0 22px; background:#223018; border:1px solid #536b36; border-radius:14px; }
.system-auth-suggestion-icon { width:42px; height:42px; border-radius:12px; display:grid; place-items:center; background:#d5ff5f18; color:var(--accent); flex-shrink:0; }
.system-auth-suggestion-copy { flex:1; min-width:0; }
.system-auth-suggestion-copy strong { display:block; font-size:18px; color:var(--ink); line-height:1.4; }
.system-auth-suggestion-copy p { margin:4px 0 0; font-size:15px; line-height:1.5; color:#c7d5bc; }
.system-auth-suggestion-actions { display:flex; gap:8px; flex-shrink:0; }
#system-auth-settings:focus { outline:2px solid var(--accent); outline-offset:5px; }
@media(max-width:1000px) { .system-auth-suggestion { flex-wrap:wrap; } .system-auth-suggestion-actions { margin-left:58px; flex-wrap:wrap; } }
@media(max-width:540px) { .system-auth-suggestion { padding:16px; } .system-auth-suggestion-actions { margin-left:0; width:100%; } }

.chat-workspace { display:grid; grid-template-columns:330px minmax(0,1fr); height:calc(100dvh - 190px); min-height:450px; border:1px solid var(--line); border-radius:18px; overflow:hidden; background:#121a12; }
.chat-contacts { background:#172015; border-right:1px solid var(--line); overflow:auto; padding:18px 12px; }
.chat-contacts-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:0 6px; }
.chat-contacts-heading h1 { font-size:28px; margin:0; }
.chat-local-note { display:flex; gap:6px; align-items:center; font-size:13px; color:var(--muted); padding:0 6px 10px; }
.chat-local-note svg { width:15px; height:15px; }
.chat-contact { width:100%; display:flex; text-align:left; align-items:center; gap:10px; padding:14px 10px; border:1px solid transparent; border-radius:12px; margin-bottom:5px; }
.chat-contact.active { background:#29391d; border-color:#526b34; }
.chat-contact > span:nth-child(2) { min-width:0; flex:1; }
.chat-contact strong { display:block; font-size:16px; overflow-wrap:anywhere; }
.chat-contact small { display:block; font-size:13px; color:var(--muted); white-space:nowrap; text-overflow:ellipsis; overflow:hidden; max-width:175px; margin-top:5px; }
.chat-avatar { color:var(--accent); background:#d5ff5f0b; border-radius:12px; width:38px; height:42px; display:grid; place-items:center; flex-shrink:0; }
.chat-thread { display:grid; grid-template-rows:auto auto minmax(0,1fr) auto; min-width:0; min-height:0; }
.chat-thread-heading { padding:16px 22px; border-bottom:1px solid var(--line); display:flex; align-items:center; justify-content:space-between; gap:12px; background:#192217; }
.chat-thread-heading h2 { font-size:22px; margin:0; overflow-wrap:anywhere; }
.chat-thread-heading p { font-size:13px; margin:6px 0 0; color:var(--muted); }
.chat-stream { overflow:auto; overscroll-behavior:contain; padding:24px; display:flex; flex-direction:column; gap:14px; min-height:0; scrollbar-gutter:stable; }
.chat-bubble { flex-shrink:0; width:fit-content; max-width:90%; padding:14px 16px; border-radius:16px 16px 16px 4px; border:1px solid #3b4e32; background:#202d1b; align-self:flex-start; overflow-wrap:anywhere; }
.chat-bubble.outgoing { align-self:flex-end; border-radius:16px 16px 4px 16px; background:#2e411f; border-color:#4d6435; }
.chat-bubble.sticky { border-color:#d5b95f; background:#39331b; }
.chat-bubble-author { display:flex; flex-wrap:wrap; align-items:center; gap:10px; color:#c7dab7; font-size:13px; margin-bottom:6px; }
.chat-message-text { font-size:18px; white-space:pre-wrap; line-height:1.55; margin:0; color:#f0f6e9; }
.chat-bubble-time { display:flex; gap:14px; flex-wrap:wrap; font-size:12px; color:#b6c6a8; margin-top:10px; }
.chat-composer { border-top:1px solid var(--line); padding:14px 20px; background:#192217; }
.chat-composer-mode { display:flex; align-items:center; gap:10px; margin-bottom:10px; flex-wrap:wrap; }
.chat-composer-mode label,.chat-composer-mode small { font-size:12px; color:var(--muted); }
.chat-composer-mode select { font:inherit; font-size:14px; border:1px solid var(--line); border-radius:8px; background:#26341e; padding:5px 8px; }
.chat-compose-row { display:flex; align-items:flex-end; gap:10px; }
.chat-compose-row textarea { flex:1; resize:none; min-width:0; min-height:58px; max-height:150px; border:1px solid #50633e; border-radius:12px; padding:12px; background:#10180f; color:var(--ink); font:17px/1.5 'DM Sans',sans-serif; }
.chat-empty { color:var(--muted); text-align:center; padding:30px 16px; margin:auto; }
.chat-empty h3 { color:var(--ink); font-size:24px; }
.chat-file { display:flex; gap:12px; align-items:center; }
.chat-file strong,.chat-file small { display:block; }
.chat-file small { color:var(--muted); margin-top:4px; }
.chat-file-actions,.chat-sticky-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }
.chat-file-progress progress { width:100%; height:8px; accent-color:var(--accent); }
.chat-file-progress small { font-size:13px; display:block; }
.chat-image-open { display:block; margin-top:10px; padding:0; border-radius:10px; overflow:hidden; }
.chat-image-open img { display:block; width:280px; max-width:100%; height:180px; object-fit:cover; background:#151d12; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
@media(max-width:1100px){.chat-workspace{grid-template-columns:215px minmax(0,1fr)}.chat-compose-row{flex-wrap:wrap}.chat-composer-mode small{display:none}.chat-bubble{max-width:95%}.chat-stream{padding:16px}}

.chat-pins{max-height:140px;overflow:auto;background:#292c19}.chat-pins:empty{height:0;overflow:hidden}.chat-pins details{padding:10px 20px;border-bottom:1px solid var(--line)}.chat-pins summary{cursor:pointer;color:var(--accent);font-weight:650}.chat-pins p{white-space:pre-wrap;overflow-wrap:anywhere}

/* Shared text remains selectable and readable in the mixed transfer feed. */
.chat-text-actions { display:flex; justify-content:flex-end; margin-top:4px; }
.chat-message-text,.history-text-full,.history-text-preview { user-select:text; overflow-wrap:anywhere; white-space:pre-wrap; }
.history-text-preview { display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; overflow:hidden; font-size:18px; line-height:1.55; margin:14px 0 0; }
.history-text-full { font-size:19px; line-height:1.6; max-height:50dvh; overflow:auto; }
.text-history-row .transfer-head { align-items:flex-start; flex-wrap:wrap; gap:12px; }
.text-history-row .actions-row { flex-wrap:wrap; }

.message-link { color:var(--accent,#d1ff55); text-decoration:underline; text-underline-offset:3px; overflow-wrap:anywhere; }
.link-preview-slot { margin-top:12px; min-width:0; }
.link-preview-card { display:flex; overflow:hidden; border:1px solid var(--line,var(--line)); border-radius:14px; background:rgba(128,128,128,.08); text-decoration:none; color:inherit; transition:background .18s,transform .18s; max-width:560px; }
.link-preview-card:hover { background:rgba(128,128,128,.16); transform:translateY(-1px); }
.link-preview-card img { width:110px; object-fit:cover; flex-shrink:0; }
.link-preview-copy { display:flex; flex-direction:column; gap:7px; padding:14px; min-width:0; }
.link-preview-copy small { opacity:.8; font-size:13px; overflow-wrap:anywhere; }
.link-preview-copy strong { font-size:17px; line-height:1.35; }
.link-preview-copy>span { font-size:15px; line-height:1.4; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.link-preview-loading { height:62px; width:min(100%,380px); border-radius:12px; background:linear-gradient(110deg,rgba(128,128,128,.08) 20%,rgba(128,128,128,.2) 40%,rgba(128,128,128,.08) 60%); background-size:200% 100%; animation:via-link-loading 1.4s linear infinite; }
@keyframes via-link-loading { to {background-position:-200% 0;} }
@media(prefers-reduced-motion:reduce){.link-preview-loading{animation:none}.link-preview-card{transition:none;transform:none}}

/* A conversation owns the available viewport; only its message list scrolls. */
.main.chat-main { height:100dvh; min-height:0; display:flex; flex-direction:column; overflow:hidden; }
.chat-main>.topbar { flex:0 0 auto; }
.content.chat-content { flex:1; display:flex; flex-direction:column; min-height:0; width:100%; max-width:none; margin:0; padding:20px 24px 18px; }
.chat-content>.footer { display:none; }
.chat-content>.chat-workspace { flex:1; height:auto; min-height:0; width:100%; grid-template-columns:250px minmax(0,1fr); }
.chat-thread { height:100%; overflow:hidden; }
.chat-thread-heading { padding:14px 20px; }
.chat-stream { padding:20px; gap:12px; }
.chat-bubble { max-width:90%; }
.chat-bubble:has(.link-preview-slot) { width:auto; max-width:min(560px,90%); }
.chat-bubble .message-link { font-size:16px; line-height:1.5; }
.chat-composer { padding:10px 16px 12px; }
.chat-composer-mode { margin-bottom:7px; }
.chat-compose-row { display:grid; grid-template-columns:44px 44px minmax(0,1fr) auto; align-items:end; gap:8px; }
.chat-compose-icon.button { width:44px; height:48px; min-width:0; min-height:44px; padding:10px; }
.chat-compose-row textarea { width:100%; height:52px; min-height:52px; max-height:120px; margin:0; }
.chat-compose-row>button[type=submit] { min-height:48px; }
.chat-image-open img { width:auto; height:auto; max-width:100%; max-height:200px; object-fit:contain; }
/* A site identity, readable title and optional cover form one cohesive link card. */
.link-preview-card { display:flex; flex-direction:column; width:100%; max-width:none; border:1px solid #4b5b40; border-radius:12px; background:#111a10; color:var(--ink); text-decoration:none; overflow:hidden; transform:none; }
.link-preview-card:hover { background:#172114; transform:none; border-color:#6a8057; }
.link-preview-card:focus { outline:none; box-shadow:none; }
.link-preview-card:focus-visible { outline:2px solid var(--accent); outline-offset:3px; box-shadow:none; }
.link-preview-media { width:100%; height:164px; overflow:hidden; background:#0c120c; }
.link-preview-card .link-preview-media img { display:block; width:100%; height:100%; object-fit:cover; }
.link-preview-copy { display:flex; flex-direction:column; gap:8px; padding:14px 16px; }
.link-preview-site { display:flex; align-items:center; gap:9px; color:#d3dfca; font-size:14px; }
.link-preview-card img.link-preview-favicon { width:22px; height:22px; flex:none; object-fit:contain; border-radius:4px; }
.link-preview-monogram { display:grid; place-items:center; width:24px; height:24px; flex:none; border-radius:6px; background:#334528; color:var(--accent); font-size:14px; font-weight:750; }
.link-preview-arrow { margin-left:auto; color:#aabb9e; font-size:19px; }
.link-preview-copy>strong { font-size:19px; line-height:1.35; font-weight:750; color:#f0f6e9; }
.link-preview-copy>.link-preview-description { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; color:#bac9ae; font-size:15px; line-height:1.45; }
.link-preview-copy>small { color:#aabb9e; font-size:12px; }
.link-preview-copy>.link-preview-site { display:flex; overflow:visible; -webkit-line-clamp:unset; }
@media(max-width:1100px){.chat-content>.chat-workspace{grid-template-columns:210px minmax(0,1fr)}.content.chat-content{padding:14px}.chat-bubble{max-width:94%}.chat-compose-row{grid-template-columns:40px 40px minmax(0,1fr) auto}.chat-compose-icon.button{width:40px}.chat-compose-row>button[type=submit]{padding:10px 12px}}
@media(max-height:650px){.chat-thread-heading{padding:10px 16px}.chat-composer-mode{margin-bottom:4px}.chat-composer{padding:7px 12px}.content.chat-content{padding:10px 14px}}

/* Quick viewer: controls stay outside the scrollable document/media area. */
.modal.file-viewer-dialog { width:min(1100px,95vw); max-width:1100px; max-height:calc(100dvh - 40px); display:flex; flex-direction:column; padding:24px; overflow:hidden; }
.file-viewer-dialog .modal-header { gap:20px; align-items:flex-start; flex:none; }
.file-viewer-dialog .modal-header h2 { font-size:24px; line-height:1.35; min-width:0; overflow-wrap:anywhere; margin:0; }
.file-viewer-dialog .modal-header>.icon-button { flex:none; width:44px; height:44px; }
.file-viewer-dialog>p { margin:8px 0 14px; }
.file-viewer-dialog form { min-height:0; display:flex; flex-direction:column; gap:14px; }
.file-viewer-actions { display:flex; flex-wrap:wrap; gap:10px; padding-bottom:12px; border-bottom:1px solid var(--line); flex:none; }
#file-viewer-body { overflow:auto; min-height:120px; flex:1; border-radius:12px; }
.file-viewer-image { min-height:200px; display:grid; place-items:center; padding:14px; background:#080c09; }
.file-viewer-image img { display:block; max-width:100%; max-height:62dvh; width:auto; height:auto; object-fit:contain; }
.file-viewer-video { display:block; width:100%; max-height:60dvh; min-height:220px; background:#000; border-radius:10px; }
.file-viewer-text { margin:0; padding:20px; background:#0b110c; color:#e8eee3; font:15px/1.7 ui-monospace,SFMono-Regular,Menlo,monospace; white-space:pre-wrap; overflow-wrap:anywhere; user-select:text; }
.file-viewer-markdown { padding:16px 24px 28px; line-height:1.75; font-size:18px; user-select:text; }
.file-viewer-markdown h1,.file-viewer-markdown h2,.file-viewer-markdown h3 { margin:24px 0 12px; line-height:1.3; letter-spacing:-.5px; }
.file-viewer-markdown h1 { font-size:32px; }.file-viewer-markdown h2 { font-size:26px; }.file-viewer-markdown h3 { font-size:22px; }
.file-viewer-markdown p { margin:12px 0; }.file-viewer-markdown li { margin:7px 0; }.file-viewer-markdown a { color:var(--accent); text-underline-offset:3px; }
.file-viewer-markdown code { font:15px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace; padding:2px 5px; border-radius:5px; background:#0b110c; }
.file-viewer-markdown pre { padding:16px; background:#0b110c; border:1px solid var(--line); border-radius:10px; overflow:auto; }
.file-viewer-markdown pre code { padding:0; }.file-viewer-markdown blockquote { margin:16px 0; padding:8px 18px; border-left:3px solid var(--accent); color:var(--muted); }
.file-preview-name { text-align:left; padding:0; min-width:0; color:inherit; font:inherit; font-weight:700; }.file-preview-name:hover { text-decoration:underline; text-underline-offset:4px; }
:where(.settings-panel,.panel.message) .actions-row { gap:12px; margin-top:14px; flex-wrap:wrap; }
.modal-actions { gap:12px; row-gap:10px; flex-wrap:wrap; }.modal form>label { margin-top:16px; margin-bottom:9px; }.settings-panel>p { line-height:1.65; margin-bottom:16px; }
@media(max-width:700px){.file-viewer-markdown{padding:12px 16px;font-size:17px}}

/* Conversation ownership stays distinct from the lime action color. */
.chat-bubble.incoming { background:#1b261a; border-color:#364431; }
.chat-bubble.outgoing { background:#173c55; border-color:#386780; color:#edf7ff; }
.chat-bubble.outgoing .chat-bubble-author { color:#b8d9ec; }
.chat-bubble.outgoing .chat-bubble-time { color:#b4cedd; }
.chat-bubble.outgoing .chat-message-text { color:#f0f8ff; }
.chat-bubble.outgoing .chat-text-actions .button { color:#d5eaf6; }
.chat-bubble.outgoing .message-link { color:#a9e0ff; }
.chat-bubble.outgoing .link-preview-card { background:#102c40; border-color:#3a6179; color:#edf7ff; }
.chat-bubble.outgoing .link-preview-description,
.chat-bubble.outgoing .link-preview-domain,
.chat-bubble.outgoing .link-preview-site { color:#bed6e5; }
.chat-file-name { display:block; padding:2px 0; text-align:left; font-weight:700; color:inherit; overflow-wrap:anywhere; }
.chat-file-name:hover,.history-file-name:hover,.history-text-title:hover { text-decoration:underline; text-underline-offset:4px; }
.chat-file-actions:empty { display:none; }
.chat-compose-row textarea:focus {
  outline: none !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 1px var(--accent), 0 0 10px rgba(213, 255, 95, 0.25) !important;
}
.chat-compose-row textarea {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
.chat-compose-row textarea::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
.chat-composer { padding:14px 18px; }
.history-feed .transfer-row { padding:20px 24px; }
.history-feed .transfer-head { align-items:flex-start; flex-wrap:nowrap; gap:20px; }
.history-entry-title { min-width:0; flex:1; }
.history-file-name,.history-text-title { display:block; max-width:100%; padding:0; color:var(--ink); text-align:left; font-size:18px; font-weight:700; line-height:1.45; overflow-wrap:anywhere; }
.history-entry-title>strong { display:block; overflow-wrap:anywhere; }
.history-actions { display:flex; align-items:center; justify-content:flex-end; gap:12px; flex-shrink:0; }
.history-more { width:44px; height:44px; flex-shrink:0; border-radius:10px; }
.history-more:hover { background:#ffffff0d; }
.history-text-preview { margin:14px 0 0; font-size:17px; line-height:1.6; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.history-error { color:#f5ae92; font-size:14px; margin:10px 0 0; }
.history-options { display:flex; flex-direction:column; gap:8px; }
.history-feed .link-preview-slot { max-width:460px; }
@media(max-width:800px){.history-feed .transfer-row{padding:16px}.history-feed .transfer-head{flex-wrap:wrap;gap:12px}.history-entry-title{flex-basis:100%}.history-actions{width:100%;justify-content:flex-start;gap:10px}}

/* Scroll only the form content; confirmation and cancel remain in view. */
.modal.fixed-actions-dialog { display:flex; flex-direction:column; max-height:calc(100dvh - 48px); overflow:hidden; }
.fixed-actions-dialog>.modal-header,.fixed-actions-dialog>p { flex:none; }
.fixed-actions-dialog #modal-form { display:flex; flex-direction:column; flex:1; min-height:0; overflow:hidden; }
.modal-scroll-body { min-height:0; overflow:auto; overscroll-behavior:contain; padding:3px 6px 6px 3px; }
.fixed-actions-dialog #modal-form>.modal-actions { flex:none; margin:16px 0 0; padding:18px 0 0; border-top:1px solid var(--line); background:var(--surface); }
.modal.share-picker-dialog { width:min(650px,94vw); }
.share-picker-dialog>.modal-header h2 { font-size:28px; }
.share-picker-dialog>p { margin-bottom:18px; font-size:16px; line-height:1.6; }
.share-input-zone { display:flex; flex-direction:column; align-items:center; text-align:center; gap:10px; padding:26px 20px; border:1.5px dashed #708656; border-radius:16px; background:#d5ff5f06; transition:background .15s,border-color .15s; }
.share-input-zone.drag-active { background:#d5ff5f18; border-color:var(--accent); }
.share-input-symbol { display:grid; place-items:center; width:50px; height:50px; color:var(--accent); background:#d5ff5f12; border-radius:14px; }
.share-input-symbol svg { width:27px; height:27px; }
.share-input-zone h3 { margin:2px 0 0; font-size:23px; line-height:1.3; }
.share-input-zone p { margin:0; font-size:17px; color:var(--ink); }
.share-input-zone small { color:var(--muted); font-size:14px; line-height:1.6; }
.share-input-policy { display:flex; align-items:flex-start; gap:9px; margin:16px 0; font-size:14px; line-height:1.6; color:var(--muted); }
.share-input-policy svg { width:17px; height:20px; margin-top:1px; }
.share-existing { border-top:1px solid var(--line); padding-top:16px; margin-top:18px; }
.share-existing>summary { cursor:pointer; padding:4px 0; font-size:15px; font-weight:600; color:var(--muted); }
.share-existing>summary span { font-size:13px; padding:2px 7px; margin-left:5px; background:#ffffff0a; border-radius:6px; }
.share-existing input[type=search] { margin:16px 0 12px; min-height:44px; font-size:15px; }
.share-existing-list { max-height:210px; overflow:auto; overscroll-behavior:contain; padding-right:4px; }
.modal .share-existing .file-choice { margin:0 0 6px; padding:10px; gap:10px; font-size:14px; font-weight:500; cursor:pointer; }
.share-existing .file-choice>span { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.share-existing .file-choice>small { font-size:12px; white-space:nowrap; color:var(--muted); }
.share-existing .file-choice svg { width:17px; height:17px; }
.share-picker-dialog [hidden] { display:none!important; }
@media(max-height:650px){.share-input-zone{padding:16px;gap:7px}.share-input-symbol{width:38px;height:38px}.share-picker-dialog>p{margin-bottom:10px}.share-existing-list{max-height:145px}.fixed-actions-dialog #modal-form>.modal-actions{padding-top:12px;margin-top:10px}}

/* Chat gets a navigation rail and a single conversation column. */
.brand-symbol { display:none; }
.sidebar-toggle { display:flex; align-items:center; justify-content:flex-start; gap:10px; min-height:40px; margin:0 0 12px; padding:8px 13px; color:var(--muted); font-size:13px; border-radius:9px; }
.sidebar-toggle:hover { background:#ffffff09; color:var(--ink); }
.compact-channels { display:none; }
.navigation-compact .sidebar { width:76px; padding:20px 10px 12px; }
.navigation-compact .main { margin-left:76px; }
.navigation-compact .brand { margin:0 0 14px; justify-content:center; }
.navigation-compact .brand-symbol { display:block; width:38px; height:38px; }
.navigation-compact .brand-wordmark,.navigation-compact .brand-tagline,
.navigation-compact .nav-label,.navigation-compact .sidebar-label,
.navigation-compact nav[aria-label=Canales],.navigation-compact .network-pill,
.navigation-compact .device-self>div:last-child { display:none; }
.navigation-compact .sidebar-toggle { width:48px; margin:0 auto 12px; justify-content:center; padding:10px; }
.navigation-compact .sidebar-toggle>span { display:none; }
.navigation-compact .nav-item { position:relative; width:48px; min-height:46px; margin:4px auto; padding:12px; justify-content:center; }
.navigation-compact .nav-item>svg { width:23px; height:23px; }
.navigation-compact .nav-item .count { position:absolute; top:2px; right:0; min-width:17px; padding:0 4px; font-size:10px; line-height:17px; border-radius:7px; background:var(--accent); color:#17210c; }
.navigation-compact .compact-channels { display:flex; }
.navigation-compact .sidebar-bottom { padding-top:12px; }
.navigation-compact .device-self { justify-content:center; padding:12px 0 0; }
.chat-focused .topbar { height:50px; min-height:50px; padding:0 20px; }
.chat-focused .breadcrumbs { font-size:14px; }
.chat-focused .top-actions { gap:14px; }
.chat-focused .top-help { font-size:0; width:36px; justify-content:center; }
.chat-focused .top-help svg { width:19px; height:19px; }
.chat-focused .top-device { min-height:34px; font-size:13px; }
.chat-focused .content.chat-content { padding:12px 18px 16px; }
.chat-content>.chat-workspace.single-thread { grid-template-columns:minmax(0,1fr); }
.chat-workspace.single-thread>.chat-contacts { display:none; }
.chat-destination { min-width:0; }
.chat-destination-picker { display:flex; align-items:center; gap:12px; padding:3px 8px 3px 0; border-radius:10px; max-width:100%; text-align:left; }
.chat-destination-picker:hover { background:#ffffff08; }
.chat-destination-picker h2 { font-size:21px; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; }
.chat-destination-picker>.chat-avatar { width:36px; height:36px; flex:none; }
.chat-destination-picker>svg { width:16px; height:16px; transform:rotate(90deg); color:var(--muted); }
.chat-destination>p { margin:4px 0 0 48px; }
.chat-thread-heading { padding:12px 20px; }
.chat-recipient-dialog { width:min(540px,94vw); }
.chat-recipient-list { max-height:42dvh; overflow:auto; margin:16px 0; padding:2px; }
.chat-recipient-dialog .chat-contact small { max-width:340px; }
.chat-recipient-dialog [hidden] { display:none!important; }
@media(max-width:800px){.chat-focused .content.chat-content{padding:8px}.chat-focused .topbar{padding:0 12px}.chat-focused .top-device span{display:none}.chat-destination-picker h2{font-size:18px}.chat-thread-heading{padding:10px 12px;gap:8px}.chat-thread-heading>.button{font-size:13px;padding:8px 10px}.chat-destination>p{margin-left:0;font-size:12px}}

/* One compact brand signature, with version directly below. */
.brand-block { margin:0 12px 20px; }
.brand-block .brand { display:flex; align-items:center; justify-content:flex-start; gap:12px; margin:0; }
.brand-block .brand-symbol { display:block; width:46px; height:46px; flex:none; }
.brand-block .brand-wordmark { width:88px; height:48px; object-fit:contain; object-position:left center; }
.brand-block .app-version { margin:6px 0 0 58px; padding:0; border:0; border-radius:0; background:none; color:var(--muted); font-size:12px; line-height:1.5; letter-spacing:.4px; }
.navigation-compact .brand-block { margin:0 0 12px; }
.navigation-compact .brand-block .brand { justify-content:center; margin:0; }
.navigation-compact .brand-block .brand-symbol { width:38px; height:38px; }
.navigation-compact .brand-block .brand-wordmark { display:none; }
.navigation-compact .brand-block .app-version { margin:5px auto 0; font-size:10px; letter-spacing:0; }
.settings-stack { display:flex; flex-direction:column; gap:24px; }
.settings-stack>.panel,.settings-stack>.settings-grid { margin:0; }
.settings-stack .settings-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr)); gap:24px; align-items:stretch; }
.settings-stack .settings-panel { min-width:0; padding:26px; }
.settings-stack>.section-heading { margin:6px 0 -8px; }
.settings-stack .actions-row { gap:12px; row-gap:12px; }
.settings-stack .actions-row+.hint { margin-top:16px; }
.settings-stack .detail-line { gap:20px; align-items:flex-start; }
.settings-stack .detail-line>strong { overflow-wrap:anywhere; min-width:0; text-align:right; }
@media(max-width:800px){.settings-stack{gap:18px}.settings-stack .settings-grid{gap:18px}.settings-stack .settings-panel{padding:20px}}

/* Larger brand; simple controls without a zoom-sensitive native popup. */
.brand-block .brand-symbol { width:56px; height:56px; }
.brand-block .brand-wordmark { width:120px; height:66px; }
.brand-block .app-version { margin-left:68px; font-size:11px; }
.appearance-panel { align-items:flex-start; flex-wrap:wrap; }
.appearance-panel>div:first-child { flex:1 1 240px; }
.appearance-controls { display:flex; flex-wrap:wrap; gap:24px; flex:1 1 360px; justify-content:flex-end; }
.appearance-controls fieldset { border:0; margin:0; padding:0; min-width:0; }
.appearance-controls legend { padding:0; margin:0 0 10px; color:var(--muted); font-size:14px; font-weight:600; }
.appearance-controls small { display:block; font-size:12px; line-height:1.5; margin-top:8px; color:var(--muted); }
.preference-segments,.activity-periods { display:inline-flex; flex-wrap:wrap; gap:4px; padding:4px; background:#10170f; border:1px solid #46563a; border-radius:12px; }
.preference-segments button,.activity-periods button { display:inline-flex; align-items:center; justify-content:center; min-height:42px; padding:9px 14px; border-radius:8px; color:var(--muted); font-size:15px; line-height:1.3; }
.preference-segments button[aria-pressed=true],.activity-periods button[aria-pressed=true] { color:#18210e; background:var(--accent); font-weight:700; }
.preference-segments button:hover:not([aria-pressed=true]),.activity-periods button:hover:not([aria-pressed=true]) { background:#ffffff0b; color:var(--ink); }
.activity-tools { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:16px; margin:24px 0 10px; }
.activity-search { flex:1 1 280px; max-width:520px; min-width:0; background:var(--surface); padding:0 14px; min-height:52px; border:1px solid #46563a; border-radius:12px; }
.activity-search input { border:0; background:transparent; color:var(--ink); width:100%; min-width:0; padding:13px 0; font-size:16px; }
.activity-search:focus-within { outline:2px solid var(--accent); outline-offset:2px; }
.activity-search input:focus { outline:none; }
.activity-count { color:var(--muted); font-size:13px; margin:12px 0 16px; }
.activity-feed .activity-row>div { flex:1; min-width:0; }
.activity-feed .activity-row>time { color:var(--muted); font-size:13px; margin-left:auto; white-space:nowrap; }
.settings-explanation { margin:0 0 20px; color:var(--muted); }
.settings-explanation summary { cursor:pointer; font-size:14px; padding:5px 0; }
.settings-explanation p { margin:12px 0 0; font-size:15px; }
.minimal-view .page-title .eyebrow,.minimal-view .page-title>div>p { display:none; }
.minimal-view .page-title { margin-bottom:22px; }
.minimal-view .page-title h1 { margin-bottom:0; }
.minimal-view .settings-panel>p { font-size:16px; line-height:1.6; margin-bottom:14px; }
@media(max-width:900px){.appearance-controls{justify-content:flex-start;flex-basis:100%}.activity-search{max-width:none}.activity-feed .activity-row{flex-wrap:wrap}.activity-feed .activity-row>time{margin-left:54px;flex-basis:100%}}

/* Consistent alignment for the brand, headers and action groups. */
.brand-block { display:grid; grid-template-columns:48px minmax(0,1fr); column-gap:10px; row-gap:1px; margin:0 8px 20px; align-items:center; }
.brand-block .brand { display:contents; }
.brand-block .brand-symbol { grid-column:1; grid-row:1; width:48px; height:48px; }
.brand-block .brand-wordmark { grid-column:2; grid-row:1; width:108px; height:60px; }
.brand-block .app-version { grid-column:2; grid-row:2; margin:0; font-size:11px; line-height:1.4; color:var(--muted); }
.navigation-compact .brand-block { display:flex; flex-direction:column; gap:0; }
.navigation-compact .brand-block .brand { display:flex; }
.navigation-compact .brand-block .app-version { margin:4px 0 0; }
.layout:not(.chat-focused) .topbar { height:64px; padding:0 32px; }
.page-title:has(>.actions-row:not(:empty)) { display:grid; grid-template-columns:minmax(0,1fr) 260px; align-items:start; gap:24px; }
.page-title>.actions-row:not(:empty) { display:grid; grid-template-columns:1fr; grid-auto-rows:1fr; gap:10px; width:100%; }
.page-title>.actions-row>.button { width:100%; min-height:48px; white-space:normal; text-align:center; padding:12px 16px; }
.device-primary-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:16px; }
.device-primary-actions>.button { width:100%; min-height:48px; padding:12px; white-space:normal; font-size:16px; }
.device-options { margin-top:16px; padding-top:12px; border-top:1px solid var(--line); }
.device-options>summary { cursor:pointer; color:var(--muted); font-size:14px; padding:4px 0; }
.device-secondary-actions { display:grid; grid-template-columns:1fr; gap:10px; padding-top:12px; }
.device-secondary-actions>.button { width:100%; min-height:46px; white-space:normal; font-size:15px; }
.connection-address-bar .actions-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.connection-address-bar .actions-row>.button { min-height:48px; width:100%; padding:12px 14px; white-space:normal; }
.settings-panel>.actions-row { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr)); gap:12px; }
.settings-panel>.actions-row>.button { width:100%; min-height:48px; white-space:normal; }
.density-disclosure { margin:10px 0 16px; color:var(--muted); }
.density-disclosure>summary { cursor:pointer; font-size:14px; font-weight:500; padding:4px 0; }
.density-disclosure>p { margin:10px 0 0; font-size:15px; line-height:1.6; }
.page-title .density-disclosure { margin:8px 0 0; max-width:650px; }
.minimal-view .footer { display:none; }
.device-card>.density-disclosure { margin-bottom:12px; }
.chat-contacts>.density-disclosure { margin:8px 6px 12px; }

/* Adapt to available chat width, including zoom and expanded app navigation. */
.content.chat-content { container-type:inline-size; container-name:chat-area; }
.chat-header-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; flex:none; }
.chat-header-actions>.button { min-height:40px; padding:9px 12px; font-size:14px; }
.chat-layout-choices { display:grid; grid-template-columns:1fr; gap:12px; }
.chat-layout-choices>button { padding:16px; border:1px solid var(--line); border-radius:12px; text-align:left; }
.chat-layout-choices>button[aria-pressed=true] { border-color:var(--accent); background:#d5ff5f0d; }
.chat-layout-choices strong { display:block; color:var(--ink); font-size:17px; }
.chat-layout-choices small { display:block; margin-top:7px; color:var(--muted); font-size:14px; line-height:1.5; }
.chat-channel-shortcuts { margin-top:22px; border-top:1px solid var(--line); padding:16px 6px 0; }
.chat-channel-shortcuts h3 { margin:0; font-size:15px; }
.chat-channel-shortcuts>small { display:block; color:var(--muted); font-size:12px; margin:5px 0 10px; }
.chat-channel-shortcuts>button { display:flex; align-items:center; gap:10px; padding:10px 6px; min-height:44px; width:100%; text-align:left; font-size:14px; border-radius:8px; }
.chat-channel-shortcuts>button:hover { background:#ffffff09; }
.chat-channel-shortcuts>button>span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
@container chat-area (min-width:920px){
  .chat-content>.chat-workspace.single-thread.layout-auto { grid-template-columns:330px minmax(0,1fr); }
  .chat-workspace.single-thread.layout-auto>.chat-contacts { display:block; }
}
@container chat-area (min-width:760px){
  .chat-content>.chat-workspace.single-thread.layout-side { grid-template-columns:320px minmax(0,1fr); }
  .chat-workspace.single-thread.layout-side>.chat-contacts { display:block; }
}
@media(max-width:1000px){.page-title:has(>.actions-row:not(:empty)){grid-template-columns:1fr;gap:18px}.page-title>.actions-row:not(:empty){grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr))}.connection-address-bar{align-items:stretch}.connection-address-bar .actions-row{width:100%}}
@media(max-width:700px){.chat-header-actions{gap:5px}.chat-header-actions>.button{padding:8px;font-size:12px;gap:5px}.chat-header-actions>.button>svg{width:17px;height:17px}.chat-destination-picker h2{font-size:17px}.device-primary-actions{gap:10px}}

/* Keep the expanded menu balanced at normal and larger interface scales. */
.brand-block { grid-template-columns:44px minmax(0,1fr); column-gap:10px; margin:0 10px 18px; }
.brand-block .brand-symbol { width:44px; height:44px; }
.brand-block .brand-wordmark { width:98px; height:54px; }
.brand-block .app-version { font-size:11px; letter-spacing:.2px; }
.sidebar .nav-item { font-size:15px; min-height:44px; padding:10px 12px; gap:11px; }
.sidebar .nav-item>svg { width:21px; height:21px; }
.sidebar-toggle { font-size:12px; min-height:36px; margin-bottom:10px; }
.navigation-compact .sidebar .nav-item { width:48px; min-height:46px; padding:12px; }
.navigation-compact .sidebar .nav-item>svg { width:23px; height:23px; }
