/* Two independent rails around the Mini App and its notification chat. */
body:not(.screen-preview),body:not(.screen-preview) .workspace,body:not(.screen-preview) .stage{background:#0d0d0f}
body:not(.screen-preview) .workspace{width:100%;height:100%;max-width:none;margin:0;padding:24px;display:grid;grid-template-columns:276px minmax(0,1fr) 260px;grid-template-rows:minmax(0,1fr);gap:28px;min-height:0;align-items:start}
body:not(.screen-preview) .control-panel{width:100%;max-height:100%;padding:20px;background:#1c1c20;border-radius:16px;overscroll-behavior:contain}
body:not(.screen-preview) .roster-panel{height:100%;display:flex;flex-direction:column;overflow:hidden}
body:not(.screen-preview) .roster-brand{flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 24px;min-height:24px}
body:not(.screen-preview) .roster-brand .brand{min-width:0}
body:not(.screen-preview) .roster-brand .brand>div{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px}
body:not(.screen-preview) .roster-brand .brand strong{font-size:16px}
body:not(.screen-preview) .roster-brand .brand span{display:inline;margin:0;font-size:12px}
body:not(.screen-preview) .roster-section{display:flex;flex-direction:column;flex:1;min-height:0;padding:0;border:0}
body:not(.screen-preview) .roster-panel .segmented{flex:none;margin:0;padding:4px;background:#131316;border-radius:10px}
body:not(.screen-preview) .roster-panel .segmented button{border-radius:7px;min-height:42px;font-size:14px}
body:not(.screen-preview) .roster-panel .roster-search{flex:none;min-height:42px;font-size:14px}
body:not(.screen-preview) .roster-panel .actor-list{flex:1;min-height:0;max-height:none;margin:12px -8px 0;padding:0 4px 32px;overflow:auto;mask-image:linear-gradient(to bottom,#000 calc(100% - 32px),transparent)}
body:not(.screen-preview) .roster-panel .actor-option{min-height:56px}
body:not(.screen-preview) .roster-panel .actor-option strong{font-size:14px}
body:not(.screen-preview) .roster-panel[data-role=lead] .actor-option.selected{background:#303036;border-color:#48484f}
body:not(.screen-preview) .roster-panel[data-role=lead] .actor-option.selected small,body:not(.screen-preview) .roster-panel[data-role=lead] .actor-option.selected .actor-count{color:#a6a6af}
body:not(.screen-preview) .roster-panel .actor-offer-count{display:inline-flex;align-items:center;gap:4px;flex:none;color:#c8c4c1;font-size:12px;font-variant-numeric:tabular-nums}
body:not(.screen-preview) .roster-panel .actor-offer-count .offer-mail-icon{width:17px;height:17px}
body:not(.screen-preview) .roster-panel .actor-offer-count.is-empty{color:#77747a}
body:not(.screen-preview) .action-panel{height:auto;max-height:calc(100% - 64px);margin-top:64px;overflow:auto;grid-column:3}
.panel-heading{display:none}
.system-actions{display:flex;flex-direction:column;gap:8px}
body:not(.screen-preview) .control-panel .tool-button,body:not(.screen-preview) #confirm-dialog .tool-button{min-height:42px;padding:10px 14px;font-size:13px}
.action-panel .tool-button{width:100%;justify-content:space-between;white-space:normal;text-align:left;line-height:1.4}
.action-panel .palette-link{text-decoration:none;color:#e5e5e9}
body:not(.screen-preview) .action-panel .panel-section{padding:24px 0 0;border:0}
body:not(.screen-preview) .action-panel .tool-input{min-height:42px;font-size:14px}
body:not(.screen-preview) .action-panel .workbench-disclosure>summary{min-height:36px;font-size:14px}
.action-panel .scenario-panel{padding-top:24px}
.action-panel .scenario-panel>summary{color:#e7e7ec;font-weight:600}
.action-panel .scenario-panel[open]>summary{margin-bottom:10px}
.action-panel .scenario-panel:not([open])>.scenario-buttons{display:none}
.scenario-buttons{display:flex;flex-direction:column;gap:6px}
.scenario-button{width:100%;padding:10px 12px;background:#252529;color:#d7d7de;text-align:left;border-radius:6px;box-shadow:inset 0 0 0 1px transparent}
.scenario-button:hover{background:#2d2d32;filter:none}
.scenario-button.is-current{background:#303036;box-shadow:inset 0 0 0 1px #48484f}
.scenario-button strong,.scenario-button span{display:block}
.scenario-button strong{font-size:13px;line-height:1.35;font-weight:600;color:#f0f0f3}
.scenario-button span{margin-top:3px;color:#9999a3;font-size:10px;line-height:1.45;font-weight:400}
.scenario-button.is-current span{color:#b4b4bd}
body:not(.screen-preview) .clock-help-button{width:34px;height:34px;font-size:15px}
.action-panel .test-settings{margin-top:24px}
.action-panel .test-settings>summary{display:flex;gap:8px;width:100%;height:auto;min-height:40px;padding:8px 0;justify-content:flex-start;color:#d4d4dc;font:500 13px/20px Inter,sans-serif}
.action-panel .test-settings-content{position:static;width:100%;max-height:none;padding:0 0 4px;background:transparent;box-shadow:none}
.action-panel .test-settings-content .field-label{margin-top:12px}
.action-panel .test-settings-content .tool-button{font-size:12px;padding-inline:10px}
.panel-reset{margin-top:24px}
.panel-reset .reset-button{background:#29292e;color:#aaaab2}
.panel-reset .reset-button:hover:not(:disabled){background:#333339;color:#d0d0d6;filter:none}
.panel-reset .reset-button:focus-visible{outline-color:#7f7f89}
.reset-button svg{flex:none}
body:not(.screen-preview) .stage{grid-column:2;padding:0;min-width:0;height:100%;max-height:none;align-items:stretch;overflow:hidden}
body:not(.screen-preview) .stage-top{width:100%;max-width:820px;align-self:center;margin:0 0 18px;height:24px;flex:none;justify-content:center}
body:not(.screen-preview) .stage-top .actor-line{justify-content:center;font-size:14px}
.stage-content{display:flex;flex-direction:column;align-self:center;width:100%;max-width:820px;height:min(788px,calc(100dvh - 112px));min-height:0;margin-block:auto}
.timeline-scrubber{display:flex;align-items:center;gap:12px;width:100%;max-width:none;align-self:center;flex:none;margin:0 0 14px;padding:10px 14px;background:#1b1b1f;border:1px solid #303036;border-radius:10px;color:#d8d8df;font:500 12px/1.2 Inter,sans-serif;box-shadow:0 8px 22px rgb(0 0 0 / 16%)}
.timeline-play{display:grid;place-items:center;flex:none;width:34px;height:34px;padding:0;border:1px solid #404047;border-radius:7px;background:#29292e;color:#d5d5dd;font:800 14px/1 Inter,sans-serif}
.timeline-play:hover{background:#35353c;color:#fff}
.timeline-play:focus-visible,.timeline-scrubber input:focus-visible{outline:2px solid #c3c3cc;outline-offset:3px}
.timeline-main{display:grid;gap:5px;min-width:0;flex:1}
.timeline-copy{display:flex;align-items:center;justify-content:space-between;gap:12px}
.timeline-copy strong{color:#f5f5f7;font-weight:700}
.timeline-copy output{color:#d4d4dc;font-variant-numeric:tabular-nums}
.timeline-range-wrap{position:relative;display:flex;align-items:center;height:16px}
.timeline-day-row{display:grid;grid-template-columns:48px minmax(0,1fr) 42px;align-items:center;gap:8px;color:#a8a8b0;font-size:11px}
.timeline-day-row output{text-align:right;color:#a8a8b0}
.timeline-day-row .timeline-range-wrap{height:14px}
.timeline-scrubber .timeline-day-row input[type=range]{height:14px}
.timeline-scrubber .timeline-day-row input[type=range]::-webkit-slider-runnable-track{height:3px;background:linear-gradient(90deg,#888892 0 var(--timeline-progress),#393940 var(--timeline-progress) 100%)}
.timeline-scrubber .timeline-day-row input[type=range]::-webkit-slider-thumb{width:14px;height:14px;margin-top:-5.5px;background:#a9a9b2;box-shadow:0 0 0 1px #a9a9b2}
.timeline-scrubber .timeline-day-row input[type=range]::-moz-range-track{height:3px}
.timeline-scrubber .timeline-day-row input[type=range]::-moz-range-thumb{width:10px;height:10px;background:#a9a9b2;box-shadow:0 0 0 1px #a9a9b2}
.timeline-day-tick{position:absolute;z-index:2;top:1px;bottom:1px;left:var(--timeline-day);width:2px;transform:translateX(-50%);background:#8b8b95;border-radius:2px;pointer-events:none}
.timeline-main>.timeline-range-wrap.has-offer-changes{margin-bottom:12px}
.timeline-offer-change{background:#e44a38}
.timeline-offer-change::after{content:attr(data-window);position:absolute;top:18px;left:50%;transform:translateX(-50%);color:#e98376;font:700 10px/1 Inter,sans-serif;white-space:nowrap}
.timeline-scrubber input[type=range]{width:100%;height:16px;margin:0;appearance:none;background:transparent;cursor:ew-resize}
.timeline-scrubber input[type=range]::-webkit-slider-runnable-track{height:4px;border-radius:99px;background:linear-gradient(90deg,#a7a7b1 0 var(--timeline-progress),#3b3b42 var(--timeline-progress) 100%)}
.timeline-scrubber input[type=range]::-webkit-slider-thumb{width:16px;height:16px;margin-top:-6px;appearance:none;border:3px solid #1b1b1f;border-radius:50%;background:#d2d2da;box-shadow:0 0 0 1px #d2d2da}
.timeline-scrubber input[type=range]::-moz-range-track{height:4px;border-radius:99px;background:#3b3b42}
.timeline-scrubber input[type=range]::-moz-range-progress{height:4px;border-radius:99px;background:#a7a7b1}
.timeline-scrubber input[type=range]::-moz-range-thumb{width:12px;height:12px;border:3px solid #1b1b1f;border-radius:50%;background:#d2d2da;box-shadow:0 0 0 1px #d2d2da}
.preview-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;flex:0 1 720px;height:min(720px,calc(100dvh - 184px));min-height:0;width:100%;max-width:820px;align-self:center;margin-block:auto}
.stage-content .preview-pair{flex:1 1 auto;width:100%;height:auto;max-width:none;margin:0}
.preview-device{display:flex;flex-direction:column;min-height:0;min-width:0;height:100%}
.device-label{flex:none;margin:0 0 10px;color:#96969f;font:500 12px/18px Inter,sans-serif}
.preview-pair .phone-wrap{width:100%;height:auto;flex:1;min-height:0;max-height:none}
.preview-pair .phone{width:100%;height:100%;max-height:none}
.surface-switch,.workbench-toolbar,.panel-close{display:none}
@media(min-width:1200px) and (max-width:1499px){
 body:not(.screen-preview) .workspace{grid-template-columns:244px minmax(0,1fr) 230px;padding:20px;gap:20px}
 body:not(.screen-preview) .control-panel{padding:16px}
 .preview-pair{gap:16px}
}
@media(max-width:1199px){
 body:not(.screen-preview) .workspace{grid-template-columns:244px minmax(0,1fr);padding:20px;gap:20px}
 body:not(.screen-preview) .control-panel{padding:16px}
 body:not(.screen-preview) .action-panel{display:none;position:absolute;top:20px;right:20px;left:auto;bottom:20px;width:280px;max-width:calc(100% - 40px);max-height:calc(100% - 40px);height:auto;margin-top:0;z-index:8;box-shadow:0 16px 48px #0009}
 body:not(.screen-preview) .action-panel.is-open{display:block}
 .workbench-toolbar{display:flex;justify-content:flex-end;gap:8px;flex:none;margin-bottom:12px}
 .workbench-toolbar .tool-button{min-height:40px;padding:8px 12px;font-size:13px;border:0}
 .characters-toggle{display:none}
 .action-panel .panel-close{display:block}
 .action-panel .panel-heading{display:flex;justify-content:flex-end;margin-bottom:12px}
 .panel-close{flex:none;min-width:32px;min-height:32px;background:transparent;color:#b8b8c4;font:400 24px/1 Inter,sans-serif}
 .preview-pair{gap:16px}
}
@media(max-width:980px){
 .preview-pair{grid-template-columns:minmax(0,1fr);max-width:390px}
 body:not(.screen-preview) .stage-top{max-width:390px}
 .timeline-scrubber{max-width:390px}
 .surface-switch{display:flex;align-self:center;flex:none;width:100%;max-width:390px;gap:4px;padding:4px;margin-bottom:12px;border-radius:10px;background:#202024}
 .surface-switch button{flex:1;min-height:42px;border-radius:7px;background:none;color:#aaaab5;font-size:13px}
 .surface-switch button[aria-pressed=true]{background:#35353c;color:#fff}
 .preview-pair[data-surface=app] .bot-device,.preview-pair[data-surface=bot] .app-device{display:none}
 .device-label{display:none}
}
@media(max-width:700px){
 body:not(.screen-preview) .workspace{display:flex;padding:16px;gap:0}
 body:not(.screen-preview) .stage{width:100%;flex:1}
 body:not(.screen-preview) .stage-top{height:auto;margin:0 0 12px;padding:0}
 body:not(.screen-preview) .stage-top .actor-line{flex-wrap:wrap;white-space:normal;gap:4px 8px}
 .timeline-scrubber{margin-bottom:10px;padding:9px 10px}
 body:not(.screen-preview) .roster-panel,body:not(.screen-preview) .action-panel{display:none;position:absolute;left:16px;right:16px;top:16px;bottom:16px;width:auto;max-width:none;height:calc(100% - 32px);max-height:calc(100% - 32px);z-index:8;padding:20px;box-shadow:0 12px 40px #0009}
 body:not(.screen-preview) .roster-panel.is-open{display:flex}
 body:not(.screen-preview) .action-panel.is-open{display:block}
 .roster-panel .panel-close,.characters-toggle{display:block}
 .workbench-toolbar{justify-content:space-between}
 .preview-pair,.surface-switch{max-width:420px}
}
.joined-card-status{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px;padding:10px 12px;border:1px solid #dc4034;color:#ed5142}
.joined-card-status .team-readiness{margin:0;text-align:left}
.joined-card-status .team-readiness-heading{justify-content:flex-start;gap:5px}
.joined-card-status .team-readiness-note{display:none}
.joined-card-status strong{font-size:16px;white-space:nowrap}
.phone .joined-members-heading{display:flex;align-items:center;justify-content:center;gap:4px;margin:24px 0 16px;color:var(--coral);font:600 22px/1.3 Inter,sans-serif}
.bot-message-action{text-decoration:none}

/* Three distinct destinations: Mini App, personal bot, shared forum topic. */
body:not(.screen-preview) .stage-content{max-width:1082px}
body:not(.screen-preview) .preview-pair{grid-template-columns:minmax(0,390px) repeat(2,minmax(0,1fr));gap:16px;max-width:1082px}
@media(min-width:1600px){
 body:not(.screen-preview) .workspace{grid-template-columns:200px minmax(0,1fr) 200px;padding:20px;gap:20px}
 body:not(.screen-preview) .control-panel{padding:16px}
}
@media(min-width:1700px){
 body:not(.screen-preview) .workspace{grid-template-columns:244px minmax(0,1fr) 244px;padding:24px;gap:24px}
 body:not(.screen-preview) .control-panel{padding:20px}
}
@media(min-width:981px) and (max-width:1599px){
 body:not(.screen-preview) .workspace{display:flex;padding:20px;gap:0}
 body:not(.screen-preview) .stage{width:100%;flex:1}
 body:not(.screen-preview) .roster-panel,body:not(.screen-preview) .action-panel{display:none;position:absolute;top:20px;bottom:20px;width:260px;height:auto;max-height:calc(100% - 40px);z-index:8;box-shadow:0 16px 48px #0009}
 body:not(.screen-preview) .roster-panel{left:20px}
 body:not(.screen-preview) .action-panel{right:20px}
 body:not(.screen-preview) .roster-panel.is-open{display:flex}
 body:not(.screen-preview) .action-panel.is-open{display:block}
 .workbench-toolbar{display:flex;justify-content:space-between;margin-bottom:12px}
 .characters-toggle,.panel-close{display:block}
 .action-panel .panel-heading{display:flex;justify-content:flex-end;margin-bottom:12px}
}
@media(max-width:980px){
 body:not(.screen-preview) .stage-content{max-width:420px}
 body:not(.screen-preview) .preview-pair{grid-template-columns:minmax(0,1fr);max-width:420px}
 .preview-pair[data-surface=app] .community-device,
 .preview-pair[data-surface=bot] .community-device,
 .preview-pair[data-surface=community] .app-device,
 .preview-pair[data-surface=community] .bot-device{display:none}
 .surface-switch button{font-size:12px;padding-inline:6px}
}

/* Readable rails with independent desktop collapse and drawer access below it. */
body:not(.screen-preview) .workbench-toolbar{display:flex;justify-content:space-between;gap:12px;margin-bottom:12px}
.workbench-toolbar .characters-toggle,.control-panel .panel-close{display:block}
.control-panel .panel-close{flex:none;width:32px;height:32px;min-width:32px;padding:0;background:transparent;color:#b8b8c4;font:400 24px/1 Inter,sans-serif;border-radius:6px}
.control-panel .panel-close:hover{background:#333339;color:#fff}
.control-panel .panel-heading{display:flex;justify-content:flex-end;margin-bottom:12px}
.workbench-toolbar .tool-button{min-height:38px;padding:8px 12px;font-size:13px}
.workbench-toolbar .tool-button[aria-expanded=true]{background:#38383f;color:#fff}
@media(min-width:1800px){
 body:not(.screen-preview) .workspace{display:grid;grid-template-columns:320px minmax(0,1fr) 300px;padding:24px;gap:24px}
 body:not(.screen-preview) .roster-panel{display:flex;position:static;grid-column:1;width:100%;height:100%;padding:20px;max-height:100%;box-shadow:none}
 body:not(.screen-preview) .action-panel{display:block;position:static;grid-column:3;width:100%;height:auto;padding:20px;max-height:100%;box-shadow:none}
 body:not(.screen-preview) .workspace.is-characters-collapsed{grid-template-columns:0 minmax(0,1fr) 300px}
 body:not(.screen-preview) .workspace.is-actions-collapsed{grid-template-columns:320px minmax(0,1fr) 0}
 body:not(.screen-preview) .workspace.is-characters-collapsed.is-actions-collapsed{grid-template-columns:0 minmax(0,1fr) 0}
 body:not(.screen-preview) .workspace.is-characters-collapsed .roster-panel,body:not(.screen-preview) .workspace.is-actions-collapsed .action-panel{display:none}
}
@media(min-width:701px) and (max-width:1799px){
 body:not(.screen-preview) .workspace{display:flex;padding:20px;gap:0}
 body:not(.screen-preview) .stage{width:100%;flex:1}
 body:not(.screen-preview) .roster-panel,body:not(.screen-preview) .action-panel{display:none;position:absolute;top:20px;bottom:20px;width:320px;height:auto;max-height:calc(100% - 40px);z-index:8;padding:20px;box-shadow:0 16px 48px #0009}
 body:not(.screen-preview) .roster-panel{left:20px;width:340px}
 body:not(.screen-preview) .action-panel{right:20px}
 body:not(.screen-preview) .roster-panel.is-open{display:flex}
 body:not(.screen-preview) .action-panel.is-open{display:block}
}
body:not(.screen-preview) .stage-content{height:calc(100dvh - 112px);max-height:900px}
.timeline-scrubber{display:flex;flex-direction:column;align-items:stretch;gap:12px;padding:14px 16px;max-width:none;margin-bottom:14px}
.timeline-controls{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.timeline-play{display:flex;align-items:center;justify-content:center;gap:8px;width:auto;min-width:108px;height:36px;padding:8px 12px;font:600 13px/18px Inter,sans-serif}
.timeline-play[aria-pressed=true]{background:#e6e6eb;color:#17171a}
#timeline-current{font:600 13px/20px Inter,sans-serif;color:#eeeef3;font-variant-numeric:tabular-nums}
.timeline-speed{display:flex;align-items:center;gap:8px;margin-left:auto;color:#a9a9b5;font-size:12px}
.timeline-speed select{background:#29292e;border:1px solid #42424b;border-radius:6px;color:#eeeef3;padding:6px 8px;font:500 12px/18px Inter,sans-serif}
.timeline-next{padding:8px 0;background:none;color:#d9d9e2;font:500 12px/18px Inter,sans-serif;white-space:nowrap}
.timeline-next:focus-visible,.timeline-day:focus-visible{outline:2px solid #c3c3cc;outline-offset:2px}
.timeline-main{display:block;flex:none}
.timeline-days{display:flex;margin:0 0 6px;gap:0}
.timeline-day{min-width:0;min-height:28px;padding:4px 0;background:transparent;color:#9797a6;text-align:left;font:500 12px/18px Inter,sans-serif;white-space:nowrap}
.timeline-day.is-current{color:#fff;font-weight:700}
.timeline-scrubber .timeline-range-wrap{height:24px}
.timeline-scrubber input[type=range]{height:24px}
.timeline-boundaries{position:relative;height:22px;margin:0 8px;pointer-events:none}
.timeline-boundary{position:absolute;top:-16px;color:#93939e;font:500 11px/15px Inter,sans-serif;white-space:nowrap}
.timeline-boundary i{display:block;width:2px;height:8px;background:#747481;margin-bottom:7px}
.timeline-boundary.is-offer-change{color:#f18e7f}
.timeline-boundary.is-offer-change i{background:#e44a38}
.timeline-explanation{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;color:#a9a9b5;font-size:11px;line-height:16px}
.timeline-status{color:#d4d4df}
.timeline-legend{display:flex;align-items:center;gap:7px}
.timeline-legend i{display:block;width:2px;height:10px;background:#e44a38}
.timeline-help{margin:0;color:#92929f;font:400 11px/16px Inter,sans-serif}
@media(max-width:700px){
 .timeline-scrubber{padding:12px;gap:10px}
 .timeline-controls{gap:8px;justify-content:space-between}
 .timeline-play{min-width:104px}
 .timeline-speed{margin-left:0}
 .timeline-next{margin-left:auto}
 .timeline-explanation{gap:6px}
 .timeline-legend{font-size:10px}
 .timeline-day{font-size:11px}
 body:not(.screen-preview) .stage-content{height:calc(100dvh - 86px)}
}

/* Compact workbench: controls share the timeline; screens keep the height. */
body:not(.screen-preview) .stage{position:relative}
body:not(.screen-preview) .stage-content{height:100%;max-height:none;margin-block:0}
body:not(.screen-preview) .workbench-toolbar{position:absolute;z-index:3;top:12px;left:50%;transform:translateX(-50%);width:100%;max-width:1082px;margin:0;padding:0 6px;pointer-events:none}
body:not(.screen-preview) .workbench-toolbar .tool-button{display:grid;place-items:center;width:28px;min-width:28px;height:32px;min-height:32px;padding:0;border:0;border-radius:4px;background:transparent;color:#9898a5;pointer-events:auto}
body:not(.screen-preview) .workbench-toolbar .tool-button:hover{background:#303036;color:#eeeef3}
.workbench-toolbar .tool-button svg{transition:transform .16s ease}
.workbench-toolbar .characters-toggle[aria-expanded=true] svg,.workbench-toolbar .actions-toggle[aria-expanded=false] svg{transform:rotate(180deg)}
.control-panel .panel-close{display:none}
.control-panel .panel-heading{display:none}
.timeline-scrubber{flex-direction:row;align-items:center;gap:12px;padding:10px 42px;margin-bottom:14px;min-height:82px}
.timeline-play{width:30px;min-width:30px;height:32px;padding:0;border:1px solid #404047;border-radius:7px;background:#29292e;color:#c6c6d0}
.timeline-play:hover:not(:disabled){background:#35353c;color:#fff}
.timeline-play[aria-pressed=true]{background:#e6e6eb;color:#17171a}
.timeline-play:disabled{opacity:.55}
.timeline-main{flex:1;min-width:0}
.timeline-summary{display:flex;align-items:baseline;gap:8px;white-space:nowrap;font:500 12px/18px Inter,sans-serif;color:#9696a3}
#timeline-current{font:600 12px/18px Inter,sans-serif;flex:none}
#timeline-offer{overflow:hidden;text-overflow:ellipsis}
.timeline-summary-separator{color:#62626f}
.timeline-scrubber .timeline-range-wrap{height:22px}
.timeline-scrubber input[type=range]{height:22px}
.timeline-boundaries{position:absolute;inset:0 8px;height:auto;margin:0;pointer-events:none}
.timeline-boundary{top:7px;pointer-events:auto}
.timeline-boundary i{height:8px;margin:0}
.timeline-days{margin:0}
.timeline-day{min-height:18px;padding:0;font:500 10px/18px Inter,sans-serif}
@media(max-width:1799px){
 .control-panel .panel-close{display:grid;place-items:center}
 .roster-panel .panel-close svg{transform:rotate(180deg)}
 .action-panel .panel-heading{display:flex}
}
@media(max-width:980px){
 body:not(.screen-preview) .workbench-toolbar{max-width:420px}
}
@media(max-width:700px){
 .timeline-scrubber{padding:10px 32px;gap:6px;min-height:82px}
 body:not(.screen-preview) .workbench-toolbar{padding-inline:2px}
 .timeline-summary{gap:5px;font-size:10px}
 #timeline-current{font-size:10px}
 .timeline-play{min-width:24px;width:24px}
}
@media(prefers-reduced-motion:reduce){.workbench-toolbar .tool-button svg{transition:none}}

/* Panel toggles belong to their panels, including the collapsed rail. */
body:not(.screen-preview) .control-panel .panel-close,.panel-reopen{display:grid;place-items:center;width:28px;min-width:28px;height:32px;min-height:32px;padding:0;border:0;border-radius:4px;background:transparent;color:#9898a5}
body:not(.screen-preview) .control-panel .panel-close:hover,.panel-reopen:hover{background:#303036;color:#eeeef3}
.panel-close svg,.panel-reopen svg{transition:transform .16s ease}
.roster-panel .panel-close svg,.actions-rail .panel-reopen svg{transform:rotate(180deg)}
.action-panel .panel-close svg,.roster-rail .panel-reopen svg{transform:none}
body:not(.screen-preview) .action-panel .panel-heading{display:flex;position:absolute;left:4px;top:25px;margin:0}
.action-panel .system-actions{margin-left:16px}
.panel-rail{display:flex;justify-content:center;align-items:flex-start;padding-top:20px;height:100%;background:#1c1c20;border-radius:10px}
.roster-rail{grid-column:1}
.actions-rail{grid-column:3}
@media(min-width:1800px){
 body:not(.screen-preview) .action-panel{position:relative}
 body:not(.screen-preview) .workspace.is-characters-collapsed{grid-template-columns:36px minmax(0,1fr) 300px}
 body:not(.screen-preview) .workspace.is-actions-collapsed{grid-template-columns:320px minmax(0,1fr) 36px}
 body:not(.screen-preview) .workspace.is-characters-collapsed.is-actions-collapsed{grid-template-columns:36px minmax(0,1fr) 36px}
}
@media(max-width:1799px){
 .panel-rail{position:fixed;top:50%;height:44px;width:28px;padding:6px 0;z-index:7;border-radius:0 6px 6px 0;box-shadow:0 2px 10px #0005}
 .roster-rail{left:0}
 .actions-rail{right:0;border-radius:6px 0 0 6px}
}
body:not(.screen-preview) .roster-panel .actor-option.selected,.scenario-button.is-current{background:#303036;border-color:transparent;box-shadow:inset 0 0 0 1px #48484f}
.timeline-scrubber{min-height:62px;padding:10px 16px}
#timeline-offer{color:#e98376}
.phone .base-button .control-icon{width:24px;height:24px;color:var(--text-primary)}
.phone .button-catalog-icon{width:24px;height:24px;color:inherit}
@media(prefers-reduced-motion:reduce){.panel-close svg,.panel-reopen svg{transition:none}}

/* Fixed workbench panels; navigation does not belong in Telegram chrome. */
body:not(.screen-preview) .workspace{display:grid;grid-template-columns:320px minmax(0,1fr) 300px;padding:24px;gap:24px}
body:not(.screen-preview) .roster-panel{display:flex;position:static;width:100%;height:100%;max-height:100%;box-shadow:none}
body:not(.screen-preview) .action-panel{display:block;position:static;width:100%;height:auto;max-height:100%;box-shadow:none}
.action-panel .system-actions{margin-left:0}
.phone .mini-app-header{border-bottom:1px solid rgb(215 170 160 / 12%)}
.phone>.mini-app-rail{border-top:1px solid rgb(215 170 160 / 12%)}
@media(min-width:1101px) and (max-width:1799px){
 body:not(.screen-preview) .workspace{grid-template-columns:260px minmax(0,1fr) 260px;padding:20px;gap:16px}
}
@media(max-width:1100px){
 body:not(.screen-preview) .workspace{display:flex;flex-direction:column;overflow:auto;padding:16px;gap:16px;align-items:stretch}
 body:not(.screen-preview) .roster-panel{flex:none;height:260px;max-height:none}
 body:not(.screen-preview) .stage{flex:none;width:100%;height:900px;min-height:600px}
 body:not(.screen-preview) .action-panel{flex:none;max-height:none}
}

/* Keep the switcher above the right rail; the rail itself starts just below it. */
body:not(.screen-preview) .action-panel{padding-top:20px}
@media(min-width:1800px){body:not(.screen-preview) .action-panel{max-height:calc(100% - 64px)}}
@media(max-width:1100px){body:not(.screen-preview) .workspace{padding-top:72px}body:not(.screen-preview) .action-panel{padding-top:20px}}


/* Calendar ticks stay on the track; deadlines share a separate, readable row. */
.timeline-scrubber .timeline-range-wrap{margin-bottom:20px}
.timeline-boundary small{position:absolute;top:14px;left:0;transform:translateX(-50%);white-space:nowrap;font-size:10px;line-height:14px;color:#a4a4ad}
.timeline-boundary.is-final i{width:9px;height:9px;border-radius:50%;background:#e7433b;transform:translate(-4px,-1px)}
.timeline-boundary.is-admission i{background:#e7433b}
.timeline-boundary.is-final small,.timeline-boundary.is-admission small{display:none}
.timeline-scrubber input[type=range]:focus{outline:none}
.timeline-scrubber input[type=range]:focus-visible{outline:2px solid #e7433b;outline-offset:3px;border-radius:6px}
