* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #9fd8ff; font-family: 'Nunito', 'Trebuchet MS', system-ui, sans-serif; color: #2b1d3a; user-select: none; touch-action: none; }
#cena { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.tela { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; padding: 18px; z-index: 10; }
.tela.ativa { display: flex; }
.modal { background: rgba(40, 20, 70, .45); backdrop-filter: blur(3px); z-index: 30; }
#tela-carregando { background: radial-gradient(circle at 50% 40%, #ffe27a, #ff8a5c 55%, #ff4f6d); flex-direction: column; gap: 18px; }
#tela-titulo { background: linear-gradient(180deg, rgba(255,255,255,0) 40%, rgba(255,79,109,.35)); }
.logo { display: flex; flex-direction: column; align-items: center; line-height: .9; transform: rotate(-3deg); }
.logo span { white-space: nowrap; font-size: 54px; font-weight: 900; color: #fff; letter-spacing: 1px; text-shadow: 0 5px 0 #e0304f, 0 9px 0 #a0183a, 0 14px 22px rgba(0,0,0,.25); -webkit-text-stroke: 2px #a0183a; }
.logo em { font-style: normal; font-weight: 900; font-size: 26px; color: #ffd23f; text-shadow: 0 3px 0 #b06a00; margin-top: 8px; }
.logo.grande span { font-size: clamp(46px, 9vw, 84px); }
.logo.grande em { font-size: clamp(24px, 4vw, 36px); }
.barra { width: min(320px, 80vw); height: 16px; border-radius: 99px; background: rgba(255,255,255,.4); overflow: hidden; border: 3px solid #fff; }
.barra i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(45deg, #ffd23f 0 12px, #fff3b0 12px 24px); transition: width .2s; }
.mini { font-size: 14px; opacity: .85; }
.sub { font-size: 17px; margin: 6px 0 14px; }
.cartao { background: #fff; border-radius: 28px; padding: 26px 28px; box-shadow: 0 10px 0 #ffb2c0, 0 18px 40px rgba(60,10,40,.3); text-align: center; max-width: 520px; width: 100%; display: flex; flex-direction: column; gap: 10px; align-items: center; border: 4px solid #ff4f6d; }
.cartao.largo { max-width: 760px; }
.cartao.titulo { background: rgba(255,255,255,.92); }
h2 { font-size: 30px; font-weight: 900; color: #e0304f; }
.btn, .btn-sec { font: inherit; font-weight: 900; border: 0; cursor: pointer; border-radius: 99px; padding: 14px 34px; font-size: 21px; transition: transform .1s; }
.btn { background: linear-gradient(#ffe066, #ffbf1f); color: #6a3a00; box-shadow: 0 6px 0 #c98a00; }
.btn-sec { background: #f1e8ff; color: #5b3a8a; box-shadow: 0 5px 0 #c7b2ea; font-size: 17px; padding: 11px 26px; }
.btn:active, .btn-sec:active { transform: translateY(4px); box-shadow: none; }
.btn:focus-visible, .btn-sec:focus-visible, .carta:focus-visible { outline: 4px solid #3fb6ff; outline-offset: 3px; }
.linha { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.controles { border-collapse: collapse; width: 100%; font-size: 14px; }
.controles th, .controles td { padding: 6px 8px; border-bottom: 2px dashed #ffd1da; text-align: left; }
.controles th { color: #e0304f; }
.rodadas { text-align: left; font-size: 15px; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.cartas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; width: 100%; }
.carta { font: inherit; cursor: pointer; border: 4px solid #eee; background: #fff8ef; border-radius: 22px; padding: 10px 6px 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: transform .15s, border-color .15s; }
.carta img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 16px; background: radial-gradient(circle, #fff, var(--c) 160%); }
.carta b { font-size: 16px; }
.carta.sel { border-color: var(--c); transform: translateY(-6px) scale(1.04); box-shadow: 0 8px 0 var(--c); }
@media (max-width: 560px) { .cartas { grid-template-columns: repeat(2, 1fr); } .cartao { padding: 18px 14px; } }

#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
.oculto { display: none !important; }
#hud-topo { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); text-align: center; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.35); display: flex; flex-direction: column; align-items: center; gap: 4px; }
#hud-nome { font-weight: 900; font-size: 15px; background: #ff4f6d; padding: 4px 14px; border-radius: 99px; box-shadow: 0 3px 0 #a0183a; }
#hud-info { font-size: 20px; font-weight: 800; }
.prog { width: 240px; height: 10px; background: rgba(255,255,255,.45); border-radius: 99px; overflow: hidden; border: 2px solid #fff; }
.prog i { display: block; height: 100%; width: 0; background: #ffd23f; }
#hud-coroa { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 5px; width: 230px; }
.barra-coroa { position: relative; background: rgba(255,255,255,.85); border-radius: 99px; height: 26px; overflow: hidden; border: 2px solid #fff; }
.barra-coroa i { position: absolute; inset: 0 auto 0 0; opacity: .75; }
.barra-coroa span { position: relative; z-index: 1; font-weight: 800; font-size: 13px; padding-left: 10px; line-height: 22px; }
.barra-coroa em { position: absolute; right: 9px; top: 2px; font-style: normal; font-weight: 900; font-size: 13px; z-index: 1; }
.barra-coroa.eu { border-color: #ffd23f; box-shadow: 0 0 0 2px #ff9a3c; }
#banner { position: absolute; top: 26%; left: 50%; transform: translate(-50%, -50%) scale(.6); font-size: clamp(30px, 6vw, 58px); font-weight: 900; color: #fff; -webkit-text-stroke: 2px #a0183a; text-shadow: 0 5px 0 #e0304f, 0 10px 20px rgba(0,0,0,.25); opacity: 0; white-space: nowrap; transition: transform .25s cubic-bezier(.3,1.6,.5,1), opacity .2s; text-align: center; }
#banner.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
#banner small { display: block; font-size: .42em; -webkit-text-stroke: 0; text-shadow: 0 2px 0 rgba(0,0,0,.3); }
#contagem { position: absolute; top: 45%; left: 50%; transform: translate(-50%, -50%); font-size: 130px; font-weight: 900; color: #ffd23f; -webkit-text-stroke: 4px #a0183a; text-shadow: 0 8px 0 #a0183a; }
.redondo { pointer-events: auto; position: absolute; top: 12px; width: 46px; height: 46px; border-radius: 50%; border: 3px solid #fff; background: rgba(255,79,109,.85); color: #fff; font-size: 20px; cursor: pointer; }
#bt-pausa { right: 12px; } #bt-som { right: 66px; }
#toque { position: fixed; inset: 0; z-index: 6; pointer-events: none; }
#zona-joy { position: absolute; left: 0; top: 30%; bottom: 0; width: 50%; pointer-events: auto; }
#joy { position: absolute; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; background: rgba(255,255,255,.25); border: 3px solid rgba(255,255,255,.7); display: none; pointer-events: none; }
#joy.on { display: block; }
#joy i { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px; border-radius: 50%; background: #ffd23f; border: 3px solid #fff; }
#toque button { position: absolute; pointer-events: auto; border-radius: 50%; border: 4px solid #fff; font: inherit; font-weight: 900; color: #fff; }
#bt-pular { right: 22px; bottom: 30px; width: 104px; height: 104px; background: #3fb6ff; font-size: 17px; box-shadow: 0 6px 0 #1b6fa8; }
#bt-mergulhar { right: 138px; bottom: 22px; width: 92px; height: 92px; background: #ff4f6d; font-size: 12px; box-shadow: 0 6px 0 #a0183a; }
.lista { list-style: none; width: 100%; display: flex; flex-direction: column; gap: 6px; }
.lista li { display: flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 14px; background: #f6f1ff; font-weight: 800; }
.lista li .pos { width: 30px; font-size: 18px; color: #8a6cc0; }
.lista li .bola { width: 16px; height: 16px; border-radius: 50%; }
.lista li .st { margin-left: auto; font-size: 14px; }
.lista li.passa { background: #e3fbe5; } .lista li.passa .st { color: #1f9b3a; }
.lista li.sai { opacity: .6; } .lista li.sai .st { color: #c0304f; }
.lista li.eu { outline: 3px solid #ffd23f; }
