/* Keep navigation, page context and working controls in two compact rows. */
.header-board-context{display:flex;align-items:center;gap:17px;border-left:1px solid var(--line);padding-left:19px;min-width:0}
.header-board-context[hidden]{display:none}
.header-board-context h1{display:flex;align-items:center;gap:7px;font-size:20px;line-height:26px;letter-spacing:-.6px;white-space:nowrap}
.header-board-context .pipeline-select{display:flex;white-space:nowrap;font-size:12px;padding:6px 0}
.board-screen .edition{display:block}
.board-screen .app-header{gap:20px;flex-shrink:0}
.board-screen .page-identity{min-width:0}
.board-screen .header-actions{flex-shrink:0}
.board-toolbar{min-height:54px;flex-shrink:0;padding:8px 28px 10px;gap:14px}
.board-actions{display:flex;align-items:center;gap:6px;min-width:0;margin-left:auto}
.board-actions .search{width:180px}
.board-actions .focus-button{min-height:33px;height:33px;padding:6px 11px;font-size:12px}
.board-actions .btn-icon{flex-shrink:0}
.board-actions .btn-icon:hover{background:var(--soft);color:var(--ink)}
.tools-divider{height:19px;width:1px;background:var(--line);margin:0 2px;flex-shrink:0}
.board-screen .reference-board{padding-top:8px}
.unified-history{min-height:38px;padding:7px 22px;gap:9px}
.unified-history-label{font-size:12px;font-weight:600;color:var(--muted)}
.unified-history-channels{display:flex;align-items:center;gap:5px}
.unified-history-channels .channel-logo{width:15px;height:15px}
.reply-route{display:flex;align-items:center;gap:6px;margin-left:auto;min-width:0;color:var(--muted)}
.reply-route>span{font-size:11px;white-space:nowrap}
.reply-route select{min-width:0;max-width:120px;padding:5px 3px;border:0;border-radius:6px;background:var(--soft);color:var(--ink);font-size:12px;font-weight:650;cursor:pointer}
.reply-route .channel-logo{width:16px;height:16px}
.message-source{display:flex;align-items:center;gap:4px;margin-right:auto;font-size:10px}
.bubble-time{gap:9px}
.bubble-time time{white-space:nowrap}
.board-view-dialog{width:360px;margin:88px 30px auto auto;border-radius:18px}
.board-view-dialog::backdrop{background:#10182718}
.board-view-dialog .simple-modal-head{padding:20px 22px 16px}
.board-view-dialog .simple-modal-head h2{font-size:21px}
.board-view-dialog .simple-modal-head p{font-size:12px}
.board-view-dialog .simple-modal-body{padding:20px 22px}
.board-view-controls{max-width:460px}
.width-label{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:14px;font-weight:650}
.width-label output{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums;font-weight:500}
#column-width{width:100%;margin:22px 0 5px;accent-color:var(--accent);cursor:ew-resize}
.range-ends{display:flex;justify-content:space-between;color:var(--muted);font-size:11px}
.compact-option{display:flex;align-items:flex-start;gap:10px;margin-top:24px;font-size:13px;cursor:pointer}
.compact-option input{width:16px;height:16px;margin:2px 0;accent-color:var(--accent)}
.compact-option small{display:block;color:var(--muted);font-size:11px;margin-top:3px}
.board-view-actions{margin-top:22px;padding-top:14px;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:10px}
.board-view-actions .btn{font-size:12px;padding:5px 0;min-height:28px}
.board-view-actions>span{font-size:11px;color:var(--muted)}
@media(max-width:1200px){
  .board-screen .demo-label{display:none}
  .board-toolbar{padding:8px 22px 10px}
  .board-actions .search{width:156px}
  .board-toolbar .scope-tabs button{padding:7px 8px;font-size:12px}
  .header-board-context{gap:12px;padding-left:15px}
}
@media(max-width:1050px){
  .board-toolbar{flex-wrap:wrap;gap:7px}
  .board-actions{margin-left:0;flex:1;justify-content:flex-end}
  .board-actions .search{flex:1;max-width:260px}
}
@media(max-width:800px){
  .board-view-dialog{margin:80px 12px auto auto;max-width:calc(100vw - 24px)}
  .board-screen .app-header{padding:0 17px;gap:10px}
  .board-screen .wordmark{display:none}
  .board-screen .edition{display:none}
  .header-board-context{padding:0;border:0;gap:10px}
  .header-board-context h1{font-size:18px}
  .header-board-context .pipeline-select{font-size:11px}
  .board-screen .page-identity{flex:1}
  .board-screen .header-actions{gap:5px}
  .board-toolbar{padding:8px 17px 10px;gap:8px;flex-wrap:nowrap}
  .board-actions{width:100%;gap:4px;flex:initial;justify-content:initial}
  .board-actions .search{width:0;min-width:0;max-width:none;padding:5px 7px;flex:1}
  .board-actions .focus-button{padding:6px 8px}
  .board-actions .btn-icon{width:29px;height:33px}
  .tools-divider{margin:0}
  .unified-history{padding:7px 14px;gap:7px}
  .reply-route>span{display:none}
  .compose-bottom{gap:10px}
  .compose-bottom>button>span{display:none}
}
@media(max-width:560px){
  .header-board-context{display:block}
  .header-board-context h1{font-size:17px;line-height:21px}
  .header-board-context .pipeline-select{padding:0;font-size:10px}
  .board-actions .focus-button>span{display:none}
  .board-actions .focus-button{width:29px;padding:5px}
  .board-actions .btn-icon{width:26px}
  .tools-divider{display:none}
}

/* Administrator edits directly on the board; personal width remains available to all. */
.pipeline-edit-button{min-height:33px;height:33px;padding:6px 10px;font-size:12px;background:var(--soft);color:var(--ink)}
.pipeline-edit-strip{display:flex;align-items:center;gap:20px;padding:12px 28px;border-bottom:1px solid var(--line);background:var(--surface);flex-shrink:0}
.pipeline-edit-caption{display:flex;flex-direction:column;gap:2px;min-width:190px}
.pipeline-edit-caption strong{font-size:12px;font-weight:700}
.pipeline-edit-caption>span{font-size:11px;color:var(--muted)}
.pipeline-width{display:flex;align-items:center;gap:12px;margin-left:auto;font-size:12px;white-space:nowrap}
.pipeline-width #column-width{width:140px;margin:0;accent-color:var(--accent)}
.pipeline-width output{font-size:11px;color:var(--muted);width:40px;font-variant-numeric:tabular-nums}
.pipeline-edit-actions{display:flex;align-items:center;gap:6px}
.pipeline-edit-actions .btn{min-height:32px;font-size:12px;padding:6px 11px}
.reference-board .lane-edit-head{height:46px;min-height:46px;gap:4px;padding:5px 6px;border-color:var(--stage-accent);cursor:grab}
.lane-edit-head input[data-stage-name]{width:0;min-width:0;flex:1;background:transparent;color:var(--deal-ink);font-size:13px;font-weight:650;border:0;border-radius:5px;padding:5px 2px;outline-offset:0}
.stage-grab{touch-action:none;cursor:grab;padding:6px 0;color:var(--muted);display:grid;place-items:center;flex-shrink:0}
/* The complete column follows the pointer; its original slot stays reserved. */
.lane-edit-head{touch-action:none;user-select:none}
.lane-edit-head input[data-stage-name][readonly]{pointer-events:none;user-select:none;text-overflow:ellipsis}
.lane-edit-head input[data-stage-name]:not([readonly]){background:var(--deal-soft);outline:1px solid var(--accent);cursor:text;user-select:text}
.stage-rename{display:grid;place-items:center;flex-shrink:0;padding:3px;width:26px;height:28px;border:0;border-radius:5px;background:transparent;color:var(--muted);cursor:pointer}
.stage-rename:hover{background:var(--deal-soft);color:var(--deal-ink)}
.reference-board.stage-drag-portal{position:fixed;z-index:1000;display:flex;flex:none;min-height:0;padding:0;gap:0;margin:0;overflow:visible;background:transparent;pointer-events:none;will-change:transform}
.reference-board.stage-drag-portal .stage-dragging{height:100%;pointer-events:none;border-radius:12px;background:var(--deal-bg);box-shadow:0 18px 48px #0005,0 4px 12px #0003;outline:1px solid var(--stage-accent);outline-offset:-1px}
.reference-board .stage-placeholder{outline:1px dashed color-mix(in srgb,var(--stage-accent) 35%,transparent);outline-offset:-1px;border-radius:12px;background:color-mix(in srgb,var(--stage-accent) 4%,transparent)}
.reference-board .stage-placeholder>*{visibility:hidden}
.stage-dragging .lane-edit-head{cursor:grabbing}
.reference-board.reordering-stage{cursor:grabbing;user-select:none}
.reference-board .stage-drop-target::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;border-radius:3px;background:var(--accent);box-shadow:0 0 9px color-mix(in srgb,var(--accent) 30%,transparent);pointer-events:none}
/* A full-height add-stage rail sits before the first column in edit mode. */
.reference-board .pipeline-add-stage{order:-1;flex:0 0 54px;width:54px;min-width:54px;padding:0;display:flex;align-self:stretch;margin-right:5px}
.pipeline-add-stage .pipeline-add-button{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:flex-start;gap:19px;width:100%;min-height:180px;padding:18px 8px;border:1px solid var(--deal-line);border-radius:11px;background:var(--deal-header);color:var(--deal-muted);box-shadow:0 2px 5px #00000008;transition:border-color 140ms ease,color 140ms ease,box-shadow 140ms ease}
.pipeline-add-stage .pipeline-add-button:not(:disabled):hover,.pipeline-add-stage .pipeline-add-button:focus-visible{border-color:#25e58b;box-shadow:0 0 0 1px #25e58b;outline:none;color:var(--deal-ink);transform:none}
.pipeline-add-stage .pipeline-add-button:disabled{opacity:.4;cursor:not-allowed}
.pipeline-add-plus{display:grid;place-items:center;flex-shrink:0;width:30px;height:30px}
.pipeline-add-label{writing-mode:vertical-rl;text-orientation:mixed;font-size:14px;font-weight:650;letter-spacing:.1px;line-height:20px}
.stage-width-handle{position:absolute;z-index:4;top:0;bottom:0;right:-3px;width:8px;cursor:col-resize;touch-action:none;outline:none}
.stage-width-handle::after{content:"";position:absolute;top:0;bottom:0;left:3px;width:2px;border-radius:2px;background:transparent;transition:background 120ms ease}
.stage-width-handle:hover::after,.stage-width-handle:focus-visible::after,.resizing-columns .stage-width-handle:focus::after{background:var(--accent)}
.stage-width-handle:focus-visible{outline:1px solid var(--accent);outline-offset:1px}
.reference-board.resizing-columns,.reference-board.resizing-columns *{cursor:col-resize!important;user-select:none!important}
@media(prefers-reduced-motion:reduce){.pipeline-add-stage .pipeline-add-button,.stage-width-handle::after{transition:none}}
@media(max-width:1200px){.board-actions .search{max-width:160px}.pipeline-edit-strip{gap:12px;padding:12px 22px}.pipeline-edit-caption{min-width:150px}.pipeline-edit-caption>span{max-width:180px}}
@media(max-width:1050px){.pipeline-edit-strip{flex-wrap:wrap}.pipeline-width{margin-left:0}.pipeline-edit-actions{margin-left:auto}.pipeline-edit-caption{flex:1}}
@media(max-width:800px){.pipeline-edit-button{width:29px;padding:6px;flex-shrink:0}.pipeline-edit-button>span{display:none}.pipeline-edit-strip{padding:10px 17px;gap:10px}.pipeline-edit-caption{min-width:100%;flex-basis:100%}.pipeline-edit-caption>span{max-width:none}.pipeline-width{gap:7px}.pipeline-width #column-width{width:90px}.pipeline-edit-actions .btn{padding:6px;font-size:11px}}

/* Native full-color selection stays separate from the column drag handle. */
.lane-edit-head .stage-color{appearance:none;-webkit-appearance:none;flex:0 0 24px;width:24px;height:24px;min-width:24px;padding:3px;border:1px solid var(--deal-line);border-radius:50%;background:var(--deal-header);cursor:pointer;overflow:hidden;touch-action:manipulation}
.stage-color::-webkit-color-swatch-wrapper{padding:0}
.stage-color::-webkit-color-swatch{border:0;border-radius:50%}
.stage-color::-moz-color-swatch{border:0;border-radius:50%}
.lane-edit-head .stage-color:hover{border-color:var(--deal-ink)}
.reply-route select{max-width:156px}
.reply-route-icon{display:inline-flex;align-items:center;justify-content:center}
.rail-login{display:grid;place-items:center;background:none;border:0;color:inherit;width:32px;height:30px}
.channel-auth-panel{min-height:180px}.channel-auth-heading{display:flex;align-items:center;gap:14px;margin-bottom:20px}.channel-auth-heading>.channel-logo{width:38px;height:38px}.channel-auth-heading strong{font-size:18px}.channel-auth-heading p{color:var(--muted);margin-top:4px}.channel-qr{display:flex;justify-content:center;padding:20px;margin:20px auto;background:white;border-radius:16px;width:280px;max-width:100%}.channel-qr img{display:block;width:240px;height:auto;max-width:100%}.channel-auth-instruction,.channel-disconnect-confirm p{font-size:15px;line-height:1.7;color:var(--muted);margin:18px 0}.channel-auth-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:24px}.channel-auth-error{color:#ef8293;font-size:15px;line-height:1.7;margin-bottom:18px}.channel-disconnect-confirm h3{font-size:20px;line-height:1.4}

.send-results:empty{display:none}.send-results{font-size:14px;line-height:1.5;color:var(--muted);padding:8px 0 0;overflow-wrap:anywhere}.send-results p{margin:3px 0}
.attachment-preview{display:flex;align-items:center;gap:12px;padding:10px;margin:6px 0;border:1px solid var(--line);border-radius:12px;background:var(--soft)}
.attachment-thumb{display:block;max-width:72px;max-height:72px;object-fit:cover;border-radius:7px;flex-shrink:0}audio.attachment-thumb{width:180px;max-width:180px;height:40px}
.attachment-meta{min-width:0;flex:1;font-size:14px;line-height:1.5;overflow-wrap:anywhere}.attachment-error{color:#ef8293;font-size:14px;line-height:1.5}.attachment-preview button{flex-shrink:0}
.chat-attachment-image{max-width:100%;max-height:320px;display:block;border-radius:10px}.chat-attachment-video{max-width:100%;max-height:360px;display:block;border-radius:10px}.chat-attachment-audio{max-width:100%}
.attachment-preview:empty{display:none}
.message-attachment{display:block;max-width:100%;margin:8px 0}.message-attachment img,.message-attachment video{display:block;max-width:100%;max-height:300px;border-radius:9px}.message-attachment audio{display:block;max-width:100%}.message-attachment figcaption{font-size:13px;line-height:1.5;color:var(--muted);margin-top:5px;overflow-wrap:anywhere}.message-attachment a{overflow-wrap:anywhere}

/* Compact channel cards and readable connection states. */
.pulse-channel-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;width:100%;max-width:1080px;align-items:stretch}
.pulse-channel-card{min-width:0;display:flex;flex-direction:column;padding:25px 24px 20px;background:var(--surface);border:1px solid var(--line);border-radius:20px;box-shadow:0 3px 8px #00000004}
.pulse-channel-heading{display:flex;align-items:center;gap:14px;min-width:0}
.pulse-channel-heading h2{font-size:21px;font-weight:750;line-height:1.3;letter-spacing:-.5px}
.pulse-channel-heading p{font-size:14px;color:var(--muted);margin-top:4px}
.pulse-channel-logo{width:48px;height:48px;border-radius:15px;background:var(--soft);display:grid;place-items:center;flex-shrink:0}
.pulse-channel-logo img{width:28px;height:28px;object-fit:contain}
.pulse-channel-status-row{margin:23px 0 25px}
.pulse-channel-status{display:inline-flex;align-items:center;gap:8px;padding:8px 11px;border:1px solid var(--line);border-radius:10px;max-width:100%;font-size:14px;font-weight:650;line-height:20px;color:var(--muted);background:var(--soft)}
.pulse-channel-status svg{width:18px;height:18px}
.pulse-channel-status.connected{color:#147648;background:#ecf8f1;border-color:#caead8}
.pulse-channel-status.attention{color:#9b5c13;background:#fff6e8;border-color:#f0dbb7}
.pulse-channel-send{display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;gap:6px 12px;font-size:14px;line-height:1.5;margin-top:auto;padding-bottom:19px;color:var(--muted)}
.pulse-channel-send strong{font-weight:650;color:var(--muted)}
.pulse-channel-send strong.ready{color:var(--ink)}
.pulse-channel-action{border-top:1px solid var(--line);padding-top:17px}
.pulse-channel-action .btn{display:flex;justify-content:center;align-items:center;width:100%;min-height:42px;border:1px solid var(--line);border-radius:11px;background:var(--soft);color:var(--ink);font-size:14px;font-weight:700;padding:9px 12px}
.pulse-channel-action .btn:hover{background:color-mix(in srgb,var(--accent) 12%,var(--surface));border-color:color-mix(in srgb,var(--accent) 50%,var(--line))}
.pulse-channel-action .btn:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.pulse-channel-note{max-width:1080px;font-size:15px;line-height:1.6;margin-top:20px}
html[data-theme=dark] .pulse-channel-status.connected{color:#82dfac;background:#203c32;border-color:#315a45}
html[data-theme=dark] .pulse-channel-status.attention{color:#f1c386;background:#3a3023;border-color:#5b4930}
@media(max-width:1100px){.pulse-channel-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.pulse-channel-grid{grid-template-columns:minmax(0,1fr);gap:14px}.pulse-channel-card{padding:20px}.pulse-channel-status-row{margin:18px 0}.pulse-channel-note{font-size:14px}}
