/* Noite em Vegas — identidade Acreditar FIDC (Brandbook 2026) */
:root {
  --navy-950: #0b172c;
  --navy-900: #19264c;
  --navy-700: #3c5282;
  --blue-300: #86a4db;
  --slate-700: #3f495b;
  --slate-500: #737a86;
  --slate-400: #8997b1;
  --mist: #d6d5df;
  --green: #5bbc79;
  --danger: #e07a7a;

  --bg: var(--navy-950);
  --surface: rgba(25, 38, 76, .55);
  --surface-solid: #142041;
  --surface-2: rgba(60, 82, 130, .28);
  --border: rgba(134, 164, 219, .18);
  --border-strong: rgba(134, 164, 219, .42);
  --text: #f3f4f8;
  --muted: var(--slate-400);
  --accent: var(--blue-300);

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, .65);
  --glow: 0 0 0 1px rgba(134, 164, 219, .35), 0 10px 40px -10px rgba(134, 164, 219, .45);
  --font: 'Jost', 'Neology', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(1100px 600px at 85% -10%, rgba(60, 82, 130, .55), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(25, 38, 76, .9), transparent 60%),
    linear-gradient(180deg, var(--navy-950), #0d1b36);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: #fff; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-weight: 500; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); }
h3 { font-size: 1.1rem; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.eyebrow { color: var(--accent); font-size: .95rem; letter-spacing: .02em; margin-bottom: .4rem; display: block; }
.suits { letter-spacing: .5em; color: var(--accent); opacity: .55; font-size: .85rem; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.page { padding: 32px 0 120px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.page-head p { margin-top: 8px; max-width: 640px; }
.stack > * + * { margin-top: 20px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spread { justify-content: space-between; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(11, 23, 44, .78);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar .container { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 14px; color: #fff; }
.brand img { height: 34px; width: auto; }
.brand .event { padding-left: 14px; border-left: 1px solid var(--border-strong); font-size: .95rem; line-height: 1.1; color: var(--mist); }
.brand .event b { display: block; font-weight: 500; color: #fff; font-size: 1.05rem; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  color: var(--mist); padding: 8px 14px; border-radius: 999px; font-size: .95rem; transition: .2s;
}
.nav a:hover { background: var(--surface-2); color: #fff; }
.nav a.active { background: rgba(134, 164, 219, .16); color: #fff; box-shadow: inset 0 0 0 1px var(--border-strong); }
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-chip .who { text-align: right; line-height: 1.15; font-size: .9rem; }
.user-chip .who small { color: var(--muted); display: block; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border); background: transparent; color: var(--mist); cursor: pointer; transition: .2s;
}
.icon-btn:hover { border-color: var(--border-strong); color: #fff; background: var(--surface-2); }

/* Barra inferior (celular) */
.tabbar { display: none; }
@media (max-width: 860px) {
  .nav, .user-chip .who { display: none; }
  .topbar .container { height: 60px; gap: 12px; }
  .brand img { height: 28px; }
  .user-chip { margin-left: auto; }
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40;
    background: rgba(20, 32, 65, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-strong); border-radius: 22px; padding: 6px; box-shadow: var(--shadow);
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 16px;
    color: var(--muted); font-size: .72rem;
  }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.active { color: #fff; background: rgba(134, 164, 219, .18); }
  .page { padding-top: 22px; }
}
@media (max-width: 420px) {
  .brand .event { display: none; }
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}
.card.tight { padding: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }

.module-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 18px;
  min-height: 280px; padding: 28px; border-radius: 22px; color: #fff;
  border: 1px solid var(--border);
  background: linear-gradient(150deg, rgba(60, 82, 130, .55), rgba(25, 38, 76, .65) 55%, rgba(11, 23, 44, .8));
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.module-card::after {
  content: ''; position: absolute; width: 340px; height: 340px; right: -120px; top: -140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(134, 164, 219, .45), transparent 65%); pointer-events: none;
}
.module-card:hover { transform: translateY(-3px); box-shadow: var(--glow); border-color: var(--border-strong); color: #fff; }
.module-card .big-suit { position: absolute; right: 22px; bottom: -18px; font-size: 9rem; line-height: 1; opacity: .08; }
.module-card .cta { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 500; }

.stat { padding: 20px; }
.stat .value { font-size: 2.1rem; font-weight: 500; line-height: 1; margin-top: 6px; }
.stat .label { color: var(--muted); font-size: .9rem; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px;
  font-size: .8rem; font-weight: 500; border: 1px solid var(--border); color: var(--mist); background: rgba(11, 23, 44, .4);
  white-space: nowrap;
}
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge.open { color: var(--green); border-color: rgba(91, 188, 121, .4); }
.badge.open::before { box-shadow: 0 0 0 4px rgba(91, 188, 121, .18); animation: pulse 1.8s infinite; }
.badge.closed { color: var(--slate-400); }
.badge.info { color: var(--accent); border-color: var(--border-strong); }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(91, 188, 121, 0); } }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 500; font-size: .95rem; cursor: pointer; transition: .2s; white-space: nowrap;
  background: var(--accent); color: var(--navy-950);
}
.btn:hover { background: #a9c0ea; color: var(--navy-950); box-shadow: 0 8px 26px -8px rgba(134, 164, 219, .7); }
.btn.ghost { background: transparent; color: var(--mist); border-color: var(--border-strong); }
.btn.ghost:hover { background: var(--surface-2); color: #fff; box-shadow: none; }
.btn.danger { background: transparent; color: var(--danger); border-color: rgba(224, 122, 122, .45); }
.btn.danger:hover { background: rgba(224, 122, 122, .12); box-shadow: none; }
.btn.success { background: var(--green); color: var(--navy-950); }
.btn.sm { padding: 7px 14px; font-size: .85rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.inline { display: inline; margin: 0; }

/* ---------- Formulários ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: .9rem; color: var(--mist); }
.field .hint { font-size: .8rem; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; font: inherit; color: #fff; background: rgba(11, 23, 44, .55);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; outline: none; transition: .2s;
}
.input::placeholder { color: var(--slate-500); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(134, 164, 219, .16); }
textarea.input { min-height: 96px; resize: vertical; }
.input[type=file] { padding: 8px; color: var(--muted); font-size: .88rem; }
.input[type=file]::file-selector-button {
  font: inherit; margin-right: 10px; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border-strong); background: rgba(134, 164, 219, .14); color: #fff;
}
select.input option { background: var(--navy-900); }
.error-text { color: var(--danger); font-size: .82rem; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--mist); font-size: .95rem; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.form-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 8px; }

.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--slate-500); width: 18px; }
.search .input { padding-left: 42px; border-radius: 999px; }

/* ---------- Alertas ---------- */
.flash {
  display: flex; gap: 10px; align-items: center; padding: 13px 18px; border-radius: var(--radius-sm); margin-bottom: 22px;
  background: rgba(91, 188, 121, .12); border: 1px solid rgba(91, 188, 121, .35); color: #c9f0d6;
  animation: drop .35s ease;
}
.flash.error { background: rgba(224, 122, 122, .12); border-color: rgba(224, 122, 122, .4); color: #f6d0d0; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
.notice { padding: 16px 18px; border-radius: var(--radius-sm); border: 1px dashed var(--border-strong); color: var(--mist); background: rgba(11, 23, 44, .35); }

/* ---------- Avatar ---------- */
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(140deg, var(--navy-700), var(--navy-900)); color: #fff; font-weight: 500; font-size: .95rem;
  border: 1px solid var(--border-strong);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 64px; height: 64px; font-size: 1.3rem; }

/* ---------- Looks ---------- */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
.toolbar .search { flex: 1 1 280px; }
.look-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.look-card {
  position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
  background: var(--surface); display: flex; flex-direction: column; transition: .25s; scroll-margin-top: 90px;
}
.look-card .photo {
  aspect-ratio: 4 / 5; display: grid; place-items: center; position: relative;
  background: linear-gradient(160deg, var(--navy-700), var(--navy-900) 70%);
}
.look-card .photo img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.9); }
.look-card .photo .initials { font-size: 3rem; font-weight: 300; color: rgba(255, 255, 255, .85); letter-spacing: .04em; }
.look-card .photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(11, 23, 44, .85)); }
.look-card .info { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.look-card .name { font-weight: 500; line-height: 1.2; }
.look-card .dept { color: var(--muted); font-size: .85rem; }
.look-card form { margin-top: auto; }
.look-card.voted { border-color: var(--accent); box-shadow: var(--glow); }
.look-card .voted-tag {
  position: absolute; top: 12px; right: 12px; z-index: 2; background: var(--accent); color: var(--navy-950);
  border-radius: 999px; padding: 4px 10px; font-size: .75rem; font-weight: 600; display: none;
}
.look-card.voted .voted-tag { display: inline-flex; gap: 4px; align-items: center; }
.vote-btn.on { background: transparent; color: var(--accent); border-color: var(--border-strong); }
.vote-btn.on:hover { color: var(--danger); border-color: rgba(224, 122, 122, .45); background: rgba(224, 122, 122, .08); }
@media (max-width: 560px) {
  .look-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .look-card .info { padding: 12px; gap: 10px; }
  .look-card .photo .initials { font-size: 2.2rem; }
  .look-card .btn { padding: 9px 10px; font-size: .85rem; }
}

/* ---------- Talentos ---------- */
.act-card { display: grid; grid-template-columns: 220px 1fr; gap: 0; padding: 0; overflow: hidden; scroll-margin-top: 90px; }
.act-card .cover {
  position: relative; min-height: 200px; display: grid; place-items: center;
  background: linear-gradient(160deg, var(--navy-700), var(--navy-950));
}
.act-card .cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.act-card .cover .num { font-size: 4.5rem; font-weight: 300; color: rgba(255, 255, 255, .9); position: relative; }
.act-card .body { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.act-card.waiting .cover { filter: grayscale(.6) brightness(.75); }
.members { display: flex; flex-wrap: wrap; gap: 6px; }
.members span { font-size: .82rem; padding: 3px 10px; border-radius: 999px; background: rgba(134, 164, 219, .12); color: var(--mist); }
.stepper { display: grid; grid-template-columns: auto auto 1fr auto auto; align-items: stretch; gap: 8px; }
.step {
  min-width: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 10px 8px; border-radius: 14px; cursor: pointer; user-select: none; touch-action: manipulation;
  border: 1px solid var(--border-strong); background: rgba(11, 23, 44, .5); color: #fff; font: inherit; transition: .15s;
}
.step span { font-size: 1.7rem; line-height: 1; }
.step small { font-size: .72rem; color: var(--muted); }
.step:hover:not([disabled]) { background: rgba(134, 164, 219, .16); border-color: var(--accent); }
.step:active:not([disabled]) { transform: scale(.94); background: var(--accent); color: var(--navy-950); }
.step:active:not([disabled]) small { color: var(--navy-900); }
.step[disabled] { opacity: .3; cursor: not-allowed; }
.score-display {
  display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 120px; padding: 6px 12px;
  border-radius: 16px; background: rgba(5, 11, 22, .6); border: 1px solid var(--border);
}
.score-display b { font-size: 2.6rem; font-weight: 500; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.score-display b.empty { color: var(--slate-500); }
.score-display small { font-size: .75rem; color: var(--muted); margin-top: 4px; }
.score-meter { height: 6px; margin-top: 12px; border-radius: 6px; background: rgba(134, 164, 219, .12); overflow: hidden; }
.score-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--navy-700), var(--accent)); transition: width .15s; }
.save-state { margin-top: 8px; min-height: 1.3em; }
@media (max-width: 520px) { /* mostrador em cima, quatro setas largas embaixo */
  .stepper { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .score-display { grid-column: 1 / -1; order: -1; flex-direction: row; gap: 8px; align-items: baseline; padding: 10px; }
  .score-display small { margin-top: 0; }
  .step { min-width: 0; min-height: 58px; }
}
.my-score { display: inline-flex; align-items: baseline; gap: 6px; }
.my-score b { font-size: 1.6rem; font-weight: 500; color: var(--accent); }
@media (max-width: 720px) {
  .act-card { grid-template-columns: 1fr; }
  .act-card .cover { min-height: 140px; }
  .act-card .body { padding: 18px; }
}

/* ---------- Ranking ---------- */
.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rank-item {
  display: grid; grid-template-columns: 40px 44px 1fr auto; align-items: center; gap: 14px;
  padding: 12px 16px; border-radius: var(--radius-sm); background: rgba(11, 23, 44, .4); border: 1px solid transparent;
}
.rank-item .pos { font-size: 1.1rem; color: var(--muted); text-align: center; font-weight: 500; }
.rank-item.top { border-color: var(--border-strong); background: linear-gradient(90deg, rgba(134, 164, 219, .2), rgba(11, 23, 44, .4)); }
.rank-item.top .pos { color: var(--accent); }
.rank-item .metric { text-align: right; font-weight: 500; font-size: 1.1rem; }
.rank-item .metric small { display: block; color: var(--muted); font-weight: 400; font-size: .78rem; }
.bar { height: 5px; border-radius: 5px; background: rgba(134, 164, 219, .12); margin-top: 7px; overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--navy-700), var(--accent)); }
@media (max-width: 560px) {
  .rank-item { grid-template-columns: 28px 38px 1fr auto; gap: 10px; padding: 10px 12px; }
  .rank-item .avatar { width: 38px; height: 38px; }
}

/* ---------- Tabelas ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-weight: 500; color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; background: rgba(11, 23, 44, .35); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(134, 164, 219, .05); }
td .row { flex-wrap: nowrap; }
td.actions { text-align: right; white-space: nowrap; }
td.actions > * + * { margin-left: 6px; }
.program td[data-label="Integrantes"] { max-width: 240px; }

/* ---------- Modal ---------- */
.modal {
  width: min(460px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 48px)); padding: 0; overflow: hidden;
  border: 1px solid var(--border-strong); border-radius: var(--radius); color: var(--text);
  background: var(--surface-solid); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8);
}
.modal[open] { display: flex; flex-direction: column; animation: drop .25s ease; }
.modal::backdrop { background: rgba(5, 11, 22, .7); backdrop-filter: blur(4px); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 1.3rem; margin-top: 4px; }
.modal-list { list-style: none; margin: 0; padding: 10px 14px 16px; overflow-y: auto; }
.modal-list li { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; white-space: normal; }
.modal-list li:hover { background: rgba(134, 164, 219, .08); }
@media (max-width: 720px) {
  .table-responsive thead { display: none; }
  .table-responsive tr { display: block; padding: 14px 16px; border-bottom: 1px solid var(--border); }
  .table-responsive td { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border: 0; }
  .table-responsive td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: .82rem; }
  .table-responsive td.actions { justify-content: flex-start; padding-top: 10px; }
}

.pagination { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 20px; }
.pagination a, .pagination span { padding: 7px 13px; border-radius: 10px; border: 1px solid var(--border); color: var(--mist); font-size: .9rem; }
.pagination .current { background: var(--accent); color: var(--navy-950); border-color: var(--accent); }

/* ---------- Admin ---------- */
.admin-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 26px; scrollbar-width: none; }
.admin-tabs a {
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border); color: var(--mist); white-space: nowrap; font-size: .92rem;
}
.admin-tabs a.active { background: var(--accent); color: var(--navy-950); border-color: var(--accent); }
.order-cell { display: flex; align-items: center; gap: 10px; }
.order-cell b { font-size: 1.05rem; min-width: 26px; }
.arrows { display: inline-flex; flex-direction: column; gap: 3px; }
.arrow-btn {
  width: 30px; height: 22px; display: grid; place-items: center; padding: 0; font-size: .68rem; cursor: pointer;
  border-radius: 7px; border: 1px solid var(--border-strong); background: rgba(11, 23, 44, .45); color: var(--mist); transition: .15s;
}
.arrow-btn:hover:not([disabled]) { background: var(--accent); color: var(--navy-950); border-color: var(--accent); }
.arrow-btn[disabled] { opacity: .25; cursor: default; }
.program tr.released td:first-child { box-shadow: inset 3px 0 0 var(--green); }
.program tr:target { background: rgba(134, 164, 219, .1); }
@media (max-width: 720px) {
  .arrows { flex-direction: row; }
  .arrow-btn { width: 38px; height: 32px; font-size: .8rem; }
}

.control-panel { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-bottom: 22px; }
.control { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.control .title { font-weight: 500; }
details.danger-zone { margin-top: 26px; }
details.danger-zone summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
details.danger-zone .card { margin-top: 12px; border-color: rgba(224, 122, 122, .3); }

.member-picker { max-height: 340px; overflow-y: auto; display: grid; gap: 4px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: rgba(11, 23, 44, .35); }
.member-picker label { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; cursor: pointer; font-size: .92rem; }
.member-picker label:hover { background: rgba(134, 164, 219, .08); }
.member-picker input { accent-color: var(--accent); width: 17px; height: 17px; }
.member-picker label small { color: var(--muted); display: block; font-size: .78rem; }
.member-picker label.taken { opacity: .45; cursor: not-allowed; }
.member-picker label.taken:hover { background: transparent; }

/* ---------- Login ---------- */
.auth {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr;
}
.auth-hero {
  position: relative; overflow: hidden; padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(600px 400px at 70% 30%, rgba(134, 164, 219, .35), transparent 60%),
    linear-gradient(160deg, var(--navy-700) 0%, var(--navy-900) 50%, var(--navy-950) 100%);
  border-right: 1px solid var(--border);
}
.auth-hero .lights { position: absolute; inset: 0; pointer-events: none; opacity: .6;
  background-image: radial-gradient(rgba(255,255,255,.55) 1px, transparent 1.5px); background-size: 34px 34px;
  mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 65%); -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 65%); }
.auth-hero img { width: 200px; position: relative; }
.auth-hero .headline { position: relative; }
.auth-hero .headline h1 { font-size: clamp(2.6rem, 5vw, 4.4rem); font-weight: 400; }
.auth-hero .headline h1 em { font-style: normal; color: var(--accent); }
.auth-hero .headline p { margin-top: 14px; color: var(--mist); max-width: 420px; font-size: 1.05rem; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.auth-form .box { width: 100%; max-width: 400px; }
.auth-form .box h2 { margin-bottom: 6px; }
.auth-form .mobile-logo { display: none; }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-form { align-content: center; }
  .auth-form .mobile-logo { display: block; text-align: center; margin-bottom: 34px; }
  .auth-form .mobile-logo img { width: 170px; margin: 0 auto 22px; }
  .auth-form .mobile-logo h1 { font-size: 2.3rem; font-weight: 400; }
  .auth-form .mobile-logo h1 em { font-style: normal; color: var(--accent); }
}

/* ---------- Telão ---------- */
.reveal {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 40px 20px; position: relative; overflow: hidden;
  background: radial-gradient(800px 500px at 50% 40%, rgba(134, 164, 219, .3), transparent 65%), var(--navy-950);
}
.reveal .rays { position: absolute; inset: -50%; background: repeating-conic-gradient(from 0deg, rgba(134,164,219,.07) 0deg 6deg, transparent 6deg 18deg); animation: spin 60s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.reveal > * { position: relative; }
.reveal .logo { width: 180px; margin-bottom: 28px; }
.reveal .title { font-size: clamp(1.2rem, 2.5vw, 1.8rem); color: var(--accent); }
.reveal .stage { margin-top: 40px; min-height: 360px; display: flex; align-items: center; justify-content: center; gap: 40px; flex-wrap: wrap; }
.reveal .curtain { font-size: clamp(2rem, 6vw, 4.5rem); font-weight: 300; }
.reveal .winner { display: flex; flex-direction: column; align-items: center; gap: 16px; animation: rise .9s cubic-bezier(.2,.8,.2,1) both; }
.reveal .winner .pic {
  width: clamp(180px, 22vw, 260px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--navy-700), var(--navy-900)); font-size: 4rem; font-weight: 300;
  box-shadow: 0 0 0 6px rgba(134,164,219,.35), 0 0 80px 10px rgba(134,164,219,.45);
}
.reveal .winner .pic img { width: 100%; height: 100%; object-fit: cover; }
.reveal .winner h2 { font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 500; }
.reveal .winner p { color: var(--mist); font-size: 1.2rem; max-width: 700px; }
.reveal .hidden { display: none; }
.reveal .corner { position: fixed; top: 18px; left: 18px; }
.countdown { display: grid; place-items: center; }
.countdown span {
  display: grid; place-items: center; width: clamp(180px, 24vw, 280px); aspect-ratio: 1; border-radius: 50%;
  font-size: clamp(6rem, 14vw, 10rem); font-weight: 300; line-height: 1; color: #fff;
  border: 2px solid var(--border-strong); background: radial-gradient(circle, rgba(134, 164, 219, .25), rgba(11, 23, 44, .4) 70%);
  box-shadow: 0 0 80px 10px rgba(134, 164, 219, .35);
  animation: tick 1s ease-out;
}
@keyframes tick { 0% { transform: scale(1.35); opacity: 0; } 25% { transform: scale(1); opacity: 1; } 85% { opacity: 1; } 100% { transform: scale(.92); opacity: .3; } }
@keyframes rise { from { opacity: 0; transform: translateY(30px) scale(.9); } }
.confetti { position: fixed; top: -10px; width: 8px; height: 14px; border-radius: 2px; animation: fall linear forwards; pointer-events: none; z-index: 5; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* ---------- Telão do sorteio ---------- */
.draw .draw-heading { margin-top: 14px; max-width: 100%; font-size: clamp(1.6rem, 3.6vw, 2.8rem); font-weight: 400; }
.deck { width: 100%; max-width: 1240px; display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(12px, 2vw, 26px); margin-top: 40px; perspective: 1400px; }
.play-card { position: relative; flex: none; will-change: transform; width: clamp(150px, 16vw, 220px); aspect-ratio: 5 / 7; }
.play-card-inner { position: relative; width: 100%; height: 100%; }
.play-card.flipping .play-card-inner { animation: card-flip .8s cubic-bezier(.4, 0, .2, 1); }
@keyframes card-flip { 50% { transform: scaleX(0) translateY(-12px); } }
.play-card .face {
  position: absolute; inset: 0; border-radius: 16px;
  border: 1px solid var(--border-strong); box-shadow: 0 20px 50px -18px rgba(0, 0, 0, .8);
}
.play-card .back {
  display: grid; place-items: center; font-size: 3.4rem; color: rgba(255, 255, 255, .85);
  background:
    repeating-linear-gradient(45deg, rgba(134, 164, 219, .12) 0 8px, transparent 8px 16px),
    linear-gradient(150deg, var(--navy-700), var(--navy-900));
  outline: 6px solid rgba(11, 23, 44, .55); outline-offset: -14px;
}
.play-card .front {
  display: none; padding: 18px 14px; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center; background: linear-gradient(170deg, #f3f4f8, var(--mist)); color: var(--navy-950);
}
.play-card.flipped .front { display: flex; box-shadow: 0 0 0 4px rgba(134, 164, 219, .35), 0 20px 60px -10px rgba(134, 164, 219, .55); }
.play-card.flipped .back { display: none; }
.play-card .front .pos { font-size: clamp(2.4rem, 4vw, 3.4rem); font-weight: 600; line-height: 1; color: var(--navy-700); }
.play-card .front .suit { font-size: 1.3rem; color: var(--navy-700); opacity: .6; }
.play-card .front strong { font-size: clamp(1rem, 1.4vw, 1.25rem); font-weight: 600; line-height: 1.15; }
.play-card .front em { font-style: normal; font-size: .85rem; color: var(--slate-700); }
.play-card .front small {
  font-size: .75rem; color: var(--slate-500); line-height: 1.3;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden;
}
.play-card .front strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
/* ---------- Telão caça-níquel (melhor look) ---------- */
.slot-page { justify-content: center; padding: 18px 16px; }
.sm {
  --tile: clamp(104px, min(14.5vw, 23vh), 290px);
  --tile-h: calc(var(--tile) * 4 / 3);
  --chrome: linear-gradient(90deg, #5b6476 0%, #e9ecf3 18%, #9aa3b5 38%, #f7f8fb 55%, #8089a0 78%, #cfd4df 100%);
  --chrome-v: linear-gradient(180deg, #f7f8fb 0%, #9aa3b5 45%, #e1e5ee 70%, #6d778b 100%);
  position: relative; display: flex; flex-direction: column; align-items: center;
  margin-right: calc(var(--tile) * .45); /* espaço para a alavanca */
  filter: drop-shadow(0 40px 60px rgba(0, 0, 0, .7));
}

/* Letreiro */
.sm-marquee {
  position: relative; width: calc(100% - var(--tile) * .3); padding: calc(var(--tile) * .1) 30px calc(var(--tile) * .08);
  text-align: center; border-radius: 40px 40px 14px 14px;
  background: radial-gradient(120% 140% at 50% 0%, var(--navy-700), var(--navy-900) 55%, var(--navy-950));
  box-shadow: 0 0 0 4px #aab3c5, 0 0 0 6px #4c556a, inset 0 2px 0 rgba(255, 255, 255, .25), inset 0 -10px 30px rgba(0, 0, 0, .5);
}
.sm-marquee img { width: calc(var(--tile) * .5); margin: 0 auto 4px; opacity: .9; }
.sm-sign {
  font-size: calc(var(--tile) * .27); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; line-height: 1;
  color: #fff; text-shadow: 0 0 6px #fff, 0 0 18px var(--accent), 0 0 42px var(--accent);
}
.sm-sub { margin-top: 6px; font-size: calc(var(--tile) * .085); letter-spacing: .35em; text-transform: uppercase; color: var(--accent); }
.sm-bulbs {
  position: absolute; inset: 6px; border-radius: 34px 34px 10px 10px; padding: 9px; pointer-events: none;
  background: radial-gradient(circle, #fff 0 2.5px, rgba(134, 164, 219, .85) 3.5px, transparent 6.5px) 0 0 / 20px 20px;
  -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: chase 1.2s steps(1) infinite; opacity: .8;
}
.sm.spinning .sm-bulbs, .sm.won .sm-bulbs { animation-duration: .25s; opacity: 1; }
@keyframes chase { 50% { background-position: 10px 10px; } }

/* Gabinete */
.sm-cabinet {
  position: relative; z-index: 1; margin-top: 6px; padding: calc(var(--tile) * .12) calc(var(--tile) * .16) calc(var(--tile) * .1);
  width: min-content; /* a largura vem dos rolos; textos longos do display quebram linha */
  border-radius: 22px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .35), transparent 12%, transparent 88%, rgba(0, 0, 0, .35)),
    linear-gradient(180deg, var(--navy-700), var(--navy-900) 60%, #111c38);
  box-shadow: 0 0 0 5px #9aa3b5, 0 0 0 7px #4c556a, inset 0 2px 0 rgba(255, 255, 255, .2);
}
.sm-window { position: relative; padding: 10px; border-radius: 18px; background: var(--chrome-v); box-shadow: 0 6px 20px rgba(0, 0, 0, .55); }
.sm-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); font-size: calc(var(--tile) * .12); color: var(--accent);
  text-shadow: 0 0 10px var(--accent); z-index: 2;
}
.sm-arrow.left { left: calc(var(--tile) * -.14); }
.sm-arrow.right { right: calc(var(--tile) * -.14); }
.sm.jackpot .sm-arrow { animation: blink .5s steps(1) infinite; color: #fff; }
@keyframes blink { 50% { opacity: .15; } }
.sm .reels { position: relative; display: flex; gap: calc(var(--tile) * .06); padding: calc(var(--tile) * .05); border-radius: 12px; background: #050b16; box-shadow: inset 0 10px 30px rgba(0, 0, 0, .9); }
.reel {
  position: relative; width: var(--tile); height: var(--tile-h); overflow: hidden; border-radius: 10px;
  background: var(--navy-900); box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .3); transition: box-shadow .4s;
}
.reel::after { /* sombra curva de rolo */
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(180deg, rgba(5, 11, 22, .8), transparent 20%, transparent 80%, rgba(5, 11, 22, .8));
  transition: opacity 1s;
}
.reel .glass { position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, .28) 0%, rgba(255, 255, 255, .06) 30%, transparent 45%); }
.sm.won .reel::after { opacity: 0; }
.strip { will-change: transform; }
.reel.stopped .strip { will-change: auto; }
.strip.blurring { filter: blur(2.5px); }
.slot-tile { width: var(--tile); height: var(--tile-h); display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(160deg, var(--navy-700), var(--navy-900) 70%); }
.slot-tile img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.slot-tile span { font-size: calc(var(--tile) * .32); font-weight: 300; color: rgba(255, 255, 255, .85); }
.slot-tile.mystery img, .slot-tile.mystery span { filter: blur(18px) brightness(.9); transform: scale(1.15); transition: filter 1.4s ease, transform 1.4s ease; }
.slot-tile.mystery.revealed img, .slot-tile.mystery.revealed span { filter: none; transform: none; }
.reel.stopped { animation: thunk .35s ease-out; }
@keyframes thunk { 40% { transform: translateY(6px); } }
.sm.jackpot .reel { box-shadow: 0 0 0 3px var(--accent), 0 0 30px rgba(134, 164, 219, .8); }
.sm.won .reel { box-shadow: 0 0 0 3px #fff, 0 0 50px rgba(134, 164, 219, 1); }

/* Display de LED */
.sm-display {
  margin-top: calc(var(--tile) * .1); min-height: calc(var(--tile) * .42); display: grid; place-items: center; padding: 8px 18px;
  border-radius: 12px; border: 3px solid #4c556a; background: #050b16; position: relative; overflow: hidden;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, .9);
}
.sm-display::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background: radial-gradient(circle, transparent 1px, #050b16 1.6px) 0 0 / 4px 4px; }
.led {
  font-weight: 600; letter-spacing: .18em; text-transform: uppercase; text-align: center; line-height: 1.15;
  font-size: calc(var(--tile) * .11); color: #cfe0ff; text-shadow: 0 0 6px var(--accent), 0 0 16px rgba(134, 164, 219, .7);
}
.led.pulse { animation: led-pulse .8s ease-in-out infinite alternate; }
@keyframes led-pulse { to { color: #fff; text-shadow: 0 0 10px #fff, 0 0 26px var(--accent); } }
.led .blink { animation: blink .6s steps(1) infinite; }
.led-count { display: inline-block; font-size: calc(var(--tile) * .3); line-height: 1; letter-spacing: 0; animation: tick 1s ease-out; }
.led.winners { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 26px; letter-spacing: .06em; animation: rise .8s cubic-bezier(.2, .8, .2, 1) both; }
.led-winner strong { display: block; font-size: calc(var(--tile) * .13); color: #fff; }
.led-winner small { display: block; margin-top: 3px; font-size: calc(var(--tile) * .07); font-weight: 400; letter-spacing: .14em; color: var(--accent); }
.led.winners:has(.led-winner + .led-winner) .led-winner strong { font-size: calc(var(--tile) * .085); }
.led.winners:has(.led-winner + .led-winner) .led-winner small { font-size: calc(var(--tile) * .05); margin-top: 1px; }

/* Painel de comandos */
.sm-deck {
  margin-top: calc(var(--tile) * .1); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px;
  padding: 12px 16px 16px; border-radius: 14px; background: linear-gradient(180deg, #2b3a63, #141f3d);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .12), 0 4px 12px rgba(0, 0, 0, .5);
}
.sm-deck-left { display: flex; gap: 8px; }
.sm-chip {
  width: calc(var(--tile) * .16); height: calc(var(--tile) * .16); border-radius: 50%; display: grid; place-items: center;
  font-size: calc(var(--tile) * .08); color: var(--navy-950); background: radial-gradient(circle at 35% 30%, #fff, #b9c6e4 45%, #6f80a8);
  box-shadow: 0 3px 0 #3b4766, 0 5px 8px rgba(0, 0, 0, .5);
}
.sm-deck-right { justify-self: end; text-align: right; }
.sm-label { display: block; font-size: calc(var(--tile) * .055); letter-spacing: .2em; text-transform: uppercase; color: var(--slate-400); }
.sm-counter { display: inline-block; margin-top: 2px; padding: 2px 10px; border-radius: 6px; background: #050b16; font-family: 'Courier New', monospace; font-weight: 700;
  font-size: calc(var(--tile) * .11); color: #cfe0ff; text-shadow: 0 0 8px var(--accent); letter-spacing: .1em; }
.sm-big-btn {
  width: calc(var(--tile) * .5); height: calc(var(--tile) * .5); border-radius: 50%; border: 0; cursor: pointer;
  font: 700 calc(var(--tile) * .065) / 1 var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--navy-950);
  background: radial-gradient(circle at 35% 30%, #fff, var(--accent) 45%, var(--navy-700));
  box-shadow: 0 7px 0 #1d2a4d, 0 10px 18px rgba(0, 0, 0, .6), 0 0 0 5px #9aa3b5;
  transition: transform .12s, box-shadow .12s, filter .3s;
}
.sm-big-btn[disabled] { cursor: default; filter: grayscale(.7) brightness(.55); }
.sm-big-btn:not([disabled]) { animation: big-btn-glow 1s ease-in-out infinite alternate; }
.sm-big-btn.pressed { transform: translateY(6px); box-shadow: 0 1px 0 #1d2a4d, 0 3px 8px rgba(0, 0, 0, .6), 0 0 0 5px #9aa3b5; }
@keyframes big-btn-glow { to { box-shadow: 0 7px 0 #1d2a4d, 0 10px 18px rgba(0, 0, 0, .6), 0 0 0 5px #9aa3b5, 0 0 40px 8px rgba(134, 164, 219, .85); } }

/* Base com bandeja de moedas */
.sm-base {
  width: calc(100% + 20px); margin-top: 7px; padding: calc(var(--tile) * .08) calc(var(--tile) * .3) calc(var(--tile) * .07);
  border-radius: 8px 8px 22px 22px; background: linear-gradient(180deg, #1a2648, #0b1530);
  box-shadow: 0 0 0 4px #9aa3b5, 0 0 0 6px #4c556a, inset 0 6px 14px rgba(0, 0, 0, .5);
}
.sm-tray { height: calc(var(--tile) * .14); border-radius: 0 0 16px 16px; background: linear-gradient(180deg, #050b16, #1c2747); box-shadow: inset 0 6px 12px rgba(0, 0, 0, .9), 0 0 0 3px #6d778b; }

/* Alavanca */
.sm-lever {
  position: absolute; z-index: 0; top: 34%; right: calc(var(--tile) * -.42); width: calc(var(--tile) * .42); height: calc(var(--tile) * 1.5);
  padding: 0; border: 0; background: none; cursor: pointer;
}
.sm-lever[disabled] { cursor: default; }
.sm-lever-slot { /* placa presa na lateral da máquina */
  position: absolute; left: 0; bottom: calc(var(--tile) * .05); width: calc(var(--tile) * .2); height: calc(var(--tile) * .42);
  border-radius: 0 12px 12px 0; background: var(--chrome); box-shadow: 0 4px 10px rgba(0, 0, 0, .5);
}
.sm-lever-hub {
  position: absolute; left: calc(var(--tile) * .1); bottom: calc(var(--tile) * .1); width: calc(var(--tile) * .24); height: calc(var(--tile) * .24);
  border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #aab3c5 50%, #4c556a); box-shadow: 0 4px 10px rgba(0, 0, 0, .6);
}
.sm-lever-arm {
  position: absolute; left: calc(var(--tile) * .19); bottom: calc(var(--tile) * .22); width: calc(var(--tile) * .06); height: calc(var(--tile) * 1.05);
  border-radius: 6px; background: var(--chrome); transform-origin: 50% 100%; box-shadow: 2px 0 6px rgba(0, 0, 0, .4); transition: transform .2s;
}
.sm-lever-knob { /* fica fora da haste para continuar redonda; acompanha a ponta da haste */
  position: absolute; z-index: 2; left: calc(var(--tile) * .22); bottom: calc(var(--tile) * 1.27);
  width: calc(var(--tile) * .3); height: calc(var(--tile) * .3); transform: translate(-50%, 40%);
  border-radius: 50%; background: radial-gradient(circle at 32% 28%, #fff 0 6%, #c9d7f5 14%, var(--accent) 40%, var(--navy-700) 85%);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .6), 0 0 24px rgba(134, 164, 219, .55); transition: transform .2s;
}
.sm-lever:not([disabled]) .sm-lever-knob { animation: knob-glow 1.4s ease-in-out infinite alternate; }
@keyframes knob-glow { to { box-shadow: 0 6px 14px rgba(0, 0, 0, .6), 0 0 40px 8px rgba(134, 164, 219, .9); } }
.sm-lever:not([disabled]):hover .sm-lever-arm { transform: scaleY(.94); }
.sm-lever:not([disabled]):hover .sm-lever-knob { transform: translate(-50%, 40%) translateY(calc(var(--tile) * .063)); }
/* puxão: a haste encolhe, passa pelo eixo (vem em direção ao público) e volta; a bola desce junto e cresce */
.sm-lever.pulled .sm-lever-arm { animation: pull .9s cubic-bezier(.5, 0, .3, 1); }
.sm-lever.pulled .sm-lever-knob { animation: pull-knob .9s cubic-bezier(.5, 0, .3, 1); }
@keyframes pull {
  0%, 100% { transform: scaleY(1); }
  35%, 55% { transform: scaleY(-.62); }
}
@keyframes pull-knob {
  0%, 100% { transform: translate(-50%, 40%) translateY(0) scale(1); }
  35%, 55% { transform: translate(-50%, 40%) translateY(calc(var(--tile) * 1.05 * 1.62)) scale(1.35); }
}

@media (max-width: 700px) {
  .sm { --tile: 20.5vw; margin-right: calc(var(--tile) * .42); }
  .sm-sign { font-size: 6vw; }
}

/* ---------- Telão com cortina de teatro (show de talentos) ---------- */
.theater {
  --velvet: linear-gradient(90deg, #2a0207 0%, #5e0912 16%, #9a1626 36%, #c52c3d 49%, #d8404f 52%, #a81b2c 63%, #680b17 84%, #2a0207 100%);
  --gold-dark: #8a6420; --gold: #c99a3e; --gold-light: #f3d68a;
  --gold-grad: linear-gradient(180deg, var(--gold-light), var(--gold) 45%, var(--gold-dark) 100%);
  --rope: repeating-linear-gradient(60deg, var(--gold-light) 0 3px, var(--gold) 3px 6px, var(--gold-dark) 6px 8px);
  position: fixed; inset: 0; z-index: 20; pointer-events: none; overflow: hidden;
}
.drape { position: absolute; z-index: 0; top: 0; bottom: 0; width: 50.5%; pointer-events: auto; } /* z-index: dobras ficam dentro da própria metade */
.drape.left { left: 0; }
.drape.right { right: 0; }

/* cada dobra do veludo (geradas pelo script com larguras e tons levemente diferentes) */
.fold {
  position: absolute; top: 0; bottom: var(--drop, 0px); will-change: transform;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, .12) 16%, transparent 38%, transparent 72%, rgba(0, 0, 0, .4) 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 3px),
    var(--velvet);
  filter: brightness(var(--shade, 1));
  border-radius: 0 0 46% 46% / 0 0 18px 18px;
  box-shadow: -4px 0 10px rgba(0, 0, 0, .35);
}
.fold::after { /* franja dourada na barra */
  content: ''; position: absolute; left: 0; right: 0; bottom: -10px; height: 18px;
  background:
    linear-gradient(180deg, var(--gold-light), var(--gold) 2px, var(--gold-dark) 3px, transparent 3px),
    repeating-linear-gradient(90deg, rgba(243, 214, 138, .95) 0 1px, rgba(138, 100, 32, .9) 1px 2px, transparent 2px 3px);
  -webkit-mask: linear-gradient(180deg, #000 35%, rgba(0, 0, 0, .5) 75%, transparent);
  mask: linear-gradient(180deg, #000 35%, rgba(0, 0, 0, .5) 75%, transparent);
  border-radius: 0 0 46% 46% / 0 0 12px 12px;
}
.fold.edge::before { /* debrum dourado só na borda que encontra a outra metade */
  content: ''; position: absolute; top: 0; bottom: 0; width: 5px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light), var(--gold-dark)); opacity: .9;
}
.drape.left .fold.edge::before { right: 0; }
.drape.right .fold.edge::before { left: 0; }

/* luz de palco sobre a cortina fechada */
.curtain-light {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; transition: opacity 1.2s;
  background:
    radial-gradient(ellipse 45% 55% at 50% 62%, rgba(255, 214, 170, .16), transparent 70%),
    linear-gradient(180deg, rgba(0, 0, 0, .35), transparent 30%, transparent 80%, rgba(0, 0, 0, .45));
}
.theater.open .curtain-light { opacity: 0; }

/* bandô: faixa franzida + festões + cordão + borlas */
.valance { position: absolute; left: 0; right: 0; top: 0; z-index: 2; height: 8vh; min-height: 52px; }
.valance-band {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .5), transparent 70%),
    repeating-linear-gradient(90deg, transparent 0 23px, rgba(0, 0, 0, .25) 23px 31px, transparent 31px 41px),
    repeating-linear-gradient(90deg, #5e0912 0, #a81b2c 17px, #c52c3d 22px, #7a0d1b 37px, #5e0912 44px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .6);
}
.valance-band::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 9px; background: var(--rope); box-shadow: 0 3px 6px rgba(0, 0, 0, .5); }
.swags { position: absolute; left: 0; right: 0; top: calc(100% - 2px); display: flex; }
.swag { /* o dourado de fundo vira o cordão na borda de baixo */
  position: relative; flex: 1; height: 6.5vh; min-height: 40px; padding-bottom: 7px; margin: 0 -1.2%;
  background: var(--rope); border-radius: 0 0 50% 50% / 0 0 100% 100%;
  filter: drop-shadow(0 8px 8px rgba(0, 0, 0, .55));
}
.swag::before {
  content: ''; position: absolute; inset: 0 0 7px 0; border-radius: inherit;
  background:
    repeating-radial-gradient(ellipse 60% 140% at 50% -30%, transparent 0 9px, rgba(0, 0, 0, .18) 9px 13px, transparent 13px 19px),
    radial-gradient(ellipse 70% 130% at 50% -10%, #d8404f 0%, #a81b2c 40%, #6a0b16 75%, #3a040b 100%);
}
.tassel { position: absolute; top: 0; z-index: 3; width: 18px; height: 11vh; min-height: 70px; transform: translateX(-50%); transform-origin: 50% 0; animation: tassel-sway 4s ease-in-out infinite alternate; }
.tassel::before { /* cordão + cabeça */
  content: ''; position: absolute; left: 50%; top: 0; width: 14px; height: 62%; transform: translateX(-50%);
  background:
    radial-gradient(circle at 40% 35%, var(--gold-light), var(--gold) 55%, var(--gold-dark)) 50% 100% / 14px 14px no-repeat,
    linear-gradient(90deg, transparent 5px, var(--gold) 5px 9px, transparent 9px);
}
.tassel::after { /* saia de franjas */
  content: ''; position: absolute; left: 50%; bottom: 0; width: 18px; height: 40%; transform: translateX(-50%);
  background: repeating-linear-gradient(90deg, var(--gold-light) 0 1.5px, var(--gold-dark) 1.5px 3px);
  clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%);
}
@keyframes tassel-sway { from { transform: translateX(-50%) rotate(-2deg); } to { transform: translateX(-50%) rotate(2deg); } }

/* texto e botão sobre a cortina fechada */
.theater-center {
  position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; text-align: center; pointer-events: auto; transition: opacity .6s, transform .6s;
}
.theater-center.gone { opacity: 0; transform: scale(.94); pointer-events: none; }
.theater-suits { letter-spacing: .6em; color: var(--gold-light); opacity: .75; text-shadow: 0 2px 6px rgba(0, 0, 0, .7); }
.theater-title {
  font-size: clamp(2.2rem, 5.5vw, 4.8rem); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; line-height: 1.05;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .8));
}
.theater-lead { font-size: clamp(1.1rem, 2vw, 1.6rem); color: #fbe9c0; text-shadow: 0 2px 8px rgba(0, 0, 0, .9); }
.theater-btn {
  margin-top: 6px; padding: 16px 40px; border: 0; border-radius: 999px; cursor: pointer;
  font: 700 1.25rem var(--font); letter-spacing: .08em; color: #4a0710; text-transform: uppercase;
  background: var(--gold-grad); box-shadow: 0 6px 0 var(--gold-dark), 0 12px 30px rgba(0, 0, 0, .6), 0 0 0 3px rgba(255, 255, 255, .25) inset;
  transition: transform .12s, box-shadow .12s;
}
.theater-btn:hover { transform: translateY(-2px); }
.theater-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--gold-dark), 0 6px 16px rgba(0, 0, 0, .6); }
.theater-count span {
  display: grid; place-items: center; width: clamp(170px, 20vw, 250px); aspect-ratio: 1; border-radius: 50%;
  font-size: clamp(5.5rem, 12vw, 9rem); font-weight: 600; line-height: 1; color: var(--gold-light);
  background: radial-gradient(circle, rgba(58, 4, 11, .85), rgba(58, 4, 11, .45) 70%);
  border: 5px solid var(--gold); box-shadow: 0 0 0 3px var(--gold-dark), 0 0 60px rgba(243, 214, 138, .4), inset 0 0 30px rgba(0, 0, 0, .6);
  text-shadow: 0 0 20px rgba(243, 214, 138, .7);
  animation: pop 1s ease-out;
}
@keyframes pop { 0% { transform: scale(1.3); } 20% { transform: scale(.96); } 32%, 100% { transform: scale(1); } }

/* palco sob o holofote depois que a cortina abre */
.stage-page { padding-top: calc(16vh + 10px); padding-bottom: 20px; }
.stage-page .logo { width: clamp(120px, 12vw, 180px); margin-bottom: 14px; }
.stage-page .stage { margin-top: clamp(16px, 4vh, 40px); min-height: 0; }
.stage-page .winner .pic { width: clamp(140px, min(20vw, 30vh), 260px); }
.stage-page::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; opacity: 0; transition: opacity 2s 1s;
  background: radial-gradient(ellipse 38% 60% at 50% 58%, rgba(255, 244, 214, .16), transparent 70%);
}
.stage-page.lit::after { opacity: 1; }
.confetti { z-index: 30; }

.winner-strip { display: flex; align-items: center; gap: 16px; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .suit { font-size: 2.6rem; color: var(--accent); opacity: .5; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
