:root {
  color-scheme: light;
  --blue: #1646ed;
  --blue-deep: #0d2ac7;
  --blue-soft: #edf3ff;
  --ink: #111827;
  --muted: #647087;
  --line: #d7dfef;
  --green: #13864b;
  --danger: #b42141;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  font-synthesis: none;
  line-height: 1.5;
}
* { box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body { margin: 0; color: var(--ink); background: #fff; -webkit-text-size-adjust: 100%; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button, a { touch-action: manipulation; }
button { border: 0; }
button:disabled { cursor: not-allowed; opacity: .45; }
button:focus-visible, a:focus-visible { outline: 3px solid #81a5ff; outline-offset: 3px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #81a5ff; outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
ul { padding: 0; margin: 0; list-style: none; }
a { color: var(--blue); }
[hidden] { display: none !important; }
.icon-library, .audio-tracks { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.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; }
.muted { color: var(--muted); }
.app-shell { height: var(--app-height,100dvh); min-height: 0; display: grid; grid-template-rows: auto auto auto minmax(0,1fr) auto auto auto; max-width: 1920px; margin: 0 auto; overflow: hidden; background: #fff; }
.masthead { display: flex; align-items: center; gap: 24px; padding: 19px 28px; min-height: 102px; background: linear-gradient(108deg,#f4f7ff 0%,#e8efff 68%,#edf3ff 100%); border-bottom: 1px solid #e0e6f5; }
.brand-heading { flex-shrink: 0; line-height: 1; }
.brand { display: block; font-family: "Arial Black", Arial, Helvetica, sans-serif; font-size: clamp(2rem,3.35vw,3.2rem); font-style: italic; font-synthesis: style; font-weight: 950; letter-spacing: -.065em; color: #1739d4; text-decoration: none; line-height: 1.04; padding-right: 5px; }
.brand-tagline { padding-left: 24px; border-left: 1px solid #94a5cd; font-size: clamp(1.05rem,1.55vw,1.4rem); font-weight: 700; letter-spacing: -.025em; white-space: nowrap; }
.brand-tagline span { color: #49629f; font-weight: 500; }
.membership-note { display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; white-space: nowrap; margin-left: auto; color: #45536d; }
.membership-note .icon { width: 19px; height: 19px; color: #162b6c; }
.auth-actions { display: flex; align-items: center; gap: 9px; flex-shrink: 0; margin-left: auto; }
.membership-note + .auth-actions { margin-left: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; border: 1px solid transparent; border-radius: 9px; padding: 10px 17px; font-size: .9375rem; line-height: 1.4; font-weight: 650; white-space: nowrap; transition: background .15s,border-color .15s,box-shadow .15s; }
.button.primary { background: linear-gradient(#194fff,#1039dc); color: #fff; border-color: #143ce2; box-shadow: 0 2px 3px #1838c511; }
.button.primary:hover { background: #1036d6; border-color: #082dc3; }
.button.secondary { background: #ffffffb8; color: var(--ink); border-color: #b5c2df; }
.button.secondary:hover { background: #edf3ff; border-color: #7898dc; }
.button.text-button { background: transparent; color: #26427b; padding: 10px 5px; font-size: .875rem; }
.button.text-button:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 4px; }
.button.danger { background: #fff1f4; border-color: #edb8c4; color: #a52640; }
.button.danger:hover { background: #ffe3ea; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 8px; border: 1px solid transparent; color: #46516b; background: transparent; flex-shrink: 0; }
.icon-button:hover { color: var(--blue); background: #edf3ff; border-color: #cbd7f3; }
.profile-button { display: inline-flex; gap: 10px; align-items: center; padding: 7px 11px 7px 7px; border: 1px solid #bbcae9; border-radius: 10px; background: #ffffffbd; min-width: 150px; max-width: 260px; margin-left: auto; text-align: left; }
.profile-button:hover { background: #fff; border-color: #7b9eea; }
.profile-button > .icon { width: 16px; }
.profile-copy { min-width: 0; display: flex; flex-direction: column; }
.profile-copy strong { font-size: .9375rem; font-weight: 700; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.profile-copy > span { color: #62718c; font-size: .8125rem; }
.avatar { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(140deg,#4f96ff,#0758e7); color: #fff; font-size: 1rem; font-weight: 600; box-shadow: inset 0 0 0 1px #00000005; }
.avatar[data-color="1"] { background: linear-gradient(140deg,#aa66ef,#7724d1); }
.avatar[data-color="2"] { background: linear-gradient(140deg,#31c674,#089e4b); }
.avatar[data-color="3"] { background: linear-gradient(140deg,#fb68b1,#db258b); }
.avatar[data-color="4"] { background: linear-gradient(140deg,#ffb633,#ed8204); }
.avatar[data-color="5"] { background: linear-gradient(140deg,#52c6e3,#1299b4); }
.room-nav { display: flex; align-items: center; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--line); min-width: 0; }
.room-list { display: flex; gap: 10px; overflow-x: auto; min-width: 0; scrollbar-width: thin; scrollbar-color: #c9d5eb transparent; padding: 2px 1px 4px; overscroll-behavior-x: contain; }
.room-button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 46px; flex-shrink: 0; padding: 9px 23px; background: linear-gradient(#fff,#f0f4ff); border: 1px solid #b8c5e3; color: #111a36; border-radius: 10px; font-size: 1.0625rem; font-weight: 750; white-space: nowrap; transition: background .15s,border-color .15s; }
.room-button:hover { background: #e8efff; border-color: #829fe3; }
.room-button[aria-current=true], .room-button[aria-selected=true] { background: linear-gradient(#184bff,#1035d7); border-color: #183cde; color: #fff; }
.room-button > .icon { width: 16px; height: 16px; stroke-width: 2.5; }
.room-name { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.room-voice-count { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 24px; padding: 2px 5px; font-size: .75rem; line-height: 1.3; border-radius: 5px; background: #ffffff35; }
.room-voice-count .icon { width: 12px; height: 12px; }
.create-room { width: 50px; height: 46px; border: 1px solid #b8c5e3; border-radius: 10px; background: linear-gradient(#fff,#f0f4ff); color: #152345; }
.create-room .icon { width: 24px; height: 24px; }
.room-nav-actions { margin-left: auto; padding-left: 14px; display: flex; align-items: center; gap: 12px; }
.invite-entry { min-height: 43px; font-size: .875rem; }
.settings-button { width: 40px; border-left: 1px solid #d5dded; border-radius: 0; padding-left: 13px; }
.settings-button .icon { width: 24px; height: 24px; }
.loading-copy { font-size: .875rem; padding: 8px 0; }
.room-toolbar { display: flex; align-items: center; gap: 13px; padding: 11px 23px; min-height: 58px; background: linear-gradient(100deg,#f6f8ff,#eaf0fe); border-bottom: 1px solid #d2dcef; min-width: 0; }
.room-heading { display: flex; align-items: center; gap: 1px; min-width: 0; flex-shrink: 0; }
.header-room-icon { display: inline-flex; color: #13214f; }
.header-room-icon .icon { width: 19px; height: 19px; stroke-width: 2.5; }
.room-heading h2 { font-size: 1.0625rem; line-height: 1.3; font-weight: 800; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.02em; }
.room-label { margin-left: 9px; border: 1px solid #cad6f2; border-radius: 4px; padding: 2px 5px; color: #57678e; font-size: .75rem; font-weight: 650; white-space: nowrap; }
.topic { display: flex; align-items: baseline; gap: 8px; border-left: 1px solid #9aacd1; padding-left: 16px; min-width: 0; font-size: .9375rem; }
.topic strong { font-weight: 700; flex-shrink: 0; }
.topic > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#share-room { width: 32px; height: 32px; }
#share-room .icon { width: 19px; height: 19px; }
.search-field { display: flex; align-items: center; gap: 8px; border: 1px solid #aebddd; background: #ffffffd9; border-radius: 7px; padding: 0 11px; min-height: 37px; width: 260px; flex-shrink: 0; margin-left: auto; color: #5b6a89; }
.search-field > .icon { width: 20px; height: 20px; }
.search-field:focus-within { border-color: #6287e9; box-shadow: 0 0 0 3px #cbdcff66; }
.search-field input { min-width: 0; width: 100%; padding: 7px 0; border: 0; background: transparent; color: var(--ink); font-size: .875rem; outline: none; }
.search-field input::placeholder { color: #6d7b97; }
.search-field input::-webkit-search-cancel-button { -webkit-appearance: none; }
.clear-search { width: 22px; height: 26px; }
.clear-search .icon { width: 14px; height: 14px; }
.people-toggle { display: none; }
.chat-workspace { display: grid; grid-template-columns: minmax(0,1fr) 285px; min-height: 0; overflow: hidden; }
.transcript-panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; position: relative; }
.chat-status-bar { display: flex; align-items: center; gap: 12px; padding: 10px 24px 3px; min-height: 32px; flex-shrink: 0; font-size: .8125rem; color: #77829a; }
.connection-status { display: inline-flex; align-items: center; gap: 6px; }
.connection-status:before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #9ca5b5; flex-shrink: 0; }
.connection-status[data-status=connected]:before { background: var(--green); }
.connection-status[data-status=connecting]:before { background: #c58a12; }
.connection-status[data-status=blocked]:before { background: var(--danger); }
.admin-link { width: auto; min-width: 44px; gap: 7px; padding: 7px 10px; text-decoration: none; font-size: .875rem; color: #27458b; }
.banned-notice { flex-shrink: 0; margin: 18px; padding: 18px; background: #fff2f5; border: 1px solid #e9bcc8; border-radius: 10px; color: #92213f; overflow-wrap: anywhere; }
.banned-notice strong { display: block; margin-bottom: 6px; font-size: 1.125rem; }
.banned-notice p { margin-bottom: 12px; }
.auth-security { margin: 8px 0 12px; min-width: 0; }
.auth-security-status { font-size: .875rem; line-height: 1.5; color: #536886; margin-bottom: 8px; }
.turnstile-widget { min-width: 0; width: 100%; }
.online-count { margin-left: auto; white-space: nowrap; }
.search-status { color: #3c5baa; margin-left: auto; }
.messages { min-height: 0; flex: 1; padding: 12px 22px 22px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: #cad1df transparent; overscroll-behavior: contain; font-size: 1.0625rem; }
.message { padding: 6px 2px; line-height: 1.65; overflow-wrap: anywhere; }
.message-time { display: inline-block; min-width: 7.2rem; color: #7a8396; font-family: ui-monospace,"SFMono-Regular",Consolas,monospace; font-size: .875rem; font-variant-numeric: tabular-nums; margin-right: 8px; vertical-align: baseline; }
.message-author { display: inline; padding: 0; margin: 0 5px 0 0; background: none; color: #1646ed; font-size: inherit; font-weight: 760; line-height: inherit; border-radius: 3px; text-align: left; }
.message-author:hover { text-decoration: underline; text-underline-offset: 3px; }
.message-author[data-color="1"], .person-name[data-color="1"] { color: #8528cd; }
.message-author[data-color="2"], .person-name[data-color="2"] { color: #18833c; }
.message-author[data-color="3"], .person-name[data-color="3"] { color: #c72d86; }
.message-author[data-color="4"], .person-name[data-color="4"] { color: #b75e00; }
.message-author[data-color="5"], .person-name[data-color="5"] { color: #087f98; }
.message-body { display: inline; color: #202637; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-role { display: inline-block; color: #5f6a80; background: #edf0f6; padding: 0 5px; border-radius: 4px; margin-right: 7px; font-size: .75rem; line-height: 1.65; vertical-align: 1px; }
.message.is-self { background: #f8faff; border-radius: 6px; }
.message.is-mention { background: #eaf1ff; border-radius: 6px; box-shadow: inset 3px 0 #4670f5; padding-left: 9px; }
.message-body .mention, .mention { color: #1845d6; background: #dce8ff; border-radius: 4px; padding: 0 3px; font-weight: 700; }
.message-body mark, mark.search-match { background: #fff0ad; color: #573c00; border-radius: 3px; padding: 0 2px; }
.system-message { display: flex; align-items: baseline; gap: 8px; padding: 10px 13px; margin: 2px 0 13px; background: linear-gradient(100deg,#edf4ff,#e4edff); border: 1px solid #dbe5fb; border-radius: 7px; color: #526280; font-size: .875rem; line-height: 1.7; }
.system-message > .icon { width: 18px; height: 18px; align-self: center; color: var(--blue); }
.system-message .system-author, .system-message strong { color: #254ecf; font-weight: 750; }
.system-message .message-time { min-width: auto; margin: 0; font-size: .8125rem; }
.empty-state { padding: 9px 14px; text-align: left; color: #7b8599; font-size: .9375rem; line-height: 1.8; }
.empty-state h3 { font-size: 1rem; color: #4f6082; font-weight: 600; margin-bottom: 4px; }
.search-empty { color: #6f7e99; font-size: .9375rem; padding: 20px 14px; }
.latest-messages { position: absolute; z-index: 2; bottom: 16px; left: 50%; transform: translateX(-50%); background: var(--blue); color: #fff; padding: 8px 15px; border-radius: 20px; font-size: .875rem; box-shadow: 0 4px 15px #1437b733; white-space: nowrap; }
.people-panel { display: flex; flex-direction: column; padding: 17px 19px 16px; min-height: 0; border-left: 1px solid #dde4f0; background: #fff; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #cad1df transparent; }
.people-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid #d3def1; margin-bottom: 4px; }
.people-heading h2 { font-size: .9375rem; font-weight: 800; color: #121b30; }
.small-count { font-weight: 400; font-variant-numeric: tabular-nums; color: #47556f; margin-left: 4px; }
.small-count:before { content: "("; }
.small-count:after { content: ")"; }
.people-list { display: flex; flex-direction: column; }
.person { display: flex; align-items: center; gap: 9px; padding: 10px 0; border-bottom: 1px solid #e6eaf3; min-width: 0; }
.person .avatar { width: 33px; height: 33px; font-size: .9375rem; }
.person-name { min-width: 0; display: block; padding: 0; border: 0; background: transparent; color: #1b253c; font-size: .9375rem; font-weight: 680; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.person-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.person-role { padding: 1px 6px; border-radius: 8px; font-size: .75rem; background: #eff1f6; color: #586379; line-height: 1.55; white-space: nowrap; }
.person-role.is-member { color: #2850a9; background: #e5eeff; }
.person-you { font-size: .75rem; color: #8a93a5; }
.person-mic { display: inline-flex; align-items: center; margin-left: auto; color: #a8afbc; }
.person-mic .icon { width: 19px; height: 19px; }
.person-mic[data-state=open] { color: #2452eb; }
.person-mic[data-state=muted] { color: #81899b; }
.person-mic[data-state=off] { color: #b9c0ce; }
.people-empty { padding: 18px 0; font-size: .875rem; color: #79869f; line-height: 1.7; }
.roster-note { margin-top: auto; display: flex; align-items: flex-start; gap: 8px; padding: 25px 0 0; font-size: .8125rem; color: #9aa3b6; line-height: 1.6; }
.roster-note .icon { width: 15px; height: 15px; margin-top: 3px; }
.close-people { display: none; }
.guest-banner { display: flex; align-items: center; justify-content: center; gap: 17px; padding: 9px 23px; background: #f7f9fe; border-top: 1px solid #e4e9f4; font-size: .875rem; }
.guest-banner p { display: flex; align-items: center; gap: 8px; color: #6a7792; }
.guest-banner strong { color: #3f5277; font-weight: 650; }
.guest-banner .button { min-height: 33px; padding: 5px 11px; font-size: .8125rem; color: #284d9a; background: #fff; }
.voice-dock { margin: 11px 20px 0; padding: 11px 15px; display: flex; align-items: center; gap: 18px; position: relative; border: 1px solid #d7e2fd; border-radius: 10px; background: linear-gradient(102deg,#eef4ff,#e1ebff); min-width: 0; }
.voice-dock-main { display: flex; align-items: center; gap: 9px; min-width: 0; flex-shrink: 0; }
.dock-headphones { color: #153bc2; width: 27px; height: 27px; }
.voice-dock h2 { font-size: 1rem; line-height: 1.4; font-weight: 750; color: #1a294d; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.capacity { color: #435778; white-space: nowrap; font-size: .9375rem; padding-left: 0; }
.capacity:before { content: "·"; margin-right: 8px; color: #687ca5; }
.voice-dock-people { display: flex; align-items: center; gap: 12px; border-left: 1px solid #a5b7db; padding-left: 19px; min-width: 0; }
.voice-participants { display: flex; align-items: center; gap: 0; flex-shrink: 0; }
.voice-participants:empty { display: none; }
.voice-person { position: relative; display: flex; align-items: center; justify-content: center; margin-left: -7px; }
.voice-person:first-child { margin-left: 0; }
.voice-person .avatar { width: 34px; height: 34px; border: 2px solid #e8f0ff; font-size: .875rem; }
.voice-person-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.voice-person-muted { position: absolute; right: -1px; bottom: -2px; display: flex; align-items: center; justify-content: center; background: #fff; color: #6a7994; border-radius: 50%; width: 15px; height: 15px; border: 1px solid #c8d6f1; }
.voice-person-muted .icon { width: 10px; height: 10px; }
.voice-person.is-connected .avatar { box-shadow: 0 0 0 1px #7b9ef4; }
.voice-person.is-connecting .avatar { box-shadow: 0 0 0 1px #d7ad5d; }
.voice-person.is-failed .avatar { box-shadow: 0 0 0 1px #cc6478; }
.voice-summary { color: #536688; font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voice-empty { display: none; }
.voice-dock-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }
.voice-controls { display: flex; align-items: center; gap: 7px; }
.voice-control { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #b9c8e5; border-radius: 8px; background: #ffffffca; padding: 8px 12px; font-size: .875rem; min-height: 41px; color: #3e5278; }
.voice-control:hover { background: #fff; border-color: #7d9fe4; }
.voice-control[aria-pressed=true] { background: #fff0f3; color: #a32c4c; border-color: #e2b9c4; }
.voice-control .icon { width: 19px; height: 19px; }
.voice-join { min-height: 43px; padding: 9px 18px; }
.voice-join.is-joined { background: #fff; color: #b52746; border-color: #deb5c3; box-shadow: none; }
.voice-join.is-joined:hover { background: #fff0f4; }
.voice-help { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.composer-area { padding: 12px 20px 10px; min-width: 0; }
.composer { display: flex; align-items: flex-end; gap: 10px; position: relative; }
.emoji-container { position: relative; flex-shrink: 0; }
.emoji-toggle { width: 49px; height: 49px; border: 1px solid #aabada; border-radius: 9px; background: #fff; color: #1c2a48; }
.emoji-toggle .icon { width: 25px; height: 25px; }
.emoji-toggle[aria-expanded=true] { background: #eaf0ff; border-color: #668cec; }
.emoji-picker { position: absolute; z-index: 15; left: 0; bottom: 59px; display: grid; grid-template-columns: repeat(6,1fr); gap: 5px; background: #fff; border: 1px solid #b7c7e8; border-radius: 12px; box-shadow: 0 10px 35px #253d6d29; padding: 10px; width: 272px; }
.emoji-picker button { width: 36px; height: 36px; border-radius: 6px; background: #fff; font-size: 1.4rem; }
.emoji-picker button:hover { background: #edf3ff; }
.composer textarea { display: block; flex: 1; min-width: 0; resize: none; min-height: 49px; max-height: 145px; border: 1px solid #aabada; border-radius: 9px; padding: 12px 16px; color: #17243f; background: #fff; font-size: 1rem; line-height: 1.45; scrollbar-width: thin; }
.composer textarea:focus { border-color: #557ee7; }
.composer textarea::placeholder { color: #7b879f; }
.composer textarea:disabled { background: #fbfcff; }
.send-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 49px; min-width: 132px; padding: 10px 20px; border-radius: 9px; background: linear-gradient(#194fff,#1039dc); border: 1px solid #133cde; color: #fff; font-size: 1rem; font-weight: 700; flex-shrink: 0; }
.send-button:hover { background: #1036d6; }
.send-button .icon { width: 23px; height: 23px; }
.composer-hint { display: flex; justify-content: space-between; gap: 12px; margin-top: 7px; font-size: .75rem; color: #8390a7; }
.composer-hint > span:last-child { white-space: nowrap; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 25px; transform: translateX(-50%); padding: 12px 19px; border: 1px solid #aec2eb; border-radius: 10px; background: #fff; color: #294271; box-shadow: 0 8px 36px #20375922; font-size: .9375rem; max-width: calc(100vw - 28px); width: max-content; text-align: center; }
.toast.is-error { color: #a02945; background: #fff8fa; border-color: #e4b4c2; }
.dialog { color: var(--ink); background: #fff; border: 1px solid #b9caec; border-radius: 16px; padding: 32px; width: 460px; max-width: calc(100vw - 30px); max-height: calc(var(--app-height,100dvh) - 36px); box-shadow: 0 20px 80px #0d24503b; overflow-y: auto; overscroll-behavior: contain; }
.dialog::backdrop { background: #13295466; backdrop-filter: blur(3px); }
.dialog-close { position: absolute; right: 10px; top: 10px; }
.dialog h2 { color: #152a54; font-size: 1.75rem; line-height: 1.2; font-weight: 800; letter-spacing: -.04em; padding-right: 22px; margin-bottom: 12px; }
.dialog-description { color: #6c7b96; font-size: .9375rem; line-height: 1.7; margin-bottom: 22px; }
.dialog label { display: flex; flex-direction: column; gap: 8px; margin-bottom: 17px; color: #34496d; font-size: .875rem; font-weight: 650; }
.dialog input, .dialog textarea, .dialog select { width: 100%; min-width: 0; padding: 11px 12px; color: #20324f; background: #fbfcff; border: 1px solid #b4c5e2; border-radius: 8px; font-size: 1rem; font-weight: 400; }
.dialog input::placeholder { color: #94a0b6; }
.dialog textarea { resize: vertical; min-height: 80px; }
.dialog select { appearance: none; padding-right: 35px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23556688' stroke-width='1.5'/%3E%3C/svg%3E"); background-position: right 12px center; background-repeat: no-repeat; }
.dialog .field-help { font-size: .8125rem; font-weight: 400; line-height: 1.6; color: #7787a2; }
.dialog .button { width: 100%; margin-top: 5px; }
.dialog-error { color: #b42b4b; font-size: .875rem; margin-top: 11px; line-height: 1.6; }
.dialog-note { color: #7a89a3; margin-top: 19px; padding-top: 15px; border-top: 1px solid #e3e9f4; font-size: .8125rem; line-height: 1.7; }
.dialog .profile-code { font-family: ui-monospace,monospace; font-size: .8125rem; }
.dialog-actions { display: flex; gap: 10px; }
body[data-text-size=large] .messages { font-size: 1.25rem; }
body[data-text-size=large] .message-time { font-size: 1rem; min-width: 8rem; }
body[data-density=compact] .message { padding-top: 2px; padding-bottom: 2px; line-height: 1.5; }
body[data-timestamps=hidden] .message-time { display: none; }
@media (min-width: 1550px) {
  .masthead { min-height: 112px; padding: 23px 32px; }
  .room-nav { padding: 16px 26px; }
  .room-button { min-height: 49px; padding-left: 30px; padding-right: 30px; font-size: 1.125rem; }
  .chat-workspace { grid-template-columns: minmax(0,1fr) 325px; }
  .messages { font-size: 1.125rem; padding-left: 28px; padding-right: 28px; }
  .person { padding-top: 12px; padding-bottom: 12px; }
  .voice-dock { margin-left: 24px; margin-right: 24px; padding: 13px 18px; }
  .composer-area { padding-left: 24px; padding-right: 24px; padding-bottom: 14px; }
}
@media (max-width: 1350px) {
  .masthead { gap: 20px; padding-left: 23px; padding-right: 23px; }
  .membership-note { display: none; }
  .membership-note + .auth-actions { margin-left: auto; }
  .room-label { display: none; }
  .voice-dock { gap: 13px; }
  .voice-dock-people { gap: 8px; padding-left: 13px; }
  .deafen-control { width: 40px; padding-left: 8px; padding-right: 8px; }
  .deafen-control > span { display: none; }
}
@media (max-width: 1100px) {
  .brand-tagline { display: none; }
  .brand { font-size: 2.6rem; }
  .masthead { min-height: 88px; padding-top: 17px; padding-bottom: 17px; }
  .room-nav { padding: 12px 18px; gap: 8px; }
  .room-nav-actions { gap: 7px; padding-left: 6px; }
  .room-button { padding-left: 17px; padding-right: 17px; }
  .room-toolbar { gap: 9px; padding-left: 20px; padding-right: 20px; }
  .room-heading h2 { max-width: 160px; }
  .search-field { width: 205px; }
  .chat-workspace { grid-template-columns: minmax(0,1fr) 245px; }
  .people-panel { padding-left: 14px; padding-right: 14px; }
  .person { gap: 7px; }
  .person .avatar { width: 30px; height: 30px; font-size: .875rem; }
  .person-role { padding-left: 5px; padding-right: 5px; font-size: .75rem; }
  .person-you { display: none; }
  .messages { padding-left: 18px; padding-right: 18px; }
  .message-time { min-width: 6.8rem; margin-right: 5px; font-size: .8125rem; }
  .voice-dock h2 { max-width: 170px; }
  .voice-summary { max-width: 200px; }
  .voice-dock-people { flex: 1; }
  .voice-controls > .voice-control { width: 39px; padding: 7px; }
  .voice-controls > .voice-control > span { display: none; }
}
@media (max-width: 850px) {
  .masthead { padding: 16px 20px; }
  .brand { font-size: 2.2rem; }
  .auth-actions { gap: 6px; }
  .auth-actions .button { padding: 9px 12px; font-size: .875rem; }
  .auth-actions .text-button { padding-left: 3px; padding-right: 3px; }
  .auth-actions .button > .icon { display: none; }
  .invite-entry { width: 41px; padding: 8px; }
  .invite-entry > span { display: none; }
  .room-nav-actions { gap: 6px; }
  .room-list { gap: 7px; }
  .room-button { padding: 9px 14px; font-size: 1rem; }
  .room-name { max-width: 150px; }
  .room-toolbar { flex-wrap: wrap; padding: 9px 18px; gap: 8px; }
  .room-heading { order: 0; }
  .topic { order: 1; flex: 1; font-size: .875rem; padding-left: 12px; }
  #share-room { order: 2; }
  .search-field { order: 3; width: 100%; flex: 1 0 calc(100% - 48px); }
  .people-toggle { display: inline-flex; order: 4; width: 38px; height: 37px; border: 1px solid #b5c4e4; background: #fff; }
  .chat-workspace { display: flex; }
  .transcript-panel { width: 100%; }
  .people-panel { display: none; position: fixed; top: 0; right: 0; bottom: 0; z-index: 40; width: min(310px,88vw); padding: 20px; border-left: 1px solid #b9cbea; box-shadow: -10px 0 45px #18335c24; }
  .people-panel.is-open { display: flex; }
  .people-heading h2 { font-size: 1rem; }
  .close-people { display: inline-flex; }
  .person .avatar { width: 35px; height: 35px; }
  .person-name { font-size: 1rem; }
  .person-role { font-size: .8125rem; }
  .people-backdrop { position: fixed; inset: 0; z-index: 35; background: #17315a44; backdrop-filter: blur(2px); }
  .voice-dock { flex-wrap: wrap; gap: 9px 12px; padding: 11px 12px; margin: 9px 15px 0; }
  .voice-dock-main { order: 0; }
  .voice-dock-main h2 { max-width: 200px; }
  .voice-dock-actions { order: 1; }
  .voice-dock-people { order: 2; flex-basis: 100%; border-left: 0; border-top: 1px solid #c9d8f4; padding: 8px 0 0; }
  .voice-summary { max-width: none; }
  .voice-participants .avatar { width: 28px; height: 28px; font-size: .8125rem; }
  .voice-dock-people:has(.voice-participants:empty) { display: none; }
  .voice-join { font-size: .875rem; min-height: 38px; padding: 7px 13px; }
  .voice-dock-actions .voice-control { min-height: 38px; width: 36px; }
  .dock-headphones { width: 24px; height: 24px; }
  .composer-area { padding: 10px 15px max(9px,env(safe-area-inset-bottom)); }
}
@media (max-width: 600px) {
  .app-shell { min-height: 0; }
  .masthead { gap: 10px 8px; padding: 13px 15px 11px; min-height: 0; flex-wrap: wrap; }
  .brand { font-size: 2.05rem; letter-spacing: -.07em; }
  .auth-actions { width: 100%; display: flex; margin: 0; gap: 7px; }
  .membership-note + .auth-actions { margin-left: 0; }
  .auth-actions .button { min-height: 35px; font-size: .875rem; padding: 7px 12px; }
  .auth-actions .primary { margin-left: auto; min-width: 86px; }
  .auth-actions .secondary { padding-left: 12px; padding-right: 12px; }
  .auth-actions .button > .icon { display: inline; width: 16px; height: 16px; }
  .profile-button { min-width: 0; max-width: 128px; gap: 6px; padding: 4px 7px 4px 4px; border-radius: 8px; }
  .profile-button .avatar { width: 27px; height: 27px; font-size: .75rem; }
  .profile-button > .icon { display: none; }
  .profile-copy strong { font-size: .8125rem; max-width: 72px; }
  .profile-copy > span { display: none; }
  .room-nav { padding: 9px 12px; gap: 6px; }
  .room-list { gap: 6px; flex: 1; }
  .room-button { min-height: 37px; padding: 7px 12px; border-radius: 7px; font-size: .9375rem; }
  .room-button > .icon { width: 14px; height: 14px; }
  .room-name { max-width: 130px; }
  .room-voice-count { display: none; }
  .create-room { height: 37px; width: 35px; border-radius: 7px; }
  .create-room .icon { width: 21px; height: 21px; }
  .room-nav-actions { gap: 3px; padding: 0; }
  .invite-entry { width: 34px; min-height: 37px; padding: 7px; border-radius: 7px; }
  .settings-button { width: 31px; height: 35px; padding-left: 7px; }
  .settings-button .icon { width: 21px; height: 21px; }
  .room-toolbar { padding: 8px 13px; gap: 7px; }
  .room-heading h2 { font-size: .9375rem; max-width: 108px; }
  .header-room-icon .icon { width: 16px; height: 16px; }
  .topic { font-size: .8125rem; gap: 5px; padding-left: 10px; }
  .topic strong { display: none; }
  #share-room { width: 24px; height: 27px; }
  #share-room .icon { width: 16px; height: 16px; }
  .search-field { min-height: 32px; padding-left: 9px; padding-right: 7px; }
  .search-field input { font-size: .875rem; padding: 5px 0; }
  .search-field > .icon { width: 17px; height: 17px; }
  .people-toggle { height: 32px; width: 34px; }
  .chat-status-bar { padding: 8px 14px 2px; font-size: .75rem; min-height: 27px; }
  .messages { padding: 9px 12px 17px; font-size: 1rem; }
  .message { padding: 5px 1px; line-height: 1.65; }
  .message-time { min-width: 5.7rem; font-size: .75rem; margin-right: 4px; }
  .message-author { margin-right: 3px; }
  .message-role { font-size: .6875rem; padding: 0 4px; margin-right: 4px; }
  .system-message { padding: 8px 9px; font-size: .8125rem; gap: 7px; align-items: flex-start; }
  .system-message > .icon { align-self: flex-start; width: 16px; height: 16px; margin-top: 3px; }
  .system-message .message-time { display: none; }
  .empty-state { padding: 5px 9px; font-size: .875rem; }
  .guest-banner { gap: 8px; justify-content: space-between; padding: 7px 13px; font-size: .8125rem; }
  .guest-banner p { display: block; }
  .guest-banner p > span { display: none; }
  .guest-banner .button { font-size: .75rem; padding: 5px 7px; min-height: 30px; }
  .voice-dock { margin: 8px 10px 0; gap: 8px; padding: 9px 10px; border-radius: 8px; }
  .voice-dock-main { gap: 6px; min-width: 0; flex: 1; }
  .dock-headphones { width: 21px; height: 21px; }
  .voice-dock h2 { font-size: .875rem; max-width: 132px; }
  .capacity { font-size: .8125rem; }
  .capacity:before { margin-right: 4px; }
  .voice-dock-actions { gap: 6px; }
  .voice-join { padding: 7px 10px; min-height: 35px; font-size: .8125rem; border-radius: 7px; gap: 5px; }
  .voice-join > .icon { width: 16px; height: 16px; }
  .voice-controls { gap: 5px; }
  .voice-dock-actions .voice-control { width: 32px; min-height: 35px; padding: 6px; border-radius: 7px; }
  .voice-controls .icon { width: 17px; height: 17px; }
  .voice-dock:has(.voice-controls:not([hidden])) .voice-dock-main { flex-basis: 100%; }
  .voice-dock:has(.voice-controls:not([hidden])) .voice-dock-actions { width: 100%; justify-content: flex-end; }
  .voice-dock:has(.voice-controls:not([hidden])) .voice-dock-people { order: 1; border: 0; flex: 1; padding: 0; }
  .voice-dock:has(.voice-controls:not([hidden])) .voice-dock-actions { order: 2; width: auto; }
  .voice-summary { font-size: .8125rem; }
  .composer-area { padding: 9px 10px max(8px,env(safe-area-inset-bottom)); }
  .composer { gap: 7px; }
  .emoji-toggle { width: 39px; height: 43px; border-radius: 7px; }
  .emoji-toggle .icon { width: 23px; height: 23px; }
  .composer textarea { min-height: 43px; padding: 10px 11px; border-radius: 7px; }
  .send-button { min-width: 45px; min-height: 43px; padding: 10px 11px; border-radius: 7px; }
  .send-button > span { display: none; }
  .send-button .icon { width: 21px; height: 21px; }
  .composer-hint { font-size: .6875rem; gap: 8px; line-height: 1.45; margin-top: 6px; }
  .emoji-picker { bottom: 52px; width: 264px; }
  .dialog { padding: 28px 22px; border-radius: 13px; }
  .dialog h2 { font-size: 1.6rem; }
  .dialog-description { font-size: .875rem; }
  .toast { bottom: 18px; font-size: .875rem; padding: 10px 14px; }
  body[data-text-size=large] .messages { font-size: 1.125rem; }
  body[data-text-size=large] .message-time { min-width: 5.9rem; font-size: .8125rem; }
}
@media (max-height: 610px) and (min-width: 851px) {
  .masthead { min-height: 72px; padding-top: 12px; padding-bottom: 12px; }
  .room-nav { padding-top: 8px; padding-bottom: 8px; }
  .room-toolbar { min-height: 48px; padding-top: 7px; padding-bottom: 7px; }
  .voice-dock { margin-top: 7px; padding-top: 7px; padding-bottom: 7px; }
  .composer-area { padding-top: 8px; padding-bottom: 5px; }
}
/* Phones keep the composer above the software keyboard and reserve safe
   areas without shrinking message text or disabling pinch zoom. */
@media (max-width: 850px) {
  .app-shell { position: fixed; top: var(--visual-top,0px); left: 0; right: 0; width: 100%; padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
  .masthead { padding-top: max(13px,env(safe-area-inset-top)); }
  .room-button, .auth-actions .button, .guest-banner .button, .profile-button, .voice-join, .voice-dock-actions .voice-control { min-height: 44px; }
  .create-room, .invite-entry, .settings-button, .people-toggle, #share-room, .clear-search, .close-people, .dialog-close, .admin-link { min-width: 44px; width: 44px; min-height: 44px; height: 44px; padding: 8px; }
  .admin-link > span { display: none; }
  .room-nav-actions { flex-shrink: 0; }
  .search-field { flex: 1 0 calc(100% - 52px); min-height: 44px; }
  .search-field input { font-size: 1rem; min-height: 42px; }
  .emoji-toggle, .send-button { width: 44px; min-width: 44px; min-height: 44px; height: 44px; }
  .send-button { padding: 10px; gap: 0; }
  .send-button > span { display: none; }
  .send-button .icon { width: 22px; height: 22px; }
  .emoji-picker { width: min(296px,calc(100vw - 24px)); grid-template-columns: repeat(6,minmax(0,1fr)); gap: 2px; padding: 8px; }
  .emoji-picker button { width: 100%; height: 44px; }
  .composer textarea { min-height: 44px; font-size: 1rem; }
  .chat-status-bar { flex-wrap: wrap; row-gap: 2px; }
  .search-status { order: 3; flex-basis: 100%; margin-left: 0; }
  .people-panel { top: var(--visual-top,0px); bottom: auto; height: var(--app-height,100dvh); padding-top: max(18px,env(safe-area-inset-top)); padding-bottom: max(18px,env(safe-area-inset-bottom)); }
  .person-name { padding: 10px 0; min-height: 44px; }
  .person { padding-top: 3px; padding-bottom: 3px; }
  .dialog { position: fixed; top: calc(var(--visual-top,0px) + 12px); bottom: auto; margin: 0 auto; max-height: calc(var(--app-height,100dvh) - 24px); }
  .dialog label { scroll-margin-top: 12px; }
  .toast { bottom: auto; top: calc(var(--visual-top,0px) + max(12px,env(safe-area-inset-top))); pointer-events: none; }
  .banned-notice { margin: 12px; padding: 14px; }
  .banned-notice .button { white-space: normal; text-align: center; }
  body.keyboard-open .masthead, body.keyboard-open .room-nav, body.keyboard-open .guest-banner { display: none; }
  body.keyboard-open .app-shell { grid-template-rows: auto minmax(0,1fr) auto auto; }
  body.keyboard-open[data-input-kind=message] .search-field { display: none; }
  body.keyboard-open .room-toolbar { flex-wrap: nowrap; padding-top: 3px; padding-bottom: 3px; }
  body.keyboard-open .room-toolbar .topic, body.keyboard-open #share-room { display: none; }
  body.keyboard-open .people-toggle { margin-left: auto; }
  body.keyboard-open .voice-dock { margin-top: 4px; padding-top: 4px; padding-bottom: 4px; }
  body.keyboard-open .voice-dock-main, body.keyboard-open .voice-dock-people { display: none; }
  body.keyboard-open .voice-dock-actions { width: 100%; justify-content: flex-end; }
  body.keyboard-open .composer-area { padding-top: 5px; padding-bottom: 5px; }
  body.keyboard-open .composer-hint { display: none; }
}
@media (max-width: 600px) {
  .brand { font-size: clamp(1.45rem,7.6vw,2.05rem); }
  .brand-heading { order: 0; }
  .profile-button { order: 1; }
  .auth-actions { order: 2; }
  .auth-actions .secondary { padding-left: 8px; padding-right: 8px; }
  .room-nav { padding: 6px 10px; }
  .room-nav-actions { gap: 0; }
  .room-toolbar { gap: 5px; padding: 5px 10px; }
  .room-heading h2 { max-width: 100px; }
  .voice-dock { padding: 6px 8px; }
  .voice-dock-main { gap: 4px; }
  .voice-dock h2 { max-width: 116px; }
  .voice-join { padding: 7px 9px; }
  .voice-dock-actions .voice-control { width: 44px; }
  .composer-hint > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .composer-hint { font-size: .75rem; }
}
@media (max-width: 420px) {
  .room-nav { flex-wrap: wrap; row-gap: 2px; }
  .room-list { order: 0; flex: 1 0 100%; width: 100%; }
  .create-room { order: 1; }
  .room-nav-actions { order: 2; margin-left: auto; }
}
@media (max-width: 850px) and (max-height: 480px) {
  .masthead { padding-top: max(5px,env(safe-area-inset-top)); padding-bottom: 5px; }
  .brand { font-size: 1.5rem; }
  .room-nav { padding-top: 3px; padding-bottom: 3px; }
  .room-toolbar { flex-wrap: nowrap; padding-top: 3px; padding-bottom: 3px; }
  .room-toolbar .topic, .room-toolbar #share-room { display: none; }
  .search-field { width: auto; flex: 1; }
  .voice-dock { margin-top: 4px; padding-top: 3px; padding-bottom: 3px; }
  .voice-dock-people { display: none; }
  .composer-area { padding-top: 4px; padding-bottom: max(4px,env(safe-area-inset-bottom)); }
  .composer-hint { display: none; }
  .guest-banner { display: none; }
  .app-shell { grid-template-rows: auto auto auto minmax(0,1fr) auto auto; }
  body.keyboard-open .app-shell { grid-template-rows: auto minmax(0,1fr) auto auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
