/* fakerfuse games: black, white and light */

:root {
  color-scheme: dark;
  --bg: #000;
  --surface: #0a0a0b;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --line-3: rgba(255, 255, 255, 0.3);
  --fg: #f5f5f7;
  --fg-2: rgba(245, 245, 247, 0.74);
  --fg-3: rgba(245, 245, 247, 0.5);
  --fg-4: rgba(245, 245, 247, 0.3);
  --danger: #ff6b78;
  --display: 'Saira Condensed', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --body: 'Saira', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-io: cubic-bezier(.76, 0, .18, 1);
  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1480px;
  --radius: 6px;
  --cols: 5;
  --top: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); scrollbar-color: #2b2b2f var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--fg);
  font: 400 16px/1.55 var(--body); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
::selection { background: #fff; color: #000; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.ico { width: 18px; height: 18px; flex: none; }
code { font: 500 .92em ui-monospace, SFMono-Regular, Menlo, monospace; padding: .1em .35em; border-radius: 4px; background: rgba(255, 255, 255, .08); }

#shell {
  display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh;
  transform-origin: 50% 40vh; transition: transform 1s var(--ease-io), opacity 1s var(--ease-io);
}
#view { flex: 1; display: flex; flex-direction: column; }

/* ---------------------------------------------------------------- background light */

.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: #000; }
.bg::before {
  content: ''; position: absolute; left: 50%; top: -42vh; width: 150vw; height: 100vh; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 255, 255, .11), rgba(255, 255, 255, .04) 45%, transparent 76%);
}
.bg::after {
  content: ''; position: absolute; inset: auto 0 0; height: 40vh;
  background: radial-gradient(70% 100% at 50% 100%, rgba(255, 255, 255, .035), transparent 70%);
}
.beam {
  position: absolute; top: -30vh; width: 34vw; height: 150vh; transform-origin: 50% 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .05) 50%, transparent);
  animation: beam 22s ease-in-out infinite alternate;
}
.beam.b1 { left: 4vw; rotate: 24deg; }
.beam.b2 { right: 2vw; rotate: -20deg; animation-delay: -11s; }
@keyframes beam { from { opacity: .35; translate: -4vw 0; } to { opacity: 1; translate: 4vw 0; } }
.grain {
  position: absolute; inset: 0; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- the mark: three arms turning slowly round the spark */

.ff-mark { color: #fff; overflow: visible; }
.ff-arms { transform-box: view-box; transform-origin: 60px 60px; animation: ff-turn 24s linear infinite; }
@keyframes ff-turn { to { transform: rotate(360deg); } }
.ff-spark { animation: ff-spark 5s ease-in-out infinite; }
@keyframes ff-spark { 50% { opacity: .78; } }

/* ---------------------------------------------------------------- header */

.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--top);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 var(--gutter);
  background: linear-gradient(to bottom, rgba(0, 0, 0, .8), rgba(0, 0, 0, .35));
  -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid transparent; transition: border-color .4s, background .4s;
  view-transition-name: topbar;
}
.scrolled .topbar { border-bottom-color: var(--line); background: rgba(0, 0, 0, .78); }
.brand { display: inline-flex; align-items: center; gap: 12px; transition: opacity .5s var(--ease), translate .5s var(--ease); }
.brand .ff-mark { width: 30px; height: 30px; filter: drop-shadow(0 0 4px rgba(255, 255, 255, .7)) drop-shadow(0 0 14px rgba(255, 255, 255, .25)); }
.brand-word { font: 500 22px/1 var(--display); letter-spacing: .07em; text-shadow: 0 0 10px rgba(255, 255, 255, .5), 0 0 26px rgba(255, 255, 255, .18); white-space: nowrap; }
.hero-visible .brand { opacity: 0; translate: 0 -6px; pointer-events: none; }
.nav { display: flex; gap: 2px; }
.nav a {
  position: relative; padding: 10px 14px; color: var(--fg-3); transition: color .25s, text-shadow .25s;
  font: 500 14px/1 var(--display); letter-spacing: .16em; text-transform: uppercase;
}
.nav a:hover { color: var(--fg); }
.nav a[aria-current] { color: var(--fg); text-shadow: 0 0 10px rgba(255, 255, 255, .6); }
.nav a[aria-current]::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 1px; background: #fff; box-shadow: 0 0 8px #fff; }

/* ---------------------------------------------------------------- shared bits */

.eyebrow {
  display: flex; align-items: center; gap: 12px; margin: 0; color: var(--fg-2);
  font: 600 13px/1 var(--display); letter-spacing: .3em; text-transform: uppercase;
}
.eyebrow::before { content: ''; width: 26px; height: 1px; background: #fff; box-shadow: 0 0 8px #fff; }
.back-link {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 8px 0; color: var(--fg-3);
  font: 500 14px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; transition: color .25s, gap .3s var(--ease);
}
.back-link:hover { color: var(--fg); gap: 12px; }
.back-link .ico { width: 16px; height: 16px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; white-space: nowrap;
  border-radius: 4px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .3); color: var(--fg);
  font: 600 14px/1 var(--display); letter-spacing: .14em; text-transform: uppercase;
  transition: border-color .25s, background .25s, box-shadow .25s, color .25s, transform .2s;
}
.btn .ico { width: 16px; height: 16px; }
.btn:hover { border-color: rgba(255, 255, 255, .6); box-shadow: 0 0 18px rgba(255, 255, 255, .14); }
.btn:active { transform: scale(.98); }
.btn-primary { background: #fff; border-color: #fff; color: #000; box-shadow: 0 0 22px rgba(255, 255, 255, .28); }
.btn-primary:hover { box-shadow: 0 0 34px rgba(255, 255, 255, .5); }
.btn-danger { border-color: rgba(255, 107, 120, .55); color: #ffb3ba; background: rgba(255, 107, 120, .08); }
.btn-danger:hover { border-color: var(--danger); box-shadow: 0 0 20px rgba(255, 107, 120, .25); }
.btn-quiet-danger { border-color: transparent; background: none; color: var(--fg-3); }
.btn-quiet-danger:hover { color: #ffb3ba; border-color: rgba(255, 107, 120, .4); box-shadow: none; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; height: 48px; }

.empty { display: grid; justify-items: center; gap: 10px; padding: 72px 20px; text-align: center; color: var(--fg-2); }
.empty .ff-mark { width: 56px; height: 56px; opacity: .5; margin-bottom: 8px; }
.empty p { margin: 0; font: 600 22px/1.2 var(--display); letter-spacing: .03em; color: var(--fg); }
.empty small { color: var(--fg-3); font-size: 14px; max-width: 46ch; }
.empty .btn { margin-top: 12px; }

/* ---------------------------------------------------------------- library */

.hero { position: relative; display: grid; justify-items: center; text-align: center; padding: clamp(36px, 7vh, 88px) var(--gutter) clamp(40px, 7vh, 80px); }
.hero-mark { position: relative; width: clamp(92px, 11vw, 140px); aspect-ratio: 1; }
.hero-mark::before {
  content: ''; position: absolute; inset: -130%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .2), rgba(255, 255, 255, .07) 40%, rgba(255, 255, 255, .02) 62%, transparent 80%);
  animation: breathe 7s ease-in-out infinite;
}
@keyframes breathe { 50% { opacity: .65; scale: .94; } }
.hero-mark .ff-mark {
  width: 100%; height: 100%;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, .85)) drop-shadow(0 0 12px rgba(255, 255, 255, .4));
}
.hero-word {
  margin: 26px 0 0; font: 500 clamp(36px, 5.2vw, 62px)/1 var(--display); letter-spacing: .07em;
  text-shadow: 0 0 14px rgba(255, 255, 255, .55), 0 0 42px rgba(255, 255, 255, .2);
}
.hero-tag { margin: 14px 0 0; max-width: 44ch; color: var(--fg-3); font-size: 15.5px; }
.intro .hero-mark { animation: bloom 1.6s var(--ease) both; }
.intro .hero-word { animation: rise 1.1s .35s var(--ease) both; }
.intro .hero-tag { animation: rise 1.1s .55s var(--ease) both; }
@keyframes bloom { from { opacity: 0; filter: blur(14px) brightness(2.2); scale: .86; } }
@keyframes rise { from { opacity: 0; translate: 0 14px; filter: blur(6px); } }

.shelf { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter) 104px; }
.shelf-head { position: relative; display: flex; align-items: baseline; gap: 14px; margin-bottom: 30px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.shelf-head::after { content: ''; position: absolute; left: 0; bottom: -1px; width: 64px; height: 1px; background: #fff; box-shadow: 0 0 10px #fff, 0 0 2px #fff; }
.shelf-head h2 { margin: 0; font: 600 15px/1 var(--display); letter-spacing: .26em; text-transform: uppercase; }
.shelf-count { color: var(--fg-3); font-size: 14px; }

.grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: clamp(30px, 3vw, 46px) clamp(14px, 1.7vw, 26px); }

.card { position: relative; display: flex; flex-direction: column; gap: 14px; outline: none; -webkit-tap-highlight-color: transparent; }
.card-cover {
  position: relative; aspect-ratio: 2 / 3; overflow: hidden; isolation: isolate; border-radius: var(--radius); background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), 0 14px 40px -24px rgba(0, 0, 0, .9);
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
}
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease), filter .6s; }
/* a sheet of light sweeps across on hover, and a soft spot follows the pointer */
.card-cover::before {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; translate: -115% 0;
  background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, .26) 47%, rgba(255, 255, 255, .06) 53%, transparent 64%);
}
.card-cover::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .45s;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 20%), rgba(255, 255, 255, .17), transparent 46%);
}
.card:hover .card-cover, .card:focus-visible .card-cover {
  transform: translateY(-6px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .6), 0 0 24px rgba(255, 255, 255, .2), 0 26px 60px -20px rgba(255, 255, 255, .3);
}
.card:hover .card-cover img { transform: scale(1.045); }
.card:hover .card-cover::before { translate: 115% 0; transition: translate 1.15s var(--ease); }
.card:hover .card-cover::after { opacity: 1; }
.card:focus-visible .card-cover { outline: 2px solid #fff; outline-offset: 5px; }
.card:active .card-cover { transform: translateY(-3px) scale(.985); transition-duration: .15s; }
.card-meta { min-width: 0; }
.card-title { margin: 0; font: 600 19px/1.15 var(--display); letter-spacing: .03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: text-shadow .4s; }
.card:hover .card-title, .card:focus-visible .card-title { text-shadow: 0 0 14px rgba(255, 255, 255, .6); }
.card-sub { margin: 3px 0 0; color: var(--fg-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ghost { display: flex; flex-direction: column; gap: 14px; opacity: calc(.75 - var(--i) * .17); }
.ghost-cover {
  display: grid; place-items: center; aspect-ratio: 2 / 3; border-radius: var(--radius); border: 1px dashed rgba(255, 255, 255, .14);
  background: radial-gradient(70% 50% at 50% 45%, rgba(255, 255, 255, .045), transparent 80%);
}
.ghost-cover .ff-mark { width: 30%; max-width: 54px; opacity: .3; }
.ghost-label { margin: 0; color: var(--fg-3); font: 500 14px/1.3 var(--display); letter-spacing: .18em; text-transform: uppercase; }

.skeleton .card-cover { background: linear-gradient(100deg, #0a0a0b 30%, #141416 50%, #0a0a0b 70%) 0 0 / 300% 100%; animation: shimmer 1.6s linear infinite; }
.sk-line { display: block; height: 12px; width: 72%; margin-top: 6px; border-radius: 3px; background: #121214; }
.sk-line.short { width: 44%; }
@keyframes shimmer { to { background-position: -150% 0; } }

/* ---------------------------------------------------------------- game page */

.gp { position: relative; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 20px var(--gutter) 104px; display: flex; flex-direction: column; }
.gp-ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.gp-ambient img {
  position: absolute; left: 50%; top: -18%; width: 130%; height: 95%; translate: -50% 0; object-fit: cover;
  filter: blur(80px) saturate(.55) brightness(.6); opacity: .42;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000, transparent); mask-image: radial-gradient(70% 60% at 50% 30%, #000, transparent);
}
.gp-grid { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(330px, 1fr); gap: clamp(28px, 4.2vw, 76px); align-items: center; margin-top: clamp(14px, 3vh, 34px); }
.gp-cover {
  position: relative; margin: 0; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: var(--surface);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 40px 100px -34px rgba(0, 0, 0, .95), 0 0 110px -26px rgba(255, 255, 255, .24);
  transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .7s var(--ease), box-shadow .6s;
  -webkit-box-reflect: below 16px linear-gradient(transparent 76%, rgba(255, 255, 255, .1));
  view-transition-name: cover;
}
.gp-cover.tilting { transition: transform .15s linear, box-shadow .6s; }
.gp-cover:hover { box-shadow: 0 0 0 1px rgba(255, 255, 255, .34), 0 40px 100px -34px rgba(0, 0, 0, .95), 0 0 130px -20px rgba(255, 255, 255, .32); }
.gp-cover img { width: 100%; height: 100%; object-fit: cover; }
.gp-glare {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .5s;
  background: radial-gradient(700px circle at var(--gx, 30%) var(--gy, 0%), rgba(255, 255, 255, .2), transparent 48%);
}
.gp-cover:hover .gp-glare { opacity: 1; }

.gp-info { min-width: 0; }
.gp-title {
  margin: 16px 0 0; font: 700 clamp(44px, 5.4vw, 82px)/.92 var(--display); letter-spacing: .01em; overflow-wrap: anywhere;
  text-shadow: 0 0 22px rgba(255, 255, 255, .3), 0 0 70px rgba(255, 255, 255, .12);
}
.gp-desc { margin-top: 22px; color: var(--fg-2); font-size: 16px; line-height: 1.7; max-width: 62ch; }
.gp-desc p { margin: 0 0 .85em; }
.gp-desc p:last-child { margin-bottom: 0; }
.gp-specs { display: grid; grid-template-columns: 1fr 1fr; margin: 28px 0 0; border-top: 1px solid var(--line); }
.gp-specs > div { padding: 15px 16px 15px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.gp-specs > div:nth-child(even) { padding-left: 18px; border-left: 1px solid var(--line); }
.gp-specs dt { display: flex; align-items: center; gap: 8px; color: var(--fg-3); font: 500 12px/1 var(--display); letter-spacing: .2em; text-transform: uppercase; }
.gp-specs dt .ico { width: 16px; height: 16px; }
.gp-specs dd { display: flex; align-items: center; gap: 8px; margin: 9px 0 0; font: 600 19px/1.2 var(--display); letter-spacing: .02em; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fg-4); flex: none; }
.dot.on { background: #fff; box-shadow: 0 0 8px #fff, 0 0 16px rgba(255, 255, 255, .6); }
.gp-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; margin-top: 32px; }
.gp-note { color: var(--fg-3); font-size: 13.5px; }

.play-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 14px; height: 62px; min-width: 230px; padding: 0 40px;
  border-radius: 4px; background: #fff; color: #000; overflow: hidden; isolation: isolate;
  font: 700 21px/1 var(--display); letter-spacing: .3em; text-transform: uppercase;
  box-shadow: 0 0 0 1px #fff, 0 0 26px rgba(255, 255, 255, .45), 0 0 80px rgba(255, 255, 255, .2);
  animation: play-glow 3.2s ease-in-out infinite;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.play-btn span { margin-right: -.3em; }
.play-btn .ico { width: 20px; height: 20px; }
.play-btn::after {
  content: ''; position: absolute; inset: 0; z-index: -1; translate: -110% 0;
  background: linear-gradient(105deg, transparent 30%, rgba(0, 0, 0, .1) 50%, transparent 70%);
}
.play-btn:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 0 0 1px #fff, 0 0 36px rgba(255, 255, 255, .65), 0 0 110px rgba(255, 255, 255, .3); animation: none; }
.play-btn:hover::after { translate: 110% 0; transition: translate .9s var(--ease); }
.play-btn:active { transform: scale(.97); }
.play-btn:focus-visible { outline: 2px solid #fff; outline-offset: 5px; }
@keyframes play-glow { 50% { box-shadow: 0 0 0 1px #fff, 0 0 34px rgba(255, 255, 255, .58), 0 0 100px rgba(255, 255, 255, .28); } }

/* ---------------------------------------------------------------- launching and playing */

.is-launching #shell { transform: scale(.94); opacity: .2; }
.is-playing #shell { visibility: hidden; }
.is-playing, .is-playing body { overflow: hidden; }

.launch { position: fixed; inset: 0; z-index: 120; }
.launch-veil { position: absolute; inset: 0; background: #000; opacity: 0; }
.launch-cover { position: absolute; overflow: hidden; transform-origin: 0 0; will-change: transform, opacity, filter; background: #000; }
.launch-cover img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.launch-sweep {
  position: absolute; inset: -20% -60%; opacity: 0; mix-blend-mode: overlay;
  background: linear-gradient(100deg, transparent 38%, rgba(255, 255, 255, .9) 49%, rgba(255, 255, 255, .25) 53%, transparent 62%);
}
.launch-edge { position: absolute; inset: 0; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .7), inset 0 0 90px rgba(255, 255, 255, .28); opacity: 0; }
.launch-status {
  position: absolute; left: 50%; bottom: max(7vh, 32px); translate: -50% 12px; display: flex; align-items: center; gap: 12px;
  padding: 11px 20px 11px 14px; border-radius: 999px; background: rgba(0, 0, 0, .62); border: 1px solid rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 0 30px rgba(255, 255, 255, .1);
  font: 500 14px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; white-space: nowrap;
  opacity: 0; transition: opacity .45s, translate .45s var(--ease);
}
.launch-status.show { opacity: 1; translate: -50% 0; }
.launch-status .ff-mark { width: 22px; height: 22px; filter: drop-shadow(0 0 4px rgba(255, 255, 255, .8)); }
.launch-status .ff-arms { animation-duration: 2.6s; }

.player { position: fixed; inset: 0; z-index: 100; background: #000; }
.player-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; opacity: 0; }
.player.live .player-frame { opacity: 1; }
.player-hot { position: absolute; top: 0; left: 0; right: 0; height: 10px; z-index: 2; }
.player-bar {
  position: absolute; top: 12px; left: 50%; z-index: 3; display: flex; align-items: center; gap: 4px; padding: 5px;
  border-radius: 999px; background: rgba(8, 8, 10, .72); border: 1px solid rgba(255, 255, 255, .15);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .6), 0 0 26px rgba(255, 255, 255, .08);
  translate: -50% calc(-100% - 20px); opacity: 0; transition: translate .5s var(--ease), opacity .3s;
}
.player-bar.show { translate: -50% 0; opacity: 1; }
.pbtn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: var(--fg);
  font: 500 14px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; transition: background .2s;
}
.pbtn:hover { background: rgba(255, 255, 255, .1); }
.pbtn .ico { width: 16px; height: 16px; }
.player-title { display: flex; align-items: center; gap: 9px; padding: 0 14px; border-inline: 1px solid var(--line-2); color: var(--fg-2); font: 600 14px/1 var(--display); letter-spacing: .08em; white-space: nowrap; }
.player-title .ff-mark { width: 18px; height: 18px; }
@media (pointer: coarse) {
  .player-hot { height: 26px; }
  .player-hot::after { content: ''; position: absolute; top: 7px; left: 50%; width: 44px; height: 4px; translate: -50% 0; border-radius: 4px; background: rgba(255, 255, 255, .35); }
}

/* ---------------------------------------------------------------- developer */

.dev { width: 100%; max-width: 1080px; margin: 0 auto; padding: 22px var(--gutter) 120px; display: flex; flex-direction: column; position: relative; }
.dev-wide { max-width: var(--maxw); }
.dev-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 18px 24px; margin: 16px 0 32px; }
.dev-head h1 { margin: 12px 0 0; font: 700 clamp(36px, 4.4vw, 56px)/1 var(--display); letter-spacing: .01em; text-shadow: 0 0 22px rgba(255, 255, 255, .26); }
.dev-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.card-new .card-cover {
  display: grid; place-items: center; border: 1px dashed rgba(255, 255, 255, .26); box-shadow: none;
  background: radial-gradient(70% 60% at 50% 40%, rgba(255, 255, 255, .07), transparent 75%), var(--surface);
}
.new-inner { display: grid; justify-items: center; gap: 10px; padding: 18px; text-align: center; }
.new-inner .ico { width: 44px; height: 44px; padding: 10px; border-radius: 50%; border: 1px solid var(--line-3); stroke-width: 1.4; transition: box-shadow .4s, border-color .4s; }
.new-inner strong { font: 600 20px/1 var(--display); letter-spacing: .06em; }
.new-inner small { color: var(--fg-3); font-size: 12.5px; line-height: 1.4; max-width: 20ch; }
.card-new:hover .new-inner .ico { border-color: #fff; box-shadow: 0 0 20px rgba(255, 255, 255, .4); }
.card-badge {
  position: absolute; top: 10px; right: 10px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  border-radius: 999px; background: rgba(0, 0, 0, .7); border: 1px solid rgba(255, 255, 255, .25); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font: 600 12.5px/1 var(--display); letter-spacing: .14em; text-transform: uppercase;
  opacity: 0; translate: 0 -4px; transition: opacity .3s, translate .3s var(--ease);
}
.card-badge .ico { width: 14px; height: 14px; }
.card:hover .card-badge, .card:focus-visible .card-badge { opacity: 1; translate: 0 0; }
@media (hover: none) { .card-badge { opacity: 1; translate: 0 0; } }

.dropcatch {
  position: fixed; inset: 12px; z-index: 60; display: grid; place-items: center; pointer-events: none; border-radius: 16px;
  border: 1.5px dashed #fff; background: rgba(0, 0, 0, .78); box-shadow: inset 0 0 120px rgba(255, 255, 255, .12), 0 0 40px rgba(255, 255, 255, .15);
  opacity: 0; transition: opacity .25s;
}
.dropcatch div { display: grid; justify-items: center; gap: 14px; font: 600 26px/1 var(--display); letter-spacing: .08em; }
.dropcatch .ico { width: 54px; height: 54px; stroke-width: 1.3; filter: drop-shadow(0 0 10px #fff); }
.catching .dropcatch { opacity: 1; }

.auth { flex: 1; display: grid; place-items: center; padding: 48px var(--gutter) 80px; }
.auth-card {
  width: min(420px, 100%); padding: 40px 32px 34px; text-align: center; border-radius: 14px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012)); box-shadow: 0 0 90px rgba(255, 255, 255, .05);
}
.auth-mark { width: 62px; height: 62px; margin: 0 auto 22px; filter: drop-shadow(0 0 5px rgba(255, 255, 255, .8)) drop-shadow(0 0 22px rgba(255, 255, 255, .3)); }
.auth-mark .ff-mark { width: 100%; height: 100%; }
.auth-card h1 { margin: 0; font: 700 32px/1.05 var(--display); letter-spacing: .02em; text-shadow: 0 0 18px rgba(255, 255, 255, .3); }
.auth-sub { margin: 8px 0 26px; color: var(--fg-3); font-size: 14.5px; }
.auth-card .field { text-align: left; margin-bottom: 16px; }
.notice { margin: -8px 0 20px; padding: 12px 14px; border-radius: 6px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); color: var(--fg-2); font-size: 14px; text-align: left; }
.form-error { margin: -4px 0 14px; color: #ffb3ba; font-size: 14px; text-align: left; }

.ed { display: flex; flex-direction: column; gap: 20px; }
.panel {
  padding: clamp(20px, 2.8vw, 32px); border-radius: 12px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .038), rgba(255, 255, 255, .012));
}
.panel-title { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; font: 600 14px/1 var(--display); letter-spacing: .24em; text-transform: uppercase; }
.step { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-3); font-size: 13px; letter-spacing: 0; box-shadow: 0 0 12px rgba(255, 255, 255, .08); }

.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 20px; }
.field { display: grid; gap: 9px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field-label { padding: 0; color: var(--fg-2); font: 500 12.5px/1 var(--display); letter-spacing: .18em; text-transform: uppercase; }
.input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 5px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .55); color: var(--fg);
  font-size: 15.5px; transition: border-color .2s, box-shadow .2s, background .2s;
}
textarea.input { height: auto; min-height: 156px; padding: 12px 14px; line-height: 1.6; resize: vertical; }
.input::placeholder { color: var(--fg-4); }
.input:hover { border-color: var(--line-3); }
.input:focus { outline: none; border-color: #fff; background: #000; box-shadow: 0 0 0 3px rgba(255, 255, 255, .07), 0 0 24px rgba(255, 255, 255, .14); }
select.input {
  appearance: none; padding-right: 42px; cursor: pointer;
  background: rgba(0, 0, 0, .55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 16px;
}
select.input:invalid { color: var(--fg-4); }
select.input option { background: #0c0c0e; color: var(--fg); }
.input[aria-invalid="true"], .seg[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(255, 107, 120, .12); }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 6px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .55); }
.seg label { position: relative; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg span {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border-radius: 4px; color: var(--fg-3);
  font: 600 14px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; transition: background .25s, color .25s, box-shadow .25s;
}
.seg span .ico { width: 16px; height: 16px; }
.seg label:hover span { color: var(--fg); }
.seg input:checked + span { background: #fff; color: #000; box-shadow: 0 0 20px rgba(255, 255, 255, .3); }
.seg input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; }

.drop, .cover-box {
  position: relative; display: grid; place-items: center; width: 100%; overflow: hidden; border-radius: 8px; cursor: pointer;
  border: 1px dashed rgba(255, 255, 255, .24); background: rgba(255, 255, 255, .018); color: var(--fg-2); text-align: center;
  transition: border-color .25s, background .25s, box-shadow .3s;
}
.drop:hover, .cover-box:hover { border-color: rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .035); }
.drop.over, .cover-box.over {
  border-style: solid; border-color: #fff; background: rgba(255, 255, 255, .06);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .06), inset 0 0 50px rgba(255, 255, 255, .14), 0 0 30px rgba(255, 255, 255, .12);
}
.drop[aria-invalid="true"], .cover-box[aria-invalid="true"] { border-color: var(--danger); }
.drop-empty { display: grid; justify-items: center; gap: 8px; padding: 22px; }
.drop-empty .ico { width: 34px; height: 34px; margin-bottom: 6px; stroke-width: 1.3; opacity: .9; }
.drop-empty strong { font: 600 18px/1.2 var(--display); letter-spacing: .04em; color: var(--fg); }
.drop-empty small { color: var(--fg-3); font-size: 13px; line-height: 1.45; }
.drop-game { min-height: 168px; }
.drop-game.has-file { place-items: stretch; align-content: center; gap: 14px; padding: 22px 24px; border-style: solid; border-color: var(--line-2); text-align: left; }
.file-row { display: flex; align-items: center; gap: 16px; min-width: 0; }
.file-row > .ico { width: 44px; height: 44px; padding: 10px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); stroke-width: 1.4; }
.file-text { display: grid; gap: 4px; min-width: 0; flex: 1; }
.file-text strong { font: 600 18px/1.2 var(--display); letter-spacing: .03em; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-text small { color: var(--fg-3); font-size: 13.5px; }
.file-tag { padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line-3); font: 600 12px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--fg-2); }
.file-tag.new { background: #fff; color: #000; border-color: #fff; box-shadow: 0 0 14px rgba(255, 255, 255, .4); }
.drop-foot { display: flex; align-items: center; gap: 8px; margin: 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--fg-3); font-size: 13.5px; }
.drop-foot .ico { width: 16px; height: 16px; }

.covers { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 3fr); gap: 20px; align-items: start; }
.cover-slot { display: grid; gap: 10px; min-width: 0; }
.slot-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-height: 18px; }
.slot-head span { font: 600 14px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; }
.slot-head em { font-style: normal; color: var(--fg-3); margin-left: 4px; }
.slot-head small { color: var(--fg-3); font-size: 12.5px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ratio-h { aspect-ratio: 16 / 9; }
.ratio-v { aspect-ratio: 2 / 3; }
.cover-box.has-image { border-style: solid; border-color: var(--line-2); }
.cover-box > img, .cover-box > canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.cover-box .drop-empty { padding: 14px; }
.ratio-v .drop-empty strong { font-size: 15px; }
.ratio-v .drop-empty small { font-size: 12px; }
.box-hover {
  position: absolute; inset: auto 10px 10px auto; z-index: 3; display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 999px;
  background: rgba(0, 0, 0, .72); border: 1px solid rgba(255, 255, 255, .22); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font: 600 12px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--fg);
  opacity: 0; transition: opacity .25s; pointer-events: none;
}
.box-hover .ico { width: 14px; height: 14px; }
.cover-box:hover .box-hover, .cover-box:focus-visible .box-hover, .cover-box.over .box-hover { opacity: 1; }
.ratio-v .box-hover span { display: none; }
.box-badge {
  position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px;
  background: rgba(0, 0, 0, .7); border: 1px solid rgba(255, 255, 255, .2); font: 600 11px/1 var(--display); letter-spacing: .12em; text-transform: uppercase;
}
.box-badge .ico { width: 12px; height: 12px; }
.crop-frame {
  position: absolute; top: 0; bottom: 0; z-index: 2; cursor: grab; touch-action: none;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .58), inset 0 0 0 2px #fff, 0 0 22px rgba(255, 255, 255, .45);
}
.crop-frame.dragging { cursor: grabbing; }
.crop-frame span {
  position: absolute; top: 8px; left: 50%; translate: -50% 0; padding: 4px 8px; border-radius: 999px; background: #fff; color: #000;
  font: 700 10.5px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; white-space: nowrap;
}
.crop-frame::before, .crop-frame::after { content: ''; position: absolute; top: 50%; width: 4px; height: 34px; translate: 0 -50%; border-radius: 2px; background: #fff; box-shadow: 0 0 8px #fff; }
.crop-frame::before { left: -2px; } .crop-frame::after { right: -2px; }

.vbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 24px; margin-top: 18px; }
.vmode { display: inline-flex; gap: 4px; padding: 4px; border-radius: 6px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .55); }
.vmode button {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 0; border-radius: 4px; background: none; color: var(--fg-3);
  font: 600 13px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; transition: background .25s, color .25s, box-shadow .25s;
}
.vmode button .ico { width: 15px; height: 15px; }
.vmode button:hover { color: var(--fg); }
.vmode button[aria-pressed="true"] { background: #fff; color: #000; box-shadow: 0 0 18px rgba(255, 255, 255, .28); }
.crop-range { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 220px; max-width: 420px; color: var(--fg-3); font: 500 12.5px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; }
.crop-range input { flex: 1; accent-color: #fff; }

.savebar {
  position: sticky; bottom: 16px; z-index: 30; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 10px 10px 20px; overflow: hidden;
  border-radius: 10px; border: 1px solid var(--line-2); background: rgba(10, 10, 12, .84); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .75), 0 0 30px rgba(255, 255, 255, .05);
}
.savebar-status { flex: 1; min-width: 160px; display: flex; align-items: center; gap: 10px; color: var(--fg-3); font-size: 14px; }
.savebar-status.dirty { color: var(--fg); }
.savebar-status.dirty::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px #fff; }
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255, 255, 255, .08); }
.progress i { display: block; width: 0; height: 100%; background: #fff; box-shadow: 0 0 10px #fff; transition: width .2s; }

.toast {
  position: fixed; top: calc(var(--top) + 14px); left: 50%; z-index: 300; display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px);
  padding: 12px 20px; border-radius: 999px; background: #fff; color: #000; font: 500 14.5px/1.3 var(--body);
  box-shadow: 0 0 30px rgba(255, 255, 255, .35), 0 12px 40px rgba(0, 0, 0, .6);
  translate: -50% -12px; opacity: 0; pointer-events: none; transition: translate .4s var(--ease), opacity .3s;
}
.toast.show { translate: -50% 0; opacity: 1; pointer-events: auto; }
.toast a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.toast.error { background: #19080b; color: #ffc2c8; border: 1px solid rgba(255, 107, 120, .5); box-shadow: 0 0 30px rgba(255, 107, 120, .2), 0 12px 40px rgba(0, 0, 0, .6); }

dialog.modal {
  width: min(460px, calc(100vw - 32px)); padding: 0; border-radius: 14px; border: 1px solid var(--line-2); background: #0b0b0d; color: var(--fg);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .85), 0 0 50px rgba(255, 255, 255, .07);
}
dialog.modal::backdrop { background: rgba(0, 0, 0, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
dialog.modal[open] { animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; scale: .96; } }
.modal form { padding: 28px; }
.modal h2 { margin: 0 0 10px; font: 700 26px/1.1 var(--display); letter-spacing: .02em; }
.modal p { margin: 0 0 22px; color: var(--fg-2); }
.modal .field { margin-bottom: 18px; }
.modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }

.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 24px var(--gutter); border-top: 1px solid var(--line); color: var(--fg-4); font-size: 13px; }
.foot a { color: var(--fg-3); transition: color .25s; }
.foot a:hover { color: var(--fg); }
[data-section="dev"] .foot a { display: none; }

/* ---------------------------------------------------------------- page transitions (library ⇄ game page) */

::view-transition-group(cover) { animation-duration: .62s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
::view-transition-old(cover), ::view-transition-new(cover) { width: 100%; height: 100%; object-fit: cover; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .4s; }
::view-transition-group(topbar) { animation: none; }

/* ---------------------------------------------------------------- smaller screens */

@media (max-width: 1180px) { :root { --cols: 4; } }
@media (max-width: 980px) {
  :root { --cols: 3; }
  .gp-grid { grid-template-columns: 1fr; gap: 34px; }
  .gp-cover { -webkit-box-reflect: unset; }
}
@media (max-width: 640px) {
  :root { --cols: 2; --top: 60px; }
  .brand-word { font-size: 19px; }
  .brand .ff-mark { width: 26px; height: 26px; }
  .nav a { padding: 10px 8px; font-size: 13px; }
  .gp-specs { grid-template-columns: 1fr; }
  .gp-specs > div:nth-child(even) { padding-left: 0; border-left: 0; }
  .play-btn { width: 100%; }
  .fields { grid-template-columns: 1fr; }
  .covers { grid-template-columns: minmax(0, 1fr); }
  .covers .ratio-v { max-width: 240px; }
  .savebar { padding-left: 14px; }
  .savebar-status { flex-basis: 100%; }
  .savebar .btn { flex: 1; }
  .player-title { display: none; }
  .card-title { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
