/* Shared layout and controls */
:root {
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:#182638;
  background:#f5f7fa;
  font-synthesis:none;
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
}

button,input,select,textarea {
  font:inherit;
}

button,select,input[type=number] {
  min-height:40px;
}

button {
  border:1px solid #b9c8d6;
  border-radius:8px;
  background:#fff;
  color:#182638;
  padding:7px 12px;
  cursor:pointer;
  font-weight:600;
}

button:hover {
  border-color:#b94300;
}

button:disabled {
  opacity:.55;
  cursor:not-allowed;
}

button:focus-visible,select:focus-visible,input:focus-visible,textarea:focus-visible {
  outline:3px solid #b94300;
  outline-offset:2px;
}

.primary {
  background:#b94300;
  border-color:#b94300;
  color:#fff;
}

.primary:hover {
  background:#983800;
  color:#fff;
}

.muted {
  color:#526277;
}

.eyebrow {
  font-size:11px;
  letter-spacing:.11em;
  font-weight:800;
  color:#526277;
}

.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

.masthead {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:10px max(24px,calc((100vw - 1480px)/2));
  background:#fff;
  border-bottom:1px solid #dbe2e9;
}

.brand {
  display:flex;
  align-items:center;
  gap:11px;
}

.brand img {
  object-fit:contain;
}

.brand span {
  font-size:10px;
  letter-spacing:.16em;
  font-weight:800;
  color:#526277;
}

.mast-actions {
  display:flex;
  align-items:center;
  gap:10px;
}

.mast-actions label {
  font-size:12px;
}

.identity {
  font-size:13px;
  color:#182638;
  max-width:230px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.account-menu { position:relative; }
.account-menu summary { display:flex; align-items:center; gap:8px; min-height:40px; padding:3px 8px; border:1px solid #dbe2e9; border-radius:9px; cursor:pointer; list-style:none; }
.account-menu summary::-webkit-details-marker { display:none; }
.account-menu summary:focus-visible { outline:3px solid #b94300; outline-offset:2px; }
.account-avatar { display:grid; place-items:center; width:28px; height:28px; border-radius:50%; background:#e7eef5; color:#526277; font-size:12px; }
.account-panel { position:absolute; right:0; top:calc(100% + 7px); z-index:10; display:grid; gap:8px; width:min(320px,calc(100vw - 20px)); padding:16px; border:1px solid #cbd6df; border-radius:12px; background:#fff; box-shadow:0 12px 30px #18263824; overflow-wrap:anywhere; }
.account-panel strong { font-size:12px; color:#526277; }
.account-name { font-weight:700; }
.account-subject { font-size:11px; color:#526277; }
.account-panel label { display:grid; gap:4px; }
.account-panel select { margin:0; }
.account-panel button { width:100%; }

.mast-actions select {
  margin-left:5px;
}

main {
  max-width:1480px;
  margin:auto;
  padding:16px 24px;
}

.task-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  margin-bottom:0;
  padding:16px 18px;
  background:#fff;
  border:1px solid #dbe2e9;
  border-bottom:0;
  border-radius:12px 12px 0 0;
}

.task-heading h1 {
  font-family:"Avenir Next Condensed","Arial Narrow",system-ui,sans-serif;
  font-size:34px;
  margin:3px 0 1px;
  line-height:1.1;
}

.task-heading p {
  margin:3px 0;
}

.task-heading-actions {
  display:flex;
  gap:8px;
  align-items:center;
}

.task-heading-actions label {
  font-size:12px;
}

.task-heading-actions select {
  display:block;
  max-width:270px;
}

.status-strip {
  display:flex;
  gap:12px 28px;
  flex-wrap:wrap;
  font-size:12px;
  font-weight:600;
  padding:10px 18px;
  background:#eef3f7;
  border:1px solid #dbe2e9;
  border-radius:0 0 12px 12px;
  margin-bottom:12px;
}

.queue-message { padding:22px; border:1px solid #dbe2e9; border-radius:10px; background:#fff; color:#314259; font-size:16px; }
.no-clip .task-heading-actions,.no-clip .workspace,.no-clip .actions,.no-clip .history,.no-clip .readiness,.no-clip footer { display:none; }

.task-status { display:flex; align-items:baseline; gap:8px; min-width:0; }
.task-status-label { color:#596b82; font-weight:500; white-space:nowrap; }
.task-heading-copy { min-width:0; border-left:3px solid #ed6500; padding-left:12px; }
.task-heading #task-caption { font-size:13px; margin-top:6px; overflow-wrap:anywhere; }
.task-heading-actions { flex-shrink:0; }
.task-heading-actions select,.task-heading-actions button { min-height:42px; }

.workspace {
  display:grid;
  grid-template-columns:minmax(315px,380px) minmax(0,1fr);
  gap:14px;
  align-items:stretch;
}

.left-column {
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:14px;
}

.panel {
  background:#fff;
  border:1px solid #dbe2e9;
  border-radius:12px;
  padding:17px;
  box-shadow:0 2px 6px #18263808;
  min-width:0;
}

.panel-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:9px;
}

.panel-heading h2 {
  margin:3px 0 0;
  font-family:"Avenir Next Condensed","Arial Narrow",system-ui,sans-serif;
  font-size:22px;
}

.panel-heading .eyebrow {
  font-size:10px;
}

.transport {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
  margin:18px 0 12px;
}

.transport .play {
  width:45px;
  height:45px;
  font-size:19px;
  background:#b94300;
  color:#fff;
  border:0;
}

.transport label {
  display:flex;
  align-items:center;
  gap:5px;
  font-size:11px;
}

.transport select {
  max-width:75px;
}

.clock {
  font:12px ui-monospace,SFMono-Regular,Menlo,monospace;
  margin-left:auto;
}

#seek {
  width:100%;
  accent-color:#b94300;
}

.span-fields {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:7px;
  margin-top:12px;
}

.span-fields label {
  font-size:11px;
  color:#526277;
}

.span-fields input {
  display:block;
  width:100%;
  padding:6px;
  border:1px solid #b9c8d6;
  border-radius:7px;
}

.span-fields button {
  font-size:11px;
}

.listening p {
  font-size:11px;
  margin:12px 0 0;
}

.notes {
  flex:1;
  overflow:auto;
  min-height:150px;
}

.notes-list {
  max-height:195px;
  overflow-y:auto;
}

.notes-list p {
  font-size:12px;
}

.note-item {
  border-bottom:1px solid #e8edf2;
  padding:8px 0;
  font-size:12px;
}

.note-item strong {
  display:block;
}

.note-item span {
  color:#526277;
}

.notes form {
  display:grid;
  gap:8px;
  margin-top:9px;
}

.notes form label {
  font-size:11px;
}

.notes form input {
  display:block;
  width:100%;
  margin-top:4px;
  padding:7px;
  border:1px solid #b9c8d6;
  border-radius:7px;
}
.notes form select { display:block; width:100%; margin-top:4px; }

.editor {
  display:flex;
  flex-direction:column;
  min-height:510px;
}

.editor .panel-heading button {
  font-size:11px;
}

.guide {
  background:#fff5ed;
  border-left:3px solid #b94300;
  padding:10px;
  font-size:12px;
  line-height:1.5;
}

.model {
  margin:13px 0;
  padding:12px;
  background:#edf3f8;
  border-radius:9px;
}

.model>div {
  display:flex;
  gap:10px;
  align-items:baseline;
}

.model strong {
  font-size:12px;
}

.model span,.model small {
  font-size:10px;
  color:#526277;
}

.model p {
  font-size:13px;
  line-height:1.5;
  margin:5px 0;
  max-height:60px;
  overflow-y:auto;
}

.editor textarea {
  flex:1;
  min-height:180px;
  width:100%;
  resize:vertical;
  border:0;
  border-top:1px solid #e0e7ee;
  border-bottom:1px solid #e0e7ee;
  padding:18px 3px;
  font-size:22px;
  line-height:1.7;
  color:#182638;
}

.editor-controls {
  display:flex;
  gap:9px;
  flex-wrap:wrap;
  align-items:end;
  margin-top:12px;
}

.editor-controls label {
  font-size:11px;
  color:#526277;
}

.editor-controls select {
  display:block;
  max-width:190px;
  margin-top:4px;
}

.actions {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-top:14px;
  flex-wrap:wrap;
}

.listen-check {
  display:flex;
  align-items:center;
  gap:9px;
  font-size:12px;
  min-width:220px;
}

.listen-check input {
  width:20px;
  height:20px;
  accent-color:#b94300;
}

.button-row {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.actions>p {
  flex-basis:100%;
  margin:0;
  font-size:11px;
}

.history {
  margin-top:14px;
}

.history ol {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  padding-left:18px;
  margin-bottom:0;
}

.history li {
  font-size:12px;
  min-width:190px;
}

.conflict {
  margin-top:14px;
  border-color:#b94300;
}

.conflict-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.conflict-grid pre {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  background:#f5f7fa;
  border:1px solid #dbe2e9;
  border-radius:8px;
  padding:12px;
  max-height:230px;
  overflow-y:auto;
}

.conflict h3 {
  font-size:13px;
}

.conflict .button-row {
  margin-top:10px;
}

footer {
  padding:20px 0 8px;
  font-size:11px;
  color:#526277;
}

[hidden] {
  display:none!important;
}

.waveform-track { position:relative; margin-top:4px; cursor:pointer; touch-action:pan-y; }
.waveform-playhead { position:absolute; top:0; bottom:0; left:0; width:2px; background:#b94300; pointer-events:none; }
.waveform {
  display:block;
  width:100%;
  height:48px;
  background:#edf3f8;
  border-radius:7px;
}

.span-toggle {
  margin-top:7px;
  width:100%;
  text-align:left;
  background:#f5f7fa;
}

.model summary,.history summary {
  cursor:pointer;
  font-weight:700;
  font-size:12px;
}

.model[open] summary {
  margin-bottom:8px;
}

.history {
  margin-top:10px;
}
.history h2 { margin:0 0 4px; font-size:16px; }
.history p { margin:0 0 8px; font-size:12px; }
.history ol { margin:0; padding-left:22px; max-height:180px; overflow-y:auto; }
.history li { padding:4px 0; font-size:12px; }
.history li strong,.history li span { display:block; }
.history li span { color:#526277; }
.history #history-more { margin-top:8px; }

.history summary {
  min-height:25px;
}

.listening .transport {
  margin:10px 0 7px;
}

.candidate-banner {
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin:9px 0;
  padding:8px 10px;
  border-radius:8px;
  background:#fff5ed;
  border:1px solid #eec3a7;
  font-size:12px;
}

.candidate-banner strong {
  margin-right:4px;
}

.candidate-banner span {
  color:#526277;
}

.candidate-banner button {
  min-height:34px;
  margin-left:auto;
}

.readiness {
  margin-top:8px;
  padding:8px 13px;
  font-size:12px;
}

.readiness summary {
  cursor:pointer;
  font-weight:700;
}

.readiness button {
  margin:8px 8px 2px 0;
}

.readiness #readiness-result {
  display:inline;
  color:#526277;
}

.note-actions {
  display:flex;
  gap:5px;
  flex-wrap:wrap;
  margin-top:5px;
}

.note-actions button {
  min-height:32px;
  padding:3px 7px;
  font-size:11px;
}

/* Responsive workspaces */
@media(max-height:690px) and (min-width:881px) {
  .workspace {
    grid-template-columns:minmax(280px,340px) minmax(0,1fr);
  }
  .model p {
    max-height:38px;
  }
  .notes-list {
    max-height:100px;
  }
}

@media(min-width:881px) {
  body {
    height:100dvh;
    overflow:hidden;
  }
  .masthead {
    height:53px;
  }
  main {
    height:calc(100dvh - 53px);
    display:flex;
    flex-direction:column;
    min-height:0;
    padding-top:10px;
    padding-bottom:8px;
  }
  .task-heading {
    flex:0 0 auto;
    margin-bottom:7px;
  }
  .task-heading h1 {
    font-size:29px;
  }
  .status-strip {
    flex:0 0 auto;
    margin-bottom:8px;
  }
  .workspace {
    flex:1;
    min-height:0;
  }
  .left-column {
    min-height:0;
  }
  .listening {
    flex:0 0 auto;
    overflow-y:auto;
    max-height:none;
  }
  .notes {
    min-height:0;
    overflow-y:auto;
  }
  .editor {
    min-height:0;
    overflow:hidden;
  }
  .editor textarea {
    min-height:0;
    resize:none;
    overflow-y:auto;
  }
  .actions {
    flex:0 0 auto;
    margin-top:8px;
    padding:10px 13px;
  }
  .history {
    flex:0 0 auto;
    padding:8px 13px;
    max-height:190px;
    overflow-y:auto;
  }
  footer {
    flex:0 0 auto;
    padding:5px 0 0;
  }
  body:has(.readiness[open],.history[open],.notes #note-form:not([hidden]),.conflict:not([hidden]),.span-fields:not([hidden]),.model[open],.guide:not([hidden])) {
    height:auto;
    overflow-y:auto;
  }
  body:has(.readiness[open],.history[open],.notes #note-form:not([hidden]),.conflict:not([hidden]),.span-fields:not([hidden]),.model[open],.guide:not([hidden])) main {
    height:auto;
    min-height:calc(100dvh - 53px);
  }
  body:has(.readiness[open],.history[open],.notes #note-form:not([hidden]),.conflict:not([hidden]),.span-fields:not([hidden]),.model[open],.guide:not([hidden])) .workspace {
    flex:none;
    min-height:470px;
  }
  body:has(.readiness[open],.history[open],.notes #note-form:not([hidden]),.conflict:not([hidden]),.span-fields:not([hidden]),.model[open],.guide:not([hidden])) .notes {
    overflow:visible;
  }
  body:has(.readiness[open],.history[open],.notes #note-form:not([hidden]),.conflict:not([hidden]),.span-fields:not([hidden]),.model[open],.guide:not([hidden])) .notes-list {
    max-height:none;
  }
  body:has(.readiness[open],.history[open],.notes #note-form:not([hidden]),.conflict:not([hidden]),.span-fields:not([hidden]),.model[open],.guide:not([hidden])) .editor textarea {
    min-height:240px;
  }
  body:has(main.long-clip) { height:auto; overflow-y:auto; }
  main.long-clip { height:auto; min-height:calc(100dvh - 53px); }
  main.long-clip .workspace { flex:none; min-height:620px; }
  main.long-clip .editor textarea { min-height:350px; resize:vertical; }
}

@media(min-width:881px) and (max-height:800px) {
  body { height:auto; min-height:100dvh; overflow-y:auto; }
  main { height:auto; min-height:calc(100dvh - 53px); }
  .workspace { flex:none; min-height:470px; }
  .notes { min-height:120px; overflow:visible; }
  .editor textarea { min-height:240px; }
}

@media(max-width:880px) {
  .workspace {
    grid-template-columns:1fr;
  }
  .left-column {
    display:contents;
  }
  .listening {
    order:1;
  }
  .editor {
    min-height:420px;
    order:2;
  }
  .notes {
    order:3;
  }
  .task-heading h1 {
    font-size:30px;
  }
  .waveform {
    height:38px;
  }
  .span-fields {
    grid-template-columns:1fr 1fr;
  }
  .notes-list {
    display:none;
  }
  .notes.is-open .notes-list {
    display:block;
  }
  .editor .model {
    padding:8px 10px;
  }
  .editor textarea {
    margin-top:6px;
  }
}

@media(max-width:600px) {
  main {
    padding:8px 10px;
  }
  .masthead {
    gap:8px;
    min-height:48px;
    padding:5px 10px;
    flex-wrap:nowrap;
  }
  .mast-actions {
    justify-content:space-between;
    width:auto;
    gap:5px;
  }
  .task-heading {
    align-items:start;
    flex-direction:column;
    gap:5px;
    margin-bottom:7px;
  }
  .task-heading-actions {
    width:100%;
  }
  .task-heading-actions label {
    flex:1;
  }
  .task-heading-actions select {
    max-width:none;
    width:100%;
    min-height:34px;
  }
  .panel {
    padding:9px;
  }
  .editor {
    min-height:320px;
  }
  .editor textarea {
    font-size:19px;
    min-height:205px;
    padding:10px 2px;
    margin-top:2px;
  }
  .model p {
    max-height:42px;
  }
  .actions {
    align-items:stretch;
    margin-top:9px;
  }
  .actions .button-row {
    width:100%;
  }
  .actions .button-row button {
    flex:1;
  }
  .conflict-grid {
    grid-template-columns:1fr;
  }
  .transport button {
    min-height:35px;
    padding:5px 6px;
    font-size:11px;
  }
  .span-fields button {
    min-height:44px;
  }
  .listening .panel-heading h2 {
    font-size:17px;
  }
  .listening .panel-heading {
    align-items:baseline;
  }
  .listening .transport {
    margin:4px 0 2px;
    flex-wrap:nowrap;
    gap:4px;
  }
  .listening .waveform {
    height:20px;
  }
  .listening .waveform-track { margin-top:2px; }
  .listening p {
    margin:3px 0 0;
    line-height:1.3;
    font-size:10px;
  }
  .span-toggle {
    margin-top:1px;
    min-height:27px;
    padding:2px 7px;
    font-size:11px;
  }
  .editor .model {
    margin:4px 0;
    padding:5px 8px;
  }
  .editor .panel-heading h2 {
    font-size:19px;
  }
  .notes {
    min-height:0;
  }
  .notes .panel-heading h2 {
    font-size:18px;
  }
  .task-heading h1 {
    font-size:23px;
    margin:0;
    line-height:1.1;
  }
  .task-heading .eyebrow {
    font-size:9px;
  }
  .status-strip {
    gap:2px 8px;
    font-size:10px;
    line-height:1.2;
    padding:6px 8px;
    margin-bottom:7px;
  }
  .candidate-banner {
    font-size:11px;
    margin:4px 0;
    padding:5px 7px;
    gap:3px;
  }
  .candidate-banner button {
    width:auto;
    margin:0 0 0 auto;
    min-height:29px;
    padding:3px 6px;
  }
  .brand img {
    width:100px;
    height:27px;
  }
  .brand span {
    display:none;
  }
  .mast-actions .identity { max-width:120px; font-size:11px; }
  .account-menu summary { gap:5px; padding:3px 5px; }
  .account-avatar { width:24px; height:24px; }
  .mast-actions label {
    white-space:nowrap;
    font-size:10px;
  }
  .mast-actions select {
    min-height:34px;
    margin-left:2px;
  }
  .task-heading .eyebrow {
    display:none;
  }
  .task-heading-actions button {
    min-height:34px;
  }
  .workspace {
    gap:8px;
  }
  .panel-heading h2 {
    margin:0;
    font-size:17px;
  }
  .listening .panel-heading .eyebrow {
    display:none;
  }
  .transport .play {
    width:39px;
    height:39px;
    min-width:39px;
    min-height:39px;
  }
  .clock {
    font-size:10px;
    margin-left:auto;
  }
  .transport label {
    font-size:0;
  }
  .transport select {
    min-height:35px;
    width:78px;
    max-width:78px;
    padding:3px;
    font-size:12px;
  }
  .listening #seek {
    height:17px;
  }
  .editor .panel-heading .eyebrow {
    display:none;
  }
  .editor .panel-heading button {
    min-height:34px;
    padding:3px 7px;
  }
  .candidate-banner span {
    display:none;
  }
}

@media(max-height:520px) and (min-width:601px) {
  body {
    height:auto;
    overflow-y:auto;
  }
  main {
    height:auto;
    min-height:100vh;
  }
  .workspace {
    min-height:390px;
  }
  .editor textarea {
    min-height:180px;
    overflow:auto;
  }
  .actions {
    position:static;
  }
}

@media(prefers-reduced-motion:reduce) {
  *,*:before,*:after {
    scroll-behavior:auto!important;
    transition:none!important;
  }
}

/* The workspace remains hidden until a scoped identity is available. */
.login-gate {
  min-height: calc(100svh - 90px);
  display: grid;
  place-items: center;
  padding: 28px 20px;
}
.login-card {
  width: min(100%, 440px);
  padding: clamp(24px, 5vw, 40px);
  background: #fff;
  border: 1px solid #dce3eb;
  border-radius: 16px;
  box-shadow: 0 12px 40px #18263808;
}
.login-card h1 { font-size: clamp(26px, 5vw, 32px); line-height: 1.2; margin: 12px 0; }
.login-card p { line-height: 1.6; }
.login-card button { width: 100%; min-height: 48px; margin-top: 16px; }
.login-card .login-help { border-top: 1px solid #e7ebef; padding-top: 16px; margin-top: 24px; font-size: 13px; color: #526477; }
.login-card #login-status { min-height: 24px; font-size: 13px; }
.login-gate[hidden] { display: none; }

.waveform-span { position:absolute; top:0; bottom:0; background:#ff8a0040; border-left:2px solid #b94300; border-right:2px solid #b94300; pointer-events:none; }
.waveform-span.is-looping { background:#ff8a0060; }
#loop[aria-pressed="true"] { background:#b94300; color:white; }

#save-feedback { flex-basis:100%; margin:6px 0; padding:10px 12px; background:#eaf5ef; border:1px solid #9ebfaa; border-radius:7px; color:#155c40; font-weight:600; }

.save-celebration { position:fixed; z-index:30; top:72px; left:50%; transform:translateX(-50%); display:flex; align-items:center; gap:12px; width:max-content; max-width:calc(100vw - 24px); padding:16px 22px; border:1px solid #9dc8ae; border-radius:14px; background:#f0fff5; box-shadow:0 8px 30px #16472c30; color:#165c36; animation:save-pop .18s ease-out; pointer-events:none; }
.save-celebration strong,.save-celebration span { display:block; }
.save-celebration strong { font-size:20px; }
.save-celebration #celebration-detail { font-size:13px; margin-top:3px; }
.celebration-check { font-size:30px; width:44px; height:44px; text-align:center; background:#1a7843; color:white; border-radius:50%; }
@keyframes save-pop { from { opacity:0; transform:translate(-50%,-10px) scale(.94); } to { opacity:1; transform:translate(-50%,0) scale(1); } }
@media(prefers-reduced-motion:reduce) { .save-celebration { animation:none; } }

/* Keep assignment and save/review status readable in the compact workspace. */
@media (max-width:700px) {
  .task-heading { padding:12px; gap:12px; margin-bottom:0; }
  .task-heading #task-caption { font-size:12px; }
  .task-heading-actions { gap:8px; }
  .task-heading-actions select,.task-heading-actions button { min-height:44px; }
  .status-strip { padding:10px 12px; gap:6px; font-size:12px; line-height:1.4; }
  .task-status { width:100%; align-items:baseline; }
  .task-status-label { flex:0 0 74px; }
}

.task-heading { margin-bottom:0; }
.task-heading-actions select { border:1px solid #bdcddd; border-radius:8px; background:#f5f7fa; color:#1d2b3e; padding:8px 30px 8px 12px; font:inherit; font-size:13px; }

/* Shared select surface keeps form controls familiar and keyboard native. */
select:not([hidden]) {
  appearance:none;
  border:1px solid #bdcddd;
  border-radius:9px;
  background-color:#f5f7fa;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='m3 5 4 4 4-4' fill='none' stroke='%2352677b' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 10px center;
  color:#1d2b3e;
  padding:7px 30px 7px 11px;
  cursor:pointer;
}
select:not([hidden]):hover { border-color:#9eafc0; background-color:#fff; }
select:not([hidden]):focus-visible { outline:3px solid #b94300; outline-offset:2px; }

.clip-picker { position:relative; width:min(270px,40vw); }
.clip-picker summary { list-style:none; display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:46px; padding:6px 12px; border:1px solid #bdcddd; border-radius:9px; background:#f5f7fa; cursor:pointer; }
.clip-picker summary::-webkit-details-marker { display:none; }
.clip-picker summary:hover,.clip-picker[open] summary { border-color:#a7b7c7; background:#fff; }
.clip-picker summary:focus-visible { outline:3px solid #b94300; outline-offset:2px; }
.picker-trigger-copy { display:grid; min-width:0; line-height:1.25; }
.picker-trigger-copy strong { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:13px; }
.picker-trigger-copy small { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; color:#526277; font-size:11px; }
.picker-chevron { color:#526277; font-size:21px; line-height:1; transition:transform .16s ease; }
.clip-picker[open] .picker-chevron { transform:rotate(180deg); }
.picker-menu { position:absolute; z-index:20; top:calc(100% + 7px); right:0; width:min(340px,calc(100vw - 24px)); max-height:min(58vh,460px); overflow-y:auto; overscroll-behavior:contain; padding:7px; border:1px solid #cbd6df; border-radius:12px; background:#fff; box-shadow:0 16px 40px #18263826; animation:picker-enter .15s ease-out; }
.picker-group + .picker-group { border-top:1px solid #e7ecf1; margin-top:7px; padding-top:7px; }
.picker-group-title { display:block; padding:5px 8px; color:#526277; font-size:10px; letter-spacing:.06em; text-transform:uppercase; }
.picker-choice { display:flex; width:100%; min-height:48px; align-items:center; justify-content:space-between; gap:12px; border:0; border-radius:7px; padding:8px; text-align:left; font-weight:500; }
.picker-choice strong { flex:none; font-size:13px; }
.picker-choice small { color:#526277; font-size:11px; text-align:right; }
.picker-choice:hover,.picker-choice:focus-visible { background:#eef3f7; }
.picker-choice[aria-current="true"] { background:#fff0e8; color:#983800; }
@keyframes picker-enter { from { opacity:0; transform:translateY(-5px); } to { opacity:1; transform:translateY(0); } }
@media(max-width:700px) {
  .task-heading-actions .clip-picker { width:auto; min-width:0; flex:1; }
  .task-heading-actions .clip-picker summary { min-height:48px; }
  .picker-menu { left:0; right:auto; width:min(340px,calc(100vw - 24px)); }
}
@media(prefers-reduced-motion:reduce) { .picker-menu { animation:none; } .picker-chevron { transition:none; } }
