/* Deep Dig — wiki dos jogadores (wiki.html, wiki-pt.html, wiki-es.html): mesmas cores e peças do jogo (style.css), numa página de leitura */
:root {
  --ink: #16111d; --bg: #0b0814; --panel: #221a33; --panel-hi: #34284c; --panel-lo: #150f22;
  --text: #f3e9d2; --muted: #a596bd; --gold: #ffd54a; --gold-d: #b9800f;
  --purple: #8a45c4; --purple-d: #4a2270; --blue: #3f78c2; --blue-d: #264b80; --red: #c4453a; --red-d: #7a2420;
  --up: #6ee88a; --down: #ff6b5a;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
body { margin: 0; background: radial-gradient(ellipse at 50% 0%, #2a1747 0%, var(--bg) 60%) fixed, var(--bg); color: var(--text); font: 22px/1.25 'Jersey 15', monospace; }
a { color: var(--gold); }
img.px { image-rendering: pixelated; }
b, strong { color: var(--gold); font-weight: normal; }
small, .muted { color: var(--muted); }
code { font: 12px 'Press Start 2P'; color: var(--gold); background: var(--ink); padding: 3px 6px; word-break: break-all; }

.panel { background: var(--panel); box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 6px var(--panel-hi), 0 4px 0 var(--ink); padding: 18px 20px; }
.card { background: var(--panel-lo); box-shadow: inset 0 0 0 2px var(--ink); padding: 12px 14px; }
.btn { border: 0; cursor: pointer; font: 20px 'Jersey 15'; color: #fff; padding: 9px 16px 12px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: inset 0 0 0 3px var(--ink), inset 0 -6px 0 0 var(--d), inset 0 6px 0 0 #ffffff33, 0 4px 0 var(--ink); background: var(--c); }
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(3px); }
.btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.gold { --c: var(--gold); --d: var(--gold-d); color: var(--ink); }
.ghost { --c: #3a2f52; --d: #241c35; color: var(--text); }

/* topo: logo, idiomas, demo e jogar */
.top { max-width: 1180px; margin: 0 auto; padding: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo img { width: 33px; filter: drop-shadow(0 3px 0 var(--ink)); }
.logo h1 { margin: 0; font: 22px 'Press Start 2P', monospace; color: #fbf3dc; text-shadow: 3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 -3px 0 var(--ink), 0 3px 0 #8a5530, 0 6px 0 var(--ink); }
.logo h1 span { color: var(--gold); text-shadow: 3px 0 0 var(--ink), -3px 0 0 var(--ink), 0 -3px 0 var(--ink), 0 3px 0 var(--gold-d), 0 6px 0 var(--ink); }
.logo .wiki { font: 9px 'Press Start 2P'; color: var(--ink); background: var(--gold); padding: 5px 6px 4px; box-shadow: 0 0 0 2px var(--ink), inset 0 -2px 0 var(--gold-d); }
.top nav { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.langs { display: flex; box-shadow: 0 0 0 3px var(--ink); }
.langs a { font: 10px 'Press Start 2P'; color: var(--muted); background: var(--panel-lo); padding: 11px 10px 9px; text-decoration: none; }
.langs a:hover { color: var(--text); background: var(--panel-hi); }
.langs a[aria-current] { background: var(--gold); color: var(--ink); box-shadow: inset 0 -3px 0 var(--gold-d); }

/* corpo: índice fixo ao lado no desktop */
.layout { max-width: 1180px; margin: 0 auto; padding: 0 16px 40px; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.toc { position: sticky; top: 16px; padding: 14px 12px; }
.toc h2 { font: 10px 'Press Start 2P'; color: var(--muted); margin: 4px 6px 10px; }
.toc a { display: flex; align-items: center; gap: 10px; padding: 5px 8px; color: var(--text); text-decoration: none; font-size: 20px; }
.toc a img { width: 22px; height: 22px; object-fit: contain; }
.toc a:hover, .toc a.on { background: var(--panel-hi); color: var(--gold); }
main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; min-width: 0; }   /* a coluna encolhe; tabelas largas rolam por dentro */

.hero { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; }
.hero > img { width: 96px; animation: bob 2.4s steps(6) infinite; }
.hero h2 { font: 16px 'Press Start 2P'; color: var(--gold); margin: 0 0 10px; line-height: 1.5; }
.hero p { margin: 0 0 12px; }
.hero .row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
@keyframes bob { 50% { transform: translateY(-4px); } }

section.panel > h2 { display: flex; align-items: center; gap: 12px; font: 14px 'Press Start 2P'; color: var(--gold); margin: 0 0 14px; line-height: 1.4; }
section.panel > h2 img { width: 32px; height: 32px; object-fit: contain; flex: none; }
section p { margin: 0 0 12px; }
section ul, section ol { margin: 0 0 12px; padding-left: 24px; }
section li { margin-bottom: 6px; }
section li::marker { color: var(--gold); }
h3 { font: 11px 'Press Start 2P'; color: var(--gold); margin: 18px 0 10px; line-height: 1.5; }
.tip { border-left: 4px solid var(--gold-d); background: var(--panel-lo); padding: 10px 14px; margin: 0 0 12px; color: var(--muted); }
.tip b { color: var(--text); }

/* tabelas */
.tbl { overflow-x: auto; margin: 0 0 12px; box-shadow: inset 0 0 0 2px var(--ink); }
table { width: 100%; border-collapse: collapse; font-size: 20px; }
th { font: 9px 'Press Start 2P'; color: var(--muted); text-align: left; padding: 10px 12px 8px; background: var(--panel-lo); white-space: nowrap; }
td { padding: 8px 12px; border-top: 2px solid var(--ink); vertical-align: middle; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td .ico { display: inline-flex; align-items: center; gap: 8px; }
td img { width: 28px; height: 28px; object-fit: contain; vertical-align: middle; }
td svg { width: 24px; height: 24px; flex: none; }
.rar { font: 10px 'Press Start 2P'; }

/* passos e grade de cartões */
.steps { counter-reset: s; display: grid; gap: 10px; margin: 0 0 12px; padding: 0; list-style: none; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; margin: 0; }
.steps li::before { content: counter(s); font: 12px 'Press Start 2P'; color: var(--ink); background: var(--gold); width: 32px; height: 32px; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--ink), inset 0 -3px 0 var(--gold-d); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 0 0 12px; }
.cards .card { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; }
.cards .card img { width: 40px; height: 40px; object-fit: contain; }
.cards .card span { display: block; color: var(--muted); font-size: 18px; line-height: 1.1; }

/* divisão das compras */
.split { display: flex; height: 34px; box-shadow: 0 0 0 3px var(--ink); margin: 6px 0 10px; }
.split div { display: grid; place-items: center; font: 9px 'Press Start 2P'; color: var(--ink); overflow: hidden; white-space: nowrap; }
.legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 6px 16px; margin: 0 0 12px; font-size: 19px; }
.legend i { display: inline-block; width: 12px; height: 12px; margin-right: 8px; box-shadow: 0 0 0 2px var(--ink); }

/* calculadora */
.calc { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 14px; }
.calc label { display: grid; gap: 6px; font: 9px 'Press Start 2P'; color: var(--muted); }
.calc select { font: 20px 'Jersey 15'; color: var(--text); background: var(--panel-lo); border: 0; padding: 7px 8px; box-shadow: inset 0 0 0 2px var(--ink), inset 0 0 0 4px var(--panel-hi); }
.out { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 0 0 12px; }
.out div { background: var(--panel-lo); box-shadow: inset 0 0 0 2px var(--ink); padding: 10px; }
.out small { display: block; font-size: 17px; }
.out b { display: block; font: 13px 'Press Start 2P'; margin-top: 6px; }
.out .net b { color: var(--up); }
.out em { display: block; font-style: normal; color: var(--muted); font-size: 17px; margin-top: 4px; }

details { background: var(--panel-lo); box-shadow: inset 0 0 0 2px var(--ink); margin: 0 0 8px; }
summary { cursor: pointer; padding: 10px 14px; color: var(--text); list-style: none; display: flex; gap: 10px; }
summary::-webkit-details-marker { display: none; }
summary::before { content: '+'; font: 12px 'Press Start 2P'; color: var(--gold); padding-top: 4px; }
details[open] summary::before { content: '–'; }
details > div { padding: 0 14px 12px 38px; color: var(--muted); }

.live { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; color: var(--muted); }
.live i { width: 8px; height: 8px; background: var(--muted); box-shadow: 0 0 0 2px var(--ink); }
.live.on i { background: var(--up); animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: .35; } }
footer { max-width: 1180px; margin: 0 auto; padding: 0 16px 32px; color: var(--muted); font-size: 18px; text-align: center; }

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .toc h2 { width: 100%; }
  .toc a { background: var(--panel-lo); box-shadow: inset 0 0 0 2px var(--ink); font-size: 18px; padding: 4px 10px 4px 6px; }
}
@media (max-width: 560px) {
  body { font-size: 20px; }
  .top, .layout, footer { padding-left: 12px; padding-right: 12px; }
  .logo h1 { font-size: 15px; }
  .top nav { width: 100%; }
  .top nav .btn { flex: 1; }
  .panel { padding: 16px 14px; }
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero > img { margin: 0 auto; width: 72px; }
  .hero .row { justify-content: center; }
  section.panel > h2 { font-size: 11px; }
  th { padding: 8px; } td { padding: 6px 8px; }
}
