.auth-screen{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:1.5rem;background:radial-gradient(circle at 20% 10%,#f9fbfa,#dfeae6)}
.auth-card{width:min(440px,100%);padding:2.3rem;border:1px solid var(--line);border-radius:22px;background:#fff;box-shadow:var(--shadow);text-align:center}.auth-card .brand-mark{margin:auto}.auth-card h1{margin:1.2rem 0 .4rem}.auth-card p{color:var(--muted)}.auth-card .primary,.voice-preview .primary{border:0;border-radius:10px;background:var(--forest);color:#fff;padding:.75rem 1rem}.auth-note{font-size:.76rem}.workspace-options{display:grid;gap:.6rem;margin:1.2rem 0}.workspace-options button{padding:.9rem;border:1px solid var(--line);border-radius:11px;background:#fff;text-align:left}.workspace-options button:hover,.workspace-options button:focus-visible{border-color:var(--green);background:#eff6f3}
.voice-preview{display:flex;align-items:center;gap:.6rem;padding:.7rem 1rem;background:#fff;border-top:1px solid var(--line)}.voice-preview audio{min-width:0;flex:1;height:38px}.voice-preview button{border:1px solid var(--line);border-radius:9px;background:#fff;padding:.55rem .7rem}
.small-dialog{width:min(440px,92vw);max-height:75vh;padding:0;border:0;border-radius:16px;box-shadow:var(--shadow)}.small-dialog::backdrop{background:rgba(14,36,31,.5)}.small-dialog form{display:grid;gap:.7rem;padding:1rem}.small-dialog header{display:flex;align-items:center;justify-content:space-between}.small-dialog h2{font-size:1.05rem;margin:0}.small-dialog header button{border:0;background:transparent;font-size:1.35rem}.small-dialog form>button{padding:.7rem;border:0;border-radius:9px;background:#f1f5f3;text-align:left}.directory-list{display:grid;gap:.35rem;overflow:auto}.directory-list button{display:flex;align-items:center;gap:.7rem;padding:.7rem;border:0;border-radius:10px;background:#fff;text-align:left}.directory-list button:hover{background:#eff5f2}
.message .message-action{position:absolute;top:.2rem;right:.25rem;display:none;width:28px;height:28px;border:0;border-radius:50%;background:rgba(255,255,255,.7)}.message:hover .message-action,.message:focus-within .message-action{display:grid;place-items:center}.message mark{background:#fff1a8}.quoted-message{padding:.4rem .55rem;margin-bottom:.4rem;border-left:3px solid var(--green);border-radius:4px;background:rgba(255,255,255,.55);font-size:.75rem;color:var(--muted)}.unread-divider{align-self:stretch;text-align:center;color:var(--green);font-size:.72rem;margin:.7rem 0}.connection.degraded i{background:#cf8647}.connection.offline i{background:#bd5d50}
.mobile-back{display:none}.invite-controls{display:grid;grid-template-columns:minmax(0,1fr) 170px auto;align-items:end;gap:.6rem;padding:.8rem;margin-bottom:1rem;border:1px solid var(--line);border-radius:12px;background:#f7f9f8}.invite-controls label{margin:0!important}.invite-controls button{min-height:39px;border:0;border-radius:8px;padding:.6rem .8rem;background:var(--forest);color:#fff}.invite-controls output{grid-column:1/-1;overflow-wrap:anywhere;font-size:.75rem;color:var(--green)}.member select{max-width:160px;padding:.45rem}
.delivery-read{color:#1680a8;font-weight:800}
.is-embedded{min-width:0}
.app-shell{min-width:0}
.conversation-copy strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.conversation-copy time{flex-shrink:0}
.message p,.quoted-message,.reply-preview p{overflow-wrap:anywhere}
/* A 320px host can provide a narrower iframe after its own page gutters. */
@media(max-width:760px){
  .chat-layout{grid-template-columns:minmax(0,1fr)}
  .inbox-heading{gap:.6rem;padding:1rem}
  .inbox-heading>div:first-child{min-width:0}
  .inbox-actions{flex-shrink:0}
  .inbox-actions button{width:44px;height:44px;flex-shrink:0}
  .conversation-header{gap:.35rem;padding:0 .5rem}
  .conversation-header>.mobile-back{flex:0 0 44px;width:44px;height:44px}
  .peer{flex:1;gap:.45rem}
  .conversation-actions .icon-button{width:44px;height:44px;flex-shrink:0}
  .composer{gap:.25rem;padding:.65rem .5rem}
  .composer>button{flex:0 0 44px;width:44px;height:44px}
  .composer textarea{width:0;flex:1 1 0}
  .message.audio{min-width:0;max-width:100%}
  .message audio{min-width:0;max-width:100%}
  .account-card>div,.member>div,.session>div{min-width:0;overflow-wrap:anywhere}
}
.avatar,.profile-avatar,.account-avatar{overflow:hidden}.avatar img,#profile-avatar img,#account-avatar img{width:100%;height:100%;object-fit:cover;border-radius:inherit;display:block}
.conversation-header,.messages,.composer{min-width:0;width:100%}.composer textarea,.peer,.peer>div{min-width:0}.peer h2,.peer p{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-actions{flex:0 0 auto}
.inbox-actions{display:flex;align-items:center;gap:.45rem}.embedded-settings{display:none;background:#f3f7f5}.is-embedded{background:#fff}.is-embedded .app-shell{grid-template-rows:1fr;height:100dvh}.is-embedded .topbar{display:none}.is-embedded .chat-layout{width:100%;height:100dvh;box-shadow:none}.is-embedded .embedded-settings{display:grid}.is-embedded .chat-layout,.is-embedded .conversation-panel{min-height:0}.is-embedded .conversation-panel{height:100dvh}
@media(max-width:760px){.voice-preview{flex-wrap:wrap}.voice-preview audio{flex-basis:100%}.small-dialog{margin:auto}.message .message-action{display:grid;place-items:center}.auth-card{padding:1.6rem}.mobile-back{display:grid}.mobile-inbox .inbox-panel{display:flex}.mobile-inbox .conversation-panel{display:none}.invite-controls{grid-template-columns:1fr}.invite-controls output{grid-column:auto}.composer textarea{padding:.7rem 1rem;overflow-y:hidden}.character-count{display:none}}

.message .assistant-copy{line-height:1.55;overflow-wrap:anywhere;white-space:normal}.message .assistant-copy p{margin:0 0 .7rem;white-space:normal}.message .assistant-copy p:last-child{margin-bottom:0}.message .assistant-copy ul,.message .assistant-copy ol{margin:.5rem 0 .75rem;padding-left:1.35rem}.message .assistant-copy li{margin:.35rem 0}.message .assistant-copy a{color:inherit;text-decoration:underline}.message>small{display:block;margin-bottom:.45rem;font-weight:600}

.alma-review-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.attention-dialog{width:min(760px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:1.2rem;border:1px solid #d9e3df;border-radius:20px;overflow:auto;box-sizing:border-box}
.attention-dialog header{display:flex;justify-content:space-between;align-items:center;gap:1rem}.attention-dialog h2{font-size:1.3rem}.attention-dialog section{display:grid;gap:.85rem;min-width:0}.attention-dialog label{display:grid;gap:.4rem}.attention-dialog input,.attention-dialog select,.attention-dialog textarea{max-width:100%;min-width:0;padding:.6rem}.attention-dialog button{min-height:44px;padding:.5rem .8rem;border-radius:10px}.attention-dialog p{overflow-wrap:anywhere}.attention-case{padding:1rem;border:1px solid #d9e3df;border-radius:12px;display:grid;gap:.4rem;margin:.5rem 0}.attention-dialog::backdrop{background:#142e2866}
.attention-dialog{color:var(--forest);box-shadow:var(--shadow)}.attention-dialog header{position:sticky;top:-1.2rem;background:white;padding:.5rem 0 1rem;z-index:1;border-bottom:1px solid var(--line);margin-bottom:1rem}.attention-dialog h2,.attention-dialog h3,.attention-dialog p{margin:0}.attention-dialog>p:not(:empty){padding:.85rem;background:#eff5f2;border-radius:10px;margin-bottom:1rem;font-size:.85rem;line-height:1.5}.attention-dialog button{border:1px solid var(--line);background:#eff5f2;color:var(--forest);font:inherit;font-weight:600;cursor:pointer}.attention-dialog button:hover{background:#e1eee7}.attention-dialog button:focus-visible,.attention-dialog input:focus-visible,.attention-dialog select:focus-visible,.attention-dialog textarea:focus-visible{outline:3px solid #4d907a;outline-offset:2px}.attention-dialog button:disabled{opacity:.55;cursor:wait}.attention-dialog input,.attention-dialog select,.attention-dialog textarea{border:1px solid #bdcfc5;border-radius:8px;font:inherit;background:white}.attention-dialog label{font-size:.85rem;font-weight:600}.attention-dialog textarea{width:100%;resize:vertical}.attention-dialog section>p{font-size:.9rem;line-height:1.5}.attention-case small{color:var(--muted)}.attention-status{margin:0;padding:.65rem 1rem;background:#edf4ef;color:var(--forest);font-size:.8rem;line-height:1.4;flex-shrink:0}
[data-panel="alma"] textarea { width: 100%; box-sizing: border-box; }
@media(max-width:760px){
  .settings-shell{min-width:0;grid-template-columns:minmax(0,1fr)}
  .settings-shell>header,.settings-shell>footer{min-width:0}
  .settings-body{min-width:0;grid-template-columns:minmax(0,1fr)}
  .settings-body>nav,.settings-body>section{min-width:0}
  .settings-body input:not([type=checkbox]),.settings-body select{min-width:0;max-width:100%}
}
