.atelier-chat.ac-root {
  --ac-accent: #087f68;
  --ac-height: 720px;
  --ac-ink: #253f39;
  --ac-muted: #70837c;
  --ac-border: #e1e8e1;
  --ac-soft: #f4f7f2;
  --ac-white: #fffefa;
  --ac-canvas: #fff;
  --ac-received: #e9e9eb;
  --ac-message-ink: #1d1d1f;
  --ac-sent: #0875db;
  width: 100%;
  max-width: 1240px;
  margin: 24px auto;
  color: var(--ac-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-align: left;
  color-scheme: light;
  isolation: isolate;
}
.ac-root *, .ac-root *::before, .ac-root *::after { box-sizing: border-box; }
.ac-root [hidden] { display: none !important; }
.ac-root h2, .ac-root h3, .ac-root p, .ac-root ul { margin: 0; padding: 0; }
.ac-root button, .ac-root input, .ac-root textarea { font: inherit; letter-spacing: normal; text-transform: none; box-shadow: none; }
.ac-root button { margin: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ac-root button:disabled { cursor: default; opacity: .46; }
.ac-root button, .ac-root input, .ac-root textarea, .ac-root a { outline-offset: 4px; }
.ac-root :focus-visible { outline: 3px solid var(--ac-accent); outline-offset: 3px; }
.ac-root svg { display: block; flex-shrink: 0; width: 21px; height: 21px; }
.ac-root a { color: #087461; text-decoration: underline; text-underline-offset: 3px; }
.ac-root img { max-width: 100%; }
.ac-root .ac-shell {
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  height: var(--ac-height);
  max-height: 1000px;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid #d8e2d9;
  border-radius: 20px;
  background: var(--ac-white);
  box-shadow: 0 18px 60px -32px #204e374d, 0 2px 8px #28443208;
}
.ac-root .ac-sidebar { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--ac-border); background: #fcfdf9; }
.ac-root .ac-brand { display: flex; align-items: center; gap: 10px; min-height: 80px; padding: 0 25px; color: var(--ac-accent); font-size: 14px; font-weight: 650; letter-spacing: -.2px; }
.ac-root .ac-brand svg { width: 25px; height: 25px; }
.ac-root .ac-group-card { padding: 13px 25px 26px; }
.ac-root .ac-group-icon { display: grid; place-items: center; width: 60px; height: 60px; margin-bottom: 18px; color: var(--ac-accent); background: #e9f1e8; border: 1px solid #dce9d9; border-radius: 21px; }
.ac-root .ac-group-icon svg { width: 29px; height: 29px; }
.ac-root .ac-side-title { color: var(--ac-ink); font-size: 23px; font-weight: 650; line-height: 1.25; letter-spacing: -.65px; overflow-wrap: anywhere; }
.ac-root .ac-side-description { margin-top: 12px; color: var(--ac-muted); font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.ac-root .ac-group-tag { display: inline-flex; align-items: center; gap: 5px; margin-top: 18px; padding: 5px 9px; border: 1px solid #dfe8dc; border-radius: 6px; color: #617465; background: #f4f7ef; font-size: 10px; font-weight: 650; letter-spacing: .3px; }
.ac-root .ac-group-tag svg { width: 12px; height: 12px; }
.ac-root .ac-section-heading { display: flex; align-items: center; gap: 9px; padding: 19px 25px 8px; border-top: 1px solid var(--ac-border); }
.ac-root .ac-section-heading h3 { color: #6a7b70; font-size: 11px; font-weight: 650; letter-spacing: 1px; text-transform: uppercase; }
.ac-root .ac-count { display: inline-grid; place-items: center; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 7px; color: var(--ac-accent); background: #e9f1e8; font-size: 11px; font-weight: 600; }
.ac-root .ac-online-list { display: flex; flex-direction: column; gap: 4px; list-style: none; padding: 5px 15px; overflow-y: auto; }
.ac-root .ac-sidebar > .ac-online-list { flex: 1; min-height: 50px; }
.ac-root .ac-person { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 4px 10px; margin: 0; }
.ac-root .ac-person > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.ac-root .ac-avatar { --ac-person: #087f68; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 35px; height: 35px; border-radius: 50%; color: var(--ac-person); background: #e8eee7; background: color-mix(in srgb, var(--ac-person) 10%, #f6f8ef); font-size: 11px; font-weight: 700; line-height: 1; }
.ac-root .ac-online-dot { width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; background: #68a683; box-shadow: 0 0 0 3px #edf4ec; }
.ac-root .ac-side-bottom { margin-top: auto; padding: 18px 16px 15px; }
.ac-root .ac-private-note { display: flex; gap: 6px; align-items: center; padding: 0 8px 18px; color: #7d8c81; font-size: 10px; }
.ac-root .ac-private-note svg { width: 12px; height: 12px; }
.ac-root .ac-profile { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 10px; border: 1px solid var(--ac-border); border-radius: 11px; background: #f4f7f1; color: var(--ac-ink); text-align: left; }
.ac-root .ac-profile:hover { background: #eaf0e7; }
.ac-root .ac-profile-text { flex: 1; min-width: 0; }
.ac-root .ac-profile-text strong, .ac-root .ac-profile-text small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-root .ac-profile-text strong { font-size: 12px; font-weight: 650; }
.ac-root .ac-profile-text small { margin-top: 2px; color: var(--ac-muted); font-size: 10px; }
.ac-root .ac-profile > svg { width: 15px; height: 15px; color: #7b8d7e; }
.ac-root .ac-main { display: flex; flex-direction: column; position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.ac-root .ac-icon-button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #76877c; line-height: 1; transition: background .15s, color .15s; }
.ac-root .ac-icon-button:not(:disabled):hover { background: #eaf0e5; color: var(--ac-accent); }
.ac-root .ac-search-bar { display: flex; gap: 10px; align-items: center; flex-shrink: 0; margin: 0; padding: 10px 24px; border-bottom: 1px solid var(--ac-border); background: #fffefa; }
.ac-root .ac-search-bar > svg { width: 18px; height: 18px; color: var(--ac-accent); }
.ac-root .ac-search-input { min-width: 0; width: 100%; padding: 8px 0; border: 0; background: transparent; color: var(--ac-ink); font-size: 16px; }
.ac-root .ac-search-meta { padding: 9px 25px; border-bottom: 1px solid var(--ac-border); color: #718476; background: #f6f8f0; font-size: 11px; overflow-wrap: anywhere; }
.ac-root .ac-notice { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 16px 8px 24px; border-bottom: 1px solid #e9dcc0; background: #fff5dc; color: #7a5b25; font-size: 12px; z-index: 3; }
.ac-root .ac-notice .ac-icon-button { color: #7a5b25; width: 28px; height: 28px; }
/* Compact message bubbles, with controls shown only for the selected message. */
.ac-root .ac-conversation { position: relative; flex: 1; min-height: 0; background: var(--ac-canvas); }
.ac-root .ac-scroller { height: 100%; padding: 18px 28px 26px; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #b9bcc2 transparent; }
.ac-root .ac-scroller:focus-visible { outline-offset: -4px; }
.ac-root .ac-message-list { display: flex; flex-direction: column; gap: 12px; }
.ac-root .ac-day { display: flex; justify-content: center; padding: 10px 0; }
.ac-root .ac-day span { color: #8e8e93; font-size: 11px; font-weight: 500; line-height: 1.4; }
.ac-root .ac-message { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 0; align-self: flex-start; max-width: min(78%, 520px); min-width: 0; scroll-margin: 16px; -webkit-tap-highlight-color: transparent; }
.ac-root .ac-bubble { position: relative; isolation: isolate; min-width: 0; max-width: 100%; padding: 9px 15px; border: 0; border-radius: 21px; background: var(--ac-received); box-shadow: none; overflow-wrap: anywhere; }
.ac-root .ac-bubble::before { content: ''; position: absolute; z-index: -1; bottom: 0; left: -7px; width: 20px; height: 20px; background: var(--ac-received); border-bottom-right-radius: 16px 14px; }
.ac-root .ac-bubble::after { content: ''; position: absolute; z-index: -1; bottom: 0; left: -26px; width: 26px; height: 20px; background: var(--ac-canvas); border-bottom-right-radius: 10px; }
.ac-root .ac-author { margin: 0 0 4px 13px; color: #8e8e93; font-size: 11px; font-weight: 500; line-height: 1.4; }
.ac-root .ac-body { color: var(--ac-message-ink); font-size: 16px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.ac-root .ac-body a { color: #0061c4; }
.ac-root .ac-message-meta { display: none; align-items: center; gap: 5px; margin: 5px 10px 0; color: #8e8e93; font-size: 10px; line-height: 1.5; white-space: nowrap; }
.ac-root .ac-edited { font-style: italic; }
.ac-root .ac-read-status { color: #8e8e93; font-size: 11px; letter-spacing: -3px; padding-right: 3px; }
.ac-root .ac-read-status.ac-seen { color: var(--ac-sent); }
.ac-root .ac-mine { align-self: flex-end; align-items: flex-end; }
.ac-root .ac-mine .ac-bubble { background: var(--ac-sent); }
.ac-root .ac-mine .ac-bubble::before { left: auto; right: -7px; background: var(--ac-sent); border-radius: 0 0 0 16px / 0 0 0 14px; }
.ac-root .ac-mine .ac-bubble::after { left: auto; right: -26px; border-radius: 0 0 0 10px; }
.ac-root .ac-mine .ac-author { display: none; }
.ac-root .ac-deleted .ac-bubble { background: var(--ac-received); opacity: .75; }
.ac-root .ac-deleted .ac-bubble::before, .ac-root .ac-deleted .ac-bubble::after { display: none; }
.ac-root .ac-deleted .ac-body { color: var(--ac-message-ink); font-size: 13px; font-style: italic; }
.ac-root .ac-message-actions { display: none; align-items: center; gap: 3px; margin-top: 6px; padding: 3px; border: 1px solid var(--ac-border); border-radius: 20px; background: var(--ac-white); box-shadow: 0 2px 8px #0000000a; }
.ac-root .ac-message:focus-within .ac-message-actions, .ac-root .ac-message:focus-within .ac-message-meta { display: flex; }
.ac-root .ac-message-actions .ac-icon-button { width: 36px; height: 34px; border-radius: 16px; }
.ac-root .ac-message-actions svg { width: 17px; height: 17px; }
.ac-root .ac-reply-preview { display: flex; flex-direction: column; gap: 3px; min-width: 130px; max-width: 370px; margin: 0 0 8px; padding: 7px 9px; border-left: 3px solid var(--ac-accent); border-radius: 4px; background: #edf2e7; background: #2e774b0a; font-size: 11px; line-height: 1.4; }
.ac-root .ac-reply-preview strong { color: var(--ac-accent); font-size: 10px; font-weight: 650; }
.ac-root .ac-reply-preview span { display: -webkit-box; max-height: 32px; overflow: hidden; color: #7b8774; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ac-root .ac-reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; padding-top: 2px; }
.ac-root .ac-reaction { display: inline-flex; align-items: center; gap: 4px; min-height: 26px; padding: 2px 7px; border: 1px solid #dce4d5; border-radius: 9px; background: #f9fcf5; color: #647359; font-size: 11px; line-height: 1.4; }
.ac-root .ac-reaction:hover, .ac-root .ac-reaction.ac-selected { border-color: #80aa8b; background: #e5f2e0; color: var(--ac-accent); }
.ac-root .ac-media { max-width: 380px; margin-bottom: 5px; }
.ac-root .ac-image-link { display: block; max-width: 100%; padding: 0; border: 0; border-radius: 7px; background: transparent; cursor: zoom-in; }
.ac-root .ac-image { display: block; width: auto; max-width: 100%; max-height: 310px; object-fit: contain; border-radius: 7px; background: #dfe5d7; }
.ac-root .ac-video { display: block; width: 100%; max-height: 310px; border-radius: 7px; background: #203b31; }
.ac-root .ac-audio { display: block; width: 290px; max-width: 100%; height: 40px; }
.ac-root .ac-audio-label { display: flex; align-items: center; gap: 5px; max-width: 290px; margin-bottom: 5px; color: #667c62; font-size: 10px; }
.ac-root .ac-audio-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-root .ac-audio-label svg { width: 12px; height: 12px; }
.ac-root .ac-document { display: flex; gap: 11px; align-items: center; width: 290px; max-width: 100%; padding: 10px 8px; border-radius: 7px; background: #25663d07; color: #4a694b; text-decoration: none; }
.ac-root .ac-document > svg:first-child { width: 29px; height: 29px; }
.ac-root .ac-document > span { flex: 1; min-width: 0; }
.ac-root .ac-document strong { display: block; max-width: 210px; font-size: 12px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-root .ac-document small { display: block; margin-top: 3px; color: #84917d; font-size: 10px; }
.ac-root .ac-document > svg:last-child { width: 17px; height: 17px; }
.ac-root .ac-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 270px; height: 90%; padding: 35px 15px; text-align: center; }
.ac-root .ac-empty-mark { display: grid; place-items: center; width: 75px; height: 75px; margin-bottom: 22px; border: 1px solid #e1e7d4; border-radius: 25px; background: #fffef680; color: #96a789; transform: rotate(-7deg); }
.ac-root .ac-empty-mark svg { width: 33px; height: 33px; transform: rotate(7deg); }
.ac-root .ac-empty h3 { color: #52634d; font-size: 18px; font-weight: 550; letter-spacing: -.35px; }
.ac-root .ac-empty p { max-width: 300px; margin-top: 9px; color: #88917d; font-size: 12px; line-height: 1.7; }
.ac-root .ac-older { display: block; margin: 2px auto 14px; padding: 6px 13px; border: 1px solid #dae3d4; border-radius: 7px; background: #fffef8; color: #74856c; font-size: 10px; }
.ac-root .ac-older:hover { border-color: #93ac91; color: var(--ac-accent); }
.ac-root .ac-jump { position: absolute; bottom: 16px; right: 21px; display: grid; place-items: center; width: 37px; height: 37px; border: 1px solid #d4dfcf; border-radius: 50%; background: #fffefb; color: var(--ac-accent); box-shadow: 0 3px 12px #294b2624; }
.ac-root .ac-typing { flex-shrink: 0; display: flex; align-items: center; padding: 8px 28px 14px; background: var(--ac-canvas); }
.ac-root .ac-typing-bubble { position: relative; display: flex; align-items: center; gap: 5px; width: 66px; height: 38px; padding: 0 16px; border-radius: 22px; background: var(--ac-received); }
.ac-root .ac-typing-bubble::before, .ac-root .ac-typing-bubble::after { content: ''; position: absolute; border-radius: 50%; background: var(--ac-received); }
.ac-root .ac-typing-bubble::before { left: -3px; bottom: -1px; width: 12px; height: 12px; }
.ac-root .ac-typing-bubble::after { left: -7px; bottom: -5px; width: 6px; height: 6px; }
.ac-root .ac-typing-dot { display: block; width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: #8e8e93; animation: ac-typing-pulse 1.25s ease-in-out infinite; }
.ac-root .ac-typing-dot:nth-child(2) { animation-delay: .16s; }
.ac-root .ac-typing-dot:nth-child(3) { animation-delay: .32s; }
@keyframes ac-typing-pulse { 0%, 65%, 100% { opacity: .45; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.ac-root:is([data-theme="dark"], [data-theme="black"]) .ac-typing-dot { background: #b5b5ba; }
.ac-root .ac-composer { position: relative; flex-shrink: 0; margin: 0; padding: 9px 20px 11px; border-top: 1px solid #e4e9dd; background: #fffefa; }
.ac-root .ac-composer-row { display: flex; gap: 3px; align-items: flex-end; padding: 8px; border: 1px solid #e0e7d8; border-radius: 13px; background: #fff; }
.ac-root .ac-composer-row:focus-within { border-color: #9db89e; box-shadow: 0 0 0 2px #6b9a6b0a; }
.ac-root .ac-composer-row > .ac-icon-button { width: 31px; height: 35px; border-radius: 8px; }
.ac-root .ac-composer-row svg { width: 19px; height: 19px; }
.ac-root .ac-message-input { flex: 1; width: 100%; min-width: 0; min-height: 35px; max-height: 126px; padding: 7px 8px; border: 0; outline: none; border-radius: 0; background: transparent; color: #30473c; font-size: 16px; line-height: 21px; resize: none; overflow-y: auto; }
.ac-root .ac-message-input:focus { outline: none; box-shadow: none; }
.ac-root .ac-message-input::placeholder { color: #98a192; opacity: 1; }
.ac-root .ac-send { display: inline-flex; justify-content: center; align-items: center; flex-shrink: 0; width: 38px; height: 36px; margin-left: 3px; padding: 0; border: 0; border-radius: 9px; background: var(--ac-accent); color: #fff; }
.ac-root .ac-send svg { width: 18px; height: 18px; }
.ac-root .ac-send:not(:disabled):hover { filter: brightness(.91); }
.ac-root .ac-send:disabled { opacity: .42; }
.ac-root .ac-send.ac-sending svg { animation: ac-pulse .9s ease-in-out infinite alternate; }
.ac-root .ac-composer-foot { display: flex; align-items: center; gap: 10px; justify-content: space-between; min-height: 20px; padding: 7px 3px 0; color: #91a187; font-size: 9px; }
.ac-root .ac-logout-button { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; margin-right: auto; padding: 4px 10px; border: 1px solid var(--ac-border); border-radius: 16px; background: transparent; color: var(--ac-muted); font-size: 11px; line-height: 1.4; white-space: nowrap; }
.ac-root .ac-logout-button:hover { background: var(--ac-soft); color: var(--ac-ink); }
.ac-root .ac-readonly { display: flex; align-items: center; gap: 7px; padding: 3px 5px 11px; color: #838575; font-size: 11px; }
.ac-root .ac-readonly svg { width: 13px; height: 13px; }
.ac-root .ac-composer-context { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; padding: 9px 10px; border-left: 3px solid var(--ac-accent); border-radius: 5px; background: #f0f4e9; color: #77906e; }
.ac-root .ac-composer-context > div { display: flex; flex: 1; flex-direction: column; min-width: 0; gap: 2px; }
.ac-root .ac-composer-context strong { color: var(--ac-accent); font-size: 11px; font-weight: 600; }
.ac-root .ac-composer-context span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #7c8a73; font-size: 11px; }
.ac-root .ac-composer-context > svg { width: 19px; height: 19px; }
.ac-root .ac-composer-context .ac-icon-button { width: 26px; height: 26px; }
.ac-root .ac-file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.ac-root .ac-file-preview { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; padding: 8px 10px; margin: 0 0 8px; border: 1px solid #dce5d6; border-radius: 9px; background: #f6f8f0; }
.ac-root .ac-file-preview > svg { color: #7c9673; }
.ac-root .ac-file-description { flex: 1; min-width: 0; }
.ac-root .ac-file-description strong, .ac-root .ac-file-description small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-root .ac-file-description strong { font-size: 11px; font-weight: 550; }
.ac-root .ac-file-description small { margin-top: 2px; color: #809175; font-size: 10px; }
.ac-root .ac-file-thumbnail { width: 39px; height: 39px; object-fit: cover; border-radius: 5px; }
.ac-root .ac-file-preview .ac-icon-button { width: 27px; height: 27px; }
.ac-root .ac-draft-audio { width: 100%; height: 34px; }
.ac-root .ac-record-panel { display: flex; align-items: center; gap: 10px; padding: 9px 11px; margin-bottom: 8px; border: 1px solid #efcfc2; border-radius: 9px; background: #fff4e9; }
.ac-root .ac-record-dot { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: #ce7868; animation: ac-pulse .8s ease-in-out infinite alternate; }
.ac-root .ac-record-time { flex: 1; color: #b17459; font-size: 12px; font-variant-numeric: tabular-nums; }
.ac-root .ac-record-stop { display: flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid #eac9b8; border-radius: 6px; background: #fffdf8; color: #9b6348; font-size: 11px; }
.ac-root .ac-record-stop svg { width: 12px; height: 12px; }
.ac-root .ac-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ac-root .ac-muted { color: var(--ac-muted); font-size: 12px; }
.ac-root .ac-dialog { width: min(420px, calc(100vw - 32px)); max-height: min(640px, calc(100dvh - 40px)); margin: auto; padding: 23px; overflow: auto; border: 1px solid #d8e3d4; border-radius: 17px; background: #fffef9; color: var(--ac-ink); box-shadow: 0 30px 100px #203c3440; }
.ac-root .ac-dialog::backdrop { background: #203c3466; backdrop-filter: blur(3px); }
.ac-root .ac-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.ac-root .ac-dialog-heading h2 { color: var(--ac-ink); font-size: 19px; font-weight: 600; line-height: 1.3; letter-spacing: -.3px; }
.ac-root .ac-dialog-heading .ac-icon-button { width: 28px; height: 28px; }
.ac-root .ac-dialog-form { display: flex; flex-direction: column; gap: 18px; margin: 0; }
.ac-root .ac-dialog-form > p { color: var(--ac-muted); font-size: 13px; line-height: 1.7; }
.ac-root .ac-info-content > p { margin-bottom: 20px; color: var(--ac-muted); white-space: pre-wrap; font-size: 13px; }
.ac-root .ac-info-content h3 { font-size: 12px; font-weight: 600; }
.ac-root .ac-info-content .ac-online-list { margin: 10px 0 20px; padding: 0; max-height: 270px; }
.ac-root .ac-info-content .ac-primary { width: 100%; }
.ac-root .ac-info-content .ac-text-button { display: block; margin: 15px auto 0; }
.ac-root .ac-emoji-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.ac-root .ac-emoji-choice { display: grid; place-items: center; aspect-ratio: 1; padding: 6px; border: 1px solid transparent; border-radius: 9px; background: #f4f7ed; font-size: 25px; line-height: 1; }
.ac-root .ac-emoji-choice:hover, .ac-root .ac-emoji-choice[aria-pressed="true"] { border-color: #acc4a8; background: #e8f2df; }
.ac-root .ac-message-menu { display: flex; flex-direction: column; gap: 8px; }
.ac-root .ac-menu-button { display: flex; gap: 11px; align-items: center; padding: 13px 12px; border: 1px solid #e0e7d8; border-radius: 9px; background: #f8faf3; color: var(--ac-ink); text-align: left; font-size: 13px; }
.ac-root .ac-menu-button svg { width: 18px; height: 18px; }
.ac-root .ac-danger { color: #ab675b; background: #fff5ed; border-color: #efd9cd; }
.ac-root .ac-primary { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; padding: 12px 20px; border: 1px solid transparent; border-radius: 10px; background: var(--ac-accent); color: #fff; font-size: 13px; font-weight: 550; line-height: 1.4; text-align: center; }
.ac-root .ac-primary:hover:not(:disabled) { filter: brightness(.92); }
.ac-root .ac-primary.ac-destructive { background: #ab675b; }
.ac-root .ac-text-button { padding: 4px; border: 0; border-radius: 3px; background: transparent; color: var(--ac-accent); font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.ac-root .ac-label { display: flex; flex-direction: column; gap: 8px; color: #4d6858; font-size: 12px; font-weight: 550; }
.ac-root .ac-field { width: 100%; height: 49px; padding: 12px 13px; border: 1px solid #d9e3d3; border-radius: 9px; background: #fffefb; color: var(--ac-ink); font-size: 16px; font-weight: 400; line-height: 1.4; }
.ac-root .ac-field::placeholder { color: #a1ac98; opacity: 1; }
.ac-root .ac-field:focus { border-color: #8daa81; }
.ac-root .ac-field-hint { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ac-muted); font-size: 11px; font-weight: 400; line-height: 1.65; }
.ac-root .ac-pin { max-width: 100%; letter-spacing: 17px; text-align: center; font-size: 23px; }
.ac-root .ac-gate { display: block; width: 100%; max-width: var(--ac-gate-width, 520px); margin: 0 auto; overflow: hidden; border: 1px solid var(--ac-border); border-radius: 22px; background: var(--ac-white); box-shadow: 0 18px 60px -32px #204e3740; }
.ac-root .ac-gate-panel { display: flex; align-items: center; justify-content: center; padding: 43px; }
.ac-root .ac-gate-inner { width: 100%; min-width: 0; }
.ac-root .ac-gate-tiny { display: grid; place-items: center; width: 39px; height: 39px; margin-bottom: 22px; border-radius: 11px; background: #f0f4e9; color: #8c9e7e; }
.ac-root .ac-gate-tiny svg { width: 21px; height: 21px; }
.ac-root .ac-gate-title { color: var(--ac-ink); overflow-wrap: anywhere; font-size: 27px; font-weight: 550; letter-spacing: -.85px; line-height: 1.3; }
.ac-root .ac-gate-intro { margin-top: 12px; color: var(--ac-muted); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.8; }
.ac-root .ac-gate-title[hidden] + .ac-gate-intro { margin-top: 0; }
.ac-root .ac-join-form { display: flex; flex-direction: column; gap: 17px; margin: 27px 0 0; }
.ac-root .ac-gate-error { padding: 9px 11px; border: 1px solid #edcebc; border-radius: 7px; background: #fff4e7; color: #a66c4e; font-size: 12px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.ac-root .ac-gate-switch { overflow-wrap: anywhere; max-width: 100%; display: block; margin: 21px auto 0; color: #6e8c61; font-size: 11px; }
.ac-root .ac-loader { width: 23px; height: 23px; margin-top: 24px; border: 2px solid #e1e9d7; border-top-color: var(--ac-accent); border-radius: 50%; animation: ac-spin 1s linear infinite; }
@keyframes ac-spin { to { transform: rotate(360deg); } }
@keyframes ac-pulse { to { opacity: .45; } }

@media (max-width: 900px) {
  .ac-root .ac-shell { grid-template-columns: 226px minmax(0, 1fr); }
  .ac-root .ac-brand { padding: 0 20px; font-size: 13px; }
  .ac-root .ac-group-card { padding: 12px 20px 23px; }
  .ac-root .ac-side-title { font-size: 21px; }
  .ac-root .ac-section-heading { padding-left: 20px; }
  .ac-root .ac-side-bottom { padding: 16px 12px 12px; }
  .ac-root .ac-private-note { align-items: flex-start; padding-left: 2px; font-size: 9px; }
  .ac-root .ac-scroller { padding: 14px 20px 22px; }
  .ac-root .ac-message { max-width: 84%; }
  .ac-root .ac-composer { padding: 8px 13px 9px; }
}
@media (max-width: 680px), (max-width: 1024px) and (max-height: 600px) and (pointer: coarse) {
  .atelier-chat.ac-root { margin: 12px auto; }
  html.atc-mobile-chat, html.atc-mobile-chat body { overflow: hidden; overscroll-behavior: none; }
  .atelier-chat.ac-root.ac-chat-open {
    position: fixed; top: var(--ac-screen-top, 0px); left: 0; right: 0;
    width: 100%; max-width: none; height: 100vh; height: var(--ac-screen-height, 100dvh);
    margin: 0; z-index: 100000; background: var(--ac-white);
  }
  .ac-root .ac-shell { display: flex; }
  .ac-root.ac-chat-open .ac-shell { width: 100%; height: 100%; max-height: none; min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
  .ac-root.ac-chat-open .ac-main { padding-top: env(safe-area-inset-top); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
  .ac-root.ac-chat-open .ac-dialog {
    top: calc(var(--ac-screen-top, 0px) + var(--ac-screen-height, 100dvh) / 2); bottom: auto;
    left: 0; right: 0; margin: 0 auto; transform: translateY(-50%);
    max-height: calc(var(--ac-screen-height, 100dvh) - 24px);
  }
  .ac-root .ac-sidebar { display: none; }
  .ac-root .ac-main { width: 100%; }
  .ac-root .ac-search-bar { padding: 7px 13px; }
  .ac-root .ac-search-meta { padding: 7px 15px; }
  .ac-root .ac-scroller { padding: 14px 18px 20px; }
  .ac-root .ac-message { max-width: 84%; }
  .ac-root .ac-bubble { padding: 8px 13px; }
  .ac-root .ac-message-actions .ac-icon-button { width: 40px; height: 38px; }
  .ac-root .ac-day { padding: 5px 0 0; }
  .ac-root .ac-audio { width: min(270px, calc(100vw - 118px)); }
  .ac-root .ac-document { width: min(270px, calc(100vw - 115px)); gap: 8px; padding: 8px 4px; }
  .ac-root .ac-document strong { font-size: 11px; }
  .ac-root .ac-image { max-height: 250px; }
  .ac-root .ac-typing { padding: 7px 18px 12px; }
  .ac-root .ac-composer { padding: 7px 9px max(8px, env(safe-area-inset-bottom)); max-height: 65%; overflow-y: auto; overscroll-behavior: contain; }
  .ac-root .ac-composer-row { gap: 1px; padding: 6px; border-radius: 12px; }
  .ac-root .ac-composer-row > .ac-icon-button { width: 28px; height: 35px; }
  .ac-root .ac-message-input { padding-left: 5px; padding-right: 3px; }
  .ac-root .ac-send { width: 35px; height: 35px; margin-left: 2px; }
  .ac-root .ac-composer-foot { min-height: 18px; padding-top: 5px; }
  .ac-root .ac-empty { min-height: 200px; padding: 25px 15px; }
  .ac-root .ac-empty h3 { font-size: 16px; }
  .ac-root .ac-empty p { max-width: 260px; font-size: 11px; }
  .ac-root .ac-empty-mark { width: 62px; height: 62px; margin-bottom: 18px; border-radius: 20px; }
  .ac-root .ac-gate { grid-template-columns: 1fr; min-height: auto; border-radius: 17px; }
  .ac-root .ac-gate-panel { padding: 30px 25px 35px; }
  .ac-root .ac-gate-title { font-size: 24px; }
  .ac-root .ac-gate-intro { margin-top: 10px; }
  .ac-root .ac-join-form { margin-top: 22px; gap: 15px; }
  .ac-root .ac-dialog { padding: 20px; }
  .ac-root .ac-emoji-grid { gap: 5px; }
  .ac-root .ac-emoji-choice { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  .ac-root *, .ac-root *::before, .ac-root *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* The access screen always contains one form. Layout options never add a sidebar. */
.ac-root[data-gate-layout="plain"] .ac-gate { border: 0; box-shadow: none; border-radius: 0; }
.ac-root[data-gate-align="center"] .ac-gate-inner { text-align: center; }
.ac-root[data-gate-align="center"] .ac-gate-tiny,
.ac-root[data-gate-align="center"] .ac-loader { margin-left: auto; margin-right: auto; }
.ac-root .ac-gate .ac-field { text-align: left; }
.ac-root .ac-gate .ac-pin { text-align: center; }

/* Palette is scoped to this plugin; the surrounding WordPress theme is untouched. */
.atelier-chat.ac-root:is([data-theme="dark"], [data-theme="black"]) {
  --ac-ink: #f5f5f7;
  --ac-muted: #a1a1a6;
  --ac-border: #3a3a3c;
  --ac-soft: #2c2c2e;
  --ac-white: #1c1c1e;
  --ac-canvas: #171717;
  --ac-received: #333333;
  --ac-message-ink: #f5f5f7;
  --ac-mine: #23394e;
  --ac-link: #78b8ff;
  color-scheme: dark;
}
.atelier-chat.ac-root[data-theme="black"] {
  --ac-white: #080808;
  --ac-canvas: #000;
  --ac-soft: #1c1c1e;
  --ac-border: #303033;
  --ac-mine: #1c3348;
}
.ac-root:is([data-theme="dark"], [data-theme="black"]) :is(.ac-shell, .ac-sidebar, .ac-search-bar, .ac-composer, .ac-composer-row, .ac-field, .ac-dialog, .ac-message-actions, .ac-older, .ac-jump, .ac-record-stop) { background: var(--ac-white); border-color: var(--ac-border); }
.ac-root:is([data-theme="dark"], [data-theme="black"]) :is(.ac-profile, .ac-group-icon, .ac-group-tag, .ac-count, .ac-gate-tiny, .ac-search-meta, .ac-reply-preview, .ac-reaction, .ac-composer-context, .ac-file-preview, .ac-emoji-choice, .ac-menu-button, .ac-document, .ac-empty-mark) { background: var(--ac-soft); border-color: var(--ac-border); }

.ac-root:is([data-theme="dark"], [data-theme="black"]) .ac-bubble { border-color: var(--ac-border); }

.ac-root:is([data-theme="dark"], [data-theme="black"]) :is(.ac-message-input, .ac-label, .ac-empty h3, .ac-document) { color: var(--ac-ink); }
.ac-root:is([data-theme="dark"], [data-theme="black"]) :is(.ac-gate-intro, .ac-field-hint, .ac-private-note, .ac-icon-button, .ac-section-heading h3, .ac-group-tag, .ac-search-meta, .ac-day span, .ac-message-meta, .ac-read-status, .ac-deleted .ac-body, .ac-reply-preview span, .ac-reaction, .ac-audio-label, .ac-document small, .ac-empty p, .ac-empty-mark, .ac-older, .ac-composer-foot, .ac-readonly, .ac-composer-context span, .ac-file-description small) { color: var(--ac-muted); }
.ac-root:is([data-theme="dark"], [data-theme="black"]) :is(a, .ac-text-button, .ac-brand, .ac-count, .ac-gate-tiny, .ac-group-icon, .ac-reply-preview strong, .ac-composer-context strong, .ac-read-status.ac-seen) { color: var(--ac-link); }
.ac-root:is([data-theme="dark"], [data-theme="black"]) :is(.ac-field, .ac-message-input)::placeholder { color: #879b90; }
.ac-root:is([data-theme="dark"], [data-theme="black"]) :is(.ac-profile:hover, .ac-icon-button:not(:disabled):hover, .ac-reaction:hover, .ac-reaction.ac-selected, .ac-emoji-choice:hover, .ac-emoji-choice[aria-pressed="true"]) { background: var(--ac-mine); color: var(--ac-link); border-color: #659c83; }
.ac-root:is([data-theme="dark"], [data-theme="black"]) :is(.ac-gate-error, .ac-notice, .ac-record-panel, .ac-danger) { background: #39291f; border-color: #73533c; color: #f3c5a6; }
.ac-root:is([data-theme="dark"], [data-theme="black"]) :is(.ac-notice .ac-icon-button, .ac-record-time, .ac-record-stop) { color: #f3c5a6; }
.ac-root:is([data-theme="dark"], [data-theme="black"]) .ac-avatar { color: color-mix(in srgb, var(--ac-person) 45%, #fff); background: var(--ac-soft); }

.ac-root:is([data-theme="dark"], [data-theme="black"]) .ac-online-dot { box-shadow: 0 0 0 3px var(--ac-soft); }
.ac-root:is([data-theme="dark"], [data-theme="black"]) .ac-loader { border-color: var(--ac-border); border-top-color: var(--ac-link); }

.ac-root .ac-chat-tools { display: flex; align-items: center; gap: 3px; }
.ac-root .ac-chat-tools .ac-icon-button { width: 32px; height: 28px; border-radius: 7px; }
.ac-root .ac-chat-tools svg { width: 17px; height: 17px; }
@media (max-width: 680px), (max-width: 1024px) and (max-height: 600px) and (pointer: coarse) {
  .ac-root .ac-chat-tools .ac-icon-button { width: 40px; height: 36px; }
  .ac-root .ac-logout-button { min-height: 36px; padding: 6px 12px; font-size: 12px; }
}

/* Keep outgoing attachments, replies and links legible inside the blue bubble. */
.ac-root .ac-mine:not(.ac-deleted) .ac-bubble :is(.ac-body, a, .ac-reply-preview strong, .ac-reply-preview span, .ac-document, .ac-document small, .ac-audio-label) { color: #fff; }
.ac-root .ac-mine .ac-reply-preview { background: #ffffff1f; border-color: #ffffffaa; border-radius: 9px; }
.ac-root .ac-mine .ac-document { background: #ffffff1f; }
.ac-root .ac-reactions { margin: 5px 8px 0; padding: 0; }
.ac-root .ac-reaction { border-radius: 15px; }

/* Photos stay in the conversation; the modal keeps the close control in view. */
.ac-root .ac-dialog.ac-image-dialog { width: min(1040px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 12px; overflow: hidden; }
.ac-root .ac-image-dialog::backdrop { background: #000b; }
.ac-root .ac-image-dialog .ac-dialog-heading { margin-bottom: 12px; gap: 12px; }
.ac-root .ac-image-dialog .ac-dialog-heading h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.ac-root .ac-image-dialog .ac-dialog-heading .ac-icon-button { flex-shrink: 0; width: 44px; height: 44px; }
.ac-root .ac-image-content { display: flex; justify-content: center; align-items: center; min-height: 0; }
.ac-root .ac-full-image { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100dvh - 112px); object-fit: contain; border-radius: 8px; }
@media (max-width: 680px), (max-width: 1024px) and (max-height: 600px) and (pointer: coarse) {
  .ac-root.ac-chat-open .ac-image-dialog { max-height: calc(var(--ac-screen-height, 100dvh) - 24px); }
  .ac-root.ac-chat-open .ac-full-image { max-height: calc(var(--ac-screen-height, 100dvh) - 112px); }
}
