/* ============================================================
   APP — [slishh_app]
   ============================================================ */

/* Reset de estilos de botão injetados pelo tema WordPress */
#slishh-app button,
#slishh-app button:hover,
#slishh-app button:focus,
#slishh-app button:active {
  background-image: none;
  box-shadow: none;
  text-shadow: none;
  outline: none;
  border-radius: unset;
}

#slishh-app {
  font-family: var(--sl-font);
  background: var(--sl-bg);
  width: 100%;
  min-height: 85vh;
  position: relative;
  overflow-x: hidden; /* preserva corte horizontal (animações de swipe) */
  display: flex;
  flex-direction: column;
  margin-top: 50px;
}

/* --- VIEW: LISTA DE PACKS --- */

#packs-view {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.slishh-packs-header {
  max-width: 95vw;
  padding: 40px 0 30px;
  color: var(--sl-text);
}

.slishh-packs-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin: 0 0 0 30px;
}

.slishh-packs-subtitle {
  font-size: 1rem;
  color: var(--sl-text-muted);
  margin-top: 4px;
  margin-left: 30px;
  font-weight: 500;
}

.slishh-packs-toolbar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 20px 30px 0 30px;
}

.slishh-packs-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  width: 100%;
}

.slishh-packs-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.slishh-pack-search-wrap {
  position: relative;
  width: 100%;
  max-width: 320px;
}

.slishh-pack-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: var(--sl-text-muted);
  pointer-events: none;
}

.slishh-pack-search {
  display: block;
  width: 100%;
  padding: 12px 16px 12px 44px;
  font-family: var(--sl-font);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--sl-text);
  background-color: var(--sl-surface);
  border: 1px solid transparent;
  border-radius: var(--sl-radius-md);
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.slishh-pack-search:focus {
  outline: none;
  border-color: rgb(var(--sl-ink-rgb) / 0.25);
}

.slishh-pack-search::placeholder {
  color: var(--sl-text-muted);
}

@media (max-width: 700px) {
  .slishh-packs-toolbar {
    margin: 20px 0 0 0;
  }

  .slishh-pack-search-wrap {
    max-width: 100%;
  }

  .slishh-pack-search-icon {
    left: auto;
    right: 14px;
  }

  .slishh-pack-search {
    padding-left: 16px;
    padding-right: 44px;
    background-color: var(--sl-surface-strong);
  }
}

.slishh-pack-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--sl-surface);
  border-radius: 40px;
  padding: 4px;
}

.slishh-pack-tab {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--sl-text);
  padding: 8px 16px;
  border-radius: 30px;
  cursor: pointer;
  opacity: 0.55;
  white-space: nowrap;
  transition: opacity 0.2s, background 0.2s;
}

.slishh-pack-tab:hover {
  opacity: 0.85;
}

.slishh-pack-tab.active {
  background: var(--sl-inverse-bg);
  color: var(--sl-inverse-text);
  opacity: 1;
}

.slishh-trilha-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--sl-text);
  opacity: 0.65;
  cursor: pointer;
  white-space: nowrap;
}

.slishh-trilha-link:hover {
  opacity: 1;
}

.slishh-revisao-link {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--sl-text);
  background: var(--sl-surface);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
}

.slishh-revisao-link:hover {
  opacity: 0.85;
}

/* --- VIEW: TRILHA DE PROGRESSO --- */

#trilha-view {
  width: 100%;
  flex-direction: column;
  align-items: center;
  padding: 40px 16px 60px;
  box-sizing: border-box;
}

.slishh-trilha-header {
  width: 100%;
  max-width: 760px;
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0 auto 32px;
}

@media (min-width: 900px) {
  .slishh-trilha-header {
    max-width: 100%;
    padding: 0 40px;
    box-sizing: border-box;
  }
}

.slishh-trilha-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--sl-text);
  margin: 0;
}

.slishh-trilha-content {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Desktop: sidebar fixa (stats + conquistas) à esquerda, cards concluídos
   centralizados no espaço restante — usa a largura inteira da tela em vez
   de espremer tudo numa coluna central estreita. */
@media (min-width: 900px) {
  .slishh-trilha-content {
    max-width: 100%;
    padding: 0 40px;
    box-sizing: border-box;
    flex-direction: row;
    align-items: flex-start;
    gap: 48px;
  }

  .slishh-trilha-sidebar {
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    position: sticky;
    top: 24px;
  }

  .slishh-trilha-sidebar .slishh-trilha-stats {
    flex-direction: column;
  }

  .slishh-trilha-sidebar .slishh-badges-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .slishh-trilha-main {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 0;
  }

  .slishh-trilha-main .slishh-trilha-section {
    width: 100%;
    max-width: 640px;
  }
}

.slishh-trilha-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.slishh-trilha-section-title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sl-text);
  opacity: 0.45;
}

.slishh-trilha-section-count {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--sl-text);
  opacity: 0.4;
}

.slishh-trilha-stats {
  display: none;
  width: 100%;
  gap: 12px;
}

.slishh-trilha-stat {
  flex: 1;
  background: var(--sl-inverse-bg);
  color: var(--sl-inverse-text);
  border-radius: var(--sl-radius-md);
  padding: 16px 20px;
  text-align: center;
}

.slishh-trilha-stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.slishh-trilha-stat-streak-icon {
  font-size: 1.4rem;
  vertical-align: -0.15em;
}

.slishh-trilha-stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.65;
  margin-top: 6px;
}

/* Sem width/height fixos: a caixa nasce do próprio font-size/line-height do
   elemento real (mesmo em ambos os estados), então o tile não muda de
   tamanho quando o skeleton vira dado de verdade. */
.slishh-trilha-stats.loading .slishh-trilha-stat-num {
  display: inline-block;
  width: 2.2em;
  border-radius: 6px;
  color: transparent;
  background: rgb(var(--sl-inverse-rgb) / 0.18);
  animation: sl-skeleton-pulse 1.2s ease-in-out infinite;
}

.slishh-trilha-stats.loading .slishh-trilha-stat-label {
  display: inline-block;
  width: 70%;
  border-radius: 4px;
  color: transparent;
  background: rgb(var(--sl-inverse-rgb) / 0.14);
  animation: sl-skeleton-pulse 1.2s ease-in-out infinite;
  overflow: hidden;
  white-space: nowrap;
}

.slishh-badges-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.slishh-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 12px;
  border-radius: var(--sl-radius-md);
  background: var(--sl-surface);
  text-align: center;
  cursor: default;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.slishh-badge.unlocked:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgb(var(--sl-ink-rgb) / 0.08);
}

.slishh-badge-icon-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sl-badge-disc);
  box-shadow: inset 0 0 0 2px rgb(var(--sl-ink-rgb) / 0.08);
}

.slishh-badge-icon {
  font-size: 28px;
  color: var(--sl-text);
}

.slishh-badge-name {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--sl-text);
  letter-spacing: 0.01em;
}

.slishh-badge.unlocked .slishh-badge-icon-wrap {
  background: var(--sl-accent);
  box-shadow: none;
}

.slishh-badge.unlocked .slishh-badge-icon {
  color: var(--sl-on-accent);
  font-variation-settings: 'FILL' 1;
}

.slishh-badge.unlocked .slishh-badge-icon-wrap::after {
  content: 'check';
  font-family: 'Material Symbols Outlined';
  font-variation-settings: 'FILL' 1;
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2e7d46;
  color: var(--sl-on-accent);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--sl-bg);
}

.slishh-badge.locked {
  opacity: var(--sl-badge-locked-opacity);
}

.slishh-badge.locked .slishh-badge-icon-wrap {
  background: var(--sl-badge-disc);
  box-shadow: inset 0 0 0 2px rgb(var(--sl-ink-rgb) / 0.06);
}

.slishh-badge.locked .slishh-badge-icon {
  color: var(--sl-text);
  opacity: var(--sl-badge-locked-icon-opacity);
}

.slishh-badge.locked .slishh-badge-name {
  opacity: 0.6;
}

/* Poliglota é o prêmio máximo (completar 100% dos packs) — ganha um
   tratamento visual à parte pra se destacar das outras conquistas,
   mesmo travada (dá pra perceber que é "diferente" antes de desbloquear). */
.slishh-badge.special {
  background: linear-gradient(135deg, rgba(245, 179, 1, 0.14), rgba(203, 32, 39, 0.08));
  border: 1px solid rgba(245, 179, 1, 0.35);
}

.slishh-badge.special .slishh-badge-icon-wrap {
  width: 64px;
  height: 64px;
}

.slishh-badge.special .slishh-badge-icon {
  font-size: 32px;
}

.slishh-badge.special .slishh-badge-name {
  font-weight: 800;
}

.slishh-badge.special.locked .slishh-badge-icon-wrap {
  background: var(--sl-badge-disc);
  box-shadow: inset 0 0 0 2px rgba(245, 179, 1, 0.4);
}

.slishh-badge.special.locked .slishh-badge-icon {
  color: rgba(245, 179, 1, 0.6);
  opacity: 1;
}

.slishh-badge.special.unlocked {
  background: linear-gradient(135deg, rgba(245, 179, 1, 0.22), rgba(203, 32, 39, 0.1));
  border-color: rgba(245, 179, 1, 0.5);
}

.slishh-badge.special.unlocked .slishh-badge-icon-wrap {
  background: linear-gradient(135deg, #f5b301, var(--sl-accent));
  box-shadow: 0 0 0 4px rgba(245, 179, 1, 0.2);
  animation: sl-badge-shimmer 2.4s ease-in-out infinite;
}

.slishh-badge.special.unlocked .slishh-badge-name {
  color: var(--sl-warning-text);
}

.slishh-badge.special.unlocked .slishh-badge-icon-wrap::after {
  box-shadow: 0 0 0 2px var(--sl-bg), 0 0 8px 1px rgba(245, 179, 1, 0.7);
}

@keyframes sl-badge-shimmer {
  0%, 100% { box-shadow: 0 0 0 4px rgba(245, 179, 1, 0.2); }
  50%      { box-shadow: 0 0 0 4px rgba(245, 179, 1, 0.2), 0 0 20px 4px rgba(245, 179, 1, 0.45); }
}

/* Conquista calculada no localStorage pra visitante anônimo — desbloqueada
   na tela, mas ainda não salva em nenhum lugar (some se limpar o navegador). */
.slishh-badge.pending .slishh-badge-icon-wrap {
  animation: sl-badge-pulse 1.8s ease-in-out infinite;
}

@keyframes sl-badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(203, 32, 39, 0.45); }
  50%      { box-shadow: 0 0 0 8px rgba(203, 32, 39, 0); }
}

.slishh-badge.pending .slishh-badge-icon-wrap::after {
  content: 'priority_high';
  font-family: 'Material Symbols Outlined';
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--sl-accent);
  color: var(--sl-on-accent);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--sl-bg);
}

.slishh-badges-cta {
  display: none;
  align-items: center;
  gap: 10px;
  background: rgba(203, 32, 39, 0.08);
  color: var(--sl-accent);
  border: 1px solid rgba(203, 32, 39, 0.25);
  border-radius: var(--sl-radius-md);
  padding: 12px 16px;
  margin-bottom: 14px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease;
}

.slishh-badges-cta:hover {
  background: rgba(203, 32, 39, 0.14);
}

.slishh-badges-cta-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.slishh-badge-skeleton .slishh-badge-icon-wrap {
  background: rgb(var(--sl-ink-rgb) / 0.08);
  box-shadow: none;
  animation: sl-skeleton-pulse 1.2s ease-in-out infinite;
}

.slishh-badge-skeleton .slishh-badge-name {
  width: 60%;
  height: 10px;
  border-radius: 4px;
  background: rgb(var(--sl-ink-rgb) / 0.08);
  animation: sl-skeleton-pulse 1.2s ease-in-out infinite;
}

@keyframes sl-skeleton-pulse {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; }
}

@media (max-width: 700px) {
  .slishh-badges-grid {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    gap: 12px;
    padding-bottom: 4px;
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
    /* scroll-padding (não só padding) — sem isso o scroll-snap-align:start
       do primeiro card ignora o padding-left como "borda" do snap e o
       navegador já nasce com scrollLeft:16, comendo visualmente o respiro
       e desalinhando o primeiro card com o resto da página (ex: o CTA
       "crie uma conta" logo acima, que começa nessa mesma borda). */
    scroll-padding-left: 16px;
    scroll-padding-right: 16px;
    /* Esconde a barra de scroll nativa — o gesto de arrastar já é óbvio
       pelos cards cortados na borda, a barra cinza só deixa poluído. */
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .slishh-badges-grid::-webkit-scrollbar {
    display: none;
  }

  .slishh-badge {
    /* Largura ~= altura real do card (medida: ~146px com o padding/ícone/nome
       atuais) — sem isso ficava 108x146, retangular, diferente do desktop
       (onde a grid de 2-3 colunas já dá um card praticamente quadrado). */
    flex: 0 0 146px;
    scroll-snap-align: start;
  }

  /* Mais respiro entre título/CTA/grid de conquistas e entre os itens da
     lista de cards concluídos — no mobile tudo ficava colado. */
  .slishh-trilha-section {
    /* No mobile .slishh-trilha-sidebar não é flex (isso só existe no
       breakpoint desktop), então o gap:40 do .slishh-trilha-content não
       separa os stats da seção de conquistas — ficavam grudados (gap 0). */
    margin-top: 10px;
  }

  .slishh-trilha-section-header {
    margin-bottom: 18px;
  }

  .slishh-badges-cta {
    margin-bottom: 18px;
  }

  .slishh-trilha-list {
    gap: 14px;
  }

  .slishh-trilha-stats {
    gap: 10px;
  }
}

.slishh-trilha-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  padding-left: 20px;
  border-left: 2px solid rgb(var(--sl-ink-rgb) / 0.1);
}

.slishh-trilha-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background-color: var(--sl-surface);
  border-radius: var(--sl-radius-md);
  padding: 14px 18px;
  color: var(--sl-text);
  cursor: pointer;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.slishh-trilha-item::before {
  content: '';
  position: absolute;
  left: -26px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sl-accent);
}

.slishh-trilha-item:hover {
  transform: translateY(-2px) translateX(2px);
  box-shadow: 0 8px 18px rgb(var(--sl-ink-rgb) / 0.08);
}

.slishh-trilha-emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgb(var(--sl-ink-rgb) / 0.06);
}

.slishh-trilha-emoji .material-symbols-outlined {
  font-size: 20px;
  color: var(--sl-text);
}

.slishh-trilha-check {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1a5c26;
  color: #fff;
  margin-left: auto;
}

.slishh-trilha-word {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 2px 0;
  text-transform: uppercase;
  letter-spacing: -0.3px;
}

.slishh-trilha-meta {
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.6;
}

.slishh-pack-list {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  max-width: 95vw;
  padding: 0 30px;
  box-sizing: border-box;
}

.slishh-pack-card {
  width: 100%;
  background-color: var(--sl-surface);
  border-radius: var(--sl-radius-md);
  padding: 28px 24px;
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--sl-text);
  border: 1px solid transparent;
  box-sizing: border-box;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.slishh-pack-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgb(var(--sl-ink-rgb) / 0.08);
  border-color: rgb(var(--sl-ink-rgb) / 0.08);
}

.slishh-pack-card.locked {
  opacity: 0.6;
  background-color: var(--sl-surface-muted);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.slishh-pack-card.locked:hover {
  opacity: 1;
}

/* Argola do cadeado sobe e gira ao hover — efeito de destravar */
.slishh-pack-card.locked:hover .slishh-pack-action-icon svg path {
  transform-box: fill-box;
  transform-origin: bottom center;
  transform: translateY(-4px) rotate(20deg);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.slishh-pack-action-icon svg path {
  transition: transform 0.2s ease;
}

.slishh-pack-number {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 0.8;
  color: var(--sl-text);
  opacity: 0.12;
  margin-right: 16px;
  display: flex;
  align-items: flex-start;
  flex-shrink: 0;
}

.slishh-pack-number span {
  font-size: 1.4rem;
  margin-top: 5px;
  margin-right: 2px;
}

.slishh-pack-info {
  flex: 1;
}

.slishh-pack-name {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 6px 0;
  text-transform: uppercase;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.slishh-pack-meta {
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0.7;
  display: flex;
  align-items: center;
  gap: 10px;
}

.slishh-pack-badge {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 7px;
  border-radius: 3px;
  white-space: nowrap;
}

.slishh-pack-badge.badge-free {
  color: var(--sl-text);
  opacity: 0.45;
  border: 1px solid currentColor;
}

.slishh-pack-badge.badge-premium {
  background: var(--sl-inverse-bg);
  color: var(--sl-inverse-text);
}

.slishh-pack-badge.badge-done {
  background: #1a5c26;
  color: #fff;
}

.slishh-pack-badge.badge-preview {
  background: transparent;
  border: 1px solid rgb(var(--sl-ink-rgb) / 0.25);
  color: var(--sl-text);
  opacity: 0.65;
}

.slishh-packs-loading,
.slishh-load-error {
  padding: 20px 0;
  color: var(--sl-text-muted);
  font-size: 0.95rem;
}

.slishh-store-cta {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 56px 24px;
  color: var(--sl-text);
}

.slishh-store-cta-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--sl-surface);
  margin-bottom: 18px;
}

.slishh-store-cta-text {
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0.7;
  margin: 0 0 18px;
}

.slishh-store-cta-btn {
  font-family: var(--sl-font);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--sl-inverse-text);
  background: var(--sl-inverse-bg);
  border: none;
  cursor: pointer;
  padding: 12px 24px;
  border-radius: 30px;
  letter-spacing: 0.03em;
  transition: opacity 0.2s;
}

#slishh-app .slishh-store-cta-btn:hover {
  background: var(--sl-inverse-bg);
  opacity: 0.85;
}

.slishh-pack-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.3;
  margin-left: 8px;
}

/* --- VIEW: PLAYER DE FLASHCARDS --- */

#player-view {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 40px 16px 60px;
  width: 100%;
  flex: 1;
  box-sizing: border-box;
}

.slishh-player-header {
  width: 100%;
  max-width: 400px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.slishh-btn-back {
  background: transparent;
  border: none;
  color: var(--sl-text);
  font-family: var(--sl-font);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.slishh-btn-back:hover {
  opacity: 0.6;
}

.slishh-player-pack-name {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--sl-text);
  opacity: 0.5;
}

#slishh-player-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Flashcard */
.slishh-card-wrapper {
  width: 100%;
  max-width: 400px;
  height: 600px;
  perspective: 1400px;
  cursor: pointer;
  position: relative;
  touch-action: manipulation;
}

.slishh-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.35, 0, 0.25, 1);
}

.slishh-card-wrapper.flipped .slishh-card-inner {
  transform: rotateY(180deg);
}

.slishh-card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 28px;
  background: var(--sl-surface);
  display: flex;
  flex-direction: column;
  padding: 32px 32px 52px;
  box-sizing: border-box;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  color: var(--sl-text);
}

.slishh-card-back {
  transform: rotateY(180deg);
}

.slishh-card-done-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sl-success-text);
  background: rgba(26, 92, 38, 0.1);
  padding: 4px 9px;
  border-radius: 20px;
  white-space: nowrap;
}

/* Linha divisora dentro do card */
.slishh-c-divider {
  width: 100%;
  height: 1px;
  background: rgb(var(--sl-ink-rgb) / 0.1);
  margin: 16px 0 0;
  flex-shrink: 0;
}

.slishh-c-top {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.06em;
  opacity: 0.7;
}

.slishh-c-mid {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 0 12px;
}

.slishh-card-pos-badge {
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid currentColor;
  width: max-content;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 24px;
}

.slishh-c-word {
  font-size: 52px;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
  line-height: 1;
}

.slishh-c-sentence {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
}

.slishh-c-sentence-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.slishh-c-sentence-row .slishh-c-sentence {
  flex: 1;
}

.slishh-sound-btn-sm {
  padding: 2px;
  margin-top: 2px;
  flex-shrink: 0;
}

.slishh-c-translation {
  font-size: 52px;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--sl-text);
}

/* Botão de áudio dentro do card */
.slishh-c-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 4px;
}

.slishh-sound-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--sl-text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  touch-action: manipulation;
  opacity: 0.8;
  transition: opacity 0.15s, transform 0.15s;
}

.slishh-sound-btn:hover {
  opacity: 1;
  transform: scale(1.25);
}

/* Footer de marca dentro do card */
.slishh-card-footer {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.slishh-footer-brand {
  font-size: 11px;
  font-weight: 700;
  color: var(--sl-text);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.slishh-logo-soft {
  opacity: 0.35;
}

/* Paywall overlay */
.slishh-paywall-overlay {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  background: rgba(48, 47, 60, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  z-index: 10;
}

.slishh-paywall-content {
  text-align: center;
  color: var(--sl-on-accent);
  padding: 32px 24px;
}

.slishh-paywall-icon {
  font-size: 2.5rem;
  margin-bottom: 14px;
}

.slishh-paywall-text {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  opacity: 0.9;
  margin: 0 0 24px;
}

.slishh-paywall-btn {
  display: inline-block;
  background: var(--sl-accent);
  color: var(--sl-on-accent);
  padding: 12px 28px;
  border-radius: var(--sl-radius-sm);
  font-family: var(--sl-font);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: opacity 0.2s;
}

#slishh-app .slishh-paywall-btn:hover {
  background: var(--sl-accent);
  opacity: 0.85;
  color: var(--sl-on-accent);
}

/* Stage: card + setas laterais (desktop) */
.slishh-player-stage {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 24px;
  width: 100%;
}

.slishh-player-stage .slishh-card-wrapper {
  order: 2;
  flex-shrink: 0;
}

.slishh-player-stage #slishh-btn-prev {
  order: 1;
}

.slishh-player-stage #slishh-btn-next {
  order: 3;
}

.slishh-nav-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 12px;
  color: var(--sl-text);
  touch-action: manipulation;
  transition: opacity 0.15s, transform 0.15s;
  flex-shrink: 0;
}

.slishh-nav-btn:hover {
  opacity: 0.45;
  transform: scale(0.9);
}

/* Barra inferior: condições + progresso */
.slishh-player-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-top: 22px;
  width: 100%;
  max-width: 400px;
}

.slishh-nav-progress {
  font-size: 11px;
  font-weight: 400;
  color: var(--sl-text);
  opacity: 0.55;
  letter-spacing: 0.06em;
  white-space: nowrap;
  border-left: 1px solid rgb(var(--sl-ink-rgb) / 0.18);
  padding-left: 14px;
  margin-left: 10px;
}

/* --- PLAYER STANDALONE --- */

.slishh-player-wrap {
  font-family: var(--sl-font);
  width: 100%;
  min-height: 85vh;
  display: flex;
  flex-direction: column;
}

.slishh-player-standalone {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 16px 60px;
  width: 100%;
  flex: 1;
  box-sizing: border-box;
}

.slishh-player-loading {
  padding: 80px 5%;
  text-align: center;
  color: var(--sl-text-muted);
  font-family: var(--sl-font);
  font-size: 1rem;
}

/* --- TELA DE CONCLUSÃO --- */

.slishh-finish-screen {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  max-width: 400px;
  height: 600px;
  background: var(--sl-surface);
  border-radius: 28px;
  padding: 44px 36px;
  box-sizing: border-box;
  font-family: var(--sl-font);
  color: var(--sl-text);
}

.slishh-finish-label {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 14px;
}

.slishh-finish-title {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0 0 40px;
}

.slishh-finish-text {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.6;
  opacity: 0.8;
  margin: 0 0 40px;
}

.slishh-finish-suggestions {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  margin: -16px 0 28px;
  box-sizing: border-box;
}

.slishh-finish-suggestions-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.55;
  margin-bottom: 10px;
}

.slishh-finish-suggestions-row {
  display: flex;
  gap: 10px;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.slishh-finish-suggestions-row::-webkit-scrollbar {
  display: none;
}

.slishh-finish-suggestion-card {
  flex: 0 0 auto;
  width: 108px;
  background: rgb(var(--sl-ink-rgb) / 0.06);
  border-radius: 14px;
  padding: 14px 12px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.slishh-finish-suggestion-card:hover {
  background: rgb(var(--sl-ink-rgb) / 0.12);
  transform: translateY(-2px);
}

.slishh-finish-suggestion-emoji {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.slishh-finish-suggestion-name {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.2px;
  line-height: 1.25;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.slishh-finish-suggestion-meta {
  font-size: 0.65rem;
  font-weight: 600;
  opacity: 0.55;
}

.slishh-finish-btn {
  font-family: var(--sl-font);
  font-size: 12px;
  font-weight: 300;
  color: var(--sl-text);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  letter-spacing: 0.06em;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s;
}

#slishh-app .slishh-finish-btn:hover {
  background: transparent;
  opacity: 0.6;
}

/* --- Responsivo */
@media (max-width: 700px) {

  #slishh-app {
  margin-top: 10px;
  }

  .slishh-pack-list {
    padding: 0px;
  }
  .slishh-packs-title {
    margin: 0;
  }
  .slishh-packs-subtitle {
    margin-left: 0;
  }
  /* Mobile usa swipe — setas não aparecem */
  #slishh-btn-prev,
  #slishh-btn-next {
    display: none;
  }

  /* Stage vira coluna simples */
  .slishh-player-stage {
    flex-direction: column;
    gap: 0;
  }

  /* Player: padding mínimo no topo, sem padding artificial na base —
     a altura real vem do encaixe flex de .slishh-player-active abaixo.
     overflow-y:auto (em vez de hidden) é a rede de segurança: se o encaixe
     flex não fechar 100% certo num navegador/viewport específico, dá pra
     rolar até a barra inferior em vez dela ficar inacessível atrás do corte. */
  #player-view {
    padding-top: 12px;
    padding-bottom: 8px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Header do player com menos margem inferior no mobile */
  .slishh-player-header {
    margin-bottom: 10px;
  }

  /* Card e finish-screen: fallback razoável fora do player-active
     (ex: JS ainda não rodou); dentro do player-active, o encaixe flex
     abaixo assume o controle via flex:1. */
  .slishh-card-wrapper,
  .slishh-finish-screen {
    height: 360px;
    max-height: none;
  }

  /* Bottom bar afastada do card com padding para safe-area (notch iPhone) */
  .slishh-player-bottom {
    margin-top: 10px;
    padding-bottom: calc(env(safe-area-inset-bottom) + 6px);
  }

  /* --- Player em tela cheia ---
     Em vez de medir pixels em JS (frágil entre navegadores e instável
     com a chrome dinâmica do Safari), o player vira um overlay fixo
     ocupando a viewport real (100dvh — exclui automaticamente barras de
     endereço/nav que aparecem/somem) com altura reservada para a bottom
     nav do tema. A cadeia flex (player-view → player-content → stage →
     card) distribui o espaço sobrando até o card, com min-height:0 em
     cada nível para permitir encolher e rolar internamente (.slishh-c-mid)
     em vez de vazar para fora da tela. */
  #slishh-app.slishh-player-active {
    position: fixed;
    inset: 0;
    margin: 0;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 100;
  }

  #slishh-app.slishh-player-active #player-view {
    min-height: 0;
  }

  #slishh-app.slishh-player-active #slishh-player-content,
  #slishh-app.slishh-player-active .slishh-player-stage {
    flex: 1;
    min-height: 0;
  }

  #slishh-app.slishh-player-active .slishh-card-wrapper,
  #slishh-app.slishh-player-active .slishh-finish-screen {
    flex: 1;
    min-height: 0;
    height: auto;
    max-height: none;
  }

  /* Face do card: padding compacto + overflow oculto para não vazar conteúdo */
  .slishh-card-face {
    padding: 20px 20px 40px;
    overflow: hidden;
  }

  /* Seção central do card: scrollável internamente quando o conteúdo é longo */
  .slishh-c-mid {
    padding: 10px 0 6px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
  }

  /* Palavras longas não transbordam o card */
  .slishh-c-word,
  .slishh-c-translation {
    font-size: clamp(30px, 10.5vw, 56px);
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    margin-bottom: 10px;
  }

  /* Badge de classe gramatical mais compacto */
  .slishh-card-pos-badge {
    font-size: 11px;
    margin-bottom: 10px;
  }

  .slishh-c-sentence {
    font-size: 17px;
  }

  .slishh-c-top {
    font-size: 13px;
  }

  .slishh-pack-list {
    grid-template-columns: 1fr;
  }

  .slishh-pack-name {
    font-size: 1.2rem;
  }

  .slishh-pack-number {
    font-size: 3rem;
  }
}

/* Telas muito pequenas (< 380px): compacta ainda mais para caber na tela */
@media (max-width: 380px) {
  .slishh-card-face {
    padding: 14px 16px 34px;
  }

  .slishh-c-word,
  .slishh-c-translation {
    font-size: clamp(24px, 9vw, 40px);
    margin-bottom: 8px;
  }

  .slishh-card-pos-badge {
    font-size: 10px;
    margin-bottom: 8px;
  }

  .slishh-c-sentence {
    font-size: 15px;
    line-height: 1.5;
  }
}


/* Loading do player */
#slishh-player-loading {
  display: none;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 300px;
}

.slishh-player-loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--sl-accent);
  border-radius: 50%;
  animation: slishh-spin 0.7s linear infinite;
}

@keyframes slishh-spin {
  to { transform: rotate(360deg); }
}

/* --- Condições para avançar (desktop: botão próximo / mobile: swipe) --- */

.slishh-scroll-conditions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sl-font);
}

/* Desktop: chips com borda */
.sl-cond-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--sl-text);
  background: transparent;
  border: 1.5px solid rgb(var(--sl-ink-rgb) / 0.15);
  border-radius: 20px;
  padding: 5px 13px 5px 10px;
  opacity: 0.45;
  transition: opacity 0.25s, background 0.25s, border-color 0.25s;
}

.sl-cond-item svg {
  flex-shrink: 0;
  opacity: 0.6;
}

.sl-cond-item.done {
  opacity: 1;
  background: rgb(var(--sl-ink-rgb) / 0.07);
  border-color: rgb(var(--sl-ink-rgb) / 0.4);
}

.sl-cond-item.done svg {
  opacity: 1;
}

.sl-cond-sep {
  display: none;
}

.slishh-scroll-conditions.ready .sl-cond-item {
  opacity: 0.6;
}

/* Mobile: chips menores + hint de swipe quando pronto */
@media (max-width: 700px) {
  .sl-cond-item {
    font-size: 0.65rem;
    padding: 4px 10px 4px 8px;
    border-color: rgb(var(--sl-ink-rgb) / 0.12);
  }

  .slishh-scroll-conditions.ready::after {
    content: '↑ deslize';
    font-family: var(--sl-font);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--sl-text);
    opacity: 0.5;
    margin-left: 6px;
    animation: sl-pulse 1.4s ease-in-out infinite;
  }
}

@keyframes sl-pulse {
  0%, 100% { opacity: 0.4; transform: translateY(0); }
  50% { opacity: 0.7; transform: translateY(-2px); }
}

.slishh-scroll-hint {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--sl-inverse-bg);
  color: var(--sl-inverse-text);
  font-family: var(--sl-font);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 40px;
  z-index: 9999;
  white-space: nowrap;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s, visibility 0.2s;
}

.slishh-scroll-hint.visible {
  visibility: visible;
  opacity: 1;
}

.slishh-card-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  background: #1a5c26;
  color: #fff;
  font-family: var(--sl-font);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 40px;
  z-index: 9999;
  white-space: nowrap;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.slishh-card-toast.visible {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --- Animações de slide (mobile) --- */

@media (max-width: 700px) {
  .slishh-card-wrapper.sl-slide-out-up {
    animation: sl-out-up 0.22s ease-in forwards;
  }

  .slishh-card-wrapper.sl-slide-in-up {
    animation: sl-in-up 0.3s ease-out forwards;
  }

  .slishh-card-wrapper.sl-slide-out-down {
    animation: sl-out-down 0.22s ease-in forwards;
  }

  .slishh-card-wrapper.sl-slide-in-down {
    animation: sl-in-down 0.3s ease-out forwards;
  }
}

@keyframes sl-out-up {
  to { transform: translateY(-50px); opacity: 0; }
}

@keyframes sl-in-up {
  from { transform: translateY(50px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

@keyframes sl-out-down {
  to { transform: translateY(50px); opacity: 0; }
}

@keyframes sl-in-down {
  from { transform: translateY(-50px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

/* --- Banner pós-compra --- */

.slishh-payment-success {
  margin: 0 5% 20px;
  padding: 14px 20px;
  background: var(--sl-inverse-bg);
  color: var(--sl-inverse-text);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-left: 3px solid var(--sl-accent);
}
