/* ---------- colours & fonts: change these to restyle the whole site ---------- */
@font-face {
  font-family: "Eurostile Site";
  src: url("fonts/eurostile.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg-top: #5b63aa;
  --bg-mid: #6a7cb4;
  --bg-bottom: #6e9ba7;
  --dots: rgba(10, 12, 32, 0.34);
  --panel: #111318;
  --bar: #0b0c10;
  --text: #f1f1f4;
  --text-dim: #aeb2c4;
  --label: rgba(232, 232, 248, 0.92);
  --label-text: #191a28;
  --red: #b31d2b;
  --site-font: "Eurostile Site", "Hiragino Kaku Gothic ProN", "Yu Gothic", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--bg-mid); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 17px/1.45 var(--site-font);
  background:
    radial-gradient(var(--dots) 0.9px, transparent 1.4px) 0 0 / 4px 4px,
    linear-gradient(180deg, var(--bg-top), var(--bg-mid) 50%, var(--bg-bottom));
  background-attachment: fixed;
}

a { color: inherit; }
img { display: block; max-width: 100%; }

.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 16px 28px;
}

/* ---------- title bar, panel, footer ---------- */

.titlebar {
  margin: 0 0 28px;
  padding: 12px 20px 14px;
  background: var(--bar);
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  text-align: center;
  font-size: clamp(1.5rem, 4.5vw, 2.05rem);
  font-weight: 500;
  line-height: 1.2;
}
.titlebar[hidden] { display: none; }
.titlebar a { text-decoration: none; }

.panel {
  padding: 44px 48px;
  background-color: var(--panel);
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.018) 0 2px, transparent 2px 5px);
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.panel.enter { animation: enter 0.45s ease both; }
@keyframes enter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.footer {
  margin-top: 10px;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.78);
}
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; }

.empty { margin: 0; text-align: center; color: var(--text-dim); }

h2.rule {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  font: 700 0.8rem/1 var(--site-font);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
h2.rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
}

/* ---------- section tabs ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: -12px 0 28px;
}
.fchip {
  display: inline-block;
  padding: 7px 12px 6px;
  font: 700 0.76rem/1 var(--site-font);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
}
.fchip b { margin-left: 6px; color: var(--text); }
.fchip:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.45); }
.fchip.on { color: var(--label-text); background: var(--label); border-color: transparent; }
.fchip.on b { color: var(--red); }

/* ---------- bug report form ---------- */

.contact-content { max-width: 560px; margin: 0 auto; }
.contact-content h1 { margin: 0 0 8px; font-size: 1.6rem; line-height: 1.2; }
.contact-content p { margin: 0 0 22px; color: var(--text-dim); }
.bug-form { display: grid; gap: 17px; }
.bug-form label { display: grid; gap: 6px; font-weight: 700; }
.bug-form input, .bug-form textarea {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 4px;
  color: var(--text);
  background: #20232d;
  font: 1rem/1.4 var(--site-font);
}
.bug-form textarea { resize: vertical; }
.bug-form input:focus, .bug-form textarea:focus { outline: 2px solid var(--label); outline-offset: 2px; }
.bug-form button {
  justify-self: start;
  padding: 10px 18px;
  border: 0;
  border-radius: 4px;
  background: var(--label);
  color: var(--label-text);
  font: 700 0.9rem/1.2 var(--site-font);
  cursor: pointer;
}
.bug-form button:disabled { opacity: 0.5; cursor: not-allowed; }
.contact-content .form-note { margin: 0; }

/* ---------- home: banner grid ---------- */

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px 24px;
  align-items: start;
}

.banner {
  --c: #3d4fd6;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  width: 100%;
  min-width: 0;
  aspect-ratio: 5 / 2;
  padding: 34px 8px 8px; /* top space keeps long labels clear of the corner tags */
  overflow: hidden;
  overflow: clip; /* unlike hidden, clip lets the banner grow taller when its label needs room */
  border-radius: 4px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease, filter 0.2s ease;
}
.banner:hover { transform: translateY(-2px); filter: brightness(1.08); }
.banner:focus-visible { outline: 2px solid var(--label); outline-offset: 3px; }

/* placeholder art, shared by banners and covers, until a real image loads */
.art {
  position: absolute;
  inset: 0;
  background-color: var(--c);
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.17) 0.9px, transparent 1.4px),
    linear-gradient(100deg,
      color-mix(in srgb, var(--c) 30%, #fff) 0%,
      var(--c) 48%,
      color-mix(in srgb, var(--c) 40%, #07081a) 100%);
  background-size: 4px 4px, auto;
}
.art-jp {
  position: absolute;
  top: 10px;
  left: 12px;
  max-width: 62%;
  font: 700 1.7rem/1.05 var(--site-font);
  color: rgba(255, 255, 255, 0.38);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
  pointer-events: none;
}
.banner .art-jp {
  top: 32px;
  max-width: none;
  white-space: nowrap;
  font-size: 1.9rem;
  color: rgba(255, 255, 255, 0.3);
}
.has-art .art-jp,
.has-art .cover-plat { display: none; }

.chip {
  position: absolute;
  top: 8px;
  z-index: 1;
  padding: 5px 7px 4px;
  font: 800 0.64rem/1 var(--site-font);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 3px;
}
.chip.plat { left: 8px; color: #fff; background: rgba(8, 9, 14, 0.82); }
.chip.st { right: 8px; color: var(--label-text); background: var(--label); }
.chip.st::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  vertical-align: 1px;
  border-radius: 50%;
  background: var(--dot, #d9a21b);
}
.st-testing { --dot: #3a7bd5; }
.st-planned { --dot: #8a8fa3; }
.st-hold { --dot: #c0392b; }
.st-released { --dot: #2e9e5b; }

.ribbon {
  position: absolute;
  top: 26%;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%) rotate(-3deg);
  white-space: nowrap;
  font: 800 1.35rem/1 var(--site-font);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  -webkit-text-stroke: 5px #2b3fae;
  paint-order: stroke fill;
}

.label {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 74%;
  padding: 5px 9px 6px;
  color: var(--label-text);
  background: var(--label);
  border-top: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 2px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}
.l-series {
  font: 700 0.74rem/1.1 var(--site-font);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.l-title {
  font: 800 1.02rem/1.05 var(--site-font);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--red);
}
.l-tag {
  margin-top: 2px;
  font: 800 0.7rem/1.2 var(--site-font);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.l-bar {
  height: 3px;
  margin-top: 4px;
  overflow: hidden;
  background: rgba(25, 26, 40, 0.16);
  border-radius: 2px;
}
.l-bar i { display: block; height: 100%; background: var(--red); }

/* ---------- dated lists: latest updates + update log ---------- */

.feed { margin-top: 40px; }

.dated { margin: 0; padding: 0; list-style: none; }
.dated li {
  display: grid;
  grid-template-columns: 10.5em 1fr;
  gap: 14px;
  padding: 7px 0;
  font-size: 0.95rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.09);
}
.dated li:last-child { border-bottom: 0; }
.dated time { color: var(--text-dim); font-variant-numeric: tabular-nums; }
.dated .who a { text-underline-offset: 3px; }

/* ---------- project page ---------- */

.detail {
  display: flex;
  flex-direction: column;
  gap: 26px;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.cover {
  --c: #3d4fd6;
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  aspect-ratio: 5 / 7;
  overflow: hidden;
  border-radius: 3px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5);
}
.cover .art-jp {
  top: 20px;
  right: 18px;
  left: auto;
  max-width: none;
  max-height: calc(100% - 90px);
  writing-mode: vertical-rl;
  font-size: 2.1rem;
  line-height: 1.15;
}
.cover-plat {
  position: absolute;
  left: 16px;
  bottom: 12px;
  font: 800 2.4rem/1 var(--site-font);
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.55);
}
.cover.has-art { aspect-ratio: auto; }
.cover.has-art .art { display: none; }
.cover img { width: 100%; }

.info { min-width: 0; overflow-wrap: anywhere; }
.info h1 { margin: 0; font: 800 1.15rem/1.12 var(--site-font); }
.info .jp { font-family: var(--site-font); font-size: 0.98rem; line-height: 1.35; }
.info .caps { line-height: 1.2; text-transform: uppercase; }
.info a { text-underline-offset: 3px; }

.dl-list {
  margin: 1.8em 0 0;
  padding: 0;
  list-style: none;
  text-transform: uppercase;
}
.dl-list li { padding: 5px 0; }

.home { display: inline-block; margin-top: 26px; color: #fff; }
.home:hover { opacity: 0.8; }

/* ---------- phones ---------- */

@media (max-width: 720px) {
  .wrap { padding: 20px 12px 24px; }
  .panel { padding: 24px 12px; }
  .filters { margin: 0 0 22px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .banner { aspect-ratio: auto; min-height: 180px; padding-top: 42px; }
  .label { width: 86%; min-width: 0; overflow-wrap: anywhere; }
  .cover { width: 100%; max-width: 300px; margin: 0 auto; }
  .dated li { grid-template-columns: 1fr; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .panel.enter { animation: none; }
  .banner { transition: none; }
}

/* JavaScript-free routing and filters for the static backup. */
.detail.panel { display: none; }
.detail.panel:target { display: flex; }
.detail.panel:target ~ .home-view { display: none; }
.contact-view { display: none; }
.contact-view:target { display: block; }
.contact-view:target ~ .home-view { display: none; }
