/* Pixel Dune Games — shared stylesheet. Mobile-first, light/dark aware, no external assets. */
:root {
  color-scheme: light dark;
  --bg: #fbf7f0;
  --surface: #ffffff;
  --text: #1f1a14;
  --muted: #6b6155;
  --border: #e6dccd;
  --accent: #c2611f;
  --accent-text: #ffffff;
  --radius: 14px;
  --max: 60rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14110e;
    --surface: #1e1a16;
    --text: #f3ece2;
    --muted: #b3a797;
    --border: #3a322a;
    --accent: #f08a3e;
    --accent-text: #14110e;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
}
a { color: var(--accent); text-underline-offset: 2px; }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
img, svg { max-width: 100%; height: auto; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }

.site-header { border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .9rem; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--text); text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.nav { display: flex; gap: 1rem; font-size: .95rem; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--accent); }

main { padding-block: 2rem 3rem; }
h1 { font-size: clamp(1.8rem, 6vw, 2.8rem); line-height: 1.15; margin: 0 0 .5rem; }
h2 { font-size: 1.35rem; margin: 2rem 0 .6rem; }
h3 { font-size: 1.05rem; margin: 1.4rem 0 .4rem; }
.lead { font-size: 1.15rem; color: var(--muted); margin: 0 0 2rem; }
.muted { color: var(--muted); }

.grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 40rem) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 60rem) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex; flex-direction: column; gap: .75rem;
}
.card h3 { margin: 0; font-size: 1.2rem; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.card p { margin: 0; color: var(--muted); }
.card .actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.art {
  aspect-ratio: 16 / 9; border-radius: 10px;
  background: linear-gradient(160deg, #1b2440 0%, #2c1f3d 55%, #c2611f 140%);
  display: grid; place-items: center; color: #ffd9a8; font-weight: 800; letter-spacing: .04em;
}

.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .6rem 1rem; border-radius: 10px;
  background: var(--accent); color: var(--accent-text);
  font-weight: 600; text-decoration: none; line-height: 1.2;
}
.btn:hover { filter: brightness(1.08); }
.btn-play { background: #000; color: #fff; border: 1px solid #555; }
.btn-play small { display: block; font-size: .65rem; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; }
.btn-play svg { width: 22px; height: 22px; flex: none; }

.prose { max-width: 46rem; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-block: .3rem; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: .55rem .6rem; border-bottom: 1px solid var(--border); }
.prose th { background: var(--surface); }
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; }
.toc ol { margin: .3rem 0 0; padding-left: 1.25rem; }

.contact { margin-top: 2.5rem; padding: 1.25rem; border: 1px dashed var(--border); border-radius: var(--radius); }

.site-footer { border-top: 1px solid var(--border); font-size: .9rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; justify-content: space-between; padding-block: 1.25rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.site-footer a { color: var(--muted); }
