:root {
  --bg: #1b1814;
  --bg-2: #24201a;
  --wood: #6b4a2b;
  --wood-dark: #3e2a19;
  --parchment: #eadfc4;
  --parchment-2: #ddd0b0;
  --ink: #2f2418;
  --ink-soft: #5c4a36;
  --text: #ece4d4;
  --muted: #b6aa93;
  --accent: #e8bc70;
  --accent-2: #94d9af;
  --line: #3a3228;
  --radius: 10px;
  --max: 1080px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}
img { max-width: 100%; display: block; image-rendering: pixelated; }
a { color: var(--accent); }
a:hover { color: #ffd896; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.92em; background: rgba(255,255,255,0.07); padding: 0.1em 0.35em; border-radius: 4px; }
.card code, .parch code { background: rgba(47,36,24,0.1); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 10; background: rgba(27,24,20,0.92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 18px; height: 56px; overflow-x: auto; }
.nav .brand { flex-shrink: 0; display: flex; align-items: center; gap: 10px; font-family: "Pixelify Sans", system-ui, sans-serif; font-size: 20px; color: var(--text); text-decoration: none; white-space: nowrap; }
.nav .brand img { width: 30px; height: 30px; border-radius: 6px; }
.nav .links { display: flex; gap: 16px; margin-left: auto; }
.nav .links a { color: var(--muted); text-decoration: none; font-size: 14px; white-space: nowrap; }
.nav .links a:hover { color: var(--text); }

/* hero */
.hero { padding: 64px 0 40px; background: radial-gradient(1200px 400px at 50% -100px, #3b2a1a 0%, transparent 70%); }
.hero .wrap { display: grid; grid-template-columns: 180px 1fr; gap: 36px; align-items: center; }
.hero img.icon { width: 180px; height: 180px; border-radius: 22px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
h1, h2, h3 { font-family: "Pixelify Sans", system-ui, sans-serif; font-weight: 600; letter-spacing: 0.01em; line-height: 1.2; }
.hero h1 { font-size: 48px; margin: 0 0 6px; }
.hero .tag { font-size: 20px; color: var(--accent); margin: 0 0 12px; }
.hero p { color: var(--muted); max-width: 640px; margin: 0 0 20px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.badge { font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: var(--bg-2); }
.badge.beta { color: #ffd896; border-color: #6b5530; }
.buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 15px; border: 1px solid transparent; }
.btn.primary { background: var(--accent); color: #2a1d10; }
.btn.primary:hover { background: #ffd08a; color: #2a1d10; }
.btn.ghost { border-color: #5a4a35; color: var(--text); }
.btn.ghost:hover { border-color: var(--accent); color: var(--text); }

/* sections */
section { padding: 48px 0; border-top: 1px solid var(--line); }
section h2 { font-size: 30px; margin: 0 0 8px; }
section .lead { color: var(--muted); margin: 0 0 26px; max-width: 760px; }
h3 { font-size: 20px; margin: 0 0 8px; }

.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid.three { grid-template-columns: repeat(3, 1fr); }

.card { background: var(--parchment); color: var(--ink); border-radius: var(--radius); padding: 18px 20px; border: 2px solid var(--wood-dark); box-shadow: inset 0 0 0 2px var(--parchment-2); }
.card h3 { color: var(--ink); }
.card p { margin: 0 0 8px; color: var(--ink-soft); }
.card p:last-child { margin-bottom: 0; }
.card .step { display: inline-block; font-family: "Pixelify Sans", sans-serif; background: var(--wood); color: var(--parchment); border-radius: 6px; padding: 0 8px; margin-bottom: 6px; font-size: 14px; }

.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.shots img, figure img { image-rendering: auto; }
.shots figure { margin: 0; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.shots figcaption { font-size: 13px; color: var(--muted); padding: 8px 12px; }

/* tables */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 560px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg-2); color: var(--accent); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; }
tr:last-child td { border-bottom: 0; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; border: 1px solid rgba(0,0,0,0.4); }
.pill { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: #3a3024; color: var(--muted); margin: 1px 2px 1px 0; white-space: nowrap; }
.pill.cast { background: #4a3a1c; color: #ffd896; }
.pill.ability { background: #3d2a44; color: #e3b8f0; }
.pill.upgrade { background: #23392d; color: var(--accent-2); }

.note { background: var(--bg-2); border-left: 3px solid var(--accent); padding: 12px 16px; border-radius: 6px; color: var(--muted); margin: 18px 0 0; }
.note strong { color: var(--text); }

.recipe { font-family: ui-monospace, Consolas, monospace; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; display: inline-block; white-space: pre; line-height: 1.35; color: var(--text); font-size: 14px; }

footer { border-top: 1px solid var(--line); padding: 30px 0 50px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }

@media (max-width: 860px) {
  .grid.three, .shots { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hero { padding-top: 36px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 20px; }
  .hero img.icon { width: 112px; height: 112px; }
  .hero h1 { font-size: 36px; }
  .grid.two, .grid.three, .shots { grid-template-columns: 1fr; }
  .nav .links { display: none; }
}
