/* vc.teamvanilla.dev: VanillaCity's website, dressed like the game. The sky behind the town, cream
   panels outlined in ink with a hard shadow like the town's sprites, TeamVanilla green, the shop
   awnings' stripes, titles in the town's own sign lettering (build.py draws them), the pixel art
   kept sharp. One stylesheet; no fonts or pictures from anywhere else. */

:root {
  --green: #1ed67c;
  --green-deep: #17b566;
  --green-dark: #0f6e3e;
  --ink: #16151c;
  --ink-soft: #3a3942;
  --muted: #6d6a62;
  --paper: #fbf6ea;
  --panel: #fffdf8;
  --line: #e6dcc6;
  --sky: #cfe8f6;
  --sky-deep: #9fd0ec;
  --peach: #f4a582;
  --brick: #a8442f;
  --gold: #e3b341;
  --edge: 3px solid var(--ink);
  --drop: 0 6px 0 var(--ink);
  --radius: 14px;
  --wrap: 1180px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.lb-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
img { max-width: 100%; height: auto; }
.px, .shot img, .stage-img, .strip img, .feature-pic img, .place img, .map-art img, .hero-art { image-rendering: pixelated; }
a { color: var(--green-dark); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--green-deep); }
:focus-visible { outline: 3px solid var(--green-deep); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(30px, 4.4vw, 50px); font-weight: 900; letter-spacing: -.02em; }
h2 { font-size: clamp(24px, 2.6vw, 30px); font-weight: 850; letter-spacing: -.01em; }
h3 { font-size: 20px; font-weight: 850; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--panel); padding: 8px 14px; border: var(--edge); border-radius: 999px; z-index: 50; }
.skip:focus { left: 12px; }
.lead { font-size: 19px; color: var(--ink-soft); }
.hint { color: var(--muted); font-size: 15px; }
.center { text-align: center; }
.kicker { margin: 0 0 6px; font-size: 14px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--green-dark); }

/* titles in the town's sign lettering */
.pixel-title { margin: 0 0 14px; line-height: 0; }
.pixel-title .pw { display: block; height: 32px; width: auto; max-width: 100%; }
h1.pixel-title .pw { height: 48px; }
.center .pixel-title .pw { margin: 0 auto; }
.pw-ink { fill: var(--ink); }
.pw-shadow { fill: var(--green-deep); }
@media (max-width: 640px) {
  .pixel-title .pw { height: 24px; }
  h1.pixel-title .pw { height: 32px; }
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  border: var(--edge);
  border-radius: 999px;
  padding: .55em 1.3em;
  min-height: 48px;
  font: inherit;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--ink);
  transition: transform .1s ease, box-shadow .1s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn-go { background: var(--green-deep); color: #fff; }
.btn-go:hover { color: #fff; background: #1bc472; }
.btn-soft { background: var(--panel); color: var(--ink); }
.btn-soft:hover { color: var(--ink); background: #fff; }
.btn-big { font-size: 19px; padding: .65em 1.6em; min-height: 58px; }
.btn .ico { width: 20px; height: 20px; flex: none; }
.btns { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.center .btns, .notfound .btns { justify-content: center; }

/* ── The header ──────────────────────────────────────────────────────────── */

.top { position: sticky; top: 0; z-index: 20; background: var(--panel); }
.top-in { display: flex; align-items: center; gap: 12px; min-height: 74px; }
.brand { display: flex; align-items: center; flex: none; }
.brand img { display: block; width: 200px; height: 39px; }
/* the town cat peeks over the awning, paws on the stripes */
.top-in .cat { flex: none; align-self: flex-end; width: 69px; height: 44px; margin: 0 -8px 0 -6px; image-rendering: pixelated; pointer-events: none; }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  padding: .4em .7em;
  white-space: nowrap;
  border-radius: 999px;
  border: 2px solid transparent;
}
.nav a:hover { border-color: var(--ink); background: #fff; }
.nav a[aria-current="page"] { background: var(--ink); color: var(--panel); }
.top .btn { white-space: nowrap; flex: none; min-height: 44px; padding: .4em 1.1em; box-shadow: 0 3px 0 var(--ink); }
/* the awning: the shops' stripes along the header's foot */
.awning {
  height: 12px;
  background: repeating-linear-gradient(90deg, var(--green-deep) 0 24px, #f4f1ea 24px 48px);
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
}
.menu-btn {
  display: none;
  margin-left: auto;
  border: var(--edge);
  background: var(--panel);
  border-radius: 999px;
  min-height: 42px;
  padding: 0 1em;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--ink);
}
@media (max-width: 1020px) {
  .top.folds .cat { order: 1; }
  .top.folds .menu-btn { display: inline-flex; align-items: center; }
  .top.folds .top-in { flex-wrap: wrap; }
  .top.folds .nav { display: none; order: 3; width: 100%; flex-direction: column; margin: 0 0 12px; }
  .top.folds.open .nav { display: flex; }
  .top.folds .nav a { padding: .65em 1em; }
  .top.folds .top-play { display: none; }
  .top.folds.open .top-play { display: inline-flex; order: 4; margin-bottom: 16px; }
}
@media (min-width: 1021px) and (max-width: 1240px) {
  .top-in .cat { display: none; }
}
@media (max-width: 420px) {
  .wrap { padding: 0 16px; }
  .brand img { width: 134px; height: 26px; }
  .top-in .cat { display: none; }
}

/* ── The home page's town ───────────────────────────────────────────────────── */

.hero { position: relative; overflow: hidden; background: var(--sky); border-bottom: var(--edge); }
.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 45%;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(207, 232, 246, .9) 0%, rgba(207, 232, 246, .55) 34%, rgba(207, 232, 246, 0) 56%);
}
.hero-in { position: relative; z-index: 1; min-height: min(780px, 86vh); display: flex; align-items: center; padding: 56px 24px; }
.hero-card {
  max-width: 580px;
  background: var(--panel);
  border: var(--edge);
  border-radius: 20px;
  box-shadow: 0 8px 0 var(--ink);
  padding: 32px 34px 30px;
}
.hero-card .logo { display: block; width: 400px; height: auto; margin: 0 0 18px; }
.hero-card h1 { font-size: clamp(30px, 3.6vw, 44px); }
.hero-card .btns { margin-top: 22px; }
.platforms { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 22px 0 0; padding: 18px 0 0; border-top: 2px dashed var(--line); list-style: none; color: var(--ink-soft); font-size: 15px; font-weight: 750; }
.platforms li { display: inline-flex; align-items: center; gap: 7px; }
.platforms .ico { width: 18px; height: 18px; color: var(--green-dark); }
@media (max-width: 760px) {
  .hero::after { background: linear-gradient(180deg, rgba(207, 232, 246, 0) 0%, rgba(207, 232, 246, 0) 30%, rgba(207, 232, 246, .92) 62%); }
  .hero-in { min-height: 0; padding: 200px 16px 28px; }
  .hero-card { padding: 22px 20px; }
  .hero-card .logo { width: 240px; }
}

/* ── Sections ─────────────────────────────────────────────────────────────── */

.band { padding: 72px 0; }
.band-sky { background: linear-gradient(180deg, var(--sky) 0%, #e3f1f9 100%); }
.band-panel { background: var(--panel); border-top: var(--edge); border-bottom: var(--edge); }
.sub { color: var(--ink-soft); max-width: 780px; margin-bottom: 30px; font-size: 18px; }
.prose { max-width: 780px; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin: .3em 0; }
.prose .pixel-title { margin-top: 0; }

.card {
  background: var(--panel);
  border: var(--edge);
  border-radius: var(--radius);
  box-shadow: var(--drop);
  padding: 22px 24px;
}
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 22px; }
.cards .card h3 { margin-bottom: .35em; }
.cards .card p { margin: 0; color: var(--ink-soft); }
.cards .card .ico { width: 34px; height: 34px; padding: 6px; border: 2px solid var(--ink); border-radius: 10px; background: #e5f7ec; color: var(--green-dark); margin-bottom: 12px; }

/* a feature: its picture on one side, what it is on the other, turning sides down the page */
.feature { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 44px; align-items: center; margin: 0 0 72px; }
.feature:last-child { margin-bottom: 0; }
.feature.flip .feature-pic { order: 2; }
.feature-pic a { display: block; border-radius: var(--radius); overflow: hidden; border: var(--edge); box-shadow: 0 8px 0 var(--ink); background: var(--ink); transition: transform .15s ease; }
.feature-pic a:hover { transform: translateY(-3px); }
.feature-pic img { display: block; width: 100%; }
.feature-text h3 { font-size: 28px; letter-spacing: -.01em; }
.feature-text p { color: var(--ink-soft); }
.facts { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 16px 0 0; list-style: none; }
.facts li { background: #e5f7ec; color: var(--green-dark); border: 2px solid var(--green-dark); border-radius: 999px; padding: .2em .85em; font-weight: 850; font-size: 14px; }
@media (max-width: 860px) {
  .feature { grid-template-columns: minmax(0, 1fr); gap: 22px; margin-bottom: 56px; }
  .feature.flip .feature-pic { order: 0; }
}

/* ── Screenshots ─────────────────────────────────────────────────────────── */

.viewer { max-width: 1120px; margin: 0 auto; }
.stage { position: relative; border-radius: var(--radius); overflow: hidden; border: var(--edge); box-shadow: 0 8px 0 var(--ink); background: var(--ink); }
.stage-link { display: block; }
.stage-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; transition: opacity .2s; }
.stage-img.loading { opacity: .6; }
.v-prev, .v-next, .lb-prev, .lb-next {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  border: var(--edge);
  border-radius: 50%;
  background: var(--panel);
  box-shadow: 0 3px 0 var(--ink);
  cursor: pointer;
}
.v-prev, .lb-prev { left: 14px; }
.v-next, .lb-next { right: 14px; }
.v-prev::before, .v-next::before, .lb-prev::before, .lb-next::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border: solid var(--ink);
  border-width: 0 3px 3px 0;
}
.v-prev::before, .lb-prev::before { transform: translate(-30%, -50%) rotate(135deg); }
.v-next::before, .lb-next::before { transform: translate(-70%, -50%) rotate(-45deg); }
.stage-cap { margin: 16px 4px 12px; color: var(--ink-soft); font-weight: 650; min-height: 1.5em; text-align: center; }
.strip { display: flex; gap: 12px; overflow-x: auto; padding: 4px 4px 14px; margin: 0; list-style: none; scroll-snap-type: x proximity; }
.strip li { flex: none; scroll-snap-align: start; }
.strip a { display: block; width: 172px; border-radius: 10px; overflow: hidden; border: 3px solid transparent; opacity: .72; transition: opacity .15s; }
.strip a[aria-current="true"] { border-color: var(--ink); opacity: 1; box-shadow: 0 3px 0 var(--green-deep); }
.strip a:hover { opacity: 1; }
.strip img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 30px 24px; padding: 0; margin: 0; list-style: none; }
.shots.phones { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.shot { margin: 0; }
.shot a { display: block; border-radius: 12px; overflow: hidden; border: var(--edge); box-shadow: var(--drop); background: var(--ink); transition: transform .15s ease; }
.shot a:hover { transform: translateY(-3px); }
.shot img { display: block; width: 100%; }
.shot figcaption { margin-top: 14px; color: var(--ink-soft); font-size: 15px; }

.lb {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(22, 21, 28, .92);
  display: grid;
  place-items: center;
  padding: 24px 76px;
}
.lb[hidden] { display: none; }
.lb figure { margin: 0; display: grid; justify-items: center; gap: 12px; max-width: 100%; }
.lb img { max-width: min(1600px, 100%); max-height: calc(100vh - 120px); border-radius: 10px; border: 3px solid var(--panel); image-rendering: pixelated; }
.lb figcaption { color: #fff; text-align: center; max-width: 900px; }
.lb-close { position: absolute; top: 14px; right: 16px; width: 46px; height: 46px; border: var(--edge); border-radius: 50%; background: var(--panel); font-size: 20px; cursor: pointer; }
@media (max-width: 640px) { .lb { padding: 64px 10px; } .lb-prev, .lb-next { top: auto; bottom: 14px; } }

/* ── The town's people ──────────────────────────────────────────────────── */

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 16px; padding: 0; margin: 0; list-style: none; }
.person { display: flex; gap: 12px; align-items: center; background: var(--panel); border: var(--edge); border-radius: 14px; padding: 10px 14px 10px 10px; box-shadow: 0 4px 0 var(--ink); }
.person img { width: 64px; height: 64px; border-radius: 10px; background: #dff0f9; border: 2px solid var(--ink); flex: none; image-rendering: pixelated; }
.person b { display: block; line-height: 1.25; }
.person span { color: var(--muted); font-size: 14px; line-height: 1.3; display: block; }

/* ── Places ─────────────────────────────────────────────────────────────── */

.places { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 26px; padding: 0; margin: 0; list-style: none; }
.place { background: var(--panel); border: var(--edge); border-radius: var(--radius); overflow: hidden; box-shadow: var(--drop); display: flex; flex-direction: column; }
.place > a { display: block; background: var(--ink); border-bottom: var(--edge); }
.place img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.place-body { padding: 16px 20px 20px; }
.place-body h3 { margin-bottom: .25em; }
.place-body .who { color: var(--green-dark); font-weight: 850; font-size: 14px; margin-bottom: .5em; }
.place-body p { margin: 0; color: var(--ink-soft); font-size: 16px; }
.title-gap { margin-top: 56px; }

.map-art { display: block; border-radius: var(--radius); border: var(--edge); box-shadow: 0 8px 0 var(--ink); background: var(--sky); overflow: hidden; }
.map-art img { display: block; width: 100%; }

/* ── Download ───────────────────────────────────────────────────────────── */

.dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 960px) { .dl { grid-template-columns: minmax(0, 1fr); } }
.dl .card { display: flex; flex-direction: column; gap: 10px; }
.dl .card h2 { font-size: 24px; display: flex; align-items: center; gap: 10px; margin: 0; }
.dl .card h2 .ico { width: 30px; height: 30px; color: var(--green-deep); }
.dl .card .btn { align-self: flex-start; margin-top: auto; }
.dl dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 4px 0 12px; font-size: 15px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.dl code, .sha { font: 13px/1.45 ui-monospace, "Cascadia Mono", Consolas, monospace; overflow-wrap: anywhere; }
.steps { counter-reset: s; padding: 0 !important; list-style: none; }
.steps li { counter-increment: s; position: relative; padding-left: 48px; margin: 0 0 16px; }
.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: -2px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 2px solid var(--ink);
  background: var(--green-deep);
  color: #fff;
  font-weight: 900;
  display: grid;
  place-items: center;
  font-size: 15px;
}

/* ── Rules ───────────────────────────────────────────────────────────────── */

.rules { counter-reset: r; padding: 0 !important; list-style: none; display: grid; gap: 14px; }
.rules li {
  counter-increment: r;
  background: var(--panel);
  border: var(--edge);
  border-radius: 14px;
  box-shadow: 0 4px 0 var(--ink);
  padding: 14px 18px 14px 66px;
  position: relative;
}
.rules li::before {
  content: counter(r);
  position: absolute;
  left: 14px;
  top: 12px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--panel);
  font-weight: 900;
  display: grid;
  place-items: center;
}
.rules b { display: block; }
.ladder { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--panel); border: var(--edge); border-radius: 14px; overflow: hidden; box-shadow: 0 4px 0 var(--ink); }
.ladder th, .ladder td { text-align: left; padding: 11px 16px; border-bottom: 2px solid var(--line); }
.ladder th { background: #efe7d4; }
.ladder tr:last-child td { border-bottom: 0; }

/* ── The footer ─────────────────────────────────────────────────────────── */

.foot { background: var(--ink); color: #d9d4c8; padding: 0 0 28px; }
.foot::before { content: ""; display: block; height: 12px; background: repeating-linear-gradient(90deg, var(--green-deep) 0 24px, #f4f1ea 24px 48px); border-bottom: 3px solid var(--ink); margin-bottom: 48px; }
.foot a { color: #fffdf8; }
.foot a:hover { color: var(--green); }
.foot-in { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.foot h2 { font-size: 15px; color: #fffdf8; margin-bottom: .7em; letter-spacing: .06em; text-transform: uppercase; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.foot .logo { display: block; width: 240px; height: 46px; margin-bottom: 14px; background: var(--panel); border: 8px solid var(--panel); border-radius: 12px; box-sizing: content-box; }
.fine { margin-top: 36px; padding-top: 18px; border-top: 1px solid #3a3942; font-size: 14px; color: #a8a398; }
@media (max-width: 860px) { .foot-in { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .foot-in { grid-template-columns: 1fr; } }

.ico { display: inline-block; vertical-align: middle; }
.notfound { padding: 96px 0; text-align: center; }
.notfound img { width: 128px; margin-bottom: 18px; image-rendering: pixelated; }

/* ── Money: the game's own coin and VanillaBuck, and an arcade ticket ───────────── */

.money-cards { margin-top: 28px; }
.coin-mark, .vb-mark, .ticket-mark { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 12px; border: 2px solid var(--ink); }
.coin-mark { border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffe28a, var(--gold) 60%, #b8862a); box-shadow: inset 0 0 0 3px #9a6e1e; }
.vb-mark { border-radius: 10px; background: var(--green-deep); box-shadow: inset 0 0 0 3px var(--green-dark); color: #fff; font-weight: 900; font-size: 22px; line-height: 1; }
.ticket-mark { width: 52px; height: 32px; margin-top: 4px; border-radius: 6px; background: radial-gradient(circle at 0 50%, transparent 6px, #f07ab0 6.5px) left / 51% 100% no-repeat, radial-gradient(circle at 100% 50%, transparent 6px, #f07ab0 6.5px) right / 51% 100% no-repeat; border-style: dashed; }
.money-band .cards { margin-top: 8px; }
.money-more { margin-top: 26px; }
.money-cards, .money-band .cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.prose > .pixel-title:not(:first-child) { margin-top: 48px; }

/* the cat again, peeking over the foot of the page */
.foot .fine { position: relative; }
.foot .cat-foot { position: absolute; right: 24px; bottom: 0; width: 69px; height: 44px; image-rendering: pixelated; pointer-events: none; }
