@font-face {
  font-family: "Archivo";
  src: url(lib/archivo.woff2) format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url(lib/plex-400.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url(lib/plex-500.woff2) format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --paper: #0c0c0c;
  --raised: rgba(22, 22, 22, .78);
  --ink: #f2f2f2;
  --dim: rgba(242, 242, 242, .64);
  --faint: rgba(242, 242, 242, .38);
  --wash: rgba(242, 242, 242, .07);
  --wash-strong: rgba(242, 242, 242, .13);
  --mono: 12px/1.5 "Plex Mono", ui-monospace, monospace;
  --column: 1040px;
  --round: 999px;
  --soft: 12px;
}
* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 14px/1.6 "Archivo", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 96px;
}
body::before {
  content: ""; position: fixed; inset: -24px; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(12, 12, 12, .5), rgba(12, 12, 12, .72)), url(background.jpg) center / cover no-repeat, var(--paper);
  filter: blur(3px);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; opacity: .4; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
[hidden] { display: none !important; }
img { image-rendering: pixelated; }

.top {
  position: sticky; top: 0; z-index: 10;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 14px 24px;
}
.brand { position: relative; justify-self: start; }
.mark { font-weight: 800; font-size: 15px; letter-spacing: -.01em; user-select: none; }
.secret { position: absolute; top: calc(100% + 10px); left: -8px; background: #161616; border-radius: var(--soft); padding: 5px; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); z-index: 20; }
.secret a { display: block; padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: 13px; white-space: nowrap; }
.secret a:hover, .secret a:focus-visible { background: var(--wash-strong); outline: none; }
.mark span { font-weight: 400; color: var(--dim); }
.nav { display: flex; gap: 2px; padding: 3px; background: var(--raised); flex-wrap: wrap; justify-content: center; border-radius: 19px; backdrop-filter: blur(10px); max-width: calc(100vw - 48px); }
.nav a { padding: 6px 14px; border-radius: var(--round); color: var(--dim); font-weight: 600; font-size: 13px; white-space: nowrap; }
.nav a:hover { color: var(--ink); }
.nav a.on { background: var(--wash-strong); color: var(--ink); }
.who { display: flex; align-items: center; gap: 14px; justify-self: end; color: var(--dim); font-weight: 600; font-size: 13px; }
.who a:hover, .who button:hover { color: var(--ink); }
.who .points { font: var(--mono); color: var(--ink); }

main { max-width: var(--column); margin: 0 auto; padding: 56px 24px 0; }
h1 { font-weight: 700; font-size: clamp(30px, 4.4vw, 44px); line-height: 1.1; letter-spacing: -.025em; margin: 0 0 10px; }
h2 { font-weight: 700; font-size: 20px; line-height: 1.2; letter-spacing: -.01em; margin: 56px 0 14px; }
h3 { font-size: 12px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; margin: 36px 0 10px; }
.lede { font-size: 15px; color: var(--dim); max-width: 560px; margin: 0 0 28px; }
.meta { font: var(--mono); color: var(--faint); }
.mono { font: var(--mono); }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 0 18px; border-radius: var(--round);
  background: var(--wash-strong); font-weight: 600; font-size: 14px;
  transition: background .15s;
}
.button:hover:not(:disabled) { background: rgba(242, 242, 242, .2); }
.button.solid { background: var(--ink); color: #0c0c0c; }
.button.solid:hover:not(:disabled) { background: #fff; }
.button.small { min-height: 30px; padding: 0 13px; font-size: 13px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

input, select, textarea { background: var(--wash); border: 0; border-radius: 10px; padding: 10px 13px; outline: none; min-width: 0; }
input:focus, select:focus, textarea:focus { box-shadow: inset 0 0 0 1px var(--dim); }
select option { background: #161616; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--dim); font-weight: 600; }
form.stack { display: grid; gap: 14px; max-width: 400px; }

.tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; margin: 0 0 22px; background: var(--raised); border-radius: 19px; max-width: 100%; }
.tabs button { flex: none; }
.tabs button { padding: 6px 14px; border-radius: var(--round); color: var(--dim); font-weight: 600; font-size: 13px; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { background: var(--ink); color: #0c0c0c; }

.status { font: var(--mono); color: var(--dim); min-height: 18px; margin: 12px 0 0; }
.status.bad { color: #ff8a80; }
.empty { color: var(--faint); padding: 28px 0; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 14px; padding: 10px 14px; margin: 0 -14px; border-radius: 10px; }
.list li:hover { background: var(--wash); }
.list .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.icon { width: 48px; height: 48px; flex: none; background-repeat: no-repeat; image-rendering: pixelated; }

.stage { position: relative; background: var(--raised); border-radius: var(--soft); aspect-ratio: 4 / 5; overflow: hidden; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.stage canvas:active { cursor: grabbing; }

.split { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 40px; align-items: start; }
.split > .sticky { position: sticky; top: 72px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 6px; }
.tile { background: var(--raised); border-radius: var(--soft); padding: 12px 10px 10px; display: grid; gap: 6px; justify-items: center; text-align: center; transition: background .15s; position: relative; }
.tile:hover { background: rgba(34, 34, 34, .9); }
.tile.on { box-shadow: inset 0 0 0 1px var(--ink); }
.tile .icon { width: 60px; height: 60px; }
.tile b { font-size: 13px; font-weight: 600; line-height: 1.2; }
.tile .price { font: var(--mono); color: var(--dim); }
.tile .tag { position: absolute; top: 6px; left: 6px; font: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; background: var(--ink); color: var(--paper); padding: 1px 5px; }
#detail .about { color: var(--dim); max-width: 44ch; line-height: 1.5; margin: 10px 0 0; }
.tile .mosaic { image-rendering: pixelated; }
.reel { overflow: hidden; margin: 16px 0 0; border-radius: var(--soft); background: var(--raised); position: relative; }
.reel:empty { display: none; }
.reel::after { content: ""; position: absolute; left: 50%; top: 6px; bottom: 6px; width: 2px; margin-left: -1px; background: var(--ink); }
.reel .track { display: flex; gap: 8px; padding: 8px calc(50% - 28px); will-change: transform; }
.reel .cell { flex: 0 0 56px; height: 56px; display: grid; place-items: center; }
.reel .cell canvas { width: 56px; height: 56px; image-rendering: pixelated; }
.odds { margin-top: 18px; display: grid; gap: 6px; }
.odds .meta { margin: 8px 0 0; }
.odds .strip { display: flex; flex-wrap: wrap; gap: 4px; }
.odds .chip { width: 44px; height: 44px; display: grid; place-items: center; background: var(--wash); border-radius: 8px; }
.odds .chip:hover { background: var(--wash-strong); }
.odds .chip.owned canvas { opacity: .3; }
.odds .chip canvas { width: 40px; height: 40px; image-rendering: pixelated; }
.tile .price s { color: var(--faint); margin-right: 6px; }
.tile .owned { font: var(--mono); color: var(--faint); }

.figure-num { font-weight: 700; font-size: clamp(48px, 8vw, 80px); line-height: 1; letter-spacing: -.035em; }

dialog { background: #161616; color: var(--ink); border: 0; border-radius: var(--soft); padding: 28px; max-width: min(460px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(0, 0, 0, .6); }

@media (max-width: 860px) {
  .top { grid-template-columns: 1fr auto; }
  .top .nav { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  main { padding-top: 32px; }
  .split { grid-template-columns: 1fr; }
  .split > .sticky { position: static; }
  .stage { aspect-ratio: 1; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
