/* Lotería del Barrio: cream paper, papel picado colours, large type. */
:root {
  --bg: #FFF8EC; --paper: #FFFDF8; --ink: #1F1A17; --muted: #5E554C; --line: #EADCC4;
  --mag: #C2185B; --mag-2: #A3134C; --tq: #00897B; --yel: #F4B400; --org: #F28C28; --blue: #1F5FAD;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; --serif: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.6 var(--sans); }
a { color: var(--mag); }
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--yel); outline-offset: 2px; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }
.section { padding: 24px 16px 36px; }
.picado { height: 26px; background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='26'%3E%3Cpath d='M0 0h40v18l-5 6-5-6-5 6-5-6-5 6-5-6-5 6-5-6z' fill='%23C2185B'/%3E%3Cpath d='M40 0h40v18l-5 6-5-6-5 6-5-6-5 6-5-6-5 6-5-6z' fill='%23F4B400'/%3E%3Cpath d='M80 0h40v18l-5 6-5-6-5 6-5-6-5 6-5-6-5 6-5-6z' fill='%2300897B'/%3E%3Cpath d='M120 0h40v18l-5 6-5-6-5 6-5-6-5 6-5-6-5 6-5-6z' fill='%23F28C28'/%3E%3Cpath d='M160 0h40v18l-5 6-5-6-5 6-5-6-5 6-5-6-5 6-5-6z' fill='%231F5FAD'/%3E%3Ccircle cx='20' cy='9' r='3' fill='%23FFF8EC'/%3E%3Ccircle cx='60' cy='9' r='3' fill='%23FFF8EC'/%3E%3Ccircle cx='100' cy='9' r='3' fill='%23FFF8EC'/%3E%3Ccircle cx='140' cy='9' r='3' fill='%23FFF8EC'/%3E%3Ccircle cx='180' cy='9' r='3' fill='%23FFF8EC'/%3E%3C/svg%3E");
  background-repeat: repeat-x; }

/* header / footer */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 62px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font: 400 22px/1 var(--serif); }
.logo b { color: var(--mag); font-weight: 700; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--ink); padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: 16px; }
.nav a:hover { background: #F7E9D2; }
.nav a[aria-current="page"] { background: var(--mag); color: #fff; }
.site-footer { background: #2A1F24; color: #EADFE3; margin-top: 24px; padding: 30px 0 22px; font-size: 16px; }
.site-footer a { color: #FFD3E2; display: block; text-decoration: none; padding: 3px 0; }
.site-footer .logo { color: #fff; }
.site-footer .logo b { color: #FFB0CB; }
.foot { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.foot-h { font: 700 14px/1.3 var(--sans); text-transform: uppercase; letter-spacing: .06em; color: #CDB8C0; margin: 4px 0 8px; }
.fine { font-size: 14px; color: #BFAAB2; border-top: 1px solid #4A3A40; margin-top: 18px; padding-top: 12px; }
@media (max-width: 720px) { .foot { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } .head { padding: 8px 12px; } .nav a { padding: 6px 9px; font-size: 15px; } }

/* text */
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; }
h1 { font-size: clamp(28px, 5vw, 44px); margin: 10px 0 8px; }
h2 { font-size: clamp(22px, 3.4vw, 28px); margin: 28px 0 10px; }
.small-h { font-size: 20px; margin: 18px 0 8px; }
.lead { font-size: 19px; color: var(--muted); margin: 0 0 14px; }
.prose li { margin: 6px 0; }
.hint { font-size: 15px; color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 8px 16px; border-radius: 12px; border: 1.5px solid #D9C6A6; background: var(--paper); color: var(--ink); font: 700 17px/1.2 var(--sans); cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--mag); }
.btn.primary { background: var(--mag); border-color: var(--mag); color: #fff; }
.btn.primary:hover { background: var(--mag-2); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.xl { min-height: 56px; padding: 10px 24px; font-size: 20px; }
.btn[aria-pressed="true"] { background: var(--tq); border-color: var(--tq); color: #fff; }
.faq details { border: 1px solid var(--line); border-radius: 10px; background: var(--paper); margin: 8px 0; padding: 0 14px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 12px 0; }
.faq details p { margin: 0 0 12px; }
.toast { position: fixed; left: 50%; bottom: 18px; transform: translate(-50%, 140%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 12px; font-weight: 600; transition: transform .25s; z-index: 60; max-width: calc(100% - 32px); }
.toast.on { transform: translate(-50%, 0); }

/* home */
.hero { background: linear-gradient(180deg, #FFF0DA, var(--bg)); }
.hero-in { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: center; padding: 24px 16px 10px; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; }
.fan { position: relative; height: 300px; }
.fan-card { position: absolute; width: 150px; top: 20px; left: 50%; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .25)); }
.fan-card:nth-child(1) { transform: translateX(-140%) rotate(-16deg); }
.fan-card:nth-child(2) { transform: translateX(-100%) rotate(-8deg) translateY(-8px); }
.fan-card:nth-child(3) { transform: translateX(-50%) translateY(-14px); z-index: 2; }
.fan-card:nth-child(4) { transform: translateX(0) rotate(8deg) translateY(-8px); }
.fan-card:nth-child(5) { transform: translateX(40%) rotate(16deg); }
@media (max-width: 760px) { .hero-in { grid-template-columns: 1fr; } .fan { height: 210px; } .fan-card { width: 104px; } }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tile { display: grid; grid-template-columns: 70px 1fr; grid-template-rows: auto 1fr; gap: 2px 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-decoration: none; color: var(--ink); }
.tile:hover { border-color: var(--mag); }
.tile-img { grid-row: 1 / 3; width: 70px; }
.tile-t { font: 700 19px/1.2 var(--serif); color: var(--mag); }
.tile-d { font-size: 15px; color: var(--muted); }
@media (max-width: 960px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .tiles { grid-template-columns: 1fr; } }

/* cantor */
.game-head { padding-bottom: 6px; }
.stage { background: #2A1F24; border-radius: 18px; padding: 16px; color: #FFF3E6; }
.stage.big, .stage:fullscreen { position: fixed; inset: 0; z-index: 70; border-radius: 0; overflow: auto; }
.now { display: grid; grid-template-columns: minmax(180px, 300px) 1fr; gap: 20px; align-items: center; }
.now-card { aspect-ratio: 2 / 3; display: grid; place-items: center; }
.now-img { width: 100%; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .45)); animation: pop .35s ease-out; }
@keyframes pop { from { transform: scale(.85) rotate(-4deg); opacity: .2; } to { transform: none; opacity: 1; } }
.now-empty { width: 100%; height: 100%; border: 3px dashed #8F7380; border-radius: 16px; display: grid; place-content: center; text-align: center; font: 700 30px/1.2 var(--serif); color: #FFD3E2; padding: 12px; }
.now-empty small { display: block; font: 500 16px/1.4 var(--sans); color: #CDB8C0; margin-top: 8px; }
.now-count { margin: 0; color: #CDB8C0; font-weight: 600; }
.now-name { margin: 4px 0; font: 700 clamp(30px, 5vw, 52px)/1.1 var(--serif); color: var(--yel); min-height: 1.1em; }
.now-verse { margin: 0 0 14px; font-size: 20px; font-style: italic; min-height: 1.6em; }
.now-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.stage .btn:not(.primary) { background: #3B2C33; color: #FFF3E6; border-color: #6E5560; }
.stage .btn[aria-pressed="true"] { background: var(--tq); border-color: var(--tq); }
.opts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; font-size: 16px; }
.opts select { font: 600 15px var(--sans); border-radius: 8px; padding: 4px 6px; }
.stage .hint { color: #CDB8C0; }
.stage .small-h { color: #FFF3E6; }
.history { display: grid; grid-template-columns: repeat(18, minmax(0, 1fr)); gap: 4px; }
.hcard img { display: block; width: 100%; opacity: .22; filter: grayscale(1); border-radius: 4px; }
.hcard.on img { opacity: 1; filter: none; }
.hcard.last img { outline: 3px solid var(--yel); outline-offset: 1px; }
@media (max-width: 900px) { .history { grid-template-columns: repeat(9, minmax(0, 1fr)); } }
@media (max-width: 620px) { .now { grid-template-columns: 1fr; } .now-card { max-width: 230px; margin: 0 auto; } .now-side { text-align: center; } .now-btns, .opts { justify-content: center; } .history { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.row-tools { margin: 12px 0; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 6px 16px 16px; margin: 14px 0; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.inline-form label { font-weight: 600; }
.inline-form input { font: 700 20px var(--sans); width: 9ch; padding: 8px 10px; border-radius: 10px; border: 1.5px solid #D9C6A6; letter-spacing: .08em; }
.good { color: #0B6B3A; font-weight: 600; }
.bad { color: #A3134C; font-weight: 600; }

/* tablas */
.bar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin-bottom: 14px; }
.bar label { font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.bar select, .bar input:not([type="checkbox"]) { font: 600 17px var(--sans); border-radius: 10px; border: 1.5px solid #D9C6A6; padding: 6px 8px; min-height: 44px; background: #fff; }
.tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.board { background: #6E2C46; border-radius: 16px; padding: 10px; }
.board-h { color: #FFE7F0; margin: 0 0 8px; font-weight: 600; text-align: center; }
.board-h b { letter-spacing: .08em; color: #fff; }
.tgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.tcell { position: relative; padding: 0; border: 0; background: none; display: block; cursor: pointer; border-radius: 6px; }
div.tcell { cursor: default; }
.tcell img { display: block; width: 100%; border-radius: 6px; }
.tcell.marked::after { content: ""; position: absolute; left: 50%; top: 46%; width: 42%; aspect-ratio: 1.35; transform: translate(-50%, -50%) rotate(-18deg); border-radius: 50%;
  background: radial-gradient(ellipse at 35% 30%, #A86A3D 0 18%, #6B3A1E 60%, #4A2612 100%); box-shadow: 0 3px 6px rgba(0, 0, 0, .45); }
.tgrid.small { max-width: 320px; margin-top: 8px; }
.tgrid.small .tcell.marked::after { width: 34%; }
.win { position: fixed; inset: 0; background: rgba(30, 10, 20, .6); display: grid; place-items: center; z-index: 80; padding: 16px; }
.win-box { background: var(--paper); border-radius: 18px; padding: 20px 24px; text-align: center; max-width: 420px; border: 4px solid var(--yel); }
.win-box h2 { font-size: 48px; color: var(--mag); margin: 4px 0; }

/* baraja + rules */
.baraja { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.bcard { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.bcard img { display: block; width: 100%; }
.bcard figcaption { font-size: 14px; color: var(--muted); padding: 6px 2px 2px; }
.bcard figcaption b { display: block; color: var(--ink); font-size: 16px; }
.jug { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.jg { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; }
.jg b { display: block; margin-top: 6px; }
.jg span { font-size: 15px; color: var(--muted); }
.mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; width: 92px; margin: 0 auto; }
.mini i { aspect-ratio: 2 / 3; background: #EADCC4; border-radius: 2px; }
.mini i.on { background: var(--mag); }
@media (max-width: 640px) { .jug { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* printing */
#lt-print { display: none; }
@media screen { #lt-print { display: block; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
  .ppage { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin: 12px 0; }
  .ppage.deck { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
  .ptabla { border: 2px solid var(--ink); border-radius: 8px; padding: 6px; }
  .ptabla-h { display: flex; justify-content: space-between; font-size: 15px; padding: 0 2px 4px; }
  .ptabla-h b { font-family: var(--serif); font-size: 18px; }
  .pcard img { display: block; width: 100%; }
  @media (max-width: 600px) { .ppage { grid-template-columns: 1fr; } .ppage.deck { grid-template-columns: repeat(3, minmax(0, 1fr)); } } }
@media print {
  @page { size: letter landscape; margin: 8mm; }
  body { background: #fff; }
  .site-header, .site-footer, .picado, .noprint, .skip, .toast { display: none !important; }
  #lt-print { display: block; }
  .ppage { display: grid; grid-template-columns: 1fr 1fr; gap: 10mm; break-after: page; page-break-after: always; }
  .ppage:last-child { break-after: auto; page-break-after: auto; }
  .ptabla { border: .6mm solid #000; border-radius: 3mm; padding: 2mm; }
  .ptabla-h { display: flex; justify-content: space-between; font: 10pt var(--sans); padding: 0 1mm 1.5mm; }
  .ptabla-h b { font: 700 13pt var(--serif); }
  .ptabla .tgrid { gap: 1mm; width: 116mm; margin: 0 auto; }
  .ppage.deck { grid-template-columns: repeat(6, 40mm); gap: 3mm; justify-content: center; }
  .pcard img, .tcell img { display: block; width: 100%; }
}

/* salas en línea */
.kicker { color: var(--tq); font-weight: 700; font-size: 15px; letter-spacing: .02em; margin: 0 0 4px; }
.online-band { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; background: #2A1F24; color: #FFF3E6; border-radius: 18px; padding: 20px 24px; }
.online-band h2 { color: var(--yel); margin: 0 0 6px; }
.online-band p { margin: 0; max-width: 640px; }
.join-code { align-self: center; padding: 6px 18px 14px; }
.join-code h2 { margin-top: 12px; font-size: 22px; }
.join-code label, .room-join label[for] { display: block; color: var(--muted); font-size: 15px; font-weight: 600; margin: 6px 0; }
.join-code .row { display: flex; gap: 8px; }
.join-code input, .room-join input { font: 700 20px var(--sans); padding: 8px 12px; border-radius: 10px; border: 1.5px solid #D9C6A6; background: #fff; color: var(--ink); min-height: 48px; }
.join-code input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .18em; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.steps li { counter-increment: s; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--mag); color: #fff; font-weight: 700; margin-bottom: 8px; }
.steps b { display: block; margin-bottom: 4px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.sala { padding-top: 14px; padding-bottom: 20px; }
.room-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.room-label { color: var(--muted); font-size: 15px; }
.room-code { font: 800 26px/1 var(--sans); letter-spacing: .14em; color: var(--mag); }
.conn { font-size: 14px; color: var(--muted); margin-left: 6px; }
.conn::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--yel); margin-right: 6px; vertical-align: 1px; }
.conn.ok::before { background: var(--tq); }
.conn:empty::before { display: none; }
.share { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.wa { background: #1E8E4E; border-color: #1E8E4E; color: #fff; }
.btn.warn { background: var(--yel); border-color: var(--yel); color: #2A1F24; }
.room-msg p { font-size: 19px; }
.room-join { max-width: 520px; margin: 10px auto; padding: 6px 20px 16px; }
.room-h { font-size: clamp(26px, 5vw, 36px); }
.room-join input { width: 100%; }
.seg-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 6px; }
.seg { display: inline-flex; gap: 6px; }
.seg-l { color: var(--muted); font-size: 15px; font-weight: 600; }
.seg button { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid #D9C6A6; background: var(--paper); color: var(--ink); font: 700 17px var(--sans); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--mag); border-color: var(--mag); color: #fff; }
.sala-now { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; background: #2A1F24; color: #FFF3E6; border-radius: 16px; padding: 10px 14px; box-shadow: 0 6px 18px rgba(0, 0, 0, .2); }
.sn-card { width: 104px; aspect-ratio: 2 / 3; display: grid; place-items: center; }
.sn-img { width: 100%; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .45)); animation: pop .35s ease-out; }
.sn-empty { width: 100%; height: 100%; border: 3px dashed #8F7380; border-radius: 10px; display: grid; place-items: center; font: 700 34px var(--serif); color: #FFD3E2; }
.sn-count { margin: 0; color: #CDB8C0; font-size: 15px; font-weight: 600; }
.sn-name { margin: 2px 0; font: 700 clamp(24px, 4vw, 40px)/1.1 var(--serif); color: var(--yel); }
.sn-verse { margin: 0; font-style: italic; font-size: 17px; }
.sn-btns { display: flex; flex-direction: column; gap: 8px; }
.btn.loteria { background: var(--yel); border-color: var(--yel); color: #2A1F24; font: 800 22px/1 var(--serif); min-height: 56px; padding: 8px 22px; }
.btn.loteria:hover { border-color: #fff; }
.btn.loteria.ready { animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(244, 180, 0, .8); } 70% { box-shadow: 0 0 0 14px rgba(244, 180, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(244, 180, 0, 0); } }
.host-off { color: var(--muted); font-size: 15px; margin: 8px 2px 0; }
.sala-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); gap: 18px; margin-top: 12px; align-items: start; }
.sala-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sala-side .panel, .sala-tablas .panel { margin: 0 0 12px; }
.sala-side .panel { margin: 0; }
.sala .tabs { grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.board.won { outline: 4px solid var(--yel); outline-offset: 2px; }
.board-h .badge { background: var(--yel); color: #2A1F24; border-radius: 999px; padding: 1px 9px; font-size: 13px; font-weight: 800; margin-left: 8px; }
.sala .history { grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); padding-bottom: 8px; }
#s-hist summary, #s-opts summary { cursor: pointer; font-weight: 700; padding: 10px 0; }
.hc { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: center; }
.hc label { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; }
.hc label.wide { grid-column: 1 / -1; }
.hc select { flex: 1; min-width: 0; font: 600 16px var(--sans); border-radius: 10px; border: 1.5px solid #D9C6A6; padding: 6px; min-height: 44px; background: #fff; }
.wins { margin: 0 0 4px; padding-left: 0; list-style: none; font-size: 16px; }
.wins li { padding: 5px 0; border-bottom: 1px solid var(--line); }
.wins li:last-child { border-bottom: 0; }
.wins li.empty { color: var(--muted); }
.linkish { border: 0; background: none; color: var(--mag); font: 600 15px var(--sans); text-decoration: underline; cursor: pointer; padding: 0 2px; }
.players ul { list-style: none; margin: 0; padding: 0; }
.players li { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.players li:last-child { border-bottom: 0; }
.players li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--line); flex: none; }
.players li.on::before { background: var(--tq); }
.players li.empty::before { display: none; }
.players li.empty { color: var(--muted); }
.players .pn { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.players .pi { color: var(--muted); font-size: 14px; margin-left: auto; white-space: nowrap; }
.players .kick { border: 1px solid var(--line); background: var(--paper); color: var(--muted); border-radius: 999px; min-width: 32px; height: 30px; padding: 0 8px; cursor: pointer; font-size: 13px; }
.reactions { display: flex; flex-wrap: wrap; gap: 6px; }
.reactions button { font-size: 22px; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); cursor: pointer; }
.reactions button:active { transform: scale(.92); }
.set-grid { display: grid; gap: 10px; margin: 4px 0 10px; }
.set-grid .sw { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.set-grid input { width: 20px; height: 20px; accent-color: var(--mag); }
.win-box .tgrid.small { margin: 0 auto 14px; max-width: 260px; }
.win-box { max-height: calc(100vh - 32px); overflow: auto; }
.floaters { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.floater { position: absolute; bottom: 8%; display: flex; flex-direction: column; align-items: center; animation: floatup 3s ease-out forwards; }
.floater .fe { font-size: 40px; }
.floater .fn { font-size: 13px; font-weight: 700; background: var(--paper); color: var(--ink); border-radius: 999px; padding: 2px 8px; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
@keyframes floatup { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: 1; transform: translateY(-40px) scale(1); } 100% { transform: translateY(-60vh) scale(1); opacity: 0; } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall 2.4s cubic-bezier(.3, .6, .5, 1) forwards; }
@keyframes fall { to { top: 105vh; transform: rotate(720deg); } }
@media (max-width: 860px) { .sala-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .sala-now { grid-template-columns: 64px minmax(0, 1fr); gap: 4px 12px; padding: 8px 10px; border-radius: 0 0 14px 14px; margin: 0 -16px; }
  .sn-card { width: 64px; grid-row: 1; }
  .sn-btns { grid-column: 1 / -1; flex-direction: row; }
  .sn-btns .btn { flex: 1; min-height: 50px; font-size: 18px; }
  .btn.loteria { font-size: 21px; }
  .sn-name { font-size: 24px; }
  .sn-verse { font-size: 14px; }
  .sn-count { font-size: 13px; }
  .room-code { font-size: 22px; }
  .share .btn { min-height: 42px; padding: 6px 12px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .btn.loteria.ready { animation: none; box-shadow: 0 0 0 4px #fff; } .sn-img, .now-img { animation: none; } }
