:root {
  --ink: #2a2118;
  --cream: #f7f6f0;
  --sky: #fff3da;
  --gold: #f5c24b;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; background: linear-gradient(#ffe2a8, var(--sky) 60%, var(--cream)); min-height: 100vh; }
a { color: inherit; }

#pond { position: fixed; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.8s; }
#pond.ready { opacity: 1; }
html:not(.has-3d) #pond { display: none; }

.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 40px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; text-decoration: none; }
.brand img { border-radius: 8px; }
.top nav a { margin-left: 18px; font-weight: 600; text-decoration: none; }
.pill { background: var(--ink); color: var(--sky) !important; padding: 8px 16px; border-radius: 999px; }

main { position: relative; z-index: 1; }
.has-3d main section { pointer-events: none; }
.has-3d main a { pointer-events: auto; }

section { min-height: 100vh; min-height: 100svh; padding: 0 20px; text-align: center; }

.hero { display: flex; flex-direction: column; align-items: center; padding-top: 16vh; }
h1 {
  margin: 0; font-size: clamp(3.2rem, 11vw, 8rem); font-weight: 900; letter-spacing: -0.045em; line-height: 0.95;
  text-shadow: 0 0.06em 0 var(--gold);
}
.hero p { margin: 18px 0 0; font-size: clamp(1.05rem, 2.4vw, 1.35rem); font-weight: 500; }
.hint { margin-top: 22px; font-weight: 700; text-decoration: none; }
.hint span { display: inline-block; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(5px); } }

.games { min-height: 150vh; padding-top: 14vh; }
h2 { margin: 0 0 24px; font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 900; letter-spacing: -0.03em; }
.cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }

.card {
  display: flex; flex-direction: column; gap: 6px; width: min(270px, 44vw); padding: 16px 18px;
  text-align: left; text-decoration: none;
  background: rgba(255, 251, 240, 0.92); border: 2px solid var(--ink); border-radius: 18px;
  box-shadow: 0 6px 0 var(--ink); transition: translate 0.15s, box-shadow 0.15s;
}
.card:hover, .card.hot { translate: 0 -3px; box-shadow: 0 9px 0 var(--ink); }
.card strong { font-size: 1.45rem; font-weight: 900; letter-spacing: -0.02em; }
.card span { font-size: 0.92rem; line-height: 1.4; }
.card em { align-self: flex-start; margin-top: 4px; font-style: normal; font-weight: 800; font-size: 0.85rem; background: var(--gold); padding: 4px 12px; border-radius: 999px; }
.has-3d .card { position: fixed; left: 0; top: 0; opacity: 0; will-change: transform; }
.has-3d .card:focus-visible { opacity: 1 !important; }

.has-3d .games h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.community { min-height: 90vh; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.panel { padding: 28px clamp(20px, 5vw, 44px) 34px; background: rgba(255, 251, 240, 0.92); border: 2px solid var(--ink); border-radius: 24px; box-shadow: 0 8px 0 var(--ink); }
.community p { margin: 0 0 26px; font-size: 1.15rem; font-weight: 500; }
.button {
  display: inline-block; padding: 14px 28px; font-weight: 800; font-size: 1.05rem; text-decoration: none;
  background: var(--gold); border: 2px solid var(--ink); border-radius: 999px; box-shadow: 0 5px 0 var(--ink);
  transition: translate 0.15s, box-shadow 0.15s;
}
.button:hover { translate: 0 -3px; box-shadow: 0 8px 0 var(--ink); }

footer { position: relative; z-index: 2; padding: 26px 20px 34px; text-align: center; font-size: 0.82rem; line-height: 1.6; background: var(--cream); border-top: 2px solid var(--ink); }
footer nav { font-weight: 700; margin-bottom: 8px; }
footer p { margin: 0; opacity: 0.75; }

/* plain pages: minecraft, rust, rules, privacy */
body:has(.page) { display: flex; flex-direction: column; }
body:has(.page) .top { position: absolute; }
.top nav a[aria-current] { text-decoration: underline 2px; text-underline-offset: 5px; }
.page { position: relative; z-index: 1; flex: 1 0 auto; width: 100%; max-width: 820px; margin: 0 auto; padding: 100px 20px 56px; }
.page h1 { font-size: clamp(2.6rem, 8vw, 4.5rem); }
.page section { min-height: 0; padding: 22px clamp(18px, 4vw, 30px); text-align: left; }
.lead { margin: 14px 0 8px; font-size: 1.2rem; font-weight: 500; }
.box {
  margin: 24px 0; line-height: 1.55;
  background: rgba(255, 251, 240, 0.92); border: 2px solid var(--ink); border-radius: 20px; box-shadow: 0 6px 0 var(--ink);
}
.box h2 { margin: 0 0 10px; font-size: 1.6rem; }
.box h3 { margin: 24px 0 6px; font-size: 1.15rem; }
.box li { margin: 6px 0; }
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); column-gap: 20px; }
.tag { margin: -4px 0 10px; font-weight: 800; color: #8a5f00; }
.address { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.address code { font-size: 1.35rem; font-weight: 800; padding: 8px 16px; background: var(--sky); border: 2px dashed var(--ink); border-radius: 12px; }
.address button {
  font: inherit; font-weight: 800; padding: 8px 18px; cursor: pointer;
  background: var(--gold); border: 2px solid var(--ink); border-radius: 999px; box-shadow: 0 3px 0 var(--ink);
}
code { font-family: ui-monospace, Consolas, monospace; font-size: 0.92em; }
.draft { padding: 12px 16px; background: var(--gold); border: 2px solid var(--ink); border-radius: 14px; font-weight: 700; }
mark { background: #ffe08a; padding: 0 3px; border-radius: 4px; }
.table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid rgba(42, 33, 24, 0.2); }

.page.wide { max-width: 1040px; }
.ranks { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); column-gap: 20px; align-items: start; }
.rank { --band: var(--gold); padding-top: 32px !important; box-shadow: inset 0 12px 0 var(--band), 0 6px 0 var(--ink); }
.rank.duck { --band: #1d9bb0; }
.rank.golden { --band: #e0a100; }
.rank.royal { --band: #b34fd6; }
.price { margin: 0 0 6px; font-size: 2rem; font-weight: 900; letter-spacing: -0.02em; }
.price small { font-size: 1rem; font-weight: 600; }
.rank button {
  width: 100%; margin-top: 10px; padding: 12px; font: inherit; font-weight: 800;
  background: var(--gold); border: 2px solid var(--ink); border-radius: 999px; box-shadow: 0 4px 0 var(--ink);
}
.rank button:disabled { background: #e8e2d2; box-shadow: none; cursor: not-allowed; }
.small { font-size: 0.8rem; opacity: 0.75; }

@media (max-width: 600px) {
  .top nav a:not(.pill):not(.store) { display: none; }
  .card { padding: 12px 14px; }
  .card strong { font-size: 1.2rem; }
  .card span { font-size: 0.82rem; }
}
