/* TTK Games — design tokens + componentes compartilhados */
/* Fontes auto-hospedadas (variáveis, latin) — sem ida ao Google Fonts. Licença OFL. */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 500 800; font-stretch: 100%; font-display: swap; src: url("/assets/fonts/bricolage-latin.woff2") format("woff2"); }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/assets/fonts/onest-latin.woff2") format("woff2"); }

:root {
  --ink: #130f26;
  --ink-2: #1a1533;
  --surface: #1d1838;
  --surface-2: #261f48;
  --line: #352c63;
  --line-soft: #2a2350;
  --text: #f4f1ff;
  --muted: #a69fcb;
  --faint: #7a72a3;
  --signal: #ff3d7f;
  --signal-ink: #2a0614;
  --live: #2fe6c8;
  --live-ink: #04241f;
  --amber: #ffb020;
  --danger: #ff5a5f;
  --side-a: #e11d48;
  --side-b: #2563eb;

  --font-display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 18px;
  --r-pill: 999px;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: 1.5rem;
  --step-3: 2rem;
  --step-4: clamp(2.25rem, 5vw, 3.5rem);
  --step-5: clamp(2.75rem, 8vw, 5.5rem);

  --focus: 0 0 0 3px var(--ink), 0 0 0 5px var(--live);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--live); text-underline-offset: 3px; }
a:hover { color: #7ff3df; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.08; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: var(--step-4); font-weight: 800; }
h2 { font-size: var(--step-3); font-weight: 700; }
h3 { font-size: var(--step-1); font-weight: 700; }
p { margin: 0 0 1em; }
small, .small { font-size: var(--step--1); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
code, kbd {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .9em;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  padding: .05em .4em;
}
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--live); color: var(--live-ink); padding: 8px 14px; border-radius: var(--r-sm); z-index: 100; font-weight: 700; }
.skip-link:focus { top: 12px; }
[hidden] { display: none !important; }

/* ---------- Botões ---------- */
.btn {
  --b-bg: var(--surface-2); --b-fg: var(--text); --b-bd: var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 42px; padding: .55em 1.1em;
  font: 600 var(--step-0)/1.2 var(--font-body);
  color: var(--b-fg); background: var(--b-bg);
  border: 1px solid var(--b-bd); border-radius: var(--r-md);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .08s;
}
.btn:hover { --b-bd: var(--faint); color: var(--b-fg); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { --b-bg: var(--signal); --b-fg: #fff; --b-bd: var(--signal); }
.btn-primary:hover { --b-bg: #ff5a93; --b-bd: #ff5a93; }
.btn-live { --b-bg: var(--live); --b-fg: var(--live-ink); --b-bd: var(--live); }
.btn-live:hover { --b-bg: #63eed7; --b-bd: #63eed7; }
.btn-danger { --b-bg: transparent; --b-fg: var(--danger); --b-bd: color-mix(in srgb, var(--danger) 50%, transparent); }
.btn-danger:hover { --b-bg: color-mix(in srgb, var(--danger) 12%, transparent); --b-bd: var(--danger); }
.btn-ghost { --b-bg: transparent; --b-bd: transparent; --b-fg: var(--muted); }
.btn-ghost:hover { --b-bg: var(--surface-2); --b-fg: var(--text); --b-bd: transparent; }
.btn-sm { min-height: 34px; padding: .35em .8em; font-size: var(--step--1); border-radius: var(--r-sm); }
.btn-lg { min-height: 52px; padding: .7em 1.5em; font-size: var(--step-1); }
.btn-block { width: 100%; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--b-fg); border-right-color: transparent; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Formulários ---------- */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > label, .label { font-weight: 600; font-size: .9375rem; }
.hint { font-size: var(--step--1); color: var(--muted); margin: 0; }
.input, select.input, textarea.input {
  width: 100%; min-height: 44px; padding: .6em .8em;
  font: 400 var(--step-0)/1.3 var(--font-body);
  color: var(--text); background: var(--ink-2);
  border: 1px solid var(--line); border-radius: var(--r-md);
}
.input::placeholder { color: var(--faint); }
.input:focus { outline: none; border-color: var(--live); box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 25%, transparent); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input-group { display: flex; align-items: stretch; }
.input-group .prefix {
  display: grid; place-items: center; padding: 0 .8em;
  background: var(--surface-2); border: 1px solid var(--line); border-right: 0;
  border-radius: var(--r-md) 0 0 var(--r-md); color: var(--muted); font-weight: 700;
}
.input-group .input { border-radius: 0 var(--r-md) var(--r-md) 0; }
.input-row { display: flex; gap: 8px; }
.input-row .input { flex: 1; min-width: 0; }
input[type="color"].input { padding: 4px; width: 56px; flex: none; cursor: pointer; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--live); flex: none; }
.form-error { color: var(--danger); font-size: .9375rem; margin: 0 0 12px; }
.form-error:empty { display: none; }

/* ---------- Cartões / blocos ---------- */
.panel {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); padding: 22px;
}
.panel + .panel { margin-top: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { margin: 0; }
.panel-head h2 { font-size: var(--step-2); }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.divider { border: 0; border-top: 1px solid var(--line-soft); margin: 18px 0; }

/* ---------- Pílulas de estado ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: var(--r-pill);
  font-size: var(--step--1); font-weight: 600;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.no-dot::before { display: none; }
.pill-live { color: var(--live); border-color: color-mix(in srgb, var(--live) 40%, transparent); background: color-mix(in srgb, var(--live) 10%, transparent); }
.pill-live::before { animation: pulse 1.4s ease-in-out infinite; }
.pill-warn { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 40%, transparent); background: color-mix(in srgb, var(--amber) 10%, transparent); }
.pill-bad { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.pill-signal { color: var(--signal); border-color: color-mix(in srgb, var(--signal) 40%, transparent); background: color-mix(in srgb, var(--signal) 10%, transparent); }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- Estados ---------- */
.state { padding: 28px 16px; text-align: center; color: var(--muted); }
.state strong { display: block; color: var(--text); font-family: var(--font-display); font-size: var(--step-1); margin-bottom: 4px; }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--line-soft), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: var(--r-sm); min-height: 1em; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Tabelas ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--r-md); }
table.table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table th { color: var(--muted); font-weight: 600; background: var(--ink-2); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: grid; gap: 8px; width: min(380px, calc(100vw - 32px)); }
.toast {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--surface-2); border: 1px solid var(--line); border-left: 4px solid var(--live);
  border-radius: var(--r-md); padding: 12px 14px; box-shadow: 0 12px 30px rgba(5, 3, 15, .55);
  animation: toast-in .2s ease-out;
}
.toast.error { border-left-color: var(--danger); }
.toast.warn { border-left-color: var(--amber); }
.toast p { margin: 0; flex: 1; }
.toast button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1.2rem; line-height: 1; padding: 0 2px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Modal ---------- */
dialog.modal {
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 0;
  background: var(--surface); color: var(--text); width: min(460px, calc(100vw - 32px));
}
dialog.modal::backdrop { background: rgba(8, 5, 20, .72); }
.modal-body { padding: 22px; }
.modal-body h2 { font-size: var(--step-2); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; min-height: 44px; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-md); align-items: center; }
.chips:focus-within { border-color: var(--live); }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 2px 4px 2px 10px; font-size: .9375rem; }
.chip button { background: none; border: 0; color: var(--muted); cursor: pointer; width: 22px; height: 22px; border-radius: 50%; font-size: 1rem; line-height: 1; }
.chip button:hover { background: var(--line); color: var(--text); }
.chips input { flex: 1; min-width: 120px; border: 0; background: transparent; color: var(--text); font: inherit; padding: 4px; }
.chips input:focus { outline: none; }

/* ---------- Topo público ---------- */
.site-header { display: flex; align-items: center; gap: 16px; padding: 18px clamp(16px, 4vw, 48px); max-width: 1200px; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--text); text-decoration: none; letter-spacing: -0.02em; }
.brand:hover { color: var(--text); }
.brand-mark { width: 30px; height: 30px; flex: none; }
.site-header nav { display: flex; gap: 6px; margin-left: auto; align-items: center; }
.site-footer { border-top: 1px solid var(--line-soft); margin-top: 64px; }
.site-footer .inner { max-width: 1200px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 48px); display: flex; gap: 18px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: .9375rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* ---------- Páginas de texto (termos/privacidade) ---------- */
.prose { max-width: 720px; margin: 0 auto; padding: 24px 16px 40px; }
.prose h1 { font-size: var(--step-4); }
.prose h2 { font-size: var(--step-2); margin-top: 2em; }
.prose p, .prose li { color: #d9d4f2; }
.prose li + li { margin-top: .4em; }
.prose .updated { color: var(--muted); }

/* ---------- Auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; }
.auth-card { width: min(420px, calc(100vw - 32px)); margin: 24px auto 64px; align-self: center; }
.auth-card h1 { font-size: var(--step-3); }

/* ---------- Shell do painel ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--ink-2); border-right: 1px solid var(--line-soft);
  padding: 18px 14px; display: flex; flex-direction: column; gap: 18px;
}
.sidebar .brand { padding: 4px 8px; }
.nav { display: grid; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: var(--r-md); color: var(--muted); text-decoration: none; font-weight: 500;
}
.nav a svg { width: 20px; height: 20px; flex: none; }
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a[aria-current="page"] { background: var(--surface-2); color: var(--text); box-shadow: inset 3px 0 0 var(--signal); }
.nav .nav-sep { height: 1px; background: var(--line-soft); margin: 8px 4px; }
.sidebar-foot { margin-top: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.sb-plan { --tone: var(--live); position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 10px 10px 12px; border-radius: var(--r-md);
  text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--line-soft); transition: border-color .15s, background .15s; overflow: hidden; }
.sb-plan:hover { color: var(--text); background: var(--surface-2); border-color: var(--line); }
.sb-plan.tone-warn { --tone: var(--amber); }
.sb-plan.tone-bad { --tone: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line-soft)); }
.sb-plan.is-urgent { padding-bottom: 14px; }
.sb-plan-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone) 20%, transparent); }
.sb-plan-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.sb-plan-text b { font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-plan-text small { font-size: .74rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-plan.is-urgent .sb-plan-text small, .sb-plan.tone-bad .sb-plan-text small { color: var(--tone); font-weight: 600; }
.sb-plan-cta { flex: none; font-size: .7rem; font-weight: 700; padding: 3px 9px; border-radius: var(--r-pill); background: var(--signal); color: #fff; }
.sb-plan-go { flex: none; display: grid; place-items: center; color: var(--faint); }
.sb-plan-go svg { width: 16px; height: 16px; }
.sb-plan:hover .sb-plan-go { color: var(--text); }
.sb-plan-bar { position: absolute; left: 12px; right: 12px; bottom: 6px; height: 3px; border-radius: var(--r-pill); background: var(--line-soft); overflow: hidden; }
.sb-plan-bar i { display: block; height: 100%; border-radius: inherit; background: var(--tone); }
.sb-user { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 2px 0 4px; border-top: 1px solid var(--line-soft); }
.sb-avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: .8rem; color: #fff;
  background: linear-gradient(135deg, var(--signal), #7c3aed 60%, var(--live)); }
.sb-user-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.sb-user-text b { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-user-text small { font-size: .72rem; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-logout { flex: none; width: 34px; height: 34px; border-radius: var(--r-md); display: grid; place-items: center; background: transparent; border: 1px solid transparent; color: var(--muted); cursor: pointer; }
.sb-logout svg { width: 18px; height: 18px; }
.sb-logout:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.sb-logout:focus-visible { outline: none; box-shadow: var(--focus); }
.main { min-width: 0; padding: 28px clamp(16px, 3vw, 40px) 56px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); margin: 0; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.mobile-bar { display: none; }

.sub-banner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 18px; margin-bottom: 22px; border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--surface);
}
.sub-banner p { margin: 0; flex: 1; min-width: 220px; }
.sub-banner.trial { border-color: color-mix(in srgb, var(--amber) 45%, transparent); background: color-mix(in srgb, var(--amber) 7%, var(--surface)); }
.sub-banner.expired { border-color: color-mix(in srgb, var(--danger) 55%, transparent); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.sub-banner.active { border-color: color-mix(in srgb, var(--live) 35%, transparent); }

@media (max-width: 880px) {
  .shell { grid-template-columns: 1fr; }
  .mobile-bar {
    display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 40;
    padding: 10px 16px; background: var(--ink-2); border-bottom: 1px solid var(--line-soft);
  }
  .mobile-bar .btn { margin-left: auto; }
  .sidebar { position: fixed; inset: 0 30% 0 0; max-width: 300px; z-index: 50; transform: translateX(-105%); transition: transform .2s; height: 100%; }
  .sidebar.open { transform: none; box-shadow: 0 0 0 100vmax rgba(8, 5, 20, .6); }
  .sidebar > .brand { display: none; }
  .main { padding-top: 20px; }
}

/* ---------- Placar (tug-of-war) ---------- */
.tug { display: grid; gap: 10px; }
.tug-names { display: flex; justify-content: space-between; gap: 12px; font-family: var(--font-display); font-weight: 800; font-size: var(--step-1); }
.tug-names span:last-child { text-align: right; }
.tug-bar { position: relative; height: 34px; border-radius: var(--r-pill); overflow: hidden; display: flex; background: var(--surface-2); border: 1px solid var(--line); }
.tug-bar .a, .tug-bar .b { height: 100%; transition: flex-basis .35s cubic-bezier(.2, .8, .2, 1); display: flex; align-items: center; font-weight: 800; font-variant-numeric: tabular-nums; color: #fff; }
.tug-bar .a { background: var(--side-a); justify-content: flex-start; padding-left: 12px; }
.tug-bar .b { background: var(--side-b); justify-content: flex-end; padding-right: 12px; }
.tug-bar::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; background: rgba(255, 255, 255, .6); }

/* ---------- Feed ---------- */
.feed { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow-y: auto; display: grid; gap: 2px; }
.feed li { display: flex; gap: 10px; align-items: baseline; padding: 7px 10px; border-radius: var(--r-sm); font-size: .9375rem; }
.feed li:nth-child(odd) { background: var(--ink-2); }
.feed .kind { flex: none; width: 74px; font-size: var(--step--1); color: var(--muted); }
.feed .who { font-weight: 600; flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed .what { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.feed .sim { flex: none; font-size: 11px; font-weight: 700; color: var(--amber); border: 1px solid currentColor; border-radius: var(--r-pill); padding: 0 6px; }

/* ---------- Stats ---------- */
.stat { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 18px; }
.stat .v { font-family: var(--font-display); font-weight: 800; font-size: var(--step-3); line-height: 1; font-variant-numeric: tabular-nums; }
.stat .k { color: var(--muted); font-size: .9375rem; margin-top: 6px; }
.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mini-stats div { background: var(--ink-2); border-radius: var(--r-md); padding: 10px; text-align: center; }
.mini-stats b { display: block; font-family: var(--font-display); font-size: var(--step-2); font-variant-numeric: tabular-nums; }
.mini-stats span { font-size: var(--step--1); color: var(--muted); }
@media (max-width: 520px) { .mini-stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-soft); margin-bottom: 20px; overflow-x: auto; }
.tabs button {
  background: none; border: 0; color: var(--muted); font: 600 var(--step-0) var(--font-body);
  padding: 10px 14px; cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; margin-bottom: -1px;
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--signal); }

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

/* ---------- Regras / listas ---------- */
.rules { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.rules li { padding: 10px 12px 10px 14px; border-left: 3px solid var(--amber); background: var(--ink-2); border-radius: 0 var(--r-md) var(--r-md) 0; }
.rules li strong { display: block; }
.callout { padding: 12px 14px; border-radius: var(--r-md); background: var(--ink-2); border: 1px solid var(--line-soft); }
.callout.warn { border-color: color-mix(in srgb, var(--amber) 45%, transparent); }
.callout.bad { border-color: color-mix(in srgb, var(--danger) 50%, transparent); }
.callout.ok { border-color: color-mix(in srgb, var(--live) 45%, transparent); }
.callout p:last-child { margin-bottom: 0; }

/* ---------- Pares chave/valor ---------- */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 12px 0 0; font-size: .9375rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* ---------- Interruptor ---------- */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; user-select: none; }
.switch input { appearance: none; -webkit-appearance: none; width: 46px; height: 26px; border-radius: var(--r-pill); background: var(--line); position: relative; cursor: pointer; transition: background .15s; margin: 0; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--text); transition: transform .15s; }
.switch input:checked { background: var(--live); }
.switch input:checked::after { transform: translateX(20px); background: var(--live-ink); }
.switch input:disabled { opacity: .5; cursor: not-allowed; }
.switch input:focus-visible { box-shadow: var(--focus); }

/* ---------- Editor de jogo ---------- */
.editor { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
.editor-side { position: sticky; top: 18px; display: grid; gap: 18px; }
@media (max-width: 1100px) { .editor { grid-template-columns: 1fr; } .editor-side { position: static; } }
.sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; }
fieldset.side { border: 1px solid var(--line-soft); border-top: 4px solid var(--side-color, var(--line)); border-radius: var(--r-md); padding: 14px; margin: 0; min-width: 0; }
fieldset.side legend { font-family: var(--font-display); font-weight: 800; font-size: var(--step-1); padding: 0 6px; }
.img-pick { display: flex; gap: 12px; align-items: center; }
.img-pick .thumb { width: 64px; height: 64px; border-radius: 50%; flex: none; background: var(--surface-2) center / cover no-repeat; border: 2px solid var(--side-color, var(--line)); display: grid; place-items: center; color: var(--faint); font-size: var(--step--1); overflow: hidden; }
.img-pick .thumb img { width: 100%; height: 100%; object-fit: cover; }
.form-actions { position: sticky; bottom: 0; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px 0 4px; background: linear-gradient(transparent, var(--surface) 30%); }
.dirty-note { color: var(--amber); font-size: var(--step--1); font-weight: 600; }
/* Seções recolhíveis: o essencial fica à vista, o técnico fica a um clique */
details.adv { border: 1px solid var(--line-soft); border-radius: var(--r-md); background: var(--ink-2); margin: 14px 0 0; }
details.adv > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 12px 14px; font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); border-radius: var(--r-md); }
details.adv > summary::-webkit-details-marker { display: none; }
details.adv > summary::before { content: "▸"; color: var(--live); transition: transform .15s; display: inline-block; }
details.adv[open] > summary::before { transform: rotate(90deg); }
details.adv > summary .hint { font-family: var(--font-body); font-weight: 400; font-size: var(--step--1); margin: 0; }
details.adv > summary:hover { background: var(--surface-2); }
details.adv > summary:focus-visible { outline: none; box-shadow: var(--focus); }
details.adv[open] > summary { border-bottom: 1px solid var(--line-soft); border-radius: var(--r-md) var(--r-md) 0 0; }
details.adv > :not(summary) { margin-left: 14px; margin-right: 14px; }
details.adv > :last-child { margin-bottom: 14px; }
details.adv > .grid:first-of-type { margin-top: 14px; }
@media (prefers-reduced-motion: reduce) { details.adv > summary::before { transition: none; } }

.preview-box { position: relative; width: 100%; max-width: 300px; margin: 0 auto; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.preview-box iframe { position: absolute; top: 0; left: 0; width: 1080px; height: 1920px; border: 0; transform-origin: 0 0; pointer-events: none; }
.url-box { display: flex; gap: 8px; align-items: stretch; }
.url-box input { flex: 1; min-width: 0; font-family: ui-monospace, Menlo, monospace; font-size: .8125rem; }
.sim-badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--amber); }
.sim-grid { display: grid; gap: 10px; }
.sim-grid .row .input { flex: 1; min-width: 120px; }
.timer-big { font-family: var(--font-display); font-weight: 800; font-size: var(--step-3); font-variant-numeric: tabular-nums; line-height: 1; }
.locked { position: relative; }
.locked > .lock-cover { margin-bottom: 12px; }
.locked .sim-grid { opacity: .45; pointer-events: none; }

.ticks-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.ticks-list li { display: flex; gap: 10px; align-items: center; }
.ticks-list li::before { content: ""; width: 20px; height: 20px; border-radius: 50%; flex: none; border: 2px solid var(--line); }
.ticks-list li.ok::before { background: var(--live); border-color: var(--live); box-shadow: inset 0 0 0 4px var(--surface); }
.ticks-list li.no { color: var(--muted); }

/* ---------- Instruções numeradas ---------- */
.howto { margin: 0; padding-left: 1.4em; display: grid; gap: 8px; }
.howto li::marker { color: var(--signal); font-weight: 800; font-family: var(--font-display); }
.overlay-card h3 { font-size: var(--step-2); }
.params td:first-child { white-space: nowrap; }

/* ---------- Tutorial ---------- */
.tut { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.tut-aside { position: sticky; top: 18px; }
.progress { height: 10px; background: var(--ink-2); border-radius: var(--r-pill); overflow: hidden; border: 1px solid var(--line-soft); margin: 10px 0 6px; }
.progress > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--signal), var(--live)); transition: width .4s; }
.tut-index { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 2px; counter-reset: t; }
.tut-index li { counter-increment: t; }
.tut-index a { display: flex; gap: 10px; align-items: center; padding: 7px 8px; border-radius: var(--r-sm); color: var(--muted); text-decoration: none; font-size: .9375rem; }
.tut-index a:hover { background: var(--surface-2); color: var(--text); }
.tut-index a::before { content: counter(t); width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: var(--step--1); border: 1.5px solid var(--line); }
.tut-index li.done a { color: var(--text); }
.tut-index li.done a::before { content: "✓"; background: var(--live); border-color: var(--live); color: var(--live-ink); }
.step { scroll-margin-top: 20px; }
.step + .step { margin-top: 18px; }
.step-head { display: flex; gap: 14px; align-items: flex-start; }
.step-num { font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; line-height: .9; color: var(--signal); flex: none; min-width: 1.2em; }
.step.done .step-num { color: var(--live); }
.step-head h2 { font-size: var(--step-2); margin: 4px 0 6px; }
.step-body > * { max-width: 72ch; }
.step-body ol, .step-body ul { padding-left: 1.3em; display: grid; gap: 6px; }
.step-check { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.auto-tag { font-size: var(--step--1); color: var(--live); font-weight: 600; }
@media (max-width: 960px) { .tut { grid-template-columns: 1fr; } .tut-aside { position: static; } }

/* ---------- Corrida ---------- */
.race { display: grid; gap: 12px; }
.lane-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 4px; font-family: var(--font-display); }
.lane-head b { font-size: var(--step-1); }
.lane-track { position: relative; height: 18px; border-radius: var(--r-pill); background: repeating-linear-gradient(90deg, var(--surface-2) 0 calc(10% - 2px), var(--line) calc(10% - 2px) 10%); border: 1px solid var(--line); overflow: hidden; }
.lane-fill { height: 100%; border-radius: var(--r-pill); transition: width .3s ease-out; min-width: 4px; }
.howplay { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .9375rem; }
.howplay code { font-weight: 700; color: var(--text); }
.powers-table input.input { min-height: 36px; padding: .35em .5em; }
.powers-table td { padding: 6px 8px; }
.scoreboards { display: grid; gap: 18px; }
.scoreboards > div + div { padding-top: 16px; border-top: 1px solid var(--line-soft); }
.pix-qr { width: 220px; height: 220px; background: #fff; border-radius: var(--r-md); padding: 10px; margin: 0 auto; }
.pix-qr img { width: 100%; height: 100%; image-rendering: pixelated; }
/* data-engine aceita lista ("vote race"): some quando o motor ativo não está nela. */
[data-engine-active="vote"] [data-engine]:not([data-engine~="vote"]), [data-engine-active="race"] [data-engine]:not([data-engine~="race"]), [data-engine-active="redlight"] [data-engine]:not([data-engine~="redlight"]) { display: none !important; }

/* ---------- Lista de jogos (/app/jogo.html sem slug) ---------- */
.steps-strip { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; counter-reset: s; }
.steps-strip li { display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: var(--ink-2); border: 1px solid var(--line-soft); border-radius: var(--r-md); min-width: 0; }
.steps-strip b { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--live); font-size: .85rem; }
.steps-strip span { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.steps-strip strong { font-size: .95rem; }
.steps-strip small { font-size: .8rem; }

.gcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); gap: 18px; }
.gcard {
  --accent: var(--live);
  display: grid; grid-template-columns: 220px 1fr; gap: 0; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-lg, 16px);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.gcard:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: 0 12px 40px -18px color-mix(in srgb, var(--accent) 60%, transparent); }
.gcard-cover { position: relative; display: block; min-height: 340px; background: #000; overflow: hidden; border-right: 1px solid var(--line-soft); }
.gcard-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .3s; }
.gcard:hover .gcard-img { transform: scale(1.04); }
.gcard-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,8,24,.55), transparent 35%); pointer-events: none; }
.gcard-badge { position: absolute; left: 10px; bottom: 10px; z-index: 1; font-size: .72rem; font-weight: 700; letter-spacing: .02em; padding: 3px 8px; border-radius: var(--r-pill); background: rgba(10,8,24,.75); color: var(--text); border: 1px solid rgba(255,255,255,.15); }
.gcard-body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px; min-width: 0; }
.gcard-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.gcard-engine { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.gcard-title { font-size: var(--step-2); margin: 2px 0 0; }
.gcard-title a { color: inherit; text-decoration: none; }
.gcard-title a:hover { color: var(--accent); }
.gcard-body > p { margin: 0; font-size: .95rem; }
.gcard-how { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; font-size: .92rem; }
.gcard-how li { display: flex; gap: 8px; align-items: baseline; }
.gcard-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line-soft); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.gcard-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gcard-soon { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 16px 20px; background: transparent; border: 1px dashed var(--line); }
.gcard-soon .gcard-title { font-size: var(--step-1); margin: 0; }
.gcard-soon p { margin: 2px 0 0; }
.gcard-soon-ico { font-size: 1.8rem; opacity: .8; flex: none; }
.gcard-soon:hover { box-shadow: none; border-color: var(--line); }

.rules-legend { margin: 0 0 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.rules-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.rules-grid li { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; background: var(--ink-2); border: 1px solid var(--line-soft); border-radius: var(--r-md); }
.rules-grid li p { margin: 0; }
.rules-grid-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rules-num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 700; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.rules-tag { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: var(--r-pill); color: var(--live); background: color-mix(in srgb, var(--live) 12%, transparent); border: 1px solid color-mix(in srgb, var(--live) 35%, transparent); }
.rules-tag.you, .rules-grid li.is-you .rules-tag { color: var(--amber); background: color-mix(in srgb, var(--amber) 12%, transparent); border-color: color-mix(in srgb, var(--amber) 35%, transparent); }
.rules-grid li.is-you { border-left: 3px solid var(--amber); }
.rules-grid li.is-auto { border-left: 3px solid var(--live); }

@media (max-width: 1100px) { .steps-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .gcard { grid-template-columns: 1fr; }
  .gcard-cover { min-height: 0; height: 260px; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .steps-strip { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .gcard, .gcard-img { transition: none; } .gcard:hover .gcard-img { transform: none; } }

/* ---------- Painel: primeiros passos ---------- */
.onboard { margin-bottom: 18px; border-color: color-mix(in srgb, var(--live) 35%, var(--line-soft)); }
.onboard .progress { margin: 4px 0 14px; }
.onboard-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.onboard-steps li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--r-md); background: var(--ink-2); border: 1px solid var(--line-soft); }
.onboard-steps li > b { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.onboard-steps li > span { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.onboard-steps li > span small { font-size: .85rem; }
.onboard-steps li > .btn { flex: none; }
.onboard-steps li.done { opacity: .6; }
.onboard-steps li.done > b { background: var(--live); border-color: var(--live); color: var(--live-ink); }
.onboard-steps li.done strong { text-decoration: line-through; text-decoration-color: var(--faint); }
.onboard-steps li.next { border-color: var(--live); background: color-mix(in srgb, var(--live) 8%, var(--ink-2)); }
.onboard-steps li.next > b { border-color: var(--live); color: var(--live); }
@media (max-width: 560px) { .onboard-steps li { flex-wrap: wrap; } .onboard-steps li > .btn { margin-left: 40px; } }

/* ---------- Configuração do jogo: abas + barra de salvar ---------- */
.cfg-tabs { display: flex; gap: 4px; padding: 4px; margin: 0 0 18px; background: var(--ink-2); border: 1px solid var(--line-soft); border-radius: var(--r-md); overflow-x: auto; scrollbar-width: none; }
.cfg-tabs::-webkit-scrollbar { display: none; }
.cfg-tabs [role=tab] { flex: 1 0 auto; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 0; border-radius: calc(var(--r-md) - 3px); background: transparent; color: var(--muted); font: 600 .95rem var(--font-body); cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.cfg-tabs [role=tab]:hover { color: var(--text); background: var(--surface-2); }
.cfg-tabs [role=tab][aria-selected=true] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--live); }
.cfg-tabs [role=tab]:focus-visible { outline: none; box-shadow: var(--focus); }
.cfg-tabs [role=tab][data-dirty]::after { content: ""; position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.cfg-pane > .cfg-intro, .cfg-pane .cfg-intro { margin: 0 0 14px; }
.cfg-pane { animation: cfgIn .18s ease-out; }
@keyframes cfgIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.save-bar { margin: 18px -22px -22px; padding: 12px 22px; border-top: 1px solid var(--line-soft); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-radius: 0 0 var(--r-lg) var(--r-lg); z-index: 5; }
.save-bar .dirty-note { display: none; }
.save-state { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); }
.save-state .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); }
.save-bar.is-dirty { border-top-color: color-mix(in srgb, var(--amber) 45%, var(--line-soft)); }
.save-bar.is-dirty .save-state { color: var(--amber); font-weight: 600; }
.save-bar.is-dirty .save-state .dot { background: var(--amber); animation: pulse 1.4s ease-in-out infinite; }
@media (max-width: 620px) { .save-bar { margin: 18px -16px -16px; padding: 10px 16px; } .save-bar #btn-save { flex: 1; } .cfg-tabs [role=tab] { padding: 0 10px; font-size: .88rem; } }
@media (prefers-reduced-motion: reduce) { .cfg-pane { animation: none; } .save-bar.is-dirty .save-state .dot { animation: none; } }

/* Opções em pílula (ex.: período no "Ativar plano" do admin) */
.chip-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip-opt { min-height: 38px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--ink-2); color: var(--text); font: 600 .9rem var(--font-body); cursor: pointer; }
.chip-opt:hover { border-color: var(--live); }
.chip-opt[aria-pressed=true] { background: color-mix(in srgb, var(--live) 16%, transparent); border-color: var(--live); color: var(--live); }
.chip-opt:focus-visible { outline: none; box-shadow: var(--focus); }

/* ---------- Assinatura ---------- */
.h-sm { font-size: var(--step-1); margin: 0 0 12px; }
.sub-hero { margin-bottom: 18px; }
.sub-hero-card {
  --tone: var(--live);
  display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 24px 26px; border-radius: var(--r-lg); border: 1px solid color-mix(in srgb, var(--tone) 35%, var(--line-soft));
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--tone) 14%, transparent), transparent 60%), var(--surface);
}
.sub-hero-card.tone-warn { --tone: var(--amber); }
.sub-hero-card.tone-bad { --tone: var(--signal); }
.sub-hero-main { flex: 1 1 380px; min-width: 0; }
.sub-hero-main h2 { font-size: var(--step-3, 2rem); margin: 10px 0 6px; line-height: 1.1; }
.sub-hero-main > p { margin: 0; max-width: 62ch; }
.days-bar { height: 8px; margin: 16px 0 4px; border-radius: var(--r-pill); background: var(--ink-2); border: 1px solid var(--line-soft); overflow: hidden; max-width: 520px; }
.days-fill { height: 100%; border-radius: inherit; background: var(--tone); transition: width .4s; }
.sub-kv { grid-template-columns: repeat(3, max-content 1fr); max-width: 720px; }
.sub-hero-cta { flex: none; }
.sub-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.sub-side { display: grid; gap: 18px; }
.sub-side .panel + .panel { margin-top: 0; }
.plan-card { border-color: color-mix(in srgb, var(--signal) 30%, var(--line-soft)); scroll-margin-top: 16px; }
.plan-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.plan-top h2 { margin: 8px 0 0; font-size: var(--step-2); }
.plan-price { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: var(--step-3, 2rem); line-height: 1; }
.plan-price span { font-size: var(--step-0, 1rem); font-weight: 500; margin-left: 2px; }
.plan-pay { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.pay-trust { text-align: center; margin: 10px 0 0; }
.pay-steps { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 12px; }
.pay-steps li { display: flex; gap: 12px; align-items: flex-start; }
.pay-steps b { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--live); font-size: .85rem; }
.pay-steps span { display: flex; flex-direction: column; gap: 2px; }
.pay-steps small { color: var(--muted); font-size: .85rem; line-height: 1.4; }
.faq-mini { border-top: 1px solid var(--line-soft); }
.faq-mini summary { cursor: pointer; padding: 10px 0; font-weight: 600; font-size: .95rem; list-style: none; display: flex; justify-content: space-between; }
.faq-mini summary::-webkit-details-marker { display: none; }
.faq-mini summary::after { content: "+"; color: var(--live); font-weight: 700; }
.faq-mini[open] summary::after { content: "–"; }
.faq-mini p { margin: 0 0 10px; }
.hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hist li { display: flex; gap: 12px; align-items: center; }
.hist-ico { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: .72rem; font-weight: 800; background: color-mix(in srgb, var(--live) 14%, transparent); color: var(--live); }
.hist-ico.grant { background: color-mix(in srgb, var(--signal) 14%, transparent); font-size: 1rem; }
.hist-main { display: flex; flex-direction: column; }
.hist-main small { font-size: .82rem; }
@media (max-width: 960px) { .sub-grid { grid-template-columns: 1fr; } .sub-kv { grid-template-columns: max-content 1fr; } }
@media (max-width: 620px) { .sub-hero-card { padding: 18px; } .sub-hero-cta, .sub-hero-cta .btn { width: 100%; } }

/* ---------- Painel (dashboard) ---------- */
.live-hero { --tone: var(--faint); position: relative; overflow: hidden; margin-bottom: 18px; border-color: color-mix(in srgb, var(--tone) 40%, var(--line-soft));
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--tone) 13%, transparent), transparent 55%), var(--surface); }
.live-hero[data-state="connected"] { --tone: var(--live); }
.live-hero[data-state="connecting"], .live-hero[data-state="waiting_live"], .live-hero[data-state="reconnecting"] { --tone: var(--amber); }
.live-hero[data-state="error"] { --tone: var(--danger); }
.lh-top { display: flex; align-items: center; gap: 18px; }
.lh-orb { flex: none; position: relative; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--tone) 14%, transparent); border: 1px solid color-mix(in srgb, var(--tone) 45%, transparent); }
.lh-orb > span { width: 18px; height: 18px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 18px color-mix(in srgb, var(--tone) 70%, transparent); }
.live-hero[data-state="connected"] .lh-orb::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 2px solid var(--tone); animation: lhRing 1.8s ease-out infinite; }
.live-hero[data-state="connecting"] .lh-orb > span, .live-hero[data-state="waiting_live"] .lh-orb > span, .live-hero[data-state="reconnecting"] .lh-orb > span { animation: pulse 1.2s ease-in-out infinite; }
@keyframes lhRing { from { transform: scale(1); opacity: .8; } to { transform: scale(1.55); opacity: 0; } }
.lh-text { flex: 1; min-width: 0; }
.lh-eyebrow { margin: 0 0 2px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-weight: 600; color: var(--muted); font-size: .9rem; }
.lh-since { color: var(--live); font-weight: 600; }
.lh-since::before { content: "· "; color: var(--faint); }
.lh-text h2 { font-size: var(--step-3); margin: 0 0 4px; color: var(--text); }
.live-hero[data-state="connected"] .lh-text h2 { color: var(--live); }
.live-hero[data-state="error"] .lh-text h2 { color: var(--danger); }
.lh-text p#live-help { margin: 0; max-width: 62ch; }
.lh-actions { flex: none; display: flex; flex-direction: column; align-items: stretch; gap: 6px; text-align: center; }
.lh-actions .btn-lg { min-width: 200px; }
.lh-help-link { font-size: var(--step--1); color: var(--muted); }
.lh-help-link:hover { color: var(--text); }
.live-hero #live-block { margin-top: 16px; }
.lh-checks { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.lh-checks a { display: flex; gap: 10px; align-items: center; height: 100%; padding: 10px 12px; border-radius: var(--r-md); background: var(--ink-2); border: 1px solid var(--line-soft); color: var(--text); text-decoration: none; transition: border-color .15s, background .15s; }
.lh-checks a:hover { border-color: var(--line); background: var(--surface-2); color: var(--text); }
.lh-checks a > span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.lh-checks small { font-size: .75rem; color: var(--muted); }
.lh-checks b { font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lh-check-ico { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 800; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.lh-checks .ok .lh-check-ico { background: color-mix(in srgb, var(--live) 18%, transparent); border-color: color-mix(in srgb, var(--live) 50%, transparent); color: var(--live); }
.lh-checks .todo a { border-color: color-mix(in srgb, var(--amber) 45%, var(--line-soft)); }
.lh-checks .todo .lh-check-ico { background: color-mix(in srgb, var(--amber) 18%, transparent); border-color: color-mix(in srgb, var(--amber) 55%, transparent); color: var(--amber); }
.lh-checks .todo b { color: var(--amber); }
.lh-euler { margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: .78rem; color: var(--faint); }
.lh-meter { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.lh-meter i { display: inline-block; width: 54px; height: 5px; border-radius: var(--r-pill); background: var(--line-soft); overflow: hidden; }
.lh-meter i span { display: block; height: 100%; background: var(--faint); border-radius: inherit; }
.lh-meter.is-high { color: var(--amber); }
.lh-meter.is-high i span { background: var(--amber); }
@media (max-width: 720px) {
  .lh-top { flex-wrap: wrap; }
  .lh-orb { width: 44px; height: 44px; }
  .lh-text { flex-basis: calc(100% - 64px); }
  .lh-actions { width: 100%; }
  .lh-actions .btn-lg { width: 100%; }
}

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.kpi { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-soft); }
.kpi-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; background: var(--ink-2); border: 1px solid var(--line-soft); }
.kpi > span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.kpi b { font-family: var(--font-display); font-size: var(--step-2); font-variant-numeric: tabular-nums; }
.kpi-label { font-size: .88rem; font-weight: 600; }
.kpi small { font-size: .74rem; color: var(--faint); }
@media (max-width: 860px) { .kpis { grid-template-columns: repeat(2, 1fr); } }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.dash-grid > .panel + .panel { margin-top: 0; }
@media (max-width: 1080px) { .dash-grid { grid-template-columns: 1fr; } }
.dgames { display: grid; gap: 12px; }
.dgame { display: flex; gap: 14px; padding: 12px; border-radius: var(--r-md); background: var(--ink-2); border: 1px solid var(--line-soft); transition: border-color .2s; }
.dgame.is-on { border-color: color-mix(in srgb, var(--live) 45%, var(--line-soft)); }
.dgame-cover { flex: none; width: 72px; aspect-ratio: 9 / 16; border-radius: var(--r-sm); overflow: hidden; background: #000; align-self: flex-start; }
.dgame-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.dgame-cover:hover img { transform: scale(1.06); }
.dgame-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.dgame-head { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.dgame-title { min-width: 0; }
.dgame-tag { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dgame[data-engine="vote"] .dgame-tag { color: var(--signal); }
.dgame[data-engine="race"] .dgame-tag { color: var(--live); }
.dgame[data-engine="redlight"] .dgame-tag { color: var(--amber); }
.dgame-title h3 { margin: 0; font-size: var(--step-1); }
.dgame-title h3 a { color: inherit; text-decoration: none; }
.dgame-title h3 a:hover { color: var(--live); }
.dgame-switch { font-weight: 600; }
.dgame-switch .pill { font-size: .75rem; }
.dgame-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; }
.dgame-round { font-size: .82rem; color: var(--muted); }
.dgame-round[data-tone="run"] { color: var(--live); font-weight: 600; }
.dgame-round[data-tone="run"]::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 6px; animation: pulse 1.4s ease-in-out infinite; vertical-align: 1px; }
.dgame-wins { display: flex; flex-wrap: wrap; gap: 6px; }
.dgame-win { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; padding: 2px 8px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); font-variant-numeric: tabular-nums; }
.dgame-win i { width: 7px; height: 7px; border-radius: 50%; }
.dgame-board .tug-names { font-size: 1rem; }
.dgame-board .tug-bar { height: 28px; }
.dgame-board .lane-head b { font-size: 1rem; }
.dgame-foot { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 520px) { .dgame-cover { width: 56px; } }

.feed-panel .feed { max-height: 520px; min-height: 160px; align-content: start; }
.feed-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 12px; }
.feed-filter button { font: inherit; font-size: .8rem; font-weight: 600; padding: 4px 12px; border-radius: var(--r-pill); border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.feed-filter button:hover { color: var(--text); border-color: var(--faint); }
.feed-filter button[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--ink); }
.feed-filter button:focus-visible { outline: none; box-shadow: var(--focus); }
.feed:not([data-filter="all"]) li[data-type] { display: none; }
.feed[data-filter="chat"] li[data-type="chat"], .feed[data-filter="like"] li[data-type="like"],
.feed[data-filter="follow"] li[data-type="follow"], .feed[data-filter="gift"] li[data-type="gift"] { display: flex; }
.feed li.feed-empty { display: flex; gap: 14px; align-items: center; padding: 28px 16px; background: transparent; border: 1px dashed var(--line); justify-content: center; text-align: left; }
.feed-empty-ico { font-size: 1.6rem; opacity: .8; }
.feed-empty > span:last-child { display: flex; flex-direction: column; gap: 2px; max-width: 46ch; }
.lh-block { margin: 0; font-size: .8rem; font-weight: 600; color: var(--amber); }
.lh-retry { display: block; margin-top: 6px; font-size: .8rem; }
.lh-retry[hidden] { display: none; }
.dgame-wins-lbl { font-size: .72rem; color: var(--faint); align-self: center; }

/* ---------- Conexão TikTok ---------- */
.cx-progress { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; counter-reset: none; }
.cx-progress li { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line-soft); color: var(--muted); font-weight: 600; font-size: .92rem; }
.cx-progress li b { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; background: var(--surface-2); border: 1px solid var(--line); }
.cx-progress li.next { color: var(--text); border-color: var(--live); background: color-mix(in srgb, var(--live) 8%, var(--surface)); }
.cx-progress li.next b { border-color: var(--live); color: var(--live); }
.cx-progress li.done { color: var(--text); }
.cx-progress li.done b { background: var(--live); border-color: var(--live); color: var(--live-ink); font-size: 0; }
.cx-progress li.done b::after { content: "✓"; font-size: .8rem; }
@media (max-width: 640px) { .cx-progress li span { font-size: .78rem; } .cx-progress li { padding: 8px 10px; gap: 8px; } }

.cx-step { transition: border-color .2s, opacity .2s; }
.cx-step.is-done { border-color: color-mix(in srgb, var(--live) 30%, var(--line-soft)); }
.cx-step.is-locked { opacity: .72; }
.cx-step.is-flag { border-color: var(--amber); box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 20%, transparent); }
.cx-step-head { display: flex; gap: 14px; align-items: flex-start; }
.cx-num { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.cx-step.is-done .cx-num { background: color-mix(in srgb, var(--live) 16%, transparent); border-color: color-mix(in srgb, var(--live) 50%, transparent); color: var(--live); }
.cx-step-title { flex: 1; min-width: 0; }
.cx-step-title h2 { font-size: var(--step-2); margin: 2px 0 4px; }
.cx-step-title p { margin: 0; max-width: 64ch; }
.cx-step-body { margin-top: 16px; padding-left: 50px; }
@media (max-width: 640px) { .cx-step-body { padding-left: 0; } }
.cx-step-body .field { margin-bottom: 8px; }
.cx-preview { margin: 6px 0 0; font-size: .85rem; color: var(--muted); }
.cx-preview.ok { color: var(--live); }
.cx-preview.bad { color: var(--amber); }

.cx-saved { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--ink-2); border: 1px solid var(--line-soft); }
.cx-avatar { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; color: #fff; background: linear-gradient(135deg, var(--signal), #7c3aed 60%, var(--live)); }
.cx-avatar.cx-key { background: var(--surface-2); border: 1px solid var(--line); font-size: 1.05rem; }
.cx-saved-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.cx-saved-text b { font-size: 1.05rem; overflow-wrap: anywhere; }
.cx-saved-text small { font-size: .8rem; }
.cx-danger { color: var(--danger); }
.cx-danger:hover { color: var(--danger); }

.cx-guide { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.cx-guide li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--r-md); background: var(--ink-2); border: 1px solid var(--line-soft); }
.cx-guide li > b { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.cx-guide li > span { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.cx-guide li > span small { font-size: .82rem; }
.cx-guide li > .btn { flex: none; }
@media (max-width: 560px) { .cx-guide li { flex-wrap: wrap; } .cx-guide li > .btn { margin-left: 38px; } }

.cx-ready { --tone: var(--amber); margin-top: 18px; border-color: color-mix(in srgb, var(--tone) 40%, var(--line-soft));
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--tone) 12%, transparent), transparent 55%), var(--surface); }
.cx-ready[data-ready="yes"], .cx-ready[data-ready="live"] { --tone: var(--live); }
.cx-ready[data-ready="error"] { --tone: var(--danger); }
.cx-ready[data-ready="live"] .lh-orb::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 2px solid var(--tone); animation: lhRing 1.8s ease-out infinite; }
.cx-ready-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cx-ready-text { flex: 1; min-width: 220px; }
.cx-ready-text h2 { font-size: var(--step-2); margin: 0 0 4px; }
.cx-ready-text p { margin: 0; }
.cx-checks { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.cx-checks li > a, .cx-checks li > span { display: flex; gap: 10px; align-items: center; height: 100%; padding: 10px 12px; border-radius: var(--r-md); background: var(--ink-2); border: 1px solid var(--line-soft); color: var(--text); text-decoration: none; }
.cx-checks li > a:hover { border-color: var(--line); background: var(--surface-2); color: var(--text); }
.cx-checks li > * > span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.cx-checks small { font-size: .75rem; color: var(--muted); }
.cx-checks b { font-size: .92rem; }
.cx-checks .ok .lh-check-ico { background: color-mix(in srgb, var(--live) 18%, transparent); border-color: color-mix(in srgb, var(--live) 50%, transparent); color: var(--live); }
.cx-checks .todo > * { border-color: color-mix(in srgb, var(--amber) 45%, var(--line-soft)); }
.cx-checks .todo .lh-check-ico { background: color-mix(in srgb, var(--amber) 18%, transparent); border-color: color-mix(in srgb, var(--amber) 55%, transparent); color: var(--amber); }
.cx-checks .todo b { color: var(--amber); }
.cx-limits { margin-top: 14px; font-size: .9rem; }
.cx-limits summary { cursor: pointer; color: var(--muted); font-size: .85rem; font-weight: 600; }
.cx-limits summary:hover { color: var(--text); }
.cx-limits p { margin: 8px 0 0; }
@media (max-width: 640px) { .cx-ready-top .btn-lg { width: 100%; } }

/* ---------- Overlay ---------- */
.ov-strip { margin-bottom: 18px; }
.ov-cards { display: grid; gap: 18px; }
.ov-card { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 22px; align-items: start; transition: border-color .2s; }
.ov-card.is-open { border-color: color-mix(in srgb, var(--live) 45%, var(--line-soft)); }
.ov-card + .ov-card { margin-top: 0; }
.ov-preview { max-width: none; margin: 0; }
.ov-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.ov-play { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: inline-flex; gap: 6px; align-items: center; white-space: nowrap;
  font: inherit; font-size: .78rem; font-weight: 700; padding: 7px 12px; border-radius: var(--r-pill); border: 1px solid rgba(255,255,255,.25); background: rgba(10,8,24,.8); color: #fff; cursor: pointer; }
.ov-play:hover { background: var(--signal); border-color: var(--signal); }
.ov-play:focus-visible { outline: none; box-shadow: var(--focus); }
.ov-preview-tag { position: absolute; left: 8px; top: 8px; font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: var(--r-pill); background: rgba(10,8,24,.75); color: var(--muted); }
.ov-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ov-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.ov-head h2 { margin: 2px 0 0; font-size: var(--step-2); }
.ov-card[data-engine="vote"] .dgame-tag { color: var(--signal); }
.ov-card[data-engine="race"] .dgame-tag { color: var(--live); }
.ov-card[data-engine="redlight"] .dgame-tag { color: var(--amber); }
.ov-open { font-size: .85rem; padding: 5px 12px; }
.ov-open-help { margin: -8px 0 0; }
.ov-link { display: flex; gap: 8px; align-items: stretch; }
.ov-url { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 14px; border-radius: var(--r-md); background: var(--ink-2); border: 1px solid var(--line); }
.ov-url-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, Menlo, monospace; font-size: .8rem; color: var(--muted); }
.ov-copy { flex: none; min-width: 150px; }
.ov-dims { display: flex; flex-wrap: wrap; gap: 8px; }
.ov-dim { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.2; padding: 6px 12px; border-radius: var(--r-md); background: var(--ink-2); border: 1px solid var(--line-soft); color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.ov-dim:hover { border-color: var(--line); background: var(--surface-2); }
.ov-dim:focus-visible { outline: none; box-shadow: var(--focus); }
.ov-dim small { font-size: .7rem; color: var(--muted); }
.ov-dim b { font-variant-numeric: tabular-nums; font-size: .95rem; }
.ov-dim-static { cursor: default; }
.ov-dim-static:hover { border-color: var(--line-soft); background: var(--ink-2); }
.ov-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ov-safe { margin: 0; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.ov-rotate { font: inherit; font-weight: 600; background: none; border: 0; padding: 0; color: var(--danger); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.ov-rotate:hover { color: #ff8a8d; }
.ov-rotate:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
@media (max-width: 760px) {
  .ov-card { grid-template-columns: 1fr; }
  .ov-preview { max-width: 220px; margin: 0 auto; }
  .ov-link { flex-direction: column; }
  .ov-copy { width: 100%; }
}

.ov-tabs { display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: var(--ink-2); border: 1px solid var(--line-soft); }
.ov-tabs button { font: inherit; font-size: .85rem; font-weight: 600; padding: 6px 14px; border-radius: var(--r-pill); border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.ov-tabs button[aria-selected="true"] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.ov-tabs button:focus-visible { outline: none; box-shadow: var(--focus); }
.ov-howto { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.ov-howto li { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--r-md); background: var(--ink-2); border: 1px solid var(--line-soft); font-size: .92rem; line-height: 1.4; }
.ov-howto li > b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; background: color-mix(in srgb, var(--signal) 16%, transparent); color: var(--signal); border: 1px solid color-mix(in srgb, var(--signal) 45%, transparent); }
.ov-faq-title { font-size: var(--step-1); margin: 24px 0 10px; }
.ov-faq { display: grid; gap: 6px; }
.ov-faq details { border-radius: var(--r-md); background: var(--ink-2); border: 1px solid var(--line-soft); padding: 0 14px; }
.ov-faq details[open] { border-color: var(--line); }
.ov-faq summary { cursor: pointer; padding: 11px 0; font-weight: 600; font-size: .93rem; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.ov-faq summary::-webkit-details-marker { display: none; }
.ov-faq summary::after { content: "+"; color: var(--muted); font-weight: 700; }
.ov-faq details[open] summary::after { content: "–"; }
.ov-faq details p { margin: 0 0 12px; }

/* ---------- Tutorial ---------- */
.tut-hero { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; border-color: color-mix(in srgb, var(--signal) 35%, var(--line-soft));
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--signal) 12%, transparent), transparent 55%), var(--surface); }
.tut-hero.all-done { border-color: color-mix(in srgb, var(--live) 45%, var(--line-soft)); background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--live) 12%, transparent), transparent 55%), var(--surface); }
.tut-ring { position: relative; flex: none; width: 76px; height: 76px; }
.tut-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.tut-ring circle { fill: none; stroke-width: 6; }
.tut-ring .bg { stroke: var(--line-soft); }
.tut-ring .fg { stroke: var(--live); stroke-linecap: round; transition: stroke-dashoffset .5s cubic-bezier(.2, .8, .2, 1); }
.tut-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.tut-hero-text { flex: 1; min-width: 220px; }
.tut-eyebrow { margin: 0 0 2px; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--signal); }
.tut-hero.all-done .tut-eyebrow { color: var(--live); }
.tut-hero-text h2 { font-size: var(--step-3); margin: 0 0 4px; }
.tut-hero-text p { margin: 0; max-width: 60ch; }
.tut-hero-actions { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
@media (max-width: 640px) { .tut-hero-actions { width: 100%; } }

.tut-index li.next a { color: var(--text); background: color-mix(in srgb, var(--signal) 10%, transparent); }
.tut-index li.next a::before { border-color: var(--signal); color: var(--signal); }
.tut-index { margin-top: 0; }
.tut-help-link { display: block; margin-top: 12px; padding: 8px; font-size: .88rem; color: var(--muted); }

.step { padding: 0; overflow: hidden; transition: border-color .2s; }
.step + .step { margin-top: 10px; }
.step-head { padding: 18px 22px; cursor: pointer; align-items: center; }
.step-head:hover { background: color-mix(in srgb, var(--surface-2) 50%, transparent); }
.step-head > div:not(.step-meta) { flex: 1; min-width: 0; }
.step-head h2 { font-size: var(--step-1); margin: 0 0 2px; }
.step-head p { margin: 0; font-size: .92rem; }
.step-num { font-size: 1rem; line-height: 1; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); min-width: 0; }
.step.is-next .step-num { background: color-mix(in srgb, var(--signal) 16%, transparent); border-color: color-mix(in srgb, var(--signal) 55%, transparent); color: var(--signal); }
.step.done .step-num { background: color-mix(in srgb, var(--live) 16%, transparent); border-color: color-mix(in srgb, var(--live) 50%, transparent); color: var(--live); font-size: 0; }
.step.done .step-num::after { content: "✓"; font-size: 1rem; }
.step.is-next { border-color: color-mix(in srgb, var(--signal) 45%, var(--line-soft)); }
.step.done:not(.is-open) .step-head h2 { color: var(--muted); }
.step-meta { flex: none; display: flex; align-items: center; gap: 8px; }
.step-state { font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--muted); }
.step-state.ok { color: var(--live); border-color: color-mix(in srgb, var(--live) 45%, transparent); background: color-mix(in srgb, var(--live) 10%, transparent); }
.step-state.next { color: var(--signal); border-color: color-mix(in srgb, var(--signal) 45%, transparent); background: color-mix(in srgb, var(--signal) 10%, transparent); }
.step-time { font-size: .75rem; color: var(--faint); white-space: nowrap; }
.step-toggle { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-soft); background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.step-toggle::before { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
.step.is-open .step-toggle::before { transform: translateY(2px) rotate(-135deg); }
.step-toggle:focus-visible { outline: none; box-shadow: var(--focus); }
.step-body { display: none; padding: 4px 22px 18px 72px; }
.step.is-open .step-body { display: block; animation: cfgIn .2s ease-out; }
.step-body > * { max-width: 78ch; }
.step-body h3 { font-size: 1rem; margin: 0 0 6px; }
.step-check { max-width: none; }
.step-cta { flex: none; }
@media (max-width: 640px) {
  .step-head { padding: 14px 16px; flex-wrap: wrap; }
  .step-meta { width: 100%; padding-left: 50px; }
  .step-body { padding: 4px 16px 16px; }
  .step-time { display: none; }
}
.tut-substeps { list-style: none; padding: 0 !important; display: grid; gap: 8px; }
.tut-substeps li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-md); background: var(--ink-2); border: 1px solid var(--line-soft); }
.tut-substeps li > b { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.tut-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.tut-cols > div { padding: 14px; border-radius: var(--r-md); background: var(--ink-2); border: 1px solid var(--line-soft); }
.tut-cols ol { margin: 0; }
.tut-rule p { margin: 0; }
.tut-more { margin-top: 12px; }
.tut-more summary { cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--muted); }
.tut-more p { margin: 6px 0 0; }
.tut-search { max-width: 280px; }
#problemas { scroll-margin-top: 20px; }
