@font-face {
  font-family: "Pixelify Sans";
  src: url("../fonts/PixelifySans-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/IBMPlexMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/IBMPlexMono-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

:root {
  --bg: #140F1A;
  --soot: #1F1828;
  --line: #3A2E45;
  --ember: #F28C28;
  --ember-hi: #FCA848;
  --cream: #F4E4C1;
  --dim: #A898B4;
  --faint: #7A6C86;
  --ink: #1A0E06;
  --night: #0B0810;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; background: var(--bg); color: var(--cream); }
body {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.px { font-family: "Pixelify Sans", "IBM Plex Mono", monospace; font-weight: 500; }
.ember { color: var(--ember); }

canvas { display: block; }

a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }

.home { max-width: 960px; margin: 0 auto; padding: 24px 24px 32px; }

.top { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 22px; }
.brand-icon { width: 16px; height: 20px; image-rendering: pixelated; }
.season { font-size: 12px; color: var(--dim); border: 1px solid var(--line); padding: 3px 10px; border-radius: 3px; }

.hero { margin: 56px 0 32px; }
.hero h1 { font-size: clamp(32px, 6vw, 56px); line-height: 1.1; margin: 0 0 12px; }
.lead { color: var(--dim); font-size: 15px; margin: 0; max-width: 480px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }

.card { background: var(--soot); border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; }
.preview { border-radius: 4px; overflow: hidden; background: #000; }
.preview canvas { width: 100%; height: auto; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 14px 0 4px; }
.card-title { font-family: "Pixelify Sans", monospace; font-weight: 500; font-size: 20px; margin: 0; }
.card-text { font-size: 13px; color: var(--dim); margin: 0 0 16px; line-height: 1.5; flex: 1; }

.tag { font-size: 11px; color: var(--ink); padding: 2px 8px; border-radius: 3px; white-space: nowrap; }
.tag-creme { background: var(--cream); }
.tag-glod { background: var(--ember); }
.tag-is { background: #A8D8F0; }
.tag-pink { background: #F870C0; }
.tag-gron { background: #8CC860; }

.btn {
  font-family: "Pixelify Sans", monospace; font-weight: 500; font-size: 17px;
  background: var(--ember); color: var(--ink);
  border: 0; border-radius: 4px; padding: 11px 16px; cursor: pointer;
}
.btn:hover { background: var(--ember-hi); }
.btn-full { width: 100%; }

.btn-ghost {
  font-family: "Pixelify Sans", monospace; font-weight: 500; font-size: 14px;
  background: transparent; color: var(--cream);
  border: 1px solid var(--line); border-radius: 4px; padding: 7px 12px; cursor: pointer;
}
.btn-ghost:hover { border-color: var(--ember); }

.note { font-size: 12px; color: var(--dim); margin: 14px 0 0; }

.howto { margin-top: 48px; border-top: 1px solid var(--line); padding-top: 24px; }
.howto h2 { font-size: 18px; margin: 0 0 16px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; font-size: 13px; color: var(--dim); line-height: 1.5; }
.step-no { display: block; color: var(--ember); font-size: 20px; }

.foot { display: flex; justify-content: space-between; margin-top: 40px; font-size: 12px; color: var(--faint); }

.player {
  position: fixed; inset: 0; background: var(--night);
  display: flex; align-items: center; justify-content: center;
}
.player:not(.ui-on) { cursor: none; }
.ctrl {
  position: absolute; top: 16px; left: 18px; right: 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  opacity: 0; transition: opacity .5s;
}
.player.ui-on .ctrl { opacity: 1; }
.pname { font-size: 14px; color: var(--dim); }

.stage { position: relative; line-height: 0; }

.wm { position: absolute; font-size: 13px; color: #5E5068; transition: opacity .9s; }
.wm.is-fading { opacity: 0; }
.wm-pos-0 { right: 22px; bottom: 16px; }
.wm-pos-1 { left: 22px; bottom: 16px; }
.wm-pos-2 { right: 22px; top: 20px; }

@media (max-width: 600px) {
  .home { padding: 18px 16px 28px; }
  .hero { margin: 36px 0 24px; }
}
