:root{--border:gray;--border-strong:#000;--muted:#4a4a4a;--surface:silver;--surface-soft:#d4d0c8;--blue:navy;--blue-dark:navy;--blue-soft:#b7c4ff;--green-soft:#fff;--cyan-soft:#fff;color:#000;font-synthesis:none;text-rendering:geometricprecision;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background:teal;font-family:MS Sans Serif,Microsoft Sans Serif,Tahoma,Geneva,sans-serif;font-weight:400;line-height:1.4}*{box-sizing:border-box}html,body,#root{min-height:100%}html,body{overscroll-behavior-x:none}body{background:teal;margin:0}h1,h2,h3,p{margin:0}button,input,textarea{font:inherit}a{color:inherit;text-decoration:none}.app-shell{background:teal;grid-template-columns:308px minmax(0,1fr);min-height:100vh;display:grid}.login-shell{background:teal;justify-content:center;align-items:center;min-height:100vh;padding:20px;display:flex}.login-panel,.new-chat-modal{width:min(420px,100%)}.login-panel{flex-direction:column;gap:12px;display:flex}.new-chat-actions{justify-content:flex-start;margin-top:8px;display:flex}.login-head{flex-direction:column;gap:4px;display:flex}.sidebar,.chat-layout{padding:10px}.sidebar{background:0 0;flex-direction:column;gap:12px;display:flex}.chat-layout{grid-template-rows:auto minmax(0,1fr) auto;gap:0;min-width:0;height:calc(100vh - 32px);display:grid}.panel{background:var(--surface);box-shadow:none;border:2px solid #404040;border-color:#fff #404040 #404040 #fff;border-radius:0;padding:12px}.simple-head,.simple-row,.chat-head,.inbox-row,.message-meta,.attachment-head{justify-content:space-between;align-items:center;gap:8px;display:flex}.simple-head,.chat-head{align-items:flex-start}.sidebar-top,.sidebar-user,.chat-item-main{align-items:center;gap:10px;display:flex}.inbox-row,.chat-item-main,.chat-item-copy,.preview{min-width:0}.sidebar-top{justify-content:space-between}.sidebar-user-meta,.chat-item-copy{flex-direction:column;gap:2px;min-width:0;display:flex}.chat-title-row{justify-content:space-between;align-items:center;gap:8px;width:100%;min-width:0;display:flex}.chat-title-row strong{flex:auto;min-width:0}.chat-item-copy strong,.chat-item-copy span,.chat-item-copy p,.chat-item-copy h2{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.avatar{color:#000;width:40px;height:40px;box-shadow:none;background:#d4d0c8;border:2px solid #fff;border-color:gray #fff #fff gray;border-radius:0;flex:none;justify-content:center;align-items:center;font-weight:700;display:inline-flex}.avatar.small{width:36px;height:36px;font-size:13px}.field,.attachment-list,.attachment-row,.reply-banner,.audio-block{flex-direction:column;gap:8px;display:flex}.field span,.muted,.preview,.waveform{color:var(--muted)}.chat-status-line{align-items:center;gap:6px;min-height:16px;line-height:16px;display:flex}.status-connecting{opacity:1;align-items:center;gap:6px;min-height:16px;transition:opacity .16s;display:inline-flex}.status-connecting:not(.is-busy) .status-spinner{opacity:0}.status-label{min-width:72px;display:inline-block}.status-spinner{background:conic-gradient(green 0deg 90deg,#00800029 90deg 360deg);border-radius:999px;flex:none;width:14px;height:14px;transition:opacity .16s;animation:.75s linear infinite status-spin;display:inline-block;position:relative}.status-spinner:after{content:"";background:#fff;border-radius:999px;position:absolute;inset:3px}input,textarea,button,.file-button{width:100%;color:inherit;font:inherit;box-shadow:none;background:#d4d0c8;border:2px solid #404040;border-color:#fff #404040 #404040 #fff;border-radius:0;padding:6px 8px}textarea{resize:none;min-height:38px;line-height:20px;overflow-y:hidden}button,.file-button{cursor:pointer;width:auto;transition:none}button:hover,.file-button:hover{box-shadow:none;transform:none}button:active,.file-button:active{border-color:#404040 #fff #fff #404040;transform:none}.ghost-button{background:#d4d0c8}.inline-form{grid-template-columns:minmax(0,1fr) auto;gap:8px;display:grid}.sidebar-actions{flex-direction:column;gap:8px;display:flex}.inbox-panel{flex-direction:column;flex:1;min-height:0;display:flex}.inbox-panel .simple-row:first-child{margin-bottom:10px}.inbox-list,.message-list{flex-direction:column;gap:6px;min-height:0;display:flex;overflow:auto}.inbox-item{text-align:left;justify-content:space-between;align-items:center;gap:8px;width:100%;display:flex;position:relative}.inbox-item.selected{color:#fff;background:navy;border-color:#404040 #fff #fff #404040}.badge{text-align:center;color:#fff;min-width:24px;box-shadow:none;background:navy;border:1px solid #404040;border-radius:0;flex:none;padding:2px 6px;font-weight:400}.inbox-badge{z-index:1;position:absolute;top:10px;right:10px}.thread-panel{min-height:0;position:relative;overflow:hidden}.thread-panel.is-positioning .message-list{visibility:hidden}.jump-to-latest-button{z-index:4;justify-content:center;align-items:center;width:36px;min-width:36px;height:36px;padding:0;font-size:18px;display:inline-flex;position:absolute;bottom:16px;right:16px}.message-row{border-radius:0;position:relative}.message-row.is-highlighted:after{content:"";pointer-events:none;animation:1.4s ease-in-out reply-target-flash;position:absolute;inset:0}.message-card{width:fit-content;max-width:min(720px,100%);box-shadow:none;touch-action:pan-y;background:#fff;border:2px solid #404040;border-color:#fff #404040 #404040 #fff;border-radius:0;padding:8px 10px;position:relative;overflow:visible}.message-row.is-highlighted .message-card:after{content:"";pointer-events:none;animation:1.4s ease-in-out reply-target-flash;position:absolute;inset:0}.message-card-shift{transform:none}.message-card.own{background:#f5fbff;margin-left:auto}.message-card.peer{background:#f7fff4;margin-right:auto}.message-text{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;margin:4px 0;line-height:1.32}.reply-snippet,.reply-banner-copy,.attachment-fallback,.error-text{overflow-wrap:anywhere;word-break:break-word}.reply-snippet,.reply-banner,.attachment-chip,.attachment-card,.empty-state,.error-banner,.error-text,.attachment-fallback{box-shadow:none;background:#d4d0c8;border:2px solid #404040;border-color:#fff #404040 #404040 #fff;border-radius:0;padding:10px}.reply-banner{padding-right:34px;position:relative}.reply-banner-copy{min-width:0}.reply-banner-copy p{margin:2px 0 0}.reply-cancel-button{justify-content:center;align-items:center;width:20px;min-width:20px;height:20px;padding:0;line-height:1;display:inline-flex;position:absolute;top:6px;right:6px}.day-divider{justify-content:center;margin:6px 0;display:flex}.day-divider span{color:var(--muted);font-size:12px}.unread-divider{color:navy;opacity:1;align-items:center;gap:8px;max-height:24px;margin:8px 0;transition:opacity .18s,max-height .22s,margin .22s;display:flex;overflow:hidden}.unread-divider:before,.unread-divider:after{content:"";background:navy;flex:auto;height:1px}.unread-divider span{white-space:nowrap;font-size:12px}.unread-divider.is-closing{opacity:0;max-height:0;margin:0}@keyframes reply-target-flash{0%,to{background:0 0}12%,36%,60%{background:#0000ff24}24%,48%,72%{background:0 0}}.attachment-row{margin-bottom:8px}.recording-indicator{box-shadow:none;background:#ffffe1;border:2px solid #404040;border-color:#fff #404040 #404040 #fff;border-radius:0;padding:8px 10px;font-size:12px}.attachment-chip{align-items:center;gap:8px;display:flex}.attachment-chip img,.media-preview{object-fit:cover;aspect-ratio:11/9;background:#f3f3f3;border:2px solid #404040;border-color:#fff #404040 #404040 #fff;border-radius:0;width:220px;height:180px;display:block}.media-button{cursor:pointer;background:0 0;border:0;padding:0}.media-button:active{border:0}.attachment-kind{min-width:48px;color:var(--muted);text-transform:uppercase;font-size:12px}.composer-actions{flex-direction:column;align-items:stretch;gap:8px;display:flex}.composer-buttons{flex-flow:wrap;justify-content:flex-start;align-items:center;gap:8px;display:flex}.icon-button{width:44px;height:44px;box-shadow:none;cursor:pointer;background:#d4d0c8;border-color:#fff #404040 #404040 #fff;justify-content:center;align-items:center;padding:0;font-size:22px;line-height:1;display:inline-flex}.toolbar-icon{width:28px;min-width:28px;height:28px;padding:0;font-size:14px}.icon-button:disabled{cursor:not-allowed}.recording-button{color:#000;background:#ffffe1}.file-input-hidden{clip:rect(0 0 0 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.composer-panel{z-index:2;background:silver;border-top:0;flex-direction:column;gap:6px;display:flex;position:sticky;bottom:0}.message-list{height:100%;padding-bottom:32px;overflow:auto}.message-list-sentinel{pointer-events:none;height:1px;margin-top:-1px}.message-meta{grid-template-columns:auto 36px;align-items:start;column-gap:20px;min-width:0;display:grid}.message-meta strong,.message-meta span{font-size:12px;line-height:1.2}.waveform-bars{align-items:end;gap:2px;height:24px;margin-top:4px;display:flex}.waveform-bar{opacity:.85;background:navy;border-radius:0;width:3px}.voice-player{grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px;min-width:180px;max-width:100%;display:grid}.voice-play-button{justify-content:center;align-items:center;width:32px;min-width:32px;height:32px;padding:0;font-size:12px;font-weight:700;display:inline-flex}.voice-waveform{background:#fff;border:2px solid #fff;border-color:#404040 #fff #fff #404040;align-items:end;gap:2px;width:100%;min-width:0;padding:6px 8px;display:flex;overflow:hidden}.voice-waveform-bar{opacity:1;background:gray;flex:1 1 0;min-width:0}.voice-waveform-bar.active{background:navy}.voice-time{text-align:right;color:#000;min-width:34px;font-size:11px}.voice-player audio{display:none}.delivery-mark{letter-spacing:-1px;pointer-events:none;text-align:right;justify-self:end;width:36px;line-height:1;position:static}.delivery-delivered{opacity:.72}.delivery-read{opacity:1;letter-spacing:0;color:navy;font-weight:700}.reply-snippet{margin-top:4px;padding:6px 8px;font-size:12px}.message-context-menu{z-index:60;background:#d4d0c8;border:2px solid #404040;border-color:#fff #404040 #404040 #fff;min-width:132px;padding:2px;position:fixed}.message-context-item{text-align:left;background:#d4d0c8;border:1px solid #0000;width:100%;padding:6px 10px;display:block}.message-context-item:hover,.message-context-item:focus-visible{color:#fff;background:navy;outline:none}.attachment-list{gap:6px;margin-top:6px}.attachment-card{padding:8px}.adapter-panel summary{cursor:pointer;font-weight:700}.sidebar-top{align-items:flex-start}.sidebar-user-meta strong,.chat-item-copy h2,.simple-row h2{letter-spacing:.02em;font-weight:700}.chat-head{color:#fff;z-index:3;background:linear-gradient(#0a246a 0%,#1a3f8b 100%);border-bottom:0;justify-content:space-between;align-items:flex-start;padding-top:8px;padding-bottom:8px;display:flex;position:sticky;top:0}.chat-back-button{flex:none;width:28px;min-width:28px;height:28px;padding:0;display:none}.composer-buttons .icon-button:last-child{color:#000;box-shadow:none;background:#d4d0c8;border-color:#fff #404040 #404040 #fff}.chat-head .muted,.chat-head .chat-item-copy h2{color:#fff}.composer-buttons .icon-button:first-child,.composer-buttons .icon-button:nth-child(2),.composer-buttons .icon-button:nth-child(3){background:#fff}.message-list{padding-right:4px}.inbox-item,.reply-snippet{box-shadow:none}.inbox-item .preview,.muted{font-size:12px}.history-loading{text-align:center;padding:2px 0 6px}.sidebar-actions,.inbox-panel,.thread-panel,.composer-panel{background:silver}.thread-panel{border-top:0;flex-direction:column;display:flex}.inbox-item{border:2px solid gray;border-color:#fff gray gray #fff;border-radius:0;padding:10px;transition:none}.inbox-item:hover{box-shadow:none;background:#d4d0c8;transform:none}.composer-actions textarea{box-shadow:none;background:#fff;border-color:#404040 #fff #fff #404040}.gallery-backdrop{z-index:50;background:#00000085;justify-content:center;align-items:center;padding:18px;display:flex;position:fixed;inset:0}.inbox-modal-backdrop{z-index:50;background:#00000085;justify-content:center;align-items:flex-start;padding:12px;display:flex;position:fixed;inset:0}.gallery-modal{flex-direction:column;gap:10px;width:min(960px,100%);max-height:min(90vh,820px);display:flex}.gallery-toolbar{justify-content:space-between;align-items:center;gap:8px;display:flex}.gallery-stage{grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;display:grid}.gallery-image-wrap{flex-direction:column;gap:8px;min-width:0;display:flex}.gallery-image{object-fit:contain;background:#000;border:2px solid #fff;border-color:#404040 #fff #fff #404040;width:100%;max-height:68vh}.gallery-load-full{align-self:center}.gallery-nav{width:36px;min-width:36px;height:96px;padding:0;font-size:22px;line-height:1}.gallery-strip{gap:8px;padding-bottom:2px;display:flex;overflow-x:auto}.gallery-thumb{background:silver;border:2px solid #404040;border-color:#fff #404040 #404040 #fff;padding:2px}.gallery-thumb.active{background:navy;border-color:#404040 #fff #fff #404040}.gallery-thumb img{object-fit:cover;width:68px;height:68px;display:block}@media (width<=820px){.app-shell{min-height:100dvh;display:block}.sidebar,.chat-layout{height:100dvh;min-height:100dvh;padding:0}.app-shell.chat-open .sidebar,.app-shell.inbox-open .chat-layout{display:none}.sidebar,.chat-layout{width:100%}.sidebar{gap:0}.chat-layout{grid-template-rows:auto minmax(0,1fr) auto;gap:0}.inbox-modal-backdrop{align-items:flex-start;padding-top:56px}.sidebar .panel,.chat-layout .panel{border-left:0;border-right:0}.sidebar-top,.chat-head{border-top:0}.chat-head{padding-right:10px}.chat-back-button{justify-content:center;align-items:center;display:inline-flex}.thread-panel{border-top:0}.composer-panel{border-bottom:0;border-left:0;border-right:0}}@keyframes status-spin{to{transform:rotate(360deg)}}.message-meta strong{color:#000}.chat-item-copy h2{font-size:13px}@media (width>=821px) and (width<=900px){.app-shell{grid-template-columns:1fr}.sidebar{border-right:0;border-bottom:2px solid var(--border)}.chat-layout{height:auto}.inline-form,.chat-head,.message-meta,.inbox-row,.composer-actions{flex-direction:column;grid-template-columns:1fr;align-items:stretch}.inbox-item,.sidebar-top{flex-direction:column;align-items:stretch}}
