/* Módulo isolado da Loja de Personalizações — não altera regras ou geometria da mesa. */
.customization-card{width:min(980px,100%);background:radial-gradient(circle at 50% 8%,#16825a55,transparent 28%),linear-gradient(155deg,#064a36,#021f18)}
.customization-heading{max-width:720px;margin:72px auto 14px;text-align:center}
.customization-heading h2{margin:0;color:#ffe172;font-size:clamp(1.55rem,5vw,2.5rem)}
.customization-heading p{margin:8px 0;color:#c8dbd2}
.customization-balance{display:flex;align-items:center;justify-content:center;gap:8px;width:max-content;margin:12px auto;padding:8px 15px;border:2px solid #e8c554;border-radius:999px;background:#063425;font-weight:1000;color:#ffe77e}
.customization-balance img{width:26px;height:26px}
.customization-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;max-width:720px;margin:18px auto}
.customization-tabs button{min-height:48px;border:2px solid #557765;border-radius:13px;background:#073e2e;color:#dce9e3;font-weight:1000}
.customization-tabs button.active{border-color:#f6d35e;background:linear-gradient(#b68019,#76500e);color:#fff6c8;box-shadow:0 4px 0 #4a3008}
.customization-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;max-width:900px;margin:0 auto 20px}
.customization-item{display:grid;grid-template-rows:auto 1fr auto;gap:10px;min-width:0;padding:12px;border:2px solid #547965;border-radius:18px;background:linear-gradient(155deg,#0b5b42,#053426);box-shadow:0 8px 0 #001b13aa;color:#fff}
.customization-item.is-equipped{border-color:#ffe16a;box-shadow:0 0 0 3px #ffe16a38,0 8px 0 #6d480b}
.customization-item-preview{position:relative;display:grid;place-items:center;min-height:160px;overflow:hidden;border-radius:14px;background:#021b14}
.customization-item-preview.deck img{width:88px;aspect-ratio:5/7;object-fit:cover;border:2px solid #ffe27a;border-radius:9px;box-shadow:0 9px 20px #0009}
.customization-item-preview.table img{width:100%;height:160px;object-fit:cover}
.customization-default-preview{display:block;width:100%;height:100%;min-height:160px;background:radial-gradient(circle at 50% 35%,#aa592a,#4b210f 68%,#241006);box-shadow:inset 0 0 0 4px #d4a13b55}
.customization-item-copy{min-width:0;text-align:center}.customization-item-copy strong{display:block;color:#ffe37a;font-size:1.05rem}.customization-item-copy small{display:block;margin-top:4px;color:#c1d5cb;line-height:1.35}
.customization-item button{min-height:48px;border:2px solid #f2ca53;border-radius:12px;background:linear-gradient(#16845d,#07523b);color:#fff;font-weight:1000}
.customization-item button[data-action="buy"]{background:linear-gradient(#ffd957,#d99812);color:#263a2f}
.customization-item button:disabled{opacity:.6;filter:saturate(.55)}
.customization-status{min-height:24px;margin:10px auto;text-align:center;color:#ffe172;font-weight:850}

html[data-deck-theme="deck-royal"] .card-back-face,
html[data-deck-theme="deck-royal"] .card-back-on-table,
html[data-deck-theme="deck-royal"] .deck-pile i,
html[data-deck-theme="deck-royal"] .shuffle-effect i,
html[data-deck-theme="deck-royal"] .card-backs i{background-image:url('assets/customizations/deck-royal.svg')!important;background-color:#071b3a!important}
html[data-deck-theme="deck-ember"] .card-back-face,
html[data-deck-theme="deck-ember"] .card-back-on-table,
html[data-deck-theme="deck-ember"] .deck-pile i,
html[data-deck-theme="deck-ember"] .shuffle-effect i,
html[data-deck-theme="deck-ember"] .card-backs i{background-image:url('assets/customizations/deck-ember.svg')!important;background-color:#40130e!important}
html[data-table-theme="table-emerald"] .game:not([data-match-type="poker"]){background:#03281f url('assets/customizations/table-emerald.svg') center/cover no-repeat}
html[data-table-theme="table-midnight"] .game:not([data-match-type="poker"]){background:#020b18 url('assets/customizations/table-midnight.svg') center/cover no-repeat}

@media(max-width:700px){.customization-grid{grid-template-columns:1fr 1fr;gap:9px}.customization-item{padding:9px}.customization-item-preview{min-height:128px}.customization-item-preview.table img{height:128px}.customization-heading{margin-top:62px}}
@media(max-width:370px){.customization-grid{grid-template-columns:1fr}.customization-item{grid-template-columns:110px 1fr;grid-template-rows:1fr auto}.customization-item-preview{grid-row:1/3;min-height:142px}.customization-item-preview.table img{height:142px}.customization-item button{grid-column:2}}
@media(orientation:landscape) and (max-height:620px){.customization-heading{margin-top:20px}.customization-card{padding-left:max(74px,env(safe-area-inset-left));padding-right:max(18px,env(safe-area-inset-right))}.customization-grid{grid-template-columns:repeat(3,1fr)}}
.customization-games{grid-template-columns:repeat(3,minmax(0,1fr))}.customization-tabs{display:flex;gap:8px}.customization-tabs button{flex:1;min-width:0;font-size:12px}.customization-item-preview.cue img,.customization-item-preview.effect img{width:100%;height:160px;object-fit:contain}.customization-tabs .hidden{display:none!important}
/* Independent environments: the Truco equipment never paints the Poker table. */
html[data-table-theme="table-emerald"] .game:not([data-match-type="poker"]){background:#03281f url('assets/customizations/table-emerald.svg') center/cover no-repeat}
html[data-table-theme="table-midnight"] .game:not([data-match-type="poker"]){background:#020b18 url('assets/customizations/table-midnight.svg') center/cover no-repeat}
html[data-poker-table-theme="table-poker-midnight"] body #game[data-match-type="poker"] .table-wrap::before{background:radial-gradient(ellipse at 50% 45%,#285578,#133957 72%,#092135)!important;border-color:#8c7343!important}
html[data-poker-table-theme="table-poker-wine"] body #game[data-match-type="poker"] .table-wrap::before{background:radial-gradient(ellipse at 50% 45%,#82394a,#501b2d 72%,#320e1c)!important;border-color:#9a6b38!important}
html[data-poker-deck-theme="deck-poker-classic"] #game[data-match-type="poker"] .card-back-face,html[data-poker-deck-theme="deck-poker-classic"] #game[data-match-type="poker"] .poker-card-backs i{background-image:url('assets/verso-trucuzin-v1.webp')!important}
html[data-poker-deck-theme="deck-poker-royal"] #game[data-match-type="poker"] .card-back-face,html[data-poker-deck-theme="deck-poker-royal"] #game[data-match-type="poker"] .poker-card-backs i{background-image:url('assets/customizations/deck-royal.svg')!important;background-color:#071b3a!important}
/* Preserve the square Truco table silhouette while painting its actual surface. */
html[data-table-theme="table-emerald"] #game:not([data-match-type="poker"]) .table-shell .table-top{fill:#0d704e!important;stroke:#dfbf60!important}
html[data-table-theme="table-emerald"] #game:not([data-match-type="poker"]) .table-shell .table-edge{fill:#06442f!important}
html[data-table-theme="table-midnight"] #game:not([data-match-type="poker"]) .table-shell .table-top{fill:#173c61!important;stroke:#c9b772!important}
html[data-table-theme="table-midnight"] #game:not([data-match-type="poker"]) .table-shell .table-edge{fill:#0a2039!important}

html body #customization-modal .customization-games{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;width:100%;position:relative;z-index:2}
html body #customization-modal .customization-tabs button{pointer-events:auto;cursor:pointer;touch-action:manipulation}
html body #customization-modal .customization-tabs button:focus-visible{outline:3px solid white;outline-offset:2px}
html body #customization-modal .customization-heading{margin-top:60px}
.customization-empty{grid-column:1/-1;text-align:center;padding:24px;color:#f2d993}

/* Pokerzin: miniatura com a própria arte da mesa e proporção inteira, sem cortes. */
.customization-item-preview.table .poker-table-replica{display:block;width:100%;height:160px}
.customization-item-preview.table img.poker-replica-image{display:block;width:100%;height:160px;object-fit:contain}
@media(max-width:700px){.customization-item-preview.table .poker-table-replica,.customization-item-preview.table img.poker-replica-image{height:128px}}
@media(max-width:370px){.customization-item-preview.table .poker-table-replica,.customization-item-preview.table img.poker-replica-image{height:142px}}
