.page { max-width: 560px; margin: 0 auto; padding: 28px 16px 48px; }
h1 { font-family: var(--font-display); font-stretch: 62%; font-weight: 900; font-size: 44px; line-height: 0.95; margin: 0 0 18px; overflow-wrap: anywhere; }
h2 { font-family: var(--font-display); font-stretch: 62%; font-weight: 800; font-size: 26px; margin: 0 0 12px; }
section { margin-top: 36px; }

.total { --tear: 78px; --notch: 11px; display: flex; align-items: stretch; background: var(--ticket); color: var(--ink); border-radius: 14px; min-height: 108px; }
.total-tear { width: 78px; flex: none; display: grid; place-items: center; position: relative; }
.total-tear::after { content: ''; position: absolute; right: -1px; top: 16px; bottom: 16px; width: 3px; background: repeating-linear-gradient(to bottom, rgba(22, 19, 58, 0.35) 0 6px, transparent 6px 12px); }
.total-tear svg { width: 42px; height: 42px; transform: rotate(-12deg); }
.total-main { padding: 12px 20px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.total-num { font-family: var(--font-display); font-stretch: 62%; font-weight: 900; font-size: 68px; line-height: 0.85; }
.total-cap { font-weight: 600; font-size: 15px; opacity: 0.72; margin-top: 4px; }
.paused { margin: 12px 0 0; color: var(--stamp-text); font-weight: 600; }

.lookup { display: flex; gap: 8px; }
.lookup .input { flex: 1; min-width: 0; }

/* bilhete pessoal: papel claro com canhoto à direita */
.my-ticket { margin-top: 16px; display: flex; color: var(--ink); filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.35)); }
.my-body {
  --notch: 12px; flex: 1; min-width: 0; background: var(--paper); border-radius: 14px 0 0 14px; padding: 18px 20px;
  -webkit-mask: radial-gradient(circle var(--notch) at 100% 0, transparent 96%, #000 100%), radial-gradient(circle var(--notch) at 100% 100%, transparent 96%, #000 100%);
  -webkit-mask-composite: source-in;
  mask: radial-gradient(circle var(--notch) at 100% 0, transparent 96%, #000 100%), radial-gradient(circle var(--notch) at 100% 100%, transparent 96%, #000 100%);
  mask-composite: intersect;
}
.my-stub {
  --notch: 12px; width: 108px; flex: none; background: var(--paper); border-radius: 0 14px 14px 0; border-left: 3px dashed rgba(22, 19, 58, 0.3);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 10px 6px;
  -webkit-mask: radial-gradient(circle var(--notch) at 0 0, transparent 96%, #000 100%), radial-gradient(circle var(--notch) at 0 100%, transparent 96%, #000 100%);
  -webkit-mask-composite: source-in;
  mask: radial-gradient(circle var(--notch) at 0 0, transparent 96%, #000 100%), radial-gradient(circle var(--notch) at 0 100%, transparent 96%, #000 100%);
  mask-composite: intersect;
}
.my-name { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; overflow-wrap: anywhere; }
.my-num { font-family: var(--font-display); font-stretch: 62%; font-weight: 900; font-size: 64px; line-height: 0.9; margin-top: 8px; }
.my-num small { font-size: 22px; font-weight: 800; }
.my-line { margin: 8px 0 0; font-size: 15px; font-weight: 500; color: rgba(22, 19, 58, 0.75); }
.my-stub .label { font-size: 12px; font-weight: 600; color: rgba(22, 19, 58, 0.6); }
.my-stub .rank { font-family: var(--font-display); font-stretch: 62%; font-weight: 900; font-size: 40px; line-height: 1; }
.my-stub .chance { font-weight: 700; font-size: 14px; margin-top: 6px; }
.not-found { margin-top: 16px; padding: 14px 16px; border: 1px dashed var(--line-strong); border-radius: var(--r-md); color: var(--muted); }

.how ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.how li { display: flex; gap: 12px; align-items: baseline; }
.how li b { flex: none; min-width: 64px; font-family: var(--font-display); font-stretch: 62%; font-weight: 900; font-size: 22px; color: var(--ticket); }

.top, .wins { list-style: none; margin: 0; padding: 0; }
.top li, .wins li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pos { width: 30px; flex: none; font-family: var(--font-display); font-stretch: 62%; font-weight: 900; font-size: 22px; color: var(--muted); text-align: right; }
.top li:nth-child(-n + 3) .pos { color: var(--ticket); }
.name { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qty { font-family: var(--font-display); font-stretch: 62%; font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; }
.top li.is-me { background: rgba(255, 200, 61, 0.08); border-radius: 8px; }
.empty { color: var(--muted); }
.foot { margin-top: 40px; color: var(--faint); font-size: 13px; }

/* topo: ao vivo + som do sorteio */
.hero-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.live-chip { display: inline-flex; align-items: center; gap: 7px; padding: 3px 11px; border-radius: 999px; background: rgba(232, 56, 79, 0.16); color: var(--stamp-text); font-weight: 700; font-size: 13px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--stamp); flex: none; animation: live-dot 1.4s infinite; }
@keyframes live-dot { 70% { box-shadow: 0 0 0 6px rgba(232, 56, 79, 0); } 0% { box-shadow: 0 0 0 0 rgba(232, 56, 79, 0.55); } }
.ss-logo-sm { font-size: 20px; margin-right: 4px; }
.sound-ctl { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.sound-toggle {
  display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 4px 12px 4px 10px;
  border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer;
}
.sound-toggle svg { width: 17px; height: 17px; }
.sound-toggle:hover { color: var(--text); border-color: var(--muted); }
.sound-toggle[aria-pressed='true'] { background: var(--ticket); border-color: var(--ticket); color: var(--ink); }
.lookup-hint { margin-top: 8px; }
/* barra de volume do sorteio */
.vol { -webkit-appearance: none; appearance: none; width: 110px; height: 30px; margin: 0; background: transparent; cursor: pointer; }
.vol::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--ticket) var(--v, 80%), var(--line-strong) var(--v, 80%)); }
.vol::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: var(--paper); border: 3px solid var(--ticket); }
.vol::-moz-range-track { height: 6px; border-radius: 3px; background: var(--line-strong); }
.vol::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--ticket); }
.vol::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 3px solid var(--ticket); }
.vol.is-muted { opacity: 0.45; }

/* reabrir o show depois de fechar */
.pill {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30;
  display: inline-flex; align-items: center; gap: 9px; padding: 12px 20px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--ticket); color: var(--ink); font-weight: 800; font-size: 15px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); white-space: nowrap;
}
html.show-open, html.show-open body { overflow: hidden; }

/* demonstração: o toque em "Assistir com som" é o que libera o áudio no celular */
.demo-start { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 50; display: grid; place-items: center; padding: 20px; background: rgba(8, 6, 28, 0.86); }
.demo-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 28px 22px; border-radius: var(--r-lg); background: var(--ink-2); border: 1px solid var(--line-strong); }
.demo-card h2 { margin: 0; font-size: 34px; line-height: 1; }
.demo-card p { margin: 0 0 6px; color: var(--muted); }
.demo-card .btn { width: 100%; min-height: 48px; font-size: 16px; }
.demo-go svg { width: 20px; height: 20px; }
.demo-icon { width: 54px; height: 54px; color: var(--ticket); transform: rotate(-12deg); }

/* celular: a logo divide a linha de cima com o som; o botão fica só com o ícone (o texto continua para leitores de tela) */
@media (max-width: 480px) {
  .sound-toggle { width: 34px; padding: 0; justify-content: center; }
  .sound-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 380px) {
  .lookup { flex-direction: column; }
  .my-num { font-size: 54px; }
}
