:root {
  --bg: #fff7e8;
  --paper: #ffffff;
  --ink: #2a2140;
  --muted: #6d6485;
  --line: #2a2140;
  --tomato: #ff6b4a;
  --sun: #ffc23d;
  --mint: #34c98b;
  --sky: #4aa8ff;
  --grape: #8a5cf6;
  --pink: #ff7eb6;
  --radius: 18px;
  --shadow: 4px 4px 0 var(--line);
  --font: ui-rounded, 'SF Pro Rounded', 'Nunito', 'Varela Round', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
  background-image: radial-gradient(circle at 1px 1px, #00000010 1px, transparent 0);
  background-size: 22px 22px;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* header */
.top { display: flex; align-items: center; gap: 12px; padding: 18px 0; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 900; font-size: 1.45rem; letter-spacing: -0.02em; }
.logo .mark { width: 40px; height: 40px; }
.top nav { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.top nav a.plain { text-decoration: none; font-weight: 700; padding: 8px 10px; border-radius: 10px; }
.top nav a.plain:hover { background: #0000000a; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 2.5px solid var(--line); border-radius: 14px; background: var(--paper);
  padding: 10px 16px; font-weight: 800; text-decoration: none; cursor: pointer;
  box-shadow: var(--shadow); transition: transform .08s, box-shadow .08s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--line); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--line); }
.btn.go { background: var(--sun); }
.btn.mint { background: var(--mint); color: #fff; }
.btn.big { font-size: 1.15rem; padding: 14px 22px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* hero */
.hero { padding: 26px 0 8px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); line-height: 1.02; margin: 0 0 14px; letter-spacing: -0.03em; font-weight: 900; }
/* its own box, so the highlight sits below the g's and y's of the line above */
.hero h1 .hl { display: inline-block; margin-top: .14em; padding: .04em .18em .08em; line-height: 1.08; background: var(--sun); border-radius: 10px; }
.hero p { font-size: 1.15rem; color: var(--muted); margin: 0 0 18px; max-width: 34em; }
.promises { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; padding: 0; list-style: none; }
.promises li { border: 2px solid var(--line); border-radius: 999px; padding: 4px 12px; font-weight: 800; font-size: .9rem; background: var(--paper); }
.hero-art { display: flex; justify-content: center; }
.hero-art svg { width: min(100%, 360px); height: auto; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; } .hero-art { display: none; } }

/* filters */
.filters { margin: 22px 0 14px; display: grid; gap: 10px; }
.row { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; }
.row::-webkit-scrollbar { display: none; }
.row .label { font-weight: 900; align-self: center; min-width: 64px; color: var(--muted); font-size: .85rem; text-transform: lowercase; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  border: 2.5px solid var(--line); background: var(--paper); border-radius: 999px;
  padding: 7px 14px; font-weight: 800; cursor: pointer; user-select: none; white-space: nowrap;
  transition: transform .08s;
}
.chip:hover { transform: translateY(-1px); }
.chip small { font-weight: 700; color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; }
.chip[aria-pressed="true"] small { color: #ffffffb0; }
.searchbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.searchbar input {
  flex: 1 1 180px; border: 2.5px solid var(--line); border-radius: 14px; padding: 11px 14px; background: var(--paper);
  font-weight: 700; outline: none; min-width: 0;
}
.searchbar input:focus { box-shadow: var(--shadow); }
.searchbar select { border: 2.5px solid var(--line); border-radius: 14px; padding: 11px 10px; background: var(--paper); font-weight: 800; }

/* grid */
.count { color: var(--muted); font-weight: 800; margin: 4px 0 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; padding-bottom: 60px; }
.card {
  position: relative; background: var(--paper); border: 2.5px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
  transition: transform .12s, box-shadow .12s;
}
.card:hover { transform: translate(-2px, -3px) rotate(-.4deg); box-shadow: 7px 8px 0 var(--line); }
.card a.cover { text-decoration: none; display: block; }
.thumb { aspect-ratio: 1.91 / 1; border-bottom: 2.5px solid var(--line); background: #eee; position: relative; overflow: hidden; }
.thumb img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.thumb .ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 3.4rem; }
.badge-featured { position: absolute; top: 10px; left: 10px; background: var(--sun); border: 2px solid var(--line); border-radius: 999px; padding: 2px 10px; font-weight: 900; font-size: .78rem; }
.card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { margin: 0; font-size: 1.12rem; line-height: 1.2; font-weight: 900; }
.card .by { color: var(--muted); font-weight: 700; font-size: .9rem; }
.card .by a { text-decoration: none; border-bottom: 1.5px dotted; }
.card .desc { margin: 0; font-size: .92rem; color: #4a4262; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; padding-top: 6px; }
.tag { font-size: .78rem; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: #f2ecff; border: 1.5px solid #d9ccff; }
.tag.age { background: #fff1c9; border-color: #ffd96b; }
.tag.feat { background: #e2f8ee; border-color: #9ee6c4; }
.card .more { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 10px; border: 2px solid var(--line); background: #ffffffe6; cursor: pointer; font-weight: 900; opacity: 0; transition: opacity .15s; z-index: 4; }
.card:hover .more, .card .more:focus { opacity: 1; }
@media (hover: none) { .card .more { opacity: 1; } }
.card .more.fav { right: 46px; font-size: 1.05rem; color: #d6336c; }
.card .more.fav[aria-pressed="true"] { opacity: 1; }
.card .more.edit { right: 84px; opacity: 1; display: flex; align-items: center; justify-content: center; text-decoration: none; font-size: .9rem; }
.menu { position: absolute; top: 44px; right: 8px; background: var(--paper); border: 2px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 4px; z-index: 5; display: grid; }
.menu button { border: 0; background: none; text-align: left; padding: 8px 12px; border-radius: 8px; cursor: pointer; font-weight: 700; }
.menu button:hover { background: #0000000c; }

.empty { text-align: center; padding: 50px 10px; color: var(--muted); font-weight: 800; grid-column: 1 / -1; }
.empty .big { font-size: 3rem; }

footer { border-top: 2.5px dashed #2a214030; padding: 26px 0 50px; color: var(--muted); font-weight: 700; font-size: .92rem; }
footer a { font-weight: 800; }

/* forms */
.panel { background: var(--paper); border: 2.5px solid var(--line); border-radius: 22px; box-shadow: 6px 6px 0 var(--line); padding: 24px; margin: 10px 0 30px; }
.narrow { max-width: 760px; margin: 0 auto; }
.step { margin: 0 0 26px; }
.step h2 { font-size: 1.25rem; margin: 0 0 4px; font-weight: 900; display: flex; gap: 10px; align-items: center; }
.step h2 .n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--grape); color: #fff; font-size: .95rem; flex: none; }
.step .hint { color: var(--muted); margin: 0 0 12px; font-weight: 600; font-size: .95rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.field { width: 100%; border: 2.5px solid var(--line); border-radius: 14px; padding: 12px 14px; background: #fffdf8; font-weight: 700; outline: none; }
.field:focus { box-shadow: var(--shadow); background: #fff; }
textarea.field { resize: vertical; min-height: 80px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .pair { grid-template-columns: 1fr; } .panel { padding: 18px; } }
.linkrow { display: flex; gap: 10px; }
.linkrow .field { flex: 1; min-width: 0; }
.preview { margin-top: 14px; display: grid; grid-template-columns: 220px 1fr; gap: 14px; align-items: start; }
.preview .thumb { border: 2.5px solid var(--line); border-radius: 14px; }
.preview .ok { color: #148a5a; font-weight: 900; }
.preview .warn { color: #b8471f; font-weight: 800; }
@media (max-width: 600px) { .preview { grid-template-columns: 1fr; } }
pre.snippet { background: #2a2140; color: #ffe9a8; padding: 12px; border-radius: 12px; overflow-x: auto; font-size: .82rem; white-space: pre-wrap; word-break: break-all; }
.err { background: #ffe3dc; border: 2px solid var(--tomato); color: #8f2c12; border-radius: 12px; padding: 10px 14px; font-weight: 800; margin: 10px 0; }
.success { text-align: center; }
.success .big { font-size: 4rem; }
.keybox { display: flex; gap: 8px; margin: 12px 0; }
.keybox input { flex: 1; min-width: 0; font-size: .85rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.spin { display: inline-block; width: 18px; height: 18px; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: s .7s linear infinite; }
@keyframes s { to { transform: rotate(360deg); } }

.prose { font-size: 1.08rem; }
.prose h2 { margin-top: 1.6em; }
.prose code { background: #f2ecff; padding: 1px 6px; border-radius: 6px; }
.mine { margin-top: 10px; }
.mine a { font-weight: 800; }
.logo { white-space: nowrap; }
@media (max-width: 480px) {
  .logo { font-size: 1.2rem; } .logo .mark { width: 32px; height: 32px; }
  .top nav a.btn { padding: 8px 12px; font-size: .9rem; white-space: nowrap; }
  .top nav a.plain { display: none; }
  /* a person icon here: the words don't fit beside the logo. screen readers still get the words */
  .top nav a#nav-account { display: block; padding: 6px 2px; font-size: 0; }
  .top nav a#nav-account::before { content: '👤'; font-size: 1.15rem; }
  .top nav { gap: 4px; }
}
@media (max-width: 350px) {
  .logo { font-size: 1.05rem; gap: 4px; } .logo .mark { width: 26px; height: 26px; }
  .top nav a.btn { padding: 7px 8px; font-size: .78rem; }
}

/* thumbnail picker (submit) */
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.pick {
  position: relative; aspect-ratio: 1.91 / 1; border: 2.5px solid var(--line); border-radius: 12px; overflow: hidden;
  background: #f3efe6; cursor: pointer; padding: 0; display: grid; place-items: center; font-size: 1.6rem;
  transition: transform .08s;
}
.pick:hover { transform: translateY(-1px); }
.pick img { width: 100%; height: 100%; object-fit: cover; }
.pick .ph { font-size: 1.8rem; }
.pick-label { position: absolute; left: 4px; bottom: 4px; background: #ffffffe6; border-radius: 999px; padding: 0 7px; font-size: .72rem; font-weight: 800; }
.pick.action { background: var(--paper); border-style: dashed; align-content: center; gap: 2px; }
.pick.action .pick-label { position: static; background: none; }
.pick[aria-pressed="true"] { outline: 4px solid var(--grape); outline-offset: 2px; }
details.hint summary { cursor: pointer; font-weight: 800; }

/* sponsor cards (shelf) */
.card.sponsor .thumb { background: #f3efe6; }
.badge-sponsor { position: absolute; top: 10px; left: 10px; z-index: 2; background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: 2px 10px; font-weight: 900; font-size: .74rem; }
.card.sponsor .buy { font-size: .78rem; font-weight: 800; color: var(--muted); text-decoration: none; margin-top: auto; padding-top: 6px; }
.card.sponsor .buy:hover { text-decoration: underline; }
.card.slot { border-style: dashed; box-shadow: none; background: #fffdf8; text-decoration: none; justify-content: center; align-items: center; text-align: center; padding: 24px; gap: 6px; min-height: 220px; }
.card.slot .big { font-size: 2.4rem; }
.card.slot b { font-size: 1.1rem; }
.card.slot span { color: var(--muted); font-weight: 700; font-size: .92rem; }
.adbuild { display: grid; grid-template-columns: 1fr 280px; gap: 18px; align-items: start; }
.adbuild .pick { width: 100%; }
@media (max-width: 680px) { .adbuild { grid-template-columns: 1fr; } }

/* headings are Title Case in the html (for search engines and screen readers) and shown lowercase */
h1, h2, h3, .logo { text-transform: lowercase; }
/* a game's or sponsor's own name keeps the capitals its maker gave it */
.card h3 { text-transform: none; }

/* "wait, i can make my own?" */
.pitch { max-width: 860px; margin: 10px auto 0; padding: 40px 0 10px; border-top: 2.5px dashed #2a214030; }
.chat { display: flex; flex-direction: column; gap: 14px; }
.say { max-width: 82%; border: 2.5px solid var(--line); border-radius: 22px; padding: 14px 20px; box-shadow: var(--shadow); }
.say p { margin: 0; font-size: 1.15rem; }
.say h2 { margin: 0; font-size: clamp(1.5rem, 4vw, 2.2rem); line-height: 1.1; font-weight: 900; letter-spacing: -.02em; }
.say.them { align-self: flex-start; background: var(--paper); border-bottom-left-radius: 6px; }
.say.us { align-self: flex-end; background: var(--sun); border-bottom-right-radius: 6px; }
.steps { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps li { background: var(--paper); border: 2.5px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.steps .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--grape); color: #fff; font-weight: 900; }
.steps h3 { margin: 10px 0 4px; font-size: 1.25rem; font-weight: 900; }
.steps p { margin: 0; color: #4a4262; }
.rules { text-align: center; font-size: 1.15rem; font-weight: 700; margin: 30px auto 16px; max-width: 34em; }
.cta { text-align: center; margin: 0; }
@media (max-width: 680px) { .steps { grid-template-columns: 1fr; } .say { max-width: 94%; } }

.faq { max-width: 860px; margin: 0 auto; padding: 46px 0 60px; }
.faq > h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 900; letter-spacing: -.02em; margin: 0 0 16px; }
.faq details { background: var(--paper); border: 2.5px solid var(--line); border-radius: 16px; margin: 0 0 12px; }
.faq summary { cursor: pointer; padding: 14px 18px; display: flex; align-items: center; gap: 12px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '＋'; margin-left: auto; font-weight: 900; }
.faq details[open] summary::after { content: '－'; }
.faq summary h3 { margin: 0; font-size: 1.12rem; font-weight: 900; }
.faq details p { margin: 0; padding: 0 18px 16px; color: #4a4262; font-size: 1.05rem; }

/* promises are facts, not buttons: plain text with no outline */
.promises { gap: 4px 20px; }
.promises li { border: 0; background: none; padding: 0; border-radius: 0; font-size: 1rem; color: var(--ink); }

/* chip rows fade out at the edge while there's more to scroll to (browse.js sets the classes) */
.row { --l: 0px; --r: 0px;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--l), #000 calc(100% - var(--r)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--l), #000 calc(100% - var(--r)), transparent 100%); }
.row.more-l { --l: 48px; }
.row.more-r { --r: 72px; }

/* the hidden attribute always wins, even over .btn and friends */
[hidden] { display: none !important; }
