@charset "UTF-8";

:root {
  color-scheme: dark;
  --background: #111614;
  --panel: #171d1a;
  --panel-raised: #1e2621;
  --line: #2a342e;
  --line-soft: #232d27;
  --text: #edf2ed;
  --muted: #98a69d;
  --faint: #6e8074;
  --mint: #b7ecc6;
  --mint-hover: #c8f5d4;
  --ink: #14241a;
  --error: #ffb8ab;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--background); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body.in-room { overflow: hidden; }
button, input, textarea { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button, input, textarea, a { outline: none; }
button:focus-visible, a:focus-visible, .timeline:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }
input:focus, textarea:focus { border-color: var(--mint); }
button { color: inherit; }
button, a { touch-action: manipulation; }
a { color: inherit; }
::selection { background: #b7ecc633; color: #fff; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 28px; line-height: 1; font-weight: 650; letter-spacing: -1.5px; text-decoration: none; }
.brand-dot { color: var(--mint); }
.brand-mark { display: inline-flex; position: relative; width: 28px; height: 29px; flex: 0 0 auto; }
.brand-mark span { position: absolute; width: 20px; height: 13px; border: 2px solid var(--mint); border-radius: 4px; transform: skewY(-17deg); }
.brand-mark span:first-child { left: 0; top: 2px; }
.brand-mark span:last-child { right: 0; bottom: 2px; background: var(--background); }
.boot-screen { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 13px; color: var(--muted); }
.boot-screen p { margin: 0; font-size: 13px; letter-spacing: .02em; }
.boot-screen .brand-mark { transform: scale(1.15); }
.loading-dots { animation: breathe 1.4s infinite; }

.entry-screen { min-height: 100dvh; max-width: 1220px; padding: 37px 64px 24px; margin: 0 auto; display: flex; flex-direction: column; }
.entry-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.header-note { color: var(--faint); font-size: 12px; letter-spacing: .02em; }
.entry-layout { flex: 1; display: grid; grid-template-columns: 1fr 410px; align-items: center; gap: 92px; padding: 64px 0 82px; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: var(--muted); margin: 0 0 26px; font-size: 12px; letter-spacing: .035em; }
.small-spark { width: 7px; height: 7px; background: var(--mint); border-radius: 2px; transform: rotate(45deg); box-shadow: 0 0 24px #b7ecc62a; }
.entry-intro h1 { margin: 0; font-weight: 560; font-size: clamp(56px, 6.4vw, 84px); line-height: 1.055; letter-spacing: -.065em; }
.accent { color: var(--mint); }
.muted-heading { color: #718478; }
.intro-copy { color: var(--muted); max-width: 340px; font-size: 15px; line-height: 1.75; margin: 28px 0 0; }
.intro-details { display: flex; flex-wrap: wrap; gap: 19px; margin-top: 29px; color: var(--faint); font-size: 11px; }
.intro-details > span { display: inline-flex; align-items: center; gap: 7px; }
.detail-dot { width: 4px; height: 4px; border-radius: 50%; background: #8ba792; }
.entry-card { padding: 34px 32px 28px; border: 1px solid var(--line); background: var(--panel); border-radius: 18px; box-shadow: 0 12px 80px #00000014; }
.card-heading { margin-bottom: 28px; }
.card-kicker { color: var(--faint); font-size: 11px; letter-spacing: .02em; }
.card-heading h2 { margin: 7px 0 0; font-size: 25px; font-weight: 550; letter-spacing: -.8px; }
.entry-tabs { display: flex; gap: 4px; background: #111713; padding: 4px; border: 1px solid #28332b; border-radius: 9px; margin-bottom: 25px; }
.entry-tab { flex: 1; border: 0; border-radius: 6px; background: transparent; color: var(--muted); min-height: 36px; font-size: 12px; font-weight: 500; transition: background .15s, color .15s; }
.entry-tab[aria-selected="true"] { background: #2a382e; color: #e0eee4; box-shadow: 0 1px 3px #0000002b; }
.entry-tab:hover { color: var(--text); }
.field { margin-bottom: 20px; }
.field label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: #ccd8cf; font-size: 12px; font-weight: 500; }
.optional-label { color: var(--faint); font-size: 11px; font-weight: 400; }
input { display: block; width: 100%; min-width: 0; border: 1px solid #344139; border-radius: 7px; background: #121915; color: var(--text); padding: 12px 13px; font-size: 13px; line-height: 1.5; transition: border-color .15s, box-shadow .15s; }
input:focus { box-shadow: 0 0 0 3px #b7ecc60b; }
input::placeholder { color: #687c6f; opacity: 1; }
input:disabled { opacity: .6; }
.code-input { font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.code-input::placeholder { font-family: var(--font); letter-spacing: 0; text-transform: none; }
.field-note { margin: -8px 0 24px; color: var(--faint); font-size: 11px; line-height: 1.6; }
.primary-button, .secondary-button, .quiet-button, .text-button, .icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: 7px; font-size: 12px; font-weight: 550; transition: background .15s, border-color .15s, color .15s; }
.primary-button { min-height: 43px; border: 1px solid var(--mint); padding: 10px 16px; background: var(--mint); color: var(--ink); }
.primary-button:hover:not(:disabled) { background: var(--mint-hover); border-color: var(--mint-hover); }
.primary-button:disabled { opacity: .55; }
.entry-submit { width: 100%; justify-content: space-between; margin-top: 3px; }
.entry-submit .icon { width: 18px; height: 18px; }
.entry-footnote { margin: 17px 0 0; color: var(--faint); font-size: 10px; line-height: 1.65; text-align: center; }
.entry-footer { border-top: 1px solid var(--line-soft); padding-top: 18px; color: #607265; font-size: 11px; }
.existing-room-notice { margin: -3px 0 20px; border: 1px solid #3a4d40; border-radius: 7px; padding: 12px; background: #223027; color: #bdcfbf; }
.existing-room-notice p { margin: 0 0 5px; font-size: 12px; }
.existing-room-notice .text-button { padding: 3px 0; font-size: 11px; }
.form-error { border-radius: 6px; padding: 10px 12px; background: #3a2521; color: var(--error); font-size: 12px; line-height: 1.55; margin: 0 0 14px; overflow-wrap: anywhere; }

.room-screen { width: min(1180px, 100%); height: 100dvh; margin: 0 auto; padding: 0 32px 24px; display: flex; flex-direction: column; }
.app-header { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 3px; flex-shrink: 0; }
.app-header .brand { font-size: 25px; gap: 9px; }
.app-header .brand-mark { transform: scale(.88); transform-origin: left center; width: 25px; }
.app-header-actions { display: flex; gap: 15px; align-items: center; }
.connection-status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.connection-dot { width: 5px; height: 5px; border-radius: 50%; background: #bca576; }
.connection-status[data-state="connected"] .connection-dot { background: var(--mint); box-shadow: 0 0 0 3px #b7ecc60a; }
.connection-status[data-state="offline"] .connection-dot { background: #b58c7d; }
.connection-status[data-state="connecting"] .connection-dot, .connection-status[data-state="reconnecting"] .connection-dot { animation: breathe 1.5s infinite; }
.header-divider { width: 1px; height: 16px; background: var(--line); }
.quiet-button { border: 0; padding: 7px 0; background: transparent; color: var(--muted); font-size: 11px; }
.quiet-button:hover:not(:disabled) { color: var(--text); }
.quiet-button .icon { width: 16px; height: 16px; }
.quiet-button:disabled { opacity: .5; }
.chat-panel { position: relative; display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); }
.room-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; padding: 8px 20px; border-bottom: 1px solid var(--line); flex-shrink: 0; background: #19201b; }
.room-heading { min-width: 0; }
.room-title-line { display: flex; align-items: center; gap: 12px; min-width: 0; }
.room-title-line h1 { font-size: 17px; line-height: 1.3; letter-spacing: -.45px; font-weight: 550; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin: 0; }
.room-code { color: #83978a; font-family: var(--mono); font-size: 9px; line-height: 1.4; letter-spacing: .08em; border: 1px solid #344238; padding: 3px 5px; border-radius: 4px; flex-shrink: 0; }
.room-presence { display: flex; align-items: center; gap: 7px; min-width: 0; margin-top: 4px; }
.participant-avatars { display: flex; flex-shrink: 0; padding-left: 2px; }
.participant-avatar { display: flex; align-items: center; justify-content: center; width: 19px; height: 19px; margin-left: -2px; border: 2px solid #19201b; border-radius: 50%; background: hsl(var(--avatar-hue, 140), 17%, 26%); color: hsl(var(--avatar-hue, 140), 26%, 80%); font-size: 7px; font-weight: 650; }
.participant-summary { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); font-size: 10px; }
.room-actions { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.icon-button { width: 35px; height: 35px; background: transparent; color: var(--muted); border: 1px solid transparent; flex-shrink: 0; }
.icon-button:hover:not(:disabled) { background: #29342c; color: var(--text); }
.icon-button:disabled { opacity: .4; }
.icon-button .icon { width: 18px; height: 18px; }
.secondary-button { min-height: 35px; background: #28372d; border: 1px solid #405846; color: #c7e8cf; padding: 7px 12px; font-size: 11px; }
.secondary-button:hover { background: #344b3b; border-color: #506e58; }
.secondary-button.ask-agent-button { height: 37px; min-height: 37px; flex-shrink: 0; align-self: flex-end; padding: 0 12px; border-radius: 7px; background: #3c513e; border-color: #62846b; color: #e2f4e6; font-weight: 650; white-space: nowrap; }
.secondary-button.ask-agent-button:hover:not(:disabled) { background: #49634d; border-color: #7b9c81; }
.secondary-button.ask-agent-button:disabled { opacity: .6; cursor: wait; }
.secondary-button .icon { width: 15px; height: 15px; }
.timeline { position: relative; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: contain; scrollbar-color: #38483d transparent; scrollbar-width: thin; scroll-padding: 24px; }
.timeline::-webkit-scrollbar { width: 7px; }
.timeline::-webkit-scrollbar-thumb { background: #38483d; border: 2px solid var(--panel); border-radius: 8px; }
.history-tools { display: flex; justify-content: center; padding: 12px 20px 0; }
.history-tools button { font-size: 10px; }
.history-tools button:disabled { opacity: .5; }
.empty-state { height: 100%; min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 20px 44px; text-align: center; }
.empty-icon { width: 58px; height: 58px; display: flex; align-items: center; justify-content: center; background: #202d24; border: 1px solid #34483b; border-radius: 17px; color: #a7cbb0; margin-bottom: 23px; transform: rotate(-5deg); }
.empty-icon .icon { width: 26px; height: 26px; transform: rotate(5deg); stroke-width: 1.3; }
.empty-kicker { margin: 0 0 7px; color: #779281; font-size: 10px; text-transform: uppercase; letter-spacing: .13em; }
.empty-state h2 { margin: 0; font-size: 23px; font-weight: 500; letter-spacing: -.7px; }
.empty-state > p:not(.empty-kicker) { margin: 11px 0 16px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.text-button { background: transparent; border: 0; padding: 6px 0; color: #acd4b6; font-size: 11px; font-weight: 500; }
.text-button:hover { color: var(--mint-hover); }
.text-button .icon { width: 14px; height: 14px; }
.message-list { max-width: 1200px; width: 100%; margin: 0 auto; padding: 22px 30px 26px; list-style: none; }
.message-list:empty { display: none; }
.date-divider { display: flex; align-items: center; justify-content: center; gap: 17px; margin: 8px 0 12px; color: #6e8475; font-size: 10px; }
.date-divider::before, .date-divider::after { content: ""; height: 1px; width: 44px; background: var(--line); }
.date-divider:not(:first-child) { margin-top: 18px; }
.message { display: block; margin: 0 0 7px; }
.message:last-child { margin-bottom: 0; }
.message-content { min-width: 0; width: 100%; }
.message-line { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: .6em; align-items: baseline; line-height: 1.5; overflow-wrap: anywhere; }
.message-main { min-width: 0; }
.message-author { text-align: right; align-self: start; color: var(--mint); font-size: inherit; font-weight: 650; overflow-wrap: anywhere; }
.message-time { color: #6d8073; font-size: 9px; white-space: nowrap; margin-left: .7em; }
.message-body { display: inline; color: var(--text); font-size: inherit; }
.message-text { display: inline; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 2; }
.message-text:empty { display: none; }
.code-block { margin: 9px 0; border: 1px solid #38473c; border-radius: 6px; background: #111b14; overflow: hidden; }
.code-block:first-child { margin-top: 0; }
.code-block:last-child { margin-bottom: 0; }
.code-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 11px; border-bottom: 1px solid #2d3b31; }
.code-language { color: #87a58e; font-family: var(--mono); font-size: 9px; }
.code-copy { padding: 4px 8px; border: 1px solid #587562; border-radius: 4px; background: #24382b; color: #d5ecdb; font-size: 11px; cursor: pointer; }
.code-copy:hover { background: #314b3b; }
.code-copy:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.code-block pre { margin: 0; padding: 11px 12px; overflow-x: auto; scrollbar-width: thin; font-family: var(--mono); font-size: 11px; line-height: 1.65; tab-size: 2; white-space: pre; }
.code-block code { font: inherit; color: #c6d9cb; }
.new-messages-position { position: absolute; bottom: 132px; right: 36px; pointer-events: none; z-index: 2; }
.new-messages-button { pointer-events: auto; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 20px; border: 1px solid #587562; background: #314b3b; color: #d5ecdb; box-shadow: 0 3px 16px #00000040; font-size: 11px; }
.new-messages-button .icon { width: 15px; height: 15px; }
.composer-area { width: 100%; max-width: 910px; align-self: center; padding: 0 29px 19px; flex-shrink: 0; background: var(--panel); }
.composer { display: flex; align-items: flex-end; gap: 12px; padding: 9px 10px 9px 16px; background: #131c16; border: 1px solid #3a4d40; border-radius: 10px; transition: border-color .15s, box-shadow .15s; }
.composer:focus-within { border-color: #7a9a84; box-shadow: 0 0 0 3px #b7ecc604; }
.composer textarea { display: block; flex: 1; min-width: 0; padding: 8px 0; height: 38px; max-height: 180px; background: transparent; border: 0; color: var(--text); font-size: 13px; line-height: 22px; resize: none; overflow-y: auto; scrollbar-width: thin; }
.composer textarea::placeholder { color: #6d8275; }
.composer textarea:read-only { opacity: .7; }
.send-button { width: 37px; height: 37px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--mint); border-radius: 7px; background: var(--mint); color: #193b24; flex-shrink: 0; transition: opacity .15s, background .15s; }
.send-button:hover:not(:disabled) { background: var(--mint-hover); }
.send-button:disabled { opacity: .28; }
.send-button .icon { width: 18px; height: 18px; }
.composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 9px 2px 0; color: #617768; font-size: 9px; }
.composer-footer p { margin: 0; }
.desktop-hint > span { padding: 0 4px; }
.mobile-hint { display: none; }
.current-name { max-width: 35%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.message-error { margin: 10px 0 0; }

.share-dialog { color: var(--text); background: #1c2720; border: 1px solid #415847; border-radius: 14px; padding: 25px; width: min(430px, calc(100vw - 36px)); box-shadow: 0 20px 100px #00000060; }
.share-dialog::backdrop { background: #080e0bb3; backdrop-filter: blur(4px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.dialog-heading h2 { font-size: 21px; font-weight: 500; letter-spacing: -.6px; margin: 0; }
.dialog-heading .icon-button { width: 28px; height: 28px; }
.share-dialog > p { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 14px 0 18px; }
.share-dialog .share-link-input { font-family: var(--mono); font-size: 11px; padding: 12px; }
.share-dialog > .primary-button { width: 100%; margin-top: 14px; }
.share-dialog > .field-note { min-height: 17px; margin: 10px 0 0; font-size: 10px; }
.toast { position: fixed; bottom: max(26px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 36px); padding: 11px 17px; border: 1px solid #4b6854; background: #2a4032; color: #daebdf; border-radius: 9px; box-shadow: 0 7px 25px #00000040; z-index: 10; font-size: 12px; text-align: center; }
.toast[data-error="true"] { border-color: #745247; background: #3a2c26; color: var(--error); }

@keyframes breathe { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }

@media (min-width: 1500px) {
  .room-screen { padding-top: 8px; padding-bottom: 32px; }
}

@media (max-width: 1050px) {
  .entry-screen { padding-left: 40px; padding-right: 40px; }
  .entry-layout { gap: 48px; grid-template-columns: 1fr 380px; }
  .entry-card { padding: 30px 27px 25px; }
}

@media (max-width: 800px) {
  .entry-screen { padding: 27px 28px 20px; }
  .entry-layout { grid-template-columns: 1fr 350px; gap: 28px; padding: 52px 0; }
  .entry-intro h1 { font-size: 57px; }
  .intro-copy { font-size: 13px; margin-top: 22px; }
  .eyebrow { font-size: 10px; }
  .intro-details { display: none; }
  .entry-card { padding: 27px 23px 24px; }
  .room-screen { padding: 0 18px 16px; }
  .app-header { min-height: 48px; }
  .room-header { padding: 8px 18px; }
  .message-list { padding: 22px 23px 25px; }
  .composer-area { padding-left: 22px; padding-right: 22px; }
}

@media (max-width: 660px) {
  .entry-screen { padding: 25px 22px 20px; }
  .entry-layout { display: flex; flex-direction: column; align-items: stretch; gap: 34px; padding: 44px 0 38px; }
  .entry-intro { max-width: 440px; width: 100%; margin: 0 auto; }
  .eyebrow { margin-bottom: 15px; }
  .entry-intro h1 { font-size: 48px; line-height: 1.05; }
  .entry-intro h1 br:first-of-type { display: none; }
  .entry-intro h1 br:first-of-type::after { content: " "; }
  .entry-intro h1 { max-width: 370px; }
  .intro-copy { margin-top: 17px; max-width: 350px; line-height: 1.65; }
  .entry-card { width: 100%; max-width: 440px; margin: 0 auto; padding: 26px 24px 24px; border-radius: 13px; }
  .card-heading { margin-bottom: 23px; }
  .card-kicker { font-size: 10px; }
  .card-heading h2 { font-size: 23px; }
  .header-note { font-size: 10px; }
  input { font-size: 16px; padding: 10px 12px; }
  .code-input::placeholder { font-size: 14px; }
  .field label { font-size: 12px; }
  .entry-footnote { font-size: 10px; }
  .entry-footer { max-width: 440px; width: 100%; margin: 0 auto; }
  .room-screen { padding: 0; }
  .app-header { padding: 0 18px; min-height: 48px; }
  .app-header .brand { font-size: 24px; }
  .app-header-actions { gap: 11px; }
  .connection-status { font-size: 10px; }
  .header-divider { display: none; }
  .leave-button { padding-left: 7px; }
  .leave-button span { display: none; }
  .leave-button .icon { width: 18px; height: 18px; }
  .chat-panel { border-left: 0; border-right: 0; border-bottom: 0; border-radius: 0; }
  .room-header { min-height: 62px; padding: 8px 18px; gap: 12px; }
  .room-title-line { gap: 8px; }
  .room-title-line h1 { font-size: 15px; max-width: 43vw; }
  .room-code { font-size: 8px; padding: 2px 4px; }
  .room-actions { gap: 4px; }
  .secondary-button.ask-agent-button { height: 37px; min-height: 37px; padding: 0 9px; font-size: 10px; }
  .room-actions .icon-button { width: 31px; height: 33px; }
  .share-button { width: 33px; height: 33px; padding: 0; }
  .share-button span { display: none; }
  .share-button .icon { width: 16px; height: 16px; }
  .room-presence { margin-top: 4px; }
  .participant-summary { font-size: 9px; }
  .participant-avatar { width: 18px; height: 18px; }
  .message-list { padding: 20px 17px 24px; }
  .message { margin-bottom: 6px; }
  .message-time { font-size: 8px; }
  .empty-state { padding-bottom: 34px; min-height: 260px; }
  .empty-state h2 { font-size: 21px; }
  .composer-area { padding: 0 14px calc(12px + env(safe-area-inset-bottom)); }
  .composer { padding: 7px 8px 7px 12px; gap: 8px; border-radius: 9px; }
  .composer textarea { font-size: 16px; line-height: 22px; max-height: 132px; }
  .send-button { width: 37px; height: 37px; }
  .composer-footer { padding-top: 7px; font-size: 9px; }
  .desktop-hint { display: none; }
  .mobile-hint { display: inline; }
  .new-messages-position { right: 20px; bottom: 112px; }
  .share-dialog .share-link-input { font-size: 16px; }
}

@media (max-width: 360px) {
  .entry-screen { padding-left: 16px; padding-right: 16px; }
  .entry-card { padding-left: 20px; padding-right: 20px; }
  .room-code { display: none; }
  .room-title-line h1 { max-width: 51vw; }
}

@media (max-height: 560px) and (max-width: 660px) {
  .app-header { min-height: 46px; }
  .room-header { min-height: 58px; padding-top: 6px; padding-bottom: 6px; }
  .empty-state { min-height: 180px; padding: 18px; }
  .empty-icon { display: none; }
  .composer-footer { display: none; }
  .composer-area { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.message-reactions { display: inline-flex; flex-wrap: wrap; align-items: center; vertical-align: middle; gap: 4px; max-width: 100%; margin: 0 0 0 .4em; }
.reaction-button, .reaction-picker summary { border: 1px solid var(--line); border-radius: 16px; background: var(--panel-raised); color: var(--text); padding: 2px 6px; cursor: pointer; font: inherit; font-size: 11px; min-height: 24px; }
.reaction-button[aria-pressed="true"] { background: var(--mint); border-color: var(--mint); color: var(--ink); }
.reaction-button:focus-visible, .reaction-picker summary:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.reaction-picker summary { list-style: none; font-size: 14px; }
.reaction-picker summary::-webkit-details-marker { display: none; }
.reaction-picker { position: relative; max-width: 100%; }
.reaction-choices { display: flex; flex-wrap: wrap; gap: 4px; max-width: 16rem; padding: 6px 0; }
.reaction-picker[open] summary { width: fit-content; }
.reaction-button:disabled { opacity: .6; cursor: wait; }


.message-receipts { display: inline; font-size: .8em; opacity: .8; }
.message-receipts:empty { display: none; }
.message-receipts span { display: inline; }
.message-receipts span::before { content: " · "; white-space: pre; }

.message-avatar { display: block; width: 28px; height: 28px; object-fit: contain; align-self: start; border-radius: 7px; }
img.participant-avatar { object-fit: contain; background: transparent; }

/* Activity does not disable the button: another request may still be queued. */
#ask-vex[data-activity="working"], #ask-j5[data-activity="working"] {
  border-color: #f4d35e; box-shadow: 0 0 5px #f4d35e, 0 0 13px #f4d35e88;
}
#ask-vex[data-activity="unknown"], #ask-j5[data-activity="unknown"] { border-style: dashed; }
#ask-vex[data-activity="error"], #ask-j5[data-activity="error"] { border-color: #ec827d; }
#ask-vex[data-activity="error"]::after, #ask-j5[data-activity="error"]::after { content: " !"; }

.attachment-help { font-size: 11px; color: var(--muted, #a5b0a8); margin: 1px 0; padding: 0; line-height: 1.3; }
.attachment-previews, .message-attachments { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.attachment-previews:empty { display: none; }
.attachment-previews > div { display: grid; gap: 3px; }
.attachment-previews img { width: 90px; height: 65px; object-fit: contain; }
.attachment-previews button { font-size: 11px; }
.message-attachments img { display: block; width: auto; height: auto; max-width: min(280px, 100%); max-height: 220px; border-radius: 6px; }
.message-attachments a { max-width: 100%; }
#attach-image { flex-shrink: 0; font-size: 12px; padding: 8px; }
@media (max-width: 660px) { .composer { flex-wrap: wrap; } .composer textarea { flex-basis: 70%; } }
.typing-indicator {
  min-height: 1.4em;
  margin: 0 0 6px;
  font-size: .85em;
  color: var(--text-muted, #9ca8a1);
}
