/* Boss Games — folha de estilo unica.
   Todas as cores ficam nas variaveis abaixo: para um reskin completo,
   altere apenas o bloco :root (e o [data-theme="dark"] logo em seguida). */

:root {
  /* superficies */
  --bg: #f4f6fb;
  --bg-soft: #eaeefa;
  --surface: #ffffff;
  --surface-2: #f7f9fd;
  --border: #dfe4f2;
  --border-strong: #c6cee6;

  /* texto */
  --text: #151a2d;
  --text-soft: #4d5677;
  --text-mute: #79819e;

  /* marca */
  --brand: #4f46e5;
  --brand-strong: #3d33d8;
  --brand-soft: #eceafe;
  --accent: #f0356e;
  --accent-soft: #ffe7ee;
  --gold: #f5a524;
  --mint: #10b981;
  --sky: #0ea5e9;

  /* estado */
  --ok: #0f9d63;
  --ok-soft: #e3f8ee;
  --warn: #b4600a;
  --warn-soft: #fdf0dc;
  --danger: #d92c4b;

  /* cores usadas pelos jogos (lidas tambem pelo JS via getComputedStyle) */
  --tile-1: #ede9fe;
  --tile-2: #ddd6fe;
  --tile-3: #c4b5fd;
  --tile-4: #a78bfa;
  --tile-5: #8b5cf6;
  --tile-6: #7c3aed;
  --tile-7: #f0356e;
  --tile-8: #f5a524;
  --board: #e6eaf6;
  --board-line: #cdd5ea;

  /* forma e ritmo */
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(21, 26, 45, .06), 0 8px 24px rgba(21, 26, 45, .06);
  --shadow-lg: 0 18px 50px rgba(21, 26, 45, .14);
  --ring: 0 0 0 3px rgba(79, 70, 229, .32);
  --max: 1180px;
  --gap: 22px;

  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  --bg: #10131f;
  --bg-soft: #161b2b;
  --surface: #1a1f31;
  --surface-2: #202741;
  --border: #2b3350;
  --border-strong: #3b4569;

  --text: #eef1fb;
  --text-soft: #b7c0dc;
  --text-mute: #8b95b7;

  --brand: #8b83ff;
  --brand-strong: #a79fff;
  --brand-soft: #262a4d;
  --accent: #ff5c86;
  --accent-soft: #3a1f2d;
  --gold: #ffc247;
  --mint: #34d399;
  --sky: #38bdf8;

  --ok: #34d399;
  --ok-soft: #17362c;
  --warn: #ffc247;
  --warn-soft: #372a13;
  --danger: #ff6b83;

  --tile-1: #2a2f4d;
  --tile-2: #343a63;
  --tile-3: #43478a;
  --tile-4: #5b56ad;
  --tile-5: #7a6fd6;
  --tile-6: #9a8bff;
  --tile-7: #ff5c86;
  --tile-8: #ffc247;
  --board: #222842;
  --board-line: #333b5c;

  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px rgba(0, 0, 0, .38);
  --shadow-lg: 0 22px 60px rgba(0, 0, 0, .5);
  --ring: 0 0 0 3px rgba(139, 131, 255, .4);
}

/* ---------------------------------------------------------------- base ---- */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 460px;
  background:
    radial-gradient(60% 100% at 12% 0%, rgba(79, 70, 229, .16), transparent 70%),
    radial-gradient(50% 100% at 88% 6%, rgba(240, 53, 110, .13), transparent 72%);
  pointer-events: none;
  z-index: 0;
}

img, svg, canvas { max-width: 100%; }
canvas { display: block; touch-action: none; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-strong); text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.22; margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: clamp(1.85rem, 1.3rem + 2.2vw, 2.85rem); }
h2 { font-size: clamp(1.4rem, 1.15rem + 1.1vw, 1.85rem); }
h3 { font-size: 1.18rem; }
p { margin: 0 0 1.05em; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 60;
  background: var(--surface);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.skip:focus { left: 12px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; position: relative; z-index: 1; }
.narrow { max-width: 760px; }

/* ------------------------------------------------------------- topbar ---- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.bar {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.06rem;
  color: var(--text);
  letter-spacing: -.02em;
}
.brand:hover { text-decoration: none; color: var(--text); }
.brand .logo { width: 32px; height: 32px; flex: none; border-radius: 9px; }
.brand small {
  display: block;
  font-weight: 500;
  font-size: .705rem;
  color: var(--text-mute);
  letter-spacing: 0;
  line-height: 1.3;
}

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--text-soft);
  font-size: .94rem;
  font-weight: 600;
}
.nav a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-strong); }

.icon-btn {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  border-radius: 11px;
  cursor: pointer;
  padding: 0;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn svg { width: 19px; height: 19px; }
.burger { display: none; }

[data-theme="dark"] .sun, .moon { display: none; }
[data-theme="dark"] .moon { display: block; }

@media (max-width: 860px) {
  .burger { display: grid; }
  .brand small { display: none; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 16px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 11px 14px; border-radius: var(--radius-sm); }
}

/* --------------------------------------------------------------- hero ---- */

main { flex: 1 0 auto; position: relative; z-index: 1; }

.hero { padding: 52px 0 30px; }
.hero p.lede { font-size: 1.13rem; color: var(--text-soft); max-width: 62ch; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--brand-strong);
  background: var(--brand-soft);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: .96rem;
  cursor: pointer;
}
.btn:hover { background: var(--brand-strong); color: #fff; text-decoration: none; }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.small { padding: 8px 15px; font-size: .88rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* -------------------------------------------------------------- cards ---- */

section { padding: 30px 0; }
.section-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; }
.section-head p { margin: 4px 0 0; color: var(--text-soft); font-size: .97rem; }
.section-head .count { margin-left: auto; color: var(--text-mute); font-size: .88rem; white-space: nowrap; }

.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: inherit;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
a.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
  text-decoration: none;
  color: inherit;
}
.card h3 { margin: 0; font-size: 1.08rem; }
.card p { margin: 0; color: var(--text-soft); font-size: .93rem; line-height: 1.55; }
.card .thumb {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 1.35rem;
  font-weight: 800;
}
.card .meta { margin-top: auto; padding-top: 6px; color: var(--text-mute); font-size: .82rem; }

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: .76rem;
  font-weight: 600;
}
.tag.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.tag.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }

/* --------------------------------------------------------------- game ---- */

.stage {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
  margin: 0 0 26px;
}
.stage-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.stage-head .spacer { margin-left: auto; }

.scores { display: flex; flex-wrap: wrap; gap: 10px; }
.score {
  min-width: 84px;
  padding: 8px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
}
.score b { display: block; font-size: 1.22rem; font-variant-numeric: tabular-nums; line-height: 1.2; }
.score span { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-mute); }

.board-wrap { display: flex; justify-content: center; }
.status {
  min-height: 1.6em;
  margin: 14px 0 0;
  text-align: center;
  font-weight: 600;
  color: var(--text-soft);
}
.status.win { color: var(--ok); }
.status.lose { color: var(--danger); }

.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; margin-top: 16px; }
.controls label { font-size: .9rem; color: var(--text-soft); font-weight: 600; }

select, input[type="text"], input[type="email"], input[type="number"], textarea {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  width: 100%;
}
select { cursor: pointer; }
textarea { resize: vertical; min-height: 150px; }

.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.seg button {
  border: 0;
  background: none;
  font: inherit;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-soft);
  padding: 6px 15px;
  border-radius: 999px;
  cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--brand); color: #fff; }

.hint { color: var(--text-mute); font-size: .86rem; text-align: center; margin: 10px 0 0; }
.keys { font-family: var(--mono); font-size: .82em; background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; }

/* -------------------------------------------------------------- prose ---- */

.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.7em; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.15em; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--brand); }
.prose strong { color: var(--text); }

.byline { color: var(--text-mute); font-size: .88rem; margin: -4px 0 22px; }

.breadcrumb { font-size: .87rem; color: var(--text-mute); padding: 22px 0 0; }
.breadcrumb a { color: var(--text-soft); }

.callout {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
  padding: 15px 18px;
  margin: 0 0 1.3em;
  font-size: .95rem;
  color: var(--text-soft);
}
.callout.estimate { border-left-color: var(--gold); }
.callout p:last-child { margin-bottom: 0; }

.faq { margin: 1.4em 0; }
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 0 16px;
  margin-bottom: 10px;
}
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--brand); font-weight: 700; }
.faq details[open] summary::after { content: "\2013"; }
.faq details > p:last-child { margin-bottom: 14px; }

table { width: 100%; border-collapse: collapse; margin: 0 0 1.3em; font-size: .94rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--text-mute); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }

.next-read { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--border); }

/* --------------------------------------------------------------- form ---- */

.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: .92rem; }
.field .help { color: var(--text-mute); font-size: .83rem; }
.field.full { grid-column: 1 / -1; }

.notice { padding: 14px 16px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: .95rem; }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.notice.bad { background: var(--accent-soft); color: var(--danger); }

/* ------------------------------------------------------------- footer ---- */

.footer {
  margin-top: 56px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 40px 0 28px;
  font-size: .92rem;
  color: var(--text-soft);
  position: relative;
  z-index: 1;
}
.footer h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; color: var(--text-mute); margin-bottom: 12px; }
.footer .cols { display: grid; gap: 28px; grid-template-columns: 1.4fr repeat(3, 1fr); }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 8px; }
.footer a { color: var(--text-soft); }
.footer a:hover { color: var(--brand); }
.footer .legal {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  font-size: .86rem;
  color: var(--text-mute);
}
.footer .legal .sep { margin-left: auto; }
.disclaimer { margin: 14px 0 0; font-size: .84rem; color: var(--text-mute); max-width: 90ch; }

@media (max-width: 760px) {
  .footer .cols { grid-template-columns: 1fr 1fr; }
  .hero { padding: 34px 0 22px; }
  body { font-size: 16.5px; }
  .stage { padding: 15px; border-radius: var(--radius); }
}

/* --------------------------------------------------- jogos: 2048 ------- */

.g2048 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  width: min(420px, 100%);
  aspect-ratio: 1 / 1;
  padding: 9px;
  background: var(--board);
  border-radius: var(--radius);
  outline: none;
}
.g2048 .tile {
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: clamp(1.1rem, 4.6vw, 1.9rem);
  font-variant-numeric: tabular-nums;
  color: var(--text);
  transition: background-color .11s ease, color .11s ease;
}
.g2048 .tile.small { font-size: clamp(.95rem, 3.7vw, 1.5rem); }
.g2048 .tile.tiny { font-size: clamp(.8rem, 3vw, 1.15rem); }
.g2048 .tile.v2 { background: var(--tile-1); }
.g2048 .tile.v4 { background: var(--tile-2); }
.g2048 .tile.v8 { background: var(--tile-3); }
.g2048 .tile.v16 { background: var(--tile-4); color: #fff; }
.g2048 .tile.v32 { background: var(--tile-5); color: #fff; }
.g2048 .tile.v64 { background: var(--tile-6); color: #fff; }
.g2048 .tile.v128 { background: var(--sky); color: #fff; }
.g2048 .tile.v256 { background: var(--mint); color: #fff; }
.g2048 .tile.v512 { background: var(--tile-8); color: #23201a; }
.g2048 .tile.v1024 { background: var(--tile-7); color: #fff; }
.g2048 .tile.v2048,
.g2048 .tile.v4096 { background: var(--text); color: var(--bg); }
.g2048 .tile.pop { animation: pop .16s ease-out; }

@keyframes pop { from { transform: scale(.6); } to { transform: scale(1); } }

/* ----------------------------------------------- jogos: minesweeper ---- */

.ms-board {
  display: grid;
  gap: 3px;
  padding: 8px;
  background: var(--board);
  border-radius: var(--radius-sm);
  max-width: 100%;
  overflow: auto;
}
.ms-cell {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 5px;
  background: var(--border-strong);
  font: inherit;
  font-weight: 800;
  font-size: .92rem;
  line-height: 1;
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  user-select: none;
}
.ms-cell:hover:not(.open) { background: var(--brand-soft); }
.ms-cell.open { background: var(--surface-2); cursor: default; }
.ms-cell.flag { background: var(--warn-soft); }
.ms-cell.boom { background: var(--accent); color: #fff; }
.ms-cell.n1 { color: var(--sky); }
.ms-cell.n2 { color: var(--ok); }
.ms-cell.n3 { color: var(--accent); }
.ms-cell.n4 { color: var(--brand); }
.ms-cell.n5 { color: var(--warn); }
.ms-cell.n6 { color: #0d9488; }
.ms-cell.n7 { color: var(--text); }
.ms-cell.n8 { color: var(--text-mute); }

@media (max-width: 560px) {
  .ms-cell { width: 26px; height: 26px; font-size: .84rem; }
}

/* --------------------------------------------------- jogos: sudoku ----- */

.sudoku {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  width: min(460px, 100%);
  aspect-ratio: 1 / 1;
  background: var(--board-line);
  border: 2px solid var(--text-soft);
  border-radius: 8px;
  overflow: hidden;
}
.sd-cell {
  border: 0;
  background: var(--surface);
  color: var(--brand);
  font: inherit;
  font-weight: 700;
  font-size: clamp(.95rem, 3.4vw, 1.35rem);
  text-align: center;
  padding: 0;
  outline: none;
  border-right: 1px solid var(--board-line);
  border-bottom: 1px solid var(--board-line);
  -moz-appearance: textfield;
}
.sd-cell::-webkit-outer-spin-button,
.sd-cell::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sd-cell:focus { background: var(--brand-soft); }
.sd-cell.fixed { color: var(--text); background: var(--surface-2); font-weight: 800; }
.sd-cell.bad { background: var(--accent-soft); color: var(--danger); }
.sd-cell.col3 { border-right: 2px solid var(--text-soft); }
.sd-cell.row3 { border-bottom: 2px solid var(--text-soft); }

/* -------------------------------------------- jogos: sliding puzzle ---- */

.slide-board {
  display: grid;
  gap: 7px;
  width: min(420px, 100%);
  aspect-ratio: 1 / 1;
  padding: 7px;
  background: var(--board);
  border-radius: var(--radius);
}
.sl-tile {
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: clamp(1rem, 4vw, 1.6rem);
  cursor: pointer;
  padding: 0;
  transition: transform .08s ease;
}
.sl-tile:hover { transform: scale(1.03); }
.sl-tile.blank { background: transparent; cursor: default; }
.sl-tile.blank:hover { transform: none; }
.sl-tile.home { background: var(--mint); }

/* --------------------------------------------- jogos: memory match ---- */

.mem-grid { display: grid; gap: 10px; width: min(520px, 100%); }
.mem-card {
  position: relative;
  aspect-ratio: 3 / 4;
  border: 0;
  padding: 0;
  border-radius: var(--radius-sm);
  background: var(--brand);
  cursor: pointer;
  font-size: clamp(1.3rem, 5vw, 2rem);
  display: grid;
  place-items: center;
  color: transparent;
}
.mem-card::after {
  content: "?";
  position: absolute;
  color: rgba(255, 255, 255, .7);
  font-weight: 800;
  font-size: 1.2rem;
}
.mem-card.up, .mem-card.done { background: var(--surface-2); color: var(--text); }
.mem-card.up::after, .mem-card.done::after { content: none; }
.mem-card.done { background: var(--ok-soft); cursor: default; opacity: .75; }

/* -------------------------------------------------- jogos: simon ------ */

.simon {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: min(360px, 100%);
  aspect-ratio: 1 / 1;
}
.simon-pad {
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  opacity: .45;
  transition: opacity .1s ease, transform .1s ease;
}
.simon-pad.lit, .simon-pad:active { opacity: 1; transform: scale(1.02); }
.simon-pad[data-pad="0"] { background: var(--mint); }
.simon-pad[data-pad="1"] { background: var(--accent); }
.simon-pad[data-pad="2"] { background: var(--sky); }
.simon-pad[data-pad="3"] { background: var(--gold); }

/* -------------------------------------------- jogos: connect four ----- */

.c4-wrap { display: inline-block; max-width: 100%; }
.c4-drop { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.c4-drop button {
  border: 1px dashed var(--border-strong);
  background: var(--surface-2);
  color: var(--text-soft);
  border-radius: 7px;
  padding: 4px 0;
  font: inherit;
  font-size: .8rem;
  cursor: pointer;
}
.c4-drop button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.c4-drop button:disabled { opacity: .35; cursor: not-allowed; }
.c4 {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 8px;
  background: var(--brand);
  border-radius: var(--radius);
  width: min(440px, 100%);
}
.c4 .slot { aspect-ratio: 1 / 1; border-radius: 50%; background: var(--bg); }
.c4 .slot.p1 { background: var(--accent); }
.c4 .slot.p2 { background: var(--gold); }
.c4 .slot.line { box-shadow: 0 0 0 3px var(--text) inset; }

/* ------------------------------------------- jogos: reaction time ----- */

.rt-pad {
  width: 100%;
  min-height: 260px;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
}
.rt-pad.wait { background: var(--warn-soft); color: var(--warn); }
.rt-pad.go { background: var(--ok); color: #fff; }
.rt-pad.early { background: var(--accent-soft); color: var(--danger); }
.rt-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.rt-list span {
  padding: 5px 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  font-size: .88rem;
}

/* --------------------------------------------------- canvas frames ---- */

.canvas-frame {
  background: var(--board);
  border-radius: var(--radius);
  padding: 8px;
  display: inline-block;
  max-width: 100%;
}
.canvas-frame canvas { border-radius: var(--radius-sm); width: 100%; height: auto; }

/* ------------------------------------------------------- utilitarios ---- */

.center { text-align: center; }
.mt0 { margin-top: 0; }
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}
