
:root {
  --bg: #17131f;
  --surface: #1e1829;
  --surface-2: #251d33;
  --border: #3a2f4d;
  --border-soft: #2a2338;
  --text: #f2eff7;
  --muted: #9891a8;
  --accent: #a683d1;
  --accent-bg: rgba(166, 131, 209, 0.12);
  --accent-text: #c3a8dd;
  --accent-soft: #7c5aa8;
  --accent-glow: rgba(166, 131, 209, 0.26);
  --accent-ink: #1f1330;
  --silver: #d6d0e0;
  --bronze: #c99a6c;
  --danger: #ef4470;
  --danger-bg: rgba(239, 68, 112, 0.14);
  --positive: #46b17f;
  --font-display: "Nunito", sans-serif;
  --font-title: "Abril Fatface", serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --radius: 6px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

:root[data-theme="nebulosa"] {
  --bg: #14141c;
  --surface: #1b1b26;
  --surface-2: #21212e;
  --border: #34343f;
  --border-soft: #24242e;
  --text: #f0f0f5;
  --muted: #8e8ea3;
  --accent: #7089a0;
  --accent-bg: rgba(112, 137, 160, 0.12);
  --accent-text: #a3b4c4;
  --accent-soft: #56697a;
  --accent-glow: rgba(112, 137, 160, 0.26);
  --accent-ink: #0e1519;
  --silver: #cfd3dc;
}

:root[data-theme="safira"] {
  --bg: #0f1420;
  --surface: #161d2e;
  --surface-2: #1c2438;
  --border: #2c3650;
  --border-soft: #1e2638;
  --text: #eef1f8;
  --muted: #8792ac;
  --accent: #5d7dd6;
  --accent-bg: rgba(93, 125, 214, 0.12);
  --accent-text: #8a9edd;
  --accent-soft: #44579e;
  --accent-glow: rgba(93, 125, 214, 0.26);
  --accent-ink: #0a1530;
  --silver: #c9d2e3;
}

:root[data-theme="grafite"] {
  --bg: #16171a;
  --surface: #1d1e22;
  --surface-2: #232529;
  --border: #35373d;
  --border-soft: #26272b;
  --text: #f1f1f3;
  --muted: #93949c;
  --accent: #9fb0c2;
  --accent-bg: rgba(159, 176, 194, 0.12);
  --accent-text: #bcc9d6;
  --accent-soft: #6f7f8f;
  --accent-glow: rgba(159, 176, 194, 0.26);
  --accent-ink: #14181c;
  --silver: #d4d7dc;
}

:root[data-theme="recife"] {
  --bg: #101a1a;
  --surface: #16211f;
  --surface-2: #1c2926;
  --border: #2d3a37;
  --border-soft: #1f2926;
  --text: #eef4f2;
  --muted: #87a19b;
  --accent: #d1a25e;
  --accent-bg: rgba(209, 162, 94, 0.12);
  --accent-text: #ddb87f;
  --accent-soft: #a17c44;
  --accent-glow: rgba(209, 162, 94, 0.26);
  --accent-ink: #2b1c05;
  --silver: #cfd8d5;
}

* { box-sizing: border-box; }

svg.icon { display: block; flex-shrink: 0; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
}

body {
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: var(--grain);
}

.page { position: relative; z-index: 1; }

::selection { background: var(--accent-bg); color: var(--accent-text); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-soft); }

.history-list, .donor-list {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
.history-list::-webkit-scrollbar-thumb,
.donor-list::-webkit-scrollbar-thumb {
  background: transparent;
  transition: background 0.2s ease;
}
.history-list:hover::-webkit-scrollbar-thumb,
.donor-list:hover::-webkit-scrollbar-thumb {
  background: var(--border);
}
.history-list::-webkit-scrollbar-thumb:hover,
.donor-list::-webkit-scrollbar-thumb:hover {
  background: var(--accent-soft);
}

body.board-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

body.board-body.has-bg-image {
  background-image: linear-gradient(rgba(8, 8, 14, 0.72), rgba(8, 8, 14, 0.72)), var(--bg-image);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.board-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
body.board-body.has-bg-image .board-bg { display: none; }

.board-bg-shard {
  position: absolute;
  display: block;
  border-radius: 6px;
  border: 2px solid var(--accent-soft);
  transform: rotate(45deg);
  opacity: 0.2;
}
.board-bg-shard-1 { top: 6%; left: 3%; width: 26px; height: 26px; }
.board-bg-shard-2 { top: 84%; left: 4.5%; width: 18px; height: 18px; background: var(--accent-bg); border-color: transparent; }
.board-bg-shard-3 { top: 9%; left: 95%; width: 22px; height: 22px; background: var(--accent-bg); border-color: transparent; }
.board-bg-shard-4 { top: 80%; left: 93%; width: 30px; height: 30px; }
.board-bg-shard-5 { top: 45%; left: 1.5%; width: 16px; height: 16px; opacity: 0.14; }

@media (max-width: 720px) {
  .board-bg-shard-3, .board-bg-shard-4 { display: none; }
}

.board-cover-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s ease;
}
body.board-body.has-covers .board-cover-bg { opacity: 1; }
body.board-body.has-covers .board-bg { display: none; }
body.board-body.has-bg-image .board-cover-bg { display: none; }

.board-cover-bg-grid {
  position: absolute;
  top: -12%;
  left: -12%;
  width: 130%;
  height: 150%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 3px;
  animation: board-cover-pan 42s linear infinite alternate;
}
.board-cover-bg-tile {
  background-color: var(--surface-alt, #1a1a22);
  background-size: cover;
  background-position: center;
  aspect-ratio: 3 / 4;
  filter: saturate(0.85);
}
@keyframes board-cover-pan {
  from { transform: translate(0, 0); }
  to { transform: translate(-6%, -5%); }
}
@media (prefers-reduced-motion: reduce) {
  .board-cover-bg-grid { animation: none; }
}
.board-cover-bg-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(8, 8, 14, 0.8), rgba(8, 8, 14, 0.86));
}

.page {
  display: flex;
  flex-direction: column;
  height: min(100vh, 1000px);
  width: 100%;
  max-width: 1850px;
  padding: 18px 24px 14px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.topbar-mark {
  display: flex;
  align-items: baseline;
  gap: 11px;
  margin: 0;
}

.topbar-mark::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-bottom: 3px;
  background: var(--accent);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.board-body .brand-word { --font-title: "Fredoka", sans-serif; font-weight: 700; }

.brand-word {
  font-family: var(--font-title);
  font-style: normal;
  font-weight: 400;
  font-size: 30px;
  letter-spacing: 0.01em;
  color: var(--text);
  line-height: 1;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.title-swap { position: relative; display: inline-block; }
.title-swap-char { display: inline-block; }
.title-swap-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}
.title-swap-icon svg { width: 0.68em; height: 0.68em; }
.title-swap-icon.icon-coin { color: var(--positive); }
.title-swap-icon.icon-controller { color: var(--accent); }
.title-swap-icon.icon-dice { color: var(--bronze); }
.title-swap-icon.icon-trophy { color: var(--silver); }
.title-swap-icon.icon-star { color: var(--accent-text); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 12.5px;
}

.topbar-total {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  position: relative;
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  padding: 5px 14px 5px 12px;
}

.topbar-total::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from 0deg, transparent, var(--accent) 15%, transparent 30%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  pointer-events: none;
}
.topbar-total.beam::before { animation: topbar-total-beam 1.1s ease-out; }
@keyframes topbar-total-beam {
  0% { transform: rotate(0deg); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: rotate(320deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .topbar-total.beam::before { animation: none; }
}

.topbar-total-icon { color: var(--muted); width: 15px; height: 15px; flex-shrink: 0; }

.topbar-total-label {
  color: var(--muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 9px;
}

.topbar-total strong {
  display: inline-block;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
  transition: transform 0.15s ease;
}

/* Precisa de mais especificidade que ".topbar-total strong" acima, senão perde o empate na cascata. */
.topbar-total .topbar-total-hidden-label {
  display: none;
  font-size: 14px;
  font-weight: 600;
  font-style: italic;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
}
.topbar-total.is-hidden .topbar-total-value { display: none; }
.topbar-total.is-hidden .topbar-total-hidden-label { display: inline-block; }

.total-hide-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 2px;
  color: var(--muted);
  cursor: pointer;
  border-radius: 4px;
}
.presenter-mode .total-hide-toggle { display: inline-flex; }
.total-hide-toggle:hover { color: var(--text); background: var(--surface-2); }
.total-hide-toggle .icon { width: 15px; height: 15px; }
.total-hide-toggle .icon-eye-off { display: none; }
.total-hide-toggle.active .icon-eye { display: none; }
.total-hide-toggle.active .icon-eye-off { display: block; }

.tick { animation: tick 0.4s ease; }

#stat-total { font-family: var(--font-mono); }

@keyframes tick {
  0% { transform: translateY(0); }
  35% { transform: translateY(-5px); opacity: 0.5; }
  36% { transform: translateY(5px); }
  100% { transform: translateY(0); opacity: 1; }
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-family: var(--font-mono);
}

.dot { position: relative; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.status.online .dot { background: var(--accent); }

.status.online .dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent);
  animation: dot-ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes dot-ping {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.8); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .status.online .dot::after { animation: none; }
}

.presenter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 13px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.presenter-toggle:hover { color: var(--text); border-color: var(--accent-soft); }

.ranking-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-text);
  background: var(--accent-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 13px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  animation: ranking-btn-idle 3s ease-in-out infinite;
}
.ranking-open-btn:hover {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -8px var(--accent-glow);
  animation-play-state: paused;
}
.ranking-open-btn .icon { width: 15px; height: 15px; }

@keyframes ranking-btn-idle {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  50% { box-shadow: 0 0 14px 1px var(--accent-glow); }
}

.donate-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: linear-gradient(180deg, var(--accent-text), var(--accent));
  border: none;
  border-radius: 999px;
  padding: 7px 14px 7px 13px;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 8px 18px -10px var(--accent-glow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.donate-open-btn:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 12px 24px -10px var(--accent-glow); }
.donate-open-btn:active { transform: translateY(0); }
.donate-open-btn .icon { width: 15px; height: 15px; }

.presenter-toggle-wrap { display: inline-flex; align-items: center; gap: 4px; }

.presenter-toggle-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: none; }

.presenter-toggle.active {
  background: var(--accent-bg);
  border-color: rgba(255, 122, 69, 0.5);
  color: var(--accent-text);
}
.presenter-toggle.active .presenter-toggle-dot { display: inline-block; box-shadow: 0 0 0 3px rgba(255, 122, 69, 0.15); }
.presenter-toggle.active:hover {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.presenter-toggle-exit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 11px;
  line-height: 1;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.presenter-toggle-exit:hover {
  color: var(--danger);
  border-color: rgba(239, 68, 112, 0.5);
  background: var(--danger-bg);
}

.presenter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  animation: drop-in 0.2s var(--ease);
}

@keyframes drop-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.presenter-bar[hidden] { display: none; }

.presenter-bar input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 13.5px;
  height: 36px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.presenter-bar input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}
.presenter-bar-link { align-self: center; font-size: 12px; color: var(--muted); white-space: nowrap; }

.presenter-bar-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
}
.presenter-bar-icon-link:hover { background: var(--surface-2); }
.presenter-bar-icon-link .icon { width: 17px; height: 17px; }
.presenter-bar-link:hover { color: var(--accent-text); }

.theme-dots { display: flex; align-items: center; gap: 7px; margin-left: auto; }

/* switch de modalidade (jogos/filmes) direto na barra do apresentador --
   igual um interruptor de tema claro/escuro, pra ser óbvio pra qualquer um */
.mode-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 56px;
  height: 28px;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s ease;
}
.mode-toggle:hover { border-color: var(--accent-soft); }

.mode-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  transition: transform 0.25s var(--ease);
}
.mode-toggle[data-mode="filmes"] .mode-toggle-thumb { transform: translateX(26px); }

.mode-toggle-icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--muted);
  transition: color 0.15s ease;
}
.mode-toggle-icon .icon { width: 13px; height: 13px; }
.mode-toggle[data-mode="jogos"] .mode-toggle-icon-jogos,
.mode-toggle[data-mode="filmes"] .mode-toggle-icon-filmes {
  color: var(--accent-ink);
}

@media (prefers-reduced-motion: reduce) {
  .mode-toggle-thumb { transition: none; }
}

.theme-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.theme-dot:hover { transform: scale(1.15); }
.theme-dot.active { border-color: var(--text); }

.theme-dot-nebulosa { background: linear-gradient(135deg, #14141c 50%, #7089a0 50%); }
.theme-dot-recife { background: linear-gradient(135deg, #101a1a 50%, #e0a955 50%); }
.theme-dot-ametista { background: linear-gradient(135deg, #17131f 50%, #b98cf5 50%); }
.theme-dot-safira { background: linear-gradient(135deg, #0f1420 50%, #4d80f5 50%); }
.theme-dot-grafite { background: linear-gradient(135deg, #16171a 50%, #9fb0c2 50%); }

.pbar-btn {
  height: 38px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.pbar-btn .icon { width: 14px; height: 14px; flex-shrink: 0; }
.pbar-btn:active { transform: translateY(0) !important; }

.pbar-btn-primary {
  background: linear-gradient(180deg, var(--accent-text), var(--accent));
  color: var(--accent-ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 4px 14px -5px var(--accent-glow);
}
.pbar-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 10px 24px -8px var(--accent-glow);
}

.pbar-btn-danger {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--danger);
}
.pbar-btn-danger:hover {
  transform: translateY(-1px);
  border-color: var(--danger);
  background: var(--danger-bg);
  box-shadow: 0 8px 20px -10px rgba(239, 68, 112, 0.45);
}

.pbar-btn-ghost {
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
}
.pbar-btn-ghost:hover { color: var(--accent-text); background: var(--surface-2); }

.webhook-warning {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--danger-bg);
  border: 1px solid rgba(239, 68, 112, 0.4);
  border-radius: var(--radius);
  padding: 11px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}
.webhook-warning[hidden] { display: none; }
.webhook-warning .icon { width: 20px; height: 20px; flex-shrink: 0; color: var(--danger); }
.webhook-warning button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--danger);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.webhook-warning button:hover { color: var(--text); }

/* lembrete de rotina, não um erro ativo -- âmbar em vez do vermelho do aviso de conexão caída */
.pix-warning {
  background: rgba(201, 154, 108, 0.14);
  border-color: rgba(201, 154, 108, 0.4);
}
.pix-warning .icon { color: var(--bronze); }
.pix-warning span { flex: 1; min-width: 0; }
.pix-warning button {
  color: var(--bronze);
  font-size: 15px;
  line-height: 1;
  padding: 2px 4px;
}
.pix-warning button:hover { color: var(--text); }

.field-wrap { position: relative; }
.field-wrap input { width: 100%; }
.presenter-search { flex: 1; min-width: 180px; }

.field-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--muted);
  pointer-events: none;
  transition: color 0.15s ease;
}
.presenter-search input { padding-left: 34px; border-radius: 999px; }
.presenter-search:focus-within .field-icon { color: var(--accent-text); }

.amount-wrap {
  display: flex;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 10px;
  height: 34px;
  width: 108px;
  transition: border-color 0.15s ease;
}

.amount-wrap:focus-within { border-color: var(--accent); }

.amount-prefix {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  flex-shrink: 0;
}

.amount-wrap input {
  border: none;
  background: none;
  padding: 0 0 0 6px;
  height: auto;
  width: 100%;
  min-width: 0;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.amount-wrap input:focus { outline: none; }
.amount-wrap input::placeholder { color: var(--muted); }

.amount-wrap.act-add input,
.amount-wrap.act-add .amount-prefix { color: var(--positive); }
.amount-wrap.act-remove input,
.amount-wrap.act-remove .amount-prefix { color: var(--danger); }
.amount-wrap.act-add { border-color: rgba(70, 177, 127, 0.5); }
.amount-wrap.act-remove { border-color: rgba(239, 68, 112, 0.5); }

.amount-wrap input::-webkit-outer-spin-button,
.amount-wrap input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.amount-wrap input[type="number"] { -moz-appearance: textfield; }

.suggestions[hidden] { display: none; }

.suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.5);
  max-height: 320px;
  overflow-y: auto;
  padding: 5px;
}

.suggestion-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.suggestion-item:hover { background: var(--surface); }

.suggestion-thumb {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--surface);
  flex-shrink: 0;
}

.suggestion-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 12px;
}

.suggestion-name { font-size: 13px; color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggestion-year { font-family: var(--font-mono); font-size: 11px; color: var(--muted); flex-shrink: 0; }

.suggestion-item.manual {
  border-top: 1px dashed var(--border-soft);
  margin-top: 4px;
  padding-top: 10px;
  color: var(--muted);
  font-size: 12.5px;
}

.suggestion-item.manual strong { color: var(--text); }
.suggestion-item.manual .badge-manual {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--accent-text);
}

.suggestion-loading {
  padding: 10px 8px;
  font-size: 12.5px;
  color: var(--muted);
  font-family: var(--font-mono);
}

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 1px 6px;
  border-radius: 3px;
}

.tag-add { background: var(--accent-bg); color: var(--accent-text); }
.tag-remove { background: var(--danger-bg); color: var(--danger); }

.board {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr) 366px;
  background-color: var(--surface);
  background-image: var(--grain);
  background-blend-mode: overlay;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

@keyframes board-tension {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 112, 0); border-color: var(--border); }
  50% { box-shadow: 0 0 28px 1px rgba(239, 68, 112, 0.28); border-color: rgba(239, 68, 112, 0.55); }
}

.board.final-countdown { animation: board-tension 1s ease-in-out infinite; }

.sold-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: rgba(10, 10, 12, 0);
  animation: sold-bg 2.2s ease forwards;
}

.sold-overlay[hidden] { display: none; }

.sold-swirl-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

@keyframes sold-bg {
  0% { background: rgba(10, 10, 12, 0); }
  12% { background: rgba(10, 10, 12, 0.55); }
  75% { background: rgba(10, 10, 12, 0.45); }
  100% { background: rgba(10, 10, 12, 0); }
}

.sold-mark {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: 64px;
  color: var(--text);
  text-shadow:
    -2px -2px 0 rgba(0, 0, 0, 0.85),
    2px -2px 0 rgba(0, 0, 0, 0.85),
    -2px 2px 0 rgba(0, 0, 0, 0.85),
    2px 2px 0 rgba(0, 0, 0, 0.85),
    0 6px 16px rgba(0, 0, 0, 0.9),
    0 0 40px rgba(255, 122, 69, 0.5);
  transform: scale(0.7) rotate(-4deg);
  opacity: 0;
  animation: sold-stamp 2.2s cubic-bezier(0.2, 1.6, 0.4, 1) forwards;
}

@keyframes sold-stamp {
  0% { transform: scale(2.2) rotate(-4deg); opacity: 0; }
  18% { transform: scale(0.94) rotate(-4deg); opacity: 1; }
  26% { transform: scale(1.04) rotate(-4deg); opacity: 1; }
  34% { transform: scale(1) rotate(-4deg); opacity: 1; }
  82% { transform: scale(1) rotate(-4deg); opacity: 1; }
  100% { transform: scale(1) rotate(-4deg); opacity: 0; }
}

.recap-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: blur(4px);
  animation: overlay-in 0.25s ease;
}
.recap-overlay[hidden] { display: none; }

.recap-modal {
  position: relative;
  width: 100%;
  max-width: 680px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px 40px 32px;
  box-shadow: 0 32px 80px -20px rgba(0, 0, 0, 0.8);
  animation: modal-in 0.3s var(--ease);
}

.recap-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  border-radius: var(--radius);
}
.recap-close:hover { color: var(--text); background: var(--surface-2); }

.recap-host-avatar {
  display: block;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  margin: 0 auto 10px;
}
.recap-host-avatar[hidden] { display: none; }

.recap-eyebrow {
  margin: 0 0 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
  text-align: center;
}

.recap-title {
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: 30px;
  color: var(--text);
  text-align: center;
}

.recap-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 30px;
  padding: 18px 8px;
  background: var(--surface-2);
  border-radius: 10px;
}

.recap-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.recap-stat-value {
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 600;
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
}

.recap-stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.recap-share-corner {
  position: absolute;
  top: 16px;
  right: 56px;
  display: flex;
  gap: 8px;
}

.recap-share-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.recap-share-icon-btn:hover { color: var(--text); border-color: var(--accent-soft); transform: translateY(-1px); }
.recap-share-icon-btn svg { width: 14px; height: 14px; }
#recap-share-x:hover { color: #fff; background: #000; border-color: #000; }

.recap-highlight {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 22px;
  padding: 14px 16px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-soft);
  border-radius: 10px;
}
.recap-highlight[hidden] { display: none; }

.recap-highlight-line {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}
.recap-highlight-line:empty { display: none; }
.recap-highlight-line strong { color: var(--accent-text); }

.recap-highlight-icon {
  display: inline-flex;
  vertical-align: -3px;
  width: 15px;
  height: 15px;
  margin-right: 5px;
  color: var(--accent-text);
}
.recap-highlight-icon svg { width: 100%; height: 100%; }
.recap-highlight-icon-bolt { color: var(--bronze); }

.recap-podium-top-donor {
  margin: 2px 0 0;
  font-size: 10.5px;
  color: var(--muted);
}

.recap-section-label {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.recap-podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 30px;
}

.recap-podium-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 10px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: center;
}

.recap-podium-card.rank-1 {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--accent-bg), var(--surface-2) 60%);
  transform: translateY(-8px);
}

.recap-podium-rank { color: var(--muted); }
.recap-podium-rank .medal-icon { width: 27px; height: 27px; }
.recap-podium-card.rank-1 .recap-podium-rank { color: var(--accent-text); }
.recap-podium-card.rank-2 .recap-podium-rank { color: var(--silver); }
.recap-podium-card.rank-3 .recap-podium-rank { color: var(--bronze); }

.recap-podium-card.rank-1 .medal-icon { transform: rotate(-5deg); }
.recap-podium-card.rank-2 .medal-icon { transform: rotate(4deg); }
.recap-podium-card.rank-3 .medal-icon { transform: rotate(-3deg); }

.recap-podium-thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface);
  margin-top: 4px;
}

.recap-podium-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 24px;
}

.recap-podium-name {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.recap-podium-total {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
}

.recap-podium-donors {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}


.ranking-modal {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  background-color: var(--surface);
  background-image: var(--grain);
  background-blend-mode: overlay;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 30px 70px -28px rgba(0, 0, 0, 0.75);
  animation: modal-in 0.2s var(--ease);
  overflow: hidden;
}

.ranking-modal-head {
  flex-shrink: 0;
  padding: 26px 56px 16px 26px;
  border-bottom: 1px solid var(--border-soft);
}

.ranking-modal-hint { margin: 8px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }

.ranking-modal-body { overflow-y: auto; padding: 22px 26px 26px; }

.recap-extra { margin-bottom: 22px; }
.recap-extra-list { display: flex; flex-direction: column; gap: 6px; }

.recap-extra-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  background: var(--surface-2);
  border-radius: 8px;
}

.recap-extra-rank {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  width: 20px;
  flex-shrink: 0;
  text-align: center;
}

.recap-extra-thumb {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--surface);
  flex-shrink: 0;
}
.recap-extra-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--muted);
}

.recap-extra-name {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recap-extra-total {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-text);
  flex-shrink: 0;
}

.ranking-list { display: flex; flex-direction: column; gap: 6px; }

.ranking-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 4px;
  border-top: 1px solid var(--border-soft);
}
.ranking-list .ranking-row:first-child { border-top: none; }

.ranking-row-rank {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  width: 20px;
  flex-shrink: 0;
  text-align: center;
}

.ranking-row-host {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-row-total {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .ranking-modal { max-width: none; max-height: none; height: 100%; border-radius: 0; }
}

.recap-donor-list { display: flex; flex-direction: column; gap: 2px; }

.recap-donor-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: var(--radius);
}
.recap-donor-row:hover { background: var(--surface-2); }

.recap-donor-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  flex-shrink: 0;
  color: var(--muted);
}
.recap-donor-rank .medal-icon { width: 15px; height: 15px; }
.recap-donor-row.rank-1 .recap-donor-rank { color: var(--accent-text); }
.recap-donor-row.rank-2 .recap-donor-rank { color: var(--silver); }
.recap-donor-row.rank-3 .recap-donor-rank { color: var(--bronze); }

.recap-donor-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
  flex-shrink: 0;
}
.recap-donor-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

.recap-donor-name {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recap-donor-total {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
  .recap-modal { padding: 28px 20px 24px; }
  .recap-title { font-size: 24px; }
  .recap-stats { grid-template-columns: repeat(2, 1fr); }
  .recap-podium { grid-template-columns: 1fr; }
  .recap-podium-card.rank-1 { transform: none; }
}

.history-overlay {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: blur(4px);
  animation: overlay-in 0.2s ease;
}
.history-overlay[hidden] { display: none; }

.history-modal {
  position: relative;
  width: 100%;
  max-width: 760px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 36px;
  box-shadow: 0 32px 80px -20px rgba(0, 0, 0, 0.8);
  animation: modal-in 0.25s var(--ease);
}

.history-modal-title {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: 24px;
  color: var(--text);
}

.history-modal-empty {
  color: var(--muted);
  font-size: 13.5px;
  padding: 20px 0;
  text-align: center;
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.history-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.history-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.history-card-when {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.history-card-inprogress {
  background: var(--accent-bg);
  color: var(--accent-text);
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 600;
}

.history-card-total {
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 600;
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
}

.history-card-champion { display: flex; align-items: center; gap: 8px; }

.history-card-thumb {
  width: 32px;
  height: 32px;
  border-radius: 5px;
  object-fit: cover;
  background: var(--surface);
  flex-shrink: 0;
}

.history-card-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
}

.history-card-champion-name {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-card-meta {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px dashed var(--border);
  padding-top: 8px;
}

.col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--border-soft);
}

.col:last-child { border-right: none; }

.panel {
  padding: 20px 22px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.col > .panel:last-child { border-bottom: none; }

.panel-label {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.panel-count {
  margin-left: auto;
  color: var(--muted);
  font-weight: 400;
  font-size: 10.5px;
}

.history-sort-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 2px 4px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
}
.history-sort-btn:hover { color: var(--text); background: var(--surface-2); }
.history-sort-btn .icon { width: 13px; height: 13px; }
.history-sort-btn.active { color: var(--accent-text); }

.panel-hint {
  margin: -6px 0 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
  flex-shrink: 0;
}

.panel-hint strong { color: var(--text); }

/* z-index 0, não -1: negativo já causou bug de empilhamento aqui. */
.host-panel, .timer-panel { position: relative; }
.host-panel::before, .timer-panel::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 260px;
  height: 260px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  filter: blur(26px);
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
}

.host-panel { flex-shrink: 0; padding: 20px 10px; }

.host-card {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 10px;
}

.host-row { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }

.host-name {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: 34px;
  line-height: 1.15;
  margin: 0;
  color: var(--text);
  width: 100%;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: break-word;
  hyphens: auto;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.host-avatar-wrap { position: relative; flex-shrink: 0; }

.host-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  flex-shrink: 0;
}

.host-avatar[hidden] { display: none; }

.host-twitch-link {
  display: block;
  text-align: center;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.host-twitch-link:hover { color: var(--accent); text-decoration: underline; }
.host-twitch-link[hidden] { display: none; }

.host-twitch-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #9146ff;
  border: 2px solid var(--surface-2);
  border-radius: 50%;
  color: #fff;
  transition: transform 0.15s ease;
}
.host-twitch-badge .icon { width: 12px; height: 12px; }
.host-twitch-badge:hover { transform: scale(1.1); }
.host-twitch-badge[hidden] { display: none; }

.donors-panel { flex: 1; min-height: 160px; }

.donor-list {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  margin: 0 -4px;
  padding: 0 4px;
}

.empty-state {
  color: var(--muted);
  font-size: 13px;
  padding: 10px 0;
}

.donor-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px;
  margin: 0 -8px;
  border-radius: var(--radius);
  overflow: hidden;
  transition: background 0.15s ease;
}

.donor-row:hover { background: var(--surface-2); }

.donor-row-fill {
  position: absolute;
  inset: 0;
  width: var(--pct, 0%);
  background: var(--accent-bg);
  z-index: 0;
  transition: width 0.5s var(--ease);
}
/* Tem que ser ~ (sibling), não ">*": ">*" empata em especificidade e quebra o position:absolute da barra. */
.donor-row-fill ~ * { position: relative; z-index: 1; }


.donor-rank {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  width: 24px;
  flex-shrink: 0;
}
.donor-rank .medal-icon { width: 20px; height: 20px; }

.donor-row.rank-1 .donor-rank { color: var(--accent-text); }
.donor-row.rank-2 .donor-rank { color: var(--silver); }
.donor-row.rank-3 .donor-rank { color: var(--bronze); }

.donor-row.rank-1 .medal-icon { transform: rotate(-5deg); }
.donor-row.rank-2 .medal-icon { transform: rotate(4deg); }
.donor-row.rank-3 .medal-icon { transform: rotate(-3deg); }

.donor-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface);
  flex-shrink: 0;
}

.donor-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 11px;
  color: var(--muted);
}

.donor-name {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.donor-row.rank-1 .donor-name { font-weight: 600; }

.donor-total {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.donor-row.rank-1 .donor-total { color: var(--accent-text); font-weight: 600; }

.arena-panel { flex: 1; min-height: 0; }

.arena-grid {
  overflow-y: auto;
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(430px, 1fr));
  align-content: start;
  gap: 10px;
  margin: 0 -4px;
  padding: 2px 4px 4px;
}

.arena-grid > .lot-card:first-child {
  grid-column: 1 / -1;
}

.arena-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  padding: 60px 20px;
}

.arena-empty-title { font-family: var(--font-display); font-style: italic; font-size: 19px; color: var(--text); }

.qualify-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 1px 2px;
  flex-shrink: 0;
  grid-column: 1 / -1;
}

.qualify-divider::before,
.qualify-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--accent-soft) 0 6px, transparent 6px 11px);
}

.qualify-divider span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
  white-space: nowrap;
  padding: 4px 11px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-glow);
  border-radius: 999px;
}

.lot-card {
  position: relative;
  width: 100%;
  flex-shrink: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  /* overflow != visible zera a altura mínima automática do item no Grid; sem isso o conteúdo cortava. */
  min-height: 122px;
  transition: border-color 0.2s ease, box-shadow 0.3s ease;
  animation: card-in 0.25s var(--ease);
}
.arena-grid .lot-card:nth-of-type(3n+1) { border-radius: 8px 5px 8px 6px; }
.arena-grid .lot-card:nth-of-type(3n+2) { border-radius: 5px 7px 5px 8px; }
.arena-grid .lot-card:nth-of-type(3n+3) { border-radius: 7px 6px 9px 5px; }

@keyframes card-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.lot-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft), 0 0 26px 4px var(--accent-glow), 0 0 48px 12px var(--accent-glow);
}

.lot-card-bg {
  position: absolute;
  inset: -14px;
  background-size: cover;
  background-position: center 30%;
  filter: blur(9px) saturate(1.15) brightness(0.65);
  transform: scale(1.06);
}

.lot-card-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(16, 16, 18, 0.86), rgba(16, 16, 18, 0.68) 55%, rgba(16, 16, 18, 0.88));
}

.lot-card-fill {
  position: absolute;
  inset: 0;
  width: var(--pct, 0%);
  background: rgba(255, 255, 255, 0.045);
  transition: width 0.7s var(--ease);
}

.lot-card.rank-1 .lot-card-fill,
.lot-card.rank-2 .lot-card-fill,
.lot-card.rank-3 .lot-card-fill { background: var(--accent-bg); }

.lot-card.rank-1 { border-color: var(--accent); }

.lot-card.rank-1::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  border-style: solid;
  border-width: 0 16px 16px 0;
  border-color: transparent var(--accent) transparent transparent;
  z-index: 2;
}

.lot-card.lead-shift .lot-card-fill {
  background-image: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.22) 48%, transparent 66%);
  background-size: 250% 100%;
  animation: sweep 0.7s ease;
}

@keyframes sweep {
  from { background-position: -60% 0; }
  to { background-position: 160% 0; }
}

@keyframes fill-pulse-add {
  0% { box-shadow: inset 0 0 0 0 rgba(70, 177, 127, 0.55); }
  45% { box-shadow: inset 0 0 32px 6px rgba(70, 177, 127, 0.4); }
  100% { box-shadow: inset 0 0 0 0 rgba(70, 177, 127, 0); }
}

.confetti-burst { position: fixed; pointer-events: none; z-index: 80; overflow: visible; }

.confetti-piece {
  position: absolute;
  width: 7px;
  height: 11px;
  border-radius: 1px;
  opacity: 0;
  animation-name: confetti-fly;
  animation-timing-function: cubic-bezier(0.15, 0.7, 0.3, 1);
  animation-fill-mode: forwards;
}

.confetti-piece-spark { width: 5px; height: 5px; border-radius: 50%; }

@keyframes confetti-fly {
  0% { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(1); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + 90px)) rotate(var(--rot)) scale(0.5); }
}

.lot-card.flash-add { animation: fill-pulse-add 0.9s ease; }

@keyframes fill-pulse-remove {
  0% { box-shadow: inset 0 0 0 0 rgba(239, 68, 112, 0.6); }
  45% { box-shadow: inset 0 0 32px 6px rgba(239, 68, 112, 0.45); }
  100% { box-shadow: inset 0 0 0 0 rgba(239, 68, 112, 0); }
}

.lot-card.flash-remove { animation: fill-pulse-remove 0.9s ease; border-color: rgba(239, 68, 112, 0.5); }

.confetti-piece-ember {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  animation-name: ember-fly;
  box-shadow: 0 0 6px 1px currentColor;
}
@keyframes ember-fly {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.3); }
}

/* flash de "ignição" quando um jogo sobe de nível de streak -- elemento
   próprio (não usa a propriedade animation do .lot-card) pra nunca brigar
   com o flash de doação (.flash-add/.flash-remove) que roda ao mesmo tempo */
.streak-ignite-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(circle at 85% 50%, var(--accent-glow), transparent 70%);
  opacity: 0;
  animation: streak-ignite-flash-anim 0.65s ease-out forwards;
}
.streak-ignite-flash-strong {
  background: radial-gradient(circle at 85% 50%, var(--danger), transparent 70%);
}
@keyframes streak-ignite-flash-anim {
  0% { opacity: 0; }
  30% { opacity: 0.9; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .streak-ignite-flash { display: none; }
}

@keyframes content-shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

.lot-card.flash-remove .lot-card-content { animation: content-shake 0.45s ease; }

.lot-card-content {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
}

.lot-rank {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  width: 38px;
  flex-shrink: 0;
}

.lot-rank .medal-icon { width: 34px; height: 34px; }

.lot-card.rank-1 .lot-rank { color: var(--accent-text); }
.lot-card.rank-2 .lot-rank { color: var(--silver); }
.lot-card.rank-3 .lot-rank { color: var(--bronze); }

.lot-card.rank-1 .lot-rank .medal-icon { transform: rotate(-5deg); }
.lot-card.rank-2 .lot-rank .medal-icon { transform: rotate(4deg); }
.lot-card.rank-3 .lot-rank .medal-icon { transform: rotate(-3deg); }

.lot-thumb {
  width: 92px;
  height: 92px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface);
  flex-shrink: 0;
}

.lot-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 28px;
}

.lot-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 90px;
  flex: 1;
}

.lot-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  margin: 0;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lot-card.rank-1 .lot-name { color: var(--text); font-weight: 600; }

.lot-funding {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 1px;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  min-width: 0;
}

.lot-funding-add,
.lot-funding-remove {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.lot-funding-add { color: var(--positive); }
.lot-funding-remove { color: var(--danger); }

.lot-top-donor {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  min-width: 0;
}

.lot-top-donor-avatar {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface);
  flex-shrink: 0;
}

.lot-top-donor-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 600;
  color: var(--muted);
}

.lot-top-donor-name {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lot-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  row-gap: 4px;
  gap: 10px;
  flex-shrink: 0;
  max-width: 150px;
}

.lot-total {
  font-family: var(--font-mono);
  font-size: 14.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.lot-total.tick { animation: tick 0.4s ease; }

.lot-card.rank-1 .lot-total,
.lot-card.rank-2 .lot-total,
.lot-card.rank-3 .lot-total { color: var(--accent-text); font-weight: 600; }

.badge-hit { font-size: 10.5px; padding: 2px 6px; border-radius: 3px; background: var(--danger-bg); color: var(--danger); }
.arena-grid .lot-card:nth-of-type(3n+1) .badge-hit { border-radius: 4px 2px 4px 3px; }
.arena-grid .lot-card:nth-of-type(3n+2) .badge-hit { border-radius: 2px 3px 2px 4px; }
.arena-grid .lot-card:nth-of-type(3n+3) .badge-hit { border-radius: 3px 4px 2px 3px; }

.badge-hit-last {
  background: transparent;
  border: 1px solid rgba(239, 68, 112, 0.4);
  opacity: 0.85;
}

/* jogo recebendo doações em sequência rápida (ver COMBO_WINDOW_MS no server) */
.badge-streak {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--accent-bg);
  color: var(--accent-text);
  opacity: 0;
  transform: scale(0.85);
  animation: badge-streak-in 200ms ease-out forwards;
}
@keyframes badge-streak-in {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

.badge-streak[data-tier="2"] {
  background: var(--accent);
  color: var(--accent-ink);
  animation: badge-streak-in 200ms ease-out forwards, badge-streak-pulse 1.1s ease-in-out 200ms infinite;
}
.badge-streak[data-tier="3"] {
  background: linear-gradient(135deg, var(--accent), var(--danger));
  color: var(--accent-ink);
  animation: badge-streak-in 200ms ease-out forwards, badge-streak-pulse 0.75s ease-in-out 200ms infinite;
}
@keyframes badge-streak-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.lot-card.is-streaking { border-color: var(--accent-glow); }
.lot-card.is-streaking[data-streak-tier="3"] { border-color: var(--danger); }

@media (prefers-reduced-motion: reduce) {
  .badge-streak,
  .badge-streak[data-tier="2"],
  .badge-streak[data-tier="3"] {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* disputa pela última vaga classificada: o último classificado ("defensor")
   contra o primeiro de fora ("desafiante"), quando o placar tá próximo --
   incentiva o público a tentar virar o jogo. Usa um elemento FILHO (não a
   propriedade animation do .lot-card) pra nunca brigar com flash-add/
   flash-remove nem com o reposicionamento FLIP quando o rank vira. */
.duel-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  /* sem z-index de propósito: fica atrás de .lot-card-content na ordem
     natural do DOM (ele vem depois), senão o brilho cobre o texto do card */
}
.duel-glow[data-role="defender"] {
  animation: duel-glow-defender 1.1s ease-in-out infinite;
}
.duel-glow[data-role="challenger"] {
  animation: duel-glow-challenger 1.1s ease-in-out infinite;
}
@keyframes duel-glow-defender {
  0%, 100% { box-shadow: inset 0 0 0 1px var(--accent), inset 0 0 16px -2px var(--accent-glow); opacity: 0.65; }
  50% { box-shadow: inset 0 0 0 2px var(--accent), inset 0 0 38px 2px var(--accent-glow); opacity: 1; }
}
@keyframes duel-glow-challenger {
  0%, 100% { box-shadow: inset 0 0 0 1px var(--danger), inset 0 0 16px -2px rgba(239, 68, 112, 0.55); opacity: 0.65; }
  50% { box-shadow: inset 0 0 0 2px var(--danger), inset 0 0 38px 2px rgba(239, 68, 112, 0.55); opacity: 1; }
}

.badge-duel {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 3px;
}
.badge-duel[data-role="defender"] { background: var(--accent-bg); color: var(--accent-text); }
.badge-duel[data-role="challenger"] { background: var(--danger-bg); color: var(--danger); }

.qualify-divider.is-duel span {
  color: var(--accent-text);
  font-weight: 700;
  animation: duel-label-pulse 1.1s ease-in-out infinite;
}
.qualify-divider.is-duel::before,
.qualify-divider.is-duel::after {
  background: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 11px);
}
@keyframes duel-label-pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* rajada "de impacto" quando o desafiante ultrapassa o defensor de verdade
   -- bem mais intensa que o ignite do streak, é o clímax da disputa */
.duel-overtake-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  z-index: 2;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.55), var(--accent-glow) 40%, transparent 75%);
  opacity: 0;
  animation: duel-overtake-flash-anim 0.9s ease-out forwards;
}
@keyframes duel-overtake-flash-anim {
  0% { opacity: 0; }
  15% { opacity: 1; }
  100% { opacity: 0; }
}

.duel-overtake-punch {
  position: absolute;
  inset: -6px;
  pointer-events: none;
  border-radius: inherit;
  border: 3px solid var(--accent);
  opacity: 0;
  animation: duel-punch-ring 0.55s ease-out forwards;
}
@keyframes duel-punch-ring {
  0% { opacity: 1; transform: scale(0.85); }
  100% { opacity: 0; transform: scale(1.3); }
}

@media (prefers-reduced-motion: reduce) {
  .duel-glow[data-role="defender"],
  .duel-glow[data-role="challenger"] {
    animation: none;
    opacity: 0.9;
  }
  .qualify-divider.is-duel span { animation: none; opacity: 1; }
  .duel-overtake-flash,
  .duel-overtake-punch {
    display: none;
  }
}

.lot-card.flash-add .lot-card-fill { background-color: var(--accent-bg); }
.lot-card.flash-remove .lot-card-fill { background-color: var(--danger-bg); }

.lot-edit { display: none; gap: 4px; }
.presenter-mode .lot-edit { display: flex; }

.lot-edit button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 50%;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.lot-edit button .icon { width: 12px; height: 12px; }
.lot-edit button:hover { border-color: var(--accent); color: var(--accent-text); }

.timer-panel { flex-shrink: 0; }

.timer { display: flex; align-items: center; gap: 12px; }

.timer-ring { flex-shrink: 0; transform: rotate(-90deg); }
.timer-ring-track { fill: none; stroke: var(--border); stroke-width: 4; }
.timer-ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: butt;
  stroke-dasharray: 175.9;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke 0.3s ease;
}

.timer.urgent .timer-ring-fill { stroke: var(--danger); }
.timer.closed .timer-ring-fill { stroke: var(--muted); }

.timer-text { display: flex; flex-direction: column; gap: 2px; }

.timer-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.timer-clock {
  font-family: var(--font-mono);
  font-size: 23px;
  font-weight: 600;
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
}

.timer.urgent .timer-clock { color: var(--danger); }
.timer.closed .timer-clock { color: var(--muted); font-size: 15px; }
.timer.paused .timer-clock { color: var(--muted); }
.timer.paused .timer-ring-fill { stroke: var(--muted); }

.timer-toolbar {
  display: none;
  align-items: stretch;
  gap: 2px;
  margin-top: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  height: 40px;
}
.presenter-mode .timer-toolbar { display: flex; }
.timer-toolbar-duration { margin-top: 8px; }
.timer-toolbar-lock { margin-top: 8px; }

.tbar-divider { width: 1px; background: var(--border); margin: 6px 0; flex-shrink: 0; }

.timer-toolbar-state .tbar-btn,
.timer-toolbar-lock .tbar-btn { flex: 1; }

.tbar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  color: var(--muted);
  border-radius: 999px;
  padding: 0 11px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  transition: color 0.15s ease, background 0.15s ease;
}

.tbar-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.tbar-btn .icon { width: 16px; height: 16px; flex-shrink: 0; }
.tbar-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.tbar-btn:disabled:hover { color: var(--muted); background: none; }

.tbar-btn .icon-play { display: none; }
.tbar-btn.is-paused .icon-pause { display: none; }
.tbar-btn.is-paused .icon-play { display: block; }
.tbar-btn.is-paused { color: var(--accent-text); }

.tbar-btn-danger:hover { color: var(--danger); background: var(--danger-bg); }
.tbar-btn-danger .icon-reopen { display: none; }
.tbar-btn-danger.is-closed .icon-stop { display: none; }
.tbar-btn-danger.is-closed .icon-reopen { display: block; }
.tbar-btn-danger.is-closed { color: var(--accent-text); }
.tbar-btn-danger.is-closed:hover { color: var(--accent); background: var(--accent-bg); }

.tbar-btn .icon-lock-closed { display: none; }
.tbar-btn.is-locked .icon-lock-open { display: none; }
.tbar-btn.is-locked .icon-lock-closed { display: block; }
.tbar-btn.is-locked { color: var(--danger); background: var(--danger-bg); }
.tbar-btn.is-locked:hover { color: var(--danger); background: var(--danger-bg); }

.tbar-btn-wide { padding: 0 12px 0 10px; }

.tbar-custom {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 2px;
  padding-left: 10px;
}

.tbar-input {
  width: 100%;
  min-width: 0;
  background: none;
  border: none;
  color: var(--text);
  padding: 0;
  font-family: var(--font-mono);
  font-size: 13px;
}

.tbar-input:focus { outline: none; }
.tbar-input::placeholder { color: var(--muted); }

.tbar-input::-webkit-outer-spin-button,
.tbar-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tbar-input { -moz-appearance: textfield; }

.tbar-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s ease;
}

.tbar-icon-btn:hover { background: var(--accent-text); }
.tbar-icon-btn .icon { width: 13px; height: 13px; }

.btn-mini {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 13px;
  border-radius: var(--radius);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.btn-mini:hover { border-color: var(--accent); }
.btn-mini.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn-mini.danger { color: var(--danger); }
.btn-mini.danger:hover { border-color: var(--danger); background: var(--danger-bg); }

.copy-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  padding: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.copy-btn:hover { border-color: var(--accent); }
.copy-btn:disabled { cursor: default; }
.copy-btn .icon { width: 16px; height: 16px; }
.copy-btn-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.copy-btn-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(1);
  opacity: 1;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.copy-btn-icon-check {
  transform: scale(0);
  opacity: 0;
  color: var(--positive);
}
.copy-btn.is-copied .copy-btn-icon-copy { transform: scale(0); opacity: 0; }
.copy-btn.is-copied .copy-btn-icon-check { transform: scale(1); opacity: 1; }

.copy-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(2px);
  background: var(--surface);
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 5;
}
.copy-btn[data-tooltip]:hover::after,
.copy-btn[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.copy-btn.is-copied[data-tooltip]::after { content: "Copiado!"; }

@media (prefers-reduced-motion: reduce) {
  .copy-btn-icon,
  .copy-btn[data-tooltip]::after { transition: none; }
}

.history-panel { flex: 1; min-height: 160px; }

.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.history-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
  padding: 7px 6px;
  margin-bottom: 3px;
  border-radius: var(--radius);
  transition: background 0.15s ease;
}

.history-list li:nth-child(even) { background: rgba(255, 255, 255, 0.025); }

.history-list li:hover { background: var(--surface-2); }

.history-list li:first-child { animation: history-in 0.35s var(--ease); }

@keyframes history-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.history-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--surface-2);
  color: var(--muted);
}
.history-icon svg { width: 10px; height: 10px; }
.history-icon.icon-add { background: var(--accent-bg); color: var(--accent-text); }
.history-icon.icon-remove { background: var(--danger-bg); color: var(--danger); }

.history-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.history-text {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.history-text .who { color: var(--text); font-weight: 500; }

.history-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.history-time { font-family: var(--font-mono); font-size: 10px; color: var(--muted); flex-shrink: 0; }

.history-amt {
  font-family: var(--font-mono);
  font-size: 11.5px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
}
.history-amt.amt-add { color: var(--accent-text); background: var(--accent-bg); }
.history-amt.amt-remove { color: var(--danger); background: var(--danger-bg); }

.footer {
  margin-top: 12px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
}

.footer a { color: var(--muted); }

@media (max-width: 1100px) {
  .board { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto; }
  .col-left { grid-column: 1; grid-row: 1; }
  .col-right { grid-column: 2; grid-row: 1; }
  .col-center { grid-column: 1 / -1; grid-row: 2; }
  .arena-panel { min-height: 420px; }
}

@media (max-width: 720px) {
  .page { padding: 14px 16px 10px; height: auto; }
  .board { display: flex; flex-direction: column; height: auto; }
  .col { display: contents; }
  .panel { min-height: 0; border-right: none; }
  .donors-panel, .history-panel { max-height: 260px; }
  .arena-panel { min-height: 0; }
  .arena-grid { max-height: none; overflow: visible; grid-template-columns: 1fr; }
  .presenter-toggle span { display: inline; }

  .lot-card-content { gap: 10px; padding: 12px 14px; }
  .lot-card { min-height: 90px; }
  .lot-thumb, .lot-thumb-placeholder { width: 46px; height: 46px; }
  .lot-rank { width: 32px; }
  .lot-rank .medal-icon { width: 27px; height: 27px; }
  .lot-meta { gap: 6px; max-width: 112px; }
  .lot-info { min-width: 64px; }
  .lot-edit button { width: 22px; height: 22px; }
  .lot-edit button .icon { width: 11px; height: 11px; }
}


.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 10, 12, 0.66);
  backdrop-filter: blur(3px);
  animation: overlay-in 0.15s ease;
}

.modal-overlay[hidden] { display: none; }

@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }

.modal {
  position: relative;
  width: 100%;
  max-width: 380px;
  background-color: var(--surface);
  background-image: var(--grain);
  background-blend-mode: overlay;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.75);
  animation: modal-in 0.2s var(--ease);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
  border-radius: var(--radius);
}

.modal-close:hover { color: var(--text); background: var(--surface-2); }

.modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding-right: 22px; }

.modal-thumb {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--surface-2);
  flex-shrink: 0;
}

.modal-thumb[hidden] { display: none; }
.modal-head-text { min-width: 0; }

.modal-eyebrow {
  margin: 0 0 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.modal-title {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 22px;
  line-height: 1.15;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-current { margin: 3px 0 0; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.modal-current[hidden] { display: none; }

.modal-error {
  margin: -4px 0 14px;
  font-size: 12.5px;
  color: var(--danger);
  background: var(--danger-bg);
  border-radius: var(--radius);
  padding: 8px 12px;
}
.modal-error[hidden] { display: none; }

.modal-field { margin-bottom: 14px; }
.modal-label { display: block; margin-bottom: 6px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.modal-opt { text-transform: none; letter-spacing: 0; }

.seg {
  display: flex;
  gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px;
}

.seg button {
  flex: 1;
  padding: 7px 8px;
  background: none;
  border: none;
  border-radius: 4px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.seg button:hover { color: var(--text); }
.seg button.active { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.seg button.active[data-action="remove"] { background: var(--danger); color: #fff; }

.voice-picker-row { display: flex; align-items: center; gap: 8px; }
.voice-picker-row .seg { flex: 1; }
.voice-preview-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  height: 34px;
  padding: 0 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.voice-preview-btn .icon { width: 14px; height: 14px; }
.voice-preview-btn:hover { border-color: var(--accent); color: var(--accent-text); }
.voice-preview-btn:disabled { opacity: 0.6; cursor: default; }

.modal-amount { width: 100%; height: 38px; }
.modal-input {
  width: 100%;
  height: 38px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 13.5px;
}
.modal-input:focus { outline: none; border-color: var(--accent); }

.mod-code-row { display: flex; gap: 8px; }
.mod-code-row .modal-input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--accent-text);
  text-align: center;
}
.mod-code-row .btn-mini { flex-shrink: 0; }

#mod-code-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  padding: 0;
}
#mod-code-toggle .icon { width: 16px; height: 16px; }
#mod-code-toggle .icon-eye-off { display: none; }
#mod-code-toggle.active .icon-eye { display: none; }
#mod-code-toggle.active .icon-eye-off { display: block; }

.modal-textarea { height: auto; padding: 8px 12px; resize: none; font-family: var(--font-body); line-height: 1.4; }

.game-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: var(--surface-2);
  background-image: var(--grain);
  background-blend-mode: overlay;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  height: 38px;
  padding: 0 5px 0 0;
  transition: border-color 0.15s ease;
}
.game-input-wrap:focus-within { border-color: var(--accent); }

.game-input-wrap .modal-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  background: none;
  padding-left: 12px;
}
.game-input-wrap .modal-input:focus { outline: none; border: none; }

.game-input-icon { flex-shrink: 0; margin-left: 6px; line-height: 0; }
.game-input-icon[hidden] { display: none; }
.game-input-icon img,
.game-input-icon .game-input-icon-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--surface);
  color: var(--accent-text);
  font-family: var(--font-title);
  font-size: 13px;
}

.game-add-btn {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.game-add-btn:hover { color: var(--accent-text); border-color: var(--accent-soft); }
.game-add-btn.confirmed { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

.game-confirm-hint {
  margin: 6px 2px 0;
  font-size: 11.5px;
  color: var(--muted);
}
.game-confirm-hint[hidden] { display: none; }

.doar-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 9px 14px;
  background-color: var(--surface-2);
  background-image: var(--grain);
  background-blend-mode: overlay;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.doar-timer[hidden] { display: none; }

.doar-timer-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.doar-timer-clock {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.doar-timer.urgent .doar-timer-clock { color: var(--danger); }
.doar-timer.closed .doar-timer-clock { color: var(--muted); }

.modal-actions { display: flex; gap: 8px; margin-top: 20px; }
.modal-actions .btn-mini { flex: 1; height: 38px; }

.game-shelf {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  margin-top: 8px;
  padding: 2px 2px 6px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 16px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 16px), transparent);
}
.game-shelf[hidden] { display: none; }
.game-shelf::-webkit-scrollbar { display: none; }

.game-shelf-empty {
  padding: 8px 2px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
}

.game-shelf-card {
  position: relative;
  flex: 0 0 auto;
  width: 64px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 5px;
  background-color: var(--surface-2);
  background-image: var(--grain);
  background-blend-mode: overlay;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}
.game-shelf-card:nth-of-type(3n+1) { border-radius: 8px 5px 8px 6px; }
.game-shelf-card:nth-of-type(3n+2) { border-radius: 5px 7px 5px 8px; }
.game-shelf-card:nth-of-type(3n+3) { border-radius: 7px 6px 9px 5px; }

.game-shelf-card:hover { border-color: var(--accent-soft); }
.game-shelf-card:active { transform: scale(0.94); }

.game-shelf-card.selected {
  border-color: var(--accent);
  background-color: var(--accent-bg);
  box-shadow: 0 0 0 3px var(--accent-bg);
}

.game-shelf-cover {
  width: 52px;
  height: 52px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--surface);
  display: block;
}
.game-shelf-cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-size: 18px;
  color: var(--accent-text);
}

.game-shelf-name {
  max-width: 60px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.25;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.game-shelf-card:hover .game-shelf-name,
.game-shelf-card.selected .game-shelf-name { color: var(--text); }

.game-shelf-new-tag {
  position: absolute;
  top: 2px;
  right: 2px;
  padding: 1px 4px;
  background: var(--accent-bg);
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 3px;
}

.donate-modal { max-width: 400px; }

.donate-step-success { text-align: center; padding: 12px 0 4px; }

.donate-qr-wrap {
  display: flex;
  justify-content: center;
  padding: 14px;
  background: #fff;
  border-radius: var(--radius);
  margin-bottom: 14px;
}
.donate-qr { width: 190px; height: 190px; display: block; }

.donate-copy-wrap { display: flex; gap: 8px; margin-bottom: 14px; }
.donate-copy-wrap .modal-input { font-family: var(--font-mono); font-size: 11.5px; }
.donate-copy-wrap .btn-mini { flex-shrink: 0; }

.donate-waiting {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}
.donate-waiting-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: donate-waiting-pulse 1.4s ease-in-out infinite;
}
@keyframes donate-waiting-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.1); }
}

.donate-success-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-bg);
  color: var(--positive);
  font-size: 26px;
  font-weight: 700;
  animation: donate-success-pop 0.4s var(--ease);
}
@keyframes donate-success-pop {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: scale(1); }
}
.donate-success-text { margin: 0; font-size: 14px; color: var(--text); font-weight: 600; }
