/* Painel do StarResourcePacks (telas, tags e modelos). Prefixo rp- para não depender do build do Tailwind. */
.rp-aviso { border-radius: 12px; padding: 10px 14px; font-size: 13px; font-weight: 600; border: 1px solid rgba(96, 165, 250, .35); background: rgba(59, 130, 246, .12); color: #bfdbfe; }
.rp-aviso.erro { border-color: rgba(248, 113, 113, .4); background: rgba(239, 68, 68, .12); color: #fecaca; }
.rp-aviso.ok { border-color: rgba(52, 211, 153, .4); background: rgba(16, 185, 129, .12); color: #a7f3d0; }

.rp-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.rp-barra select, .rp-campo input[type=text], .rp-campo input[type=number], .rp-campo select, .rp-campo textarea {
  width: 100%; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(8, 10, 24, .7);
  color: #e2e8f0; font-size: 13px; padding: 8px 10px; outline: none; font-family: inherit;
}
.rp-barra select { width: auto; min-width: 220px; }
.rp-campo textarea { min-height: 76px; resize: vertical; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.rp-campo input:focus, .rp-campo select:focus, .rp-campo textarea:focus, .rp-barra select:focus { border-color: #60a5fa; }
.rp-campo { display: block; margin-bottom: 10px; }
.rp-campo > span { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; }
.rp-campo small { display: block; margin-top: 3px; font-size: 11px; color: #64748b; line-height: 1.35; }
.rp-linha { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rp-marca { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #cbd5e1; margin-bottom: 8px; cursor: pointer; }
.rp-marca input { width: 16px; height: 16px; accent-color: #3b82f6; }
.rp-cor { display: flex; align-items: center; gap: 8px; }
.rp-cor input[type=color] { width: 42px; height: 34px; padding: 0; border: 1px solid rgba(255, 255, 255, .15); border-radius: 8px; background: none; cursor: pointer; }

.rp-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #94a3b8; }
.rp-status i { width: 8px; height: 8px; border-radius: 50%; background: #64748b; display: inline-block; }
.rp-status.on i { background: #34d399; box-shadow: 0 0 8px #34d399; }
.rp-seguranca { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.rp-seg { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 18px; border: 1px solid transparent; overflow-wrap: anywhere; }
.rp-seg::before { content: ''; width: 7px; height: 7px; border-radius: 2px; background: currentColor; flex: none; }
.rp-seg.ok { color: #6ee7b7; background: rgba(16, 185, 129, .12); border-color: rgba(16, 185, 129, .3); }
.rp-seg.espera { color: #93c5fd; background: rgba(59, 130, 246, .12); border-color: rgba(59, 130, 246, .3); }
.rp-seg.aberto { color: #fcd34d; background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .3); }
.rp-seg.alerta { color: #fda4af; background: rgba(244, 63, 94, .14); border-color: rgba(244, 63, 94, .35); }
.rp-seg-liberar { font-size: 11px; }
/* Cor cheia com texto escuro: le igual no tema escuro e no claro (o .rp-mini claro sumia no claro). */
.rp-seg-liberar.destaque { background: #f59e0b; border-color: #f59e0b; color: #1c1917; }
.rp-seg-liberar.destaque:hover { background: #fbbf24; border-color: #fbbf24; }
.rp-seg-dica { font-size: 11px; font-weight: 600; color: #fcd34d; }
html[data-modo="claro"] .rp-seg-dica { color: #b45309; }
html[data-modo="claro"] .rp-seg-liberar:not(.destaque) { color: #334155; border-color: rgba(15, 23, 42, .2); background: rgba(15, 23, 42, .04); }

.rp-abas { display: inline-flex; max-width: 100%; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .1); overflow-x: auto; overflow-y: hidden; margin-left: auto; scrollbar-width: thin; }
.rp-abas button { flex: none; padding: 8px 18px; font-size: 13px; font-weight: 700; color: #94a3b8; background: transparent; border: 0; cursor: pointer; white-space: nowrap; }
.rp-abas button.ativa { background: #2563eb; color: #fff; }

.rp-caixa { border-radius: 16px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(20, 24, 48, .8); padding: 14px; }
.rp-caixa h3 { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: #93c5fd; margin: 0 0 10px; }
.rp-lista button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 6px; text-align: left; padding: 8px 10px; margin-bottom: 6px;
  border-radius: 10px; border: 1px solid transparent; background: rgba(255, 255, 255, .04); color: #cbd5e1; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.rp-lista button > span { min-width: 0; }
.rp-lista button b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-lista button small { display: block; margin-top: 1px; font-size: 11px; font-weight: 500; color: #7c8aa3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-lista button:hover { border-color: rgba(96, 165, 250, .4); }
.rp-lista button.ativa { border-color: #60a5fa; background: rgba(59, 130, 246, .18); color: #fff; }
.rp-selo { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 2px 6px; border-radius: 999px; background: rgba(52, 211, 153, .18); color: #6ee7b7; }
.rp-novo { display: flex; gap: 6px; margin-top: 8px; }
.rp-novo input { flex: 1; min-width: 0; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(8, 10, 24, .7); color: #e2e8f0; font-size: 12px; padding: 7px 9px; }
.rp-mini { padding: 7px 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .06); color: #e2e8f0; font-size: 12px; font-weight: 700; cursor: pointer; }
.rp-mini:hover { border-color: #60a5fa; }
.rp-mini.perigo { color: #fca5a5; }
.rp-mini.perigo:hover { border-color: #f87171; }

/* Palco: a tela do jogo em escala. As medidas internas são as do jogo (455x256). */
.rp-palco-fora { overflow-x: auto; overflow-y: hidden; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .08); background: #05060f; }
.rp-palco { position: relative; width: 455px; height: 256px; transform-origin: top left; image-rendering: pixelated; background-repeat: no-repeat; background-position: center; background-size: auto 256px; }
.rp-casa { position: absolute; width: 16px; height: 16px; box-sizing: border-box; border: 1px dashed rgba(255, 255, 255, .16); cursor: pointer; }
.rp-casa:hover { border-color: #93c5fd; background: rgba(147, 197, 253, .18); }
.rp-casa.tem { border: 1px solid #34d399; background: rgba(52, 211, 153, .28); }
.rp-casa.sel { border: 1px solid #fbbf24; background: rgba(251, 191, 36, .35); box-shadow: 0 0 0 1px #fbbf24; }
.rp-casa.baixo { border-color: rgba(167, 139, 250, .3); }
.rp-legenda { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 11px; color: #94a3b8; }
.rp-legenda span::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 5px; vertical-align: -1px; border-radius: 2px; }
.rp-legenda .l1::before { border: 1px solid #34d399; background: rgba(52, 211, 153, .28); }
.rp-legenda .l2::before { border: 1px solid #fbbf24; background: rgba(251, 191, 36, .35); }
.rp-legenda .l3::before { border: 1px dashed rgba(167, 139, 250, .6); }

.rp-vazio { padding: 28px; text-align: center; color: #94a3b8; font-size: 14px; }

.rp-salvar { position: fixed; left: 50%; bottom: 20px; width: max-content; max-width: calc(100vw - 24px); transform: translate(-50%, 140px); transition: transform .25s; z-index: 60; display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 16px; border: 1px solid rgba(96, 165, 250, .5); background: rgba(15, 18, 40, .97); box-shadow: 0 20px 50px rgba(0, 0, 0, .5); font-size: 13px; color: #e2e8f0; }
.rp-salvar.visivel { transform: translate(-50%, 0); }

/* ------------------------------------------------------------------ peças comuns */
.rp-nota { margin: 8px 0 0; font-size: 12px; line-height: 1.45; color: #8492ab; }
.rp-cab { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-bottom: 10px; }
.rp-cab h3 { margin: 0; }
.rp-cab .rp-nota { margin: 0; }
.rp-mini:disabled, .rp-m-link:disabled { opacity: .45; cursor: not-allowed; }
.rp-mini:focus-visible, .rp-lista button:focus-visible, .rp-chips button:focus-visible, .rp-abas button:focus-visible,
.rp-m-comp:focus-visible, .rp-m-filtros button:focus-visible, .rp-m-link:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }
.rp-abas button { font-family: inherit; }

/* ------------------------------------------------------------------ aba Telas: seletor em cima, prévia fixa de um lado, cartões do outro */
.rp-telas-topo { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 16px; }
.rp-telas-topo h3 { margin: 0; }
.rp-telas-topo .rp-novo { margin: 0; flex: 0 1 300px; }
.rp-chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 240px; min-width: 0; }
.rp-chips button { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .04); color: #cbd5e1; font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer; }
.rp-chips button > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-chips button:hover { border-color: rgba(96, 165, 250, .5); }
.rp-chips button.ativa { border-color: #60a5fa; background: rgba(59, 130, 246, .2); color: #fff; }
.rp-telas-corpo { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
.rp-fixo { position: sticky; top: var(--rp-topo, 14px); display: grid; gap: 16px; max-height: calc(100vh - var(--rp-topo, 14px) - 14px); overflow-y: auto; scrollbar-width: thin; }
@media (min-width: 1101px) { .rp-com-barra .rp-fixo { max-height: calc(100vh - var(--rp-topo, 14px) - 92px); } }
.rp-props { display: grid; gap: 16px; min-width: 0; }
.rp-fixo > *, .rp-props > * { min-width: 0; }
.rp-duas { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.rp-duas .rp-campo textarea { min-height: 80px; }
.rp-opcao { display: flex; align-items: flex-start; gap: 10px; padding: 9px 10px; margin-bottom: 6px; border-radius: 10px; background: rgba(255, 255, 255, .03); cursor: pointer; }
.rp-opcao:last-child { margin-bottom: 0; }
.rp-opcao:hover { background: rgba(255, 255, 255, .06); }
.rp-opcao input { flex: none; width: 16px; height: 16px; margin-top: 2px; accent-color: #3b82f6; }
.rp-opcao b { display: block; font-size: 13px; font-weight: 600; color: #e2e8f0; }
.rp-opcao small { display: block; margin-top: 1px; font-size: 11.5px; line-height: 1.4; color: #8492ab; }
.rp-t-botoes button:last-child { margin-bottom: 0; }
.rp-perigo-linha { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.rp-perigo-linha .rp-nota { margin: 0; }
.rp-campo:last-child { margin-bottom: 0; }
@media (max-width: 1100px) {
  .rp-telas-corpo { grid-template-columns: minmax(0, 1fr); }
  .rp-fixo { position: static; max-height: none; overflow: visible; }
  .rp-props { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
}
@media (max-width: 640px) {
  .rp-duas { grid-template-columns: minmax(0, 1fr); }
  .rp-abas { margin-left: 0; width: 100%; }
  .rp-abas button { flex: 1 0 auto; padding: 9px 12px; }
  .rp-barra select { width: 100%; min-width: 0; }
}

/* ------------------------------------------------------------------ aba Modelos: lista, visor 3D e painel de ajuste */
.rp-m-aviso { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 9px 12px; border-radius: 12px; border: 1px solid rgba(96, 165, 250, .3);
  background: rgba(59, 130, 246, .1); color: #bfdbfe; font-size: 13px; font-weight: 600; }
.rp-m-gira { flex: none; width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(147, 197, 253, .35); border-top-color: #93c5fd; animation: rp-gira 1s linear infinite; }
@keyframes rp-gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .rp-m-gira { animation: none; } }
.rp-m-ponto { flex: none; display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.rp-m-ponto.editado { background: #fbbf24; }
.rp-m-ponto.espera { background: #60a5fa; box-shadow: 0 0 6px #60a5fa; }

.rp-modelos { display: grid; grid-template-columns: 284px minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.rp-modelos > * { min-width: 0; }
.rp-m-busca { width: 100%; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(8, 10, 24, .7); color: #e2e8f0; font-size: 13px; padding: 8px 10px; outline: none; font-family: inherit; }
.rp-m-busca:focus { border-color: #60a5fa; }
.rp-m-filtros { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0; }
.rp-m-filtros button { font-size: 12px; padding: 4px 8px !important; }
.rp-m-filtros button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .12); background: transparent;
  color: #a5b1c7; font-size: 12px; font-weight: 600; font-family: inherit; cursor: pointer; }
.rp-m-filtros button i { font-style: normal; font-size: 11px; color: #7c8aa3; }
.rp-m-filtros button:hover { border-color: rgba(96, 165, 250, .5); }
.rp-m-filtros button.ativa { border-color: #60a5fa; background: rgba(59, 130, 246, .2); color: #fff; }
.rp-m-filtros button.ativa i { color: #bfdbfe; }
.rp-m-lista { max-height: min(620px, calc(100vh - 290px)); min-height: 180px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }

.rp-m-centro { position: sticky; top: var(--rp-topo, 14px); }
.rp-m-topo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-bottom: 10px; min-height: 36px; }
.rp-m-nome { min-width: 0; }
.rp-m-nome b { display: block; font-size: 16px; font-weight: 700; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-m-nome small { display: block; font-size: 12px; color: #7c8aa3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-m-selo { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid transparent; }
.rp-m-selo.editado { border-color: rgba(251, 191, 36, .45); background: rgba(251, 191, 36, .12); color: #fde68a; }
.rp-m-selo.espera { border-color: rgba(96, 165, 250, .45); background: rgba(59, 130, 246, .14); color: #bfdbfe; }
.rp-m-selo.ok { border-color: rgba(52, 211, 153, .3); background: rgba(16, 185, 129, .08); color: #a7f3d0; }
.rp-m-tela { position: relative; height: clamp(320px, 58vh, 600px); border-radius: 12px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .08); background: #0b0d1b; }
.rp-m-tela canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; outline: none; }
.rp-m-tela canvas:active { cursor: grabbing; }
.rp-m-tela canvas:focus-visible { outline: 2px solid #60a5fa; outline-offset: -2px; }
.rp-m-recentrar { position: absolute; top: 10px; right: 10px; background: rgba(15, 18, 40, .85); }
.rp-m-estado { position: absolute; left: 10px; right: 110px; top: 10px; width: fit-content; max-width: calc(100% - 130px); padding: 6px 10px; border-radius: 10px; background: rgba(15, 18, 40, .85);
  border: 1px solid rgba(255, 255, 255, .1); color: #cbd5e1; font-size: 12px; font-weight: 600; pointer-events: none; }
.rp-m-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.rp-m-rotulo { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; margin-right: 2px; }
.rp-m-comp { padding: 7px 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .05); color: #cbd5e1; font-size: 12.5px; font-weight: 700; font-family: inherit; cursor: pointer; }
.rp-m-comp:hover { border-color: #60a5fa; }
.rp-m-comp.ativa { border-color: #60a5fa; background: #2563eb; color: #fff; }
.rp-m-dica { margin-top: 10px; }

.rp-m-painel { display: grid; gap: 16px; }
.rp-m-painel > * { min-width: 0; }
.rp-m-grupo { margin-top: 14px; }
.rp-m-grupo:first-of-type { margin-top: 4px; }
.rp-m-grupo h4 { display: flex; align-items: baseline; gap: 6px; margin: 0 0 6px; font-size: 13px; font-weight: 700; color: #e2e8f0; }
.rp-m-grupo h4 small { font-size: 11.5px; font-weight: 500; color: #7c8aa3; }
.rp-m-link { margin-left: auto; padding: 0; border: 0; background: none; color: #93c5fd; font-size: 12px; font-weight: 600; font-family: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.rp-m-eixo { display: grid; grid-template-columns: 44px 92px minmax(0, 1fr); align-items: center; gap: 8px; margin-bottom: 6px; }
.rp-m-eixo > span { font-size: 12px; font-weight: 800; color: #94a3b8; }
.rp-m-eixo > span.x { color: #fca5a5; }
.rp-m-eixo > span.y { color: #86efac; }
.rp-m-eixo > span.z { color: #93c5fd; }
.rp-m-eixo input[type=number] { width: 100%; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(8, 10, 24, .7); color: #e2e8f0; font-size: 13px; padding: 6px 8px; outline: none;
  font-family: inherit; font-variant-numeric: tabular-nums; }
.rp-m-eixo input[type=number]:focus { border-color: #60a5fa; }
.rp-m-eixo input[type=range] { width: 100%; min-width: 0; margin: 0; accent-color: #3b82f6; cursor: ew-resize; }
.rp-m-eixo input:disabled { opacity: .45; cursor: not-allowed; }
.rp-m-alerta { margin: 0 0 12px; padding: 9px 11px; border-radius: 10px; border: 1px solid rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .08); color: #fde68a; font-size: 12.5px; line-height: 1.45; }
.rp-m-alerta code { font-size: 12px; color: #fff; word-break: break-all; }
.rp-m-ficha { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; margin: 0 0 12px; font-size: 12.5px; }
.rp-m-ficha dt { color: #8492ab; font-weight: 600; }
.rp-m-ficha dd { margin: 0; color: #dbe3f0; overflow-wrap: anywhere; }

/* aba Modelos: grupos por pacote, importar, dados do modelo */
.rp-m-importar { display: block; width: 100%; margin: 0 0 10px; }
.rp-m-antigo { margin: 0 0 10px; }
.rp-m-lista { position: relative; }
.rp-m-pac { margin-bottom: 8px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .08); background: rgba(8, 10, 24, .35); }
.rp-m-pac:last-child { margin-bottom: 0; }
.rp-m-pac.editado { border-color: rgba(251, 191, 36, .35); }
.rp-m-pac.rp-m-pac-novo { border-color: #34d399; box-shadow: 0 0 0 2px rgba(52, 211, 153, .3); }
.rp-m-pac-cab { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 4px; }
.rp-m-lista .rp-m-pac-abre { display: flex; flex: 1 1 auto; width: auto; min-width: 0; align-items: center; justify-content: flex-start; gap: 6px; margin: 0; padding: 4px; border: 0; background: none; color: #e2e8f0; }
.rp-m-lista .rp-m-pac-abre:hover { border: 0; background: rgba(255, 255, 255, .04); }
.rp-m-lista .rp-m-pac-abre b { font-weight: 700; }
.rp-m-seta { flex: none; width: 0; height: 0; border-left: 5px solid #93c5fd; border-top: 4px solid transparent; border-bottom: 4px solid transparent; transition: transform .15s; }
.rp-m-pac-abre[aria-expanded="true"] .rp-m-seta { transform: rotate(90deg); }
.rp-m-pac.desligado .rp-m-pac-abre b { color: #8492ab; }
.rp-m-pac-acoes { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.rp-m-lista .rp-m-pac-acao { display: inline-flex; width: auto; margin: 0; padding: 3px 7px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .04);
  color: #a5b1c7; font-size: 11px; font-weight: 700; }
.rp-m-lista .rp-m-pac-acao:hover { border-color: #60a5fa; color: #e2e8f0; }
.rp-m-lista .rp-m-chave { position: relative; display: inline-block; flex: none; width: 34px; height: 20px; margin: 0; padding: 0; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .1); }
.rp-m-lista .rp-m-chave:hover { border-color: #60a5fa; }
.rp-m-chave i { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #94a3b8; transition: left .15s, background .15s; }
.rp-m-lista .rp-m-chave.on { background: #2563eb; border-color: #3b82f6; }
.rp-m-chave.on i { left: 16px; background: #fff; }
.rp-m-pac-selos { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 0 8px 7px 20px; }
.rp-m-pac-ctrl { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.rp-m-pac-acoes + .rp-m-pac-ctrl { margin-left: 6px; }
.rp-m-tag { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 999px; border: 1px solid transparent; }
.rp-m-tag.importado { background: rgba(52, 211, 153, .14); color: #6ee7b7; }
.rp-m-tag.desligado { background: rgba(148, 163, 184, .14); color: #cbd5e1; border-color: rgba(148, 163, 184, .3); }
.rp-m-tag.editado { background: rgba(251, 191, 36, .12); color: #fde68a; }
.rp-m-tag.espera { background: rgba(59, 130, 246, .14); color: #bfdbfe; }
.rp-m-pac-itens { padding: 0 6px 4px; }
/* Linha de cada modelo: miniatura + nome + id curto */
.rp-m-lista .rp-m-item { justify-content: flex-start; gap: 10px; padding: 6px 8px; margin-bottom: 4px; }
.rp-m-lista .rp-m-item .rp-m-ponto { margin-left: auto; flex: none; }
.rp-m-ico { flex: none; width: 34px; height: 34px; border-radius: 8px; overflow: hidden; display: grid; place-items: center;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .07); font-size: 10px; font-weight: 800; letter-spacing: .02em; color: #94a3b8; }
.rp-m-ico img { width: 100%; height: 100%; object-fit: cover; object-position: top; image-rendering: pixelated; }
.rp-m-ico.foto { background: radial-gradient(circle at 50% 40%, rgba(148, 163, 184, .18), rgba(255, 255, 255, .03)); }
.rp-m-ico.foto img { object-fit: contain; image-rendering: auto; }
.rp-m-ico.vazio.t-cosmetico { color: #f9a8d4; background: rgba(236, 72, 153, .12); }
.rp-m-ico.vazio.t-movel { color: #fcd34d; background: rgba(245, 158, 11, .12); }
.rp-m-ico.vazio.t-item { color: #93c5fd; background: rgba(59, 130, 246, .12); }
.rp-m-ico.vazio.t-bloco { color: #6ee7b7; background: rgba(16, 185, 129, .12); }
.rp-m-txt { flex: 1 1 auto; min-width: 0; }
.rp-m-lista .rp-m-item.ativa .rp-m-ico { border-color: rgba(147, 197, 253, .6); }
/* Separacao por tipo dentro do pacote */
.rp-m-subtipo { display: flex; align-items: center; justify-content: space-between; margin: 10px 4px 5px; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #7c8aa3; }
.rp-m-subtipo:first-child { margin-top: 2px; }
.rp-m-subtipo i { font-style: normal; font-weight: 700; letter-spacing: 0; color: #64748b; }
.rp-m-tag.criado { background: rgba(167, 139, 250, .16); color: #c4b5fd; }
/* Capa do pacote */
.rp-m-capa { flex: none; width: 38px; height: 38px; border-radius: 10px; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(99, 102, 241, .35), rgba(56, 189, 248, .25)); border: 1px solid rgba(255, 255, 255, .1);
  font-size: 13px; font-weight: 800; color: #e0e7ff; }
.rp-m-capa img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.rp-m-pac.desligado .rp-m-capa { filter: grayscale(1); opacity: .6; }
/* Cabecalho do pacote: o nome quebra em ate duas linhas; renomear e um lapis */
.rp-m-lista .rp-m-pac-abre b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; }
.rp-m-lista .rp-m-pac-lapis { display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; margin: 0; padding: 0; border-radius: 8px;
  border: 1px solid transparent; background: none; color: #7c8aa3; }
.rp-m-lista .rp-m-pac-lapis svg { width: 14px; height: 14px; }
.rp-m-lista .rp-m-pac-lapis:hover { color: #e2e8f0; border-color: rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .05); }
.rp-m-lista .rp-m-pac-lapis:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }
.rp-m-pac-vazio { margin: 0 0 8px; padding: 0 4px 0 14px; }
.rp-m-lista-solta { max-height: none; min-height: 0; margin-top: 14px; text-align: left; }
.rp-m-vazio-acoes { display: flex; justify-content: center; margin-top: -8px; }
.rp-m-vazio-acoes .rp-m-importar { width: auto; }
.rp-m-lista .rp-m-pac-abre:focus-visible, .rp-m-lista .rp-m-pac-acao:focus-visible, .rp-m-lista .rp-m-chave:focus-visible, .rp-md-seg button:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }
.rp-m-aviso .rp-m-link { margin-left: 4px; }

.rp-md-previa { margin-top: 6px; padding: 7px 10px; min-height: 32px; border-radius: 9px; background: #1b1d2b; font-family: ui-monospace, Consolas, 'Courier New', monospace; font-size: 14px; color: #fff;
  text-shadow: 1px 1px 0 #3f3f3f; overflow-wrap: anywhere; }
.rp-md-previa em { color: #64748b; font-style: normal; text-shadow: none; font-family: inherit; font-size: 12px; }
.rp-md-seg { display: flex; flex-wrap: wrap; }
.rp-md-seg button { flex: 1 1 auto; }
.rp-md-encaixe { margin-top: 8px; }
.rp-campo small.rp-md-rotulo { margin: 0 0 4px; font-weight: 700; color: #94a3b8; }
.rp-md-aviso { margin: 8px 0 0; }
.rp-md-nota { margin: 0 0 10px; }
.rp-md-nota code { font-size: 11px; color: #93c5fd; word-break: break-all; }
.rp-md-anim select[data-md="anim-tipo"] { margin-bottom: 8px; }
.rp-md-anim-grade { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rp-md-anim-grade label { display: block; min-width: 0; }
.rp-campo .rp-md-anim-grade small { margin: 0 0 3px; font-weight: 700; color: #94a3b8; }
.rp-campo input:disabled { opacity: .45; cursor: not-allowed; }

/* janela de importar pacote */
.rp-janela.rp-imp-janela { width: min(680px, 100%); }
.rp-imp-envio { margin: -4px 0 12px; }
.rp-imp-barra { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.rp-imp-barra i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #60a5fa); transition: width .2s; }
.rp-imp-envio small { display: block; margin-top: 5px; font-size: 12px; color: #bfdbfe; overflow-wrap: anywhere; }
.rp-imp-msg { margin: 0 0 12px; padding: 9px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; line-height: 1.4; border: 1px solid rgba(96, 165, 250, .35); background: rgba(59, 130, 246, .12); color: #bfdbfe; overflow-wrap: anywhere; }
.rp-imp-msg.erro { border-color: rgba(248, 113, 113, .4); background: rgba(239, 68, 68, .12); color: #fecaca; }
.rp-imp-msg.ok { border-color: rgba(52, 211, 153, .4); background: rgba(16, 185, 129, .12); color: #a7f3d0; }
.rp-imp-formatos { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 12px; }
.rp-imp-formatos > div { min-width: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .03); }
.rp-imp-formatos b { display: block; font-size: 13px; color: #e2e8f0; }
.rp-imp-formatos small { display: block; margin-top: 3px; font-size: 12px; line-height: 1.45; color: #8492ab; }
.rp-imp-formatos code, .rp-imp-item code { font-size: 11.5px; color: #93c5fd; }
.rp-imp-lista { display: grid; gap: 10px; }
.rp-imp-item { min-width: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .03); }
.rp-imp-item.instalado { border-color: rgba(52, 211, 153, .3); }
.rp-imp-item.erro { border-color: rgba(248, 113, 113, .35); }
.rp-imp-cab { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 6px 10px; }
.rp-imp-nome { min-width: 0; flex: 1 1 200px; }
.rp-imp-nome b { display: block; font-size: 13px; font-weight: 700; color: #fff; overflow-wrap: anywhere; }
.rp-imp-nome small { display: block; margin-top: 2px; font-size: 11.5px; color: #8492ab; }
.rp-imp-estado { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800; border: 1px solid transparent; }
.rp-imp-estado.espera { border-color: rgba(96, 165, 250, .45); background: rgba(59, 130, 246, .14); color: #bfdbfe; }
.rp-imp-estado.ok { border-color: rgba(52, 211, 153, .4); background: rgba(16, 185, 129, .12); color: #a7f3d0; }
.rp-imp-estado.erro { border-color: rgba(248, 113, 113, .45); background: rgba(239, 68, 68, .12); color: #fecaca; }
.rp-imp-item .rp-nota { margin: 6px 0 0; }
.rp-imp-item .rp-m-alerta { margin: 8px 0 0; }
.rp-imp-texto { margin: 6px 0 0; font-size: 12.5px; line-height: 1.45; color: #dbe3f0; overflow-wrap: anywhere; }
.rp-imp-texto.erro { color: #fecaca; }
.rp-imp-pastas { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.rp-imp-pastas small { font-size: 11.5px; color: #8492ab; }
.rp-imp-pastas .rp-mini { padding: 4px 9px; }
.rp-imp-avisos { margin: 8px 0 0; padding-left: 18px; font-size: 12px; line-height: 1.45; color: #fde68a; overflow-wrap: anywhere; }
.rp-imp-pe { display: flex; justify-content: flex-end; margin-top: 8px; }
.rp-imp-janela .rp-opcao { margin: 0; }
@media (max-width: 560px) {
  .rp-imp-formatos { grid-template-columns: minmax(0, 1fr); }
  .rp-md-anim-grade { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (max-width: 1180px) {
  .rp-modelos { grid-template-columns: 240px minmax(0, 1fr); }
  .rp-m-painel { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
  .rp-m-centro { position: static; }
  .rp-m-lista { max-height: 470px; }
}
@media (max-width: 760px) {
  .rp-modelos { grid-template-columns: minmax(0, 1fr); }
  .rp-m-lista { max-height: 320px; min-height: 0; }
  .rp-m-tela { height: clamp(280px, 82vw, 440px); }
  .rp-m-painel { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------------------------ aba Telas: imagem da tela, arrastar botões */
.rp-palco-fora:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }
.rp-palco { user-select: none; -webkit-user-select: none; }
.rp-casa.tem { cursor: grab; touch-action: none; }
.rp-palco.arrastando, .rp-palco.arrastando .rp-casa { cursor: grabbing; }
.rp-casa.movendo { opacity: .45; }
.rp-casa.destino { border: 1px solid #60a5fa; background: rgba(96, 165, 250, .45); box-shadow: 0 0 0 1px #60a5fa; opacity: 1; }
.rp-casa.troca { border: 1px solid #f472b6; background: rgba(244, 114, 182, .45); box-shadow: 0 0 0 1px #f472b6; opacity: 1; }
.rp-casa.recusa { border: 1px solid #f87171; background: rgba(248, 113, 113, .3); }
.rp-legenda .l4::before { display: none; }
.rp-img { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(8, 10, 24, .5); }
.rp-img-mini { flex: none; display: flex; align-items: center; justify-content: center; width: 128px; height: 72px; border-radius: 8px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .1);
  background: #0b0d1b repeating-conic-gradient(rgba(255, 255, 255, .05) 0% 25%, transparent 0% 50%) 0 0 / 12px 12px; }
.rp-img-mini img { max-width: 100%; max-height: 100%; image-rendering: pixelated; display: block; }
.rp-img-mini span { font-size: 11px; color: #64748b; text-align: center; padding: 4px; }
.rp-img-lado { min-width: 0; flex: 1; }
.rp-img-lado b { display: block; font-size: 13px; font-weight: 700; color: #e2e8f0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-campo .rp-img-lado small { margin-top: 1px; }
.rp-img-botoes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rp-img-subida { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.rp-img-subida > span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; margin-right: 4px; }
.rp-campo .rp-img-subida input[type=number] { width: 76px; padding: 6px 8px; font-variant-numeric: tabular-nums; }
@media (max-width: 420px) { .rp-img { flex-direction: column; } .rp-img-mini { width: 100%; height: 96px; } }

/* ------------------------------------------------------------------ janelas (galeria de imagens, envio, nome) */
body.rp-com-janela { overflow: hidden; }
.rp-janela-fundo { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(3, 5, 14, .72); }
body.rp-janelas-ocultas .rp-janela-fundo { display: none; }
.rp-janela { display: flex; flex-direction: column; width: min(960px, 100%); max-height: min(100%, 860px); border-radius: 18px; border: 1px solid rgba(255, 255, 255, .14); background: #12162e;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6); outline: none; color: #e2e8f0; }
.rp-janela.rp-janela-pequena { width: min(440px, 100%); }
.rp-janela.soltando { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(96, 165, 250, .35), 0 30px 80px rgba(0, 0, 0, .6); }
.rp-janela-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.rp-janela-topo h2 { margin: 0; min-width: 0; font-size: 16px; font-weight: 800; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-janela-corpo { padding: 16px; overflow-y: auto; min-height: 0; }
.rp-g-solta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; margin-bottom: 14px; border-radius: 14px;
  border: 1px dashed rgba(147, 197, 253, .45); background: rgba(59, 130, 246, .07); }
.rp-g-solta-texto { flex: 1 1 260px; min-width: 0; }
.rp-g-solta-texto b { display: block; font-size: 14px; font-weight: 700; color: #fff; }
.rp-g-solta-texto small { display: block; margin-top: 2px; font-size: 12px; line-height: 1.45; color: #8492ab; }
.rp-g-botoes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rp-g-botoes button:disabled { opacity: .45; cursor: not-allowed; }
.rp-g-titulo { margin: 16px 0 10px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: #93c5fd; }
.rp-g-titulo:first-child { margin-top: 0; }
.rp-g-titulo small { margin-left: 6px; font-size: 11px; font-weight: 600; text-transform: none; letter-spacing: 0; color: #7c8aa3; }
.rp-g-abas { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.rp-g-abas button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .12); background: transparent; color: #a5b1c7;
  font-size: 12.5px; font-weight: 700; font-family: inherit; cursor: pointer; }
.rp-g-abas button i { font-style: normal; font-size: 11px; color: #7c8aa3; }
.rp-g-abas button.ativa { border-color: #60a5fa; background: rgba(59, 130, 246, .2); color: #fff; }
.rp-janela-corpo .rp-m-busca { margin-bottom: 10px; }
.rp-g-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.rp-g-nada { grid-column: 1 / -1; margin: 0; padding: 14px 2px; }
.rp-g-item { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 8px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .03); }
.rp-g-item.atual { border-color: #34d399; background: rgba(52, 211, 153, .08); }
.rp-g-mini { display: flex; align-items: center; justify-content: center; width: 100%; height: 104px; padding: 0; border-radius: 8px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .08); cursor: pointer;
  background: #0b0d1b repeating-conic-gradient(rgba(255, 255, 255, .05) 0% 25%, transparent 0% 50%) 0 0 / 12px 12px; font-family: inherit; }
div.rp-g-mini { cursor: default; }
button.rp-g-mini:hover { border-color: #60a5fa; }
.rp-g-mini img { max-width: 100%; max-height: 100%; image-rendering: pixelated; display: block; }
.rp-g-mini span { font-size: 11px; color: #64748b; padding: 6px; text-align: center; }
.rp-g-info { min-width: 0; }
.rp-g-info b { display: block; font-size: 13px; font-weight: 700; color: #e2e8f0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-g-info small { display: block; margin-top: 2px; font-size: 11.5px; color: #8492ab; }
.rp-g-acoes { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-g-acoes .rp-mini { padding: 6px 10px; }
.rp-g-envio { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
.rp-g-previa { display: flex; align-items: center; justify-content: center; min-height: 160px; padding: 12px; border-radius: 12px; overflow: auto; border: 1px solid rgba(255, 255, 255, .08);
  background: #0b0d1b repeating-conic-gradient(rgba(255, 255, 255, .05) 0% 25%, transparent 0% 50%) 0 0 / 16px 16px; }
.rp-g-previa canvas { display: block; flex: none; image-rendering: pixelated; max-width: none; }
.rp-g-form .rp-m-alerta { margin: 10px 0; }
.rp-g-form .rp-nota { margin: 4px 0 10px; }
@media (max-width: 720px) {
  .rp-janela-fundo { padding: 8px; align-items: flex-end; }
  .rp-janela { max-height: 94%; }
  .rp-g-envio { grid-template-columns: minmax(0, 1fr); }
  .rp-g-grade { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .rp-g-mini { height: 84px; }
}

/* ------------------------------------------------------------------ aba Tags: lista, edição em massa e gerador */
.rp-tg-topo { margin-bottom: 16px; }
.rp-tg-topo .rp-novo { max-width: 520px; margin-top: 0; }
.rp-tg-corpo { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
.rp-tg-lado { display: grid; gap: 16px; min-width: 0; }
.rp-tg-lado > *, .rp-tg-gerador > * { min-width: 0; }
.rp-caixa h3 small { margin-left: 6px; font-size: 11px; font-weight: 600; text-transform: none; letter-spacing: 0; color: #7c8aa3; }
.rp-tg-todas { margin: 0; font-size: 12.5px; }
.rp-tg-lista { max-height: min(520px, 60vh); overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.rp-tg-linha { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; align-items: center; padding: 8px; margin-bottom: 6px; border-radius: 12px; border: 1px solid transparent; background: rgba(255, 255, 255, .04); }
.rp-tg-linha:last-child { margin-bottom: 0; }
.rp-tg-linha.ativa { border-color: #60a5fa; background: rgba(59, 130, 246, .16); }
.rp-tg-linha > input[type=checkbox], .rp-tg-todas input { width: 16px; height: 16px; accent-color: #3b82f6; cursor: pointer; }
.rp-tg-abre { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0; border: 0; background: none; color: #e2e8f0; font-family: inherit; text-align: left; cursor: pointer; }
.rp-tg-abre b { min-width: 0; font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-tg-abre:focus-visible, .rp-tg-copiar:focus-visible, .rp-tg-grade button:focus-visible, .rp-tg-seg button:focus-visible, .rp-g-abas button:focus-visible, .rp-g-mini:focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }
.rp-tg-fundo { display: inline-flex; align-items: center; justify-content: center; flex: none; max-width: 100%; padding: 5px 7px; border-radius: 7px; background: #1b1d2b; overflow: hidden; }
.rp-tg-fundo canvas { display: block; flex: none; image-rendering: pixelated; }
.rp-tg-usos { grid-column: 2; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rp-caixa > .rp-tg-usos { margin-top: 10px; }
.rp-tg-usos > span { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rp-tg-usos code { min-width: 0; font-size: 11px; color: #93c5fd; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-tg-copiar { flex: none; padding: 1px 7px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .05); color: #cbd5e1; font-size: 11px; font-weight: 700; font-family: inherit; cursor: pointer; }
.rp-tg-copiar:hover { border-color: #60a5fa; }
.rp-tg-quantas { margin: 0 0 10px; font-size: 12.5px; line-height: 1.4; color: #8492ab; }
.rp-tg-quantas.tem { color: #fde68a; font-weight: 700; }
.rp-tg-massa-grade { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.rp-tg-massa-grade .rp-campo:last-child { margin-bottom: 10px; }
.rp-campo select:disabled { opacity: .45; cursor: not-allowed; }
.rp-tg-copia { display: flex; flex-direction: column; gap: 6px; margin: 2px 0 12px; font-size: 12.5px; color: #a5b1c7; }
.rp-tg-copia > div { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-tg-copia b { color: #e2e8f0; }
.rp-tg-massa-pe { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rp-tg-massa-pe .rp-nota { margin: 0; }

.rp-tg-gerador { display: grid; gap: 16px; }
.rp-tg-previa .rp-nota { margin-top: 8px; }
.rp-tg-previa { position: sticky; top: var(--rp-topo, 14px); z-index: 5; background: #141830; box-shadow: 0 14px 30px rgba(5, 6, 15, .55); }
.rp-tg-acoes { display: flex; gap: 6px; }
.rp-tg-zoom { display: flex; align-items: center; justify-content: center; min-height: 92px; padding: 12px; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .08);
  background: #0b0d1b repeating-conic-gradient(rgba(255, 255, 255, .045) 0% 25%, transparent 0% 50%) 0 0 / 16px 16px; }
.rp-tg-zoom canvas { display: block; flex: none; image-rendering: pixelated; }
.rp-tg-mostruario { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 10px; align-items: stretch; }
.rp-tg-chats { display: grid; grid-template-rows: 1fr 1fr; gap: 8px; min-width: 0; }
.rp-tg-chat { min-width: 0; padding: 8px 10px; border-radius: 10px; overflow: hidden; }
.rp-tg-chat small { display: block; margin-bottom: 5px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.rp-tg-chat p { display: flex; align-items: center; gap: 4px; margin: 0; padding: 1px 4px; min-height: 20px; font-family: ui-monospace, Consolas, 'Courier New', monospace; font-size: 14px; line-height: 20px; white-space: nowrap; }
.rp-tg-chat p span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rp-tg-chat canvas { display: block; flex: none; image-rendering: pixelated; }
.rp-tg-chat.escuro { background: linear-gradient(180deg, #1c2440, #0d1020); }
.rp-tg-chat.escuro small { color: #7c8aa3; }
.rp-tg-chat.escuro p { background: rgba(0, 0, 0, .5); color: #fff; text-shadow: 1px 1px 0 #3f3f3f; }
.rp-tg-chat.claro { background: linear-gradient(180deg, #bfe0ff, #eef6ff); }
.rp-tg-chat.claro small { color: #48607e; }
.rp-tg-chat.claro p { background: rgba(255, 255, 255, .35); color: #1f2937; }
.rp-tg-cartoes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.rp-tg-cartoes > * { min-width: 0; }
.rp-tg-larga { grid-column: 1 / -1; }
.rp-tg-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.rp-tg-grade button { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; padding: 8px 4px 6px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .03); color: #a5b1c7; font-family: inherit; cursor: pointer; }
.rp-tg-grade button:hover { border-color: rgba(96, 165, 250, .55); }
.rp-tg-grade button.ativa { border-color: #60a5fa; background: rgba(59, 130, 246, .2); color: #fff; }
.rp-tg-grade button small { max-width: 100%; font-size: 11px; font-weight: 600; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-tg-grade .rp-tg-fundo { min-height: 28px; }
.rp-tg-icones { grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); }
.rp-tg-icones .rp-tg-fundo { min-width: 29px; min-height: 37px; }
.rp-tg-sem { font-size: 14px; color: #64748b; }
.rp-tg-formatos, .rp-tg-paletas, .rp-tg-modelos { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.rp-tg-duas { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; margin-top: 12px; }
.rp-tg-seg { display: inline-flex; max-width: 100%; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .12); overflow: hidden; }
.rp-tg-seg button { padding: 7px 10px; border: 0; background: transparent; color: #94a3b8; font-size: 12px; font-weight: 700; font-family: inherit; cursor: pointer; }
.rp-tg-seg button.ativa { background: #2563eb; color: #fff; }
.rp-tg-seg button:disabled { opacity: .45; cursor: not-allowed; }
.rp-tg-cores { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 0 12px; }
.rp-tg-cor .rp-marca { margin: 0; font-size: 12px; }
.rp-tg-sub { margin: 0; font-size: 13px; font-weight: 700; color: #e2e8f0; }
.rp-campo input[type=range] { width: 100%; margin: 0; accent-color: #3b82f6; }
.rp-campo > span b { color: #e2e8f0; text-transform: none; letter-spacing: 0; }
@media (min-width: 1101px) {
  .rp-tg-lado { position: sticky; top: var(--rp-topo, 14px); max-height: calc(100vh - var(--rp-topo, 14px) - 14px); overflow-y: auto; scrollbar-width: thin; }
  .rp-com-barra .rp-tg-lado { max-height: calc(100vh - var(--rp-topo, 14px) - 92px); }
  .rp-tg-lado .rp-tg-lista { max-height: min(340px, 38vh); }
}
@media (max-width: 1100px) {
  .rp-tg-corpo { grid-template-columns: minmax(0, 1fr); }
  .rp-tg-lista { max-height: 300px; }
}
@media (max-width: 760px) {
  .rp-tg-previa { position: static; box-shadow: none; }
  .rp-tg-cartoes { grid-template-columns: minmax(0, 1fr); }
  .rp-tg-mostruario { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .rp-tg-duas, .rp-tg-massa-grade { grid-template-columns: minmax(0, 1fr); }
  .rp-tg-topo .rp-novo { flex-wrap: wrap; }
  .rp-tg-topo .rp-novo input { flex: 1 1 120px; }
}
