/* Tela única (studio). Valores de tokens.css; todo vidro e desfoque mora no
   pele.css (inclusive o da barra de ação e dos selos sobre o vídeo).
   Uma coluna centrada no computador; no celular a mesma coisa, com a ação
   principal presa embaixo, ao alcance do polegar. */

#studioRoot {
  position: fixed; inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  color: var(--ink);
  font-family: var(--font-ui);
}

/* ------------------------------------------------------------- topo */

.st-top {
  display: flex; align-items: center; gap: var(--s4);
  height: 64px; padding: 0 var(--s5);
  border-bottom: 1px solid var(--glass-line);
  position: relative; z-index: 5;
}
.st-marca {
  display: flex; align-items: center; gap: 8px;
  background: none; border: 0; color: var(--ink); cursor: pointer;
  font: 600 15px/1 var(--font-display); letter-spacing: .01em;
  padding: 6px; border-radius: var(--r-md);
}
.st-marca .cy-simbolo { width: 22px; height: 22px; color: var(--accent); }
.st-modo { width: 400px; }
.st-top-dir { margin-left: auto; display: flex; align-items: center; gap: var(--s2); }
.st-quem { color: var(--ink-soft); font-size: 13px; padding: 0 4px; }
.st-menu { display: contents; }

/* ----------------------------------------------------------- botões */

.st-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px;
  border-radius: var(--r-pill);
  background: var(--e2); border: 1px solid var(--line-strong);
  color: var(--ink); font: 600 14px/1 var(--font-ui);
  cursor: pointer; white-space: nowrap;
  transition: background var(--t-fast) var(--t-ease), transform var(--t-fast) var(--t-ease),
              box-shadow var(--t-base) var(--t-ease), opacity var(--t-base);
}
.st-btn:hover:not(:disabled) { background: var(--e3); }
.st-btn:active:not(:disabled) { transform: scale(.97); }
.st-btn:disabled { opacity: .45; cursor: not-allowed; }
.st-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor;
              stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.st-btn.primary {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
  box-shadow: 0 6px 20px rgba(var(--accent-rgb), .35);
}
.st-btn.primary:hover:not(:disabled) { background: var(--accent-hover); }
.st-btn.primary:disabled { box-shadow: none; }

.st-mini {
  height: 28px; padding: 0 10px; border-radius: var(--r-pill);
  background: transparent; border: 1px solid var(--line);
  color: var(--ink-soft); font: 500 12px/1 var(--font-ui); cursor: pointer;
}
.st-mini:hover:not(:disabled) { color: var(--ink); border-color: var(--line-strong); }
.st-mini:disabled { opacity: .4; cursor: not-allowed; }

/* -------------------------------------------------------------- miolo */

.st-main {
  overflow-y: auto; overflow-x: hidden;
  padding: var(--s6) var(--s5) var(--s8);
  scroll-behavior: smooth;
}
.st-main > section { max-width: 1120px; margin: 0 auto; }
.st-main > section + section { margin-top: var(--s6); }

.st-sec-cab {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s3); margin-bottom: var(--s4);
}
.st-sec-cab h2 { margin: 0; font: var(--t-panel); letter-spacing: -.01em; }
.st-conta { color: var(--ink-soft); font-size: 13px; margin-left: 6px; }
.st-mais { cursor: pointer; }

/* --------------------------------------------------------------- vazio */

.st-vazio { display: grid; place-items: center; min-height: 62vh; gap: var(--s5); }
.st-drop {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  width: min(560px, 100%); padding: 56px 32px;
  border: 1.5px dashed rgba(var(--accent-rgb), .45);
  border-radius: var(--r-2xl); cursor: pointer; text-align: center;
  transition: border-color var(--t-base) var(--t-ease), transform var(--t-base) var(--t-ease);
}
/* mais específico que o .vidro do pele.css, que trocaria a borda tracejada */
.st-vazio .st-drop { border: 1.5px dashed rgba(var(--accent-rgb), .45); }
.st-vazio .st-drop:hover { border-color: var(--accent); transform: translateY(-2px); }
.st-drop-icone svg {
  width: 56px; height: 56px; fill: none; stroke: var(--accent);
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.st-drop-tit { font: 600 24px/1.2 var(--font-display); letter-spacing: -.015em; }
.st-drop-sub { color: var(--ink-soft); font-size: 14px; }
.st-drop-cta { margin-top: 8px; pointer-events: none; }
.st-dica { color: var(--ink-soft); font-size: 13px; text-align: center; max-width: 460px; margin: 0; }
.st-dica b { color: var(--ink-body); }

/* ------------------------------------------------------ link do TikTok */
/* Uma pílula de vidro: ícone, campo, colar (celular) e a seta. Mora no vazio,
   abaixo do "ou", e vai para "Seus vídeos" depois do primeiro vídeo. */

.st-ou {
  display: flex; align-items: center; gap: 14px; width: min(560px, 100%);
  color: var(--ink-dim); font: 500 12px/1 var(--font-ui); letter-spacing: .08em; text-transform: uppercase;
}
.st-ou::before, .st-ou::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.st-link-slot { width: min(560px, 100%); }
.st-link-slot.fontes { width: 100%; margin-bottom: var(--s4); }
.st-link-slot:empty { display: none; }
.st-link-caixa { display: grid; gap: 10px; }

.st-link {
  position: relative;
  display: flex; align-items: center; gap: 6px;
  height: 56px; padding: 0 6px 0 18px;
  border-radius: var(--r-pill);
  border: 1px solid var(--glass-line);
  transition: border-color var(--t-base) var(--t-ease), box-shadow var(--t-base) var(--t-ease);
}
.st-link:focus-within { border-color: var(--accent-wash-line); box-shadow: var(--glass-sombra), 0 0 0 3px var(--focus-ring); }
.st-link.valido { border-color: var(--accent); box-shadow: var(--glass-sombra), var(--accent-brilho); }
.st-link.erro { border-color: rgba(200, 85, 61, .7); }
.st-link-ico { display: grid; place-items: center; width: 22px; flex: none; color: var(--ink-soft); }
.st-link-ico svg { width: 20px; height: 20px; fill: currentColor; }
.st-link.valido .st-link-ico { color: var(--accent-texto); }
.st-link-campo {
  flex: 1; min-width: 0; height: 100%;
  background: transparent; border: 0; outline: none;
  color: var(--ink); font: 500 15px/1 var(--font-ui);
}
.st-link-campo::placeholder { color: var(--ink-dim); }
.st-link-colar {
  height: 36px; padding: 0 14px; flex: none; border-radius: var(--r-pill);
  background: var(--e2); border: 1px solid var(--line-strong); color: var(--ink);
  font: 600 13px/1 var(--font-ui); cursor: pointer;
}
.st-link-ir {
  width: 44px; height: 44px; flex: none; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: var(--accent); border: 0; color: var(--accent-ink);
  box-shadow: 0 6px 20px rgba(var(--accent-rgb), .35);
  transition: transform var(--t-fast) var(--t-ease), background var(--t-fast), opacity var(--t-base);
}
.st-link-ir:hover { background: var(--accent-hover); }
.st-link-ir:active { transform: scale(.92); }
.st-link-ir svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2;
                  stroke-linecap: round; stroke-linejoin: round; }
.st-link-pe {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 0 8px;
}
.st-link-dica { color: var(--ink-dim); font-size: 12.5px; }
.st-link-erro { margin: 0; padding: 0 8px; color: var(--err); font-size: 13px; }

/* o card de uma fonte que vem de link: selo do TikTok e etapas */
.st-fonte-origem {
  position: absolute; left: 6px; top: 6px; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
  height: 20px; padding: 0 7px; border-radius: var(--r-pill);
  background: rgba(10, 9, 16, .7); border: 1px solid rgba(255, 255, 255, .1);
  color: var(--ink); font: 600 10px/1 var(--font-ui);
}
.st-fonte-origem svg { width: 10px; height: 10px; fill: currentColor; flex: none; }
/* nunca passa da borda da capa */
.st-fonte-origem { max-width: calc(100% - 12px); overflow: hidden; white-space: nowrap; }
.st-fonte-q::before { content: "· "; }
/* feito no mini editor (fonte-editor.js); embaixo, para não brigar com o TikTok */
.st-fonte-editado {
  position: absolute; left: 6px; bottom: 6px; z-index: 2;
  display: inline-flex; align-items: center;
  height: 20px; padding: 0 8px; border-radius: var(--r-pill);
  background: rgba(var(--accent-rgb), .85); color: var(--accent-ink);
  font: 600 10px/1 var(--font-ui);
}
.st-fonte-editado[hidden] { display: none; }
.st-fonte-q { white-space: nowrap; color: var(--accent-texto); }
.st-fonte-q:empty { display: none; }
.st-envio.indet i { width: 35% !important; animation: st-indet 1.2s var(--t-ease) infinite; }
@keyframes st-indet { from { transform: translateX(-110%); } to { transform: translateX(300%); } }

/* --------------------------------------------------------------- fontes */

.st-lista-fontes {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--s4);
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
}
.st-fonte {
  display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: var(--s4);
  padding: var(--s3); border: 1px solid var(--glass-line); border-radius: var(--r-xl);
}
.st-fonte.erro { border-color: rgba(200, 85, 61, .5); }
.st-fonte-quadro {
  position: relative; aspect-ratio: 9 / 16; width: 112px;
  border-radius: var(--r-lg); overflow: hidden; background: rgba(0, 0, 0, .4);
}
.st-capa { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.st-envio {
  position: absolute; left: 10px; right: 10px; bottom: 10px; height: 4px;
  background: rgba(255, 255, 255, .15); border-radius: var(--r-pill); overflow: hidden;
}
.st-envio i { display: block; height: 100%; width: 0; background: var(--accent);
              border-radius: inherit; box-shadow: var(--accent-brilho); }
.st-fonte-estado {
  position: absolute; inset: 0; display: grid; place-items: center;
  padding: 0 8px; text-align: center; line-height: 1.35;
  font-size: 13px; color: var(--ink); text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
}
.st-fonte-corpo { display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.st-fonte-cab { display: flex; align-items: center; gap: 8px; }
.st-fonte-nome {
  flex: 1; min-width: 0; font: 600 14px/1.3 var(--font-ui);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.st-x {
  width: 28px; height: 28px; flex: none; border-radius: 50%;
  background: transparent; border: 1px solid var(--line); color: var(--ink-soft);
  font-size: 18px; line-height: 1; cursor: pointer;
}
.st-x:hover { color: var(--ink); border-color: var(--line-strong); }
.st-fonte-erro { margin: 0; color: var(--err); font-size: 13px; }

/* tags: balões que viram campo */
.st-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.st-chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 34px; padding: 0 12px; max-width: 100%;
  border-radius: var(--r-pill); cursor: text;
  background: var(--e1); border: 1px solid var(--line-strong); color: var(--ink);
  font: 500 13px/1 var(--font-ui);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.st-chip:hover { background: var(--e2); }
.st-chip-lab {
  font: 600 10px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-soft);
}
.st-chip-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.st-chip.vazio { border-style: dashed; }
.st-chip.vazio .st-chip-val { color: var(--ink-dim); }
.st-chip.sugerido { border-color: var(--accent-wash-line); }
.st-chip.falta { border-color: rgba(224, 178, 74, .7); }
.st-chip-store .st-chip-lab { color: var(--tag-store-lab); }
.st-chip-product .st-chip-lab { color: var(--tag-product-lab); }
.st-chip-price .st-chip-lab { color: var(--tag-price-lab); }
.st-chip-final_day .st-chip-lab { color: var(--tag-final-lab); }
.st-chip.editando { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }
.st-chip-campo {
  width: 150px; min-width: 0; height: 30px;
  background: transparent; border: 0; outline: none; color: var(--ink);
  font: 500 14px/1 var(--font-ui);
}
.st-chip-campo[type="date"] { width: 140px; color-scheme: dark; }

/* quantos vídeos: [ − n + ] */
.st-qtd { display: flex; align-items: center; gap: var(--s3); margin-top: auto; }
.st-qtd > span { color: var(--ink-soft); font-size: 13px; min-width: 52px; }
/* duração: [ − 6 s + ], logo abaixo de quantos vídeos */
.st-qtd + .st-qtd { margin-top: var(--s2); }
.st-qtd[hidden] { display: none; }
.st-dur-passo output { min-width: 44px; }
.st-passo {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px;
  border-radius: var(--r-pill); background: rgba(0, 0, 0, .3); border: 1px solid var(--line);
}
.st-passo button {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--e2); border: 0; color: var(--ink);
  font: 600 18px/1 var(--font-ui); cursor: pointer;
  transition: background var(--t-fast), transform var(--t-fast);
}
.st-passo button:hover:not(:disabled) { background: var(--accent); }
.st-passo button:active:not(:disabled) { transform: scale(.92); }
.st-passo button:disabled { opacity: .35; cursor: not-allowed; }
.st-passo output { min-width: 28px; text-align: center; font-size: 16px; font-weight: 600; }

/* --------------------------------------------------------------- prontos */

.st-grade {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--s4);
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.st-versao {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--glass-line); border-radius: var(--r-xl);
}
.st-versao.erro { border-color: rgba(200, 85, 61, .5); }
.st-quadro {
  position: relative; aspect-ratio: 9 / 16; background: rgba(0, 0, 0, .45);
}
.st-poster, .st-video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.st-video { background: #000; }
.st-carregando {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  background: rgba(10, 9, 16, .55);
  color: var(--ink-body); font-size: 13px;
}
.st-gira {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .15); border-top-color: var(--accent);
  animation: st-gira .9s linear infinite;
}
@keyframes st-gira { to { transform: rotate(360deg); } }
.st-barra {
  width: 60%; height: 4px; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .12); overflow: hidden;
}
.st-barra i { display: block; height: 100%; width: 0; background: var(--accent);
              border-radius: inherit; box-shadow: var(--accent-brilho); }
.st-tocar {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(10, 9, 16, .55); color: #fff;
  display: grid; place-items: center;
  transition: transform var(--t-fast) var(--t-ease), background var(--t-fast);
}
.st-tocar:hover { transform: scale(1.06); background: rgba(var(--accent-rgb), .8); }
.st-tocar svg { width: 24px; height: 24px; fill: currentColor; margin-left: 3px; }
.st-versao.tocando .st-tocar, .st-versao.tocando .st-poster { display: none; }

.st-versao-corpo { display: flex; flex-direction: column; gap: 10px; padding: var(--s3); }
.st-versao-nome {
  font-size: 12px; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.st-hook-texto {
  min-height: 40px; padding: 8px 10px; border-radius: var(--r-md);
  background: rgba(0, 0, 0, .28); border: 1px solid var(--line);
  font: 500 13.5px/1.4 var(--font-ui); color: var(--ink);
  outline: none; word-break: break-word;
}
.st-hook-texto:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }
.st-hook-acoes { display: flex; gap: 6px; margin-top: 6px; }
.st-embaralhar, .st-baixar { width: 100%; }
.st-versao-extra { display: flex; justify-content: space-between; gap: 6px; }
.st-versao-erro { margin: 0; color: var(--err); font-size: 12.5px; }

/* --------------------------------------------------------- ação embaixo */

.st-acao {
  display: flex; align-items: center; justify-content: flex-end; gap: var(--s4);
  padding: 12px var(--s5);
  border-top: 1px solid var(--glass-line);
}
.st-acao-msg { color: var(--ink-soft); font-size: 13px; }
.st-gerar { height: 48px; padding: 0 32px; font-size: 15px; }

/* ------------------------------------------------- soltar arquivo na tela */

.st-soltar {
  position: fixed; inset: 12px; z-index: 50; pointer-events: none;
  display: grid; place-items: center;
  border: 2px dashed var(--accent); border-radius: var(--r-2xl);
  background: rgba(var(--accent-rgb), .12);
  font: 600 22px/1 var(--font-display); color: var(--ink);
}

.st-retencao { color: var(--ink-dim); font-size: 12px; margin-right: auto; }

/* ------------------------------------------------------------ carrossel */

.st-cr-campos {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5);
  padding: var(--s4) var(--s5); border-radius: var(--r-xl); margin-bottom: var(--s4);
}
.st-cr-modelo { display: flex; align-items: center; gap: 8px; }
.st-cr-modelo .st-campo { height: 36px; max-width: 200px; font-size: 13px; }
.st-cr-cta { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 240px; }
.st-cr-cta .st-campo { flex: 1; min-width: 0; }
.st-cr-lista {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--s4);
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.st-slide {
  display: flex; flex-direction: column; gap: 10px;
  padding: 10px; border: 1px solid var(--glass-line); border-radius: var(--r-xl);
}
.st-slide.erro { border-color: rgba(200, 85, 61, .5); }
.st-slide-quadro {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: var(--r-lg); background: rgba(0, 0, 0, .4);
  touch-action: pan-y;
}
.st-slide-quadro.com-texto { cursor: ns-resize; touch-action: none; }
.st-slide-foto, .st-slide-camada {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  user-select: none; -webkit-user-drag: none; pointer-events: none;
}
.st-slide-camada[hidden], .st-slide-guia[hidden] { display: none; }
.st-slide.arrastando .st-slide-camada { filter: drop-shadow(0 0 6px rgba(var(--accent-rgb), .8)); }
.st-slide-guia {
  position: absolute; left: 0; right: 0; top: 50%; height: 0;
  border-top: 1px dashed var(--warn); pointer-events: none;
}
.st-slide-n {
  position: absolute; top: 8px; left: 8px; padding: 3px 8px;
  border-radius: var(--r-pill); background: rgba(0, 0, 0, .55);
  color: var(--ink); font-size: 11px;
}
.st-slide-corpo { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.st-slide-texto {
  min-height: 40px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: rgba(0, 0, 0, .22);
  font: 500 14px/1.4 var(--font-ui); color: var(--ink);
  overflow-wrap: anywhere; outline: none;
}
.st-slide-texto:focus { border-color: var(--accent); }
.st-slide-texto:empty::before { content: attr(data-ph); color: var(--ink-dim); }
.st-slide-acoes { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.st-slide-ordem { display: inline-flex; gap: 4px; margin-left: auto; }
.st-slide-ordem .st-mini { width: 28px; padding: 0; font-size: 16px; }

/* ------------------------------------------------- de onde vem o hook */

.st-hf { padding: var(--s4) var(--s5); border-radius: var(--r-xl); }
.st-hf-cab { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.st-hf-rot { color: var(--ink-soft); font-size: 13px; font-weight: 600; }
.st-hf-seg { width: min(380px, 100%); }
.st-hf-dica { margin: 10px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.45; }
.st-hf-corpo { margin-top: var(--s4); }
.st-hf-corpo .st-hf-dica:first-child { margin-top: 0; }
.st-hf-linha { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.st-hf-linha .st-hf-dica { margin: 0 0 0 4px; }
.st-hf-linha.lendo { opacity: .55; pointer-events: none; }
.st-hf-linha label.st-btn { cursor: pointer; }

.st-campo {
  height: 40px; padding: 0 14px; min-width: 0;
  background: rgba(0, 0, 0, .28); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  font: 500 14px/1.4 var(--font-ui);
}
.st-campo:focus { outline: none; border-color: var(--accent); }
textarea.st-campo { height: auto; padding: 10px 14px; resize: vertical; width: 100%; }
select.st-campo { flex: 1; max-width: 340px; cursor: pointer; }

.st-print { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s4); }
.st-print-img {
  width: 96px; aspect-ratio: 9 / 16; object-fit: cover;
  border-radius: var(--r-md); border: 1px solid var(--line);
}
.st-print-img[hidden] { display: none; }
.st-print-dir { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.st-print-dir > * { max-width: 640px; width: 100%; }
.st-print-dir .st-mini { width: auto; }
.st-print-texto { font-size: 15px; }
.st-print-alts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.st-print-alts .st-hf-dica { margin: 0; width: 100%; }
.st-print-alts .st-mini { height: auto; min-height: 28px; padding: 6px 10px; text-align: left; white-space: normal; }
.st-print-uso { width: min(420px, 100%); }
.st-print-molde .st-hf-dica { margin: 0 0 6px; }
.st-print-aviso { color: var(--warn); margin: 0; }

.st-molde { margin: 0; font-size: 16px; line-height: 2; }
.st-palavra, .st-lacuna {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 4px;
  background: none; border: 1px solid transparent; border-radius: var(--r-sm);
  color: var(--ink); font: inherit; cursor: pointer;
}
.st-palavra:hover { border-color: var(--line-strong); }
.st-lacuna {
  padding: 0 10px; border-radius: var(--r-pill);
  background: rgba(var(--accent-rgb), .22); border-color: rgba(var(--accent-rgb), .6);
  color: var(--ink); font-weight: 600; font-size: 14px;
}
.st-slotmenu {
  position: fixed; z-index: 300;
  display: flex; flex-direction: column; min-width: 140px; padding: 6px;
  border-radius: var(--r-lg);
}
.st-slotmenu button {
  height: 36px; padding: 0 12px; text-align: left;
  background: none; border: 0; border-radius: var(--r-sm);
  color: var(--ink); font: 500 14px/1 var(--font-ui); cursor: pointer;
}
.st-slotmenu button:hover { background: rgba(var(--accent-rgb), .2); }

/* ------------------------------------------------------- aba Clone */

.cl { display: flex; flex-direction: column; gap: var(--s3); width: min(760px, 100%);
      margin: 0 auto var(--s5); }
.cl[hidden] { display: none; }
.cl-topo h2 { margin: 0; font-size: 18px; }
.cl-topo .st-hf-dica { margin-top: 6px; }
.cl-andando { display: flex; align-items: center; gap: var(--s3); padding: 12px 16px;
              border-radius: var(--r-xl); }
.cl-andando[hidden] { display: none; }
.cl-barra { flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .08);
            overflow: hidden; }
.cl-barra i { display: block; height: 100%; width: 0; background: var(--accent);
              transition: width .3s ease; }
.cl-andando-txt { color: var(--ink-soft); font-size: 13px; white-space: nowrap; }
.cl-receita { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s4);
              padding: var(--s4) var(--s5); border-radius: var(--r-xl); }
.cl-receita[hidden] { display: none; }
/* sem capa (o TikTok não mandou), o texto não pode cair na coluna dela */
.cl-receita:has(> .cl-capa[hidden]) { grid-template-columns: minmax(0, 1fr); }
.cl-capa { width: 96px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: var(--r-md);
           border: 1px solid var(--line); }
.cl-capa[hidden] { display: none; }
.cl-dir { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-width: 0; }
.cl-bloco { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.cl-bloco .st-hf-dica { margin: 0; }
.cl-bloco .st-hf-dica[hidden] { display: none; }
.cl-bloco-cab { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cl-ia { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-pill);
         font-size: 12px; font-weight: 600; color: var(--ink-soft);
         background: rgba(var(--accent-rgb), .14); border: 1px solid rgba(var(--accent-rgb), .35); }
.cl-ia[hidden], .cl-corrigir[hidden], .cl-auto[hidden] { display: none; }
.cl-ia.baixa { color: var(--warn); background: rgba(255, 180, 0, .1); border-color: rgba(255, 180, 0, .4); }
.cl-corrigir { margin-left: auto; }
/* fora da correção o molde só mostra: as palavras não são botões */
.st-molde .cl-txt { white-space: pre-wrap; }
.st-molde .st-lacuna.fixa { cursor: default; }
.cl-auto { margin: 0; padding: 10px 14px; border-radius: var(--r-lg); font-size: 13.5px; }
.cl-linha { flex-direction: row; align-items: baseline; gap: 10px; }
.cl-ritmo { font-size: 14px; }
.cl-linha[hidden] { display: none; }
.cl-estilo { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.cl-estilo i { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line-strong);
               flex: none; }
.cl-tags { display: flex; gap: var(--s3); flex-wrap: wrap; width: 100%; }
.cl-tag { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 140px; }
.cl-acervo { display: flex; flex-direction: column; gap: 10px; }
.cl-acervo[hidden] { display: none; }
.cl-acervo-cab { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cl-acervo-cab .st-hf-dica { margin: 0; }
.cl-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.cl-item { display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: var(--r-lg);
           border: 1px solid var(--glass-line); }
.cl-item.melhor { border-color: var(--accent); }
.cl-item-capa { position: relative; width: 100%; aspect-ratio: 9 / 16; border-radius: var(--r-md);
                overflow: hidden; background: rgba(0, 0, 0, .3); }
.cl-item-capa img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cl-selo { position: absolute; left: 6px; top: 6px; padding: 3px 8px; border-radius: var(--r-pill);
           background: rgba(0, 0, 0, .65); color: var(--ink); font-size: 11px; font-weight: 600; }
.cl-item.melhor .cl-selo { background: var(--accent); color: #fff; }
.cl-item-nome { font-size: 12.5px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis;
                white-space: nowrap; }
.cl-item .st-btn { height: 34px; width: 100%; }
.cl-vazio { display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
            padding: var(--s4) var(--s5); border-radius: var(--r-xl); }
.cl-vazio p { margin: 0; font-size: 14px; line-height: 1.45; }
.cl-vazio:not(.destaque) p { color: var(--ink-soft); font-size: 13px; }
.cl-vazio label.st-btn { cursor: pointer; }
.cl-link-corte { width: 100%; }
.cl-vazio:not(.destaque) .cl-link-corte { height: 48px; background: rgba(0, 0, 0, .22);
                                          border: 1px solid var(--line); }

/* ------------------------------------------------------------- folha */

.modal.st-folha { width: min(560px, 92vw); max-width: none; padding: 0; max-height: 86vh; }
.modal.st-folha[open] { display: flex; flex-direction: column; }
.st-folha-cab {
  position: relative; display: flex; align-items: center; gap: var(--s3);
  padding: var(--s4) var(--s5); border-bottom: 1px solid var(--glass-line);
}
.st-folha-cab h2 { margin: 0; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-folha-cab .modal-x { margin-left: auto; }
.st-folha-corpo { overflow-y: auto; padding: var(--s5); }
.st-folha-form { display: flex; flex-direction: column; gap: 12px; }
.st-folha-form > .st-btn { align-self: flex-end; }
.st-folha-form .st-hf-dica { margin: 0; }
.st-folha-campo { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.st-folha-txt { display: inline-flex; align-items: center; cursor: pointer; }
.st-folha-pe { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; }
.st-perigo { color: var(--err); }
.st-perigo:hover:not(:disabled) { color: var(--err); border-color: var(--err); }

.st-itens {
  list-style: none; margin: 0; padding: 0;
  max-height: 44vh; overflow-y: auto;
  border: 1px solid var(--line); border-radius: var(--r-lg);
}
.st-item { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; }
.st-item + .st-item { border-top: 1px solid var(--line); }
.st-item-txt { flex: 1; min-width: 0; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.st-item-usos { color: var(--ink-dim); font-size: 12px; }
.st-item-x {
  width: 32px; height: 32px; flex: none;
  background: none; border: 0; border-radius: var(--r-pill);
  color: var(--ink-soft); font-size: 20px; line-height: 1; cursor: pointer;
}
.st-item-x:hover { color: var(--err); background: rgba(200, 85, 61, .12); }

/* ----------------------------------------------- espelhar e tela cheia */

.st-fonte-acoes { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; }
.st-espelhar {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px; border-radius: var(--r-pill);
  background: transparent; border: 1px dashed var(--line-strong);
  color: var(--ink-soft); font: 600 12px/1 var(--font-ui); cursor: pointer;
  transition: background var(--t-fast) var(--t-ease), color var(--t-fast), border-color var(--t-fast);
}
.st-espelhar svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2;
                   stroke-linecap: round; stroke-linejoin: round; }
/* 44 px de toque sem a pílula crescer */
.st-espelhar { position: relative; }
.st-espelhar::after { content: ""; position: absolute; inset: -7px -2px; }
.st-espelhar:hover:not(:disabled) { color: var(--ink); border-color: var(--accent); }
.st-espelhar.on {
  background: rgba(var(--accent-rgb), .22); border-style: solid; border-color: var(--accent);
  color: var(--ink);
}
.st-fonte-quadro { perspective: 600px; }
.st-fonte-quadro.espelhado .st-capa { transform: scaleX(-1); }
/* versão pronta cujo arquivo foi espelhado depois: vira por CSS até o
   vídeo refeito chegar */
.st-quadro .st-poster, .st-quadro .st-video { transition: transform .45s var(--t-ease); }
.st-quadro.virado .st-poster, .st-quadro.virado .st-video { transform: scaleX(-1); }
/* tela cheia: o vídeo 9:16 inteiro, com faixas pretas, sem cortar */
.st-video:fullscreen { object-fit: contain; background: #000; transform: none; }
.st-video:-webkit-full-screen { object-fit: contain; background: #000; transform: none; }
.st-vazio.compacto { min-height: 0; padding: var(--s4) 0; }
.st-vazio.compacto .st-drop { padding: 32px 24px; }
.st-vazio.compacto .st-dica { display: none; }

/* ---------------------------------------------------- aba Modelos */

.mp { display: flex; flex-direction: column; gap: var(--s4); }
.mp[hidden] { display: none; }
.mp-topo { min-width: 0; }
.mp-chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px;
  scrollbar-width: thin; scroll-snap-type: x proximity;
}
.mp-chip {
  flex: none; scroll-snap-align: start;
  height: 36px; padding: 0 16px; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line-strong);
  color: var(--ink-soft); font: 600 13px/1 var(--font-ui); cursor: pointer;
  max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.mp-chip:hover { color: var(--ink); }
.mp-chip.on {
  background: rgba(var(--accent-rgb), .25); border-color: var(--accent); color: var(--ink);
  box-shadow: 0 4px 18px rgba(var(--accent-rgb), .25);
}
.mp-chip-novo { border-style: dashed; color: var(--accent); }
.mp-chip, .mp-trilha { -webkit-user-select: none; user-select: none; }

.mp-grade { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: var(--s4); align-items: start; }
.mp-palco, .mp-biblio { border-radius: var(--r-2xl); padding: var(--s5); min-width: 0; }
.mp-palco { display: flex; flex-direction: column; gap: var(--s4); }
.mp-cab { display: flex; align-items: center; gap: 10px; }
.mp-nome {
  flex: 1; min-width: 0; height: 40px; padding: 0 12px; margin-left: -12px;
  background: transparent; border: 1px solid transparent; border-radius: var(--r-lg);
  color: var(--ink); font: 600 20px/1.2 var(--font-display); letter-spacing: -.01em;
}
.mp-nome:hover { border-color: var(--line); }
.mp-nome:focus { outline: none; border-color: var(--accent); background: rgba(0, 0, 0, .2); }
.mp-salvo { font-size: 12px; color: var(--ink-dim); white-space: nowrap; }
.mp-salvo.salvo { color: #6fd39a; }
.mp-salvo.erro { color: var(--warn); white-space: normal; max-width: 240px; }
.mp-mais { position: relative; }
.mp-mais .st-mini { width: 32px; padding: 0; font-size: 16px; }
.mp-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30;
  display: flex; flex-direction: column; min-width: 170px; padding: 6px;
  border-radius: var(--r-lg); background: rgba(22, 19, 34, .97);
  border: 1px solid var(--glass-line); box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
}
.mp-menu[hidden] { display: none; }
.mp-menu button {
  height: 38px; padding: 0 12px; text-align: left; border: 0; border-radius: var(--r-md);
  background: none; color: var(--ink); font: 500 14px/1 var(--font-ui); cursor: pointer;
}
.mp-menu button:hover { background: rgba(var(--accent-rgb), .18); }
.mp-dica { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.5; }
.mp-dica b { color: var(--ink-body); }

/* a trilha: os cartões na ordem do vídeo final */
.mp-trilha-caixa {
  position: relative; overflow-x: auto; overflow-y: visible;
  margin: 0 calc(var(--s5) * -1); padding: 6px var(--s5) 14px;
  scrollbar-width: thin;
}
.mp-trilha {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 12px; min-height: 196px; align-items: flex-start;
  border-radius: var(--r-xl); transition: background var(--t-base);
}
.mp-trilha.recebendo { background: rgba(var(--accent-rgb), .08); }
.mp-cartao {
  flex: none; width: 96px; display: flex; flex-direction: column; gap: 8px;
  touch-action: pan-x; user-select: none; -webkit-user-select: none;
  -webkit-touch-callout: none; cursor: grab; position: relative;
}
.mp-cartao.levantado { z-index: 10; cursor: grabbing; }
.mp-cartao.levantado .mp-q { box-shadow: 0 16px 36px rgba(0, 0, 0, .55), 0 0 0 2px var(--accent); }
.mp-q {
  position: relative; aspect-ratio: 9 / 16; border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(160deg, rgba(var(--accent-rgb), .22), rgba(0, 0, 0, .45));
  border: 1px solid var(--line-strong);
  transition: box-shadow var(--t-base), transform var(--t-base);
}
.mp-cartao.corte .mp-q { border: 1.5px dashed rgba(var(--accent-rgb), .75); }
.mp-cartao.clipe .mp-q { border-color: rgba(255, 255, 255, .22); }
.mp-cartao.perdido .mp-q { opacity: .45; }
.mp-q img, .mp-q .mp-previa {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none;
}
.mp-q img.espelhado { transform: scaleX(-1); }
.mp-q-vazio {
  position: absolute; inset: 22% 18%; border-radius: var(--r-md);
  border: 1.5px solid rgba(255, 255, 255, .18);
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .05) 0 6px, transparent 6px 12px);
}
.mp-selo {
  position: absolute; left: 6px; bottom: 6px; padding: 3px 7px; border-radius: var(--r-pill);
  background: rgba(var(--accent-rgb), .85); color: #fff; font: 700 10px/1 var(--font-ui);
  letter-spacing: .02em;
}
.mp-selo.clipe { background: rgba(10, 9, 16, .78); border: 1px solid rgba(255, 255, 255, .25); }
.mp-auto {
  position: absolute; right: 6px; bottom: 6px; padding: 3px 6px; border-radius: var(--r-pill);
  background: rgba(10, 9, 16, .7); color: var(--ink-soft); font: 600 9px/1 var(--font-ui);
}
.mp-num {
  position: absolute; left: 6px; top: 6px; min-width: 20px; height: 20px; padding: 0 5px;
  display: grid; place-items: center; border-radius: var(--r-pill);
  background: rgba(10, 9, 16, .72); color: var(--ink); font-size: 11px;
}
.mp-x {
  position: absolute; right: 5px; top: 5px; width: 24px; height: 24px;
  display: grid; place-items: center; border: 0; border-radius: 50%;
  background: rgba(10, 9, 16, .72); color: var(--ink); font-size: 16px; line-height: 1;
  cursor: pointer; opacity: 0; transition: opacity var(--t-fast), background var(--t-fast);
}
.mp-cartao:hover .mp-x, .mp-clipe:hover .mp-x { opacity: 1; }
.mp-x:hover { background: var(--err); }
.mp-pe { display: flex; justify-content: center; min-height: 28px; align-items: center; }
.mp-dur { color: var(--ink-dim); font-size: 12px; }
.mp-passo { height: 28px; }
.mp-passo button { width: 26px; height: 28px; font-size: 15px; }
.mp-passo output { min-width: 40px; font-size: 12px; }
.mp-marca {
  position: absolute; width: 3px; margin-left: -1.5px; border-radius: 2px;
  background: var(--accent); box-shadow: 0 0 12px var(--accent); pointer-events: none;
}
.mp-fantasma {
  position: fixed; z-index: 500; width: 64px; aspect-ratio: 9 / 16; object-fit: cover;
  border-radius: var(--r-md); pointer-events: none; translate: -50% -50%; rotate: -4deg;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .55), 0 0 0 2px var(--accent);
}
.mp-adicionar { display: flex; gap: 8px; flex-wrap: wrap; }

/* tempo: a barra empilhada na ordem dos cartões */
.mp-tempo { display: flex; flex-direction: column; gap: 10px; }
.mp-tempo-cab { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mp-ate { color: var(--ink-dim); font-size: 12px; }
.mp-barra {
  display: flex; gap: 3px; height: 14px; padding: 3px; border-radius: var(--r-pill);
  background: rgba(0, 0, 0, .35); border: 1px solid var(--line); overflow: hidden;
}
.mp-barra.estoura { border-color: var(--warn); }
.mp-parte { display: block; height: 100%; border-radius: var(--r-pill); min-width: 4px; }
.mp-parte.clipe { background: linear-gradient(90deg, var(--accent), #b48cff); }
.mp-parte.corte { background: rgba(255, 255, 255, .55); }
.mp-conta { margin: 0; color: var(--ink-soft); font-size: 13px; }
.mp-aviso { margin: 0; color: var(--warn); font-size: 13px; }

/* texto */
.mp-texto { display: flex; flex-direction: column; gap: 12px; padding-top: var(--s3);
            border-top: 1px solid var(--line); }
.mp-texto-cab { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mp-texto-seg { width: min(260px, 100%); }
.mp-estilo[hidden] { display: none; }
.mp-controles { display: flex; flex-direction: column; gap: 10px; }
.mp-linha { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mp-linha > .st-hf-rot { width: 92px; flex: none; }
.mp-linha > .st-campo { flex: 1; min-width: 0; }
.mp-opcoes { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.mp-opcoes .st-mini.on { background: rgba(var(--accent-rgb), .25); border-color: var(--accent); color: var(--ink); }
.mp-cores { display: flex; align-items: center; gap: 12px; }
.mp-cor { width: 40px; height: 32px; padding: 0; border: 1px solid var(--line-strong);
          border-radius: var(--r-sm); background: none; cursor: pointer; }
.mp-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-soft); }

/* seus clipes */
.mp-biblio { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 0; }
.mp-biblio-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mp-biblio-cab h3 { margin: 0; font: 600 15px/1.2 var(--font-display); }
.mp-enviar { display: inline-flex; align-items: center; cursor: pointer; }
.mp-enviar.lendo { opacity: .6; pointer-events: none; }
.mp-clipes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mp-clipe {
  position: relative; aspect-ratio: 9 / 16; padding: 0; overflow: hidden; cursor: grab;
  border-radius: var(--r-md); border: 1px solid var(--line-strong); background: rgba(0, 0, 0, .4);
  touch-action: manipulation;
  transition: transform var(--t-fast) var(--t-ease), border-color var(--t-fast);
}
.mp-clipe:hover { transform: translateY(-2px); border-color: var(--accent); }
.mp-clipe img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.mp-clipe-dur {
  position: absolute; left: 4px; bottom: 4px; padding: 2px 5px; border-radius: var(--r-pill);
  background: rgba(10, 9, 16, .75); color: var(--ink); font-size: 10px;
}
.mp-clipe-nome {
  position: absolute; left: 0; right: 0; top: 0; padding: 4px 6px 10px;
  background: linear-gradient(rgba(0, 0, 0, .6), transparent);
  color: var(--ink); font-size: 10px; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mp-clipes-folha { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mp-folha .mp-linha > .st-hf-rot { width: 92px; }

/* ================================================================ celular */

@media (max-width: 767px) {
  .st-top { height: 56px; padding: 0 12px; gap: 8px; }
  .st-marca span, .st-novo-txt { display: none; }
  .st-modo { width: auto; flex: 1; max-width: 240px; }
  .st-menu-btn, .st-novo-btn { width: 40px; padding: 0; font-size: 18px; }
  /* o menu: uma folha pequena que desce do canto */
  .st-menu {
    display: none; position: absolute; right: 12px; top: 60px; z-index: 20;
    flex-direction: column; align-items: stretch; gap: 6px; min-width: 200px;
    padding: 10px; border-radius: var(--r-xl);
    background: rgba(20, 18, 30, .95); border: 1px solid var(--glass-line);
    box-shadow: var(--glass-sombra);
  }
  .st-top-dir.aberto .st-menu { display: flex; }
  .st-menu .st-btn { justify-content: flex-start; width: 100%; }
  .st-menu .st-quem { padding: 4px 8px 8px; font-size: 13px; }
  .st-top-dir { gap: 6px; }
  .st-top-dir .st-btn { height: 36px; padding: 0 12px; font-size: 13px; }
  .st-main { padding: var(--s4) 16px 120px; }
  .st-lista-fontes { grid-template-columns: minmax(0, 1fr); }
  .st-fonte { grid-template-columns: 88px minmax(0, 1fr); gap: 12px; }
  .st-fonte-quadro { width: 88px; }
  /* capa estreita: o logo já diz TikTok; fica "♪ 540p" */
  .st-fonte-origem:has(.st-fonte-q:not(:empty)) .st-fonte-tk { display: none; }
  .st-fonte-origem:has(.st-fonte-q:not(:empty)) .st-fonte-q::before { content: none; }
  .st-grade { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .st-versao-corpo { padding: 10px; gap: 8px; }
  .st-btn { height: 40px; padding: 0 12px; }
  .st-acao {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    flex-direction: column; align-items: stretch; gap: 6px;
  }
  .st-acao-msg { text-align: center; }
  .st-acao-msg:empty { display: none; }
  .st-gerar { width: 100%; }
  .st-drop { padding: 40px 20px; }
  .st-drop-tit { font-size: 20px; }
  .st-vazio { gap: var(--s4); min-height: 0; padding-top: var(--s2); }
  .st-link { height: 52px; padding-left: 14px; }
  .st-link-campo { font-size: 16px; }            /* 16px: o iPhone não dá zoom */
  .st-link-pe { padding: 0 4px; }
  .st-link-dica { flex: 1 0 100%; }
  .st-chip-campo { width: 120px; }
  /* as quatro abas ganham uma faixa só delas, logo abaixo do topo */
  .st-top { flex-wrap: wrap; height: auto; padding: 8px 12px; row-gap: 8px; }
  .st-modo { order: 10; flex: 1 0 100%; max-width: none; width: 100%; }
  .st-modo button { min-height: 40px; font-size: 12.5px; }
  .mp-grade { grid-template-columns: minmax(0, 1fr); }
  .mp-biblio { display: none; }
  .mp-palco { padding: 16px; border-radius: var(--r-xl); }
  .mp-trilha-caixa { margin: 0 -16px; padding: 6px 16px 14px; }
  .mp-cartao { width: 84px; }
  .mp-x { opacity: 1; width: 28px; height: 28px; }
  .mp-passo button { width: 30px; height: 32px; }
  .mp-nome { font-size: 18px; }
  .mp-linha > .st-hf-rot { width: 100%; }
  .mp-adicionar .st-btn { flex: 1; }
  .st-cr-lista { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .st-slide { padding: 8px; }
  .st-slide-texto { font-size: 16px; }
  .st-slide-acoes .st-mini { height: 36px; }
  .st-slide-ordem .st-mini { width: 36px; }
  .st-slide-acoes .st-x { width: 36px; height: 36px; }
  .st-cr-cta { min-width: 0; width: 100%; }
  .st-cr-modelo { width: 100%; }
  .st-cr-modelo .st-campo { flex: 1; max-width: none; height: 40px; font-size: 16px; }
  .st-hf { padding: 14px; }
  .cl-receita { grid-template-columns: 72px minmax(0, 1fr); padding: 14px; gap: 12px; }
  .cl-receita:has(> .cl-capa[hidden]) { grid-template-columns: minmax(0, 1fr); }
  .cl-capa { width: 72px; }
  .cl-tag { min-width: 0; flex: 1 1 100%; }
  .cl-tag .st-campo { font-size: 16px; }         /* 16px: o iPhone não dá zoom */
  .cl-lista { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cl-vazio { padding: 14px; }
  .cl-andando { padding: 10px 12px; }
  .st-hf-seg { width: 100%; }
  .st-hf-seg button { font-size: 12px; }
  .st-print { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; }
  .st-print-img { width: 56px; }
  .st-print-texto { min-height: 84px; }
  .st-print-uso { width: 100%; }
  .st-print-uso button { font-size: 11.5px; }
  .st-palavra, .st-lacuna { min-height: 44px; }
  select.st-campo { max-width: none; }
  .st-slotmenu button, .st-item-x { min-height: 44px; min-width: 44px; }
  /* a folha sobe de baixo, com a alça no topo */
  .modal.st-folha {
    width: 100vw; max-width: 100vw; max-height: 88vh;
    margin: auto 0 0; border-radius: var(--r-2xl) var(--r-2xl) 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .st-folha-grip {
    position: absolute; top: 6px; left: 50%; width: 36px; height: 4px; margin-left: -18px;
    border-radius: 2px; background: var(--line-strong);
  }
  .st-folha-cab { padding-top: 18px; }
  .st-folha-pe .st-mini { height: 40px; }
}

@media (max-width: 380px) {
  .st-grade { grid-template-columns: minmax(0, 1fr); }
}
