/* Celular — até 767px.

   Um arquivo só para o celular, carregado por último: tudo aqui sobrescreve o
   layout de computador, e nada aqui vale acima de 767px. O número é o mesmo do
   NO_CELULAR em wizard.js, e é consulta de mídia de propósito — nunca
   user-agent —, para o modo dispositivo do Chrome e a rotação trocarem de lado
   sem recarregar.

   No celular o editor não é outra tela: é o MESMO editor, reorganizado. Prévia,
   hook, cortes e importar, empilhados numa coluna que rola, com a ação principal
   presa na base. Some a timeline e os ajustes finos de estilo (fonte, tamanho,
   sliders); ficam a cor, o estilo do texto e a posição, arrastando na prévia
   com as guias de centro. Assim os handlers do
   app.js (Embaralhar, lista de hooks, cortes) funcionam igual nos dois lados,
   sem lógica duplicada.

   Regras que valem para a tela toda:
   - nenhum contêiner rola de lado, de 320px a 767px;
   - alvo de toque com 44px no mínimo (guia da Apple);
   - campo de texto com 16px, senão o Safari dá zoom ao focar;
   - as bordas presas (topo, base) respeitam a área segura do aparelho. */

@media (min-width: 768px) {
  .so-mob { display: none !important; }
}

@media (max-width: 767px) {
  .so-desk { display: none !important; }

  /* dvh: no Safari o 100vh conta a barra de endereço e empurra a base para
     fora da tela */
  #wizardRoot, #editorRoot { height: 100dvh; }

  /* O aviso vai para o alto e não recebe toque. Na base ele ficava 4 s em cima
     da barra de ação: o dedo apertava o aviso, e "Gerar vídeo" não respondia. */
  .toast {
    top: calc(env(safe-area-inset-top) + 60px); bottom: auto;
    left: max(var(--s-5), env(safe-area-inset-left));
    right: max(var(--s-5), env(safe-area-inset-right));
    transform: none; max-width: none;
    font-size: 13px;
    pointer-events: none;
    z-index: 300;             /* acima do sheet, senão "Copiado" some atrás dele */
  }
  .modal { min-width: 0; width: calc(100vw - 32px); max-width: none; }
  /* painel de admin: a tela toda, e cada conta vira um cartão */
  .modal.adm { width: 100vw; height: 100dvh; max-height: none; margin: 0; border-radius: 0; border: 0; }
  .adm-cab { padding: calc(var(--s3) + env(safe-area-inset-top)) var(--m-margin) var(--s3); }
  .adm-cab .modal-x { width: 44px; height: 44px; }
  .adm-corpo { padding: var(--s4) var(--m-margin) calc(var(--s5) + env(safe-area-inset-bottom)); }
  .adm-pedido { flex-direction: column; align-items: stretch; }
  .adm-acoes .wz-btn { min-height: 44px; flex: 1; }
  .adm-tabela-wrap { border: 0; overflow: visible; }
  .adm-tabela thead { display: none; }
  .adm-tabela, .adm-tabela tbody, .adm-tabela tr, .adm-tabela td { display: block; width: 100%; }
  .adm-tabela tr {
    margin-bottom: var(--s2); padding: var(--s3) var(--s4);
    background: var(--e1); border: 1px solid var(--line); border-radius: var(--r-xl);
  }
  .adm-tabela td { padding: 3px 0; border: 0; }
  .adm-tabela td:nth-child(4)::before { content: "último acesso "; font-family: var(--font-ui); color: var(--ink-dim); }
  .adm-tabela td.adm-td-acoes { padding-top: var(--s2); }
  .adm-tabela .adm-acoes { justify-content: stretch; }
  #wizardRoot .adm-senha input, .adm-senha input { width: 100%; height: 44px; font-size: 16px; }

  #wizardRoot input, #wizardRoot select, #wizardRoot textarea,
  #editorRoot input, #editorRoot select, #editorRoot textarea,
  .m-sheet input, .m-sheet textarea { font-size: 16px; }

  /* ================================================================ wizard */

  #wizardRoot { grid-template-rows: auto minmax(0, 1fr) auto; }

  /* topo: 52px. No passo 1 a marca e a Biblioteca; dali em diante voltar,
     o nome do passo, os quatro traços e "N / 4". */
  .wz-top {
    min-height: calc(var(--h-m-header) + env(safe-area-inset-top));
    gap: 14px;
    padding: env(safe-area-inset-top) max(var(--m-margin), env(safe-area-inset-right))
             0 max(var(--m-margin), env(safe-area-inset-left));
    border-bottom-color: var(--line-soft);
  }
  .wz-brand { gap: 9px; min-height: 44px; }
  #wizardRoot:not([data-passo="0"]) .wz-brand,
  #wizardRoot:not([data-passo="0"]) .wz-steps,
  #wizardRoot:not([data-passo="0"]) .wz-top-right { display: none !important; }
  .wz-steps { display: none !important; }
  .wz-top-right { gap: var(--s2); }
  #wizardRoot .wz-top-right .wz-btn { height: 32px; min-height: 0; padding: 0 14px; font-size: 12.5px; }
  /* a área de toque passa de 44px sem o desenho do botão crescer */
  .wz-top-right .wz-btn::after { content: ""; position: absolute; inset: -6px 0; }
  .wz-top-right .wz-btn { position: relative; }
  #wzQuem { display: none !important; }
  /* atalho de teclado não existe no celular */
  .adm-link kbd { display: none; }
  #wizardRoot .wz-mcab .adm-link { flex: none; height: 32px; min-height: 0; padding: 0 var(--s3); font-size: 12.5px; position: relative; }
  .wz-mcab .adm-link::after { content: ""; position: absolute; inset: -6px 0; }

  .wz-mcab { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; }
  .wz-mvolta {
    width: 44px; height: 44px; margin-left: -13px; flex: none;
    background: none; border: 0; border-radius: var(--r-md);
    color: var(--ink-body); font: inherit; font-size: 17px; cursor: pointer;
  }
  .wz-mtit { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
  .wz-mtit b {
    font-size: 13.5px; font-weight: 600; color: var(--ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .wz-mtracos { display: flex; gap: 4px; }
  .wz-mtracos i { width: 26px; height: 3px; border-radius: 2px; background: var(--line); }
  .wz-mtracos i.on { background: var(--accent); }
  .wz-mpasso { flex: none; font-size: 11px; color: var(--ink-dim); }

  #wizardRoot input, #wizardRoot select { min-height: 44px; }
  #wizardRoot .wz-btn { min-height: 44px; }
  /* atalho de teclado não existe no celular */
  .wz-hint, .wz-kbd, .wz-ret { display: none !important; }

  .wz-body { padding: var(--m-margin); }
  .wz-title { font-size: 30px; line-height: 1.08; letter-spacing: -.025em; text-wrap: balance; }
  .wz-h1 { font-size: 28px; }
  .wz-h2 { font-size: 20px; }
  .wz-lead { font-size: 14.5px; line-height: 1.5; }
  /* centralizar na vertical corta o topo quando o conteúdo é mais alto que a
     tela: no celular a tela começa de cima */
  .wz-center { place-items: start stretch; grid-template-columns: minmax(0, 1fr); }

  /* ---- passo 1: modo ---- */
  #wzStep0 { padding-bottom: 0; }
  .wz-hero { gap: var(--s5); padding: 36px var(--m-margin); align-items: stretch; text-align: left; }
  .wz-hero-cab { gap: var(--s3); align-items: flex-start; }
  .wz-modes { flex-direction: column; width: 100%; gap: var(--s3); }
  .wz-mode, .wz-mode.on {
    width: 100%; padding: 18px;
    display: grid; grid-template-columns: auto minmax(0, 1fr);
    column-gap: var(--s4); row-gap: 5px; align-items: center;
    text-align: left;
  }
  .wz-mode.on, .wz-modes:not(:has(.on)) .wz-mode[data-mode="single"] {
    padding: 17.5px;
    border: 1.5px solid var(--accent);
    box-shadow: 0 0 0 3px var(--focus-ring);
  }
  .wz-mode-icon { grid-row: 1 / span 2; }
  .wz-mode-icon i { width: 14px; height: 40px; }
  .wz-mode-icon i.ic-one { width: 24px; }
  .wz-mode-title { font-size: 18px; letter-spacing: -.015em; }
  .wz-mode-desc { font-size: 13px; line-height: 1.5; }

  /* bases presas: a ação principal com 56px, no alcance do polegar */
  .wz-bottom {
    height: auto; min-height: 0;
    flex-wrap: wrap; gap: var(--s2);
    padding: 14px max(var(--m-margin), env(safe-area-inset-right))
             calc(14px + env(safe-area-inset-bottom))
             max(var(--m-margin), env(safe-area-inset-left));
    background: var(--bg-panel);
    border-top: 1px solid var(--line-soft);
  }
  .wz-bottom .wz-btn { width: 100%; height: var(--h-m-action); justify-content: center; font-size: 16px; }
  .wz-bottom .wz-btn:not(.primary) { font-size: 15px; color: var(--ink-body); }
  #wzBack { display: none; }
  #wzNext { gap: 0; }
  .wz-status { order: -1; flex-basis: 100%; margin: 0; font-size: 12.5px; text-align: left; }
  .wz-status:empty { display: none; }
  /* no preparo o aviso "abre sozinha" já está no texto de cima */
  #wzPrepRodapeSt { display: none; }
  /* na fila de render não há Cancelar, e a base vazia só ocuparia espaço */
  #wzPrepRodape:has(#wzPrepCancelar[hidden]) { display: none; }

  /* ---- passo 2: tags de um vídeo ---- */
  .wz-body:has(.wz-step1) { padding: 20px var(--m-margin); }
  .wz-step1 {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    grid-template-areas: "vid meta" "vid recall" "add add" "var var" "list list";
    grid-template-rows: auto 1fr;
    column-gap: var(--s3); row-gap: var(--s4);
    padding: 0; align-items: start;
  }
  .wz-player-col, .wz-tags-col { display: contents; }
  .wz-filemeta { grid-area: meta; display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
  .wz-filemeta .wz-fname { font-size: 14px; overflow-wrap: anywhere; }
  .wz-filemeta .mono { font-size: 11.5px; color: var(--ink-soft); }
  .wz-player { grid-area: vid; border: 0; background: none; }
  .wz-vid {
    height: auto; width: 108px; aspect-ratio: 9 / 16;
    border: 1px solid var(--line-strong); border-radius: var(--r-md);
  }
  .wz-ctrls, #wzTagsUnder, .wz-tags-col > div:first-child { display: none !important; }
  #wzRecall { grid-area: recall; }
  .wz-tags-col > :nth-child(3) { grid-area: add; }
  .wz-tags-col > :nth-child(4) { grid-area: var; }
  .wz-tags-col > :nth-child(5) { grid-area: list; }
  .wz-recall { padding: 10px; gap: 6px; }
  .wz-recall-cab { flex-direction: column; align-items: flex-start; gap: 2px; }
  .wz-recall-lab { font-size: 9.5px; letter-spacing: .09em; }
  .wz-recall-corpo { flex-direction: column; align-items: flex-start; gap: 6px; }
  .wz-recall-txt { font-size: 12px; line-height: 1.45; color: var(--ink-body); }
  /* Limpar vira link: o cartão é pequeno e o botão cheio pesava mais que a frase */
  #wizardRoot .wz-recall-corpo .wz-btn {
    height: 32px; min-height: 0; padding: 0; margin: -6px 0;
    background: none; border: 0;
    color: var(--accent); font-size: 12px; font-weight: 500;
  }
  .wz-card { padding: 14px; gap: 10px; }
  .wz-addrow { flex-wrap: wrap; gap: 10px; }
  #wizardRoot .wz-addrow select { flex: 1 1 100%; width: 100%; height: 44px; font-size: 16px; }
  .wz-valwrap { flex: 1; min-width: 0; }
  #wizardRoot input.wz-val,
  #wizardRoot .wz-varrow input[type="number"] { height: 44px; }
  .wz-add { width: 44px; height: 44px; flex: none; }
  .wz-taglist { gap: 9px; }
  .wz-tagline { min-height: 48px; padding: 0 12px; gap: 12px; }
  .wz-tagline .k { width: 72px; font-size: 10px; }
  .wz-tagline .v { font-size: 14px; }
  /* o × do chip de tag: o desenho continua pequeno, a área de toque não */
  .wz-tagline .x { min-width: 44px; min-height: 44px; margin: 0 -12px 0 0; }

  /* passo 2: lote */
  .wz-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
  .wz-vcard .wz-vid { width: 100%; height: min(56dvh, calc((100vw - 76px) * 16 / 9)); aspect-ratio: auto; }
  .wz-vcard .wz-ctrls { display: flex !important; height: 44px; }
  .wz-play { width: 44px; height: 44px; }

  /* ---- passo 3: hook. Prévia de 212px no alto, o resto em coluna ---- */
  .wz-hook { display: flex; flex-direction: column; height: auto; }
  .wz-hook-preview {
    order: -1;
    padding: 18px var(--m-margin) 0;
    gap: var(--s4);
    background: none; border: 0;
  }
  .wz-frame { width: 212px; height: auto; }
  .wz-caption { width: auto; text-align: center; font-family: var(--font-mono); font-size: 10px; }
  .wz-hook-list { padding: var(--s4) var(--m-margin) 18px; gap: var(--s4); overflow: visible; }
  .wz-hook-head, #wzHookTags { display: none !important; }
  .wz-hookmode { flex-wrap: wrap; }
  .wz-seg { width: 100%; height: auto; padding: 3px; }
  .wz-seg button { flex: 1; height: auto; min-height: 44px; }
  .wz-current { padding: 14px; gap: 10px; }
  .wz-src { font-size: 10px; }
  .wz-current-text { font-size: 14.5px; }
  .wz-actions { gap: var(--s2); }
  /* a ação principal da tela é o Preparar, na base */
  .wz-actions .wz-btn, .wz-actions .wz-btn.primary {
    flex: 0 1 auto; height: 44px; padding: 0 16px;
    background: var(--e2); border: 1px solid var(--line-strong);
    color: var(--ink); font-size: 13.5px; font-weight: 400;
  }
  .wz-pane-bar { flex-wrap: wrap; }
  .wz-btn.sm { height: 44px; }
  .wz-emoji-btn { min-width: 44px; min-height: 44px; }
  .wz-chip, .wz-vidchip { min-height: 44px; }
  .wz-item { min-height: 44px; }

  /* ---- passo 4: preparo ---- */
  #wzStep3 { place-items: start stretch; grid-template-columns: minmax(0, 1fr); padding: 0; }
  .wz-prep { width: 100%; padding: 40px var(--m-margin); gap: var(--s6); }
  .wz-prep-cab { gap: 10px; }
  .wz-prep-cab .wz-lead { font-size: 14.5px; line-height: 1.5; }
  .wz-prep-list { margin-inline: 0; }
  .wz-pcard { padding: 18px; gap: var(--s4); }
  .wz-pcard .st { font-size: 11.5px; }
  .wz-pcard-pe { font-size: 12px; }
  .wz-atos { height: 40px; }

  /* ---- prontos ---- */
  .wz-resbar {
    padding: 14px max(var(--m-margin), env(safe-area-inset-right))
             calc(14px + env(safe-area-inset-bottom))
             max(var(--m-margin), env(safe-area-inset-left));
    border-top-color: var(--line-soft);
  }
  #wizardRoot .wz-resbar .wz-btn { width: 100%; height: var(--h-m-action); font-size: 16px; }
  .wz-resbar { flex-wrap: wrap; height: auto; }
  .wz-resbar-st:empty { display: none; }
  /* a ação principal da tela é o Baixar todos; o de cada cartão é secundário */
  #wizardRoot .wz-res-get {
    background: var(--e2); border: 1px solid var(--line-strong);
    color: var(--ink); font-weight: 500;
  }

  /* ---- Biblioteca: os MP4 gerados, dois por linha ---- */
  .wz-bib { padding: 18px var(--m-margin); }
  .wz-bib-vazio { margin: var(--s7) 0; text-align: center; font-size: 14px; color: var(--ink-soft); }
  .wz-bib-grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
  .wz-bib-card {
    display: flex; flex-direction: column; gap: var(--s2);
    padding: 0; background: none; border: 0;
    color: inherit; font: inherit; text-align: left; cursor: pointer;
    min-width: 0;
  }
  .wz-bib-quadro {
    position: relative; display: block;
    aspect-ratio: 9 / 16;
    background: #131316;
    border: 1px solid var(--line); border-radius: var(--r-md);
    overflow: hidden;
  }
  .wz-bib-quadro video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .wz-bib-dur {
    position: absolute; top: 7px; left: 7px;
    padding: 2px 5px; border-radius: var(--r-sm);
    background: rgba(8, 8, 10, .8);
    font-size: 9px; color: var(--ink);
  }
  .wz-bib-dur:empty { display: none; }
  .wz-bib-nome {
    font-size: 12.5px; font-weight: 500; color: var(--ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .wz-bib-meta { font-size: 10.5px; color: var(--ink-dim); }

  /* ================================================================ editor */

  /* topo, palco que rola, barra da base (a timeline sai da grade) */
  #editorRoot { grid-template-rows: auto minmax(0, 1fr) auto; }
  #timeline { display: none !important; }

  .e-top {
    min-height: calc(var(--h-m-header) + env(safe-area-inset-top));
    gap: var(--s3);
    padding: env(safe-area-inset-top) max(var(--m-margin), env(safe-area-inset-right))
             0 max(var(--m-margin), env(safe-area-inset-left));
    background: var(--bg-panel);
    border-bottom-color: var(--line-soft);
  }
  /* voltar, o vídeo aberto e o Salvar; o resto do topo é do computador */
  #edHome, .e-top .e-brand, #fileMeta, .e-top .e-vdiv, #btnRenders, #btnLibEd,
  .e-savewrap, #edQuem, #btnSairEd, .e-top .e-spacer { display: none !important; }
  .e-mvolta {
    width: 44px; height: 44px; margin-left: -13px; flex: none;
    background: none; border: 0; color: var(--ink-body);
    font: inherit; font-size: 17px; cursor: pointer;
  }
  .e-mtit {
    flex: 1; min-width: 0;
    font-size: 11.5px; color: var(--ink-body);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .e-top:has(#eVideoBar:not([hidden])) .e-mtit { display: none; }
  .e-videobar { flex: 1; min-width: 0; }
  #btnAdminEd { height: 32px; padding: 0 var(--s3); font-size: 12.5px; flex: none; position: relative; }
  #btnAdminEd::after { content: ""; position: absolute; inset: -6px 0; }
  #btnGerarMobile { height: 32px; padding: 0 14px; font-size: 13px; flex: none; position: relative; }
  #btnGerarMobile::after { content: ""; position: absolute; inset: -6px 0; }
  .e-vchip { height: 44px; }

  .e-stage { display: block; overflow-y: auto; min-height: 0; }

  .e-canvas { padding: var(--s-5) var(--s-5) var(--s-3); }
  .frame { height: min(42dvh, calc((100vw - 40px) * 16 / 9)); }
  /* No dedo, só a caixa do texto arrasta: a moldura inteira arrastando
     impediria rolar a página passando o dedo na prévia. As alças de escala
     são de mouse e ficam de fora. */
  .hook-drag { pointer-events: none; }
  .hook-box { pointer-events: auto; touch-action: none; cursor: grab; }
  .hook-box::before { content: ""; position: absolute; inset: -12px; }   /* área de toque maior */
  .hook-box i { display: none; }

  .e-transport { justify-content: center; gap: var(--s-4); }
  .e-transport .e-ico { width: 44px; height: 44px; }
  .e-transport .e-ico svg { width: 16px; height: 16px; }
  #btnGuide, #btnFull, .e-transport .e-spacer { display: none; }
  .v-loader .e-btn { height: 44px; font-size: 14px; }
  .v-loader-msg { font-size: 13px; }

  /* painel: vira a continuação da coluna, na ordem da tarefa —
     hook, cortes, importar */
  .e-panel {
    display: flex; flex-direction: column;
    border-left: 0; border-top: 1px solid var(--line);
    overflow: visible;
  }
  /* duas abas: Cortes e Texto */
  .m-abas {
    order: 0;
    display: flex; align-items: center; gap: var(--s5);
    padding: 0 max(var(--m-margin), env(safe-area-inset-right)) 0 max(var(--m-margin), env(safe-area-inset-left));
    border-bottom: 1px solid var(--line-soft);
    position: sticky; top: 0; z-index: 3; background: var(--bg);
  }
  .m-abas button {
    height: 48px; padding: 0;
    background: none; border: 0; border-bottom: 2px solid transparent;
    color: var(--ink-soft); font: inherit; font-size: 13.5px; cursor: pointer;
  }
  .m-abas button.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
  .m-abas-resumo { margin-left: auto; font-size: 11px; color: var(--accent); }
  #editorRoot[data-aba="cortes"] #eTextBlock,
  #editorRoot[data-aba="cortes"] #eHookBlock,
  #editorRoot[data-aba="cortes"] #eImportBlock,
  #editorRoot[data-aba="texto"] #eCutBlock { display: none !important; }
  #eCutBlock .e-sec, #eTextBlock .e-sec { display: none; }
  .e-block + .e-block { border-top: 0; }
  #eTextBlock { order: 1; }
  #eHookBlock { order: 2; }
  #eCutBlock { order: 3; }
  #eImportBlock { order: 4; }
  #eBatchBlock { display: none !important; }

  /* do bloco de texto ficam o campo do hook, a cor e o estilo (nenhum,
     contorno, caixa) com os campos do modo; fonte, tamanho e ajustes finos
     são do computador. A posição é arrastando na prévia. */
  #eTextBlock .e-body > :not(.e-textwrap):not(.m-mostra) { display: none !important; }
  .e-textbar { height: auto; min-height: 52px; }
  /* cores numa fila só que rola de lado, como no editor do TikTok */
  .e-swatches {
    flex-wrap: nowrap; gap: var(--s-3);
    overflow-x: auto; scrollbar-width: none;
    margin: 0 calc(-1 * var(--s-5)); padding: 2px var(--s-5);
  }
  .e-swatches::-webkit-scrollbar { display: none; }
  .e-sw { width: 44px; height: 44px; border-radius: var(--r-xl); }
  .e-slider { min-height: 44px; align-items: center; }
  #editorRoot .e-slider input[type="range"] { height: 44px; }
  .e-colorhead { font-size: 13px; }
  .m-dica-arrastar { margin: 0; }
  /* a lista de sugestões continua o bloco de cima, sem título próprio */
  #eHookBlock .e-sec { display: none; }
  #eHookBlock { border-top: 0 !important; }
  #eHookBlock .e-body { padding-top: 0; }

  .e-sec { height: 44px; font-size: 12px; }
  .e-body { padding: var(--s-5) max(var(--s-5), env(safe-area-inset-right))
            var(--s-5) max(var(--s-5), env(safe-area-inset-left)); }
  .e-panel .e-btn { height: 44px; font-size: 14px; }
  .e-emoji { height: 44px; min-width: 44px; justify-content: center; }
  /* 24 sugestões inteiras empurravam Cortes para três telas abaixo */
  .e-hooklist { max-height: 50dvh; }
  .e-hook { min-height: 44px; padding: var(--s-4) var(--s-5); }
  .e-hook .t { font-size: 14px; }
  /* no toque não existe hover: o "aplicar" fica sempre à vista */
  .e-hook .acao { opacity: 1; }
  #editorRoot .seg button { min-height: 44px; }
  .cut-step button { width: 44px; height: 44px; }
  .cut-list li button { min-height: 44px; }
  /* As marcas do mapa têm a largura do trecho no vídeo e não chegam a 44px
     sem distorcer o desenho. No dedo quem seleciona é a lista logo abaixo. */
  .cut-marca { pointer-events: none; }
  .cut-go { height: 48px; }

  /* importar de print */
  .m-camera { height: 52px; justify-content: center; font-size: 15px; gap: var(--s-3); }
  .m-camera svg {
    width: 20px; height: 20px;
    fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round;
  }
  .m-colar { justify-content: center; }

  /* ========================================================= sheet do import */

  .m-sheet {
    position: fixed; inset: 0; z-index: 200;
    display: flex; flex-direction: column;
    padding-top: env(safe-area-inset-top);
    background: var(--bg);
    color: var(--ink);
    font-size: 14px;
    animation: m-sobe 220ms ease-out;
    transition: transform 200ms ease-out;
  }
  .m-sheet.arrastando { transition: none; }
  @keyframes m-sobe { from { transform: translateY(100%); } to { transform: none; } }
  .m-sheet-head {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    min-height: 56px;
    border-bottom: 1px solid var(--line);
    /* o gesto de puxar para baixo é nosso, não da rolagem da página */
    touch-action: none;
    cursor: grab;
  }
  .m-grip {
    position: absolute; top: 6px; left: 50%;
    width: 36px; height: 4px; margin-left: -18px;
    border-radius: 2px; background: var(--line-strong);
  }
  .m-sheet-x {
    position: absolute; right: max(var(--s-3), env(safe-area-inset-right));
    width: 44px; height: 44px;
    background: none; border: 0; color: inherit;
    font-size: 26px; line-height: 1; cursor: pointer;
  }
  .m-sheet-body {
    flex: 1; min-height: 0; overflow-y: auto;
    padding: var(--s-6) max(var(--s-6), env(safe-area-inset-right))
             calc(var(--s-6) + env(safe-area-inset-bottom))
             max(var(--s-6), env(safe-area-inset-left));
  }

  /* No sheet quem traz o print é o botão de câmera do editor; aqui dentro
     fica o caminho de colar texto. */
  .m-sheet .imp-drop, .m-sheet .imp-nota, .m-sheet .imp-ou { display: none; }
  .m-sheet .wz-btn { height: 44px; }
  .m-sheet .imp-acoes .wz-btn { flex: 1; }
  .m-sheet .imp-cols { flex-direction: column; }
  .m-sheet .imp-print { flex: none; align-self: center; max-width: 160px; }

  /* palavras do molde e lacunas: alvo de toque de verdade */
  .imp-molde { line-height: 1.4; font-size: 16px; }
  .imp-palavra, .imp-lacuna {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; min-width: 44px;
  }
  .imp-etiq { min-height: 44px; }
  .imp-link { display: inline-flex; align-items: center; min-height: 44px; }
  .imp-fora summary { min-height: 44px; display: flex; align-items: center; }
  .imp-alt { min-height: 44px; }
  .imp-menu button { min-height: 44px; }

  /* resultado em lista vertical, cada item com copiar */
  .imp-linha { display: flex; gap: var(--s-3); align-items: stretch; }
  .imp-linha > :first-child { flex: 1; min-width: 0; }
  .m-sheet .imp-copiar { display: block; }
  .imp-copiar {
    flex: none; min-width: 76px; min-height: 44px;
    background: var(--e1); color: var(--ink);
    border: 1px solid var(--line-strong); border-radius: var(--r-xl);
    font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  }
  .imp-extras { display: flex; flex-direction: column; gap: var(--s-4); margin-top: var(--s-4); }
  .imp-extra {
    display: flex; flex-direction: column; gap: var(--s-2);
    padding: var(--s-5) var(--s-6);
    background: var(--e1);
    border: 1px solid var(--line-strong); border-radius: var(--r-xl);
  }
  .imp-extra-txt { font-size: 14.5px; line-height: 1.45; overflow-wrap: anywhere; }
}

/* o botão de copiar e os extras só existem no sheet do celular */
.imp-copiar { display: none; }
.imp-linha { display: contents; }
@media (max-width: 767px) {
  .imp-linha { display: flex; }
}

/* Telas muito estreitas (iPhone SE, 320px): a trilha fica só com as bolinhas. */
@media (max-width: 379px) {
  .wz-steps li.now .wz-lab { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .m-sheet { animation: none; transition: none; }
}
