/* Roleta de nomes. Page-only. Do not reuse on other tools. */
body.page-roleta-de-nomes .site-main {
  background:
    radial-gradient(900px 420px at 100% 120px, rgba(147, 197, 253, .28), transparent 60%),
    #f4f7fc;
}
html[data-theme="dark"] body.page-roleta-de-nomes .site-main {
  background: transparent;
}

.roleta {
  --rl-ink: #0f1b3d;
  --rl-muted: #64748b;
  --rl-line: #e6edf6;
  --rl-blue: #3b82f6;
  --rl-card: #fff;
  color: var(--rl-ink);
  max-width: 1120px;
  margin: 0 auto 28px;
  font-family: "Segoe UI", system-ui, sans-serif;
}
.roleta * { box-sizing: border-box; }

.rl-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin: 8px 0 22px;
}
.rl-hero-main {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
}
.rl-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: #3b82f6;
  color: #fff;
  box-shadow: 0 10px 20px rgba(59, 130, 246, .28);
}
.rl-mark svg { width: 30px; height: 30px; display: block; }
.roleta h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.05;
  color: var(--rl-ink);
}
.rl-lead {
  margin: 8px 0 0;
  max-width: 520px;
  color: #64748b;
  font-size: 1.02rem;
  line-height: 1.45;
}
.rl-art { flex: none; width: 300px; height: 150px; margin-top: -8px; }
.rl-art svg { width: 100%; height: 100%; display: block; }

.rl-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 22px;
  align-items: stretch;
}
.rl-card {
  background: var(--rl-card);
  border: 1px solid #e7eef8;
  border-radius: 26px;
  box-shadow: 0 16px 40px rgba(15, 27, 61, .06);
  padding: 26px 26px 22px;
  min-width: 0;
}
.rl-stage {
  display: flex;
  flex-direction: column;
  padding-bottom: 18px;
}

.rl-step-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}
.rl-num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #3b82f6;
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
}
.roleta h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--rl-ink);
}
.rl-sub {
  margin: 2px 0 0;
  color: #94a3b8;
  font-size: .92rem;
}
.rl-pill {
  justify-self: end;
  padding: 6px 12px;
  border-radius: 999px;
  background: #e8f1ff;
  color: #3b82f6;
  font-size: .86rem;
  font-weight: 700;
  white-space: nowrap;
}

.rl-lines {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  min-height: 208px;
  max-height: 260px;
  border: 1px solid #e6edf5;
  border-radius: 16px;
  background: #f8fafc;
  overflow: hidden;
}
.rl-gutter {
  margin: 0;
  padding: 14px 0 14px 12px;
  overflow: hidden;
  color: #94a3b8;
  font-size: 16px;
  line-height: 28px;
  font-variant-numeric: tabular-nums;
}
.rl-gutter span { display: block; height: 28px; }
.roleta textarea {
  width: 100%;
  height: 100%;
  min-height: 208px;
  max-height: 260px;
  margin: 0;
  padding: 14px 14px 14px 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  resize: none;
  color: var(--rl-ink);
  font: 16px/28px "Segoe UI", system-ui, sans-serif;
  overflow: auto;
}
.roleta textarea:focus { outline: none; }
.rl-lines:focus-within {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .15);
}

.rl-label {
  margin: 18px 0 8px;
  font-size: .95rem;
  font-weight: 700;
}
.rl-file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e6edf5;
  border-radius: 16px;
  background: #f8fafc;
  cursor: pointer;
}
.rl-file input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.rl-file-ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #e8eef8;
  color: #64748b;
}
.rl-file-ico svg { width: 20px; height: 20px; display: block; }
.rl-file strong { display: block; font-size: .95rem; }
.rl-file small { display: block; margin-top: 2px; color: #94a3b8; font-size: .84rem; }
.rl-file:focus-within { box-shadow: 0 0 0 3px rgba(59, 130, 246, .18); }

.rl-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 6px;
  font-weight: 700;
  font-size: .98rem;
  cursor: pointer;
}
.rl-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #3b82f6;
}
.rl-hint {
  margin: 0 0 18px 28px;
  color: #94a3b8;
  font-size: .86rem;
  line-height: 1.4;
}

.rl-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.roleta button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  color: #334155;
  font: 700 .98rem/1 "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
}
.roleta button svg { width: 18px; height: 18px; display: block; flex: none; }
.roleta button:disabled { opacity: .55; cursor: wait; }
.roleta .rl-go {
  border-color: #f97316;
  background: #f97316;
  color: #fff;
  padding: 0 22px;
  box-shadow: 0 8px 16px rgba(249, 115, 22, .25);
}
.roleta .rl-go:hover { background: #ea6a0c; }
.roleta button:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

.rl-wheel {
  position: relative;
  display: grid;
  place-items: center;
  flex: 1;
  min-height: 360px;
  margin: 8px 0 16px;
}
.rl-disc { position: relative; width: min(100%, 430px); }
.rl-disc canvas {
  display: block;
  width: 100%;
  height: auto;
}
.rl-pointer {
  position: absolute;
  z-index: 2;
  top: 2px;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-top: 24px solid #1e293b;
  filter: drop-shadow(0 2px 1px rgba(15, 23, 42, .2));
}
.rl-bit {
  position: absolute;
  z-index: 0;
  display: block;
  border-radius: 99px;
  pointer-events: none;
}
.rl-bit.a { width: 14px; height: 6px; background: #f5c400; top: 6%; left: 8%; transform: rotate(-24deg); }
.rl-bit.b { width: 12px; height: 6px; background: #34c759; top: 18%; right: 6%; transform: rotate(20deg); }
.rl-bit.c { width: 18px; height: 6px; background: #fb7185; top: 12%; left: 16%; transform: rotate(-36deg); }
.rl-bit.d { width: 18px; height: 6px; background: #60a5fa; bottom: 18%; right: 7%; transform: rotate(28deg); }
.rl-bit.e { width: 10px; height: 10px; background: #a78bfa; bottom: 12%; left: 10%; }
.rl-bit.f { width: 20px; height: 6px; background: #f5c400; top: 7%; right: 18%; transform: rotate(16deg); }
.rl-bit.g { width: 11px; height: 6px; background: #34c759; bottom: 26%; left: 5%; transform: rotate(-18deg); }
.rl-bit.h { width: 16px; height: 6px; background: #fb7185; bottom: 8%; right: 16%; transform: rotate(-22deg); }

.rl-ready {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: auto;
  padding: 14px 16px;
  border-radius: 18px;
  background: #f3f7ff;
}
.rl-trophy {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff4cc;
  color: #d97706;
}
.rl-trophy svg { width: 24px; height: 24px; display: block; }
.rl-winner {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}
.rl-status {
  margin: 2px 0 0;
  color: #64748b;
  font-size: .92rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.rl-status.is-error { color: #b42318; }

.rl-history {
  margin-top: 18px;
  padding: 18px 22px;
  border: 1px solid #e7eef8;
  border-radius: 22px;
  background: #fff;
}
.rl-history h2 { margin-bottom: 10px; }
.rl-history ol {
  margin: 0 0 12px;
  padding-left: 1.2rem;
  max-height: 180px;
  overflow: auto;
}
.rl-history li { margin: 4px 0; }
.rl-history li:empty, .rl-history ol:empty { display: none; }
.rl-links { margin: 16px 0 0; }
.rl-links a { color: #2563eb; font-weight: 700; text-decoration: none; }
.rl-links a:hover { text-decoration: underline; }

body.page-roleta-de-nomes .article-tool > h2 {
  margin: 28px 0 10px;
  font-size: 1.35rem;
}
body.page-roleta-de-nomes .article-tool > ol,
body.page-roleta-de-nomes .article-tool > p {
  max-width: 760px;
  color: #334155;
  line-height: 1.5;
}

@media (max-width: 860px) {
  .rl-grid { grid-template-columns: 1fr; }
  .rl-art { display: none; }
  .rl-step-head { grid-template-columns: auto minmax(0, 1fr); }
  .rl-pill { grid-column: 2; justify-self: start; }
  .rl-wheel { min-height: 280px; }
}

html[data-theme="dark"] .roleta {
  --rl-ink: #e3eaf4;
  --rl-card: #162235;
}
html[data-theme="dark"] .rl-card,
html[data-theme="dark"] .rl-history {
  border-color: #334155;
  box-shadow: none;
}
html[data-theme="dark"] .rl-lead,
html[data-theme="dark"] .rl-sub,
html[data-theme="dark"] .rl-hint,
html[data-theme="dark"] .rl-status,
html[data-theme="dark"] .rl-file small {
  color: #94a3b8;
}
html[data-theme="dark"] .rl-lines,
html[data-theme="dark"] .rl-file {
  background: #0f1b2d;
  border-color: #334155;
}
html[data-theme="dark"] .roleta button:not(.rl-go) {
  background: #24364e;
  border-color: #334155;
  color: #e3eaf4;
}
html[data-theme="dark"] .rl-ready { background: #0f1b2d; }
html[data-theme="dark"] .rl-pill { background: rgba(59, 130, 246, .16); }
html[data-theme="dark"] body.page-roleta-de-nomes .article-tool > ol,
html[data-theme="dark"] body.page-roleta-de-nomes .article-tool > p { color: #cbd5e1; }
