/* Just Roleplay: shared staff interface. */
html[data-ac-theme] {
  color-scheme: dark;
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --bg: #0c1012; --panel: #141b1e; --panel-solid: #141b1e;
  --panel-raise: #1b2428; --panel-hover: #202b2f; --inset: #0f1517;
  --text: #f3f5f4; --text-soft: #c1cbd0; --muted: #adb8bc; --dim: #78858c;
  --line: #2b363a; --line-strong: #435156;
  --accent: #08d1d8; --accent-soft: #08d1d812; --accent-line: #08d1d84d;
  --accent-glow: transparent; --on-accent: #031719;
  --green: #73df9b; --green-soft: #173126; --red: #ef9b9b; --red-soft: #342024;
  --amber: #e4ba70; --amber-soft: #30291e;
  --surface: var(--panel-solid); --raised: var(--panel-raise); --border: var(--line-strong); --focus: var(--accent);
  --ac-accent: var(--accent); --ac-raised: var(--panel-raise);
  --sidebar: 248px; --header-height: 76px; --r-xl: 8px; --r-lg: 6px; --r-md: 5px; --r-sm: 4px;
  --shadow: none; --shadow-sm: none; --shadow-3d: none; --shadow-3d-hover: none;
}
html[data-ac-theme], html[data-ac-theme] body { background: var(--bg); color: var(--text); }
html[data-ac-theme] body { font-family: var(--font); font-size: 14px; line-height: 1.6; letter-spacing: 0; background-image: none; }
html[data-ac-theme] *, html[data-ac-theme] *::before, html[data-ac-theme] *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html[data-ac-theme] :is(.glass,.pane,.card,.statusPanel,.queue,.detail) { box-shadow: none; backdrop-filter: none; text-shadow: none; transform: none; }
html[data-ac-theme] :is(h1,h2,h3,h4) { color: var(--text); font-weight: 650; line-height: 1.3; letter-spacing: -.02em; }
html[data-ac-theme] p { overflow-wrap: anywhere; }
html[data-ac-theme] :is(button,input,textarea,select,.button) { font: inherit; line-height: 1.45; border-radius: 4px; box-shadow: none; text-shadow: none; touch-action: manipulation; }
html[data-ac-theme] :is(button,.button) { min-height: 44px; padding: 10px 14px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); cursor: pointer; text-decoration: none; transition: background-color 120ms, border-color 120ms; }
html[data-ac-theme] :is(button,.button):hover { background: var(--panel-hover); border-color: #697a81; filter: none; transform: none; }
html[data-ac-theme] :is(button,.button):disabled { opacity: .45; cursor: default; }
html[data-ac-theme] :is(input,textarea,select) { max-width: 100%; min-height: 44px; padding: 11px 12px; border: 1px solid var(--line-strong); background: var(--inset); color: var(--text); }
html[data-ac-theme] input[type=checkbox] { width: 18px !important; height: 18px !important; min-height: 18px !important; padding: 0; margin: 0; flex: 0 0 18px; accent-color: var(--accent); }
html[data-ac-theme] :is(.primary,.btn.primary,.button.primary,.ac-app-install,.ac-app-button) { background: var(--accent); border-color: var(--accent); background-image: none; color: var(--on-accent); font-weight: 650; }
html[data-ac-theme] :is(.primary,.btn.primary,.button.primary,.ac-app-install,.ac-app-button):hover { background: #65e7eb; border-color: #65e7eb; color: var(--on-accent); }
html[data-ac-theme] .danger { color: var(--red); border-color: #75464a; background: transparent; }
html[data-ac-theme] .danger:hover { background: var(--red-soft); }
html[data-ac-theme] :is(input,textarea,select,button,a,summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
html[data-ac-theme] button[aria-busy=true] { cursor: wait; }
button:disabled { cursor: not-allowed; }

/* Navigation and workspace frame */
html[data-ac-theme] #ac-shell { left: 0; top: 0; bottom: 0; width: var(--sidebar); padding: 20px 14px 16px; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: var(--inset); gap: 16px; }
#ac-shell .brand { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 0 12px 20px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
#ac-shell .brand-logo { width: 100px; height: 84px; object-fit: contain; filter: none; }
#ac-shell .brand-title { font-size: 12px; font-weight: 500; letter-spacing: .025em; color: var(--muted); }
#ac-navigation { display: flex; flex-direction: column; gap: 3px; min-height: 0; overflow: auto; padding: 0 2px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
#ac-navigation .ac-tool-search { position: sticky; top: 0; z-index: 1; width: 100%; margin-bottom: 5px; background: var(--bg); font-size: 13px; }
#ac-navigation .ac-nav-heading { padding: 22px 12px 7px; color: var(--dim); font-size: 11px; font-weight: 600; letter-spacing: .02em; text-transform: none; }
html[data-ac-theme] #ac-navigation .nav-item { display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 9px 12px; border: 0; border-radius: 4px; background: transparent; color: var(--text-soft); text-align: left; font-size: 13px; font-weight: 500; line-height: 1.4; box-shadow: none; }
html[data-ac-theme] #ac-navigation .nav-item:hover { background: var(--panel); color: var(--text); }
html[data-ac-theme] #ac-navigation .nav-item.active { color: var(--accent); background: var(--accent-soft); box-shadow: inset 2px 0 var(--accent); }
.ac-nav-icon { width: 19px; height: 19px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#ac-shell .sidebar-foot { display: grid; gap: 12px; padding: 18px 12px 0; border-top: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 12px; }
#ac-shell .sidebar-foot::before { display: none; }
#ac-logout { justify-content: center; width: 100%; font-size: 13px; }
#ac-shell .ac-app-install,.ac-login .ac-app-install { padding: 8px 0; min-height: 44px; border: 0; border-radius: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 400; text-align: left; justify-content: flex-start; }
#ac-player-return { display: block; min-height: 44px; padding: 8px 0; color: var(--muted); font-size: 12px; text-decoration: none; }
#ac-player-return:hover,#ac-shell .ac-app-install:hover,.ac-login .ac-app-install:hover { color: var(--accent); background: transparent; text-decoration: underline; text-underline-offset: .25em; }
html[data-ac-theme] #ac-header { left: var(--sidebar); right: 0; top: 0; height: var(--header-height); padding: 0 32px; gap: 14px; background: var(--bg); border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; backdrop-filter: none; }
.ac-header-logo { display: none; }
#ac-title { margin-right: auto; text-align: left; font-size: 20px; font-weight: 650; letter-spacing: -.02em; }
#ac-connection { display: flex; align-items: center; gap: 8px; background: transparent; border: 0; font-size: 12px; color: var(--muted); }
#ac-connection::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); flex-shrink: 0; }
#ac-connection[data-online=true]::before { background: var(--green); }
#ac-connection[data-online=false]::before { background: var(--amber); }
html[data-ac-theme] :is(#ac-frame,#ac-editor,#ac-setup) { left: var(--sidebar); right: 0; top: var(--header-height); bottom: 0; border: 0; border-radius: 0; background: var(--bg); box-shadow: none; }
html[data-ac-theme] body.web #root .app { left: var(--sidebar); right: 0; top: var(--header-height); bottom: 0; backdrop-filter: none; }
html[data-ac-theme] #ac-editor { padding: 28px 32px 40px; scrollbar-gutter: stable; scroll-padding: 24px; }
#ac-frame iframe { background: var(--bg); }
#ac-tabs { display: none; }
#root .backdrop { display: none !important; }
#ac-editor > :is(.ac-feature-page,.ac-features,.ac-page) { max-width: 1440px; }
#ac-editor h2 { font-size: 25px; margin: 0 0 20px; }
#ac-editor h3 { font-size: 17px; margin: 0 0 16px; }
#ac-editor label,.ac-embedded label { color: var(--muted); font-size: 13px; line-height: 1.5; }
#ac-editor :is(input:not([type=checkbox]),textarea,select) { width: 100%; margin-top: 6px; }
#ac-editor .row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
#ac-editor :is(.pane,.feature-pane) > button { margin: 8px 8px 0 0; }
#ac-editor :is(.pane,.feature-pane) > p { color: var(--text-soft); line-height: 1.65; }
#ac-editor a.button { display: inline-flex; align-items: center; justify-content: center; margin: 8px 8px 8px 0; }
#ac-editor :is(.pane,.feature-pane,.file-browser,.draft-panel) { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; box-shadow: none; padding: 22px; margin-bottom: 20px; }

/* Staff overview */
.ac-home-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.ac-home-heading h1 { font-size: 30px; margin: 0 0 6px; }
.ac-subtitle { color: var(--muted); font-size: 14px; margin: 0; }
#ac-editor.ac-home .ac-home-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 0 24px; }
#ac-editor.ac-home .ac-home-metrics article { min-width: 0; padding: 20px; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: transparent; }
#ac-editor.ac-home .ac-home-metrics article:first-child { padding-left: 0; }
#ac-editor.ac-home .ac-home-metrics article:last-child { border-right: 0; }
.ac-home-metrics span,.ac-home-metrics small { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; }
.ac-home-metrics strong { display: block; font-size: 32px; line-height: 1.35; font-weight: 650; margin: 10px 0 6px; }
.ac-home-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 32px; }
#ac-editor.ac-home .ac-home-section { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; padding: 24px 0; margin: 0 0 12px; min-width: 0; }
#ac-editor.ac-home .ac-home-section > :is(h2,summary) { font-size: 17px; font-weight: 600; margin: 0 0 12px; min-height: 26px; }
.ac-home-section > summary { cursor: pointer; }
.ac-quick-actions { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.ac-quick-actions button { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 6px; min-height: 88px; padding: 16px; white-space: normal; text-align: left; }
.ac-quick-actions strong { font-size: 14px; font-weight: 600; }
.ac-quick-actions span { font-size: 12px; color: var(--muted); font-weight: 400; }
#ac-editor .ac-home-row { display: grid; width: 100%; gap: 5px; padding: 15px 0; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; white-space: normal; }
.ac-home-row strong { font-size: 14px; font-weight: 600; }
.ac-home-row :is(strong,span) { min-width: 0; overflow-wrap: anywhere; }
.ac-home-row span,.ac-home-updated { color: var(--muted); font-size: 12px; line-height: 1.6; }
.ac-home-services { margin-bottom: 28px; }
.ac-home-service-link { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; width: 100%; padding: 0; background: transparent !important; border: 0 !important; text-align: left; min-height: 32px; }
.ac-home-service-link strong { font-size: 13px; font-weight: 600; }
.ac-home-service-items { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: 12px; }
.ac-home-service-items > span[data-state=offline] { color: var(--red); }
.ac-home-service-items > span[data-state=online] { color: var(--muted); }
.ac-inbox-item { display: flex; flex-wrap: wrap; gap: 10px; padding: 20px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; overflow-wrap: anywhere; }
.ac-inbox-item > :is(strong,p,small) { flex-basis: 100%; margin: 0; }
.ac-inbox-item p { color: var(--text-soft); font-size: 14px; }
.ac-inbox-item small { color: var(--muted); font-size: 12px; }
.unread-item { border-left: 2px solid var(--accent); padding-left: 16px; }
.ac-unread-badge { background: var(--accent); color: var(--on-accent); font-size: 10px; border-radius: 4px; padding: 2px 6px; margin-left: auto; }

/* Forms, accounts and resource tools */
.feature-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.feature-heading h2 { margin: 0 0 6px !important; }
.feature-message { padding: 12px 0; color: var(--text-soft); line-height: 1.6; }
.feature-row { padding: 20px 0 !important; border: 0 !important; border-bottom: 1px solid var(--line) !important; border-radius: 0 !important; background: transparent !important; }
.feature-row > :is(strong,small) { display: block; }
.feature-row > small { margin-top: 6px; color: var(--muted); }
.feature-row > button { margin: 8px 8px 0 0; }
.ac-features :is(.feature-pane,.feature-form) > label,.ac-page :is(.pane,.feature-pane) > label:not(.feature-check) { display: grid; gap: 6px; margin: 18px 0; }
.ac-features label.feature-check { display: flex; align-items: center; gap: 10px; }
.ac-page > .row { margin-bottom: 20px; }
.ac-page > .ac-account-grid { max-width: 760px; }
.ac-device-card,.ac-account-row { display: grid; gap: 9px; padding: 20px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.ac-device-card small,.ac-account-row small { display: block; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.ac-account-grid { display: grid; gap: 20px; max-width: 760px; }
.ac-account-grid label { display: grid; gap: 7px; }
.ac-account-grid button { justify-self: start; }
.ac-account-code { padding: 16px; border: 1px solid var(--line); border-radius: 4px; background: var(--inset); color: var(--text-soft); font: 13px/1.65 ui-monospace,monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.ac-account-row details { font-size: 12px; color: var(--muted); }
.ac-account-row .row { margin-top: 10px; }
.ac-version-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin: 20px 0; }
.ac-version-grid article { display: grid; gap: 8px; padding: 20px; border: 1px solid var(--line); border-radius: 4px; }
.ac-version-grid strong { font-size: 21px; overflow-wrap: anywhere; }
.ac-version-grid small { color: var(--muted); font-size: 12px; }
.ac-release-notes { padding-left: 20px; color: var(--text-soft); line-height: 1.8; }
.ac-update-state { padding: 14px; background: var(--accent-soft); border-radius: 4px; }
.editor-heading { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 28px; }
#ac-editor .editor-eyebrow { display: none; }
#ac-editor .editor-tabs { display: flex; gap: 24px; margin: 0 0 24px; border-bottom: 1px solid var(--line); }
#ac-editor .editor-tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 12px 0; background: transparent; color: var(--muted); }
#ac-editor .editor-tabs button.selected { color: var(--text); border-bottom-color: var(--accent); }
#ac-editor .code,.ac-line-diff { background: var(--inset); font: 13px/1.75 ui-monospace,monospace; tab-size: 4; }
.diff-added { background: #16372c; color: #b5e8cf; }
.diff-removed { background: #3c222c; color: #f7bbc9; }
.diff-same { color: var(--muted); }
.ac-service-list { border: 1px solid var(--line); border-radius: 4px; }
.ac-service-row { display: flex; justify-content: space-between; gap: 16px; padding: 18px; border-bottom: 1px solid var(--line); }
.ac-service-row:last-child { border-bottom: 0; }
.ac-service-row p { margin: 6px 0; }
.ac-service-row small { color: var(--muted); }
.ac-service-state { align-self: start; display: inline-block; padding: 3px 8px; border: 1px solid var(--line-strong); border-radius: 4px; font-size: 12px; text-transform: capitalize; }
.ac-service-state[data-state=online] { color: #a5ddbd; }
.ac-service-state[data-state=offline] { color: var(--red); }
.ac-service-state:is([data-state=unknown],[data-state=unavailable],[data-state=degraded]) { color: var(--amber); }
.ac-status-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.ac-status-card { padding: 20px; border: 1px solid var(--line); border-radius: 4px; background: var(--inset); }
.ac-status-card > strong { display: block; margin-bottom: 14px; }
.ac-status-card p { font-size: 13px; margin: 12px 0 6px; }
.ac-status-card small { color: var(--muted); }
.ac-compose > summary,.ac-notice-history > summary { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; font-weight: 600; }
.ac-compose > summary::after,.ac-notice-history > summary::after { content: '+'; margin-left: auto; color: var(--muted); }
.ac-compose[open] > summary::after,.ac-notice-history[open] > summary::after { content: '−'; }
.ac-compose[open] > summary { padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.ac-notice-history { margin-top: 24px; }
.ac-draft-status { color: var(--muted); font-size: 12px; margin: 8px 0; }
.ac-draft-offer { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px; border: 1px solid var(--accent-line); border-radius: 4px; background: var(--accent-soft); }
.ac-draft-offer span { flex: 1 1 180px; }
.ac-draft-preview { width: 100%; flex-basis: 100%; min-height: 160px; }
.ac-draft-warning { padding: 12px; border-left: 2px solid var(--amber); color: var(--amber); font-size: 13px; }
.ac-page-error,[data-feedback=error] { padding: 14px !important; background: var(--red-soft) !important; border: 1px solid #75464a !important; border-radius: 4px; color: #f0bdc5 !important; }
[data-feedback=success] { padding: 14px !important; background: var(--green-soft) !important; border: 1px solid #355347 !important; border-radius: 4px; color: #b6dfcb !important; }
.ac-page-error button { display: block; margin-top: 12px; }
.feature-message:empty,.message:empty,[role=status]:empty,.ac-account-code:empty,.ac-draft-status:empty,.ac-draft-offer:empty,.ac-draft-warning:empty { display: none; }
#ac-editor[aria-busy=true]::before { content: 'Loading…'; display: block; margin-bottom: 14px; color: var(--muted); }

/* Tickets and embedded staff administration */
html[data-ac-theme] .ac-embedded { background: var(--bg); }
.ac-embedded main { margin: 0 !important; padding: 28px 32px !important; max-width: none; }
.ac-embedded main > header { display: none !important; }
.ac-embedded :is(.statusPanel,.queue,.detail,.profileCard,.healthTile) { box-shadow: none; border-radius: 6px; border-color: var(--line); background: var(--panel); }
.ac-embedded .statusPanel { padding: 22px; }
.ac-embedded .statusPanel > p { color: var(--text-soft); max-width: 75ch; }
.ac-embedded :is(.accessRow,.activityEntry) { padding: 18px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.ac-embedded .accessRow { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 18px; }
.ac-embedded .accessRow > strong { min-width: 150px; font-size: 14px; text-transform: capitalize; }
.ac-embedded .accessRow label { flex: 1 1 160px; }
.ac-embedded :is(.accessRow .roleOptions,.roleChoices) > label { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 4px 0; }
.ac-embedded :is(th,td) { padding: 12px; vertical-align: top; border-bottom: 1px solid var(--line); font-size: 13px; }
.ac-embedded th { color: var(--muted); font-weight: 550; text-align: left; }
.ac-embedded .tableScroll { overflow: auto; border: 1px solid var(--line); border-radius: 4px; }
.ac-embedded .healthTile { padding: 18px; }
.ac-embedded .healthTile strong { font-size: 24px; font-weight: 650; }
.ac-embedded .ticket { display: block; padding: 18px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; text-align: left; background: transparent; }
.ac-embedded .ticket.active { background: var(--accent-soft); box-shadow: inset 2px 0 var(--accent); }
.ac-embedded .ticket .line { display: flex; flex-wrap: wrap; gap: 6px; }
.ac-embedded .ticket > strong { display: block; font-size: 15px; margin: 10px 0 5px; font-weight: 600; }
.ac-embedded .ticket > small { display: block; color: var(--muted); font-size: 12px; line-height: 1.65; }
.ac-embedded .messages { height: 38vh; min-height: 260px; max-height: 560px; padding: 12px 0; border-color: var(--line); }
.ac-embedded .message { padding: 15px 16px; margin: 12px 0; border: 0; border-left: 2px solid var(--line-strong); border-radius: 0; background: var(--inset); }
.ac-embedded .message.playerMessage { border-left-color: var(--accent); }
.ac-embedded .message p { line-height: 1.7; }
.ac-embedded .messageMeta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ac-embedded .messageMeta time,.ac-embedded .message .meta time { color: var(--muted); font-size: 12px; }
.ac-embedded .messageRole { text-transform: none; letter-spacing: 0; color: var(--muted); }
html[data-ac-theme] :is(.badge,.unread) { font-size: 11px; text-transform: none; letter-spacing: 0; border-radius: 4px; }
.ac-embedded .ticketTools,.ac-embedded .privateNotes { border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; }
.ac-embedded .ticketTools form { display: flex; flex-wrap: wrap; gap: 12px; }
.ac-embedded .ticketTools label { flex: 1 1 180px; }
.ac-embedded #replyForm { padding: 18px; border: 1px solid var(--line); border-radius: 4px; background: var(--inset); }
.ac-embedded #reply { background: var(--bg); }
.ac-embedded .ac-ticket-actions .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ac-embedded .ac-ticket-actions a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; }
.ac-ticket-views { display: flex; gap: 4px; margin: 12px 0 18px; border-bottom: 1px solid var(--line); }
.ac-ticket-views button { flex: 1; border: 0 !important; border-bottom: 2px solid transparent !important; border-radius: 0 !important; background: transparent !important; color: var(--muted); padding: 12px 8px; }
.ac-ticket-views button[aria-pressed=true] { color: var(--text); border-bottom-color: var(--accent) !important; }
.ac-disclosure { padding: 0; margin: 14px 0; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); }
.ac-disclosure > summary { padding: 13px 14px; min-height: 46px; font-size: 13px; cursor: pointer; color: var(--text-soft); }
.ac-disclosure[open] > summary { border-bottom: 1px solid var(--line); }
.ac-disclosure-content { display: flex; flex-wrap: wrap; gap: 12px; padding: 16px; }
.ac-disclosure-content label { flex: 1 1 150px; }
#ac-ticket-back { display: none; }
#ticketFeedback { margin: 12px 0; font-size: 13px; scroll-margin: 12px; }
.ac-embedded #botReason { width: 100%; min-height: 84px; }
.ac-embedded #botResult { font-size: 13px; line-height: 1.6; }
.ac-embedded #error { position: relative; z-index: 1; margin: 0 0 14px; }

/* Ticket panel configuration */
.ac-settings-columns { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(260px,.8fr); gap: 32px; align-items: start; }
.ac-ticket-settings label { display: flex; flex-direction: column; gap: 7px; margin: 0 0 18px; }
.ac-ticket-settings textarea { min-height: 100px; resize: vertical; }
.ac-ticket-settings input,.ac-ticket-settings select { max-width: 100%; }
.ac-ticket-settings input[type=checkbox] { align-self: start; }
.ac-ticket-settings input[type=color] { width: 70px !important; min-height: 44px; }
.ac-discord-preview { position: sticky; top: 20px; min-width: 0; }
.ac-discord-card { border-left: 3px solid var(--ac-accent); padding: 20px; border-radius: 4px; background: var(--ac-raised); overflow-wrap: anywhere; }
.ac-discord-card img { width: 76px; height: 76px; object-fit: contain; float: right; margin: 0 0 12px 16px; }
.ac-discord-card p { white-space: pre-wrap; }
.ac-ticket-button-editor { padding: 14px 0; border-top: 1px solid var(--line); }
.ac-ticket-button-editor summary { min-height: 44px; cursor: pointer; }
.ac-ticket-button-editor > .row { margin-top: 14px; }

/* Login, verification and connection feedback */
html[data-ac-theme] body:has(.ac-login) { overflow: auto !important; display: grid; place-items: center; min-height: 100dvh; padding: 32px 20px; }
html[data-ac-theme] .ac-login,html[data-ac-theme] .ac-download { width: 100%; max-width: 440px; margin: auto; padding: 32px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); text-align: left; box-shadow: none; }
html[data-ac-theme] .ac-login .login-logo,html[data-ac-theme] .ac-download .login-logo { display: block; width: 116px; height: 96px; object-fit: contain; margin: 0 0 18px; }
html[data-ac-theme] .ac-login .eyebrow { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
html[data-ac-theme] .ac-login h1 { font-size: 28px; margin: 12px 0; }
html[data-ac-theme] .ac-login :is(.intro,.foot) { font-size: 14px; color: var(--muted); line-height: 1.7; }
.ac-login form { display: grid; gap: 18px; margin-top: 24px; }
.ac-login label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
.ac-login input { width: 100%; font-size: 16px; }
html[data-ac-theme] .ac-login .ac-secondary-link { display: block; padding: 0; margin-top: 20px; border: 0; border-radius: 0; color: var(--text-soft); background: transparent; font-size: 13px; font-weight: 400; text-decoration: underline; text-underline-offset: .25em; }
#ac-account-error { color: var(--red); font-size: 13px; white-space: pre-wrap; }
.ac-login pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.ac-verification { width: min(440px,calc(100vw - 32px)); padding: 28px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--panel); color: var(--text); }
.ac-verification::backdrop { background: #080a0dbb; }
.ac-verification h2 { font-size: 24px; margin: 0 0 12px; }
.ac-verification p { color: var(--muted); line-height: 1.65; }
.ac-verification label { display: grid; gap: 8px; }
.ac-verification input { width: 100%; font-size: 18px; letter-spacing: .08em; }
.ac-verification-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.ac-recovery-choice { background: transparent !important; border: 0 !important; color: var(--accent) !important; font-size: 13px !important; }
.ac-connection-banner { position: fixed; z-index: 10060; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100vw - 24px); padding: 14px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--panel); font-size: 13px; }
.ac-app-network { background: var(--panel) !important; border-color: var(--line-strong) !important; color: var(--text) !important; }
.ac-offline { background: var(--bg) !important; }
.ac-app-mark { color: var(--accent) !important; }

/* Tablet and mobile */
@media(max-width:1100px) and (min-width:901px) {
  html[data-ac-theme] { --sidebar: 224px; }
  .ac-quick-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #ac-editor.ac-home .ac-home-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #ac-editor.ac-home .ac-home-metrics article { padding: 18px; }
  #ac-editor.ac-home .ac-home-metrics article:nth-child(2n) { border-right: 0; }
}
@media(max-width:900px) {
  html[data-ac-theme] { --header-height: calc(64px + env(safe-area-inset-top)); }
  html[data-ac-theme] #ac-shell { left: 0; top: 0; bottom: 0; width: min(330px,90vw); padding: calc(14px + env(safe-area-inset-top)) 16px calc(14px + env(safe-area-inset-bottom)); border-radius: 0; gap: 10px; }
  #ac-shell .brand { padding-bottom: 12px; }
  #ac-shell .brand-logo { width: 90px; height: 72px; }
  html[data-ac-theme] #ac-header { left: 0; right: 0; top: 0; height: var(--header-height); padding: env(safe-area-inset-top) 16px 0; gap: 10px; }
  .ac-header-logo { display: block; width: 44px; height: 40px; object-fit: contain; flex-shrink: 0; }
  #ac-title { font-size: 18px; }
  #ac-connection { font-size: 0; max-width: 8px; overflow: hidden; gap: 0; }
  #ac-menu-toggle { display: none !important; }
  html[data-ac-theme] :is(#ac-frame,#ac-editor,#ac-setup),html[data-ac-theme] body.web #root .app { left: 0; right: 0; top: var(--header-height); bottom: calc(68px + env(safe-area-inset-bottom)); border: 0; border-radius: 0; }
  html[data-ac-theme] #ac-editor { padding: 22px 16px 28px !important; scrollbar-gutter: auto; }
  #ac-frame iframe { height: 100%; }
  html[data-ac-theme] #ac-navigation .nav-item { min-height: 46px; font-size: 14px; }
  #ac-tabs { position: fixed; z-index: 10015; left: 0; right: 0; bottom: 0; display: flex; gap: 4px; padding: 4px 8px calc(4px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--inset); }
  #ac-tabs button { position: relative; flex: 1; min-width: 0; min-height: 59px; padding: 5px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; border-radius: 0; background: transparent; color: var(--muted); font-size: 11px; }
  #ac-tabs button.active { color: var(--accent); }
  #ac-tabs button.active::before { content: ''; position: absolute; top: 0; width: 24px; height: 2px; background: var(--accent); }
  #ac-tabs .ac-nav-icon { width: 21px; height: 21px; }
  #ac-tabs .ac-unread-badge { position: absolute; top: 3px; right: calc(50% - 28px); }
  .ac-home-heading h1,.editor-heading h2,.feature-heading h2,.ac-page > h2 { display: none; }
  .ac-home-heading { margin-bottom: 22px; }
  #ac-editor.ac-home .ac-home-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #ac-editor.ac-home .ac-home-metrics article { padding: 16px 12px; }
  #ac-editor.ac-home .ac-home-metrics article:nth-child(2n) { border-right: 0; }
  #ac-editor.ac-home .ac-home-metrics article:nth-child(n+3) { border-top: 1px solid var(--line); }
  .ac-home-metrics strong { font-size: 27px; }
  .ac-home-metrics small { display: none; }
  .ac-home-columns { grid-template-columns: 1fr; gap: 0; }
  .ac-quick-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ac-quick-actions button { min-height: 54px; padding: 12px; }
  .ac-quick-actions span { display: none; }
  .ac-home-service-link { gap: 6px 12px; }
  .ac-home-service-items { gap: 6px 14px; }
  .ac-embedded main { padding: 20px 16px !important; }
  .ac-embedded :is(input,textarea,select),#ac-editor :is(input,textarea,select) { font-size: 16px; }
  .ac-embedded .metrics { display: none !important; }
  .ac-embedded #ticketsView > .split { display: block; }
  .ac-embedded:not(.ac-ticket-open) #ticketsView .detail { display: none; }
  .ac-embedded.ac-ticket-open #ticketsView > .toolbar,.ac-embedded.ac-ticket-open #ticketsView > .saved-ticket-filters,.ac-embedded.ac-ticket-open #ticketsView > .ac-saved-views,.ac-embedded.ac-ticket-open #ticketsView > .ac-ticket-views,.ac-embedded.ac-ticket-open #ticketsView .queue { display: none; }
  .ac-embedded.ac-ticket-open #ticketsView .detail { display: block; padding: 0; border: 0; background: transparent; }
  .ac-embedded .queue { border: 0; background: transparent; }
  .ac-embedded .ticket { padding: 18px 2px; }
  .ac-embedded .ticket.active { padding-left: 12px; }
  .ac-embedded .messages { height: 30dvh; min-height: 180px; max-height: 320px; }
  .ac-embedded.ac-reply-focus .messages { height: 20dvh; min-height: 110px; }
  #ac-ticket-back { display: inline-flex; min-height: 44px; margin: 0 0 12px; }
  .ac-embedded .detailHead { align-items: flex-start; }
  .ac-embedded .detailHead > div { min-width: 0; }
  .ac-embedded .detailHead h2 { font-size: 19px; margin: 4px 0; }
  .ac-embedded #ticketMeta { margin: 6px 0 10px; font-size: 12px; line-height: 1.6; }
  .ac-embedded .replyFooter { display: grid; grid-template-columns: minmax(0,1fr); gap: 10px; }
  .ac-embedded .replyFooter > * { width: 100%; min-width: 0; max-width: 100%; }
  .ac-ticket-toolbar { gap: 10px; }
  .ac-ticket-toolbar > label { flex: 1 1 100%; min-width: 0; }
  .ac-ticket-toolbar > button { flex: 1; }
  .ac-ticket-filters { flex-basis: 100%; margin: 0; }
  .ac-disclosure-content { padding: 14px; }
  .ac-disclosure-content label,.ac-embedded .ticketTools form label { flex-basis: 100%; }
  .ac-embedded .ac-conversation-actions:not(:has(.has-new-messages)) { display: none; }
  .ac-embedded .conversationNote { font-size: 12px; margin: 8px 0; }
  .ac-version-grid,.ac-settings-columns { grid-template-columns: 1fr; }
  .ac-discord-preview { position: static; }
  .ac-account-grid button { width: 100%; }
  .ac-connection-banner { bottom: calc(80px + env(safe-area-inset-bottom)); width: calc(100vw - 24px); }
  .ac-page > .row { align-items: stretch; gap: 12px; }
  .ac-page > .row > select { flex-basis: 100%; }
  .ac-page > .row > button { flex: 1; }
  .feature-heading { align-items: center; gap: 12px; margin-bottom: 20px; }
  .feature-heading > button { flex-shrink: 0; }
  .ac-status-grid { grid-template-columns: 1fr; gap: 0; }
  .ac-status-card { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; padding: 18px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
  .ac-status-card > strong { margin: 0; }
  .ac-status-card p,.ac-status-card small { grid-column: 1/-1; margin: 0; }
  .ac-embedded .accessRow { display: block; padding: 18px 0; }
  .ac-embedded .accessRow > strong { display: block; margin-bottom: 12px; }
  .ac-embedded .accessRow label { display: block; margin-top: 12px; }
  .ac-embedded .statusPanel { padding: 16px; }
  .ac-embedded .statusPanel > .actions { display: flex; flex-wrap: wrap; gap: 8px; }
  .ac-embedded .statusPanel > .actions button { flex: 1 1 120px; margin: 0; }
  .ac-embedded #botMetrics { display: grid !important; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .ac-embedded #botMetrics article { min-width: 0; }
  .ac-embedded #botMetrics strong { font-size: 18px; overflow-wrap: anywhere; }
  .ac-embedded #botView .toolbar label { flex-basis: 100%; width: 100%; }
  .ac-embedded .ac-ticket-actions .actions > * { flex: 1 1 130px; justify-content: center; }
  .ac-embedded dialog { width: calc(100vw - 28px); max-width: 480px; padding: 20px; border-radius: 6px; }
  .ac-embedded dialog .actions { display: flex; flex-wrap: wrap; gap: 8px; }
  .ac-embedded dialog .actions button { flex: 1; }
  .ac-compose button.primary { width: 100%; }
  .editor-browse-mobile { display: inline-flex !important; }
  .editor-heading .ac-subtitle { display: none; }
}
.editor-browse-mobile { display: none; }
@media(max-width:600px) {
  html[data-ac-theme] .ac-login,html[data-ac-theme] .ac-download { padding: 24px; }
  .ac-verification-actions { flex-wrap: wrap; }
  .ac-verification-actions button { flex: 1; }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Community publishing workspace */
html[data-ac-theme] .community-posts{max-width:1480px;margin:0 auto;padding:32px!important;background:transparent!important;border:0!important;border-radius:0!important}
.posts-heading,.posts-list-heading,.posts-editor-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}.posts-heading{margin-bottom:28px}.posts-heading h1{margin:0 0 6px;font-size:28px}.posts-heading p{margin:0}.posts-heading>.primary{flex-shrink:0}.posts-feedback{padding:12px 16px;background:#122a26;border-left:2px solid #73df9b;color:var(--text)}.posts-feedback[data-error=true]{background:#30291e;border-color:#e4ba70}.posts-tabs{display:flex;gap:24px;border-bottom:1px solid var(--line);margin-bottom:28px}.posts-tabs button{border:0!important;border-radius:0!important;background:transparent!important;color:var(--muted);padding:0 0 14px!important;min-height:44px}.posts-tabs button[aria-pressed=true]{color:var(--accent)!important;border-bottom:2px solid var(--accent)!important}.posts-layout{display:grid;grid-template-columns:minmax(300px,1fr) minmax(390px,1.15fr);gap:36px;align-items:start}.posts-layout:not(:has(.posts-editor:not([hidden]))){grid-template-columns:1fr}.posts-list-heading{padding-bottom:18px;border-bottom:1px solid var(--line)}.posts-list-heading h2{font-size:16px;margin:0}.posts-list-heading button{font-size:12px;min-height:36px}.posts-row{display:flex!important;align-items:center;justify-content:space-between;gap:18px;width:100%;min-height:88px;padding:18px 12px!important;text-align:left;background:transparent!important;border:0!important;border-bottom:1px solid var(--line)!important;border-radius:0!important}.posts-row:hover,.posts-row[aria-pressed=true]{background:var(--panel)!important}.posts-row[aria-pressed=true]{box-shadow:inset 2px 0 var(--accent)!important}.posts-row-copy{min-width:0;display:grid;gap:5px}.posts-row-copy strong{font-size:14px;font-weight:600;overflow-wrap:anywhere}.posts-row-copy small{color:var(--muted);font-size:12px}.post-state{font-size:11px;color:var(--muted);white-space:nowrap}.post-state[data-state=scheduled]{color:var(--accent)}.post-state[data-state=attention],.post-state[data-state=pending],.post-state[data-state=deleting]{color:#e4ba70}.posts-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:20px;font-size:12px;color:var(--muted)}.posts-pagination button{min-height:36px;font-size:12px}.posts-editor{padding:24px;background:var(--panel);border:1px solid var(--line);border-radius:5px;min-width:0}.posts-editor-heading{padding-bottom:20px;border-bottom:1px solid var(--line);margin-bottom:22px}.posts-editor-heading h2{font-size:17px;margin:0}.posts-editor-heading button{font-size:12px;min-height:36px}.posts-form,.posts-form label,.posts-publishing,.posts-publishing label{display:grid;gap:9px}.posts-form{gap:20px}.posts-form label,.posts-publishing label{font-size:12px;font-weight:500;color:var(--text)}.posts-form input,.posts-form textarea,.posts-publishing input{width:100%;background:var(--inset)!important;color:var(--text);border:1px solid var(--line-strong);min-width:0;min-height:44px;padding:10px 12px}.posts-form textarea{resize:vertical;line-height:1.6}.posts-form input:disabled,.posts-form textarea:disabled{opacity:.75}.posts-date-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;border:0;margin:0;padding:0;min-width:0}.posts-date-grid legend{font-size:12px;color:var(--muted);margin-bottom:14px;padding:0}.posts-help{font-size:12px;color:var(--muted);margin:0}.posts-form>.posts-help:has(+fieldset){margin-top:-12px}.posts-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:4px}.posts-actions button{min-height:42px}.posts-actions .primary,.posts-heading .primary{background:var(--accent)!important;color:var(--on-accent)!important;border-color:var(--accent)!important;font-weight:650}.posts-danger{color:#ef9b9b!important;border-color:#754348!important;background:transparent!important}.posts-publishing{border-top:1px solid var(--line);margin-top:28px;padding-top:24px;gap:16px}.posts-publishing h3{font-size:15px;margin:0}.posts-schedule{font-size:12px;color:var(--accent);margin:0}.posts-warning{font-size:12px;color:#e4ba70;border-left:2px solid #e4ba70;padding:10px 14px;background:#30291e;overflow-wrap:anywhere}.posts-empty{padding:50px 12px;max-width:55ch}.posts-empty h3{font-size:16px}.posts-empty p{color:var(--muted)}.posts-dialog{width:min(520px,calc(100% - 32px));background:var(--panel);color:var(--text);padding:28px;border:1px solid var(--line-strong);border-radius:6px}.posts-dialog::backdrop{background:#000a}.posts-dialog h2{font-size:21px;margin:0 0 12px}.posts-dialog p{color:var(--muted);font-size:14px;margin-bottom:22px}.posts-dialog label{display:grid;gap:8px;font-size:13px}.posts-dialog textarea{width:100%;resize:vertical;min-height:120px;background:var(--inset);color:var(--text);padding:12px}.posts-dialog .posts-actions{justify-content:flex-end;margin-top:24px}
html[data-ac-theme] .ac-home-heading h1{font-size:28px;margin:0 0 6px}html[data-ac-theme] .ac-home-heading{padding-bottom:24px;border-bottom:1px solid var(--line);margin-bottom:24px}html[data-ac-theme] .ac-home-metrics{border:1px solid var(--line);background:var(--panel);gap:0;border-radius:5px;overflow:hidden}html[data-ac-theme] .ac-home-metrics article{padding:20px 24px;border:0;border-right:1px solid var(--line);border-radius:0;background:transparent}html[data-ac-theme] .ac-home-metrics article:last-child{border:0}html[data-ac-theme] .ac-home-metrics strong{font-size:29px;font-weight:600;letter-spacing:-.04em}html[data-ac-theme] .ac-home-section>h2,html[data-ac-theme] .ac-home-section>summary{font-size:16px;font-weight:600}html[data-ac-theme] .ac-quick-actions{gap:0}html[data-ac-theme] .ac-quick-actions button{border-radius:0;border:0;border-bottom:1px solid var(--line);background:transparent;padding:18px 12px;text-align:left}html[data-ac-theme] .ac-quick-actions button:hover{background:var(--panel)}html[data-ac-theme] #ac-shell .brand{padding-bottom:22px}html[data-ac-theme] .ac-nav-heading{font-size:10px;letter-spacing:.08em;color:var(--dim)}html[data-ac-theme] .ac-tool-search{border-color:var(--line);background:var(--inset)}
@media(max-width:1150px){.posts-layout{grid-template-columns:1fr}.posts-editor{margin-top:12px}.posts-list:has(+.posts-editor:not([hidden])) .posts-row{min-height:72px}.posts-list:has(+.posts-editor:not([hidden])){max-height:340px;overflow-y:auto;scrollbar-width:thin}}
@media(max-width:600px){html[data-ac-theme] .community-posts{padding:24px 18px!important}.posts-heading{align-items:flex-start;flex-direction:column;gap:16px;margin-bottom:22px}.posts-heading h1{font-size:25px}.posts-heading p{font-size:13px}.posts-heading>.primary{width:100%;min-height:44px}.posts-tabs{margin-bottom:20px}.posts-layout{gap:24px}.posts-editor{padding:18px}.posts-row{padding:16px 10px!important;gap:12px}.posts-row-copy small{font-size:11px}.post-state{font-size:10px;max-width:90px;white-space:normal;text-align:right}.posts-actions button{flex:1 1 130px}.posts-date-grid{gap:16px 12px}.posts-form input{font-size:16px}.posts-dialog{padding:22px}.posts-list:has(+.posts-editor:not([hidden])){max-height:230px}html[data-ac-theme] .ac-home-heading h1{font-size:26px}html[data-ac-theme] .ac-home-metrics article{padding:18px 16px}html[data-ac-theme] .ac-home-metrics article:nth-child(2){border-right:0}html[data-ac-theme] .ac-home-metrics article:nth-child(-n+2){border-bottom:1px solid var(--line)}html[data-ac-theme] .ac-home-metrics strong{font-size:27px}}

html[data-ac-theme] #ac-editor .ac-home-metrics article:first-child{padding-left:24px!important}@media(max-width:600px){html[data-ac-theme] #ac-editor .ac-home-metrics article:first-child{padding-left:16px!important}}
