/* CSS mobile específico da Minha fila (/fila) e da Tarefa (/tarefa/:id) — tudo dentro de
   @media (max-width: 900px). Complementa mobile.css (.detalhe-topo, .capa-grande, .sheet*,
   .barra-acoes, .textarea-roteiro já vivem lá). O desktop não enxerga nada daqui. */
@media (max-width: 900px) {
  /* ---- Minha fila: seções + linha de 88px ---- */
  .fila-mobile .secao-titulo { margin-top: var(--studio-space-2); }
  .fila-mobile .secao-titulo .n { color: var(--studio-text-secondary); font-weight: 600; margin-left: var(--studio-space-1); }
  .fila-mobile .secao-toggle { width: 100%; background: none; border: 0; color: var(--studio-text-secondary); font: inherit; letter-spacing: inherit; text-transform: inherit;
                               padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
  .fila-mobile .secao-toggle > span { display: flex; align-items: center; gap: 6px; }
  .fila-mobile .secao-toggle .seta { transition: transform var(--studio-motion-transition) var(--studio-ease-out); }
  .fila-mobile .secao-toggle[aria-expanded="true"] .seta { transform: rotate(180deg); }
  .fila-mobile .fila-vazia-sub { margin: var(--studio-space-1) 0 var(--studio-space-3); }
  .fila-mobile .erro-box { margin-top: 0; }
  .fila-mobile .erro-box .btn { margin-top: var(--studio-space-2); }

  .linha-tarefa { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-areas: "foto corpo" "acoes acoes"; gap: var(--studio-space-2) 10px; align-items: start; min-height: 88px; padding: 10px;
                  background: var(--studio-surface-raised); border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-control); margin-bottom: var(--studio-space-2);
                  content-visibility: auto; contain-intrinsic-size: 88px; -webkit-tap-highlight-color: transparent; }
  .linha-tarefa.devolvida { border-color: var(--studio-feedback-error-fg); box-shadow: 0 0 0 1px var(--studio-feedback-error-fg); }
  .linha-tarefa.campea { border-color: var(--studio-feedback-success-fg); }
  .linha-tarefa .lt-foto { grid-area: foto; width: 64px; height: 64px; object-fit: cover; border-radius: var(--studio-radius-control); background: var(--studio-surface-stage); display: block; }
  .linha-tarefa .lt-foto[role="button"] { cursor: pointer; }
  .linha-tarefa .lt-corpo { grid-area: corpo; min-width: 0; display: flex; flex-direction: column; gap: 5px; align-self: center; }
  .linha-tarefa .lt-nome { font-size: 14px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .linha-tarefa .lt-tags { display: flex; gap: var(--studio-space-1) 6px; flex-wrap: wrap; align-items: center; min-width: 0; }
  .linha-tarefa .lt-tags .tag { font-size: 11.5px; padding: 2px var(--studio-space-2); flex-shrink: 0; }
  .linha-tarefa .lt-prazo { font-size: 12px; color: var(--studio-text-secondary); white-space: nowrap; }
  .linha-tarefa .lt-prazo.vencido { color: var(--studio-feedback-error-fg); font-weight: 700; }
  .linha-tarefa .lt-nota { font-size: 12px; color: var(--studio-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .linha-tarefa.devolvida .lt-nota { color: var(--studio-feedback-error-fg); }
  .linha-tarefa .lt-acoes { grid-area: acoes; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
  .linha-tarefa .lt-acoes .btn { min-height: var(--studio-control-min-height); padding: 0 14px; font-size: 14px; white-space: nowrap; justify-content: center; }
  .linha-tarefa .lt-mais { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--studio-border-subtle); border-radius: var(--studio-radius-control);
                           background: var(--studio-surface-stage); color: var(--studio-text-secondary); flex-shrink: 0; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
  .linha-tarefa .lt-mais:active { transform: scale(.96); }
  .linha-tarefa-skel { height: 88px; margin-bottom: var(--studio-space-2); border-radius: var(--studio-radius-control); }
  /* em telas de 360px "Fazer variação" + nome de 2 linhas não cabem lado a lado: a ação desce */
  @media (max-width: 380px) {
    .linha-tarefa.campea { grid-template-columns: 64px minmax(0, 1fr); }
    .linha-tarefa.campea .lt-acoes { grid-column: 1 / -1; }
    .linha-tarefa.campea .lt-acoes .btn { flex: 1; }
  }

  /* ---- Tarefa (/tarefa/:id) ---- */
  .tarefa-mobile { padding-bottom: var(--studio-space-3); }
  .tarefa-mobile .detalhe-topo .titulo { font-weight: 600; }
  .tarefa-mobile .detalhe-topo .tag { flex-shrink: 0; }
  .tarefa-mobile .tm-meta { display: flex; align-items: center; gap: var(--studio-space-2); flex-wrap: wrap; font-size: 12.5px; color: var(--studio-text-secondary); margin: 0 0 var(--studio-space-3); }
  .tarefa-mobile .tm-meta .vencido { color: var(--studio-feedback-error-fg); font-weight: 700; }
  .tarefa-mobile .erro-box, .tarefa-mobile .aviso { margin: 0 0 var(--studio-space-3); }
  .tarefa-mobile .card { padding: 14px; margin-bottom: var(--studio-space-3); }
  .tarefa-mobile .secao-titulo { margin: 0 0 6px; }
  .tarefa-mobile label { display: flex; align-items: center; justify-content: space-between; gap: var(--studio-space-2); margin: 10px 0 5px; }
  .tarefa-mobile .linha-botoes { margin-top: 10px; }
  .tarefa-mobile .linha-botoes .btn { flex: 1 1 auto; justify-content: center; }
  .tarefa-mobile .details-legenda { margin-top: var(--studio-space-3); }
  .tarefa-mobile .details-legenda summary { min-height: 44px; display: flex; align-items: center; }
  .tarefa-mobile .details-legenda textarea { width: 100%; min-height: 140px; }
  .tarefa-mobile textarea { width: 100%; }
  .tarefa-mobile .textarea-roteiro { resize: none; overflow-y: auto; }
  .tarefa-mobile audio { width: 100%; margin-top: var(--studio-space-1); }
  .tarefa-mobile .headline-linha { display: flex; align-items: center; gap: var(--studio-space-2); min-height: 44px; font-size: 14px; }
  .tarefa-mobile .headline-linha > span { flex: 1; min-width: 0; }
  .tarefa-mobile .headline-linha .btn { flex: 0 0 auto; }
  .tarefa-mobile .confirmar-voz { border-color: var(--studio-feedback-warning-fg) !important; color: var(--studio-feedback-warning-fg) !important; background: var(--studio-feedback-warning-bg) !important; }

  /* Referências: tira horizontal, 88px por item, botão baixar de 44px embaixo de cada uma */
  .tarefa-mobile .refs-tira { display: flex; gap: var(--studio-space-2); overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
  .tarefa-mobile .refs-tira::-webkit-scrollbar { display: none; }
  .tarefa-mobile .refs-tira .ref-item { flex: 0 0 88px; display: flex; flex-direction: column; gap: var(--studio-space-1); scroll-snap-align: start; }
  .tarefa-mobile .refs-tira .ref-thumb { width: 88px; aspect-ratio: 9/12; -webkit-tap-highlight-color: transparent; }
  .tarefa-mobile .refs-tira .ref-thumb .ref-legenda { font-size: 10.5px; padding: var(--studio-space-1) 6px; }
  .tarefa-mobile .refs-tira .ref-thumb .ref-play { width: 30px; height: 30px; }
  .tarefa-mobile .refs-tira .ref-baixar { min-height: 44px; width: 88px; display: flex; align-items: center; justify-content: center; gap: var(--studio-space-1); padding: 0 6px; font-size: 12px; }
  .tarefa-mobile .refs-tira .ref-baixar.vazio { border: 0; background: none; }
  .tarefa-mobile .refs-tk { flex-wrap: nowrap; overflow-x: auto; padding-bottom: var(--studio-space-1); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tarefa-mobile .refs-tk::-webkit-scrollbar { display: none; }
  .tarefa-mobile .ref-tk { flex-shrink: 0; }
  .tarefa-mobile .ref-tk-ext svg { width: 14px; height: 14px; }
  .tarefa-mobile .ref-tk-copy { top: 40px; }
  .tarefa-mobile .colar-ref-wrap { margin-top: 10px; display: flex; }
  .tarefa-mobile .colar-ref-wrap .btn { flex: 1; justify-content: center; }
  .tarefa-mobile .btn-colar-ref { border-color: var(--studio-brand-accent) !important; color: var(--studio-text-accent) !important; background: var(--studio-selection-bg) !important; }

  /* Capa: grande (toque = tela cheia) + tira de variantes */
  .tarefa-mobile .capa-grande { margin-bottom: var(--studio-space-2); }
  .tarefa-mobile .capa-grande img { cursor: zoom-in; }
  .tarefa-mobile .capa-grande.sem-capa { min-height: 30vh; min-height: 30dvh; display: flex; align-items: center; justify-content: center; color: var(--studio-text-secondary);
                                          background: var(--studio-surface-stage); border: 1px dashed var(--studio-border-subtle); }
  .tarefa-mobile .capa-tira { display: flex; gap: var(--studio-space-2); overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tarefa-mobile .capa-tira::-webkit-scrollbar { display: none; }
  .tarefa-mobile .capa-tira img { flex: 0 0 72px; width: 72px; aspect-ratio: 9/16; object-fit: cover; border-radius: var(--studio-radius-control); border: 2px solid var(--studio-border-subtle); opacity: .7; }
  .tarefa-mobile .capa-tira img.sel { border-color: var(--studio-brand-accent); opacity: 1; }
  .tarefa-mobile .capa-tira.trocando img { opacity: .4; }
  /* editor de capa (mesmo modal do desktop, que vira sheet por CSS): 1 coluna, alças maiores */
  .capa-editor { grid-template-columns: 1fr; gap: var(--studio-space-3); }
  .capa-editor-preview img { max-height: 48vh; max-height: 48dvh; object-fit: contain; }
  .capa-alca { width: 34px; height: 34px; }
  .capa-el input { min-height: 44px; }

  /* Foto do produto: tira de miniaturas, a que tá na capa marcada */
  .tarefa-mobile .fotos-tira { display: flex; gap: var(--studio-space-2); overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tarefa-mobile .fotos-tira::-webkit-scrollbar { display: none; }
  .tarefa-mobile .fotos-tira .foto-mini { flex: 0 0 96px; }
  .tarefa-mobile .fotos-tira .foto-mini img { width: 96px; height: 96px; object-fit: cover; }
  .tarefa-mobile .fotos-tira .foto-mini.ativa img { opacity: 1; border-color: var(--studio-brand-accent); }
  .tarefa-mobile .fotos-tira .foto-mini .na-capa { position: absolute; left: 4px; bottom: 4px; font-size: 10.5px; padding: 1px 6px; }
  .tarefa-mobile .fotos-tira .foto-mini button { width: 28px; height: 28px; top: 4px; right: 4px; }
  .tarefa-mobile .fotos-tira .foto-mini button::after { content: ''; position: absolute; inset: -8px; }
  .tarefa-mobile label.btn-arquivo, .tarefa-mobile .envio-edicao label.btn-arquivo { position: relative; cursor: pointer; margin: 10px 0 0; justify-content: center; gap: var(--studio-space-2); text-transform: none; letter-spacing: 0; }
  .tarefa-mobile .btn-arquivo input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
  .tarefa-mobile .btn-arquivo.desabilitado { opacity: .55; pointer-events: none; }

  /* Envio do vídeo: 1 botão grande por edição, progresso na barra fixa */
  .tarefa-mobile .envio-edicao { margin-bottom: 14px; }
  .tarefa-mobile .envio-edicao:last-of-type { margin-bottom: 0; }
  .tarefa-mobile .envio-edicao label { margin-top: 0; justify-content: flex-start; }
  .tarefa-mobile .video-entregue { width: 100%; max-height: 40vh; max-height: 40dvh; background: var(--studio-media-stage); border-radius: var(--studio-radius-control); display: block; margin-bottom: var(--studio-space-2); }
  .tarefa-mobile .btn-escolher-video { min-height: var(--studio-control-large-height); font-size: 15px; }
  .tarefa-mobile .btn-escolher-video.enviando { pointer-events: none; }
  .upload-barra { position: fixed; left: 0; right: 0; bottom: calc(var(--studio-barra-acoes-h) + var(--studio-safe-bottom)); height: 3px; background: var(--studio-surface-stage); z-index: var(--studio-z-barra); }
  .upload-barra i { display: block; height: 100%; background: var(--studio-brand-accent); transition: width var(--studio-motion-transition) linear; }
  .tarefa-mobile .skel-topo { margin-bottom: var(--studio-space-3); }
}
