/* Passo 365 — Coreografias (Pedagógico). Porta do protótipo "Passo Choreo"
   (claude.ai/design). Só tokens do style.css: o tema escuro vem de graça.
   O PALCO é a exceção, como a folha do Simulados: fica sempre azul-noite
   (#1A2C4D), nos dois temas, porque as cores dos participantes foram
   escolhidas pra contrastar com ele. */

.co { color: var(--ink); font-size: 14px; line-height: 1.5; }
.co h1, .co h3 { margin: 0; line-height: 1.25; }
.co h1 { font-weight: 700; font-size: 26px; letter-spacing: -.01em; }
.co h3 { font-size: 16px; font-weight: 600; }
.co-sub { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); max-width: 620px; }
.co-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.co-grow { flex: 1; }
.co-carregando { padding: 40px 0; color: var(--ink-3); }

/* ---------------- Botões ---------------- */
.co-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 16px; border: none; border-radius: var(--r-pill); background: var(--bg-input); color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background var(--ease), color var(--ease); }
.co-btn:hover { background: var(--accent-tint); color: var(--accent-ink); }
.co-btn:disabled { opacity: .45; cursor: not-allowed; }
.co-btn--sm { min-height: 30px; padding: 0 12px; }
.co-btn--primary { background: var(--primary); color: var(--on-primary); font-weight: 600; }
.co-btn--primary:hover { background: var(--primary-hover); color: var(--on-primary); }
.co-btn--danger { background: transparent; color: var(--danger); font-weight: 600; }
.co-btn--danger:hover { background: var(--danger-tint); color: var(--danger-ink); }
.co-btn--danger-fill { background: var(--danger-tint); color: var(--danger-ink); font-weight: 600; }
.co-ico { width: 40px; height: 40px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: 50%; background: transparent; color: var(--ink-2); cursor: pointer; text-decoration: none; transition: background var(--ease); }
.co-ico:hover { background: var(--bg-input); color: var(--ink); }
.co-ico--sm { width: 32px; height: 32px; font-size: 18px; }
.co-ico--danger { color: var(--danger); }
.co-ico--danger:hover { background: var(--danger-tint); color: var(--danger-ink); }
.co-link { align-self: flex-start; border: none; background: none; padding: 4px 0; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.co-link--danger { color: var(--danger); }
.co-chip { display: inline-flex; align-items: center; gap: 7px; flex: none; border: none; border-radius: var(--r-pill); padding: 9px 14px; background: var(--bg-input); color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.co-chip.on { background: var(--accent-tint); color: var(--accent-ink); }
.co-self-start { align-self: flex-start; }
.co-num { width: 28px; height: 28px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #14233F; font-size: 13px; font-weight: 700; }
.co-num--lg { width: 40px; height: 40px; font-size: 17px; }
.co-num--sm { width: 24px; height: 24px; font-size: 12px; }
.co-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 500; padding: 10px 18px; border-radius: var(--r-pop); box-shadow: var(--shadow-pop); z-index: 600; max-width: min(90vw, 520px); text-align: center; }

/* ---------------- Lista ---------------- */
.co-inicio { max-width: 980px; display: flex; flex-direction: column; gap: 28px; }
.co-inicio__head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.co-inicio__titulo { flex: 1; min-width: 240px; }
.co-inicio__acoes { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.co-busca { display: flex; align-items: center; gap: 8px; width: 260px; max-width: 100%; padding: 0 14px; border-radius: var(--r-pill); background: var(--bg-input); color: var(--ink-3); }
.co-busca input { flex: 1; min-width: 0; border: none; background: transparent; padding: 10px 0; font: inherit; font-size: 14px; color: var(--ink); outline: none; }
.co-card { background: var(--surface); border-radius: var(--r-card); padding: 8px 0; }
.co-card__count { padding: 10px 24px 6px; }
.co-item { display: flex; align-items: center; gap: 16px; padding: 12px 24px; cursor: pointer; transition: background var(--ease); }
.co-item:hover { background: var(--surface-2); }
.co-thumb { width: 100px; height: 60px; flex: none; border-radius: var(--r-item); background: #1A2C4D; display: block; }
.co-item__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.co-item__txt b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-item__txt span { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-item__acoes, .co-item__confirm { display: flex; align-items: center; gap: 6px; flex: none; }
.co-item__confirm span { font-size: 13px; color: var(--ink-2); }
.co-sem-resultado { margin: 0; padding: 24px; font-size: 13px; color: var(--ink-3); }
.co-vazio { background: var(--surface); border-radius: var(--r-card); padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.co-vazio b { font-size: 16px; font-weight: 600; }
.co-vazio p { margin: 0; font-size: 13px; color: var(--ink-2); max-width: 380px; }
.co-vazio__ic { width: 56px; height: 56px; border-radius: 50%; background: var(--accent-tint); display: flex; align-items: center; justify-content: center; }
.co-vazio__ic i { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); }
.co-vazio__acoes { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
@media (max-width: 640px) { .co-item { flex-wrap: wrap; padding: 12px 16px; } .co-item__acoes, .co-item__confirm { width: 100%; justify-content: flex-end; } }

/* ---------------- Editor ---------------- */
/* O editor ocupa a janela inteira: o conteúdo perde o limite de largura e o
   respiro do padrão (classe posta em #p365-content por coMontar). */
.p365-content.co-cheio { max-width: none; padding: 12px; }
.co-editor { display: flex; flex-direction: column; gap: 12px; height: calc(100vh - 62px - 24px); min-height: 640px; user-select: none; -webkit-user-select: none; }
.co-editor input { user-select: text; -webkit-user-select: text; }
.co-topo { flex: none; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 56px; padding: 6px 12px; background: var(--surface); border-radius: var(--r-card-sm); }
.co-marca { display: flex; align-items: center; gap: 10px; flex: none; }
.co-marca b { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.co-marca__q { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); display: flex; align-items: center; justify-content: center; }
.co-marca__q i { width: 11px; height: 11px; border-radius: 50%; background: var(--brand-yellow); }
.co-nome { flex: 0 1 260px; min-width: 120px; border: none; border-radius: var(--r-pill); padding: 9px 16px; background: var(--bg-input); color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; outline: none; }
.co-nome:disabled { opacity: .8; }
.co-salvo { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.co-salvo.erro { color: var(--danger); font-weight: 600; }

.co-corpo { flex: 1 1 auto; min-height: 320px; display: flex; gap: 12px; }
.co-ferramentas { width: 76px; flex: none; background: var(--surface); border-radius: var(--r-card); padding: 8px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.co-ferramentas button { height: 62px; flex: none; border: none; border-radius: 14px; background: transparent; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; font: inherit; font-size: 11px; font-weight: 600; line-height: 1.15; text-align: center; cursor: pointer; transition: background var(--ease); }
.co-ferramentas button:hover { background: var(--bg-input); }
.co-ferramentas button.on { background: var(--accent-tint); color: var(--accent-ink); }
.co-ferramentas hr { width: calc(100% - 12px); border: none; border-top: 1px solid var(--line); margin: 6px; }

.co-palco-wrap { position: relative; flex: 1; min-width: 0; background: #14233F; border-radius: var(--r-card); overflow: hidden; }
.co-palco { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.co-dica { position: absolute; top: 6px; left: 12px; right: 12px; display: flex; justify-content: center; pointer-events: none; }
.co-dica span { background: rgba(20, 35, 63, .88); color: #E9EDEF; font-size: 12px; font-weight: 500; padding: 5px 12px; max-width: 100%; border-radius: var(--r-pill); text-align: center; text-wrap: pretty; }
.co-encontro { position: absolute; left: 12px; bottom: 12px; display: flex; align-items: center; gap: 8px; background: #FFF7E0; color: #7A4B00; font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: var(--r-pill); pointer-events: none; }
.co-encontro[hidden] { display: none; }

.co-painel { width: 300px; flex: none; background: var(--surface); border-radius: var(--r-card); overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 22px; user-select: text; }
.co-sec { display: flex; flex-direction: column; gap: 10px; }
.co-passos { display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.co-passos div { display: flex; gap: 10px; }
.co-passos span { width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--accent-tint); color: var(--accent-ink); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.co-plist { display: flex; flex-direction: column; gap: 2px; }
.co-plist__item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: none; border-radius: var(--r-item); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background var(--ease); }
.co-plist__item:hover { background: var(--surface-2); }
.co-plist__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.co-plist__txt b { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-plist__item small { font-size: 12px; color: var(--ink-3); }
.co-plist__item--alerta { gap: 10px; }
.co-plist__item--alerta i { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--warn); }
.co-plist__item--alerta b { font-size: 13px; }
.co-nota { margin: 0; font-size: 12px; color: var(--ink-3); line-height: 1.45; }
.co-texto { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.co-um { display: flex; align-items: center; gap: 12px; }
.co-nome-part { flex: 1; min-width: 0; border: none; border-radius: var(--r-pill); padding: 9px 14px; background: var(--bg-input); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; outline: none; }
.co-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.co-swatch { width: 26px; height: 26px; border: none; border-radius: 50%; cursor: pointer; }
.co-swatch.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.co-seqs { display: flex; flex-direction: column; gap: 6px; }
.co-seq { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: none; border-radius: var(--r-item); background: var(--surface-2); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.co-seq i { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--slate-300); }
.co-seq span { display: flex; flex-direction: column; min-width: 0; }
.co-seq b { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.co-seq small { font-size: 12px; color: var(--ink-3); }
.co-seq.on { background: var(--accent-tint); color: var(--accent-ink); }
.co-seq--parado { background: transparent; color: var(--ink-3); cursor: default; }
.co-seq--parado b { font-weight: 500; }
.co-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.co-grid2 .co-btn { padding: 0 8px; }
.co-grid2__full { grid-column: 1 / -1; }
.co-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------------- Linha do tempo ---------------- */
.co-linha { flex: none; background: var(--surface); border-radius: var(--r-card); overflow: hidden; }
.co-transporte { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; overflow-x: auto; padding: 6px 12px; border-bottom: 1px solid var(--line); }
.co-transporte__grp { display: flex; align-items: center; gap: 4px; flex: none; }
.co-play { width: 52px; height: 52px; flex: none; border: none; border-radius: 50%; background: var(--accent); color: var(--brand-yellow); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background var(--ease); }
.co-play:hover { background: var(--accent-strong); }
.co-tempo { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 120px; white-space: nowrap; flex: none; }
.co-tempo small { color: var(--ink-3); font-weight: 500; font-size: 13px; }
.co-seg { display: flex; gap: 4px; padding: 3px; border-radius: var(--r-pill); background: var(--bg-input); flex: none; }
.co-seg button { border: none; border-radius: var(--r-pill); padding: 7px 11px; background: transparent; color: var(--ink-2); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.co-seg button.on { background: var(--surface); color: var(--accent-ink); }
.co-transporte__dur { display: flex; align-items: center; gap: 8px; flex: none; }
.co-transporte__dur small { font-size: 12px; color: var(--ink-3); }
.co-zoom { display: flex; gap: 2px; flex: none; }

.co-trilhas { display: flex; max-height: min(250px, 30vh); min-height: 120px; overflow-y: auto; }
.co-trilhas__esq { width: 170px; flex: none; border-right: 1px solid var(--line); }
.co-trilhas__cab { height: 28px; border-bottom: 1px solid var(--line); }
.co-trilhas__musica { height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.co-trilhas__musica svg { flex: none; }
.co-trilhas__musica-txt { min-width: 0; flex: 1; }
.co-trilhas__musica-txt b { display: block; font-size: 12px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-dur-ctl { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--ink-3); }
.co-dur-ctl button { width: 20px; height: 20px; border: none; border-radius: 50%; background: var(--bg-input); color: var(--ink-2); cursor: pointer; font-size: 12px; line-height: 1; padding: 0; }
.co-faixa-rotulo { height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.co-faixa-rotulo b { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-faixa-rotulo.on { background: var(--accent-tint); }
.co-trilhas__rolagem { flex: 1; min-width: 0; overflow-x: auto; overflow-y: hidden; }
.co-tl { position: relative; min-width: 100%; }
.co-regua { position: relative; height: 28px; border-bottom: 1px solid var(--line); cursor: pointer; touch-action: none; }
.co-tick { position: absolute; bottom: 0; width: 1px; background: var(--slate-300); pointer-events: none; }
.co-tick-lbl { position: absolute; top: 3px; padding-left: 4px; font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; pointer-events: none; }
.co-marca-alerta { position: absolute; bottom: 0; height: 5px; border-radius: 3px; background: var(--warn); cursor: pointer; }
.co-loop-reg { position: absolute; top: 0; bottom: 0; background: rgba(124, 196, 250, .35); pointer-events: none; }
.co-loop-h { position: absolute; top: 0; bottom: 0; width: 14px; margin-left: -7px; cursor: ew-resize; display: flex; justify-content: center; }
.co-loop-h i { width: 4px; height: 100%; background: #3E8FD8; border-radius: 2px; }
.co-onda { position: relative; height: 48px; border-bottom: 1px solid var(--line); background: var(--surface-2); cursor: pointer; touch-action: none; }
.co-onda svg { position: absolute; left: 0; top: 0; display: block; pointer-events: none; }
.co-onda__nota { position: absolute; left: 10px; top: 15px; font-size: 12px; color: var(--ink-3); white-space: nowrap; pointer-events: none; }
.co-faixa { position: relative; height: 44px; border-bottom: 1px solid var(--line); touch-action: none; background-image: linear-gradient(to right, var(--line) 1px, transparent 1px); }
.co-faixa.on { background-color: var(--accent-tint); }
.co-parado { position: absolute; top: 14px; text-align: center; font-size: 11px; color: var(--ink-3); pointer-events: none; white-space: nowrap; overflow: hidden; }
.co-bloco { position: absolute; top: 7px; height: 30px; border-radius: 8px; cursor: grab; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; }
.co-bloco span { font-size: 12px; font-weight: 600; color: #14233F; white-space: nowrap; pointer-events: none; }
.co-bloco.on { box-shadow: 0 0 0 2px #14233F, 0 0 0 4px #FFC93C; }
.co-bloco i { position: absolute; top: 0; bottom: 0; width: 14px; cursor: ew-resize; }
.co-bloco i::after { content: ""; position: absolute; top: 8px; left: 5px; width: 3px; height: 14px; border-radius: 2px; background: rgba(20, 35, 63, .45); }
.co-bloco i.e { left: 0; }
.co-bloco i.d { right: 0; }
.co-playhead { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--accent); pointer-events: none; }
.co-playhead i { position: absolute; top: 6px; left: -6px; width: 14px; height: 14px; border-radius: 50%; background: #FFC93C; border: 2px solid var(--accent); }
:root[data-theme="dark"] .co-playhead { background: var(--brand-yellow); }

/* Tablet e celular: o editor deixa de ser uma tela única de altura fixa e vira
   uma coluna rolável — palco, ferramentas, transporte + linha do tempo e, por
   último, o painel (o .co-corpo some do fluxo pra reordenar os filhos). */
@media (max-width: 1000px) {
  .co-editor { height: auto; min-height: 0; }
  .co-corpo { display: contents; }
  .co-palco-wrap { order: 1; flex: none; aspect-ratio: 5 / 3; width: 100%; }
  .co-ferramentas { order: 2; width: auto; flex-direction: row; overflow-x: auto; overflow-y: hidden; }
  .co-ferramentas button { width: 76px; }
  .co-ferramentas hr { width: 1px; height: auto; margin: 6px; border: none; border-left: 1px solid var(--line); }
  .co-linha { order: 3; }
  .co-painel { order: 4; width: auto; overflow: visible; }
  .co-faixa { touch-action: pan-x; }
  .co-regua, .co-onda { touch-action: pan-x; }
}
@media (max-width: 760px) {
  .p365-content.co-cheio { padding: 8px; }
  .co-editor { gap: 8px; }
  .co-topo { padding: 6px 8px; gap: 8px; }
  .co-marca b { display: none; }
  .co-nome { flex: 1 1 120px; min-width: 0; }
  .co-salvo { flex: 1 1 100%; max-width: none; order: 9; }
  .co-topo .co-btn { min-height: 40px; }
  .co-dica { display: none; }
  .co-trilhas__esq { width: 104px; }
  .co-faixa-rotulo { padding: 0 8px; gap: 6px; }
  .co-faixa-rotulo b { font-size: 12px; }
  .co-trilhas__musica { padding: 0 8px; }
  .co-transporte { gap: 6px; padding: 6px 8px; }
  .co-trilhas { max-height: 42vh; }
  .co-painel { padding: 16px; }
}

/* ---------------- Tela cheia, ajuda e exportação ---------------- */
.co-sec__cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.co-fs-btn { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: 50%; background: rgba(20, 35, 63, .88); color: #E9EDEF; cursor: pointer; transition: background var(--ease); }
.co-fs-btn:hover { background: rgba(20, 35, 63, 1); }
.co-fs-barra { display: none; }
.co-palco-wrap:is(:fullscreen, .co-pseudo-fs) { border-radius: 0; background: #14233F; }
.co-palco-wrap:is(:fullscreen, .co-pseudo-fs) .co-dica, .co-palco-wrap:is(:fullscreen, .co-pseudo-fs) .co-encontro { display: none; }
.co-palco-wrap:is(:fullscreen, .co-pseudo-fs) > .co-fs-btn:not(.co-fs-btn--sair) { display: none; }
.co-palco-wrap:is(:fullscreen, .co-pseudo-fs) .co-fs-barra { display: flex; position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); align-items: center; gap: 14px; padding: 8px 12px 8px 8px; border-radius: var(--r-pill); background: rgba(20, 35, 63, .88); opacity: 0; transition: opacity .25s; }
.co-palco-wrap:is(:fullscreen, .co-pseudo-fs):hover .co-fs-barra, .co-palco-wrap:is(:fullscreen, .co-pseudo-fs) .co-fs-barra:focus-within { opacity: 1; }
.co-palco-wrap:is(:fullscreen, .co-pseudo-fs) .co-play { width: 44px; height: 44px; background: var(--brand-yellow); color: #14233F; }
.co-fs-tempo { color: #E9EDEF; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.co-fs-btn--sair { position: static; background: transparent; }
.co-export__box h3 { margin-bottom: 8px; }
.co-export__txt { margin: 0 0 12px; font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.co-export__barra { height: 8px; border-radius: 4px; background: var(--bg-input); overflow: hidden; margin-bottom: 12px; }
.co-export__barra i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 4px; }
:root[data-theme="dark"] .co-export__barra i { background: var(--brand-yellow); }
.co-export__acoes { display: flex; justify-content: flex-end; margin-top: 14px; }

.co-palco-wrap.co-pseudo-fs { position: fixed; inset: 0; z-index: 900; width: 100%; height: 100%; aspect-ratio: auto; }
html.co-pseudo-fs-on { overflow: hidden; }
