/* Layout: a field-manual drill sheet. Pixel title block, then one row per move: GIF slot left, orders right. Stacks at phone width. */
:root {
  --bg: #000;
  --paper: #000;
  --ink: #ffffff;
  --muted: #a9a9a9;
  --line: #2f2f2f;
  --frog: #7cc65e;
  --frog-soft: #1a1a1a;
  --cherry: #f07085;
  --key-bg: #ffffff;
  --key-fg: #0a0b0a;
  color-scheme: dark;
  --f-display: "DotGothic16", "M PLUS 1p", system-ui, sans-serif;
  --f-body: "M PLUS 1p", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  --f-mono: "Share Tech Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }

/* Back link (top-left) */
.back-link {
  position: fixed;
  top: 20px;
  left: 27px;
  z-index: 100;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #fff;
  text-decoration: none;
}
.back-link:hover { opacity: 0.75; }
@media (max-width: 680px) {
  .back-link { top: 16px; left: 21px; }
}

/* Language selector (top-right) */
.lang-toggle {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 100;
}
.lang-toggle__select {
  background: #000;
  color: #ccc;
  border: 1px solid #333;
  padding: 5px 26px 5px 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  cursor: pointer;
  border-radius: 4px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #888 50%), linear-gradient(135deg, #888 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.lang-toggle__select:hover { color: #fff; border-color: #666; }
.lang-toggle__select option { background: #000; color: #ccc; }

body {
  margin: 0;
  background: var(--bg) url("img/bg.png") repeat;
  image-rendering: pixelated;
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.8;
}
body > * { image-rendering: auto; }
.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding-inline: 20px;
  padding-block: 40px 64px;
}

/* Header */
header.hero {
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
  padding-bottom: 28px;
  margin-bottom: 8px;
}
.hero__visual {
  width: 100%;
  max-width: 760px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 12px;
}
.hero__logo {
  max-width: 400px;
  width: 100%;
  height: auto;
  display: block;
  flex-shrink: 1;
}
.hero__character {
  width: 253px;
  height: auto;
  flex-shrink: 0;
  margin-bottom: 10px;
}
.hero__titlebox {
  background: #000;
  padding: 14px 36px;
  margin-top: -24px;
  position: relative;
  z-index: 1;
  text-align: center;
  display: inline-block;
}
.hero__titlebox h1 { margin: 0; }
.hero__titlebox .sub { margin: 4px 0 0; }
@media (max-width: 680px) {
  .hero__visual { flex-direction: column; align-items: center; gap: 10px; }
  .hero__character { width: 140px; margin: 0; }
  .hero__titlebox { padding: 12px 20px; margin-top: -14px; }
}
.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
h1 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(18px, 3.6vw, 31px);
  line-height: 1.2;
  margin: 0;
  text-wrap: balance;
}
.sub {
  font-family: var(--f-display);
  font-size: clamp(16px, 2.6vw, 20px);
  color: var(--muted);
  margin: 0;
}
.sub::before, .sub::after { content: "ー "; }
.sub::after { content: " ー"; }
.orders {
  margin: 6px 0 0;
  max-width: 62ch;
  font-weight: 700;
  font-size: 1.2em;
  padding-bottom: 44px;
  position: relative;
}
.orders::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100vw - 40px);
  max-width: 940px;
  height: 32px;
  background: url("img/tile.png") repeat-x center / auto 32px;
  image-rendering: pixelated;
}
.legend {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  font-size: 13px; color: var(--muted);
  align-items: center;
  justify-content: center;
}

/* Move list */
ol.moves {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: move-counter;
}
.move {
  display: grid;
  grid-template-columns: auto minmax(0, 300px) minmax(0, 1fr);
  column-gap: 20px;
  row-gap: 14px;
  padding-block: 28px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 16px;
}
.move__num {
  counter-increment: move-counter;
  align-self: start;
  text-align: center;
  min-width: 1.6em;
  line-height: 1;
}
.move__label {
  display: block;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 2px;
}
.move__num::after {
  content: counter(move-counter);
  display: block;
  font-family: var(--f-body);
  font-weight: 800;
  font-size: clamp(44px, 6.5vw, 72px);
  line-height: 0.9;
  color: var(--ink);
}
@media (max-width: 680px) {
  .move {
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 14px;
  }
  .move .gif { grid-column: 1 / -1; }
  .move .body { grid-column: 1 / -1; }
  .move::before { font-size: 36px; }
}

.gif {
  aspect-ratio: 16 / 9;
  max-width: 100%;
  border: 2px dashed var(--line);
  background: var(--paper);
  display: grid; place-items: center;
  text-align: center;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
}
.gif img, .gif video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.gif video { transform: scale(1.3); transform-origin: center; }
.gif[data-video] { cursor: pointer; }

/* Video modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: grid;
  place-items: center;
  z-index: 1000;
}
.modal[hidden] { display: none; }
.modal__inner {
  display: grid;
  gap: 22px;
  justify-items: center;
  max-width: 100%;
}
.modal__title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(28px, 4.5vw, 48px);
  color: #ffd400;
  text-shadow: 3px 3px 0 #000;
  margin: 0;
  text-align: center;
  line-height: 1.2;
}
.modal__video {
  width: 90vw;
  max-width: 1280px;
  max-height: 78vh;
  background: #000;
  outline: none;
}
.modal__close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid #444;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--f-mono);
}
.modal__close:hover { border-color: #fff; background: rgba(255,255,255,0.08); }

.body { min-width: 0; display: grid; gap: 10px; align-content: start; }
.head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
h2 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.25;
  margin: 0;
  color: #ffd400;
}
.en {
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: .14em;
  color: var(--muted);
  text-transform: uppercase;
}
html[lang="en"] .en { display: none; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.stars {
  font-size: 17px;
  letter-spacing: .12em;
  color: #c86bff;
  white-space: nowrap;
}
.stars .off { color: var(--line); }
.stars-label { font-size: 12px; color: var(--muted); margin-right: 6px; letter-spacing: 0; }
.input { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.key {
  display: inline-grid; place-items: center;
  min-width: 26px; height: 26px; padding: 0 6px;
  border-radius: 13px;
  background: var(--key-bg); color: var(--key-fg);
  font-family: var(--f-mono); font-size: 13px;
}
.key.hold { border-radius: 6px; }
/* Xbox controller colors */
.key.key--a { background: #16A74E; color: #fff; }
.key.key--b { background: #E42028; color: #fff; }
.arrow { color: var(--muted); }
.cherry {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700;
  color: var(--cherry);
}
.cherry::before {
  content: "";
  width: 16px;
  height: 16px;
  background: url("img/cherry.png") no-repeat center / contain;
  image-rendering: pixelated;
}
.desc { margin: 0; max-width: 62ch; font-size: 16px; }

.closing {
  max-width: 62ch;
  margin: 44px auto 24px;
  font-weight: 700;
  font-size: 1.2em;
  text-align: left;
}
.steam-widget {
  width: 100%;
  max-width: 646px;
  margin: 24px auto 0;
  background: #000;
}
.steam-widget iframe {
  display: block;
  width: 100%;
  height: 190px;
  border: 0;
  background: transparent;
  color-scheme: light;
}
footer {
  margin-top: 36px;
  font-size: 13px;
  text-align: center;
  color: #ffffff;
}
footer a { color: inherit; text-decoration: none; }
