/* Tesouro da Coroa — usa o layout dos caça-níqueis (.rs) com pele própria: cofre real roxo e dourado, grade 6×5. */
.rs-tesouro { --glow: #f7c85e; --g2: #b04bff; --panel: rgba(16, 7, 28, .84); --line: rgba(247, 200, 94, .4); background: #12061f; }
.ts-bg { background: radial-gradient(700px 420px at 55% 30%, rgba(176, 75, 255, .35), transparent 70%), radial-gradient(600px 380px at 80% 90%, rgba(247, 200, 94, .22), transparent 70%), linear-gradient(160deg, #1e0a33, #0b0414 70%); }
.ts-bg::after { display: none; }
.rs-tesouro .rs-title em { background: linear-gradient(180deg, #f3d6ff, #b04bff 55%, #4a0f86); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 0 #22053d) drop-shadow(0 0 12px rgba(176, 75, 255, .55)); font-size: clamp(24px, 2.5vw, 40px); }
.rs-tesouro .rs-stake, .rs-tesouro .rs-rounds button:not(.on) { background: #1a0a2b; }

/* faixa de cima: multiplicador acumulado, rodadas grátis e ganho do giro */
.ts-top { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.ts-chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); font-size: 12px; font-weight: 800; letter-spacing: .04em; color: #e9dcff; }
.ts-chip[hidden] { display: none; }
.ts-chip i { color: var(--a); font-size: 17px; }
.ts-chip b { font-family: var(--display); font-size: 18px; color: #fff; }
.ts-chip.ts-win.on b { color: #ffe7a3; text-shadow: 0 0 12px rgba(247, 200, 94, .7); }
.ts-chip #tsAcc { color: #ff8a7a; }
.ts-chip b.pop { animation: tsPop .5s var(--spring, ease); }

/* moldura e grade */
.ts-fit { flex: 1; min-width: 0; min-height: 0; container-type: size; display: grid; place-items: center; }
.ts-frame { position: relative; width: min(100cqw, 100cqh * 6 / 5); aspect-ratio: 6 / 5; padding: 1.4%; border-radius: 18px;
  background: linear-gradient(145deg, #ffe7a3, #b04bff 16%, #3a0d63 38%, #f5c043 56%, #5a1690 78%, #ffe7a3); box-shadow: 0 0 0 2px rgba(0, 0, 0, .5), 0 18px 50px rgba(0, 0, 0, .6), 0 0 40px rgba(176, 75, 255, .35); }
.ts-frame.free { box-shadow: 0 0 0 2px rgba(0, 0, 0, .5), 0 18px 50px rgba(0, 0, 0, .6), 0 0 60px rgba(247, 200, 94, .7); animation: tsGlow 1.6s ease-in-out infinite alternate; }
.ts-board { position: relative; height: 100%; display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(5, 1fr); grid-auto-flow: column; border-radius: 12px; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #2c1048, #12061f 75%); box-shadow: inset 0 0 30px rgba(0, 0, 0, .7); }
.ts-board::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 6 - 1px), rgba(247, 200, 94, .08) calc(100% / 6 - 1px) calc(100% / 6)); pointer-events: none; }
.ts-cell { position: relative; display: grid; place-items: center; padding: 6%; will-change: transform; }
.ts-cell svg { width: 100%; height: 100%; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .55)); transition: transform .2s, opacity .2s, filter .2s; }
.ts-board.dim .ts-cell:not(.win) svg { opacity: .28; filter: grayscale(.6) brightness(.6); }
.ts-cell.win svg { animation: tsWin .7s ease-in-out infinite alternate; filter: drop-shadow(0 0 10px rgba(255, 231, 163, .95)) drop-shadow(0 4px 4px rgba(0, 0, 0, .5)); }
.ts-cell.win::after { content: ''; position: absolute; inset: 6%; border-radius: 14px; border: 2px solid rgba(255, 231, 163, .85); box-shadow: 0 0 14px rgba(247, 200, 94, .7), inset 0 0 14px rgba(247, 200, 94, .35); }
.ts-cell.scat::after { border-color: #fff; box-shadow: 0 0 22px #ffd84d; }
.ts-cell.pop svg { transform: scale(0); opacity: 0; transition: transform .25s ease-in, opacity .25s; }
.ts-cell.pop::after { display: none; }
.ts-cell.seal svg { animation: tsSeal .9s var(--spring, ease); filter: drop-shadow(0 0 16px #ff6b5a); }
.rs-tesouro .rs-msg { min-height: 34px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: center; }
.ts-g { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px 3px 4px; border-radius: 99px; background: rgba(0, 0, 0, .35); font-size: 12.5px; }
.ts-g svg { width: 22px; height: 22px; }
.ts-g b { color: #ffe7a3; }

/* sobreposições */
.ts-over.ts-seal-over { background: radial-gradient(circle, rgba(179, 18, 31, .45), rgba(4, 3, 10, .55) 70%); }
.ts-mx { font: 900 clamp(60px, 11cqw, 120px) var(--display) !important; color: #fff !important; text-shadow: 0 0 24px #ff6b5a, 0 6px 0 #5e0610 !important; animation: tsPop .6s var(--spring, ease); }

/* tabela de pagamentos */
.ts-pays-p { display: flex; flex-direction: column; min-height: 0; }
.ts-pays-p h4 { align-items: center !important; }
.ts-rules { margin-left: auto; width: 26px; height: 26px; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #e9dcff; font-size: 14px; display: grid; place-items: center; }
.ts-pays { display: flex; flex-direction: column; gap: 4px; overflow: auto; min-height: 0; }
.ts-pay { display: grid; grid-template-columns: 38px repeat(3, 1fr); align-items: center; gap: 4px; padding: 3px 6px; border-radius: 10px; background: rgba(255, 255, 255, .04); }
.ts-pay span svg { width: 34px; height: 34px; display: block; }
.ts-pay div { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.ts-pay small { font-size: 9.5px; color: #9d8bb8; font-weight: 700; }
.ts-pay b { font-family: var(--display); font-size: 13px; color: #fff; }
.ts-pay:nth-child(-n+4) b { color: var(--a2); }

@keyframes tsWin { to { transform: scale(1.1); } }
@keyframes tsPop { 0% { transform: scale(.4); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes tsSeal { 0% { transform: scale(1); } 40% { transform: scale(1.45) rotate(-8deg); } 100% { transform: scale(1.1); } }
@keyframes tsGlow { to { box-shadow: 0 0 0 2px rgba(0, 0, 0, .5), 0 18px 50px rgba(0, 0, 0, .6), 0 0 90px rgba(247, 200, 94, .95); } }

@media (max-width: 760px), (max-aspect-ratio: 4/5) {
  .rs-tesouro .rs-title em { font-size: clamp(20px, 6vw, 30px); }
  .ts-top { gap: 5px; }
  .ts-chip { height: 32px; padding: 0 10px; font-size: 10.5px; }
  .ts-chip b { font-size: 15px; }
  .ts-chip i { display: none; }
  .ts-frame { border-radius: 12px; }
  .rs-tesouro .rs-ctrl .rs-auto { grid-column: 1; grid-row: 4; }
  .rs-tesouro .rs-ctrl .rs-auto + .rs-auto { grid-row: 5; }
  .rs-tesouro .rs-bal { grid-row: 4 / span 2; align-self: center; }
}
