/* ============================================================================
   Biblioteca de skills (skills.oraculox.com): loja com cartas de habilidade.
   Usa os tokens de site.css e os componentes de sales.css. Só cores do design
   system; a raridade muda borda, brilho e selo, nunca a paleta.
   ========================================================================== */
.st-hero { position: relative; isolation: isolate; padding: calc(var(--topbar-h) + clamp(30px, 6vh, 68px)) 0 clamp(22px, 4vh, 40px); }
.st-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse 56% 60% at 82% 20%, rgba(var(--accent-rgb), .1), transparent 70%), radial-gradient(ellipse 40% 40% at 4% 100%, rgba(var(--accent-rgb), .05), transparent 70%); }
.st-hero__grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 28px clamp(32px, 6vw, 96px); align-items: end; }
.st-hello { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 7px 13px; border: 1px solid rgba(var(--accent-rgb), .35); border-radius: 999px; background: rgba(var(--accent-rgb), .06); color: var(--accent); font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.st-hello::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px rgba(var(--accent-rgb), .45); }
.st-h1 { margin: 0 0 18px; font-weight: 600; letter-spacing: -.06em; line-height: 1.04; font-size: clamp(36px, 5.4vw, 74px); text-wrap: balance; }
.st-h1 em { font-style: normal; color: var(--accent); }
.st-hero__meta { display: grid; gap: 14px; justify-items: start; }
.st-hero__meta p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; max-width: 44ch; }
.st-legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }

/* selos de raridade */
.rar { display: inline-flex; align-items: center; gap: 7px; min-height: 26px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 999px; color: #a8b19e; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.rar::before { content: ""; width: 7px; height: 7px; transform: rotate(45deg); border: 1px solid currentColor; }
.rar--rara { color: var(--accent); border-color: rgba(var(--accent-rgb), .45); }
.rar--epica { color: var(--accent-ink); background: var(--accent); border-color: #e3ffb6; }
.rar--epica::before { background: currentColor; }

/* barra de filtros */
.st-bar { position: relative; z-index: 6; border-block: 1px solid var(--line); background: rgba(8, 9, 9, .88); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.st-bar__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding-block: 14px; }
.st-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.fchip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: #a8b19e; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; transition: color .2s, border-color .2s, background .2s; }
.fchip:hover { color: var(--white); border-color: var(--line-strong); }
.fchip[aria-pressed="true"] { border-color: rgba(var(--accent-rgb), .5); background: rgba(var(--accent-rgb), .09); color: var(--accent); }
.fchip__n { opacity: .6; font-variant-numeric: tabular-nums; }
.st-count { margin: 0; color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }

/* grade de cartas */
.st-lib { padding-block: clamp(26px, 4vh, 44px) clamp(56px, 9vh, 104px); }
.st-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 262px), 1fr)); }
.st-card { display: grid; perspective: 1400px; min-width: 0; }
.st-card[hidden] { display: none; }
.st-flip { position: relative; display: grid; min-height: 392px; transform-style: preserve-3d; transition: transform .75s var(--ease); }
.st-card.is-flipped .st-flip { transform: rotateY(180deg); }
.st-face { grid-area: 1 / 1; position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 18px; border-radius: 20px; overflow: hidden; -webkit-backface-visibility: hidden; backface-visibility: hidden; cursor: pointer; }
.st-back { transform: rotateY(180deg); }
.st-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.st-cat { color: var(--dim); font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; text-align: right; }
.st-art { position: relative; display: grid; place-items: center; height: 118px; border: 1px solid var(--line); border-radius: 14px; background: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(var(--accent-rgb), .1), transparent 72%), rgba(8, 9, 9, .5); }
.st-art::before, .st-art::after { content: ""; position: absolute; width: 12px; height: 12px; border: 1px solid rgba(var(--accent-rgb), .4); }
.st-art::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.st-art::after { right: 8px; bottom: 8px; border-left: 0; border-top: 0; }
.st-gem { display: grid; place-items: center; width: 64px; height: 64px; border: 1px solid rgba(var(--accent-rgb), .45); border-radius: 18px; background: linear-gradient(160deg, rgba(var(--accent-rgb), .16), rgba(var(--accent-rgb), .03)); color: var(--accent); box-shadow: 0 0 30px -8px rgba(var(--accent-rgb), .45); }
.st-gem svg { width: 30px; height: 30px; }
.st-name { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.035em; line-height: 1.2; text-wrap: balance; }
.st-power { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.st-lv { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--dim); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: #2f352b; }
.dots i.on { background: var(--accent); }
.st-act { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.st-act .btn { padding: 8px 16px 8px 12px; }
.st-act .btn .ico { width: 17px; height: 17px; flex-basis: 17px; }
.st-turn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; border: 0; background: none; color: #a8b19e; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; text-decoration: underline; text-decoration-color: rgba(var(--accent-rgb), .4); text-underline-offset: 5px; }
.st-turn:hover { color: var(--accent); }
.st-done { display: none; color: var(--accent); font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.is-downloaded .st-done { display: inline; }
.st-back dl { display: grid; gap: 12px; margin: 0; }
.st-back dt { margin: 0 0 4px; color: var(--accent); font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.st-back dd { margin: 0; color: var(--soft); font-size: 13.5px; line-height: 1.55; }
.st-back .st-ex { padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: 12px; background: rgba(8, 9, 9, .5); font-family: var(--mono); font-size: 12px; line-height: 1.55; }
.st-back .st-name { font-size: 17px; }

/* raridades: borda, brilho e selo; nunca cores novas */
.st-card[data-rar="comum"] .st-face { border-color: var(--line); }
.st-card[data-rar="rara"] .st-face { border-color: rgba(var(--accent-rgb), .38); box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 18px 50px -26px rgba(var(--accent-rgb), .22); }
.st-card[data-rar="epica"] .st-face { border-color: rgba(var(--accent-rgb), .7); box-shadow: 0 0 0 1px rgba(var(--accent-rgb), .14), 0 1px 0 rgba(255, 255, 255, .05) inset, 0 26px 60px -28px rgba(var(--accent-rgb), .38); background: linear-gradient(160deg, rgba(var(--accent-rgb), .09), rgba(12, 14, 13, .96) 38%); }
.st-card[data-rar="epica"] .st-front::before { content: ""; position: absolute; inset: -40% -60%; z-index: 2; pointer-events: none; background: linear-gradient(115deg, transparent 42%, rgba(var(--accent-rgb), .13) 50%, transparent 58%); transform: translateX(-60%); }
.st-card[data-rar="epica"] .st-front:hover::before, .st-card[data-rar="epica"]:focus-within .st-front::before { animation: st-sheen 1.4s var(--ease) 1; }
@keyframes st-sheen { to { transform: translateX(60%); } }
.st-card.is-downloaded .st-face { border-color: rgba(var(--accent-rgb), .55); }

/* cartas viradas: a face escondida não recebe foco */
.st-card:not(.is-flipped) .st-back, .st-card.is-flipped .st-front { visibility: hidden; transition: visibility 0s linear .38s; }
.st-card.is-flipped .st-back, .st-card:not(.is-flipped) .st-front { visibility: visible; transition: visibility 0s; }

/* acesso */
.st-gate { padding: calc(var(--topbar-h) + clamp(30px, 7vh, 80px)) 0 clamp(56px, 9vh, 100px); min-height: 70vh; }
.st-gate__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: clamp(28px, 5vw, 80px); align-items: center; }
.st-gate__copy { display: grid; gap: 18px; justify-items: start; }
.st-gate__preview { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 0; padding: 0; list-style: none; }
.st-gate__preview li { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; color: #8d948a; font-size: 13px; filter: blur(.4px); }
.st-gate__preview li::before { content: ""; width: 12px; height: 12px; background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Crect x='5' y='10.5' width='14' height='10' rx='3' stroke='%2391978f' stroke-width='1.8'/%3E%3Cpath d='M8.5 10.5V8a3.5 3.5 0 0 1 7 0v2.5' stroke='%2391978f' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); }
.st-gate .card { padding: clamp(22px, 3.4vw, 34px); }
.st-check { min-height: 60vh; display: grid; place-items: center; text-align: center; padding-top: var(--topbar-h); color: var(--muted); font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.st-check span::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 10px; border-radius: 50%; background: var(--accent); animation: status-pulse 1.6s ease-in-out infinite; }
.st-note { margin: 0; padding: 12px 14px; border: 1px solid rgba(var(--accent-rgb), .3); border-radius: 12px; background: rgba(var(--accent-rgb), .05); color: var(--soft); font-size: 13.5px; line-height: 1.5; }
.st-note button { padding: 0; border: 0; background: none; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; font-size: inherit; }

/* como usar e venda cruzada */
.st-how { border-top: 1px solid var(--line); padding-block: clamp(44px, 7vh, 80px); }
.st-how .s-steps li { padding: 18px 20px; }
.st-x { border-top: 1px solid var(--line); padding-block: clamp(44px, 7vh, 80px); }
.st-x__head { display: grid; gap: 8px; margin-bottom: 22px; }
.st-x__head h2 { margin: 0; font-size: clamp(20px, 2.2vw, 28px); font-weight: 600; letter-spacing: -.04em; }
.st-x__head p { margin: 0; color: var(--muted); font-size: 14.5px; max-width: 60ch; }
.st-x__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.st-x__i { display: grid; gap: 8px; align-content: start; padding: 20px; text-decoration: none; }
.st-x__i h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.03em; }
.st-x__i p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.st-x__row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 6px; }
.st-x__price { color: var(--soft); font-family: var(--mono); font-size: 13px; }
.st-x__go { color: var(--accent); font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }

@media (max-width: 1040px) {
  .st-hero__grid, .st-gate__grid { grid-template-columns: 1fr; }
  .st-x__grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .st-bar__in { padding-block: 10px; }
  .st-filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 0 16px 2px; scrollbar-width: none; width: calc(100% + 32px); }
  .st-filters::-webkit-scrollbar { display: none; }
  .st-grid { gap: 14px; }
  .st-flip { min-height: 380px; }
}
@media (prefers-reduced-motion: reduce) {
  .st-flip { transition: none; }
  .st-card.is-flipped .st-front, .st-card:not(.is-flipped) .st-back { transition: none; }
  .st-check span::before { animation: none; }
  .st-card[data-rar="epica"] .st-front:hover::before { animation: none; }
}
.motion-paused .st-flip { transition: none; }
.motion-paused .st-card[data-rar="epica"] .st-front:hover::before { animation: none; }
